|
278 | 278 | .keydown(function (e) {
|
279 | 279 | if (e.keyCode == 13) {
|
280 | 280 | var concat = '';
|
281 |
| - $("#sbox #qtbl input").each(function () { |
| 281 | + $("#sbox #qtbl input[type='text']").each(function () { |
282 | 282 | concat += $.trim($(this).val());
|
283 | 283 | });
|
284 | 284 | if (e.keyCode == 13 && concat === '') {
|
|
287 | 287 | window.location = document.xrefPath + '/' + self.$input.val();
|
288 | 288 | return false;
|
289 | 289 | }
|
290 |
| - var $el = $(".keyboard-selection").first() |
| 290 | + var $el = $(".keyboard-selection").first().find(".sol-checkbox") |
291 | 291 | // follow the actual project
|
292 |
| - if($el.length) { |
| 292 | + if($el.length && $el.data('sol-item') && |
| 293 | + $el.data('sol-item').label) { |
293 | 294 | window.location = document.xrefPath +
|
294 | 295 | '/' +
|
295 |
| - $el.find(".sol-label-text").text(); |
| 296 | + $el.data('sol-item').label; |
296 | 297 | return false;
|
297 | 298 | }
|
298 | 299 | // follow first selected project
|
299 |
| - $el = $(".sol-selected-display-item-text").first() |
300 |
| - if($el.length) { |
301 |
| - window.location = document.xrefPath + '/' + $el.text(); |
| 300 | + $el = $(".sol-selected-display-item").first() |
| 301 | + if($el.length && $el.data('label')) { |
| 302 | + window.location = document.xrefPath + '/' + $el.data('label'); |
302 | 303 | return false;
|
303 | 304 | }
|
304 | 305 | return false;
|
305 |
| - } else if (e.keyCode == 13) { |
306 | 306 | }
|
307 | 307 | return true;
|
308 | 308 | }
|
|
787 | 787 | var self = this,
|
788 | 788 | $actualTargetContainer = $optionalTargetContainer || this.$selection,
|
789 | 789 | $inputElement,
|
| 790 | + /* |
| 791 | + * Modified 2016 |
| 792 | + */ |
790 | 793 | $labelText = $('<div class="sol-label-text"/>')
|
791 |
| - .html(solOption.label.trim().length === 0 ? ' ' : solOption.label) |
| 794 | + .html(solOption.label.trim().length === 0 ? ' ' : solOption.label) |
792 | 795 | .addClass(solOption.cssClass),
|
793 | 796 | $label,
|
794 | 797 | $displayElement,
|
795 | 798 | inputName = this._getNameAttribute();
|
796 |
| - |
| 799 | + /* |
| 800 | + * Modified 2016 |
| 801 | + */ |
797 | 802 | var data = $(solOption.element).data('messages');
|
798 | 803 | if (data && data.length) {
|
799 | 804 | $labelText.append(
|
|
859 | 864 | * Modified 2016
|
860 | 865 | */
|
861 | 866 | $displayElement = $('<div class="sol-option"/>').dblclick(function (e) {
|
862 |
| - // go first project |
863 |
| - window.location = document.xrefPath + '/' + $(this).text(); |
| 867 | + var $el = $(this).find('.sol-checkbox'); |
| 868 | + if ($el.length && $el.data('sol-item') && $el.data('sol-item').label) { |
| 869 | + // go first project |
| 870 | + window.location = document.xrefPath + '/' + $(this).find('.sol-checkbox').data('sol-item').label; |
| 871 | + } |
864 | 872 | }).append($label);
|
865 |
| - |
| 873 | + /* |
| 874 | + * Modified 2016 |
| 875 | + */ |
866 | 876 | $inputElement.data('messages-available', data && data.length);
|
867 | 877 |
|
868 | 878 | solOption.displayElement = $displayElement;
|
|
993 | 1003 | $existingDisplayItem = $('<div class="sol-selected-display-item"/>')
|
994 | 1004 | .append($displayItemText)
|
995 | 1005 | .attr('title', solOptionItem.tooltip)
|
| 1006 | + .data('label', solOptionItem.label) |
996 | 1007 | .appendTo(this.$showSelectionContainer);
|
997 | 1008 |
|
998 | 1009 | // show remove button on display items if not disabled and null selection allowed
|
|
0 commit comments