}
if(this.options.ghosting) {
- this._clone = this.element.cloneNode(true);
+ this._clone = this.element.clone(true);
this._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
if (!this._originallyAbsolute)
Position.absolutize(this.element);
Element.offsetSize = function (element, type) {
return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
-};
\ No newline at end of file
+};
if (isNaN(z)) {
z = 2;
}
- DragDrop.Drags.cover.insert(DragDrop.Drags.cover.down().cloneNode(false).setStyle({ zIndex: z }).clonePosition(i).show());
+ DragDrop.Drags.cover.insert(DragDrop.Drags.cover.down().clone(false).setStyle({ zIndex: z }).clonePosition(i).show());
}
}, this);
}
// Create the "ghost", i.e. the moving element, a clone of the
// original element, if it doesn't exist yet.
var layout = this.element.getLayout();
- this.ghost = $(this.element.cloneNode(true))
+ this.ghost = $(this.element.clone(true))
.writeAttribute('id', null)
.addClassName(this.options.classname)
.setStyle({ position: 'absolute', height: layout.get('height') + 'px', width: layout.get('width') + 'px' });
cloneWindowContents: function(id)
{
- $('RB_window').appendChild($($(id).cloneNode(true)).setStyle({ display: 'block' }));
+ $('RB_window').appendChild($($(id).clone(true)).setStyle({ display: 'block' }));
this.setWindowPosition();
},
[ 'from', 'to', 'cc' ].each(function(a) {
if (r[a]) {
(a == 'from' ? pm.select('.' + a) : [ t.down('.' + a) ]).each(function(elt) {
- elt.replace(DimpCore.buildAddressLinks(r[a], elt.cloneNode(false)));
+ elt.replace(DimpCore.buildAddressLinks(r[a], elt.clone(false)));
});
}
[ $('msgHeader' + a.capitalize()) ].invoke(r[a] ? 'show' : 'hide');
_createFolderForm: function(action, text)
{
- var n = $($('folderform').down().cloneNode(true)).writeAttribute('id', 'RB_folder');
+ var n = $($('folderform').down().clone(true)).writeAttribute('id', 'RB_folder');
n.down('P').insert(text);
this.cfolderaction = action;
cnt = alist.size();
if (cnt > 15) {
- tmp = $('largeaddrspan').cloneNode(true).writeAttribute('id', 'largeaddrspan_active');
+ tmp = $('largeaddrspan').clone(true).writeAttribute('id', 'largeaddrspan_active');
elt.insert(tmp);
base = tmp.down('.dispaddrlist');
tmp = tmp.down('.largeaddrlist');
[ 'from', 'to', 'cc', 'bcc', 'replyTo' ].each(function(a) {
if (this[a]) {
var elt = $('msgHeader' + a.charAt(0).toUpperCase() + a.substring(1)).down('TD', 1);
- elt.replace(DimpCore.buildAddressLinks(this[a], elt.cloneNode(false)));
+ elt.replace(DimpCore.buildAddressLinks(this[a], elt.clone(false)));
}
}, this);
return;
}
- fixcopy = iefix.cloneNode(false);
+ fixcopy = iefix.clone(false);
li.insert(fixcopy);
fixcopy.clonePosition(ul);
updateFolderList: function(folders)
{
var fragment = document.createDocumentFragment(),
- node = $($('folder_row').cloneNode(true)).writeAttribute('id', false).show(),
+ node = $($('folder_row').clone(true)).writeAttribute('id', false).show(),
div = $('search_folders_hdr').next('DIV');
folders.each(function(f) {
- var n = $(node.cloneNode(true));
+ var n = $(node.clone(true));
n.down().writeAttribute({ disabled: Boolean(f.c), value: (f.co ? null : f.v.escapeHTML()) }).insert({ after: f.l });
fragment.appendChild(n);
});
$('recent_searches_div').show();
$H(searches).each(function(s) {
- fragment.appendChild($(node.cloneNode(false)).writeAttribute({ value: s.value.v.escapeHTML() }).update(s.value.l.escapeHTML()));
+ fragment.appendChild($(node.clone(false)).writeAttribute({ value: s.value.v.escapeHTML() }).update(s.value.l.escapeHTML()));
this.saved_searches[s.key] = s.value.c;
}, this);
}
tds.each(function(node) {
- tr.insert(td.cloneNode(false).insert(node));
+ tr.insert(td.clone(false).insert(node));
});
tds.shift();
var tmp = [
new Element('EM').insert(this.getLabel(id)),
- new Element('SPAN').insert(new Element('INPUT', { type: 'text', size: 8 }).setValue(data.v)).insert(' ').insert($($('within_criteria').cloneNode(true)).writeAttribute({ id: null }).show().setValue(data.l))
+ new Element('SPAN').insert(new Element('INPUT', { type: 'text', size: 8 }).setValue(data.v)).insert(' ').insert($($('within_criteria').clone(true)).writeAttribute({ id: null }).show().setValue(data.l))
];
this.criteria[this.insertCriteria(tmp)] = { t: id };
tmp[1].activate();
row, cell, dateString;
// Create a copy of the row template.
- row = $('kronolithRowTemplate').cloneNode(true);
+ row = $('kronolithRowTemplate').clone(true);
row.removeAttribute('id');
// Fill week number and day cells.
// Create a copy of the row template.
var body = $('kronolithViewAgendaBody'),
- row = $('kronolithAgendaTemplate').cloneNode(true);
+ row = $('kronolithAgendaTemplate').clone(true);
// Fill week number and day cells.
row.store('date', date)
createYearMonth: function(year, month, idPrefix)
{
// Create a copy of the month template.
- var table = $('kronolithYearTemplate').cloneNode(true),
+ var table = $('kronolithYearTemplate').clone(true),
tbody = table.down('tbody');
table.removeAttribute('id');
tbody.writeAttribute('id', 'kronolithYearTable' + month);
*/
insertTask: function(task)
{
- var row = $('kronolithTasksTemplate').cloneNode(true),
+ var row = $('kronolithTasksTemplate').clone(true),
col = row.down();
row.removeAttribute('id');
}
var tr = elm.up('tr'),
- row = tr.cloneNode(true).store('remove', true),
+ row = tr.clone(true).store('remove', true),
td = row.down('td'),
clearName = elm.tagName == 'SELECT' ? elm.options[elm.selectedIndex].text: elm.getValue();
$('destEditForm').appendChild(select);
- $('destEditForm').appendChild(spacer.cloneNode(true));
+ $('destEditForm').appendChild(spacer.clone(true));
var span = document.createElement('span');
span.id = 'destValueContainer';
$('destEditForm').appendChild(span);
- $('destEditForm').appendChild(spacer.cloneNode(true));
+ $('destEditForm').appendChild(spacer.clone(true));
var save = document.createElement("input");
save.id = 'destSave';