Changeset 5914 in subversion


Ignore:
Timestamp:
Feb 26, 2012 12:02:16 PM (15 months ago)
Author:
alec
Message:
  • Fixed identity delete button state, removed delete button in identity-edit form (for consistency)
Location:
trunk/roundcubemail
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/app.js

    r5910 r5914  
    373373 
    374374        if (this.env.action == 'identities') { 
    375           this.enable_command('add', 'delete', this.env.identities_level < 2); 
     375          this.enable_command('add', this.env.identities_level < 2); 
    376376        } 
    377377        else if (this.env.action == 'edit-identity' || this.env.action == 'add-identity') { 
    378           this.enable_command('add', this.env.identities_level < 2); 
    379378          this.enable_command('save', 'edit', 'toggle-editor', true); 
    380           if (this.is_framed() && this.env.identities_level < 2) 
    381             this.set_button('delete', 'act');  // activate button but delegate command to parent 
    382           else 
    383             this.enable_command('delete', this.env.identities_level < 2); 
     379          this.enable_command('delete', this.env.identities_level < 2); 
    384380 
    385381          if (this.env.action == 'add-identity') 
     
    48084804  { 
    48094805    var id; 
    4810     if (id = list.get_single_selection()) 
     4806    if (id = list.get_single_selection()) { 
     4807      this.enable_command('delete', list.rowcount > 1 && this.env.identities_level < 2); 
    48114808      this.load_identity(id, 'edit-identity'); 
     4809    } 
    48124810  }; 
    48134811 
     
    48154813  this.load_identity = function(id, action) 
    48164814  { 
    4817     if (action=='edit-identity' && (!id || id==this.env.iid)) 
     4815    if (action == 'edit-identity' && (!id || id == this.env.iid)) 
    48184816      return false; 
    48194817 
     
    48264824    } 
    48274825 
    4828     if (action && (id || action=='add-identity')) { 
     4826    if (action && (id || action == 'add-identity')) { 
    48294827      this.set_busy(true); 
    48304828      this.location_href(this.env.comm_path+'&_action='+action+'&_iid='+id+add_url, target); 
     
    48364834  this.delete_identity = function(id) 
    48374835  { 
    4838     // exit if no mailbox specified or if selection is empty 
     4836    // exit if no identity is specified or if selection is empty 
    48394837    var selection = this.identity_list.get_selection(); 
    48404838    if (!(selection.length || this.env.iid)) 
  • trunk/roundcubemail/skins/default/templates/identityedit.html

    r5868 r5914  
    2424<div id="formfooter"> 
    2525<div class="footerleft"> 
    26   <roundcube:button command="delete" type="input" class="button" label="delete" condition="env:action=='edit-identity'" style="margin-right:0.5em" /> 
    2726  <roundcube:button command="save" type="input" class="button mainaction" label="save" /> 
    2827</div> 
  • trunk/roundcubemail/skins/larry/templates/identityedit.html

    r5686 r5914  
    1616<div class="footerleft formbuttons"> 
    1717        <roundcube:button command="save" type="input" class="button mainaction" label="save" /> 
    18         <roundcube:button command="delete" type="input" class="button" label="delete" condition="env:action=='edit-identity' && config:identities_level:0<2" /> 
    1918</div> 
    2019</div> 
Note: See TracChangeset for help on using the changeset viewer.