15: --
16: procedure close_script is
17: begin
18: htp.p( '//-->' );
19: htp.p( '' );
20: end close_script;
21: --
22: procedure close_noscript is
23: begin
20: end close_script;
21: --
22: procedure close_noscript is
23: begin
24: htp.p( '' );
25: end close_noscript;
26:
27: procedure move_list_element is
28: begin
25: end close_noscript;
26:
27: procedure move_list_element is
28: begin
29: htp.p( 'function moveListElement(fromList, toList, p_formname)' );
30: htp.p( '{' );
31: htp.p( ' idx = fromList.selectedIndex;' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
26:
27: procedure move_list_element is
28: begin
29: htp.p( 'function moveListElement(fromList, toList, p_formname)' );
30: htp.p( '{' );
31: htp.p( ' idx = fromList.selectedIndex;' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
27: procedure move_list_element is
28: begin
29: htp.p( 'function moveListElement(fromList, toList, p_formname)' );
30: htp.p( '{' );
31: htp.p( ' idx = fromList.selectedIndex;' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
28: begin
29: htp.p( 'function moveListElement(fromList, toList, p_formname)' );
30: htp.p( '{' );
31: htp.p( ' idx = fromList.selectedIndex;' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
29: htp.p( 'function moveListElement(fromList, toList, p_formname)' );
30: htp.p( '{' );
31: htp.p( ' idx = fromList.selectedIndex;' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
30: htp.p( '{' );
31: htp.p( ' idx = fromList.selectedIndex;' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
31: htp.p( ' idx = fromList.selectedIndex;' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
32: htp.p( ' if ( idx == -1 )' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
33: htp.p( ' return;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
34: htp.p( ' txt = fromList.options[idx].text;' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
35: htp.p( ' val = fromList.options[idx].value;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
43: htp.p( ' fromList.length = fromList.length - 1;' );
36: htp.p( ' if ( val == "" )' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
43: htp.p( ' fromList.length = fromList.length - 1;' );
44: htp.p( ' toList.options[toList.length] = new Option( txt, val, false, true );' );
37: htp.p( ' return;' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
43: htp.p( ' fromList.length = fromList.length - 1;' );
44: htp.p( ' toList.options[toList.length] = new Option( txt, val, false, true );' );
45: htp.p( '}' );
38: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
43: htp.p( ' fromList.length = fromList.length - 1;' );
44: htp.p( ' toList.options[toList.length] = new Option( txt, val, false, true );' );
45: htp.p( '}' );
46: end move_list_element;
39: htp.p( ' {' );
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
43: htp.p( ' fromList.length = fromList.length - 1;' );
44: htp.p( ' toList.options[toList.length] = new Option( txt, val, false, true );' );
45: htp.p( '}' );
46: end move_list_element;
47: --
40: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
43: htp.p( ' fromList.length = fromList.length - 1;' );
44: htp.p( ' toList.options[toList.length] = new Option( txt, val, false, true );' );
45: htp.p( '}' );
46: end move_list_element;
47: --
48:
41: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
42: htp.p( ' }' );
43: htp.p( ' fromList.length = fromList.length - 1;' );
44: htp.p( ' toList.options[toList.length] = new Option( txt, val, false, true );' );
45: htp.p( '}' );
46: end move_list_element;
47: --
48:
49:
48:
49:
50: procedure copy_to_list is
51: begin
52: htp.p( 'function copyToList(fromList, toList, direction, p_formname)' );
53: htp.p('{');
54: htp.p(' for ( i = 0; i <= fromList.length-1;) {');
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
49:
50: procedure copy_to_list is
51: begin
52: htp.p( 'function copyToList(fromList, toList, direction, p_formname)' );
53: htp.p('{');
54: htp.p(' for ( i = 0; i <= fromList.length-1;) {');
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
50: procedure copy_to_list is
51: begin
52: htp.p( 'function copyToList(fromList, toList, direction, p_formname)' );
53: htp.p('{');
54: htp.p(' for ( i = 0; i <= fromList.length-1;) {');
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
58: htp.p(' if ( val != "" ) {' );
51: begin
52: htp.p( 'function copyToList(fromList, toList, direction, p_formname)' );
53: htp.p('{');
54: htp.p(' for ( i = 0; i <= fromList.length-1;) {');
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
58: htp.p(' if ( val != "" ) {' );
59: htp.p(' // check if value is a spacer');
52: htp.p( 'function copyToList(fromList, toList, direction, p_formname)' );
53: htp.p('{');
54: htp.p(' for ( i = 0; i <= fromList.length-1;) {');
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
58: htp.p(' if ( val != "" ) {' );
59: htp.p(' // check if value is a spacer');
60: htp.p(' if ( val != "spacer" ) {
53: htp.p('{');
54: htp.p(' for ( i = 0; i <= fromList.length-1;) {');
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
58: htp.p(' if ( val != "" ) {' );
59: htp.p(' // check if value is a spacer');
60: htp.p(' if ( val != "spacer" ) {
61: if ( direction == "left" ) {
54: htp.p(' for ( i = 0; i <= fromList.length-1;) {');
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
58: htp.p(' if ( val != "" ) {' );
59: htp.p(' // check if value is a spacer');
60: htp.p(' if ( val != "spacer" ) {
61: if ( direction == "left" ) {
62: // remove from right and do not add on left
55: htp.p(' if (fromList.options[i].selected) {');
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
58: htp.p(' if ( val != "" ) {' );
59: htp.p(' // check if value is a spacer');
60: htp.p(' if ( val != "spacer" ) {
61: if ( direction == "left" ) {
62: // remove from right and do not add on left
63: fromList.options[i]= null;
56: htp.p(' txt = fromList.options[i].text;');
57: htp.p(' val = fromList.options[i].value;');
58: htp.p(' if ( val != "" ) {' );
59: htp.p(' // check if value is a spacer');
60: htp.p(' if ( val != "spacer" ) {
61: if ( direction == "left" ) {
62: // remove from right and do not add on left
63: fromList.options[i]= null;
64: }
67: fromList.options[i].selected = false;
68: toList.options[toList.length] = new Option( txt, val, false, true );
69: toList.options[toList.selectedIndex].selected = false;
70: }');
71: htp.p(' }');
72: htp.p(' else { //only increment when not moving and deleting');
73: htp.p(' // create a new row');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
68: toList.options[toList.length] = new Option( txt, val, false, true );
69: toList.options[toList.selectedIndex].selected = false;
70: }');
71: htp.p(' }');
72: htp.p(' else { //only increment when not moving and deleting');
73: htp.p(' // create a new row');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
69: toList.options[toList.selectedIndex].selected = false;
70: }');
71: htp.p(' }');
72: htp.p(' else { //only increment when not moving and deleting');
73: htp.p(' // create a new row');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
77: htp.p(' fromList.options[i]= null;');
70: }');
71: htp.p(' }');
72: htp.p(' else { //only increment when not moving and deleting');
73: htp.p(' // create a new row');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
77: htp.p(' fromList.options[i]= null;');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
71: htp.p(' }');
72: htp.p(' else { //only increment when not moving and deleting');
73: htp.p(' // create a new row');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
77: htp.p(' fromList.options[i]= null;');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
79: htp.p(' } //only increment when not moving and deleting');
72: htp.p(' else { //only increment when not moving and deleting');
73: htp.p(' // create a new row');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
77: htp.p(' fromList.options[i]= null;');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
79: htp.p(' } //only increment when not moving and deleting');
80:
73: htp.p(' // create a new row');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
77: htp.p(' fromList.options[i]= null;');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
79: htp.p(' } //only increment when not moving and deleting');
80:
81: htp.p(' }');
74: htp.p(' toList.options[toList.length] = new Option( txt, val, false, true );');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
77: htp.p(' fromList.options[i]= null;');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
79: htp.p(' } //only increment when not moving and deleting');
80:
81: htp.p(' }');
82: htp.p(' } else i++; //only increment when not moving and deleting');
75: htp.p(' // added these lines');
76: htp.p(' // removes from fromList and unselects item in toList');
77: htp.p(' fromList.options[i]= null;');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
79: htp.p(' } //only increment when not moving and deleting');
80:
81: htp.p(' }');
82: htp.p(' } else i++; //only increment when not moving and deleting');
83: htp.p(' }');
77: htp.p(' fromList.options[i]= null;');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
79: htp.p(' } //only increment when not moving and deleting');
80:
81: htp.p(' }');
82: htp.p(' } else i++; //only increment when not moving and deleting');
83: htp.p(' }');
84: htp.p(' deleteBlankRowIfNotEmpty(fromList);');
85: htp.p(' deleteBlankRowIfNotEmpty(toList);');
78: htp.p(' toList.options[toList.selectedIndex].selected = false;');
79: htp.p(' } //only increment when not moving and deleting');
80:
81: htp.p(' }');
82: htp.p(' } else i++; //only increment when not moving and deleting');
83: htp.p(' }');
84: htp.p(' deleteBlankRowIfNotEmpty(fromList);');
85: htp.p(' deleteBlankRowIfNotEmpty(toList);');
86: -- Begin Bug 1853248
79: htp.p(' } //only increment when not moving and deleting');
80:
81: htp.p(' }');
82: htp.p(' } else i++; //only increment when not moving and deleting');
83: htp.p(' }');
84: htp.p(' deleteBlankRowIfNotEmpty(fromList);');
85: htp.p(' deleteBlankRowIfNotEmpty(toList);');
86: -- Begin Bug 1853248
87: -- Changed below line from refresh(true) to refresh(false)
80:
81: htp.p(' }');
82: htp.p(' } else i++; //only increment when not moving and deleting');
83: htp.p(' }');
84: htp.p(' deleteBlankRowIfNotEmpty(fromList);');
85: htp.p(' deleteBlankRowIfNotEmpty(toList);');
86: -- Begin Bug 1853248
87: -- Changed below line from refresh(true) to refresh(false)
88: htp.p(' navigator.plugins.refresh(false);');
81: htp.p(' }');
82: htp.p(' } else i++; //only increment when not moving and deleting');
83: htp.p(' }');
84: htp.p(' deleteBlankRowIfNotEmpty(fromList);');
85: htp.p(' deleteBlankRowIfNotEmpty(toList);');
86: -- Begin Bug 1853248
87: -- Changed below line from refresh(true) to refresh(false)
88: htp.p(' navigator.plugins.refresh(false);');
89: -- End bug 1853248
84: htp.p(' deleteBlankRowIfNotEmpty(fromList);');
85: htp.p(' deleteBlankRowIfNotEmpty(toList);');
86: -- Begin Bug 1853248
87: -- Changed below line from refresh(true) to refresh(false)
88: htp.p(' navigator.plugins.refresh(false);');
89: -- End bug 1853248
90: htp.p('}');
91: end copy_to_list;
92: --
86: -- Begin Bug 1853248
87: -- Changed below line from refresh(true) to refresh(false)
88: htp.p(' navigator.plugins.refresh(false);');
89: -- End bug 1853248
90: htp.p('}');
91: end copy_to_list;
92: --
93: procedure copy_all is
94: c_browser varchar2(240);
93: procedure copy_all is
94: c_browser varchar2(240);
95: begin
96:
97: htp.p( 'function copyAll(fromList, toList, direction, p_formname) ');
98: htp.p( '{' );
99: htp.p(' indexofspacer = -1;');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
94: c_browser varchar2(240);
95: begin
96:
97: htp.p( 'function copyAll(fromList, toList, direction, p_formname) ');
98: htp.p( '{' );
99: htp.p(' indexofspacer = -1;');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
95: begin
96:
97: htp.p( 'function copyAll(fromList, toList, direction, p_formname) ');
98: htp.p( '{' );
99: htp.p(' indexofspacer = -1;');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
96:
97: htp.p( 'function copyAll(fromList, toList, direction, p_formname) ');
98: htp.p( '{' );
99: htp.p(' indexofspacer = -1;');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
97: htp.p( 'function copyAll(fromList, toList, direction, p_formname) ');
98: htp.p( '{' );
99: htp.p(' indexofspacer = -1;');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
98: htp.p( '{' );
99: htp.p(' indexofspacer = -1;');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
99: htp.p(' indexofspacer = -1;');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
100: htp.p(' spacerval = "";');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
108: htp.p(' { ');
101: htp.p(' spacertxt = "";');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
108: htp.p(' { ');
109: htp.p(' if(direction != "left") ');
102: htp.p(' indexofitem = toList.length;');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
108: htp.p(' { ');
109: htp.p(' if(direction != "left") ');
110: htp.p(' {');
103: htp.p(' for ( i = 0; i <= fromList.length-1; i++ )');
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
108: htp.p(' { ');
109: htp.p(' if(direction != "left") ');
110: htp.p(' {');
111: -- // check if we need to copy the spacer too
104: htp.p(' {');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
108: htp.p(' { ');
109: htp.p(' if(direction != "left") ');
110: htp.p(' {');
111: -- // check if we need to copy the spacer too
112: htp.p(' if ( val != "spacer") ');
105: htp.p(' txt = fromList.options[i].text; ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
108: htp.p(' { ');
109: htp.p(' if(direction != "left") ');
110: htp.p(' {');
111: -- // check if we need to copy the spacer too
112: htp.p(' if ( val != "spacer") ');
113: htp.p(' { ');
106: htp.p(' val = fromList.options[i].value;' );
107: htp.p(' if ( val != "" ) ');
108: htp.p(' { ');
109: htp.p(' if(direction != "left") ');
110: htp.p(' {');
111: -- // check if we need to copy the spacer too
112: htp.p(' if ( val != "spacer") ');
113: htp.p(' { ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
108: htp.p(' { ');
109: htp.p(' if(direction != "left") ');
110: htp.p(' {');
111: -- // check if we need to copy the spacer too
112: htp.p(' if ( val != "spacer") ');
113: htp.p(' { ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
109: htp.p(' if(direction != "left") ');
110: htp.p(' {');
111: -- // check if we need to copy the spacer too
112: htp.p(' if ( val != "spacer") ');
113: htp.p(' { ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
110: htp.p(' {');
111: -- // check if we need to copy the spacer too
112: htp.p(' if ( val != "spacer") ');
113: htp.p(' { ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
111: -- // check if we need to copy the spacer too
112: htp.p(' if ( val != "spacer") ');
113: htp.p(' { ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
112: htp.p(' if ( val != "spacer") ');
113: htp.p(' { ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
113: htp.p(' { ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
114: htp.p(' toList.options[indexofitem] = new Option( txt, val, false, true ); ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
115: htp.p(' toList.options[indexofitem].selected = false; ');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
116: htp.p(' indexofitem++; ');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
124: htp.p(' }');
117: htp.p(' } ');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
124: htp.p(' }');
125: htp.p(' }');
118: htp.p(' else '); --// found a spacer
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
124: htp.p(' }');
125: htp.p(' }');
126: htp.p(' } ');
119: htp.p(' { ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
124: htp.p(' }');
125: htp.p(' }');
126: htp.p(' } ');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
120: htp.p(' indexofspacer = i; ');
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
124: htp.p(' }');
125: htp.p(' }');
126: htp.p(' } ');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
128: --// let the spacer be on the from list
121: htp.p(' spacerval = val; ');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
124: htp.p(' }');
125: htp.p(' }');
126: htp.p(' } ');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
128: --// let the spacer be on the from list
129: htp.p(' fromList.length = 1;');
122: htp.p(' spacertxt = txt; ');
123: htp.p(' }');
124: htp.p(' }');
125: htp.p(' }');
126: htp.p(' } ');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
128: --// let the spacer be on the from list
129: htp.p(' fromList.length = 1;');
130: htp.p(' else');
123: htp.p(' }');
124: htp.p(' }');
125: htp.p(' }');
126: htp.p(' } ');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
128: --// let the spacer be on the from list
129: htp.p(' fromList.length = 1;');
130: htp.p(' else');
131: htp.p(' if(direction == "left")');
125: htp.p(' }');
126: htp.p(' } ');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
128: --// let the spacer be on the from list
129: htp.p(' fromList.length = 1;');
130: htp.p(' else');
131: htp.p(' if(direction == "left")');
132: htp.p(' clearList(fromList); ');
133:
126: htp.p(' } ');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
128: --// let the spacer be on the from list
129: htp.p(' fromList.length = 1;');
130: htp.p(' else');
131: htp.p(' if(direction == "left")');
132: htp.p(' clearList(fromList); ');
133:
134: htp.p(' deleteBlankRowIfNotEmpty(toList);');
127: htp.p(' if (indexofspacer != -1 && direction == "right" ) ');
128: --// let the spacer be on the from list
129: htp.p(' fromList.length = 1;');
130: htp.p(' else');
131: htp.p(' if(direction == "left")');
132: htp.p(' clearList(fromList); ');
133:
134: htp.p(' deleteBlankRowIfNotEmpty(toList);');
135: htp.p(' unSelectAll(toList);');
128: --// let the spacer be on the from list
129: htp.p(' fromList.length = 1;');
130: htp.p(' else');
131: htp.p(' if(direction == "left")');
132: htp.p(' clearList(fromList); ');
133:
134: htp.p(' deleteBlankRowIfNotEmpty(toList);');
135: htp.p(' unSelectAll(toList);');
136:
130: htp.p(' else');
131: htp.p(' if(direction == "left")');
132: htp.p(' clearList(fromList); ');
133:
134: htp.p(' deleteBlankRowIfNotEmpty(toList);');
135: htp.p(' unSelectAll(toList);');
136:
137: htp.p(' navigator.plugins.refresh(false); ');
138:
131: htp.p(' if(direction == "left")');
132: htp.p(' clearList(fromList); ');
133:
134: htp.p(' deleteBlankRowIfNotEmpty(toList);');
135: htp.p(' unSelectAll(toList);');
136:
137: htp.p(' navigator.plugins.refresh(false); ');
138:
139: htp.p('}');
133:
134: htp.p(' deleteBlankRowIfNotEmpty(toList);');
135: htp.p(' unSelectAll(toList);');
136:
137: htp.p(' navigator.plugins.refresh(false); ');
138:
139: htp.p('}');
140:
141: end copy_all;
135: htp.p(' unSelectAll(toList);');
136:
137: htp.p(' navigator.plugins.refresh(false); ');
138:
139: htp.p('}');
140:
141: end copy_all;
142:
143: procedure delete_list_element is
141: end copy_all;
142:
143: procedure delete_list_element is
144: begin
145: htp.p( 'function deleteListElement(fromList)' );
146: htp.p( '{' );
147: htp.p( ' idx = fromList.selectedIndex;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
142:
143: procedure delete_list_element is
144: begin
145: htp.p( 'function deleteListElement(fromList)' );
146: htp.p( '{' );
147: htp.p( ' idx = fromList.selectedIndex;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
143: procedure delete_list_element is
144: begin
145: htp.p( 'function deleteListElement(fromList)' );
146: htp.p( '{' );
147: htp.p( ' idx = fromList.selectedIndex;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
144: begin
145: htp.p( 'function deleteListElement(fromList)' );
146: htp.p( '{' );
147: htp.p( ' idx = fromList.selectedIndex;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
145: htp.p( 'function deleteListElement(fromList)' );
146: htp.p( '{' );
147: htp.p( ' idx = fromList.selectedIndex;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
146: htp.p( '{' );
147: htp.p( ' idx = fromList.selectedIndex;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
154: htp.p( ' }' );
147: htp.p( ' idx = fromList.selectedIndex;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
154: htp.p( ' }' );
155: htp.p( ' fromList.length = fromList.length - 1;' );
148: htp.p( ' if ( idx == -1 )' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
154: htp.p( ' }' );
155: htp.p( ' fromList.length = fromList.length - 1;' );
156: htp.p( '}' );
149: htp.p( ' return;' );
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
154: htp.p( ' }' );
155: htp.p( ' fromList.length = fromList.length - 1;' );
156: htp.p( '}' );
157: end delete_list_element;
150: htp.p( ' for ( i = idx; i < fromList.length-1; i++ )' );
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
154: htp.p( ' }' );
155: htp.p( ' fromList.length = fromList.length - 1;' );
156: htp.p( '}' );
157: end delete_list_element;
158: --
151: htp.p( ' {' );
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
154: htp.p( ' }' );
155: htp.p( ' fromList.length = fromList.length - 1;' );
156: htp.p( '}' );
157: end delete_list_element;
158: --
159: procedure select_all is
152: htp.p( ' fromList.options[i].text = fromList.options[i+1].text;' );
153: htp.p( ' fromList.options[i].value = fromList.options[i+1].value;' );
154: htp.p( ' }' );
155: htp.p( ' fromList.length = fromList.length - 1;' );
156: htp.p( '}' );
157: end delete_list_element;
158: --
159: procedure select_all is
160: begin
157: end delete_list_element;
158: --
159: procedure select_all is
160: begin
161: htp.p( 'function selectAll(fromList)' );
162: htp.p( '{' );
163: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
164: htp.p( ' fromList.options[i].selected = true;' );
165: htp.p( ' return true;' );
158: --
159: procedure select_all is
160: begin
161: htp.p( 'function selectAll(fromList)' );
162: htp.p( '{' );
163: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
164: htp.p( ' fromList.options[i].selected = true;' );
165: htp.p( ' return true;' );
166: htp.p( '}' );
159: procedure select_all is
160: begin
161: htp.p( 'function selectAll(fromList)' );
162: htp.p( '{' );
163: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
164: htp.p( ' fromList.options[i].selected = true;' );
165: htp.p( ' return true;' );
166: htp.p( '}' );
167: end select_all;
160: begin
161: htp.p( 'function selectAll(fromList)' );
162: htp.p( '{' );
163: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
164: htp.p( ' fromList.options[i].selected = true;' );
165: htp.p( ' return true;' );
166: htp.p( '}' );
167: end select_all;
168: --
161: htp.p( 'function selectAll(fromList)' );
162: htp.p( '{' );
163: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
164: htp.p( ' fromList.options[i].selected = true;' );
165: htp.p( ' return true;' );
166: htp.p( '}' );
167: end select_all;
168: --
169: procedure unselect_all is
162: htp.p( '{' );
163: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
164: htp.p( ' fromList.options[i].selected = true;' );
165: htp.p( ' return true;' );
166: htp.p( '}' );
167: end select_all;
168: --
169: procedure unselect_all is
170: begin
167: end select_all;
168: --
169: procedure unselect_all is
170: begin
171: htp.p( 'function unSelectAll(fromList)' );
172: htp.p( '{' );
173: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
174: htp.p( ' fromList.options[i].selected = false;' );
175: htp.p( ' return true;' );
168: --
169: procedure unselect_all is
170: begin
171: htp.p( 'function unSelectAll(fromList)' );
172: htp.p( '{' );
173: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
174: htp.p( ' fromList.options[i].selected = false;' );
175: htp.p( ' return true;' );
176: htp.p( '}' );
169: procedure unselect_all is
170: begin
171: htp.p( 'function unSelectAll(fromList)' );
172: htp.p( '{' );
173: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
174: htp.p( ' fromList.options[i].selected = false;' );
175: htp.p( ' return true;' );
176: htp.p( '}' );
177: end unselect_all;
170: begin
171: htp.p( 'function unSelectAll(fromList)' );
172: htp.p( '{' );
173: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
174: htp.p( ' fromList.options[i].selected = false;' );
175: htp.p( ' return true;' );
176: htp.p( '}' );
177: end unselect_all;
178: --
171: htp.p( 'function unSelectAll(fromList)' );
172: htp.p( '{' );
173: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
174: htp.p( ' fromList.options[i].selected = false;' );
175: htp.p( ' return true;' );
176: htp.p( '}' );
177: end unselect_all;
178: --
179: procedure clear_list is
172: htp.p( '{' );
173: htp.p( ' for ( i = 0; i <= fromList.length-1; i++ )' );
174: htp.p( ' fromList.options[i].selected = false;' );
175: htp.p( ' return true;' );
176: htp.p( '}' );
177: end unselect_all;
178: --
179: procedure clear_list is
180: begin
177: end unselect_all;
178: --
179: procedure clear_list is
180: begin
181: htp.p( 'function clearList(fromList)' );
182: htp.p( '{' );
183: htp.p( ' fromList.length = 0;' );
184: htp.p( '}' );
185: end clear_list;
178: --
179: procedure clear_list is
180: begin
181: htp.p( 'function clearList(fromList)' );
182: htp.p( '{' );
183: htp.p( ' fromList.length = 0;' );
184: htp.p( '}' );
185: end clear_list;
186: --
179: procedure clear_list is
180: begin
181: htp.p( 'function clearList(fromList)' );
182: htp.p( '{' );
183: htp.p( ' fromList.length = 0;' );
184: htp.p( '}' );
185: end clear_list;
186: --
187: -- append a value to a list, maintaining unique values in the list
180: begin
181: htp.p( 'function clearList(fromList)' );
182: htp.p( '{' );
183: htp.p( ' fromList.length = 0;' );
184: htp.p( '}' );
185: end clear_list;
186: --
187: -- append a value to a list, maintaining unique values in the list
188: procedure append_to_list is
186: --
187: -- append a value to a list, maintaining unique values in the list
188: procedure append_to_list is
189: begin
190: htp.p( 'function appendToList(theValue, toList)' );
191: htp.p( '{' );
192: htp.p( ' if (theValue == "") return;' );
193: htp.p( ' for (i=0;i
187: -- append a value to a list, maintaining unique values in the list
188: procedure append_to_list is
189: begin
190: htp.p( 'function appendToList(theValue, toList)' );
191: htp.p( '{' );
192: htp.p( ' if (theValue == "") return;' );
193: htp.p( ' for (i=0;i
195: htp.p( ' if (toList.options[i].value == theValue)' );
188: procedure append_to_list is
189: begin
190: htp.p( 'function appendToList(theValue, toList)' );
191: htp.p( '{' );
192: htp.p( ' if (theValue == "") return;' );
193: htp.p( ' for (i=0;i
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
189: begin
190: htp.p( 'function appendToList(theValue, toList)' );
191: htp.p( '{' );
192: htp.p( ' if (theValue == "") return;' );
193: htp.p( ' for (i=0;i
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
197: htp.p( ' }' );
190: htp.p( 'function appendToList(theValue, toList)' );
191: htp.p( '{' );
192: htp.p( ' if (theValue == "") return;' );
193: htp.p( ' for (i=0;i
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
197: htp.p( ' }' );
198: htp.p( ' toList.options[toList.length] = new Option(theValue,theValue);' );
191: htp.p( '{' );
192: htp.p( ' if (theValue == "") return;' );
193: htp.p( ' for (i=0;i
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
197: htp.p( ' }' );
198: htp.p( ' toList.options[toList.length] = new Option(theValue,theValue);' );
199: htp.p( '}' );
192: htp.p( ' if (theValue == "") return;' );
193: htp.p( ' for (i=0;i
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
197: htp.p( ' }' );
198: htp.p( ' toList.options[toList.length] = new Option(theValue,theValue);' );
199: htp.p( '}' );
200: end append_to_list;
193: htp.p( ' for (i=0;i
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
197: htp.p( ' }' );
198: htp.p( ' toList.options[toList.length] = new Option(theValue,theValue);' );
199: htp.p( '}' );
200: end append_to_list;
201: -- delete a given value from a select list
194: htp.p( ' {' );
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
197: htp.p( ' }' );
198: htp.p( ' toList.options[toList.length] = new Option(theValue,theValue);' );
199: htp.p( '}' );
200: end append_to_list;
201: -- delete a given value from a select list
202: procedure delete_from_list is
195: htp.p( ' if (toList.options[i].value == theValue)' );
196: htp.p( ' return;' );
197: htp.p( ' }' );
198: htp.p( ' toList.options[toList.length] = new Option(theValue,theValue);' );
199: htp.p( '}' );
200: end append_to_list;
201: -- delete a given value from a select list
202: procedure delete_from_list is
203: begin
200: end append_to_list;
201: -- delete a given value from a select list
202: procedure delete_from_list is
203: begin
204: htp.p( 'function deleteFromList(theValue, fromList)' );
205: htp.p( '{' );
206: htp.p( ' for (i=0;i
208: htp.p( ' if (fromList.options[i].value == theValue)' );
201: -- delete a given value from a select list
202: procedure delete_from_list is
203: begin
204: htp.p( 'function deleteFromList(theValue, fromList)' );
205: htp.p( '{' );
206: htp.p( ' for (i=0;i
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
202: procedure delete_from_list is
203: begin
204: htp.p( 'function deleteFromList(theValue, fromList)' );
205: htp.p( '{' );
206: htp.p( ' for (i=0;i
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
210: htp.p( ' }' );
203: begin
204: htp.p( 'function deleteFromList(theValue, fromList)' );
205: htp.p( '{' );
206: htp.p( ' for (i=0;i
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
210: htp.p( ' }' );
211: htp.p( ' history.go(0);' );
204: htp.p( 'function deleteFromList(theValue, fromList)' );
205: htp.p( '{' );
206: htp.p( ' for (i=0;i
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
210: htp.p( ' }' );
211: htp.p( ' history.go(0);' );
212: htp.p( '}' );
205: htp.p( '{' );
206: htp.p( ' for (i=0;i
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
210: htp.p( ' }' );
211: htp.p( ' history.go(0);' );
212: htp.p( '}' );
213: end delete_from_list;
206: htp.p( ' for (i=0;i
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
210: htp.p( ' }' );
211: htp.p( ' history.go(0);' );
212: htp.p( '}' );
213: end delete_from_list;
214: --
207: htp.p( ' {' );
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
210: htp.p( ' }' );
211: htp.p( ' history.go(0);' );
212: htp.p( '}' );
213: end delete_from_list;
214: --
215: procedure swap is
208: htp.p( ' if (fromList.options[i].value == theValue)' );
209: htp.p( ' fromList.options[i] = null;' );
210: htp.p( ' }' );
211: htp.p( ' history.go(0);' );
212: htp.p( '}' );
213: end delete_from_list;
214: --
215: procedure swap is
216: begin
213: end delete_from_list;
214: --
215: procedure swap is
216: begin
217: htp.p ('function swap(e1, e2)');
218: htp.p ('{');
219: htp.p (' ttext = e1.text;');
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
214: --
215: procedure swap is
216: begin
217: htp.p ('function swap(e1, e2)');
218: htp.p ('{');
219: htp.p (' ttext = e1.text;');
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
215: procedure swap is
216: begin
217: htp.p ('function swap(e1, e2)');
218: htp.p ('{');
219: htp.p (' ttext = e1.text;');
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
223: htp.p (' e2.text = ttext;');
216: begin
217: htp.p ('function swap(e1, e2)');
218: htp.p ('{');
219: htp.p (' ttext = e1.text;');
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
223: htp.p (' e2.text = ttext;');
224: htp.p (' e2.value = tvalue;');
217: htp.p ('function swap(e1, e2)');
218: htp.p ('{');
219: htp.p (' ttext = e1.text;');
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
223: htp.p (' e2.text = ttext;');
224: htp.p (' e2.value = tvalue;');
225: htp.p ('} ');
218: htp.p ('{');
219: htp.p (' ttext = e1.text;');
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
223: htp.p (' e2.text = ttext;');
224: htp.p (' e2.value = tvalue;');
225: htp.p ('} ');
226: end swap;
219: htp.p (' ttext = e1.text;');
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
223: htp.p (' e2.text = ttext;');
224: htp.p (' e2.value = tvalue;');
225: htp.p ('} ');
226: end swap;
227: --
220: htp.p (' tvalue = e1.value;');
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
223: htp.p (' e2.text = ttext;');
224: htp.p (' e2.value = tvalue;');
225: htp.p ('} ');
226: end swap;
227: --
228: procedure move_element_up is
221: htp.p (' e1.text = e2.text;');
222: htp.p (' e1.value = e2.value;');
223: htp.p (' e2.text = ttext;');
224: htp.p (' e2.value = tvalue;');
225: htp.p ('} ');
226: end swap;
227: --
228: procedure move_element_up is
229: begin
226: end swap;
227: --
228: procedure move_element_up is
229: begin
230: htp.p(' function moveElementUp(toList, p_formname)
231: { // go through the list and get all selected items
232: for ( i = 0; i <= toList.length-1; i++)
233: { // if the item is selected then swap it
234: if (toList.options[i].selected)
246:
247: --
248: procedure move_element_top is
249: begin
250: htp.p(' function moveElementTop(toList, p_formname)
251: { // get the first item selected which needs to move to top
252: iSelected = toList.selectedIndex;
253: if (iSelected == 0)
254: return;
259: end move_element_top;
260: --
261: procedure move_element_down is
262: begin
263: htp.p(' function moveElementDown(toList, p_formname)
264: { // go through the list and get all selected items
265: for ( i = toList.length-1; i >= 0; i--)
266: { // if the item is selected then swap it
267: if (toList.options[i].selected)
279:
280: --
281: procedure move_element_bottom is
282: begin
283: htp.p(' function moveElementBottom(toList, p_formname)
284: { // get the last item selected which needs to move to bottom
285: for ( i = 0; i <= toList.length-1; i++)
286: { // if the item is selected then swap it
287: if (toList.options[i].selected)
298:
299:
300: procedure delete_blank_row is
301: begin
302: htp.p('function deleteBlankRowIfNotEmpty(toList)');
303: htp.p('{');
304: htp.p(' var idx = -1;');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
299:
300: procedure delete_blank_row is
301: begin
302: htp.p('function deleteBlankRowIfNotEmpty(toList)');
303: htp.p('{');
304: htp.p(' var idx = -1;');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
300: procedure delete_blank_row is
301: begin
302: htp.p('function deleteBlankRowIfNotEmpty(toList)');
303: htp.p('{');
304: htp.p(' var idx = -1;');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
301: begin
302: htp.p('function deleteBlankRowIfNotEmpty(toList)');
303: htp.p('{');
304: htp.p(' var idx = -1;');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
302: htp.p('function deleteBlankRowIfNotEmpty(toList)');
303: htp.p('{');
304: htp.p(' var idx = -1;');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
303: htp.p('{');
304: htp.p(' var idx = -1;');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
311: htp.p(' break;');
304: htp.p(' var idx = -1;');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
311: htp.p(' break;');
312: htp.p(' }');
305: htp.p(' var val = "";');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
311: htp.p(' break;');
312: htp.p(' }');
313: htp.p(' } ');
306: htp.p('// find a blank row in table ');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
311: htp.p(' break;');
312: htp.p(' }');
313: htp.p(' } ');
314: htp.p(' if (idx >= 0 && (toList.length > 1))');
307: htp.p(' for (i = 0; i < toList.length; i++){ ');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
311: htp.p(' break;');
312: htp.p(' }');
313: htp.p(' } ');
314: htp.p(' if (idx >= 0 && (toList.length > 1))');
315: htp.p(' toList.options[idx] = null;');
308: htp.p(' val = toList.options[i].value;');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
311: htp.p(' break;');
312: htp.p(' }');
313: htp.p(' } ');
314: htp.p(' if (idx >= 0 && (toList.length > 1))');
315: htp.p(' toList.options[idx] = null;');
316: htp.p('}');
309: htp.p(' if (val == "") {');
310: htp.p(' idx = i;');
311: htp.p(' break;');
312: htp.p(' }');
313: htp.p(' } ');
314: htp.p(' if (idx >= 0 && (toList.length > 1))');
315: htp.p(' toList.options[idx] = null;');
316: htp.p('}');
317: end delete_blank_row;
310: htp.p(' idx = i;');
311: htp.p(' break;');
312: htp.p(' }');
313: htp.p(' } ');
314: htp.p(' if (idx >= 0 && (toList.length > 1))');
315: htp.p(' toList.options[idx] = null;');
316: htp.p('}');
317: end delete_blank_row;
318:
311: htp.p(' break;');
312: htp.p(' }');
313: htp.p(' } ');
314: htp.p(' if (idx >= 0 && (toList.length > 1))');
315: htp.p(' toList.options[idx] = null;');
316: htp.p('}');
317: end delete_blank_row;
318:
319: procedure show_main_help
312: htp.p(' }');
313: htp.p(' } ');
314: htp.p(' if (idx >= 0 && (toList.length > 1))');
315: htp.p(' toList.options[idx] = null;');
316: htp.p('}');
317: end delete_blank_row;
318:
319: procedure show_main_help
320: as
320: as
321: begin
322: open_script;
323:
324: htp.p('function show_main_help() {');
325: htp.p(' newWindow = window.open("' ||
326: 'pob_help_menu_tree.show_tree' ||
327: '", "HelpPage", "menubar=1,toolbar=yes,scrollbars=1,resizable=1,width=600,height=400");');
328: htp.p('}');
321: begin
322: open_script;
323:
324: htp.p('function show_main_help() {');
325: htp.p(' newWindow = window.open("' ||
326: 'pob_help_menu_tree.show_tree' ||
327: '", "HelpPage", "menubar=1,toolbar=yes,scrollbars=1,resizable=1,width=600,height=400");');
328: htp.p('}');
329:
324: htp.p('function show_main_help() {');
325: htp.p(' newWindow = window.open("' ||
326: 'pob_help_menu_tree.show_tree' ||
327: '", "HelpPage", "menubar=1,toolbar=yes,scrollbars=1,resizable=1,width=600,height=400");');
328: htp.p('}');
329:
330: close_script;
331:
332: end show_main_help;
335: as
336: begin
337: open_script;
338:
339: htp.p('function show_context_sens_help(helpFileName) {');
340: htp.p(' newWindow = window.open("' ||
341: 'pob_help_renderer.render_context_sensitive' ||
342: '?the_filename=" + helpFileName' ||
343: ', "HelpPage", "menubar=1,toolbar=yes,scrollbars=1,resizable=1,width=600,height=400");');
336: begin
337: open_script;
338:
339: htp.p('function show_context_sens_help(helpFileName) {');
340: htp.p(' newWindow = window.open("' ||
341: 'pob_help_renderer.render_context_sensitive' ||
342: '?the_filename=" + helpFileName' ||
343: ', "HelpPage", "menubar=1,toolbar=yes,scrollbars=1,resizable=1,width=600,height=400");');
344: htp.p('}');
340: htp.p(' newWindow = window.open("' ||
341: 'pob_help_renderer.render_context_sensitive' ||
342: '?the_filename=" + helpFileName' ||
343: ', "HelpPage", "menubar=1,toolbar=yes,scrollbars=1,resizable=1,width=600,height=400");');
344: htp.p('}');
345:
346: close_script;
347:
348: end show_context_sens_help;