Plugin Directory

Changeset 1366481


Ignore:
Timestamp:
03/08/2016 08:04:53 AM (10 years ago)
Author:
jamesmarsland
Message:

Version 1.1.0

Location:
pootle-button/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pootle-button/trunk/README.txt

    r1363877 r1366481  
    11=== pootle button ===
    22
    3 Contributors: pootlepress
     3Contributors: pootlepress, shramee
    44Plugin Name: pootle button
    55Plugin URI: http://www.pootlepress.com/pootle-button
     
    1010Requires at least: 4.1.0
    1111Tested up to: 4.4.2
    12 Stable tag: 1.0.0
     12Stable tag: 1.1.0
    1313License: GPLv2 or later
    1414License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3636Pootle button makes managing buttons, the most important part of a website's User Interface, incredibly easy
    3737
    38  * Feels as much like WordPress
    39  * Integrated well into wordpress editor
     38 * Feels very much like WordPress.
     39 * Integrated well into WordPress editor.
    4040
    4141= Can I see pootle button in action? =
     
    4646== Usage ==
    4747
    48 Install and activate the plugin. In your WordPress dashboard simply add a new page to start using pootle button.
     48Install and activate the plugin. In your WordPress dashboard simply add a new page to start using pootle button!
    4949
    5050== Installation ==
     
    8181== Upgrade Notice ==
    8282
     83= 1.1.0 =
     84* 2016-03-08
     85* Enhancement - Numeric size scal besides size slider
     86* Fixed - Vertical alignment for large buttons with icon
     87* Fixed - Button always opening url in new tab
     88* Fixed - Editing button with no alignment gets aligned to center
     89
    8390= 1.0.0 =
    8491* 2016-03-03
  • pootle-button/trunk/assets/dashicons-select.js

    r1363877 r1366481  
    1818            var ico = 'dashicons dashicons-' + icon;
    1919            $i = $( '<i/>' ).addClass( ico ).css( {
    20                 verticalAlign : "middle",
    21                 fontSize: '1.2em',
     20                fontSize: '1em',
    2221                width: '1em',
    2322                height: '1em'
  • pootle-button/trunk/assets/dialog.php

    r1363877 r1366481  
    2727        }
    2828        .field {
    29             margin: 1em;
     29            margin: 1em 0;
    3030        }
    3131
     
    3939        }
    4040
    41         .field > input, .field select {
    42             width: 160px;
     41        .field > .input-wrap, .field > input, .field select {
     42            width: 178px;
     43        }
     44
     45        .field > .input-wrap {
     46            display: inline-block;
     47            position: relative;
     48            font-size: 0;
     49        }
     50
     51        .field > .input-wrap * {
     52            font-size: 16px;
     53        }
     54
     55        .field input[type="range"] {
     56            width: 133px;
     57        }
     58
     59        .field #font-size-helper {
     60            width: 40px;
     61            margin-left: 5px;
    4362        }
    4463
     
    188207        <div class="field">
    189208            <label>Size</label>
    190             <input class="input-style" name="font-size" min="5" max="70" step="2" type="range" value="25">
     209            <span class="input-wrap">
     210                <input class="input-style" name="font-size" min="8" max="70" step="2" type="range" value="25" onchange='jQuery("#font-size-helper").val(this.value)'>
     211                <input id="font-size-helper" readonly="readonly">
     212            </span>
    191213        </div>
    192214        <div class="field">
    193215            <label>Align</label>
    194216            <select class="input-style align" name="float">
    195                 <option selected="selected">None</option>
     217                <option value="" selected="selected">None</option>
    196218                <option value="left">Left</option>
    197219                <option value="none">Center</option>
     
    249271                $prevu = $( '#preview' ),
    250272                $text = $( '.button-text' ),
     273                $align = $( '.input-style.align' ),
    251274                $style_inputs = $( '.input-style' ),
    252275                $attr_inputs = $( '.input-attr' ),
     
    261284                        name = $t.attr( 'name' ),
    262285                        val = params.button.css( name );
    263                     console.log( name + ' : ' + val );
    264286                    if ( val ) {
    265287                        if ( 'number' == $t.attr( 'type' ) || 'range' == $t.attr( 'type' ) ) { val = val.replace( 'px', '' ); }
     
    279301                    }
    280302                } );
     303
     304                if ( 'center' != params.button.closest( 'p.pbtn' ).css( 'text-align' ) ) {
     305                    if ( 'none' == $align.val() ) {
     306                        $align.val( '' );
     307                    }
     308                }
    281309                <?php
    282310            }
     
    300328                $attr_inputs.each( function () {
    301329                    var $t = $( this );
    302                     return_text += $t.attr( 'name' ) + '="' + $t.val() + '" ';
     330                    if ( $t.attr( 'type' ) != 'checkbox' || $t.prop( 'checked' ) ) {
     331                        if ( $t.val() ) {
     332                            return_text += $t.attr( 'name' ) + '="' + $t.val() + '" ';
     333                        }
     334                    }
    303335                } );
    304336
     
    353385                return_text += get_input_attr() + '">' + $icon.val() + ' ' + $text.val() + "</a>&nbsp;\n";
    354386
    355                 console.log( return_text );
    356387                if ( params.editing ) {
    357388                    ed.dom.setStyle( params.button.closest( 'p.pbtn' )[0], 'text-align', '' );
    358                     if ( 'none' == $('.input-style.align' ).val() ) {
     389                    if ( 'none' == $align.val() ) {
    359390                        ed.dom.setStyle( params.button.closest( 'p.pbtn' )[0], 'text-align', 'center' );
    360391                    }
    361                 } else if ( 'none' == $('.input-style.align' ).val() ) {
     392                } else if ( 'none' == $align.val() ) {
    362393                    return_text = '<p class="pbtn" style="clear:both;text-align:center">' + return_text + '</p>';
    363394                } else {
    364395                    return_text = '<p class="pbtn" style="clear:both;">' + return_text + '</p>';
    365396                }
    366 
    367397                ed.execCommand( 'mceInsertContent', 0, return_text );
    368398                ed.windowManager.close();
     
    371401            $style_inputs.change( preview );
    372402            $( '.button-text, .button-icon' ).change( preview );
    373             $style_inputs.last().change();
     403            $style_inputs.filter('[name="font-size"]').change();
    374404            $prevu.hover(
    375405                function() {
  • pootle-button/trunk/pootle-button.php

    r1363878 r1366481  
    44 * Plugin URI: http://pootlepress.com/
    55 * Description: A cool plugin to add delicious buttons in WordPress editor
    6  * Version: 1.0.0
     6 * Version: 1.1.0
    77 * Author: pootlepress
    88 * Author URI: http://pootlepress.com/
Note: See TracChangeset for help on using the changeset viewer.