Changeset 86f3aaf in github
- Timestamp:
- May 25, 2010 2:55:13 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 50067d5
- Parents:
- ae00404
- File:
-
- 1 edited
-
program/js/app.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/js/app.js
r87a8685 r86f3aaf 3733 3733 3734 3734 if (!this.name_input) { 3735 this.name_input = document.createElement('input');3736 this.name_input. type = 'text';3737 this.name_input .onkeypress = function(e){ return rcmail.add_input_keypress(e); };3735 this.name_input = $('<input>').attr('type', 'text'); 3736 this.name_input.bind('keypress', function(e){ return rcmail.add_input_keypress(e); }); 3737 this.name_input_li = $('<li>').addClass('contactgroup').append(this.name_input); 3738 3738 3739 3739 var li = this.get_folder_li(this.env.source) 3740 $(this.name_input).insertAfter(li);3740 this.name_input_li.insertAfter(li); 3741 3741 } 3742 3742 … … 3751 3751 if (!this.name_input) { 3752 3752 this.enable_command('list', 'listgroup', false); 3753 this.name_input = document.createElement('input'); 3754 this.name_input.type = 'text'; 3755 this.name_input.value = this.env.contactgroups['G'+this.env.source+this.env.group].name; 3756 this.name_input.onkeypress = function(e){ return rcmail.add_input_keypress(e); }; 3753 this.name_input = $('<input>').attr('type', 'text').val(this.env.contactgroups['G'+this.env.source+this.env.group].name); 3754 this.name_input.bind('keypress', function(e){ return rcmail.add_input_keypress(e); }); 3757 3755 this.env.group_renaming = true; 3758 3756 3759 var li = this.get_folder_li(this.env.source+this.env.group, 'rcmliG');3757 var link, li = this.get_folder_li(this.env.source+this.env.group, 'rcmliG'); 3760 3758 if (li && (link = li.firstChild)) { 3761 $(link).hide(); 3762 li.insertBefore(this.name_input, link); 3759 $(link).hide().before(this.name_input); 3763 3760 } 3764 3761 } … … 3795 3792 // enter 3796 3793 if (key == 13) { 3797 var newname = this.name_input.val ue;3794 var newname = this.name_input.val(); 3798 3795 3799 3796 if (newname) { … … 3817 3814 if (this.name_input) { 3818 3815 if (this.env.group_renaming) { 3819 var li = this.name_input.parent Node;3820 $(li.lastChild).show();3816 var li = this.name_input.parent(); 3817 li.children().last().show(); 3821 3818 this.env.group_renaming = false; 3822 3819 } 3823 3820 3824 this.name_input.parentNode.removeChild(this.name_input); 3825 this.name_input = null; 3821 this.name_input.remove(); 3822 3823 if (this.name_input_li) 3824 this.name_input_li.remove(); 3825 3826 this.name_input = this.name_input_li = null; 3826 3827 } 3827 3828
Note: See TracChangeset
for help on using the changeset viewer.
