Plugin Directory

Changeset 1071035


Ignore:
Timestamp:
01/19/2015 01:31:06 PM (11 years ago)
Author:
irenem
Message:

Updating ui...

Location:
userswitcher
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • userswitcher/readme.txt

    r1069673 r1071035  
    1111== Description ==
    1212
    13 userSwitcher allows you to switch to a between user roles or account without the hassle of logging in/out. It allows you to experience and know what you're users does within your site.
     13userSwitcher allows you to switch between user account without the hassle of logging in/out. It allows you to experience and know what you're users does within your site.
    1414
    1515== Installation ==
  • userswitcher/style.css

    r1069862 r1071035  
     1.switch-bg {
     2    background: rgb(111,207,202);
     3    background: -moz-linear-gradient(top, rgba(111,207,202,1) 0%, rgba(55,168,163,1) 100%);
     4    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(111,207,202,1)), color-stop(100%,rgba(55,168,163,1)));
     5    background: -webkit-linear-gradient(top, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%);
     6    background: -o-linear-gradient(top, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%);
     7    background: -ms-linear-gradient(top, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%);
     8    background: linear-gradient(to bottom, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%);
     9}
    110#switcher-form {
    211    position: absolute;
    312    border: 1px #ddd solid;
    4     background: #000;
    513    margin: 0;
    614    z-index: 999;
    7     background: #000 url(arrow_switch_right.png) no-repeat left center;
    8     padding: 4px 5px 4px 35px;
    9     vertical-align: middle;
     15    left:0;
     16    padding: 1px 0;
    1017    cursor: pointer;
    1118    height: 30px;
    12     width: auto;
     19    width: 120px;
     20    text-indent: 0;
    1321}
    1422#switcher-form select,
    1523#wpadminbar #switcher-form select {
    1624    position: relative;
    17     margin:0;
     25    font-size: 14px;
     26    padding: 0;
     27    -moz-border-radius: 0;
     28    border-radius: 0;
    1829    display: table;
    1930    vertical-align: middle;
    20     top:0;
    21     padding-left:0;
    22     padding-right:0;
    23     -moz-border-radius: 0;
    24     border-radius: 0;
    25     font-size: 14px;
    26     border: 1px #ddd solid;
    2731    width: 0;
    2832    overflow: hidden;
     
    3337    -moz-transform: translate3d(0,0,0);
    3438    transform: translate3d(0,0,0);
     39    margin: 0 0 0 110px;
    3540    cursor: pointer;
     41    border:0;
     42    outline: none;
    3643}
    3744#switcher-form option {
     
    4148#switcher-form .switch-icon {
    4249    position: absolute;
    43     top:0;
    44     left: 0;
    45     width: 30px;
     50    left:0;
    4651    height: 100%;
     52    padding-left: 30px;
     53    padding-right:5px;
     54    color: #333;
     55    line-height: 28px;
     56    background: url(arrow_switch_right.png) no-repeat left center;
    4757}
    4858#switcher-form.switch-fixed {
    4959    position: fixed;
    50     right:0;
     60    left:0;
    5161    bottom:0;
     62}
     63#switcher-form.switch-fixed select {
     64    margin-left: 115px;
    5265}
    5366#switcher-form.switch-admin {
  • userswitcher/switch.js

    r1069868 r1071035  
    33    toggleSwitcher = function(){
    44        var target = $(this), form = target.parents('form').first(), box = form.find('select');
    5             is_open = box.width() > 40;
    6             box.css({width: is_open ? 0 : 200 });
     5            is_open = box.width() > 20;
     6            box.css({width: is_open ? 0 : 120 });
    77    };
    88   
  • userswitcher/userSwitcher.php

    r1069868 r1071035  
    22/**
    33 * Plugin Name: userSwitcher
     4 * Plugin URI: http://irenemitchell.com/userswitcher
    45 * Description: Experience what you're user experienced and know what they can do to your site without logging in/out.
    56 * Version: 1.0
    67 * Author: Irene A. Mitchell
     8 * Author URI: http://irenemitchell.com
    79 * License: GPLv2 or later
    810 **/
     
    104106                ?>
    105107                        <script type="text/template" id="switcher-template">
    106                         <form method="post" action="<?php _e(admin_url()); ?>options.php" id="switcher-form">
     108                        <form method="post" action="<?php _e(admin_url()); ?>options.php" class="switch-bg" id="switcher-form">
    107109                                <input type="hidden" name="option_page" value="<?php _e( esc_attr( 'user_switcher' ) ); ?>" />
    108110                                <input type="hidden" name="action" value="update" />
    109111                                <?php wp_nonce_field("user_switcher-options");?>
    110                                         <span class="switch-icon"></span>
     112                                        <span class="switch-icon">userSwitcher</span>
    111113                                        <select tabindex="1" name="user_switcher[<?php _e($this->current_switcher); ?>]">
    112114                                                <option value="guest" <?php selected('guest', $this->user_switcher); ?>>Guest</option>
Note: See TracChangeset for help on using the changeset viewer.