public
Description: HomeMarks is a web based GUI to build HTML start pages.
Homepage: http://www.homemarks.com/
Clone URL: git://github.com/metaskills/homemarks.git
Search Repo:
Click here to lend your support to: homemarks and make a donation at www.pledgie.com !
Organizing HomeMarks JS better.
metaskills (author)
Fri May 16 14:43:26 -0700 2008
commit  8baefef41bb9e2bf6079dfd7026cee7f8c2d6cbf
tree    690d2151fc5beebf78c1c3c6dab4ed09c7e4d6e3
parent  9ade90a070de02789c47eca04e92ee77c2af1391
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
0
@@ -0,0 +1,323 @@
0
+
0
+
0
+
0
+
0
+// /* General Application Wide Functions
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+//
0
+// Event.observe(document, 'keypress', actionAreaHelper);
0
+// function actionAreaHelper(event) { if (event.charCode == 96) {toggleActionArea('inbox')}; };
0
+//
0
+// function globalLoadingBehavior() {
0
+// $('hud').classNames().set('');
0
+// Element.show('loading');
0
+// Element.update('message_wrapper', '<span id="message">&nbsp;</span>');
0
+// }
0
+//
0
+// function loadLameActionSpan(boxid,direction) {
0
+// if (direction == 'down') { spanclass = 'box_action box_action_down' }
0
+// if (direction == 'up') { spanclass = 'box_action' }
0
+// Element.replace('boxid_'+boxid+'_action_alink', '<span class="'+spanclass+'" id="boxid_'+boxid+'_action_lame"></span>')
0
+// }
0
+//
0
+// function remoteFormLoading(formobj,loadid) {
0
+// loadid = (loadid == null) ? 'form_loading' : loadid;
0
+// if (formobj.id == 'request_support_form') {loadimg=''} else {loadimg='_invert'};
0
+// Element.update($(loadid),'<img src="/images/loading'+loadimg+'.gif" />');
0
+// Form.disable(formobj);
0
+// }
0
+
0
+
0
+// /* Custom sortable serialize params Column#sort
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+//
0
+// function findSortedInfo(obj) {
0
+// pg_sortable_id = obj.element.id;
0
+// pg_lastvalues = $A(obj.lastValue.gsub(/col_wrapper\[\]=/i,'').split('&'));
0
+// pg_sortable_seq = $A(Sortable.sequence(pg_sortable_id));
0
+//
0
+// if (pg_lastvalues.length == pg_sortable_seq.length) { // Find the column info within the sortable.
0
+// pg_lastvalues.each(function(v,i) {
0
+// if (v != pg_sortable_seq[i]) {
0
+// /* Check to see if the bookmark was moved down */
0
+// if (pg_lastvalues[i+1] == pg_sortable_seq[i]) { col_id=v; col_position=pg_sortable_seq.indexOf(v)+1; };
0
+// /* Check to see if the bookmark was moved up */
0
+// if (pg_lastvalues[i] == pg_sortable_seq[i+1]) { col_id=pg_sortable_seq[i]; col_position=i+1; };
0
+// throw $break;
0
+// };
0
+// });
0
+// return 'col_id='+col_id+'&col_position='+col_position;
0
+// }
0
+// else { return false; }
0
+// }
0
+
0
+
0
+
0
+// /* Custom sortable serialize params Box#sort
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+//
0
+// function findDroppedBoxInfo(obj) {
0
+// col_sortable_id = obj.element.id;
0
+// col_sortable_id_num = col_sortable_id.gsub(/col_/i,'');
0
+// col_empty = obj.lastValue.length == 0 ? true : false ;
0
+// col_lastvalues = $A(obj.lastValue.gsub(/(col_\d+)\[\]=/i,'').split('&'));
0
+// col_sortable_seq = $A(Sortable.sequence(col_sortable_id));
0
+// if ((col_lastvalues.length == col_sortable_seq.length) && !col_empty) { // Find the box info within the sortable.
0
+// col_internal_sort = true; col_lost_box = false;
0
+// col_lastvalues.each(function(v,i) {
0
+// if (v != col_sortable_seq[i]) {
0
+// /* Check to see if the box was moved down */
0
+// if (col_lastvalues[i+1] == col_sortable_seq[i]) { box_id=v; box_position=col_sortable_seq.indexOf(v)+1; };
0
+// /* Check to see if the box was moved up */
0
+// if (col_lastvalues[i] == col_sortable_seq[i+1]) { box_id=col_sortable_seq[i]; box_position=i+1; };
0
+// throw $break;
0
+// };
0
+// });
0
+// }
0
+// else { // Find the new or lost box info.
0
+// col_internal_sort = false;
0
+// col_lost_box = col_lastvalues.length > col_sortable_seq.length ? true : false ;
0
+// /* Column's with a lost box is ignored by the server. */
0
+// if (col_lost_box == true) { box_id = 'na' ; box_position = 'na' ; }
0
+// /* Column with no boxes now gaining one. */
0
+// else if (col_empty) { box_id = col_sortable_seq[0] ; box_position = 1 ; }
0
+// else {
0
+// col_long_array = col_lastvalues.length > col_sortable_seq.length ? col_lastvalues : col_sortable_seq ;
0
+// col_short_array = col_lastvalues.length < col_sortable_seq.length ? col_lastvalues : col_sortable_seq ;
0
+// col_long_array.each(function(v,i) {
0
+// if (v != col_short_array[i]) { box_id=v; box_position=i+1; throw $break; };
0
+// });
0
+// }
0
+// }
0
+// return 'internal_sort='+col_internal_sort+'&lost_box='+col_lost_box+'&col_id='+col_sortable_id_num+'&box_id='+box_id+'&box_position='+box_position
0
+// }
0
+
0
+
0
+
0
+// /* Custom sortable serialize params Bookmark#sort
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+//
0
+// function findDroppedBookmarkInfo(obj) {
0
+// sortable_id = obj.element.id;
0
+// sortable_id_num = sortable_id.gsub(/boxid_list_/i,'');
0
+// box_type = findSortableBoxType(sortable_id_num);
0
+// box_empty = obj.lastValue.length == 0 ? true : false ;
0
+// lastvalues = $A(obj.lastValue.gsub(/(boxid_list_\d+|inbox_list|trashbox_list)\[\]=/i,'').split('&'));
0
+// sortable_seq = $A(Sortable.sequence(sortable_id));
0
+// if ((lastvalues.length == sortable_seq.length) && !box_empty) { // Find the bookmark info within the sortable.
0
+// internal_sort = true; lost_bmark = false; bmark_scope = box_type;
0
+// lastvalues.each(function(v,i) {
0
+// if (v != sortable_seq[i]) {
0
+// /* Check to see if the bookmark was moved down */
0
+// if (lastvalues[i+1] == sortable_seq[i]) { bmark_id=v; bmark_position=sortable_seq.indexOf(v)+1; };
0
+// /* Check to see if the bookmark was moved up */
0
+// if (lastvalues[i] == sortable_seq[i+1]) { bmark_id=sortable_seq[i]; bmark_position=i+1; };
0
+// throw $break;
0
+// };
0
+// });
0
+// }
0
+// else { // Find the new or lost bookmark info.
0
+// internal_sort = false;
0
+// lost_bmark = lastvalues.length > sortable_seq.length ? true : false ;
0
+// /* Box's with a lost bookmark are ignored by the server. */
0
+// if (lost_bmark == true) { bmark_id = 'na' ; bmark_position = 'na' ; bmark_scope = 'na'; }
0
+// /* Box with no bookmarks now gaining one. */
0
+// else if (box_empty) { bmark_id = sortable_seq[0] ; bmark_position = 1 ; bmark_scope = findBmarkScope(box_type,sortable_id); }
0
+// else {
0
+// long_array = lastvalues.length > sortable_seq.length ? lastvalues : sortable_seq ;
0
+// short_array = lastvalues.length < sortable_seq.length ? lastvalues : sortable_seq ;
0
+// long_array.each(function(v,i) {
0
+// if (v != short_array[i]) { bmark_id=v; bmark_position=i+1; throw $break; };
0
+// });
0
+// bmark_scope = findBmarkScope(box_type,sortable_id);
0
+// }
0
+// }
0
+// return 'internal_sort='+internal_sort+'&lost_bmark='+lost_bmark+'&box_type='+box_type+'&sortable_id='+sortable_id_num+'&bmark_id='+bmark_id+'&bmark_position='+bmark_position+'&bmark_scope='+bmark_scope
0
+// }
0
+//
0
+// function findSortableBoxType(sortable_id_num) {
0
+// if (sortable_id_num == 'inbox_list') { return 'inbox'; }
0
+// else if (sortable_id_num == 'trashbox_list') { return 'trashbox'; }
0
+// else { return 'box'; }
0
+// }
0
+//
0
+// function findBmarkScope(box_type, sortable_id) {
0
+// if (box_type == 'box') {
0
+// if ($('inbox_list').visible() && sortableHasClass(sortable_id,'inbox')) {return 'inbox'}
0
+// else if ($('trashbox_list').visible() && sortableHasClass(sortable_id,'trashbox')) {return 'trashbox'}
0
+// }
0
+// return 'box';
0
+// }
0
+//
0
+// function sortableHasClass(sortable_id, css_class) {
0
+// css_check = false
0
+// $A($(sortable_id).childNodes).each(function(li) {
0
+// if (li.hasClassName(css_class)) {css_check=true; throw $break;}
0
+// });
0
+// return css_check;
0
+// }
0
+
0
+
0
+
0
+// /* Tooltip Functions
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+//
0
+// var Tooltip = Class.create();
0
+//
0
+// Tooltip.prototype = {
0
+// initialize: function(a) {
0
+// this.a = $(a);
0
+// this.a.onmouseover = this.showTooltip.bindAsEventListener(this);
0
+// this.a.onmouseout = this.hideTooltip.bindAsEventListener(this);
0
+// this.tooltip_id = this.a.firstChild.id.gsub('button_','tt_');
0
+// this.tooltip = this.a.title;
0
+// this.render();
0
+// },
0
+// render: function() {
0
+// tooltip_box = Builder.node('div',{id:this.tooltip_id,className:'tooltip_box',style:'display:none;'},[
0
+// Builder.node('div',{className:'tooltip_left'}),
0
+// Builder.node('div',{className:'tooltip_middle'},[
0
+// Builder.node('div',{className:'tooltip_middlergt'}),
0
+// Builder.node('span',{className:'tooltip_message'},this.tooltip),
0
+// ]),
0
+// Builder.node('div',{className:'tooltip_right'}),
0
+// ]);
0
+// $('button_box').insertBefore(tooltip_box, this.a);
0
+// this.a.removeAttribute('title');
0
+// },
0
+// reseteffect: function() {
0
+// var effect = $(this.a)._effect;
0
+// if(effect) effect.cancel();
0
+// },
0
+// showTooltip: function(evt) {
0
+// this.reseteffect();
0
+// this.a._effect = new Effect.Appear(this.tooltip_id,{delay:0.5,duration:0.3});
0
+// },
0
+// hideTooltip: function(evt) {
0
+// this.reseteffect();
0
+// this.a._effect = new Effect.Fade(this.tooltip_id,{duration:0.3});
0
+// }
0
+// };
0
+//
0
+// Event.observe(window, 'load', activateTooltips, false);
0
+//
0
+// function activateTooltips() {
0
+// toolTipLinks = $$('a.tooltipable');
0
+// toolTipLinks.each( function(a) { new Tooltip(a); } );
0
+// }
0
+
0
+
0
+
0
+
0
+
0
+
0
+// /* Action Area Specific Functions
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+//
0
+// function getActionAreaVars() {
0
+// hud = $('hud');
0
+// actionBar = $('action_bar');
0
+// actionArea = $('action_area');
0
+// actionAreaShim = $('action_area_shim');
0
+// pageSize = WindowUtilities.getPageSize();
0
+// }
0
+//
0
+// function toggleActionArea(action_box) {
0
+// getActionAreaVars();
0
+// setActionAreaHeigth();
0
+// if (Element.hasClassName(actionBar,'barout')) {
0
+// if (forceTrashbox(action_box)) { forceTrashboxLoad() }
0
+// else {
0
+// actionAreaShim.hide();
0
+// actionBar.classNames().set('');
0
+// hud.setStyle({marginLeft:'28px'});
0
+// Event.stopObserving(window, 'resize', setActionAreaHeigth);
0
+// Event.stopObserving(window, 'scroll', setActionAreaHeigth);
0
+// }
0
+// }
0
+// else {
0
+// actionAreaShim.show();
0
+// actionAreaShim.setStyle({height:pageSize.pageHeight+'px'});
0
+// actionArea.setStyle({height:pageSize.windowHeight+'px'});
0
+// actionBar.classNames().set('barout');
0
+// hud.setStyle({marginLeft:'9px'})
0
+// Event.observe(window, 'resize', setActionAreaHeigth);
0
+// Event.observe(window, 'scroll', setActionAreaHeigth);
0
+// if (getFieldsetFlag()=='') {
0
+// if (action_box=='inbox') {inboxLoad()}
0
+// else if (action_box=='trashbox') {trashboxLoad();}
0
+// }
0
+// else if (forceTrashbox(action_box)) { forceTrashboxLoad() }
0
+// }
0
+// }
0
+//
0
+// function forceTrashbox(action_box) {
0
+// if ((getFieldsetFlag()!='legend_trash') && (action_box=='trashbox')) { return true; } else { return false };
0
+// }
0
+//
0
+// function forceTrashboxLoad() {
0
+// loadingActionArea($('legend_trash_link'));
0
+// new Ajax.Request('/actionarea/trashbox', {asynchronous:true, evalScripts:true});
0
+// }
0
+//
0
+// function trashboxLoad() {
0
+// setFieldsetFlag('legend_trash');
0
+// $('legend_trash').classNames().set('fld_on');
0
+// new Ajax.Request('/actionarea/trashbox', {asynchronous:true, evalScripts:true});
0
+// }
0
+//
0
+// function inboxLoad() {
0
+// setFieldsetFlag('legend_inbox');
0
+// $('legend_inbox').classNames().set('fld_on');
0
+// new Ajax.Request('/actionarea/inbox', {asynchronous:true, evalScripts:true});
0
+// }
0
+//
0
+// function setActionAreaHeigth(event) {
0
+// getActionAreaVars();
0
+// actionAreaShim.setStyle({height:pageSize.pageHeight+'px'});
0
+// actionArea.setStyle({height:pageSize.windowHeight+'px'});
0
+// }
0
+//
0
+// function setFieldsetFlag(ulid) {
0
+// $('fieldset_legend').classNames().set(ulid);
0
+// }
0
+//
0
+// function getFieldsetFlag() {
0
+// return $('fieldset_legend').classNames().toString();
0
+// }
0
+//
0
+// function isActionAreaDisplayed(obj) {
0
+// if (obj.childNodes[0].hasClassName('fld_on')) return false ;
0
+// return true;
0
+// }
0
+//
0
+// function loadingActionArea(obj) {
0
+// clicked = obj.childNodes[0];
0
+// currentFieldsetFlag = getFieldsetFlag();
0
+// switch (currentFieldsetFlag) {
0
+// case 'legend_inbox' : hidelist = 'inbox_list' ; break;
0
+// case 'legend_trash' : hidelist = 'trashbox_list' ; break;
0
+// case 'legend_search' : hidelist = 'searchbox_list' ; break;
0
+// }
0
+// setFieldsetFlag(clicked.id);
0
+// clicked.classNames().set('fld_on');
0
+// $(currentFieldsetFlag).classNames().set('');
0
+// if (clicked.id != 'legend_trash') {$('trashbox_emptytrash_box').hide()};
0
+// $('fieldset_progress_wrap').visualEffect('blind_down',{duration: 0.35});
0
+// $(hidelist).visualEffect('blind_up',{duration: 0.35});
0
+// }
0
+//
0
+// function showOrHideEmptyTrashBox() {
0
+// emptyTrashBox = $('trashbox_emptytrash_box');
0
+// if ( (Element.hasClassName('trashcan','trash_full')) && (getFieldsetFlag()=='legend_trash') ) {emptyTrashBox.show();} else {emptyTrashBox.hide();};
0
+// }
0
+//
0
+//
0
+//
0
+
0
+
0
+
0
+
0
+
0
+
0
+
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,323 +0,0 @@
0
-
0
-
0
-
0
-
0
-// /* General Application Wide Functions
0
-// * ----------------------------------------------------------------------------------------------------------------- */
0
-//
0
-// Event.observe(document, 'keypress', actionAreaHelper);
0
-// function actionAreaHelper(event) { if (event.charCode == 96) {toggleActionArea('inbox')}; };
0
-//
0
-// function globalLoadingBehavior() {
0
-// $('hud').classNames().set('');
0
-// Element.show('loading');
0
-// Element.update('message_wrapper', '<span id="message">&nbsp;</span>');
0
-// }
0
-//
0
-// function loadLameActionSpan(boxid,direction) {
0
-// if (direction == 'down') { spanclass = 'box_action box_action_down' }
0
-// if (direction == 'up') { spanclass = 'box_action' }
0
-// Element.replace('boxid_'+boxid+'_action_alink', '<span class="'+spanclass+'" id="boxid_'+boxid+'_action_lame"></span>')
0
-// }
0
-//
0
-// function remoteFormLoading(formobj,loadid) {
0
-// loadid = (loadid == null) ? 'form_loading' : loadid;
0
-// if (formobj.id == 'request_support_form') {loadimg=''} else {loadimg='_invert'};
0
-// Element.update($(loadid),'<img src="/images/loading'+loadimg+'.gif" />');
0
-// Form.disable(formobj);
0
-// }
0
-
0
-
0
-// /* Custom sortable serialize params Column#sort
0
-// * ----------------------------------------------------------------------------------------------------------------- */
0
-//
0
-// function findSortedInfo(obj) {
0
-// pg_sortable_id = obj.element.id;
0
-// pg_lastvalues = $A(obj.lastValue.gsub(/col_wrapper\[\]=/i,'').split('&'));
0
-// pg_sortable_seq = $A(Sortable.sequence(pg_sortable_id));
0
-//
0
-// if (pg_lastvalues.length == pg_sortable_seq.length) { // Find the column info within the sortable.
0
-// pg_lastvalues.each(function(v,i) {
0
-// if (v != pg_sortable_seq[i]) {
0
-// /* Check to see if the bookmark was moved down */
0
-// if (pg_lastvalues[i+1] == pg_sortable_seq[i]) { col_id=v; col_position=pg_sortable_seq.indexOf(v)+1; };
0
-// /* Check to see if the bookmark was moved up */
0
-// if (pg_lastvalues[i] == pg_sortable_seq[i+1]) { col_id=pg_sortable_seq[i]; col_position=i+1; };
0
-// throw $break;
0
-// };
0
-// });
0
-// return 'col_id='+col_id+'&col_position='+col_position;
0
-// }
0
-// else { return false; }
0
-// }
0
-
0
-
0
-
0
-// /* Custom sortable serialize params Box#sort
0
-// * ----------------------------------------------------------------------------------------------------------------- */
0
-//
0
-// function findDroppedBoxInfo(obj) {
0
-// col_sortable_id = obj.element.id;
0
-// col_sortable_id_num = col_sortable_id.gsub(/col_/i,'');
0
-// col_empty = obj.lastValue.length == 0 ? true : false ;
0
-// col_lastvalues = $A(obj.lastValue.gsub(/(col_\d+)\[\]=/i,'').split('&'));
0
-// col_sortable_seq = $A(Sortable.sequence(col_sortable_id));
0
-// if ((col_lastvalues.length == col_sortable_seq.length) && !col_empty) { // Find the box info within the sortable.
0
-// col_internal_sort = true; col_lost_box = false;
0
-// col_lastvalues.each(function(v,i) {
0
-// if (v != col_sortable_seq[i]) {
0
-// /* Check to see if the box was moved down */
0
-// if (col_lastvalues[i+1] == col_sortable_seq[i]) { box_id=v; box_position=col_sortable_seq.indexOf(v)+1; };
0
-// /* Check to see if the box was moved up */
0
-// if (col_lastvalues[i] == col_sortable_seq[i+1]) { box_id=col_sortable_seq[i]; box_position=i+1; };
0
-// throw $break;
0
-// };
0
-// });
0
-// }
0
-// else { // Find the new or lost box info.
0
-// col_internal_sort = false;
0
-// col_lost_box = col_lastvalues.length > col_sortable_seq.length ? true : false ;
0
-// /* Column's with a lost box is ignored by the server. */
0
-// if (col_lost_box == true) { box_id = 'na' ; box_position = 'na' ; }
0
-// /* Column with no boxes now gaining one. */
0
-// else if (col_empty) { box_id = col_sortable_seq[0] ; box_position = 1 ; }
0
-// else {
0
-// col_long_array = col_lastvalues.length > col_sortable_seq.length ? col_lastvalues : col_sortable_seq ;
0
-// col_short_array = col_lastvalues.length < col_sortable_seq.length ? col_lastvalues : col_sortable_seq ;
0
-// col_long_array.each(function(v,i) {
0
-// if (v != col_short_array[i]) { box_id=v; box_position=i+1; throw $break; };
0
-// });
0
-// }
0
-// }
0
-// return 'internal_sort='+col_internal_sort+'&lost_box='+col_lost_box+'&col_id='+col_sortable_id_num+'&box_id='+box_id+'&box_position='+box_position
0
-// }
0
-
0
-
0
-
0
-// /* Custom sortable serialize params Bookmark#sort
0
-// * ----------------------------------------------------------------------------------------------------------------- */
0
-//
0
-// function findDroppedBookmarkInfo(obj) {
0
-// sortable_id = obj.element.id;
0
-// sortable_id_num = sortable_id.gsub(/boxid_list_/i,'');
0
-// box_type = findSortableBoxType(sortable_id_num);
0
-// box_empty = obj.lastValue.length == 0 ? true : false ;
0
-// lastvalues = $A(obj.lastValue.gsub(/(boxid_list_\d+|inbox_list|trashbox_list)\[\]=/i,'').split('&'));
0
-// sortable_seq = $A(Sortable.sequence(sortable_id));
0
-// if ((lastvalues.length == sortable_seq.length) && !box_empty) { // Find the bookmark info within the sortable.
0
-// internal_sort = true; lost_bmark = false; bmark_scope = box_type;
0
-// lastvalues.each(function(v,i) {
0
-// if (v != sortable_seq[i]) {
0
-// /* Check to see if the bookmark was moved down */
0
-// if (lastvalues[i+1] == sortable_seq[i]) { bmark_id=v; bmark_position=sortable_seq.indexOf(v)+1; };
0
-// /* Check to see if the bookmark was moved up */
0
-// if (lastvalues[i] == sortable_seq[i+1]) { bmark_id=sortable_seq[i]; bmark_position=i+1; };
0
-// throw $break;
0
-// };
0
-// });
0
-// }
0
-// else { // Find the new or lost bookmark info.
0
-// internal_sort = false;
0
-// lost_bmark = lastvalues.length > sortable_seq.length ? true : false ;
0
-// /* Box's with a lost bookmark are ignored by the server. */
0
-// if (lost_bmark == true) { bmark_id = 'na' ; bmark_position = 'na' ; bmark_scope = 'na'; }
0
-// /* Box with no bookmarks now gaining one. */
0
-// else if (box_empty) { bmark_id = sortable_seq[0] ; bmark_position = 1 ; bmark_scope = findBmarkScope(box_type,sortable_id); }
0
-// else {
0
-// long_array = lastvalues.length > sortable_seq.length ? lastvalues : sortable_seq ;
0
-// short_array = lastvalues.length < sortable_seq.length ? lastvalues : sortable_seq ;
0
-// long_array.each(function(v,i) {
0
-// if (v != short_array[i]) { bmark_id=v; bmark_position=i+1; throw $break; };
0
-// });
0
-// bmark_scope = findBmarkScope(box_type,sortable_id);
0
-// }
0
-// }
0
-// return 'internal_sort='+internal_sort+'&lost_bmark='+lost_bmark+'&box_type='+box_type+'&sortable_id='+sortable_id_num+'&bmark_id='+bmark_id+'&bmark_position='+bmark_position+'&bmark_scope='+bmark_scope
0
-// }
0
-//
0
-// function findSortableBoxType(sortable_id_num) {
0
-// if (sortable_id_num == 'inbox_list') { return 'inbox'; }
0
-// else if (sortable_id_num == 'trashbox_list') { return 'trashbox'; }
0
-// else { return 'box'; }
0
-// }
0
-//
0
-// function findBmarkScope(box_type, sortable_id) {
0
-// if (box_type == 'box') {
0
-// if ($('inbox_list').visible() && sortableHasClass(sortable_id,'inbox')) {return 'inbox'}
0
-// else if ($('trashbox_list').visible() && sortableHasClass(sortable_id,'trashbox')) {return 'trashbox'}
0
-// }
0
-// return 'box';
0
-// }
0
-//
0
-// function sortableHasClass(sortable_id, css_class) {
0
-// css_check = false
0
-// $A($(sortable_id).childNodes).each(function(li) {
0
-// if (li.hasClassName(css_class)) {css_check=true; throw $break;}
0
-// });
0
-// return css_check;
0
-// }
0
-
0
-
0
-
0
-// /* Tooltip Functions
0
-// * ----------------------------------------------------------------------------------------------------------------- */
0
-//
0
-// var Tooltip = Class.create();
0
-//
0
-// Tooltip.prototype = {
0
-// initialize: function(a) {
0
-// this.a = $(a);
0
-// this.a.onmouseover = this.showTooltip.bindAsEventListener(this);
0
-// this.a.onmouseout = this.hideTooltip.bindAsEventListener(this);
0
-// this.tooltip_id = this.a.firstChild.id.gsub('button_','tt_');
0
-// this.tooltip = this.a.title;
0
-// this.render();
0
-// },
0
-// render: function() {
0
-// tooltip_box = Builder.node('div',{id:this.tooltip_id,className:'tooltip_box',style:'display:none;'},[
0
-// Builder.node('div',{className:'tooltip_left'}),
0
-// Builder.node('div',{className:'tooltip_middle'},[
0
-// Builder.node('div',{className:'tooltip_middlergt'}),
0
-// Builder.node('span',{className:'tooltip_message'},this.tooltip),
0
-// ]),
0
-// Builder.node('div',{className:'tooltip_right'}),
0
-// ]);
0
-// $('button_box').insertBefore(tooltip_box, this.a);
0
-// this.a.removeAttribute('title');
0
-// },
0
-// reseteffect: function() {
0
-// var effect = $(this.a)._effect;
0
-// if(effect) effect.cancel();
0
-// },
0
-// showTooltip: function(evt) {
0
-// this.reseteffect();
0
-// this.a._effect = new Effect.Appear(this.tooltip_id,{delay:0.5,duration:0.3});
0
-// },
0
-// hideTooltip: function(evt) {
0
-// this.reseteffect();
0
-// this.a._effect = new Effect.Fade(this.tooltip_id,{duration:0.3});
0
-// }
0
-// };
0
-//
0
-// Event.observe(window, 'load', activateTooltips, false);
0
-//
0
-// function activateTooltips() {
0
-// toolTipLinks = $$('a.tooltipable');
0
-// toolTipLinks.each( function(a) { new Tooltip(a); } );
0
-// }
0
-
0
-
0
-
0
-
0
-
0
-
0
-// /* Action Area Specific Functions
0
-// * ----------------------------------------------------------------------------------------------------------------- */
0
-//
0
-// function getActionAreaVars() {
0
-// hud = $('hud');
0
-// actionBar = $('action_bar');
0
-// actionArea = $('action_area');
0
-// actionAreaShim = $('action_area_shim');
0
-// pageSize = WindowUtilities.getPageSize();
0
-// }
0
-//
0
-// function toggleActionArea(action_box) {
0
-// getActionAreaVars();
0
-// setActionAreaHeigth();
0
-// if (Element.hasClassName(actionBar,'barout')) {
0
-// if (forceTrashbox(action_box)) { forceTrashboxLoad() }
0
-// else {
0
-// actionAreaShim.hide();
0
-// actionBar.classNames().set('');
0
-// hud.setStyle({marginLeft:'28px'});
0
-// Event.stopObserving(window, 'resize', setActionAreaHeigth);
0
-// Event.stopObserving(window, 'scroll', setActionAreaHeigth);
0
-// }
0
-// }
0
-// else {
0
-// actionAreaShim.show();
0
-// actionAreaShim.setStyle({height:pageSize.pageHeight+'px'});
0
-// actionArea.setStyle({height:pageSize.windowHeight+'px'});
0
-// actionBar.classNames().set('barout');
0
-// hud.setStyle({marginLeft:'9px'})
0
-// Event.observe(window, 'resize', setActionAreaHeigth);
0
-// Event.observe(window, 'scroll', setActionAreaHeigth);
0
-// if (getFieldsetFlag()=='') {
0
-// if (action_box=='inbox') {inboxLoad()}
0
-// else if (action_box=='trashbox') {trashboxLoad();}
0
-// }
0
-// else if (forceTrashbox(action_box)) { forceTrashboxLoad() }
0
-// }
0
-// }
0
-//
0
-// function forceTrashbox(action_box) {
0
-// if ((getFieldsetFlag()!='legend_trash') && (action_box=='trashbox')) { return true; } else { return false };
0
-// }
0
-//
0
-// function forceTrashboxLoad() {
0
-// loadingActionArea($('legend_trash_link'));
0
-// new Ajax.Request('/actionarea/trashbox', {asynchronous:true, evalScripts:true});
0
-// }
0
-//
0
-// function trashboxLoad() {
0
-// setFieldsetFlag('legend_trash');
0
-// $('legend_trash').classNames().set('fld_on');
0
-// new Ajax.Request('/actionarea/trashbox', {asynchronous:true, evalScripts:true});
0
-// }
0
-//
0
-// function inboxLoad() {
0
-// setFieldsetFlag('legend_inbox');
0
-// $('legend_inbox').classNames().set('fld_on');
0
-// new Ajax.Request('/actionarea/inbox', {asynchronous:true, evalScripts:true});
0
-// }
0
-//
0
-// function setActionAreaHeigth(event) {
0
-// getActionAreaVars();
0
-// actionAreaShim.setStyle({height:pageSize.pageHeight+'px'});
0
-// actionArea.setStyle({height:pageSize.windowHeight+'px'});
0
-// }
0
-//
0
-// function setFieldsetFlag(ulid) {
0
-// $('fieldset_legend').classNames().set(ulid);
0
-// }
0
-//
0
-// function getFieldsetFlag() {
0
-// return $('fieldset_legend').classNames().toString();
0
-// }
0
-//
0
-// function isActionAreaDisplayed(obj) {
0
-// if (obj.childNodes[0].hasClassName('fld_on')) return false ;
0
-// return true;
0
-// }
0
-//
0
-// function loadingActionArea(obj) {
0
-// clicked = obj.childNodes[0];
0
-// currentFieldsetFlag = getFieldsetFlag();
0
-// switch (currentFieldsetFlag) {
0
-// case 'legend_inbox' : hidelist = 'inbox_list' ; break;
0
-// case 'legend_trash' : hidelist = 'trashbox_list' ; break;
0
-// case 'legend_search' : hidelist = 'searchbox_list' ; break;
0
-// }
0
-// setFieldsetFlag(clicked.id);
0
-// clicked.classNames().set('fld_on');
0
-// $(currentFieldsetFlag).classNames().set('');
0
-// if (clicked.id != 'legend_trash') {$('trashbox_emptytrash_box').hide()};
0
-// $('fieldset_progress_wrap').visualEffect('blind_down',{duration: 0.35});
0
-// $(hidelist).visualEffect('blind_up',{duration: 0.35});
0
-// }
0
-//
0
-// function showOrHideEmptyTrashBox() {
0
-// emptyTrashBox = $('trashbox_emptytrash_box');
0
-// if ( (Element.hasClassName('trashcan','trash_full')) && (getFieldsetFlag()=='legend_trash') ) {emptyTrashBox.show();} else {emptyTrashBox.hide();};
0
-// }
0
-//
0
-//
0
-//
0
-
0
-
0
-
0
-
0
-
0
-
0
-

Comments

    No one has commented yet.