@@ -78,20 +78,20 function hideFieldset(el) { | |||||
78 | fieldset.children('div').hide(); |
|
78 | fieldset.children('div').hide(); | |
79 | } |
|
79 | } | |
80 |
|
80 | |||
81 | function initFilters(){ |
|
81 | function initFilters() { | |
82 | $('#add_filter_select').change(function(){ |
|
82 | $('#add_filter_select').change(function() { | |
83 | addFilter($(this).val(), '', []); |
|
83 | addFilter($(this).val(), '', []); | |
84 | }); |
|
84 | }); | |
85 | $('#filters-table td.field input[type=checkbox]').each(function(){ |
|
85 | $('#filters-table td.field input[type=checkbox]').each(function() { | |
86 | toggleFilter($(this).val()); |
|
86 | toggleFilter($(this).val()); | |
87 | }); |
|
87 | }); | |
88 | $('#filters-table td.field input[type=checkbox]').live('click',function(){ |
|
88 | $('#filters-table td.field input[type=checkbox]').live('click', function() { | |
89 | toggleFilter($(this).val()); |
|
89 | toggleFilter($(this).val()); | |
90 | }); |
|
90 | }); | |
91 | $('#filters-table .toggle-multiselect').live('click',function(){ |
|
91 | $('#filters-table .toggle-multiselect').live('click', function() { | |
92 | toggleMultiSelect($(this).siblings('select')); |
|
92 | toggleMultiSelect($(this).siblings('select')); | |
93 | }); |
|
93 | }); | |
94 | $('#filters-table input[type=text]').live('keypress', function(e){ |
|
94 | $('#filters-table input[type=text]').live('keypress', function(e) { | |
95 | if (e.keyCode == 13) submit_query_form("query_form"); |
|
95 | if (e.keyCode == 13) submit_query_form("query_form"); | |
96 | }); |
|
96 | }); | |
97 | } |
|
97 | } | |
@@ -106,7 +106,7 function addFilter(field, operator, values) { | |||||
106 | } |
|
106 | } | |
107 | $('#cb_'+fieldId).attr('checked', true); |
|
107 | $('#cb_'+fieldId).attr('checked', true); | |
108 | toggleFilter(field); |
|
108 | toggleFilter(field); | |
109 | $('#add_filter_select').val('').children('option').each(function(){ |
|
109 | $('#add_filter_select').val('').children('option').each(function() { | |
110 | if ($(this).attr('value') == field) { |
|
110 | if ($(this).attr('value') == field) { | |
111 | $(this).attr('disabled', true); |
|
111 | $(this).attr('disabled', true); | |
112 | } |
|
112 | } | |
@@ -129,14 +129,14 function buildFilterRow(field, operator, values) { | |||||
129 | filterTable.append(tr); |
|
129 | filterTable.append(tr); | |
130 |
|
130 | |||
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": | |
141 | case "list_optional": |
|
141 | case "list_optional": | |
142 | case "list_status": |
|
142 | case "list_status": | |
@@ -147,7 +147,7 function buildFilterRow(field, operator, values) { | |||||
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>'); | |
153 | if ($.isArray(filterValue)) { |
|
153 | if ($.isArray(filterValue)) { | |
@@ -185,7 +185,7 function buildFilterRow(field, operator, values) { | |||||
185 | ); |
|
185 | ); | |
186 | $('#values_'+fieldId).val(values[0]); |
|
186 | $('#values_'+fieldId).val(values[0]); | |
187 | select = tr.find('td.values select'); |
|
187 | select = tr.find('td.values select'); | |
188 | for (i=0;i<allProjects.length;i++){ |
|
188 | for (i = 0; i < allProjects.length; i++) { | |
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]); | |
@@ -302,7 +302,7 function moveTabRight(el) { | |||||
302 | var lis = $(el).parents('div.tabs').first().find('ul').children(); |
|
302 | var lis = $(el).parents('div.tabs').first().find('ul').children(); | |
303 | var tabsWidth = 0; |
|
303 | var tabsWidth = 0; | |
304 | var i = 0; |
|
304 | var i = 0; | |
305 | lis.each(function(){ |
|
305 | lis.each(function() { | |
306 | if ($(this).is(':visible')) { |
|
306 | if ($(this).is(':visible')) { | |
307 | tabsWidth += $(this).width() + 6; |
|
307 | tabsWidth += $(this).width() + 6; | |
308 | } |
|
308 | } | |
@@ -315,8 +315,8 function moveTabRight(el) { | |||||
315 | function moveTabLeft(el) { |
|
315 | function moveTabLeft(el) { | |
316 | var lis = $(el).parents('div.tabs').first().find('ul').children(); |
|
316 | var lis = $(el).parents('div.tabs').first().find('ul').children(); | |
317 | var i = 0; |
|
317 | var i = 0; | |
318 | while (i<lis.length && !lis.eq(i).is(':visible')) { i++; } |
|
318 | while (i < lis.length && !lis.eq(i).is(':visible')) { i++; } | |
319 | if (i>0) { |
|
319 | if (i > 0) { | |
320 | lis.eq(i-1).show(); |
|
320 | lis.eq(i-1).show(); | |
321 | } |
|
321 | } | |
322 | } |
|
322 | } | |
@@ -422,7 +422,7 function scmEntryClick(id, url) { | |||||
422 | el.addClass('loading'); |
|
422 | el.addClass('loading'); | |
423 | $.ajax({ |
|
423 | $.ajax({ | |
424 | url: url, |
|
424 | url: url, | |
425 | success: function(data){ |
|
425 | success: function(data) { | |
426 | el.after(data); |
|
426 | el.after(data); | |
427 | el.addClass('open').addClass('loaded').removeClass('loading'); |
|
427 | el.addClass('open').addClass('loaded').removeClass('loading'); | |
428 | } |
|
428 | } | |
@@ -503,7 +503,7 function observeProjectModules() { | |||||
503 | /* Hides trackers and issues custom fields on the new project form when issue_tracking module is disabled */ |
|
503 | /* Hides trackers and issues custom fields on the new project form when issue_tracking module is disabled */ | |
504 | if ($('#project_enabled_module_names_issue_tracking').attr('checked')) { |
|
504 | if ($('#project_enabled_module_names_issue_tracking').attr('checked')) { | |
505 | $('#project_trackers').show(); |
|
505 | $('#project_trackers').show(); | |
506 | }else{ |
|
506 | } else { | |
507 | $('#project_trackers').hide(); |
|
507 | $('#project_trackers').hide(); | |
508 | } |
|
508 | } | |
509 | }; |
|
509 | }; | |
@@ -530,7 +530,6 function initMyPageSortable(list, url) { | |||||
530 | var warnLeavingUnsavedMessage; |
|
530 | var warnLeavingUnsavedMessage; | |
531 | function warnLeavingUnsaved(message) { |
|
531 | function warnLeavingUnsaved(message) { | |
532 | warnLeavingUnsavedMessage = message; |
|
532 | warnLeavingUnsavedMessage = message; | |
533 |
|
||||
534 | $('form').submit(function(){ |
|
533 | $('form').submit(function(){ | |
535 | $('textarea').removeData('changed'); |
|
534 | $('textarea').removeData('changed'); | |
536 | }); |
|
535 | }); | |
@@ -549,14 +548,11 function warnLeavingUnsaved(message) { | |||||
549 | } |
|
548 | } | |
550 |
|
549 | |||
551 | function setupAjaxIndicator() { |
|
550 | function setupAjaxIndicator() { | |
552 |
|
||||
553 | $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) { |
|
551 | $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) { | |
554 |
|
||||
555 | if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') { |
|
552 | if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') { | |
556 | $('#ajax-indicator').show(); |
|
553 | $('#ajax-indicator').show(); | |
557 | } |
|
554 | } | |
558 | }); |
|
555 | }); | |
559 |
|
||||
560 | $('#ajax-indicator').bind('ajaxStop', function() { |
|
556 | $('#ajax-indicator').bind('ajaxStop', function() { | |
561 | $('#ajax-indicator').hide(); |
|
557 | $('#ajax-indicator').hide(); | |
562 | }); |
|
558 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now