Lines 101-129
function IrregularPattern() {
Link Here
|
101 |
} |
101 |
} |
102 |
|
102 |
|
103 |
IrregularPattern.prototype.update = function() { |
103 |
IrregularPattern.prototype.update = function() { |
104 |
this.skipped= new Array; |
104 |
this.skipped= new Array; |
105 |
var cnt = 0; |
105 |
var cnt = 0; |
106 |
// daily periodicity, we interpret irregular array as which days of week to skip. |
106 |
// daily periodicity, we interpret irregular array as which days of week to skip. |
107 |
// else if weekly periodicity, week numbers (starting from 01 Jan) to skip. |
107 |
// else if weekly periodicity, week numbers (starting from 01 Jan) to skip. |
108 |
// else irregular array is list of issues to skip |
108 |
// else irregular array is list of issues to skip |
109 |
var summary_str = ''; |
109 |
var summary_str = ''; |
110 |
this.numskipped = 0; |
110 |
this.numskipped = 0; |
111 |
if(document.f.irregularity_select) { |
111 |
$("#irregularity_select option:selected").each(function(index) { |
112 |
//$("#irregularity_select option:selected").each(...); //jquery can combine both conditionals and the for loop |
112 |
summary_str += $(this).text() + "\n" ; |
113 |
for( var i in document.f.irregularity_select.options ) { |
113 |
this.numskipped++; |
114 |
if( document.f.irregularity_select.options[i].selected ) { |
114 |
cnt++; |
115 |
this.skipped[cnt] = document.f.irregularity_select.options[i].value ; |
115 |
}); |
116 |
summary_str += document.f.irregularity_select.options[i].text + "\n" ; |
116 |
var summary = $("#irregularity_summary"); |
117 |
cnt++; |
117 |
if(summary) { |
118 |
this.numskipped++; |
118 |
summary.val(summary_str); |
119 |
} |
119 |
summary.attr("rows", ( cnt <= 6 ) ? cnt : 6) ; // textarea will be resized, but not more than 6 lines will show. |
120 |
} |
120 |
} |
121 |
var summary = document.getElementById("irregularity_summary"); |
|
|
122 |
if(summary) { |
123 |
summary.value = summary_str; |
124 |
summary.rows= ( cnt > 6 ) ? cnt : 6 ; // textarea will bre resized, but not more than 6 lines will show. |
125 |
} |
126 |
} |
127 |
} |
121 |
} |
128 |
|
122 |
|
129 |
IrregularPattern.prototype.irregular = function(index) { |
123 |
IrregularPattern.prototype.irregular = function(index) { |
130 |
- |
|
|