Ticket #4417: ui.selectable.js.patch
File ui.selectable.js.patch, 1.3 KB (added by , 13 years ago) |
---|
-
ui.selectable.js
old new $.widget("ui.selectable", $.extend({}, $ 48 48 49 49 this._mouseInit(); 50 50 51 this.helper = $(document.createElement('div')) 52 .css({border:'1px dotted black'})53 .addClass("ui-selectable-helper");51 this.helper = $(document.createElement('div')).addClass("ui-selectable-helper"); 52 if (this.options.multiselect) 53 this.helper.css({border:'1px dotted black'}); 54 54 }, 55 55 56 56 destroy: function() { … … $.widget("ui.selectable", $.extend({}, $ 93 93 this.selectees.filter('.ui-selected').each(function() { 94 94 var selectee = $.data(this, "selectable-item"); 95 95 selectee.startselected = true; 96 if (!event.metaKey ) {96 if (!event.metaKey || !options.multiselect) { 97 97 selectee.$element.removeClass('ui-selected'); 98 98 selectee.selected = false; 99 99 selectee.$element.addClass('ui-unselecting'); … … $.widget("ui.selectable", $.extend({}, $ 126 126 var self = this; 127 127 this.dragged = true; 128 128 129 if (this.options.disabled )129 if (this.options.disabled || !this.options.multiselect) 130 130 return; 131 131 132 132 var options = this.options; … … $.extend($.ui.selectable, { 250 250 delay: 0, 251 251 distance: 0, 252 252 filter: '*', 253 tolerance: 'touch' 253 tolerance: 'touch', 254 multiselect: true 254 255 } 255 256 }); 256 257