Commit 16409caa639f6470d33b43b37b38b1b8967f2537
Exists in
master
Merge branch 'otrs-5.0.x' of
gitlab.setic.ufsc.br:CSS/otrs-new-ticket-wizard into otrs-5.0.x
Showing
1 changed file
with
12 additions
and
7 deletions
Show diff stats
var/httpd/htdocs/js/thirdparty/alpaca/jquery.sumoselect.js
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | var settings = $.extend({ | 20 | var settings = $.extend({ |
21 | placeholder: 'Escolha', // Dont change it here. | 21 | placeholder: 'Escolha', // Dont change it here. |
22 | csvDispCount: 3, // display no. of items in multiselect. 0 to display all. | 22 | csvDispCount: 3, // display no. of items in multiselect. 0 to display all. |
23 | - captionFormat:'{0} Selected', // format of caption text. you can set your locale. | 23 | + captionFormat:'{0} Selecionados', // format of caption text. you can set your locale. |
24 | floatWidth: 0, // Screen width of device at which the list is rendered in floating popup fashion. | 24 | floatWidth: 0, // Screen width of device at which the list is rendered in floating popup fashion. |
25 | forceCustomRendering: false, // force the custom modal on all devices below floatWidth resolution. | 25 | forceCustomRendering: false, // force the custom modal on all devices below floatWidth resolution. |
26 | nativeOnDevice: ['Android', 'BlackBerry', 'iPhone', 'iPad', 'iPod', 'Opera Mini', 'IEMobile', 'Silk'], // | 26 | nativeOnDevice: ['Android', 'BlackBerry', 'iPhone', 'iPad', 'iPod', 'Opera Mini', 'IEMobile', 'Silk'], // |
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | okCancelInMulti: false, //display ok cancel buttons in desktop mode multiselect also. | 29 | okCancelInMulti: false, //display ok cancel buttons in desktop mode multiselect also. |
30 | triggerChangeCombined: true, // im multi select mode wether to trigger change event on individual selection or combined selection. | 30 | triggerChangeCombined: true, // im multi select mode wether to trigger change event on individual selection or combined selection. |
31 | selectAll: false, // to display select all button in multiselect mode.|| also select all will not be available on mobile devices. | 31 | selectAll: false, // to display select all button in multiselect mode.|| also select all will not be available on mobile devices. |
32 | - selectAlltext: 'Select All' // the text to display for select all. | 32 | + selectAlltext: 'Selecionar todos' // the text to display for select all. |
33 | 33 | ||
34 | }, options); | 34 | }, options); |
35 | 35 | ||
@@ -113,7 +113,7 @@ | @@ -113,7 +113,7 @@ | ||
113 | 113 | ||
114 | if(!opt.attr('value'))opt.attr('value',opt.val()); | 114 | if(!opt.attr('value'))opt.attr('value',opt.val()); |
115 | 115 | ||
116 | - if (settings && settings.floatWidth) { | 116 | + if (settings && settings.floatWidth != "0") { |
117 | li = $('<li data-val="' + opt.val() + '"><label style="width: ' + settings.floatWidth + '">' + opt.text() + '</label></li>'); | 117 | li = $('<li data-val="' + opt.val() + '"><label style="width: ' + settings.floatWidth + '">' + opt.text() + '</label></li>'); |
118 | } else | 118 | } else |
119 | li = $('<li data-val="' + opt.val() + '"><label>' + opt.text() + '</label></li>'); | 119 | li = $('<li data-val="' + opt.val() + '"><label>' + opt.text() + '</label></li>'); |
@@ -232,7 +232,7 @@ | @@ -232,7 +232,7 @@ | ||
232 | } | 232 | } |
233 | }, | 233 | }, |
234 | 234 | ||
235 | - showOpts: function () { | 235 | + showOpts: function () { |
236 | var O = this; | 236 | var O = this; |
237 | if (O.E.attr('disabled')) return; // if select is disabled then retrun | 237 | if (O.E.attr('disabled')) return; // if select is disabled then retrun |
238 | O.is_opened = true; | 238 | O.is_opened = true; |
@@ -241,6 +241,7 @@ | @@ -241,6 +241,7 @@ | ||
241 | 241 | ||
242 | // hide options on click outside. | 242 | // hide options on click outside. |
243 | $(document).on('click.sumo', function (e) { | 243 | $(document).on('click.sumo', function (e) { |
244 | + | ||
244 | if (!O.select.is(e.target) // if the target of the click isn't the container... | 245 | if (!O.select.is(e.target) // if the target of the click isn't the container... |
245 | && O.select.has(e.target).length === 0){ // ... nor a descendant of the container | 246 | && O.select.has(e.target).length === 0){ // ... nor a descendant of the container |
246 | // if (O.is_multi && settings.okCancelInMulti) | 247 | // if (O.is_multi && settings.okCancelInMulti) |
@@ -452,10 +453,14 @@ | @@ -452,10 +453,14 @@ | ||
452 | var O = this; | 453 | var O = this; |
453 | //called on init and also on resize. | 454 | //called on init and also on resize. |
454 | //O.is_floating = true if window width is < specified float width | 455 | //O.is_floating = true if window width is < specified float width |
455 | - O.is_floating = (settings.floatWidth); | 456 | + O.is_floating = (settings.floatWidth && settings.floatWidth != "0"); |
456 | 457 | ||
457 | - //set class isFloating | ||
458 | - O.optDiv.toggleClass('isFloating', O.is_floating); | 458 | + //set class isFloating - JS inconsistence |
459 | + if (O.is_floating) { | ||
460 | + O.optDiv.toggleClass('isFloating', true); | ||
461 | + } else { | ||
462 | + O.optDiv.toggleClass('isFloating', false); | ||
463 | + } | ||
459 | 464 | ||
460 | //remove height if not floating | 465 | //remove height if not floating |
461 | if (!O.is_floating) O.optDiv.css('height', ''); | 466 | if (!O.is_floating) O.optDiv.css('height', ''); |