From 1a3fdecd1c1ac75110f3f95d3722598eee226df8 Mon Sep 17 00:00:00 2001 From: Michael Scherle Date: Mon, 21 Nov 2016 05:40:44 +0100 Subject: using given libs --- .../jquery-week-calendar/jquery.weekcalendar.js | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js') diff --git a/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js b/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js index a7609d3d..4e6017ef 100755 --- a/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js +++ b/modules-available/locationinfo/frontend/jquery-week-calendar/jquery.weekcalendar.js @@ -2018,19 +2018,19 @@ * Disable text selection of the elements in different browsers */ _disableTextSelect: function($elements) { - $elements.each(function() { - if ($.browser.mozilla) {//Firefox - $(this).css('MozUserSelect', 'none'); - } else if ($.browser.msie) {//IE - $(this).bind('selectstart', function() { - return false; - }); - } else {//Opera, etc. - $(this).mousedown(function() { - return false; - }); - } - }); + $elements.each(function() { + $(this).attr('unselectable', 'on') + .css({ + '-moz-user-select': '-moz-none', + '-moz-user-select': 'none', + '-o-user-select': 'none', + '-khtml-user-select': 'none', /* you could also put this in a class */ + '-webkit-user-select': 'none',/* and add the CSS class here instead */ + '-ms-user-select': 'none', + 'user-select': 'none' + }).bind('selectstart', function () { return false; }); + + }); }, /* -- cgit v1.2.3-55-g7522