Changeset 25479


Ignore:
Timestamp:
11/13/13 20:43:49 (6 years ago)
Author:
plg
Message:

feature 1668: delete single user, better colors for admin dark theme.

Location:
trunk/admin/themes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/clear/theme.css

    r25457 r25479  
    359359  border-color: #aaa !important; 
    360360} 
     361 
     362.userPropertiesContainer {border-color:#ddd;} 
     363.userPrefs {border-color:#ddd;} 
  • trunk/admin/themes/default/template/user_list.tpl

    r25475 r25479  
    113113          userDetails += '<div class="userActions">'; 
    114114          userDetails += '<a class="icon-key" href="#">Change password</a>'; 
    115           userDetails += '<br><a href="#" class="icon-lock">Permissions</a>'; 
    116           userDetails += '<br><a href="#" class="icon-trash">Delete</a>'; 
     115          userDetails += '<br><a target="_blank" href="admin.php?page=user_perm&amp;user_id='+userId+'" class="icon-lock">Permissions</a>'; 
     116          userDetails += '<br><span class="userDelete"><img class="loading" src="themes/default/images/ajax-loader-small.gif" style="display:none;"><a href="#" class="icon-trash" data-user_id="'+userId+'">Delete</a></span>'; 
    117117          userDetails += '</div>'; 
    118           userDetails += '<strong>'+user.username+'</strong> <span class="icon-pencil"></span>'; 
     118          userDetails += '<strong class="username">'+user.username+'</strong> <span class="icon-pencil"></span>'; 
    119119          userDetails += '<br><br>'; 
    120120          userDetails += sprintf(registeredOn_pattern, user.registration_date_string, user.registration_date_since); 
     
    227227          userDetails += '<div style="clear:both"></div></div>'; 
    228228 
    229           userDetails += '<span class="infos" style="display:none">&#x2714; User updated</span>'; 
    230           userDetails += '<input type="submit" value="{/literal}{'Save Settings'|translate}{literal}" style="display:none;" data-user_id="'+userId+'">'; 
     229          userDetails += '<span class="infos" style="display:none">&#x2714; User '+user.username+' updated</span>'; 
     230          userDetails += '<input type="submit" value="{/literal}{'Update user'|translate}{literal}" style="display:none;" data-user_id="'+userId+'">'; 
    231231          userDetails += '<img class="submitWait" src="themes/default/images/ajax-loader-small.gif" style="display:none">' 
    232232          userDetails += '</form>'; 
     
    252252    jQuery('#user'+userId+' input[type=submit]').show(); 
    253253    jQuery('#user'+userId+' .infos').hide(); 
     254  }); 
     255 
     256  jQuery(document).on('click', '.userDelete a',  function() { 
     257    if (!confirm("{/literal}{'Are you sure?'|translate|escape:javascript}{literal}")) { 
     258      return false; 
     259    } 
     260 
     261    var userId = jQuery(this).data('user_id'); 
     262    var username = jQuery('#user'+userId+' .username').html(); 
     263 
     264    jQuery.ajax({ 
     265      url: "ws.php?format=json&method=pwg.users.delete", 
     266      type:"POST", 
     267      data: { 
     268        user_id:userId, 
     269        pwg_token:pwg_token 
     270      }, 
     271      beforeSend: function() { 
     272        jQuery('#user'+userId+' .userDelete .loading').show(); 
     273      }, 
     274      success:function(data) { 
     275        oTable.fnDraw(); 
     276        jQuery('#showAddUser .infos').html('&#x2714; User '+username+' deleted').show(); 
     277      }, 
     278      error:function(XMLHttpRequest, textStatus, errorThrows) { 
     279        jQuery('#user'+userId+' .userDelete .loading').hide(); 
     280      } 
     281    }); 
     282 
     283    return false; 
    254284  }); 
    255285 
     
    594624#applyActionBlock .actionButtons {margin-left:0;} 
    595625span.infos, span.errors {background-image:none; padding:2px 5px; margin:0;border-radius:5px;} 
    596  
    597 .userProperties {max-width:730px;} 
    598 .userPropertiesContainer {border-top:1px solid #ddd;margin-top:1em;} 
    599 .userPropertiesSet {width:350px;float:left;padding-top:5px} 
    600 .userPropertiesSetTitle {font-weight:bold;margin-bottom:1em;} 
    601 .userPrefs {border-left:1px solid #ddd;padding-left:10px;} 
    602 .userProperty {width:220px;float:left;margin-bottom:15px;} 
    603  
    604 .userActions {float:right;text-align:right;} 
    605626</style> 
    606627{/literal} 
  • trunk/admin/themes/default/theme.css

    r25457 r25479  
    11461146  cursor:pointer; 
    11471147} 
     1148 
     1149.userProperties {max-width:730px;} 
     1150.userPropertiesContainer {border-top:1px solid #ddd;margin-top:1em;} 
     1151.userPropertiesSet {width:350px;float:left;padding-top:5px} 
     1152.userPropertiesSetTitle {font-weight:bold;margin-bottom:1em;} 
     1153.userPrefs {border-left:1px solid #ddd;padding-left:10px;} 
     1154.userProperty {width:220px;float:left;margin-bottom:15px;} 
     1155.userActions {float:right;text-align:right;} 
     1156 
  • trunk/admin/themes/roma/theme.css

    r25457 r25479  
    335335  border-color: #333 !important; 
    336336} 
     337 
     338.userPropertiesContainer {border-color:#333;} 
     339.userPrefs {border-color:#333;} 
Note: See TracChangeset for help on using the changeset viewer.