@@ -14,12 +14,12 function toggleCheckboxesBySelector(selector) { | |||||
14 | $(selector).each(function(index) { |
|
14 | $(selector).each(function(index) { | |
15 | if (!$(this).is(':checked')) { all_checked = false; } |
|
15 | if (!$(this).is(':checked')) { all_checked = false; } | |
16 | }); |
|
16 | }); | |
17 | $(selector).attr('checked', !all_checked) |
|
17 | $(selector).attr('checked', !all_checked); | |
18 | } |
|
18 | } | |
19 |
|
19 | |||
20 | function showAndScrollTo(id, focus) { |
|
20 | function showAndScrollTo(id, focus) { | |
21 | $('#'+id).show(); |
|
21 | $('#'+id).show(); | |
22 | if (focus!=null) { |
|
22 | if (focus !== null) { | |
23 | $('#'+focus).focus(); |
|
23 | $('#'+focus).focus(); | |
24 | } |
|
24 | } | |
25 | $('html, body').animate({scrollTop: $('#'+id).offset().top}, 100); |
|
25 | $('html, body').animate({scrollTop: $('#'+id).offset().top}, 100); | |
@@ -131,10 +131,10 function buildFilterRow(field, operator, values) { | |||||
131 | select = tr.find('td.operator select'); |
|
131 | select = tr.find('td.operator select'); | |
132 | for (i=0;i<operators.length;i++){ |
|
132 | for (i=0;i<operators.length;i++){ | |
133 | var option = $('<option>').val(operators[i]).text(operatorLabels[operators[i]]); |
|
133 | var option = $('<option>').val(operators[i]).text(operatorLabels[operators[i]]); | |
134 |
if (operators[i] == operator) {option.attr('selected', true)} |
|
134 | if (operators[i] == operator) { option.attr('selected', true); } | |
135 | select.append(option); |
|
135 | select.append(option); | |
136 | } |
|
136 | } | |
137 | select.change(function(){toggleOperator(field)}); |
|
137 | select.change(function(){ toggleOperator(field); }); | |
138 |
|
138 | |||
139 | switch (filterOptions['type']){ |
|
139 | switch (filterOptions['type']){ | |
140 | case "list": |
|
140 | case "list": | |
@@ -146,7 +146,7 function buildFilterRow(field, operator, values) { | |||||
146 | ' <span class="toggle-multiselect"> </span></span>' |
|
146 | ' <span class="toggle-multiselect"> </span></span>' | |
147 | ); |
|
147 | ); | |
148 | select = tr.find('td.values select'); |
|
148 | select = tr.find('td.values select'); | |
149 |
if (values.length > 1) {select.attr('multiple', true)} |
|
149 | if (values.length > 1) { select.attr('multiple', true); } | |
150 | for (i=0;i<filterValues.length;i++){ |
|
150 | for (i=0;i<filterValues.length;i++){ | |
151 | var filterValue = filterValues[i]; |
|
151 | var filterValue = filterValues[i]; | |
152 | var option = $('<option>'); |
|
152 | var option = $('<option>'); | |
@@ -189,7 +189,7 function buildFilterRow(field, operator, values) { | |||||
189 | var filterValue = allProjects[i]; |
|
189 | var filterValue = allProjects[i]; | |
190 | var option = $('<option>'); |
|
190 | var option = $('<option>'); | |
191 | option.val(filterValue[1]).text(filterValue[0]); |
|
191 | option.val(filterValue[1]).text(filterValue[0]); | |
192 |
if (values[0] == filterValue[1]) {option.attr('selected', true)} |
|
192 | if (values[0] == filterValue[1]) { option.attr('selected', true); } | |
193 | select.append(option); |
|
193 | select.append(option); | |
194 | } |
|
194 | } | |
195 | case "integer": |
|
195 | case "integer": | |
@@ -352,7 +352,7 function setPredecessorFieldsVisibility() { | |||||
352 |
|
352 | |||
353 | function showModal(id, width) { |
|
353 | function showModal(id, width) { | |
354 | var el = $('#'+id).first(); |
|
354 | var el = $('#'+id).first(); | |
355 | if (el.length == 0 || el.is(':visible')) {return;} |
|
355 | if (el.length === 0 || el.is(':visible')) {return;} | |
356 | var title = el.find('h3.title').text(); |
|
356 | var title = el.find('h3.title').text(); | |
357 | el.dialog({ |
|
357 | el.dialog({ | |
358 | width: width, |
|
358 | width: width, | |
@@ -462,7 +462,7 function observeAutocompleteField(fieldId, url, options) { | |||||
462 | source: url, |
|
462 | source: url, | |
463 | minLength: 2, |
|
463 | minLength: 2, | |
464 | search: function(){$('#'+fieldId).addClass('ajax-loading');}, |
|
464 | search: function(){$('#'+fieldId).addClass('ajax-loading');}, | |
465 |
response: function(){$('#'+fieldId).removeClass('ajax-loading');} |
|
465 | response: function(){$('#'+fieldId).removeClass('ajax-loading');} | |
466 | }, options)); |
|
466 | }, options)); | |
467 | $('#'+fieldId).addClass('autocomplete'); |
|
467 | $('#'+fieldId).addClass('autocomplete'); | |
468 | }); |
|
468 | }); | |
@@ -546,13 +546,13 function warnLeavingUnsaved(message) { | |||||
546 | }); |
|
546 | }); | |
547 | if (warn) {return warnLeavingUnsavedMessage;} |
|
547 | if (warn) {return warnLeavingUnsavedMessage;} | |
548 | }; |
|
548 | }; | |
549 |
} |
|
549 | } | |
550 |
|
550 | |||
551 | function setupAjaxIndicator() { |
|
551 | function setupAjaxIndicator() { | |
552 |
|
552 | |||
553 | $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) { |
|
553 | $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) { | |
554 |
|
554 | |||
555 | if ($('.ajax-loading').length == 0 && settings.contentType != 'application/octet-stream') { |
|
555 | if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') { | |
556 | $('#ajax-indicator').show(); |
|
556 | $('#ajax-indicator').show(); | |
557 | } |
|
557 | } | |
558 | }); |
|
558 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now