rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
|| this.pos == n
this.activate = function(n) { label = "QueryBufferListClass.activate: "; debug.print(label + this.pos + " to " + n); var buf = this.getBuffer(); if (null == n || isNaN(n) || this.pos == n || 0 > n || this.buffers.length <= n) { // make sure our state is correct this.setQuery(this.input.value); return; } // save any state from the current buffer, and deactivate it. if (null != buf) { buf.setQuery(this.input.value); buf.setContentSource(this.eval.value); this.setLabel(this.pos, false); simulateSelectionStart(this.input); buf.setSelectionStart(this.input.selectionStart); } // activate the new buffer and restore its state this.last = this.pos; this.pos = n; buf = this.getBuffer(n); this.input.value = buf.getQuery(); this.setContentSource(buf.getContentSource()); this.setLabel(this.pos, true); this.input.focus(); setSelectionStart(this.input, buf.getSelectionStart()); }
this.setQuery(this.input.value);
this.activate = function(n) { label = "QueryBufferListClass.activate: "; debug.print(label + this.pos + " to " + n); var buf = this.getBuffer(); if (null == n || isNaN(n) || this.pos == n || 0 > n || this.buffers.length <= n) { // make sure our state is correct this.setQuery(this.input.value); return; } // save any state from the current buffer, and deactivate it. if (null != buf) { buf.setQuery(this.input.value); buf.setContentSource(this.eval.value); this.setLabel(this.pos, false); simulateSelectionStart(this.input); buf.setSelectionStart(this.input.selectionStart); } // activate the new buffer and restore its state this.last = this.pos; this.pos = n; buf = this.getBuffer(n); this.input.value = buf.getQuery(); this.setContentSource(buf.getContentSource()); this.setLabel(this.pos, true); this.input.focus(); setSelectionStart(this.input, buf.getSelectionStart()); }
if (null != buf) { buf.setQuery(this.input.value); buf.setContentSource(this.eval.value); this.setLabel(this.pos, false); simulateSelectionStart(this.input); buf.setSelectionStart(this.input.selectionStart);
if (this.pos == n) { return;
this.activate = function(n) { label = "QueryBufferListClass.activate: "; debug.print(label + this.pos + " to " + n); var buf = this.getBuffer(); if (null == n || isNaN(n) || this.pos == n || 0 > n || this.buffers.length <= n) { // make sure our state is correct this.setQuery(this.input.value); return; } // save any state from the current buffer, and deactivate it. if (null != buf) { buf.setQuery(this.input.value); buf.setContentSource(this.eval.value); this.setLabel(this.pos, false); simulateSelectionStart(this.input); buf.setSelectionStart(this.input.selectionStart); } // activate the new buffer and restore its state this.last = this.pos; this.pos = n; buf = this.getBuffer(n); this.input.value = buf.getQuery(); this.setContentSource(buf.getContentSource()); this.setLabel(this.pos, true); this.input.focus(); setSelectionStart(this.input, buf.getSelectionStart()); }
setSelectionStart(this.input, buf.getSelectionStart());
this.activate = function(n) { label = "QueryBufferListClass.activate: "; debug.print(label + this.pos + " to " + n); var buf = this.getBuffer(); if (null == n || isNaN(n) || this.pos == n || 0 > n || this.buffers.length <= n) { // make sure our state is correct this.setQuery(this.input.value); return; } // save any state from the current buffer, and deactivate it. if (null != buf) { buf.setQuery(this.input.value); buf.setContentSource(this.eval.value); this.setLabel(this.pos, false); simulateSelectionStart(this.input); buf.setSelectionStart(this.input.selectionStart); } // activate the new buffer and restore its state this.last = this.pos; this.pos = n; buf = this.getBuffer(n); this.input.value = buf.getQuery(); this.setContentSource(buf.getContentSource()); this.setLabel(this.pos, true); this.input.focus(); setSelectionStart(this.input, buf.getSelectionStart()); }
var options = {
var options = Object.extend({
add: function(element) { var element = $(element); var options = { greedy: true, hoverclass: null }.extend(arguments[1] || {}); // cache containers if(options.containment) { options._containers = new Array(); var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { for(var i=0; i<containment.length; i++) options._containers.push($(containment[i])); } else { options._containers.push($(containment)); } options._containers_length = options._containers.length-1; } Element.makePositioned(element); // fix IE options.element = element; // activate the droppable if(!this.drops) this.drops = []; this.drops.push(options); },
}.extend(arguments[1] || {});
}, arguments[1] || {});
add: function(element) { var element = $(element); var options = { greedy: true, hoverclass: null }.extend(arguments[1] || {}); // cache containers if(options.containment) { options._containers = new Array(); var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { for(var i=0; i<containment.length; i++) options._containers.push($(containment[i])); } else { options._containers.push($(containment)); } options._containers_length = options._containers.length-1; } Element.makePositioned(element); // fix IE options.element = element; // activate the droppable if(!this.drops) this.drops = []; this.drops.push(options); },
hoverclass: null
hoverclass: null, tree: false
add: function(element) { element = $(element); var options = Object.extend({ greedy: true, hoverclass: null }, arguments[1] || {}); // cache containers if(options.containment) { options._containers = []; var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { containment.each( function(c) { options._containers.push($(c)) }); } else { options._containers.push($(containment)); } } if(options.accept) options.accept = [options.accept].flatten(); Element.makePositioned(element); // fix IE options.element = element; this.drops.push(options); },
var b;
var b, customUndoLevels, newHTML, inst = this.instance, i, ul, ur;
add : function(l) { var b; if (l) { this.undoLevels[this.undoLevels.length] = l; return true; } var inst = this.instance; if (this.typingUndoIndex != -1) { this.undoIndex = this.typingUndoIndex; // tinyMCE.debug("Override: " + this.undoIndex); } var newHTML = tinyMCE.trim(inst.getBody().innerHTML); if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) { //tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]); tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst); // Time to compress var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } this.undoLevels.length--; this.undoIndex--; } b = inst.undoBookmark; if (!b) b = inst.selection.getBookmark(); this.undoIndex++; this.undoLevels[this.undoIndex] = { content : newHTML, bookmark : b }; this.undoLevels.length = this.undoIndex + 1; //tinyMCE.debug("level added" + this.undoIndex); return true; // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); } return false; },
var inst = this.instance;
add : function(l) { var b; if (l) { this.undoLevels[this.undoLevels.length] = l; return true; } var inst = this.instance; if (this.typingUndoIndex != -1) { this.undoIndex = this.typingUndoIndex; // tinyMCE.debug("Override: " + this.undoIndex); } var newHTML = tinyMCE.trim(inst.getBody().innerHTML); if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) { //tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]); tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst); // Time to compress var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } this.undoLevels.length--; this.undoIndex--; } b = inst.undoBookmark; if (!b) b = inst.selection.getBookmark(); this.undoIndex++; this.undoLevels[this.undoIndex] = { content : newHTML, bookmark : b }; this.undoLevels.length = this.undoIndex + 1; //tinyMCE.debug("level added" + this.undoIndex); return true; // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); } return false; },
if (tinyMCE.typingUndoIndex != -1) tinyMCE.undoIndex = tinyMCE.typingUndoIndex;
add : function(l) { var b; if (l) { this.undoLevels[this.undoLevels.length] = l; return true; } var inst = this.instance; if (this.typingUndoIndex != -1) { this.undoIndex = this.typingUndoIndex; // tinyMCE.debug("Override: " + this.undoIndex); } var newHTML = tinyMCE.trim(inst.getBody().innerHTML); if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) { //tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]); tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst); // Time to compress var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } this.undoLevels.length--; this.undoIndex--; } b = inst.undoBookmark; if (!b) b = inst.selection.getBookmark(); this.undoIndex++; this.undoLevels[this.undoIndex] = { content : newHTML, bookmark : b }; this.undoLevels.length = this.undoIndex + 1; //tinyMCE.debug("level added" + this.undoIndex); return true; // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); } return false; },
var newHTML = tinyMCE.trim(inst.getBody().innerHTML);
newHTML = tinyMCE.trim(inst.getBody().innerHTML);
add : function(l) { var b; if (l) { this.undoLevels[this.undoLevels.length] = l; return true; } var inst = this.instance; if (this.typingUndoIndex != -1) { this.undoIndex = this.typingUndoIndex; // tinyMCE.debug("Override: " + this.undoIndex); } var newHTML = tinyMCE.trim(inst.getBody().innerHTML); if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) { //tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]); tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst); // Time to compress var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } this.undoLevels.length--; this.undoIndex--; } b = inst.undoBookmark; if (!b) b = inst.selection.getBookmark(); this.undoIndex++; this.undoLevels[this.undoIndex] = { content : newHTML, bookmark : b }; this.undoLevels.length = this.undoIndex + 1; //tinyMCE.debug("level added" + this.undoIndex); return true; // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); } return false; },
var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels'];
customUndoLevels = tinyMCE.settings['custom_undo_redo_levels'];
add : function(l) { var b; if (l) { this.undoLevels[this.undoLevels.length] = l; return true; } var inst = this.instance; if (this.typingUndoIndex != -1) { this.undoIndex = this.typingUndoIndex; // tinyMCE.debug("Override: " + this.undoIndex); } var newHTML = tinyMCE.trim(inst.getBody().innerHTML); if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) { //tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]); tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst); // Time to compress var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } this.undoLevels.length--; this.undoIndex--; } b = inst.undoBookmark; if (!b) b = inst.selection.getBookmark(); this.undoIndex++; this.undoLevels[this.undoIndex] = { content : newHTML, bookmark : b }; this.undoLevels.length = this.undoIndex + 1; //tinyMCE.debug("level added" + this.undoIndex); return true; // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); } return false; },
for (var i=0; i<this.undoLevels.length-1; i++) {
for (i=0; i<this.undoLevels.length-1; i++)
add : function(l) { var b; if (l) { this.undoLevels[this.undoLevels.length] = l; return true; } var inst = this.instance; if (this.typingUndoIndex != -1) { this.undoIndex = this.typingUndoIndex; // tinyMCE.debug("Override: " + this.undoIndex); } var newHTML = tinyMCE.trim(inst.getBody().innerHTML); if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) { //tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]); tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst); // Time to compress var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } this.undoLevels.length--; this.undoIndex--; } b = inst.undoBookmark; if (!b) b = inst.selection.getBookmark(); this.undoIndex++; this.undoLevels[this.undoIndex] = { content : newHTML, bookmark : b }; this.undoLevels.length = this.undoIndex + 1; //tinyMCE.debug("level added" + this.undoIndex); return true; // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); } return false; },
}
add : function(l) { var b; if (l) { this.undoLevels[this.undoLevels.length] = l; return true; } var inst = this.instance; if (this.typingUndoIndex != -1) { this.undoIndex = this.typingUndoIndex; // tinyMCE.debug("Override: " + this.undoIndex); } var newHTML = tinyMCE.trim(inst.getBody().innerHTML); if (this.undoLevels[this.undoIndex] && newHTML != this.undoLevels[this.undoIndex].content) { //tinyMCE.debug(newHTML, this.undoLevels[this.undoIndex]); tinyMCE.dispatchCallback(inst, 'onchange_callback', 'onChange', inst); // Time to compress var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } this.undoLevels.length--; this.undoIndex--; } b = inst.undoBookmark; if (!b) b = inst.selection.getBookmark(); this.undoIndex++; this.undoLevels[this.undoIndex] = { content : newHTML, bookmark : b }; this.undoLevels.length = this.undoIndex + 1; //tinyMCE.debug("level added" + this.undoIndex); return true; // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); } return false; },
debug.print("QueryHistoryClass.add: " + query);
var label = "QueryHistoryClass.add: "; debug.print(label + query);
this.add = function(query) { debug.print("QueryHistoryClass.add: " + query); if (query == null || query == "") { return; } // the whitespace-normalized query acts as the hash key var key = normalizeSpace(query); if (key == null || key == "") { return; } //debug.print("QueryHistoryClass.add: " + ": " + key); // lazy initialization if (null == this.listNode.parentNode) { // We haven't attached the listNode to the document yet: // remove any existing text and attach our listNode. Element.update(this.node, ''); this.node.appendChild(this.listNode); } var listItem = this.hash[key]; if (null != listItem) { // new query has a duplicate: replace the existing item. Element.remove(listItem); } // build a new listItem listItem = this.newListItem(key, query); // place the new listItem at the top of the listNode children if (this.listNode.hasChildNodes()) { this.listNode.insertBefore(listItem, this.listNode.firstChild); } else { debug.print("QueryHistoryClass.add: first entry"); this.listNode.appendChild(listItem); } // update the hash this.hash[key] = listItem; this.lastModified = new Date(); // check size limit, and truncate if needed var values = this.hash.values(); if (values.length > this.size) { debug.print("QueryHistoryClass.add: truncating " + values.length + " > " + this.size); for (i = this.size; i < values.length; i++) { debug.print("QueryHistoryClass.add: truncating " + i); this.remove(values[i]); } } }
var key = normalizeSpace(query);
var key = this.getKey(query);
this.add = function(query) { debug.print("QueryHistoryClass.add: " + query); if (query == null || query == "") { return; } // the whitespace-normalized query acts as the hash key var key = normalizeSpace(query); if (key == null || key == "") { return; } //debug.print("QueryHistoryClass.add: " + ": " + key); // lazy initialization if (null == this.listNode.parentNode) { // We haven't attached the listNode to the document yet: // remove any existing text and attach our listNode. Element.update(this.node, ''); this.node.appendChild(this.listNode); } var listItem = this.hash[key]; if (null != listItem) { // new query has a duplicate: replace the existing item. Element.remove(listItem); } // build a new listItem listItem = this.newListItem(key, query); // place the new listItem at the top of the listNode children if (this.listNode.hasChildNodes()) { this.listNode.insertBefore(listItem, this.listNode.firstChild); } else { debug.print("QueryHistoryClass.add: first entry"); this.listNode.appendChild(listItem); } // update the hash this.hash[key] = listItem; this.lastModified = new Date(); // check size limit, and truncate if needed var values = this.hash.values(); if (values.length > this.size) { debug.print("QueryHistoryClass.add: truncating " + values.length + " > " + this.size); for (i = this.size; i < values.length; i++) { debug.print("QueryHistoryClass.add: truncating " + i); this.remove(values[i]); } } }
if (this.listNode.hasChildNodes()) { this.listNode.insertBefore(listItem, this.listNode.firstChild); } else { debug.print("QueryHistoryClass.add: first entry"); this.listNode.appendChild(listItem); }
this.add = function(query) { debug.print("QueryHistoryClass.add: " + query); if (query == null || query == "") { return; } // the whitespace-normalized query acts as the hash key var key = normalizeSpace(query); if (key == null || key == "") { return; } //debug.print("QueryHistoryClass.add: " + ": " + key); // lazy initialization if (null == this.listNode.parentNode) { // We haven't attached the listNode to the document yet: // remove any existing text and attach our listNode. Element.update(this.node, ''); this.node.appendChild(this.listNode); } var listItem = this.hash[key]; if (null != listItem) { // new query has a duplicate: replace the existing item. Element.remove(listItem); } // build a new listItem listItem = this.newListItem(key, query); // place the new listItem at the top of the listNode children if (this.listNode.hasChildNodes()) { this.listNode.insertBefore(listItem, this.listNode.firstChild); } else { debug.print("QueryHistoryClass.add: first entry"); this.listNode.appendChild(listItem); } // update the hash this.hash[key] = listItem; this.lastModified = new Date(); // check size limit, and truncate if needed var values = this.hash.values(); if (values.length > this.size) { debug.print("QueryHistoryClass.add: truncating " + values.length + " > " + this.size); for (i = this.size; i < values.length; i++) { debug.print("QueryHistoryClass.add: truncating " + i); this.remove(values[i]); } } }
var values = this.hash.values(); if (values.length > this.size) { debug.print("QueryHistoryClass.add: truncating " + values.length + " > " + this.size); for (i = this.size; i < values.length; i++) { debug.print("QueryHistoryClass.add: truncating " + i); this.remove(values[i]); }
var overflow = $A(this.listNode.childNodes).slice(this.limit); if (null == overflow || overflow.length < 1) { return; } debug.print(label + "truncating " + overflow.length); var key = null; for (i = 0; i < overflow.length; i++) { key = this.getKey(this.getListItemValue(overflow[i])); debug.print(label + "truncating " + i + " = " + key); this.remove(key);
this.add = function(query) { debug.print("QueryHistoryClass.add: " + query); if (query == null || query == "") { return; } // the whitespace-normalized query acts as the hash key var key = normalizeSpace(query); if (key == null || key == "") { return; } //debug.print("QueryHistoryClass.add: " + ": " + key); // lazy initialization if (null == this.listNode.parentNode) { // We haven't attached the listNode to the document yet: // remove any existing text and attach our listNode. Element.update(this.node, ''); this.node.appendChild(this.listNode); } var listItem = this.hash[key]; if (null != listItem) { // new query has a duplicate: replace the existing item. Element.remove(listItem); } // build a new listItem listItem = this.newListItem(key, query); // place the new listItem at the top of the listNode children if (this.listNode.hasChildNodes()) { this.listNode.insertBefore(listItem, this.listNode.firstChild); } else { debug.print("QueryHistoryClass.add: first entry"); this.listNode.appendChild(listItem); } // update the hash this.hash[key] = listItem; this.lastModified = new Date(); // check size limit, and truncate if needed var values = this.hash.values(); if (values.length > this.size) { debug.print("QueryHistoryClass.add: truncating " + values.length + " > " + this.size); for (i = this.size; i < values.length; i++) { debug.print("QueryHistoryClass.add: truncating " + i); this.remove(values[i]); } } }
var element = $(element);
element = $(element);
add: function(element) { var element = $(element); var options = Object.extend({ greedy: true, hoverclass: null }, arguments[1] || {}); // cache containers if(options.containment) { options._containers = new Array(); var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { for(var i=0; i<containment.length; i++) options._containers.push($(containment[i])); } else { options._containers.push($(containment)); } options._containers_length = options._containers.length-1; } Element.makePositioned(element); // fix IE options.element = element; // activate the droppable if(!this.drops) this.drops = []; this.drops.push(options); },
options._containers = new Array();
options._containers = [];
add: function(element) { var element = $(element); var options = Object.extend({ greedy: true, hoverclass: null }, arguments[1] || {}); // cache containers if(options.containment) { options._containers = new Array(); var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { for(var i=0; i<containment.length; i++) options._containers.push($(containment[i])); } else { options._containers.push($(containment)); } options._containers_length = options._containers.length-1; } Element.makePositioned(element); // fix IE options.element = element; // activate the droppable if(!this.drops) this.drops = []; this.drops.push(options); },
for(var i=0; i<containment.length; i++) options._containers.push($(containment[i]));
containment.each( function(c) { options._containers.push($(c)) });
add: function(element) { var element = $(element); var options = Object.extend({ greedy: true, hoverclass: null }, arguments[1] || {}); // cache containers if(options.containment) { options._containers = new Array(); var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { for(var i=0; i<containment.length; i++) options._containers.push($(containment[i])); } else { options._containers.push($(containment)); } options._containers_length = options._containers.length-1; } Element.makePositioned(element); // fix IE options.element = element; // activate the droppable if(!this.drops) this.drops = []; this.drops.push(options); },
options._containers_length = options._containers.length-1;
add: function(element) { var element = $(element); var options = Object.extend({ greedy: true, hoverclass: null }, arguments[1] || {}); // cache containers if(options.containment) { options._containers = new Array(); var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { for(var i=0; i<containment.length; i++) options._containers.push($(containment[i])); } else { options._containers.push($(containment)); } options._containers_length = options._containers.length-1; } Element.makePositioned(element); // fix IE options.element = element; // activate the droppable if(!this.drops) this.drops = []; this.drops.push(options); },
if(!this.drops) this.drops = [];
add: function(element) { var element = $(element); var options = Object.extend({ greedy: true, hoverclass: null }, arguments[1] || {}); // cache containers if(options.containment) { options._containers = new Array(); var containment = options.containment; if((typeof containment == 'object') && (containment.constructor == Array)) { for(var i=0; i<containment.length; i++) options._containers.push($(containment[i])); } else { options._containers.push($(containment)); } options._containers_length = options._containers.length-1; } Element.makePositioned(element); // fix IE options.element = element; // activate the droppable if(!this.drops) this.drops = []; this.drops.push(options); },
this.effects.push(effect);
if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) this.effects.push(effect);
add: function(effect) { var timestamp = new Date().getTime(); var position = (typeof effect.options.queue == 'string') ? effect.options.queue : effect.options.queue.position; switch(position) { case 'front': // move unstarted effects after this effect this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { e.startOn += effect.finishOn; e.finishOn += effect.finishOn; }); break; case 'end': // start effect after last queued effect has finished timestamp = this.effects.pluck('finishOn').max() || timestamp; break; } effect.startOn += timestamp; effect.finishOn += timestamp; this.effects.push(effect); if(!this.interval) this.interval = setInterval(this.loop.bind(this), 40); },
debug.print(label + query);
this.add = function(query) { var label = "QueryHistoryClass.add: "; debug.print(label + query); if (query == null || query == "") { return; } // the whitespace-normalized query acts as the hash key var key = this.getKey(query); if (key == null || key == "") { return; } //debug.print(label + "key = " + key); // lazy initialization if (null == this.listNode.parentNode) { // We haven't attached the listNode to the document yet: // remove any existing text and attach our listNode. Element.update(this.node, ''); this.node.appendChild(this.listNode); } var listItem = this.hash[key]; if (null != listItem) { // new query has a duplicate: replace the existing item. Element.remove(listItem); this.hash[key] = null; } // build a new listItem listItem = this.newListItem(key, query); // update the hash this.hash[key] = listItem; this.lastModified = new Date(); if (!this.listNode.hasChildNodes()) { debug.print(label + "first entry"); this.listNode.appendChild(listItem); return; } // place the new listItem at the top of the listNode children this.listNode.insertBefore(listItem, this.listNode.firstChild); // check size limit, and truncate if needed var overflow = $A(this.listNode.childNodes).slice(this.limit); if (null == overflow || overflow.length < 1) { return; } debug.print(label + "truncating " + overflow.length); // TODO we have values, but this.remove() takes a key // a key is just the normalized query, though var key = null; for (i = 0; i < overflow.length; i++) { key = this.getKey(this.getListItemValue(overflow[i])); debug.print(label + "truncating " + i + " = " + key); this.remove(key); } }
var dep_present = eval("PHP_" + DEP);
function ADD_EXTENSION_DEP(extname, dependson, optional){ var EXT = extname.toUpperCase(); var DEP = dependson.toUpperCase(); if (optional) { var dep_present = eval("PHP_" + DEP); if (dep_present == "no") return; } var dep_shared = eval("PHP_" + DEP + "_SHARED"); var ext_shared = eval("PHP_" + EXT + "_SHARED"); if (dep_shared) { if (!ext_shared) { if (optional) { return; } ERROR("static " + extname + " cannot depend on shared " + dependson); } ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)"); ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib"); ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib"); }}
var dep_shared = eval("PHP_" + DEP + "_SHARED");
function ADD_EXTENSION_DEP(extname, dependson, optional){ var EXT = extname.toUpperCase(); var DEP = dependson.toUpperCase(); if (optional) { var dep_present = eval("PHP_" + DEP); if (dep_present == "no") return; } var dep_shared = eval("PHP_" + DEP + "_SHARED"); var ext_shared = eval("PHP_" + EXT + "_SHARED"); if (dep_shared) { if (!ext_shared) { if (optional) { return; } ERROR("static " + extname + " cannot depend on shared " + dependson); } ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)"); ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib"); ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib"); }}
function ADD_EXTENSION_DEP(extname, dependson)
function ADD_EXTENSION_DEP(extname, dependson, optional)
function ADD_EXTENSION_DEP(extname, dependson){ var EXT = extname.toUpperCase(); var DEP = dependson.toUpperCase(); var dep_shared = eval("PHP_" + DEP + "_SHARED"); var ext_shared = eval("PHP_" + EXT + "_SHARED"); if (dep_shared) { if (!ext_shared) { ERROR("static " + extname + " cannot depend on shared " + dependson); } ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)"); ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib"); ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib"); }}
if (optional) { return; }
function ADD_EXTENSION_DEP(extname, dependson){ var EXT = extname.toUpperCase(); var DEP = dependson.toUpperCase(); var dep_shared = eval("PHP_" + DEP + "_SHARED"); var ext_shared = eval("PHP_" + EXT + "_SHARED"); if (dep_shared) { if (!ext_shared) { ERROR("static " + extname + " cannot depend on shared " + dependson); } ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)"); ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib"); ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib"); }}
line.splice(l+1,0,new Line(curattr)); for(i=ypos-edit_top+1; i<lines_on_screen; i++) { redraw_line(i+topline);
var i; line.splice(l+1,0,new Line()); for(i=l+1; i<topline+lines_on_screen; i++) { if(line[l]!=undefined) draw_line(l);
function add_new_line_below(l){ line.splice(l+1,0,new Line(curattr)); /* Scroll lines below down */ /* ToDo: Fix this for adding to non-current spot */ for(i=ypos-edit_top+1; i<lines_on_screen; i++) { redraw_line(i+topline); }}
line.splice(topline+ypos-edit_top+1,0,new Line);
line.splice(topline+ypos-edit_top+1,0,new Line(curattr));
function add_new_line_below(){ line.splice(topline+ypos-edit_top+1,0,new Line); /* Scroll lines below down */ for(i=ypos-edit_top+1; i<lines_on_screen; i++) { console.gotoxy(1,edit_top+i); if(line[i]!=undefined) line[i+topline].draw(); else { console.attributes=7; console.cleartoeol(); } }}
console.gotoxy(1,edit_top+i); if(line[i]!=undefined) line[i+topline].draw();
if(line[i+topline]!=undefined) line[i+topline].draw(edit_top+i);
function add_new_line_below(){ line.splice(topline+ypos-edit_top+1,0,new Line); /* Scroll lines below down */ for(i=ypos-edit_top+1; i<lines_on_screen; i++) { console.gotoxy(1,edit_top+i); if(line[i]!=undefined) line[i+topline].draw(); else { console.attributes=7; console.cleartoeol(); } }}
var time_hex = format("%lx",time());
var time_hex = format("%08lxh",time());
function add_part(list,sub_code,hdr ,fname,codec,part,total ,first_line,last_line ,begin,end,pcrc32,size,crc32){ if(part<1) { /* must parse from subject (yuck) */ part=hdr.subject.lastIndexOf('('); if(part>=0) part=parseInt(hdr.subject.slice(part+1),10); if(part<1) { printf("!Failed to parse part number from: %s\r\n",hdr.subject); return(false); } printf("Parsed part number: %u\r\n",part); } if(total==undefined || total<part) { /* must parse from subject (yuck) */ total=hdr.subject.lastIndexOf('('); if(total>=0) { subject=hdr.subject.slice(total+1); total=subject.indexOf('/'); } if(total>=0) total=parseInt(subject.slice(total+1),10); if(total<part) { printf("!Failed to parse total parts from: %s\r\n",hdr.subject); return(false); } printf("Parsed total parts: %u\r\n",total); } /* Search database for existing file object */ var li; for(li=0; li<list.length; li++) if(list[li].name==fname && list[li].total==total && list[li].codec==codec && (size==undefined || list[li].size==size) && (crc32==undefined || parseInt(list[li].crc32,16)==crc32) ) { printf("%s found in database\r\n",fname.toString()); break; } obj=list[li]; var time_str = system.timestr(); var time_hex = format("%lx",time()); if(obj==undefined) { /* new entry */ printf("New parts database entry for: %s\r\n",fname.toString()); printf("total=%u, size=%u, crc32=%lx\r\n",total,size,crc32); obj = { name: fname, codec: codec, parts: 0, total: total }; obj.subject=hdr.subject; /* save first subject for additional UUE parts */ obj.from=hdr.from; /* yEnc file fields */ if(size!=undefined) obj.size=size; if(crc32!=undefined) obj.crc32=format("%lx",crc32); /* Timestamp */ obj.created=time_str; obj.created_time=time_hex } /* Timestamp */ obj.updated=time_str; obj.updated_time=time_hex; /* part message info */ prop=format("part%u.id",part); if(obj[prop]!=undefined) { printf("Part %u of %s already in database\r\n",part,fname.toString()); return(true); // pretend we added it } printf("Adding part %u of %s-encoded file to database:\r\n",part,codec.toUpperCase()); printf("File: %s\r\n",fname); obj[format("part%u.id",part)]=hdr.id; obj[format("part%u.sub",part)]=sub_code; obj[format("part%u.msg",part)]=hdr.number; obj[format("part%u.date",part)]=hdr.date; obj[format("part%u.added",part)]=time_str; obj[format("part%u.added_time",part)]=time_hex;// obj[format("part%u.from",part)]=hdr.from;// obj[format("part%u.subject",part)]=hdr.subject; /* These save us the hassle of parsing again later */ obj[format("part%u.first_line",part)]=first_line; obj[format("part%u.last_line",part)]=last_line; /* yEnc part fields */ if(begin!=undefined) obj[format("part%u.begin",part)]=begin; if(end!=undefined) obj[format("part%u.end",part)]=end; if(pcrc32!=undefined) obj[format("part%u.crc32",part)]=format("%lx",pcrc32); obj.parts++; list[li]=obj; printf("Part %u added (%u/%u parts in database)\r\n" ,part,obj.parts,obj.total); return(true);}
printf("total=%u, size=%u, crc32=%lx\r\n",total,size,crc32);
printf("total=%u, size=%u, crc32=%08lx\r\n",total,size,crc32);
function add_part(list,sub_code,hdr ,fname,codec,part,total ,first_line,last_line ,begin,end,pcrc32,size,crc32){ if(part<1) { /* must parse from subject (yuck) */ part=hdr.subject.lastIndexOf('('); if(part>=0) part=parseInt(hdr.subject.slice(part+1),10); if(part<1) { printf("!Failed to parse part number from: %s\r\n",hdr.subject); return(false); } printf("Parsed part number: %u\r\n",part); } if(total==undefined || total<part) { /* must parse from subject (yuck) */ total=hdr.subject.lastIndexOf('('); if(total>=0) { subject=hdr.subject.slice(total+1); total=subject.indexOf('/'); } if(total>=0) total=parseInt(subject.slice(total+1),10); if(total<part) { printf("!Failed to parse total parts from: %s\r\n",hdr.subject); return(false); } printf("Parsed total parts: %u\r\n",total); } /* Search database for existing file object */ var li; for(li=0; li<list.length; li++) if(list[li].name==fname && list[li].total==total && list[li].codec==codec && (size==undefined || list[li].size==size) && (crc32==undefined || parseInt(list[li].crc32,16)==crc32) ) { printf("%s found in database\r\n",fname.toString()); break; } obj=list[li]; var time_str = system.timestr(); var time_hex = format("%lx",time()); if(obj==undefined) { /* new entry */ printf("New parts database entry for: %s\r\n",fname.toString()); printf("total=%u, size=%u, crc32=%lx\r\n",total,size,crc32); obj = { name: fname, codec: codec, parts: 0, total: total }; obj.subject=hdr.subject; /* save first subject for additional UUE parts */ obj.from=hdr.from; /* yEnc file fields */ if(size!=undefined) obj.size=size; if(crc32!=undefined) obj.crc32=format("%lx",crc32); /* Timestamp */ obj.created=time_str; obj.created_time=time_hex } /* Timestamp */ obj.updated=time_str; obj.updated_time=time_hex; /* part message info */ prop=format("part%u.id",part); if(obj[prop]!=undefined) { printf("Part %u of %s already in database\r\n",part,fname.toString()); return(true); // pretend we added it } printf("Adding part %u of %s-encoded file to database:\r\n",part,codec.toUpperCase()); printf("File: %s\r\n",fname); obj[format("part%u.id",part)]=hdr.id; obj[format("part%u.sub",part)]=sub_code; obj[format("part%u.msg",part)]=hdr.number; obj[format("part%u.date",part)]=hdr.date; obj[format("part%u.added",part)]=time_str; obj[format("part%u.added_time",part)]=time_hex;// obj[format("part%u.from",part)]=hdr.from;// obj[format("part%u.subject",part)]=hdr.subject; /* These save us the hassle of parsing again later */ obj[format("part%u.first_line",part)]=first_line; obj[format("part%u.last_line",part)]=last_line; /* yEnc part fields */ if(begin!=undefined) obj[format("part%u.begin",part)]=begin; if(end!=undefined) obj[format("part%u.end",part)]=end; if(pcrc32!=undefined) obj[format("part%u.crc32",part)]=format("%lx",pcrc32); obj.parts++; list[li]=obj; printf("Part %u added (%u/%u parts in database)\r\n" ,part,obj.parts,obj.total); return(true);}
obj.crc32=format("%lx",crc32);
obj.crc32=format("%08lxh",crc32);
function add_part(list,sub_code,hdr ,fname,codec,part,total ,first_line,last_line ,begin,end,pcrc32,size,crc32){ if(part<1) { /* must parse from subject (yuck) */ part=hdr.subject.lastIndexOf('('); if(part>=0) part=parseInt(hdr.subject.slice(part+1),10); if(part<1) { printf("!Failed to parse part number from: %s\r\n",hdr.subject); return(false); } printf("Parsed part number: %u\r\n",part); } if(total==undefined || total<part) { /* must parse from subject (yuck) */ total=hdr.subject.lastIndexOf('('); if(total>=0) { subject=hdr.subject.slice(total+1); total=subject.indexOf('/'); } if(total>=0) total=parseInt(subject.slice(total+1),10); if(total<part) { printf("!Failed to parse total parts from: %s\r\n",hdr.subject); return(false); } printf("Parsed total parts: %u\r\n",total); } /* Search database for existing file object */ var li; for(li=0; li<list.length; li++) if(list[li].name==fname && list[li].total==total && list[li].codec==codec && (size==undefined || list[li].size==size) && (crc32==undefined || parseInt(list[li].crc32,16)==crc32) ) { printf("%s found in database\r\n",fname.toString()); break; } obj=list[li]; var time_str = system.timestr(); var time_hex = format("%lx",time()); if(obj==undefined) { /* new entry */ printf("New parts database entry for: %s\r\n",fname.toString()); printf("total=%u, size=%u, crc32=%lx\r\n",total,size,crc32); obj = { name: fname, codec: codec, parts: 0, total: total }; obj.subject=hdr.subject; /* save first subject for additional UUE parts */ obj.from=hdr.from; /* yEnc file fields */ if(size!=undefined) obj.size=size; if(crc32!=undefined) obj.crc32=format("%lx",crc32); /* Timestamp */ obj.created=time_str; obj.created_time=time_hex } /* Timestamp */ obj.updated=time_str; obj.updated_time=time_hex; /* part message info */ prop=format("part%u.id",part); if(obj[prop]!=undefined) { printf("Part %u of %s already in database\r\n",part,fname.toString()); return(true); // pretend we added it } printf("Adding part %u of %s-encoded file to database:\r\n",part,codec.toUpperCase()); printf("File: %s\r\n",fname); obj[format("part%u.id",part)]=hdr.id; obj[format("part%u.sub",part)]=sub_code; obj[format("part%u.msg",part)]=hdr.number; obj[format("part%u.date",part)]=hdr.date; obj[format("part%u.added",part)]=time_str; obj[format("part%u.added_time",part)]=time_hex;// obj[format("part%u.from",part)]=hdr.from;// obj[format("part%u.subject",part)]=hdr.subject; /* These save us the hassle of parsing again later */ obj[format("part%u.first_line",part)]=first_line; obj[format("part%u.last_line",part)]=last_line; /* yEnc part fields */ if(begin!=undefined) obj[format("part%u.begin",part)]=begin; if(end!=undefined) obj[format("part%u.end",part)]=end; if(pcrc32!=undefined) obj[format("part%u.crc32",part)]=format("%lx",pcrc32); obj.parts++; list[li]=obj; printf("Part %u added (%u/%u parts in database)\r\n" ,part,obj.parts,obj.total); return(true);}
obj[format("part%u.crc32",part)]=format("%lx",pcrc32);
obj[format("part%u.crc32",part)]=format("%08lxh",pcrc32);
function add_part(list,sub_code,hdr ,fname,codec,part,total ,first_line,last_line ,begin,end,pcrc32,size,crc32){ if(part<1) { /* must parse from subject (yuck) */ part=hdr.subject.lastIndexOf('('); if(part>=0) part=parseInt(hdr.subject.slice(part+1),10); if(part<1) { printf("!Failed to parse part number from: %s\r\n",hdr.subject); return(false); } printf("Parsed part number: %u\r\n",part); } if(total==undefined || total<part) { /* must parse from subject (yuck) */ total=hdr.subject.lastIndexOf('('); if(total>=0) { subject=hdr.subject.slice(total+1); total=subject.indexOf('/'); } if(total>=0) total=parseInt(subject.slice(total+1),10); if(total<part) { printf("!Failed to parse total parts from: %s\r\n",hdr.subject); return(false); } printf("Parsed total parts: %u\r\n",total); } /* Search database for existing file object */ var li; for(li=0; li<list.length; li++) if(list[li].name==fname && list[li].total==total && list[li].codec==codec && (size==undefined || list[li].size==size) && (crc32==undefined || parseInt(list[li].crc32,16)==crc32) ) { printf("%s found in database\r\n",fname.toString()); break; } obj=list[li]; var time_str = system.timestr(); var time_hex = format("%lx",time()); if(obj==undefined) { /* new entry */ printf("New parts database entry for: %s\r\n",fname.toString()); printf("total=%u, size=%u, crc32=%lx\r\n",total,size,crc32); obj = { name: fname, codec: codec, parts: 0, total: total }; obj.subject=hdr.subject; /* save first subject for additional UUE parts */ obj.from=hdr.from; /* yEnc file fields */ if(size!=undefined) obj.size=size; if(crc32!=undefined) obj.crc32=format("%lx",crc32); /* Timestamp */ obj.created=time_str; obj.created_time=time_hex } /* Timestamp */ obj.updated=time_str; obj.updated_time=time_hex; /* part message info */ prop=format("part%u.id",part); if(obj[prop]!=undefined) { printf("Part %u of %s already in database\r\n",part,fname.toString()); return(true); // pretend we added it } printf("Adding part %u of %s-encoded file to database:\r\n",part,codec.toUpperCase()); printf("File: %s\r\n",fname); obj[format("part%u.id",part)]=hdr.id; obj[format("part%u.sub",part)]=sub_code; obj[format("part%u.msg",part)]=hdr.number; obj[format("part%u.date",part)]=hdr.date; obj[format("part%u.added",part)]=time_str; obj[format("part%u.added_time",part)]=time_hex;// obj[format("part%u.from",part)]=hdr.from;// obj[format("part%u.subject",part)]=hdr.subject; /* These save us the hassle of parsing again later */ obj[format("part%u.first_line",part)]=first_line; obj[format("part%u.last_line",part)]=last_line; /* yEnc part fields */ if(begin!=undefined) obj[format("part%u.begin",part)]=begin; if(end!=undefined) obj[format("part%u.end",part)]=end; if(pcrc32!=undefined) obj[format("part%u.crc32",part)]=format("%lx",pcrc32); obj.parts++; list[li]=obj; printf("Part %u added (%u/%u parts in database)\r\n" ,part,obj.parts,obj.total); return(true);}
parts_list_modified=true;
function add_part(list,sub_code,hdr ,fname,codec,part,total ,first_line,last_line ,begin,end,pcrc32,size,crc32){ if(part<1) { /* must parse from subject (yuck) */ part=hdr.subject.lastIndexOf('('); if(part>=0) part=parseInt(hdr.subject.slice(part+1),10); if(part<1) { printf("!Failed to parse part number from: %s\r\n",hdr.subject); return(false); } printf("Parsed part number: %u\r\n",part); } if(total==undefined || total<part) { /* must parse from subject (yuck) */ total=hdr.subject.lastIndexOf('('); if(total>=0) { subject=hdr.subject.slice(total+1); total=subject.indexOf('/'); } if(total>=0) total=parseInt(subject.slice(total+1),10); if(total<part) { printf("!Failed to parse total parts from: %s\r\n",hdr.subject); return(false); } printf("Parsed total parts: %u\r\n",total); } /* Search database for existing file object */ var li; for(li=0; li<list.length; li++) if(list[li].name==fname && list[li].total==total && list[li].codec==codec && (size==undefined || list[li].size==size) && (crc32==undefined || parseInt(list[li].crc32,16)==crc32) ) { printf("%s found in database\r\n",fname.toString()); break; } obj=list[li]; var time_str = system.timestr(); var time_hex = format("%lx",time()); if(obj==undefined) { /* new entry */ printf("New parts database entry for: %s\r\n",fname.toString()); printf("total=%u, size=%u, crc32=%lx\r\n",total,size,crc32); obj = { name: fname, codec: codec, parts: 0, total: total }; obj.subject=hdr.subject; /* save first subject for additional UUE parts */ obj.from=hdr.from; /* yEnc file fields */ if(size!=undefined) obj.size=size; if(crc32!=undefined) obj.crc32=format("%lx",crc32); /* Timestamp */ obj.created=time_str; obj.created_time=time_hex } /* Timestamp */ obj.updated=time_str; obj.updated_time=time_hex; /* part message info */ prop=format("part%u.id",part); if(obj[prop]!=undefined) { printf("Part %u of %s already in database\r\n",part,fname.toString()); return(true); // pretend we added it } printf("Adding part %u of %s-encoded file to database:\r\n",part,codec.toUpperCase()); printf("File: %s\r\n",fname); obj[format("part%u.id",part)]=hdr.id; obj[format("part%u.sub",part)]=sub_code; obj[format("part%u.msg",part)]=hdr.number; obj[format("part%u.date",part)]=hdr.date; obj[format("part%u.added",part)]=time_str; obj[format("part%u.added_time",part)]=time_hex;// obj[format("part%u.from",part)]=hdr.from;// obj[format("part%u.subject",part)]=hdr.subject; /* These save us the hassle of parsing again later */ obj[format("part%u.first_line",part)]=first_line; obj[format("part%u.last_line",part)]=last_line; /* yEnc part fields */ if(begin!=undefined) obj[format("part%u.begin",part)]=begin; if(end!=undefined) obj[format("part%u.end",part)]=end; if(pcrc32!=undefined) obj[format("part%u.crc32",part)]=format("%lx",pcrc32); obj.parts++; list[li]=obj; printf("Part %u added (%u/%u parts in database)\r\n" ,part,obj.parts,obj.total); return(true);}
if(pcrc32!=undefined) obj[format("part%u.crc32",part)]=format("%08lxh",pcrc32);
function add_part(list,sub_code,hdr ,fname,codec,part,total ,first_line,last_line ,begin,end,pcrc32,size,crc32){ if(part<1) { /* must parse from subject (yuck) */ part=hdr.subject.lastIndexOf('('); if(part>=0) part=parseInt(hdr.subject.slice(part+1),10); if(part<1) { printf("!Failed to parse part number from: %s\r\n",hdr.subject); return(false); } printf("Parsed part number: %u\r\n",part); } if(total==undefined || total<part) { /* must parse from subject (yuck) */ total=hdr.subject.lastIndexOf('('); if(total>=0) { subject=hdr.subject.slice(total+1); total=subject.indexOf('/'); } if(total>=0) total=parseInt(subject.slice(total+1),10); if(total<part) { printf("!Failed to parse total parts from: %s\r\n",hdr.subject); return(false); } printf("Parsed total parts: %u\r\n",total); } /* Search database for existing file object */ var li; for(li=0; li<list.length; li++) if(list[li].name==fname && list[li].total==total && list[li].codec==codec && (size==undefined || list[li].size==size) && (crc32==undefined || parseInt(list[li].crc32,16)==crc32) ) { printf("%s found in database\r\n",fname.toString()); break; } obj=list[li]; var time_str = system.timestr(); var time_hex = format("%08lxh",time()); if(obj==undefined) { /* new entry */ printf("New parts database entry for: %s\r\n",fname.toString()); printf("total=%u, size=%u, crc32=%08lx\r\n",total,size,crc32); obj = { name: fname, codec: codec, parts: 0, total: total }; obj.subject=hdr.subject; /* save first subject for additional UUE parts */ obj.from=hdr.from; /* yEnc file fields */ if(size!=undefined) obj.size=size; if(crc32!=undefined) obj.crc32=format("%08lxh",crc32); /* Timestamp */ obj.created=time_str; obj.created_time=time_hex } /* Timestamp */ obj.updated=time_str; obj.updated_time=time_hex; /* part message info */ prop=format("part%u.id",part); if(obj[prop]!=undefined) { printf("Part %u of %s already in database\r\n",part,fname.toString()); return(true); // pretend we added it } printf("Adding part %u of %s-encoded file to database:\r\n",part,codec.toUpperCase()); printf("File: %s\r\n",fname); obj[format("part%u.id",part)]=hdr.id; obj[format("part%u.sub",part)]=sub_code; obj[format("part%u.msg",part)]=hdr.number; obj[format("part%u.date",part)]=hdr.date; obj[format("part%u.added",part)]=time_str; obj[format("part%u.added_time",part)]=time_hex;// obj[format("part%u.from",part)]=hdr.from;// obj[format("part%u.subject",part)]=hdr.subject; /* These save us the hassle of parsing again later */ obj[format("part%u.first_line",part)]=first_line; obj[format("part%u.last_line",part)]=last_line; /* yEnc part fields */ if(begin!=undefined) obj[format("part%u.begin",part)]=begin; if(end!=undefined) obj[format("part%u.end",part)]=end; if(pcrc32!=undefined) obj[format("part%u.crc32",part)]=format("%08lxh",pcrc32); obj.parts++; list[li]=obj; parts_list_modified=true; printf("Part %u added (%u/%u parts in database)\r\n" ,part,obj.parts,obj.total); return(true);}
flags = "CFLAGS_" + target.toUpperCase();
flags = "CFLAGS_" + target.toUpperCase() + '_OBJ';
function ADD_SOURCES(dir, file_list, target){ var i; var tv; var src, obj, sym, flags; if (target == null) { target = "php"; } sym = target.toUpperCase() + "_GLOBAL_OBJS"; flags = "CFLAGS_" + target.toUpperCase(); if (configure_subst.Exists(sym)) { tv = configure_subst.Item(sym); } else { tv = ""; } file_list = file_list.split(new RegExp("\\s+")); file_list.sort(); var re = new RegExp("\.[a-z0-9A-Z]+$"); dir = dir.replace(new RegExp("/", "g"), "\\"); var objs_line = ""; var srcs_line = ""; var sub_build = "$(BUILD_DIR)\\"; if (target != "php") { build_dirs[build_dirs.length] = target; sub_build += target + "\\"; } DEFINE("CFLAGS_BD_" + target.toUpperCase(), "/Fo" + sub_build + " /Fd" + sub_build + " /Fp" + sub_build + " /FR" + sub_build + " "); for (i in file_list) { src = file_list[i]; obj = src.replace(re, ".obj"); tv += " " + sub_build + obj; if (PHP_ONE_SHOT == "yes") { if (i > 0) { objs_line += " " + sub_build + obj; srcs_line += " " + dir + "\\" + src; } else { objs_line = sub_build + obj; srcs_line = dir + "\\" + src; } } else { MFO.WriteLine(sub_build + obj + ": " + dir + "\\" + src); MFO.WriteLine("\t$(CC) $(CFLAGS) $(" + flags + ") $(CFLAGS_BD_" + target.toUpperCase() + ") -c " + dir + "\\" + src + " -o " + sub_build + obj); } } if (PHP_ONE_SHOT == "yes") { MFO.WriteLine(objs_line + ": " + srcs_line); MFO.WriteLine("\t$(CC) $(CFLAGS) $(" + flags + ") $(CFLAGS_BD_" + target.toUpperCase() + ") -c " + srcs_line); } DEFINE(sym, tv);}
MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") -c " + srcs_line);
MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) /Fo" + sub_build + " $(" + bd_flags_name + ") /c " + srcs_line);
function ADD_SOURCES(dir, file_list, target){ var i; var tv; var src, obj, sym, flags; if (target == null) { target = "php"; } sym = target.toUpperCase() + "_GLOBAL_OBJS"; flags = "CFLAGS_" + target.toUpperCase() + '_OBJ'; if (configure_subst.Exists(sym)) { tv = configure_subst.Item(sym); } else { tv = ""; } file_list = file_list.split(new RegExp("\\s+")); file_list.sort(); var re = new RegExp("\.[a-z0-9A-Z]+$"); dir = dir.replace(new RegExp("/", "g"), "\\"); var objs_line = ""; var srcs_line = ""; var sub_build = "$(BUILD_DIR)\\"; /* if module dir is not a child of the main source dir, * we need to tweak it; we should have detected such a * case in condense_path and rewritten the path to * be relative. * This probably breaks for non-sibling dirs, but that * is not a problem as buildconf only checks for pecl * as either a child or a sibling */ var build_dir = dir.replace(new RegExp("^..\\\\"), ""); var mangle_dir = build_dir.replace(new RegExp("[\\\\/.]", "g"), "_"); var bd_flags_name = "CFLAGS_BD_" + mangle_dir.toUpperCase(); var dirs = build_dir.split("\\"); var i, d = ""; for (i = 0; i < dirs.length; i++) { d += dirs[i]; build_dirs[build_dirs.length] = d; d += "\\"; } sub_build += d; DEFINE(bd_flags_name, " /Fd" + sub_build + " /Fp" + sub_build + " /FR" + sub_build + " "); for (i in file_list) { src = file_list[i]; obj = src.replace(re, ".obj"); tv += " " + sub_build + obj; if (PHP_ONE_SHOT == "yes") { if (i > 0) { objs_line += " " + sub_build + obj; srcs_line += " " + dir + "\\" + src; } else { objs_line = sub_build + obj; srcs_line = dir + "\\" + src; } } else { MFO.WriteLine(sub_build + obj + ": " + dir + "\\" + src); MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " /Fo" + sub_build + obj); } } if (PHP_ONE_SHOT == "yes") { MFO.WriteLine(objs_line + ": " + srcs_line); MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") -c " + srcs_line); } DEFINE(sym, tv);}
"page-title" : "Add User: Profile",
"page-title" : "Add User",
function add_user(ldap) { resolve(); try { var userId = ""; var ldapId = null; if (ldap) { ldapId = ""; } var email = ""; var fullName = ""; var description = ""; var messages = new Packages.java.util.ArrayList(); var password = ""; var confirmPassword = ""; var userManager = getAccreditableManager().getUserManager(); while (true) { cocoon.sendPageAndWait("users/profile.xml", { "page-title" : "Add User: Profile", "user-id" : userId, "fullname" : fullName, "email" : email, "description" : description, "messages" : messages, "ldap-id" : ldapId, "password" : password, "confirm-password" : confirmPassword, "new-user" : true, "ldap" : ldap }); if (cocoon.request.get("cancel")) { break; } userId = cocoon.request.get("userid"); email = cocoon.request.get("email"); fullName = cocoon.request.get("fullname"); description = cocoon.request.get("description"); ldapId = cocoon.request.get("ldapid"); password = cocoon.request.get("new-password"); confirmPassword = cocoon.request.get("confirm-password"); var configDir = userManager.getConfigurationDirectory(); messages = validate(userManager, ldap, userId, email, password, confirmPassword, ldapId, configDir); if (messages.isEmpty()) { var user; if (ldap) { user = new Packages.org.apache.lenya.ac.ldap.LDAPUser(configDir, userId, email, ldapId); } else { user = new Packages.org.apache.lenya.ac.file.FileUser(configDir, userId, fullName, email, ""); user.setName(fullName); user.setPassword(password); } user.setDescription(description); user.save(); userManager.add(user); break; } } cocoon.sendPage("redirect.html", { "url" : "../users.html" }); } finally { release(); }}
if (hasStyleClass(row, "breakpoint")) {
if (row.hasStyleClass("breakpoint")) {
function addBreakPoint(event){ var row = event.target.parentNode; var file = files[currentFile]; var lineNum = parseInt(event.target.title); if (hasStyleClass(row, "breakpoint")) { if(event.altKey && file.breakpoints[lineNum] != null) showBreakpointEditor(file, lineNum); else toggleBreakpoint(row, file, lineNum); } else createBreakpoint(row, file, lineNum);}
if (hasStyleClass(row, "disabled")) { removeStyleClass(row, "disabled"); files[currentFile].breakpoints[parseInt(event.target.title)] = 1; } else { addStyleClass(row, "disabled"); files[currentFile].breakpoints[parseInt(event.target.title)] = -1; } } else { addStyleClass(row, "breakpoint"); removeStyleClass(row, "disabled"); files[currentFile].breakpoints[parseInt(event.target.title)] = 1; }
if(event.altKey && file.breakpoints[lineNum] != null) showBreakpointEditor(file, lineNum); else toggleBreakpoint(row, file, lineNum); } else createBreakpoint(row, file, lineNum);
function addBreakPoint(event){ var row = event.target.parentNode; if (hasStyleClass(row, "breakpoint")) { if (hasStyleClass(row, "disabled")) { removeStyleClass(row, "disabled"); files[currentFile].breakpoints[parseInt(event.target.title)] = 1; } else { addStyleClass(row, "disabled"); files[currentFile].breakpoints[parseInt(event.target.title)] = -1; } } else { addStyleClass(row, "breakpoint"); removeStyleClass(row, "disabled"); files[currentFile].breakpoints[parseInt(event.target.title)] = 1; }}
Element.setStyle(this.trElement, {"cursor" : "pointer"}); this.trElement.onclick = function() {
elementSetStyle(this.trElement, {"cursor" : "pointer"}); this.trElement.onclick = fnBindAsEventListener(function() {
addBreakpointSupport: function() { Element.setStyle(this.trElement, {"cursor" : "pointer"}); this.trElement.onclick = function() { this.onClick(); }.bindAsEventListener(this); },
}.bindAsEventListener(this);
}, this);
addBreakpointSupport: function() { Element.setStyle(this.trElement, {"cursor" : "pointer"}); this.trElement.onclick = function() { this.onClick(); }.bindAsEventListener(this); },
function addBreakpointSupport() { var testDocument = getIframeDocument(getTestFrame());
function addBreakpointSupport(testDocument) {
function addBreakpointSupport() { var testDocument = getIframeDocument(getTestFrame()); var tables = testDocument.getElementsByTagName("table"); for (var i = 0; i < tables.length; i++) { var rows = tables[i].rows; for (var j = 0; j < rows.length; j++) { if (isCommandRow(rows[j])) { Element.setStyle(rows[j], {"cursor" : "pointer"}); Event.observe(rows[j], 'click', getBreakpointEventHandler(rows[j]), false); } } }}
var candidateRows = tables[i].rows; for (var j = 1; j < candidateRows.length; j++) { Element.setStyle(candidateRows[j], {"cursor" : "pointer"}); Event.observe(candidateRows[j], 'click', getBreakpointEventHandler(candidateRows[j]), false);
var rows = tables[i].rows; for (var j = 0; j < rows.length; j++) { if (isCommandRow(rows[j])) { Element.setStyle(rows[j], {"cursor" : "pointer"}); Event.observe(rows[j], 'click', getBreakpointEventHandler(rows[j]), false); }
function addBreakpointSupport() { var testDocument = getIframeDocument(getTestFrame()); var tables = testDocument.getElementsByTagName("table"); for (var i = 0; i < tables.length; i++) { var candidateRows = tables[i].rows; for (var j = 1; j < candidateRows.length; j++) { Element.setStyle(candidateRows[j], {"cursor" : "pointer"}); Event.observe(candidateRows[j], 'click', getBreakpointEventHandler(candidateRows[j]), false); } }}
cal_box.style.left = findPosX(cal_link) + 17 + 'px';
if (getStyle(document.body,'direction')!='rtl') { cal_box.style.left = findPosX(cal_link) + 17 + 'px'; } else { cal_box.style.left = findPosX(cal_link) - 180 + 'px'; }
addCalendar: function(inp) { var num = DateTimeShortcuts.calendars.length; DateTimeShortcuts.calendarInputs[num] = inp; // Shortcut links (calendar icon and "Today" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var today_link = document.createElement('a'); today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); today_link.appendChild(document.createTextNode(gettext('Today'))); var cal_link = document.createElement('a'); cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');'); quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_calendar.gif', 'alt', gettext('Calendar')); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(today_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(cal_link); // Create calendarbox div. // // Markup looks like: // // <div id="calendarbox3" class="calendarbox module"> // <h2> // <a href="#" class="link-previous">&lsaquo;</a> // <a href="#" class="link-next">&rsaquo;</a> February 2003 // </h2> // <div class="calendar" id="calendarin3"> // <!-- (cal) --> // </div> // <div class="calendar-shortcuts"> // <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a> // </div> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var cal_box = document.createElement('div'); cal_box.style.display = 'none'; cal_box.style.position = 'absolute'; cal_box.style.left = findPosX(cal_link) + 17 + 'px'; cal_box.style.top = findPosY(cal_link) - 75 + 'px'; cal_box.className = 'calendarbox module'; cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num); document.body.appendChild(cal_box); addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation); // next-prev links var cal_nav = quickElement('div', cal_box, ''); var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); cal_nav_prev.className = 'calendarnav-previous'; var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); cal_nav_next.className = 'calendarnav-next'; cal_box.appendChild(cal_nav); // main box var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num); cal_main.className = 'calendar'; DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num)); DateTimeShortcuts.calendars[num].drawCurrent(); // calendar shortcuts var shortcuts = quickElement('div', cal_box, ''); shortcuts.className = 'calendar-shortcuts'; quickElement('a', shortcuts, gettext('Yesterday'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, gettext('Today'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, gettext('Tomorrow'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);'); // cancel bar var cancel_p = quickElement('p', cal_box, ''); cancel_p.className = 'calendar-cancel'; quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');'); },
cal_box.appendChild(cal_nav);
addCalendar: function(inp) { var num = DateTimeShortcuts.calendars.length; DateTimeShortcuts.calendarInputs[num] = inp; // Shortcut links (calendar icon and "Today" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var today_link = document.createElement('a'); today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); today_link.appendChild(document.createTextNode(gettext('Today'))); var cal_link = document.createElement('a'); cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');'); cal_link.id = DateTimeShortcuts.calendarLinkName + num; quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_calendar.gif', 'alt', gettext('Calendar')); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(today_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(cal_link); // Create calendarbox div. // // Markup looks like: // // <div id="calendarbox3" class="calendarbox module"> // <h2> // <a href="#" class="link-previous">&lsaquo;</a> // <a href="#" class="link-next">&rsaquo;</a> February 2003 // </h2> // <div class="calendar" id="calendarin3"> // <!-- (cal) --> // </div> // <div class="calendar-shortcuts"> // <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a> // </div> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var cal_box = document.createElement('div'); cal_box.style.display = 'none'; cal_box.style.position = 'absolute'; cal_box.className = 'calendarbox module'; cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num); document.body.appendChild(cal_box); addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation); // next-prev links var cal_nav = quickElement('div', cal_box, ''); var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); cal_nav_prev.className = 'calendarnav-previous'; var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); cal_nav_next.className = 'calendarnav-next'; cal_box.appendChild(cal_nav); // main box var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num); cal_main.className = 'calendar'; DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num)); DateTimeShortcuts.calendars[num].drawCurrent(); // calendar shortcuts var shortcuts = quickElement('div', cal_box, ''); shortcuts.className = 'calendar-shortcuts'; quickElement('a', shortcuts, gettext('Yesterday'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, gettext('Today'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, gettext('Tomorrow'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);'); // cancel bar var cancel_p = quickElement('p', cal_box, ''); cancel_p.className = 'calendar-cancel'; quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');'); },
quickElement('a', cal_nav, '<', 'class', 'calendarnav-previous', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); quickElement('a', cal_nav, '>', 'class', 'calendarnav-next', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); cal_nav_prev.className = 'calendarnav-previous'; var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); cal_nav_next.className = 'calendarnav-next';
addCalendar: function(inp) { var num = DateTimeShortcuts.calendars.length; DateTimeShortcuts.calendarInputs[num] = inp; // Shortcut links (calendar icon and "Today" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var today_link = document.createElement('a'); today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); today_link.appendChild(document.createTextNode('Today')); var cal_link = document.createElement('a'); cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');'); quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_calendar.gif', 'alt', 'Calendar'); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(today_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(cal_link); // Create calendarbox div. // // Markup looks like: // // <div id="calendarbox3" class="calendarbox module"> // <h2> // <a href="#" class="link-previous">&lsaquo;</a> // <a href="#" class="link-next">&rsaquo;</a> February 2003 // </h2> // <div class="calendar" id="calendarin3"> // <!-- (cal) --> // </div> // <div class="calendar-shortcuts"> // <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a> // </div> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var cal_box = document.createElement('div'); cal_box.style.display = 'none'; cal_box.style.position = 'absolute'; cal_box.style.left = findPosX(cal_link) + 17 + 'px'; cal_box.style.top = findPosY(cal_link) - 75 + 'px'; cal_box.className = 'calendarbox module'; cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num); document.body.appendChild(cal_box); addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation); // next-prev links var cal_nav = quickElement('div', cal_box, ''); quickElement('a', cal_nav, '<', 'class', 'calendarnav-previous', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); quickElement('a', cal_nav, '>', 'class', 'calendarnav-next', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); cal_box.appendChild(cal_nav); // main box var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num); cal_main.className = 'calendar'; DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num)); DateTimeShortcuts.calendars[num].drawCurrent(); // calendar shortcuts var shortcuts = quickElement('div', cal_box, '', 'class', 'calendar-shortcuts'); quickElement('a', shortcuts, 'Yesterday', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, 'Today', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, 'Tomorrow', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);'); // cancel bar var cancel_p = quickElement('p', cal_box, '', 'class', 'calendar-cancel'); quickElement('a', cancel_p, 'Cancel', 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');'); },
var shortcuts = quickElement('div', cal_box, '', 'class', 'calendar-shortcuts');
var shortcuts = quickElement('div', cal_box, ''); shortcuts.className = 'calendar-shortcuts';
addCalendar: function(inp) { var num = DateTimeShortcuts.calendars.length; DateTimeShortcuts.calendarInputs[num] = inp; // Shortcut links (calendar icon and "Today" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var today_link = document.createElement('a'); today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); today_link.appendChild(document.createTextNode('Today')); var cal_link = document.createElement('a'); cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');'); quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_calendar.gif', 'alt', 'Calendar'); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(today_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(cal_link); // Create calendarbox div. // // Markup looks like: // // <div id="calendarbox3" class="calendarbox module"> // <h2> // <a href="#" class="link-previous">&lsaquo;</a> // <a href="#" class="link-next">&rsaquo;</a> February 2003 // </h2> // <div class="calendar" id="calendarin3"> // <!-- (cal) --> // </div> // <div class="calendar-shortcuts"> // <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a> // </div> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var cal_box = document.createElement('div'); cal_box.style.display = 'none'; cal_box.style.position = 'absolute'; cal_box.style.left = findPosX(cal_link) + 17 + 'px'; cal_box.style.top = findPosY(cal_link) - 75 + 'px'; cal_box.className = 'calendarbox module'; cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num); document.body.appendChild(cal_box); addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation); // next-prev links var cal_nav = quickElement('div', cal_box, ''); quickElement('a', cal_nav, '<', 'class', 'calendarnav-previous', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); quickElement('a', cal_nav, '>', 'class', 'calendarnav-next', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); cal_box.appendChild(cal_nav); // main box var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num); cal_main.className = 'calendar'; DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num)); DateTimeShortcuts.calendars[num].drawCurrent(); // calendar shortcuts var shortcuts = quickElement('div', cal_box, '', 'class', 'calendar-shortcuts'); quickElement('a', shortcuts, 'Yesterday', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, 'Today', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, 'Tomorrow', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);'); // cancel bar var cancel_p = quickElement('p', cal_box, '', 'class', 'calendar-cancel'); quickElement('a', cancel_p, 'Cancel', 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');'); },
var cancel_p = quickElement('p', cal_box, '', 'class', 'calendar-cancel');
var cancel_p = quickElement('p', cal_box, ''); cancel_p.className = 'calendar-cancel';
addCalendar: function(inp) { var num = DateTimeShortcuts.calendars.length; DateTimeShortcuts.calendarInputs[num] = inp; // Shortcut links (calendar icon and "Today" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var today_link = document.createElement('a'); today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); today_link.appendChild(document.createTextNode('Today')); var cal_link = document.createElement('a'); cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');'); quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_calendar.gif', 'alt', 'Calendar'); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(today_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(cal_link); // Create calendarbox div. // // Markup looks like: // // <div id="calendarbox3" class="calendarbox module"> // <h2> // <a href="#" class="link-previous">&lsaquo;</a> // <a href="#" class="link-next">&rsaquo;</a> February 2003 // </h2> // <div class="calendar" id="calendarin3"> // <!-- (cal) --> // </div> // <div class="calendar-shortcuts"> // <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a> // </div> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var cal_box = document.createElement('div'); cal_box.style.display = 'none'; cal_box.style.position = 'absolute'; cal_box.style.left = findPosX(cal_link) + 17 + 'px'; cal_box.style.top = findPosY(cal_link) - 75 + 'px'; cal_box.className = 'calendarbox module'; cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num); document.body.appendChild(cal_box); addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation); // next-prev links var cal_nav = quickElement('div', cal_box, ''); quickElement('a', cal_nav, '<', 'class', 'calendarnav-previous', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');'); quickElement('a', cal_nav, '>', 'class', 'calendarnav-next', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); cal_box.appendChild(cal_nav); // main box var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num); cal_main.className = 'calendar'; DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num)); DateTimeShortcuts.calendars[num].drawCurrent(); // calendar shortcuts var shortcuts = quickElement('div', cal_box, '', 'class', 'calendar-shortcuts'); quickElement('a', shortcuts, 'Yesterday', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, 'Today', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); shortcuts.appendChild(document.createTextNode('\240|\240')); quickElement('a', shortcuts, 'Tomorrow', 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);'); // cancel bar var cancel_p = quickElement('p', cal_box, '', 'class', 'calendar-cancel'); quickElement('a', cancel_p, 'Cancel', 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');'); },
element = $(element); Element.removeClassName(element, className); element.className += ' ' + className;
if (!(element = $(element))) return; return Element.classNames(element).add(className);
addClassName: function(element, className) { element = $(element); Element.removeClassName(element, className); element.className += ' ' + className; },
clock_box.style.left = findPosX(clock_link) + 17 + 'px';
if (getStyle(document.body,'direction')!='rtl') { clock_box.style.left = findPosX(clock_link) + 17 + 'px'; } else { clock_box.style.left = findPosX(clock_link) - 110 + 'px'; }
addClock: function(inp) { var num = DateTimeShortcuts.clockInputs.length; DateTimeShortcuts.clockInputs[num] = inp; // Shortcut links (clock icon and "Now" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var now_link = document.createElement('a'); now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());"); now_link.appendChild(document.createTextNode(gettext('Now'))); var clock_link = document.createElement('a'); clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');'); quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_clock.gif', 'alt', gettext('Clock')); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(now_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(clock_link); // Create clock link div // // Markup looks like: // <div id="clockbox1" class="clockbox module"> // <h2>Choose a time</h2> // <ul class="timelist"> // <li><a href="#">Now</a></li> // <li><a href="#">Midnight</a></li> // <li><a href="#">6 a.m.</a></li> // <li><a href="#">Noon</a></li> // </ul> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var clock_box = document.createElement('div'); clock_box.style.display = 'none'; clock_box.style.position = 'absolute'; clock_box.style.left = findPosX(clock_link) + 17 + 'px'; clock_box.style.top = findPosY(clock_link) - 30 + 'px'; clock_box.className = 'clockbox module'; clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num); document.body.appendChild(clock_box); addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation); quickElement('h2', clock_box, gettext('Choose a time')); time_list = quickElement('ul', clock_box, ''); time_list.className = 'timelist'; quickElement("a", quickElement("li", time_list, ""), gettext("Now"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());") quickElement("a", quickElement("li", time_list, ""), gettext("Midnight"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00');") quickElement("a", quickElement("li", time_list, ""), gettext("6 a.m."), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00');") quickElement("a", quickElement("li", time_list, ""), gettext("Noon"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00');") cancel_p = quickElement('p', clock_box, ''); cancel_p.className = 'calendar-cancel'; quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');'); },
time_list = quickElement('ul', clock_box, '', 'class', 'timelist');
time_list = quickElement('ul', clock_box, ''); time_list.className = 'timelist';
addClock: function(inp) { var num = DateTimeShortcuts.clockInputs.length; DateTimeShortcuts.clockInputs[num] = inp; // Shortcut links (clock icon and "Now" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var now_link = document.createElement('a'); now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());"); now_link.appendChild(document.createTextNode('Now')); var clock_link = document.createElement('a'); clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');'); quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_clock.gif', 'alt', 'Clock'); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(now_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(clock_link); // Create clock link div // // Markup looks like: // <div id="clockbox1" class="clockbox module"> // <h2>Choose a time</h2> // <ul class="timelist"> // <li><a href="#">Now</a></li> // <li><a href="#">Midnight</a></li> // <li><a href="#">6 a.m.</a></li> // <li><a href="#">Noon</a></li> // </ul> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var clock_box = document.createElement('div'); clock_box.style.display = 'none'; clock_box.style.position = 'absolute'; clock_box.style.left = findPosX(clock_link) + 17 + 'px'; clock_box.style.top = findPosY(clock_link) - 30 + 'px'; clock_box.className = 'clockbox module'; clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num); document.body.appendChild(clock_box); addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation); quickElement('h2', clock_box, 'Choose a time'); time_list = quickElement('ul', clock_box, '', 'class', 'timelist'); quickElement("a", quickElement("li", time_list, ""), "Now", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());") quickElement("a", quickElement("li", time_list, ""), "Midnight", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00');") quickElement("a", quickElement("li", time_list, ""), "6 a.m.", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00');") quickElement("a", quickElement("li", time_list, ""), "Noon", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00');") cancel_p = quickElement('p', clock_box, '', 'class', 'calendar-cancel'); quickElement('a', cancel_p, 'Cancel', 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');'); },
cancel_p = quickElement('p', clock_box, '', 'class', 'calendar-cancel');
cancel_p = quickElement('p', clock_box, ''); cancel_p.className = 'calendar-cancel';
addClock: function(inp) { var num = DateTimeShortcuts.clockInputs.length; DateTimeShortcuts.clockInputs[num] = inp; // Shortcut links (clock icon and "Now" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var now_link = document.createElement('a'); now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());"); now_link.appendChild(document.createTextNode('Now')); var clock_link = document.createElement('a'); clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');'); quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_clock.gif', 'alt', 'Clock'); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(now_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(clock_link); // Create clock link div // // Markup looks like: // <div id="clockbox1" class="clockbox module"> // <h2>Choose a time</h2> // <ul class="timelist"> // <li><a href="#">Now</a></li> // <li><a href="#">Midnight</a></li> // <li><a href="#">6 a.m.</a></li> // <li><a href="#">Noon</a></li> // </ul> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var clock_box = document.createElement('div'); clock_box.style.display = 'none'; clock_box.style.position = 'absolute'; clock_box.style.left = findPosX(clock_link) + 17 + 'px'; clock_box.style.top = findPosY(clock_link) - 30 + 'px'; clock_box.className = 'clockbox module'; clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num); document.body.appendChild(clock_box); addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation); quickElement('h2', clock_box, 'Choose a time'); time_list = quickElement('ul', clock_box, '', 'class', 'timelist'); quickElement("a", quickElement("li", time_list, ""), "Now", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());") quickElement("a", quickElement("li", time_list, ""), "Midnight", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00');") quickElement("a", quickElement("li", time_list, ""), "6 a.m.", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00');") quickElement("a", quickElement("li", time_list, ""), "Noon", "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00');") cancel_p = quickElement('p', clock_box, '', 'class', 'calendar-cancel'); quickElement('a', cancel_p, 'Cancel', 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');'); },
now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());");
now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinuteSecond());");
addClock: function(inp) { var num = DateTimeShortcuts.clockInputs.length; DateTimeShortcuts.clockInputs[num] = inp; // Shortcut links (clock icon and "Now" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var now_link = document.createElement('a'); now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());"); now_link.appendChild(document.createTextNode(gettext('Now'))); var clock_link = document.createElement('a'); clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');'); clock_link.id = DateTimeShortcuts.clockLinkName + num; quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_clock.gif', 'alt', gettext('Clock')); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(now_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(clock_link); // Create clock link div // // Markup looks like: // <div id="clockbox1" class="clockbox module"> // <h2>Choose a time</h2> // <ul class="timelist"> // <li><a href="#">Now</a></li> // <li><a href="#">Midnight</a></li> // <li><a href="#">6 a.m.</a></li> // <li><a href="#">Noon</a></li> // </ul> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var clock_box = document.createElement('div'); clock_box.style.display = 'none'; clock_box.style.position = 'absolute'; clock_box.className = 'clockbox module'; clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num); document.body.appendChild(clock_box); addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation); quickElement('h2', clock_box, gettext('Choose a time')); time_list = quickElement('ul', clock_box, ''); time_list.className = 'timelist'; quickElement("a", quickElement("li", time_list, ""), gettext("Now"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());") quickElement("a", quickElement("li", time_list, ""), gettext("Midnight"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00');") quickElement("a", quickElement("li", time_list, ""), gettext("6 a.m."), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00');") quickElement("a", quickElement("li", time_list, ""), gettext("Noon"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00');") cancel_p = quickElement('p', clock_box, ''); cancel_p.className = 'calendar-cancel'; quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');'); },
quickElement("a", quickElement("li", time_list, ""), gettext("Now"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());") quickElement("a", quickElement("li", time_list, ""), gettext("Midnight"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00');") quickElement("a", quickElement("li", time_list, ""), gettext("6 a.m."), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00');") quickElement("a", quickElement("li", time_list, ""), gettext("Noon"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00');")
quickElement("a", quickElement("li", time_list, ""), gettext("Now"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinuteSecond());") quickElement("a", quickElement("li", time_list, ""), gettext("Midnight"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00:00');") quickElement("a", quickElement("li", time_list, ""), gettext("6 a.m."), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00:00');") quickElement("a", quickElement("li", time_list, ""), gettext("Noon"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00:00');")
addClock: function(inp) { var num = DateTimeShortcuts.clockInputs.length; DateTimeShortcuts.clockInputs[num] = inp; // Shortcut links (clock icon and "Now" link) var shortcuts_span = document.createElement('span'); inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling); var now_link = document.createElement('a'); now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());"); now_link.appendChild(document.createTextNode(gettext('Now'))); var clock_link = document.createElement('a'); clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');'); clock_link.id = DateTimeShortcuts.clockLinkName + num; quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_clock.gif', 'alt', gettext('Clock')); shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(now_link); shortcuts_span.appendChild(document.createTextNode('\240|\240')); shortcuts_span.appendChild(clock_link); // Create clock link div // // Markup looks like: // <div id="clockbox1" class="clockbox module"> // <h2>Choose a time</h2> // <ul class="timelist"> // <li><a href="#">Now</a></li> // <li><a href="#">Midnight</a></li> // <li><a href="#">6 a.m.</a></li> // <li><a href="#">Noon</a></li> // </ul> // <p class="calendar-cancel"><a href="#">Cancel</a></p> // </div> var clock_box = document.createElement('div'); clock_box.style.display = 'none'; clock_box.style.position = 'absolute'; clock_box.className = 'clockbox module'; clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num); document.body.appendChild(clock_box); addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation); quickElement('h2', clock_box, gettext('Choose a time')); time_list = quickElement('ul', clock_box, ''); time_list.className = 'timelist'; quickElement("a", quickElement("li", time_list, ""), gettext("Now"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().getHourMinute());") quickElement("a", quickElement("li", time_list, ""), gettext("Midnight"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '00:00');") quickElement("a", quickElement("li", time_list, ""), gettext("6 a.m."), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '06:00');") quickElement("a", quickElement("li", time_list, ""), gettext("Noon"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", '12:00');") cancel_p = quickElement('p', clock_box, ''); cancel_p.className = 'calendar-cancel'; quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');'); },
this.controlDiv.appendChild( div );
this.viewPortDiv.appendChild( div );
addControl: function (control) { control.map = this; this.controls.push(control); var div = control.draw(); if (div) { this.controlDiv.appendChild( div ); } },
div.style.zIndex = this.Z_INDEX_BASE['Control'] + this.controls.length; this.viewPortDiv.appendChild( div );
if(!div.parentNode) { div.style.zIndex = this.Z_INDEX_BASE['Control'] + this.controls.length; this.viewPortDiv.appendChild( div ); }
addControlToMap: function (control, px) { control.setMap(this); var div = control.draw(px); if (div) { div.style.zIndex = this.Z_INDEX_BASE['Control'] + this.controls.length; this.viewPortDiv.appendChild( div ); } },
if (newplace > 0 && window.document.forms[0].eperson_id.options[0].text == "") { newplace = 0; }
function addEPerson(id, email, name){ var newplace = window.document.forms[0].eperson_id.options.length; // First we check to see if e-person is already there for (var i = 0; i < window.document.forms[0].eperson_id.options.length; i++) { if (window.document.forms[0].eperson_id.options[i].value == id) { newplace = -1; } } if (newplace > -1) { window.document.forms[0].eperson_id.options[newplace] = new Option(name + " (" + email + ")", id); }}
if (newplace > 0 && window.document.forms[0].eperson_id.options[0].text == "")
if (newplace > 0 && window.document.forms[0].eperson_id.options[0].value == "")
function addEPerson(id, email, name){ var newplace = window.document.forms[0].eperson_id.options.length; if (newplace > 0 && window.document.forms[0].eperson_id.options[0].text == "") { newplace = 0; } // First we check to see if e-person is already there for (var i = 0; i < window.document.forms[0].eperson_id.options.length; i++) { if (window.document.forms[0].eperson_id.options[i].value == id) { newplace = -1; } } if (newplace > -1) { window.document.forms[0].eperson_id.options[newplace] = new Option(name + " (" + email + ")", id); }}
errorElement.innerHTML = errorMsg;
setText(errorElement, errorMsg);
addErrorMessage: function(errorMsg, currentRow) { if (currentRow) { currentRow.markFailed(errorMsg); } else { var errorElement = this.testDocument.createElement("p"); errorElement.id = "error"; errorElement.innerHTML = errorMsg; this.testDocument.body.appendChild(errorElement); Element.setStyle(errorElement, {'backgroundColor': FeedbackColors.failColor}); } },
if (this.attachEvent){
if (this.addEventListener){ this.addEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, fn, false); } else {
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {'keys': [], 'values': []}; if (!this.events[type].keys.test(fn)){ this.events[type].keys.push(fn); if (this.attachEvent){ fn = fn.bind(this); this.attachEvent('on'+type, fn); this.events[type].values.push(fn); } else { this.addEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, fn, false); } } return this; },
} else { this.addEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, fn, false);
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {'keys': [], 'values': []}; if (!this.events[type].keys.test(fn)){ this.events[type].keys.push(fn); if (this.attachEvent){ fn = fn.bind(this); this.attachEvent('on'+type, fn); this.events[type].values.push(fn); } else { this.addEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, fn, false); } } return this; },
this.events[type] = this.events[type] || {keys: [], values: []};
this.events[type] = this.events[type] || {'keys': [], 'values': []};
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {keys: [], values: []}; if (!this.events[type].keys.test(fn)){ this.events[type].keys.push(fn); if (this.addEventListener){ this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, fn, false); } else { fn = fn.bind(this); this.attachEvent('on'+type, fn); this.events[type].values.push(fn); } } return this; },
this.events[type] = this.events[type] || {}; if (!this.events[type][fn]){
this.events[type] = this.events[type] || {keys: [], values: []}; if (!this.events[type].keys.test(fn)){ this.events[type].keys.push(fn);
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {}; if (!this.events[type][fn]){ if (this.addEventListener){ this.events[type][fn] = fn; this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.events[type][fn] = fn.bind(this); this.attachEvent('on'+type, this.events[type][fn]); } } return this; },
this.events[type][fn] = fn; this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false);
this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, fn, false);
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {}; if (!this.events[type][fn]){ if (this.addEventListener){ this.events[type][fn] = fn; this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.events[type][fn] = fn.bind(this); this.attachEvent('on'+type, this.events[type][fn]); } } return this; },
this.events[type][fn] = fn.bind(this); this.attachEvent('on'+type, this.events[type][fn]);
fn = fn.bind(this); this.attachEvent('on'+type, fn); this.events[type].values.push(fn);
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {}; if (!this.events[type][fn]){ if (this.addEventListener){ this.events[type][fn] = fn; this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.events[type][fn] = fn.bind(this); this.attachEvent('on'+type, this.events[type][fn]); } } return this; },
var realType = type; if (type == 'mousewheel' && !window.khtml) realType = 'DOMMouseScroll'; this.addEventListener(realType, this.events[type][fn], false);
this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false);
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {}; if (this.events[type][fn]) return this; if (this.addEventListener){ this.events[type][fn] = fn; var realType = type; if (type == 'mousewheel' && !window.khtml) realType = 'DOMMouseScroll'; this.addEventListener(realType, this.events[type][fn], false); } else { var binded = fn.bind(this); this.events[type][fn] = binded; this.attachEvent('on'+type, this.events[type][fn]); } return this; },
var binded = fn.bind(this); this.events[type][fn] = binded;
this.events[type][fn] = fn.bind(this);
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {}; if (this.events[type][fn]) return this; if (this.addEventListener){ this.events[type][fn] = fn; var realType = type; if (type == 'mousewheel' && !window.khtml) realType = 'DOMMouseScroll'; this.addEventListener(realType, this.events[type][fn], false); } else { var binded = fn.bind(this); this.events[type][fn] = binded; this.attachEvent('on'+type, this.events[type][fn]); } return this; },
if (this.events[type][fn]) return this; if (this.addEventListener){ this.events[type][fn] = fn; this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.events[type][fn] = fn.bind(this); this.attachEvent('on'+type, this.events[type][fn]);
if (!this.events[type][fn]){ if (this.addEventListener){ this.events[type][fn] = fn; this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.events[type][fn] = fn.bind(this); this.attachEvent('on'+type, this.events[type][fn]); }
addEvent: function(type, fn){ this.events = this.events || {}; this.events[type] = this.events[type] || {}; if (this.events[type][fn]) return this; if (this.addEventListener){ this.events[type][fn] = fn; this.addEventListener((type == 'mousewheel' && !window.khtml) ? 'DOMMouseScroll' : type, this.events[type][fn], false); } else { this.events[type][fn] = fn.bind(this); this.attachEvent('on'+type, this.events[type][fn]); } return this; },
if (!source) return this; for (var type in source) this.addEvent(type, source[type]);
if (source){ for (var type in source) this.addEvent(type, source[type]); }
addEvents: function(source){ if (!source) return this; for (var type in source) this.addEvent(type, source[type]); return this; },
if ((window.document.forms[0].group_ids.options[i].value == id) || (window.document.forms[0].group_id.value == id))
if (window.document.forms[0].group_ids.options[i].value == id)
function addGroup(id, name){ var newplace = window.document.forms[0].group_ids.options.length; if (newplace > 0 && window.document.forms[0].group_ids.options[0].value == "") { newplace = 0; } // First we check to see if group is already there for (var i = 0; i < window.document.forms[0].group_ids.options.length; i++) { if ((window.document.forms[0].group_ids.options[i].value == id) || (window.document.forms[0].group_id.value == id)) { newplace = -1; } } if (newplace > -1) { window.document.forms[0].group_ids.options[newplace] = new Option(name + " (" + id + ")", id); }}
} if (window.document.forms[0].group_id) { if (window.document.forms[0].group_id.value == id) { newplace = -1; }
function addGroup(id, name){ var newplace = window.document.forms[0].group_ids.options.length; if (newplace > 0 && window.document.forms[0].group_ids.options[0].value == "") { newplace = 0; } // First we check to see if group is already there for (var i = 0; i < window.document.forms[0].group_ids.options.length; i++) { if ((window.document.forms[0].group_ids.options[i].value == id) || (window.document.forms[0].group_id.value == id)) { newplace = -1; } } if (newplace > -1) { window.document.forms[0].group_ids.options[newplace] = new Option(name + " (" + id + ")", id); }}
layer.setMap(this);
addLayer: function (layer) { layer.setMap(this); layer.div.style.overflow = ""; layer.div.style.zIndex = this.Z_INDEX_BASE['Layer'] + this.layers.length; if (layer.isFixed) { this.viewPortDiv.appendChild(layer.div); } else { this.layerContainerDiv.appendChild(layer.div); } this.layers.push(layer); this.events.triggerEvent("addlayer"); //make sure layer draws itself! if (this.center != null) { var bounds = this.getExtent(); layer.moveTo(bounds, true); } // hack hack hack - until we add a more robust layer switcher, // which is able to determine which layers are base layers and // which are not (and put baselayers in a radiobutton group and // other layers in checkboxes) this seems to be the most straight- // forward way of dealing with this. // if ( (this.baseLayer == null) && (layer.isBaseLayer()) ) { this.baseLayer = layer; this.events.triggerEvent("changebaselayer"); } },
if ( (this.baseLayer == null) && (layer.isBaseLayer()) ) { this.baseLayer = layer; this.events.triggerEvent("changebaselayer");
if (layer.isBaseLayer) { if (this.baseLayer == null) { this.setBaseLayer(layer); this.events.triggerEvent("changebaselayer"); } else { layer.setVisibility(false); }
addLayer: function (layer) { layer.setMap(this); layer.div.style.overflow = ""; layer.div.style.zIndex = this.Z_INDEX_BASE['Layer'] + this.layers.length; if (layer.isFixed) { this.viewPortDiv.appendChild(layer.div); } else { this.layerContainerDiv.appendChild(layer.div); } this.layers.push(layer); this.events.triggerEvent("addlayer"); //make sure layer draws itself! if (this.center != null) { var bounds = this.getExtent(); layer.moveTo(bounds, true); } // hack hack hack - until we add a more robust layer switcher, // which is able to determine which layers are base layers and // which are not (and put baselayers in a radiobutton group and // other layers in checkboxes) this seems to be the most straight- // forward way of dealing with this. // if ( (this.baseLayer == null) && (layer.isBaseLayer()) ) { this.baseLayer = layer; this.events.triggerEvent("changebaselayer"); } },
element.addEventListener("load", command, true);
element.addEventListener("load", augmentedCommand, true);
function addLoadListener(element, command) { LOG.info('Adding loadListenter for ' + element + ', ' + command); if (window.addEventListener && !browserVersion.isOpera) element.addEventListener("load", command, true); else if (window.attachEvent) element.attachEvent("onload", command);}
element.attachEvent("onload", command);
element.attachEvent("onload", augmentedCommand);
function addLoadListener(element, command) { LOG.info('Adding loadListenter for ' + element + ', ' + command); if (window.addEventListener && !browserVersion.isOpera) element.addEventListener("load", command, true); else if (window.attachEvent) element.attachEvent("onload", command);}
var msgID = nextMessageID++; var fullMessage = msg + getMsgIDSuffix(msgID); messageQueue.push(fullMessage); if (dispatchState == DISPATCH_IDLE) dispatchMessage(true);
if (msg.length < DISPATCH_MAX_MSG_SIZE) { addMessageSimple(msg); } else { addMessageBatch(msg); }
function addMessage(msg) { var msgID = nextMessageID++; var fullMessage = msg + getMsgIDSuffix(msgID); messageQueue.push(fullMessage); if (dispatchState == DISPATCH_IDLE) dispatchMessage(true);}
var buttonArray=new Array('RemoveButton','CollapseButton','ExpandButton');
var buttonArray=new Array('RemoveButton','CollapseButton','ExpandButton', 'TogglePlacementButton');
function addNewAttributeRows(attribid){ var table=document.getElementById( "AttributesTable" ); if ( table != null ) { var rows=table.rows; var newHeaderRow=table.insertRow(rows.length); newHeaderRow.id="AttributeHeaderRow_" + attribid; var newHeader1=document.createElement( "th" ); newHeader1.className="tight"; newHeaderRow.appendChild(newHeader1); newHeader1.id="newHeader" + attribid + "_1"; var newHeader2=document.createElement( "th" ); newHeader2.className="wide"; newHeaderRow.appendChild(newHeader2); newHeader2.id="newHeader" + attribid + "_2"; var newHeader3=document.createElement( "th" ); newHeader3.className="tight"; newHeaderRow.appendChild(newHeader3); newHeader3.id="newHeader" + attribid + "_3"; var newRow=table.insertRow(rows.length); newRow.id="newRow" + attribid; var newCell1=newRow.insertCell(0); newCell1.id="newCell" + attribid + "_1"; var newCell2=newRow.insertCell(1); newCell2.colSpan=2; newCell2.id="newCell" + attribid + "_2"; } else { window.alert( 'Unable to find attributes table.' ); } var buttonArray=new Array('RemoveButton','CollapseButton','ExpandButton'); var button; var j; for(j=0;j<buttonArray.length;j++) { button=document.getElementById(buttonArray[j]); if(button){ button.className=button.className.replace('button-disabled','button'); button.disabled=false; } } var noAttributes=document.getElementById('NoAttributesMessage'); if (noAttributes){ noAttributes.parentNode.removeChild(noAttributes); }}
getTestFrame().contentWindow.document.body.innerHTML = getText(suiteTable.rows[row].cells[1]);
getIframeDocument(getTestFrame()).body.innerHTML = getText(suiteTable.rows[row].cells[1]);
function addOnclick(suiteTable, rowNum) { aLink = suiteTable.rows[rowNum].cells[0].getElementsByTagName("a")[0]; aLink.onclick = function(eventObj) { srcObj = null; // For mozilla-like browsers if(eventObj) srcObj = eventObj.target; // For IE-like browsers else if (getSuiteFrame().contentWindow.event) srcObj = getSuiteFrame().contentWindow.event.srcElement; // The target row (the event source is not consistently reported by browsers) row = srcObj.parentNode.parentNode.rowIndex || srcObj.parentNode.parentNode.parentNode.rowIndex; // If the row has a stored results table, use that if(suiteTable.rows[row].cells[1]) { getTestFrame().contentWindow.document.body.innerHTML = getText(suiteTable.rows[row].cells[1]); } // Otherwise, just open up the fresh page. else { getTestFrame().src = suiteTable.rows[row].cells[0].getElementsByTagName("a")[0].href; } return false; };}
addBreakpointSupport(testFrame.getDocument());
currentHtmlTestCase = new HtmlTestCase(testFrame.getDocument()); currentHtmlTestCase.addBreakpointSupport();
function addOnclick(suiteTable, rowNum) { aLink = suiteTable.rows[rowNum].cells[0].getElementsByTagName("a")[0]; aLink.onclick = function(eventObj) { srcObj = null; // For mozilla-like browsers if (eventObj) srcObj = eventObj.target; // For IE-like browsers else if (getSuiteFrame().contentWindow.event) srcObj = getSuiteFrame().contentWindow.event.srcElement; // The target row (the event source is not consistently reported by browsers) row = srcObj.parentNode.parentNode.rowIndex || srcObj.parentNode.parentNode.parentNode.rowIndex; currentRowInSuite = row; // If the row has a stored results table, use that if (suiteTable.rows[row].cells[1]) { var bodyElement = testFrame.getDocument().body; // Create a div element to hold the results table. var tableNode = testFrame.getDocument().createElement("div"); var resultsCell = suiteTable.rows[row].cells[1]; tableNode.innerHTML = resultsCell.innerHTML; // Append this text node, and remove all the preceding nodes. bodyElement.appendChild(tableNode); while (bodyElement.firstChild != bodyElement.lastChild) { bodyElement.removeChild(bodyElement.firstChild); } addBreakpointSupport(testFrame.getDocument()); } // Otherwise, just open up the fresh page. else { testFrame.setLocation(suiteTable.rows[row].cells[0].getElementsByTagName("a")[0].href); } return false; };}
addBreakpointSupport();
addBreakpointSupport(getIframeDocument(getTestFrame()));
function addOnclick(suiteTable, rowNum) { aLink = suiteTable.rows[rowNum].cells[0].getElementsByTagName("a")[0]; aLink.onclick = function(eventObj) { srcObj = null; // For mozilla-like browsers if (eventObj) srcObj = eventObj.target; // For IE-like browsers else if (getSuiteFrame().contentWindow.event) srcObj = getSuiteFrame().contentWindow.event.srcElement; // The target row (the event source is not consistently reported by browsers) row = srcObj.parentNode.parentNode.rowIndex || srcObj.parentNode.parentNode.parentNode.rowIndex; currentRowInSuite = row; // If the row has a stored results table, use that if (suiteTable.rows[row].cells[1]) { var bodyElement = getIframeDocument(getTestFrame()).body; // Create a div element to hold the results table. var tableNode = getIframeDocument(getTestFrame()).createElement("div"); var resultsCell = suiteTable.rows[row].cells[1]; tableNode.innerHTML = resultsCell.innerHTML; // Append this text node, and remove all the preceding nodes. bodyElement.appendChild(tableNode); while (bodyElement.firstChild != bodyElement.lastChild) { bodyElement.removeChild(bodyElement.firstChild); } addBreakpointSupport(); } // Otherwise, just open up the fresh page. else { getTestFrame().src = suiteTable.rows[row].cells[0].getElementsByTagName("a")[0].href; } return false; };}
addBreakpointSupport(getIframeDocument(getTestFrame()));
addBreakpointSupport(testIFrame.getDocument());
function addOnclick(suiteTable, rowNum) { aLink = suiteTable.rows[rowNum].cells[0].getElementsByTagName("a")[0]; aLink.onclick = function(eventObj) { srcObj = null; // For mozilla-like browsers if (eventObj) srcObj = eventObj.target; // For IE-like browsers else if (getSuiteFrame().contentWindow.event) srcObj = getSuiteFrame().contentWindow.event.srcElement; // The target row (the event source is not consistently reported by browsers) row = srcObj.parentNode.parentNode.rowIndex || srcObj.parentNode.parentNode.parentNode.rowIndex; currentRowInSuite = row; // If the row has a stored results table, use that if (suiteTable.rows[row].cells[1]) { var bodyElement = testIFrame.getDocument().body; // Create a div element to hold the results table. var tableNode = testIFrame.getDocument().createElement("div"); var resultsCell = suiteTable.rows[row].cells[1]; tableNode.innerHTML = resultsCell.innerHTML; // Append this text node, and remove all the preceding nodes. bodyElement.appendChild(tableNode); while (bodyElement.firstChild != bodyElement.lastChild) { bodyElement.removeChild(bodyElement.firstChild); } addBreakpointSupport(getIframeDocument(getTestFrame())); } // Otherwise, just open up the fresh page. else { testIFrame.setLocation(suiteTable.rows[row].cells[0].getElementsByTagName("a")[0].href); } return false; };}
var n = typeof(k) == "number", ie = tinyMCE.isMSIE, c, sc, i; var scl = this.shortcuts;
var n = typeof(k) == "number", ie = tinyMCE.isIE, c, sc, i, scl = this.shortcuts;
addShortcut : function(m, k, d, cmd, ui, va) { var n = typeof(k) == "number", ie = tinyMCE.isMSIE, c, sc, i; var scl = this.shortcuts; if (!tinyMCE.getParam('custom_shortcuts')) return false; m = m.toLowerCase(); k = ie && !n ? k.toUpperCase() : k; c = n ? null : k.charCodeAt(0); d = d && d.indexOf('lang_') == 0 ? tinyMCE.getLang(d) : d; sc = { alt : m.indexOf('alt') != -1, ctrl : m.indexOf('ctrl') != -1, shift : m.indexOf('shift') != -1, charCode : c, keyCode : n ? k : (ie ? c : null), desc : d, cmd : cmd, ui : ui, val : va }; for (i=0; i<scl.length; i++) { if (sc.alt == scl[i].alt && sc.ctrl == scl[i].ctrl && sc.shift == scl[i].shift && sc.charCode == scl[i].charCode && sc.keyCode == scl[i].keyCode) { return false; } } scl[scl.length] = sc; return true; },
new Ajax.Updater(snippetDiv, url, { evalScripts:true });
new Ajax.Updater(snippetDiv, url, { evalScripts:true, onComplete: Element.scrollTo.bind(Element, snippetDiv) });
addSnippet: function() { var namespace = "addSnip" + (++this.namespaceNum) + "_"; var snippetDiv = document.createElement("div"); snippetDiv.id = namespace; $('snippetContainer').appendChild(snippetDiv); var url = window.location.pathname + "?mode=addNew&ns=" + namespace; new Ajax.Updater(snippetDiv, url, { evalScripts:true }); },
function addStyleClass(element, className) { if (!hasStyleClass(element, className)) element.className += (element.className.length ? " " + className : className);
Element.prototype.addStyleClass = function(className) { if (!this.hasStyleClass(className)) this.className += (this.className.length ? " " + className : className);
function addStyleClass(element, className){ if (!hasStyleClass(element, className)) element.className += (element.className.length ? " " + className : className);}
this._setEventHandlers(backdropLabelOuter);
addTab: function(layer) { // Outer DIV - for Rico Corners // var backdropLabelOuter = document.createElement('div'); backdropLabelOuter.id = "LayerSwitcher_" + layer.name + "_Tab"; backdropLabelOuter.style.marginTop = "4px"; backdropLabelOuter.style.marginBottom = "4px"; // Inner Label - for Rico Corners // var backdropLabel = document.createElement('p'); backdropLabel.innerHTML = layer.name; backdropLabel.style.marginTop = "0px"; backdropLabel.style.marginBottom = "0px"; backdropLabel.style.paddingLeft = "10px"; backdropLabel.style.paddingRight = "10px"; // add reference to layer onto the div for use in event handlers backdropLabel.layer = layer; // set event handlers this._setEventHandlers(backdropLabel); // add label to div backdropLabelOuter.appendChild(backdropLabel); this.backdrops.append(backdropLabel); // add div to main LayerSwitcher Div this.div.appendChild(backdropLabelOuter); Rico.Corner.round(backdropLabelOuter, {corners: "tl bl", bgColor: "transparent", color: "white", blend: false}); // extend the event handlers to operate on the // rounded corners as well. (Fixes OL #57.) var spanElements=backdropLabel.parentNode.getElementsByTagName("span"); for (var currIdx = 0; currIdx < spanElements.length; currIdx++) { this._setEventHandlers(spanElements[currIdx], backdropLabel); } this.setTabActivation(backdropLabel, layer.getVisibility()); },
backdropLabelOuter.onclick = this.ignoreEvent.bindAsEventListener(this); backdropLabelOuter.ondblclick = this.ignoreEvent.bindAsEventListener(this); backdropLabelOuter.onmousedown = this.singleClick.bindAsEventListener(this);
this._setEventHandlers(backdropLabel);
addTab: function(layer) { // Outer DIV - for Rico Corners // var backdropLabelOuter = document.createElement('div'); backdropLabelOuter.id = "LayerSwitcher_" + layer.name + "_Tab"; backdropLabelOuter.style.marginTop = "4px"; backdropLabelOuter.style.marginBottom = "4px"; // Inner Label - for Rico Corners // var backdropLabel = document.createElement('p'); backdropLabel.innerHTML = layer.name; backdropLabel.style.marginTop = "0px"; backdropLabel.style.marginBottom = "0px"; backdropLabel.style.paddingLeft = "10px"; backdropLabel.style.paddingRight = "10px"; // add reference to layer onto the div for use in event handlers backdropLabel.layer = layer; // set event handlers backdropLabelOuter.onclick = this.ignoreEvent.bindAsEventListener(this); backdropLabelOuter.ondblclick = this.ignoreEvent.bindAsEventListener(this); backdropLabelOuter.onmousedown = this.singleClick.bindAsEventListener(this); // add label to div backdropLabelOuter.appendChild(backdropLabel); this.backdrops.append(backdropLabel); // add div to main LayerSwitcher Div this.div.appendChild(backdropLabelOuter); Rico.Corner.round(backdropLabelOuter, {corners: "tl bl", bgColor: "transparent", color: "white", blend: false}); this.setTabActivation(backdropLabel, layer.getVisibility()); },
backdropLabel.ondblclick = this.doubleClick.bindAsEventListener(this); backdropLabel.onmousedown = this.singleClick.bindAsEventListener(this);
backdropLabelOuter.ondblclick = this.doubleClick.bindAsEventListener(this); backdropLabelOuter.onmousedown = this.singleClick.bindAsEventListener(this);
addTab: function(layer) { // Outer DIV - for Rico Corners // var backdropLabelOuter = document.createElement('div'); backdropLabelOuter.id = "LayerSwitcher_" + layer.name + "_Tab"; backdropLabelOuter.style.marginTop = "4px"; backdropLabelOuter.style.marginBottom = "4px"; // Inner Label - for Rico Corners // var backdropLabel = document.createElement('p'); backdropLabel.innerHTML = layer.name; backdropLabel.style.marginTop = "0px"; backdropLabel.style.marginBottom = "0px"; backdropLabel.style.paddingLeft = "10px"; backdropLabel.style.paddingRight = "10px"; // add reference to layer onto the div for use in event handlers backdropLabel.layer = layer; // set event handlers backdropLabel.ondblclick = this.doubleClick.bindAsEventListener(this); backdropLabel.onmousedown = this.singleClick.bindAsEventListener(this); // add label to div backdropLabelOuter.appendChild(backdropLabel); this.backdrops.append(backdropLabel); // add div to main LayerSwitcher Div this.div.appendChild(backdropLabelOuter); Rico.Corner.round(backdropLabelOuter, {corners: "tl bl", bgColor: "transparent", color: "white", blend: false}); this.setTabActivation(backdropLabel, layer.getVisibility()); },
var spanElements=backdropLabel.parentNode.getElementsByTagName("span"); for (var currIdx = 0; currIdx < spanElements.length; currIdx++) { this._setEventHandlers(spanElements[currIdx], backdropLabel); }
addTab: function(layer) { // Outer DIV - for Rico Corners // var backdropLabelOuter = document.createElement('div'); backdropLabelOuter.id = "LayerSwitcher_" + layer.name + "_Tab"; backdropLabelOuter.style.marginTop = "4px"; backdropLabelOuter.style.marginBottom = "4px"; // Inner Label - for Rico Corners // var backdropLabel = document.createElement('p'); backdropLabel.innerHTML = layer.name; backdropLabel.style.marginTop = "0px"; backdropLabel.style.marginBottom = "0px"; backdropLabel.style.paddingLeft = "10px"; backdropLabel.style.paddingRight = "10px"; // add reference to layer onto the div for use in event handlers backdropLabel.layer = layer; // set event handlers this._setEventHandlers(backdropLabel); // add label to div backdropLabelOuter.appendChild(backdropLabel); this.backdrops.append(backdropLabel); // add div to main LayerSwitcher Div this.div.appendChild(backdropLabelOuter); Rico.Corner.round(backdropLabelOuter, {corners: "tl bl", bgColor: "transparent", color: "white", blend: false}); this.setTabActivation(backdropLabel, layer.getVisibility()); },
var tile = new OpenLayers.Tile.Image(bounds, url, this.tileSize);
var tile = new OpenLayers.Tile.Image(this, bounds, url, this.tileSize);
addTile:function(bounds,position) { url = this.getFullRequestString( {bbox:bounds.toBBOX(), width:this.tileSize.w, height:this.tileSize.h}); var tile = new OpenLayers.Tile.Image(bounds, url, this.tileSize); tile.draw(); tile.setPosition(position); this.div.appendChild(tile.img); return tile; },
var tile = new OpenLayers.Tile.WFS(bounds, url, this.tileSize);
var tile = new OpenLayers.Tile.WFS(this, bounds, url, this.tileSize);
addTile:function(bounds, position) { url = this.getFullRequestString( { bbox:bounds.toBBOX() }); var tile = new OpenLayers.Tile.WFS(bounds, url, this.tileSize); tile.draw(); tile.setPosition(position); this.div.appendChild(tile.img); return tile; },
var channel = document.channelselector.channel.options[currentChannel].value;
var reference = document.channelselector.channel.options[currentChannel].value; var channelName = document.channelselector.channel.options[currentChannel].text;
function addTimerEvent(){ var url = ""; var currentTimer = document.channelselector.type.selectedIndex; var timer = document.channelselector.type.options[currentTimer].value; var currentChannel = document.channelselector.channel.selectedIndex; var channel = document.channelselector.channel.options[currentChannel].value; var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text; var currentShour = document.channelselector.shour.selectedIndex; var shour = document.channelselector.shour.options[currentShour].text; var currentSmin = document.channelselector.smin.selectedIndex; var smin = document.channelselector.smin.options[currentSmin].text; var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text; var currentEhour = document.channelselector.ehour.selectedIndex; var ehour = document.channelselector.ehour.options[currentEhour].text; var currentEmin = document.channelselector.emin.selectedIndex; var emin = document.channelselector.emin.options[currentEmin].text; var descr = document.channelselector.descr.value; var currentAfterEvent = document.channelselector.after_event.selectedIndex; var after_event = document.channelselector.after_event.options[currentAfterEvent].value; var currentAction = document.channelselector.action.selectedIndex; var action = document.channelselector.action.options[currentAction].value; if (timer == "repeating") { var mo = "off"; var tu = "off"; var we = "off"; var th = "off"; var fr = "off"; var sa = "off"; var su = "off"; if (document.channelselector.mo.checked) mo = "on"; if (document.channelselector.tu.checked) tu = "on"; if (document.channelselector.we.checked) we = "on"; if (document.channelselector.th.checked) th = "on"; if (document.channelselector.fr.checked) fr = "on"; if (document.channelselector.sa.checked) sa = "on"; if (document.channelselector.su.checked) su = "on"; url = 'addTimerEvent?timer=repeating&ref=' + channel + '&shour=' + shour + '&smin=' + smin + '&smonth=' + smonth + '&syear=' + syear + '&ehour=' + ehour + '&emin=' + emin + '&emonth=' + emonth + '&eyear=' + eyear + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; } else url = 'addTimerEvent?timer=regular&ref=' + channel + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; NewWindow(url, 'add', '200', '200', 'no', '5000');}
url = 'addTimerEvent?timer=repeating&ref=' + channel + '&shour=' + shour + '&smin=' + smin + '&smonth=' + smonth + '&syear=' + syear + '&ehour=' + ehour + '&emin=' + emin + '&emonth=' + emonth + '&eyear=' + eyear + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action;
url = 'addTimerEvent?timer=repeating&ref=' + reference + '&channel=' + channelName + '&shour=' + shour + '&smin=' + smin + '&smonth=' + smonth + '&syear=' + syear + '&ehour=' + ehour + '&emin=' + emin + '&emonth=' + emonth + '&eyear=' + eyear + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action;
function addTimerEvent(){ var url = ""; var currentTimer = document.channelselector.type.selectedIndex; var timer = document.channelselector.type.options[currentTimer].value; var currentChannel = document.channelselector.channel.selectedIndex; var channel = document.channelselector.channel.options[currentChannel].value; var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text; var currentShour = document.channelselector.shour.selectedIndex; var shour = document.channelselector.shour.options[currentShour].text; var currentSmin = document.channelselector.smin.selectedIndex; var smin = document.channelselector.smin.options[currentSmin].text; var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text; var currentEhour = document.channelselector.ehour.selectedIndex; var ehour = document.channelselector.ehour.options[currentEhour].text; var currentEmin = document.channelselector.emin.selectedIndex; var emin = document.channelselector.emin.options[currentEmin].text; var descr = document.channelselector.descr.value; var currentAfterEvent = document.channelselector.after_event.selectedIndex; var after_event = document.channelselector.after_event.options[currentAfterEvent].value; var currentAction = document.channelselector.action.selectedIndex; var action = document.channelselector.action.options[currentAction].value; if (timer == "repeating") { var mo = "off"; var tu = "off"; var we = "off"; var th = "off"; var fr = "off"; var sa = "off"; var su = "off"; if (document.channelselector.mo.checked) mo = "on"; if (document.channelselector.tu.checked) tu = "on"; if (document.channelselector.we.checked) we = "on"; if (document.channelselector.th.checked) th = "on"; if (document.channelselector.fr.checked) fr = "on"; if (document.channelselector.sa.checked) sa = "on"; if (document.channelselector.su.checked) su = "on"; url = 'addTimerEvent?timer=repeating&ref=' + channel + '&shour=' + shour + '&smin=' + smin + '&smonth=' + smonth + '&syear=' + syear + '&ehour=' + ehour + '&emin=' + emin + '&emonth=' + emonth + '&eyear=' + eyear + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; } else url = 'addTimerEvent?timer=regular&ref=' + channel + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; NewWindow(url, 'add', '200', '200', 'no', '5000');}
url = 'addTimerEvent?timer=regular&ref=' + channel + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action;
url = 'addTimerEvent?timer=regular&ref=' + reference + '&channel=' + channelName + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; alert(url);
function addTimerEvent(){ var url = ""; var currentTimer = document.channelselector.type.selectedIndex; var timer = document.channelselector.type.options[currentTimer].value; var currentChannel = document.channelselector.channel.selectedIndex; var channel = document.channelselector.channel.options[currentChannel].value; var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text; var currentShour = document.channelselector.shour.selectedIndex; var shour = document.channelselector.shour.options[currentShour].text; var currentSmin = document.channelselector.smin.selectedIndex; var smin = document.channelselector.smin.options[currentSmin].text; var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text; var currentEhour = document.channelselector.ehour.selectedIndex; var ehour = document.channelselector.ehour.options[currentEhour].text; var currentEmin = document.channelselector.emin.selectedIndex; var emin = document.channelselector.emin.options[currentEmin].text; var descr = document.channelselector.descr.value; var currentAfterEvent = document.channelselector.after_event.selectedIndex; var after_event = document.channelselector.after_event.options[currentAfterEvent].value; var currentAction = document.channelselector.action.selectedIndex; var action = document.channelselector.action.options[currentAction].value; if (timer == "repeating") { var mo = "off"; var tu = "off"; var we = "off"; var th = "off"; var fr = "off"; var sa = "off"; var su = "off"; if (document.channelselector.mo.checked) mo = "on"; if (document.channelselector.tu.checked) tu = "on"; if (document.channelselector.we.checked) we = "on"; if (document.channelselector.th.checked) th = "on"; if (document.channelselector.fr.checked) fr = "on"; if (document.channelselector.sa.checked) sa = "on"; if (document.channelselector.su.checked) su = "on"; url = 'addTimerEvent?timer=repeating&ref=' + channel + '&shour=' + shour + '&smin=' + smin + '&smonth=' + smonth + '&syear=' + syear + '&ehour=' + ehour + '&emin=' + emin + '&emonth=' + emonth + '&eyear=' + eyear + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; } else url = 'addTimerEvent?timer=regular&ref=' + channel + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; NewWindow(url, 'add', '200', '200', 'no', '5000');}
alert(url);
function addTimerEvent(){ var url = ""; var currentTimer = document.channelselector.type.selectedIndex; var timer = document.channelselector.type.options[currentTimer].value; var currentChannel = document.channelselector.channel.selectedIndex; var reference = document.channelselector.channel.options[currentChannel].value; var channelName = document.channelselector.channel.options[currentChannel].text; var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text; var currentShour = document.channelselector.shour.selectedIndex; var shour = document.channelselector.shour.options[currentShour].text; var currentSmin = document.channelselector.smin.selectedIndex; var smin = document.channelselector.smin.options[currentSmin].text; var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text; var currentEhour = document.channelselector.ehour.selectedIndex; var ehour = document.channelselector.ehour.options[currentEhour].text; var currentEmin = document.channelselector.emin.selectedIndex; var emin = document.channelselector.emin.options[currentEmin].text; var descr = document.channelselector.descr.value; var currentAfterEvent = document.channelselector.after_event.selectedIndex; var after_event = document.channelselector.after_event.options[currentAfterEvent].value; var currentAction = document.channelselector.action.selectedIndex; var action = document.channelselector.action.options[currentAction].value; if (timer == "repeating") { var mo = "off"; var tu = "off"; var we = "off"; var th = "off"; var fr = "off"; var sa = "off"; var su = "off"; if (document.channelselector.mo.checked) mo = "on"; if (document.channelselector.tu.checked) tu = "on"; if (document.channelselector.we.checked) we = "on"; if (document.channelselector.th.checked) th = "on"; if (document.channelselector.fr.checked) fr = "on"; if (document.channelselector.sa.checked) sa = "on"; if (document.channelselector.su.checked) su = "on"; url = 'addTimerEvent?timer=repeating&ref=' + reference + '&channel=' + channelName + '&shour=' + shour + '&smin=' + smin + '&smonth=' + smonth + '&syear=' + syear + '&ehour=' + ehour + '&emin=' + emin + '&emonth=' + emonth + '&eyear=' + eyear + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; } else url = 'addTimerEvent?timer=regular&ref=' + reference + '&channel=' + channelName + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; alert(url); NewWindow(url, 'add', '200', '200', 'no', '5000');}
if (timer == "regular") { var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text; }
var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text;
function addTimerEvent(){ var url = ""; var currentTimer = document.channelselector.type.selectedIndex; var timer = document.channelselector.type.options[currentTimer].value; var currentChannel = document.channelselector.channel.selectedIndex; var channel = document.channelselector.channel.options[currentChannel].value; if (timer == "regular") { var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text; } var currentShour = document.channelselector.shour.selectedIndex; var shour = document.channelselector.shour.options[currentShour].text; var currentSmin = document.channelselector.smin.selectedIndex; var smin = document.channelselector.smin.options[currentSmin].text; if (timer == "regular") { var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text; } var currentEhour = document.channelselector.ehour.selectedIndex; var ehour = document.channelselector.ehour.options[currentEhour].text; var currentEmin = document.channelselector.emin.selectedIndex; var emin = document.channelselector.emin.options[currentEmin].text; var descr = document.channelselector.descr.value; var currentAfterEvent = document.channelselector.after_event.selectedIndex; var after_event = document.channelselector.after_event.options[currentAfterEvent].value; var currentAction = document.channelselector.action.selectedIndex; var action = document.channelselector.action.options[currentAction].value; if (timer == "repeating") { var mo = "off"; var tu = "off"; var we = "off"; var th = "off"; var fr = "off"; var sa = "off"; var su = "off"; if (document.channelselector.mo.checked) mo = "on"; if (document.channelselector.tu.checked) tu = "on"; if (document.channelselector.we.checked) we = "on"; if (document.channelselector.th.checked) th = "on"; if (document.channelselector.fr.checked) fr = "on"; if (document.channelselector.sa.checked) sa = "on"; if (document.channelselector.su.checked) su = "on"; url = 'addTimerEvent?timer=repeating&ref=' + channel + '&shour=' + shour + '&smin=' + smin + '&ehour=' + ehour + '&emin=' + emin + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; } else url = 'addTimerEvent?timer=regular&ref=' + channel + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; NewWindow(url, 'add', '200', '200', 'no', '5000');}
if (timer == "regular") { var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text; }
var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text;
function addTimerEvent(){ var url = ""; var currentTimer = document.channelselector.type.selectedIndex; var timer = document.channelselector.type.options[currentTimer].value; var currentChannel = document.channelselector.channel.selectedIndex; var channel = document.channelselector.channel.options[currentChannel].value; if (timer == "regular") { var currentSday = document.channelselector.sday.selectedIndex; var sday = document.channelselector.sday.options[currentSday].text; var currentSmonth = document.channelselector.smonth.selectedIndex; var smonth = document.channelselector.smonth.options[currentSmonth].text; var currentSyear = document.channelselector.syear.selectedIndex; var syear = document.channelselector.syear.options[currentSyear].text; } var currentShour = document.channelselector.shour.selectedIndex; var shour = document.channelselector.shour.options[currentShour].text; var currentSmin = document.channelselector.smin.selectedIndex; var smin = document.channelselector.smin.options[currentSmin].text; if (timer == "regular") { var currentEday = document.channelselector.eday.selectedIndex; var eday = document.channelselector.eday.options[currentEday].text; var currentEmonth = document.channelselector.emonth.selectedIndex; var emonth = document.channelselector.emonth.options[currentEmonth].text; var currentEyear = document.channelselector.eyear.selectedIndex; var eyear = document.channelselector.eyear.options[currentEyear].text; } var currentEhour = document.channelselector.ehour.selectedIndex; var ehour = document.channelselector.ehour.options[currentEhour].text; var currentEmin = document.channelselector.emin.selectedIndex; var emin = document.channelselector.emin.options[currentEmin].text; var descr = document.channelselector.descr.value; var currentAfterEvent = document.channelselector.after_event.selectedIndex; var after_event = document.channelselector.after_event.options[currentAfterEvent].value; var currentAction = document.channelselector.action.selectedIndex; var action = document.channelselector.action.options[currentAction].value; if (timer == "repeating") { var mo = "off"; var tu = "off"; var we = "off"; var th = "off"; var fr = "off"; var sa = "off"; var su = "off"; if (document.channelselector.mo.checked) mo = "on"; if (document.channelselector.tu.checked) tu = "on"; if (document.channelselector.we.checked) we = "on"; if (document.channelselector.th.checked) th = "on"; if (document.channelselector.fr.checked) fr = "on"; if (document.channelselector.sa.checked) sa = "on"; if (document.channelselector.su.checked) su = "on"; url = 'addTimerEvent?timer=repeating&ref=' + channel + '&shour=' + shour + '&smin=' + smin + '&ehour=' + ehour + '&emin=' + emin + '&mo=' + mo + '&tu=' + tu + '&we=' + we + '&th=' + th + '&fr=' + fr + '&sa=' + sa + '&su=' + su + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; } else url = 'addTimerEvent?timer=regular&ref=' + channel + '&sday=' + sday + '&smonth=' + smonth + '&syear=' + syear + '&shour=' + shour + '&smin=' + smin + '&eday=' + eday + '&emonth=' + emonth + '&eyear=' + eyear + '&ehour=' + ehour + '&emin=' + emin + '&descr=' + descr + '&after_event=' + after_event + '&action=' + action; NewWindow(url, 'add', '200', '200', 'no', '5000');}