Changeset 907 in subversion
- Timestamp:
- Oct 28, 2007 10:13:33 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/js/app.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/js/app.js
r888 r907 2417 2417 var anchors = row.obj.getElementsByTagName('A'); 2418 2418 if (anchors[0]) 2419 anchors[0].onclick = function() { p.rename_folder(row.id); };2419 anchors[0].onclick = function() { p.rename_folder(row.id); return false; }; 2420 2420 if (anchors[1]) 2421 anchors[1].onclick = function() { p.delete_folder(row.id); };2421 anchors[1].onclick = function() { p.delete_folder(row.id); return false; }; 2422 2422 row.obj.onmouseover = function() { p.focus_subscription(row.id); }; 2423 2423 row.obj.onmouseout = function() { p.unfocus_subscription(row.id); }; … … 2563 2563 { 2564 2564 var temp, row, form; 2565 var folder = this.env.subscriptionrows[id][0];2566 2565 2567 2566 // reset current renaming … … 2573 2572 } 2574 2573 2575 if (id && (row = document.getElementById(id)))2574 if (id && this.env.subscriptionrows[id] && (row = document.getElementById(id))) 2576 2575 { 2577 2576 var reg = new RegExp('.*['+RegExp.escape(this.env.delimiter)+']'); 2578 2577 this.name_input = document.createElement('INPUT'); 2579 this.name_input.value = folder.replace(reg, '');2578 this.name_input.value = this.env.subscriptionrows[id][1].replace(reg, ''); 2580 2579 this.name_input.style.width = '100%'; 2580 2581 2581 reg = new RegExp('['+RegExp.escape(this.env.delimiter)+']?[^'+RegExp.escape(this.env.delimiter)+']+$'); 2582 this.name_input. setAttribute('parent', folder.replace(reg, ''));2582 this.name_input.__parent = this.env.subscriptionrows[id][0].replace(reg, ''); 2583 2583 this.name_input.onkeypress = function(e){ rcmail.name_input_keypress(e); }; 2584 2584 … … 2618 2618 if (this.edit_folder && newname) 2619 2619 { 2620 if (this.name_input. getAttribute('parent') && this.name_input.getAttribute('parent')!='')2621 newname = this.name_input. getAttribute('parent')+this.env.delimiter+newname;2622 this.http_post('rename-folder', '_folder_oldname='+urlencode(this.env.subscriptionrows[this.edit_folder][0])+'&_folder_newname='+urlencode(newname));2620 if (this.name_input.__parent) 2621 newname = this.name_input.__parent + this.env.delimiter + newname; 2622 this.http_post('rename-folder', '_folder_oldname='+urlencode(this.env.subscriptionrows[this.edit_folder][0])+'&_folder_newname='+urlencode(newname)); 2623 2623 } 2624 2624 }
Note: See TracChangeset
for help on using the changeset viewer.
