Plugin Directory

Changeset 1239889


Ignore:
Timestamp:
09/07/2015 02:49:01 PM (11 years ago)
Author:
sendmachine
Message:

tagging version 1.0.2

Location:
sendmachine
Files:
49 added
4 edited

Legend:

Unmodified
Added
Removed
  • sendmachine/trunk/readme.txt

    r1230263 r1239889  
    44Requires at least: 3.2.1
    55Tested up to: 4.3
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9696== Changelog ==
    9797
     98== 1.0.2 ==
     99* Blurred credentials
     100* Removed display error: all
     101
    98102= 1.0.1 =
    99103* Added description field to widget area.
  • sendmachine/trunk/sendmachine_wp.php

    r1230263 r1239889  
    55  Plugin URI: https://www.sendmachine.com
    66  Description: The official Sendmachine plugin featuring subscribe forms, users sync, news feed, email sending and transactional campaigns.
    7   Version: 1.0.1
     7  Version: 1.0.2
    88  Author: Sendmachine team
    99  Author URI: http://developers.sendmachine.com/
     
    1111  Domain Path: /languages/
    1212 */
    13 
    14 error_reporting(E_ALL);
    1513
    1614define('SM_PLUGIN_DIR', dirname(__FILE__) . '/');
  • sendmachine/trunk/static/js/sm-admin.js

    r1226818 r1239889  
    3434    });
    3535}
     36
     37function smInitCredentialsBlur() {
     38
     39    smToggleCredentialsVisibility('sm_api_username', 'hide');
     40    smToggleCredentialsVisibility('sm_api_password', 'hide');
     41
     42    document.getElementById('sm_api_username').onfocus = function () {
     43        smToggleCredentialsVisibility('sm_api_username', 'show');
     44    };
     45    document.getElementById('sm_api_password').onfocus = function () {
     46        smToggleCredentialsVisibility('sm_api_password', 'show');
     47    };
     48}
     49
     50function smToggleCredentialsVisibility(id, state) {
     51
     52    if (id !== 'sm_api_username' && id !== 'sm_api_password') {
     53        return;
     54    }
     55
     56    var style = '';
     57    var text = '';
     58
     59    var button = document.getElementById('button_' + id);
     60
     61    if (!state) {
     62        state = button.getAttribute('smState');
     63    }
     64
     65    if (state === 'hide') {
     66        style = 'color:transparent;text-shadow:0 0 5px rgba(0,0,0,0.5)';
     67        text = 'show';
     68    }
     69    else if (state === 'show') {
     70        style = '';
     71        text = 'hide';
     72    }
     73
     74    button.setAttribute('smState', text);
     75    button.innerHTML = text;
     76    document.getElementById(id).setAttribute('style', style);
     77}
  • sendmachine/trunk/views/wp_sm_general_settings.php

    r1236939 r1239889  
    4949                                <input type="hidden" name="sm_admin_wp_request" value="1" />
    5050                                <input type="hidden" name="sm_action" value="init_sm_data" />
    51                                 <input type="text" class="api_credentials" name="update[credentials][api_username]" value="<?php echo isset($this->app['credentials']['api_username']) ? trim($this->app['credentials']['api_username']) : '' ?>">
     51                                <input id="sm_api_username" type="text" class="api_credentials" name="update[credentials][api_username]" value="<?php echo isset($this->app['credentials']['api_username']) ? trim($this->app['credentials']['api_username']) : '' ?>">
     52                                <button class="button" id="button_sm_api_username" onclick="smToggleCredentialsVisibility('sm_api_username');return false;" >show</button>
    5253                            </td>
    5354                        </tr>
     
    5556                            <th scope="row"><?php _e("API PASSWORD", SM_LANGUAGE_DOMAIN) ?></th>
    5657                            <td>
    57                                 <input type="text" class="api_credentials" name="update[credentials][api_password]" value="<?php echo isset($this->app['credentials']['api_password']) ? trim($this->app['credentials']['api_password']) : '' ?>">
     58                                <input id="sm_api_password" type="text" class="api_credentials" name="update[credentials][api_password]" value="<?php echo isset($this->app['credentials']['api_password']) ? trim($this->app['credentials']['api_password']) : '' ?>">
     59                                <button class="button" id="button_sm_api_password" onclick="smToggleCredentialsVisibility('sm_api_password');return false;" >show</button>
    5860                            </td>
    5961                        </tr>
     
    6769    </div>
    6870</div>
     71<script>smInitCredentialsBlur();</script>
Note: See TracChangeset for help on using the changeset viewer.