Major changes to the structure of pages to utilize the flex layout system.
This commit is contained in:
30
public/admin/js/jquery.disableSelection.js
Normal file
30
public/admin/js/jquery.disableSelection.js
Normal file
@@ -0,0 +1,30 @@
|
||||
(function($){
|
||||
$.fn.disableSelection = function() {
|
||||
return this
|
||||
.attr('unselectable', 'on')
|
||||
.css('user-select', 'none')
|
||||
.css('-moz-user-select', 'none')
|
||||
.css('-khtml-user-select', 'none')
|
||||
.css('-webkit-user-select', 'none')
|
||||
.on('selectstart', false)
|
||||
.on('contextmenu', false)
|
||||
.on('keydown', false)
|
||||
.on('mousedown', false)
|
||||
.css({cursor: 'default'});
|
||||
};
|
||||
|
||||
$.fn.enableSelection = function() {
|
||||
return this
|
||||
.attr('unselectable', '')
|
||||
.css('user-select', '')
|
||||
.css('-moz-user-select', '')
|
||||
.css('-khtml-user-select', '')
|
||||
.css('-webkit-user-select', '')
|
||||
.off('selectstart', false)
|
||||
.off('contextmenu', false)
|
||||
.off('keydown', false)
|
||||
.off('mousedown', false)
|
||||
.css({cursor: 'auto'});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user