Changeset 1366481
- Timestamp:
- 03/08/2016 08:04:53 AM (10 years ago)
- Location:
- pootle-button/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (5 diffs)
-
assets/dashicons-select.js (modified) (1 diff)
-
assets/dialog.php (modified) (9 diffs)
-
pootle-button.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pootle-button/trunk/README.txt
r1363877 r1366481 1 1 === pootle button === 2 2 3 Contributors: pootlepress 3 Contributors: pootlepress, shramee 4 4 Plugin Name: pootle button 5 5 Plugin URI: http://www.pootlepress.com/pootle-button … … 10 10 Requires at least: 4.1.0 11 11 Tested up to: 4.4.2 12 Stable tag: 1. 0.012 Stable tag: 1.1.0 13 13 License: GPLv2 or later 14 14 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 36 36 Pootle button makes managing buttons, the most important part of a website's User Interface, incredibly easy 37 37 38 * Feels as much like WordPress39 * Integrated well into wordpress editor38 * Feels very much like WordPress. 39 * Integrated well into WordPress editor. 40 40 41 41 = Can I see pootle button in action? = … … 46 46 == Usage == 47 47 48 Install and activate the plugin. In your WordPress dashboard simply add a new page to start using pootle button .48 Install and activate the plugin. In your WordPress dashboard simply add a new page to start using pootle button! 49 49 50 50 == Installation == … … 81 81 == Upgrade Notice == 82 82 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 83 90 = 1.0.0 = 84 91 * 2016-03-03 -
pootle-button/trunk/assets/dashicons-select.js
r1363877 r1366481 18 18 var ico = 'dashicons dashicons-' + icon; 19 19 $i = $( '<i/>' ).addClass( ico ).css( { 20 verticalAlign : "middle", 21 fontSize: '1.2em', 20 fontSize: '1em', 22 21 width: '1em', 23 22 height: '1em' -
pootle-button/trunk/assets/dialog.php
r1363877 r1366481 27 27 } 28 28 .field { 29 margin: 1em ;29 margin: 1em 0; 30 30 } 31 31 … … 39 39 } 40 40 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; 43 62 } 44 63 … … 188 207 <div class="field"> 189 208 <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> 191 213 </div> 192 214 <div class="field"> 193 215 <label>Align</label> 194 216 <select class="input-style align" name="float"> 195 <option selected="selected">None</option>217 <option value="" selected="selected">None</option> 196 218 <option value="left">Left</option> 197 219 <option value="none">Center</option> … … 249 271 $prevu = $( '#preview' ), 250 272 $text = $( '.button-text' ), 273 $align = $( '.input-style.align' ), 251 274 $style_inputs = $( '.input-style' ), 252 275 $attr_inputs = $( '.input-attr' ), … … 261 284 name = $t.attr( 'name' ), 262 285 val = params.button.css( name ); 263 console.log( name + ' : ' + val );264 286 if ( val ) { 265 287 if ( 'number' == $t.attr( 'type' ) || 'range' == $t.attr( 'type' ) ) { val = val.replace( 'px', '' ); } … … 279 301 } 280 302 } ); 303 304 if ( 'center' != params.button.closest( 'p.pbtn' ).css( 'text-align' ) ) { 305 if ( 'none' == $align.val() ) { 306 $align.val( '' ); 307 } 308 } 281 309 <?php 282 310 } … … 300 328 $attr_inputs.each( function () { 301 329 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 } 303 335 } ); 304 336 … … 353 385 return_text += get_input_attr() + '">' + $icon.val() + ' ' + $text.val() + "</a> \n"; 354 386 355 console.log( return_text );356 387 if ( params.editing ) { 357 388 ed.dom.setStyle( params.button.closest( 'p.pbtn' )[0], 'text-align', '' ); 358 if ( 'none' == $ ('.input-style.align' ).val() ) {389 if ( 'none' == $align.val() ) { 359 390 ed.dom.setStyle( params.button.closest( 'p.pbtn' )[0], 'text-align', 'center' ); 360 391 } 361 } else if ( 'none' == $ ('.input-style.align' ).val() ) {392 } else if ( 'none' == $align.val() ) { 362 393 return_text = '<p class="pbtn" style="clear:both;text-align:center">' + return_text + '</p>'; 363 394 } else { 364 395 return_text = '<p class="pbtn" style="clear:both;">' + return_text + '</p>'; 365 396 } 366 367 397 ed.execCommand( 'mceInsertContent', 0, return_text ); 368 398 ed.windowManager.close(); … … 371 401 $style_inputs.change( preview ); 372 402 $( '.button-text, .button-icon' ).change( preview ); 373 $style_inputs. last().change();403 $style_inputs.filter('[name="font-size"]').change(); 374 404 $prevu.hover( 375 405 function() { -
pootle-button/trunk/pootle-button.php
r1363878 r1366481 4 4 * Plugin URI: http://pootlepress.com/ 5 5 * Description: A cool plugin to add delicious buttons in WordPress editor 6 * Version: 1. 0.06 * Version: 1.1.0 7 7 * Author: pootlepress 8 8 * Author URI: http://pootlepress.com/
Note: See TracChangeset
for help on using the changeset viewer.