Changeset 1013767
- Timestamp:
- 10/25/2014 10:47:39 AM (11 years ago)
- Location:
- jellyfish-counter-widget
- Files:
-
- 12 added
- 6 edited
-
tags/1.3 (added)
-
tags/1.3/css (added)
-
tags/1.3/css/jellyfish-counter.css (added)
-
tags/1.3/jellyfish-counter-widget.php (added)
-
tags/1.3/js (added)
-
tags/1.3/js/jellyfish-counter-loader.js (added)
-
tags/1.3/js/jellyfish-odometer.js (added)
-
tags/1.3/js/odometer.js (added)
-
tags/1.3/languages (added)
-
tags/1.3/languages/jellyfish_cw-en_GB.mo (added)
-
tags/1.3/languages/jellyfish_cw-en_GB.po (added)
-
tags/1.3/readme.txt (added)
-
trunk/css/jellyfish-counter.css (modified) (1 diff)
-
trunk/jellyfish-counter-widget.php (modified) (7 diffs)
-
trunk/js/jellyfish-odometer.js (modified) (2 diffs)
-
trunk/languages/jellyfish_cw-en_GB.mo (modified) (previous)
-
trunk/languages/jellyfish_cw-en_GB.po (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jellyfish-counter-widget/trunk/css/jellyfish-counter.css
r1009887 r1013767 1 1 /* Counter container styles, you probably don't need to change these */ 2 2 .jellyfish-counter { 3 text-align: center;4 3 width: auto; 5 4 overflow: hidden; 6 5 vertical-align: top; 6 } 7 8 .jcw-left, .jcw-center, .jcw-right { 9 display: block; 10 } 11 12 .jcw-left { 13 text-align: left; 14 } 15 16 .jcw-right { 17 text-align: right; 18 } 19 20 .jcw-center { 21 text-align: center; 22 } 23 24 .jcw-inline { 25 display: inline-block; 26 text-align: left; 27 vertical-align: middle; 7 28 } 8 29 -
jellyfish-counter-widget/trunk/jellyfish-counter-widget.php
r1009887 r1013767 60 60 'digit_padding' => 0, 61 61 'digit_style' => '', 62 'alignment' => 'center', 62 63 'bustedness' => 2, 63 64 'flat' => false, … … 103 104 data-digit-padding="' . esc_attr( $a['digit_padding'] ) .'" 104 105 data-digit-style="' . esc_attr( $a['digit_style'] ) .'" 106 data-alignment="' . esc_attr( $a['alignment'] ) .'" 105 107 data-bustedness="' . esc_attr( $a['bustedness'] ) .'" 106 108 data-flat="' . esc_attr( $a['flat'] ) .'" … … 147 149 $digit_bustedness = ( is_numeric( $instance['digit_bustedness'] ) ? $instance['digit_bustedness'] : 2 ); 148 150 151 $alignment = ( !empty( $instance['alignment'] ) ? $instance['alignment'] : 'center' ); 149 152 $digit_style = ( !empty( $instance['digit_style'] ) ? $instance['digit_style'] : 'font-family: Courier New, Courier, monospace; font-weight: 900;' ); 150 153 $widget_title = ( !empty( $instance['widget_title'] ) ? $instance['widget_title'] : 'Counter' ); … … 328 331 </p> 329 332 <p> 333 <label for="<?php echo $this->get_field_id( 'alignment' ); ?>"> 334 <?php _e( 'Counter Alignment:', 'jellyfish_cw' ); ?> 335 <select id="<?php echo $this->get_field_id( 'alignment' ); ?>" 336 name="<?php echo $this->get_field_name( 'alignment' ); ?>"> 337 <option value="left" 338 <?php selected( $alignment, 'left' ); ?>> 339 <?php _e( 'Left', 'jellyfish_cw' ); ?></option> 340 <option value="center" 341 <?php selected( $alignment, 'center' ); ?>> 342 <?php _e( 'Center', 'jellyfish_cw' ); ?></option> 343 <option value="right" 344 <?php selected( $alignment, 'right' ); ?>> 345 <?php _e( 'Right', 'jellyfish_cw' ); ?></option> 346 </select> 347 </label> 348 </p> 349 <p> 330 350 <label for="<?php echo $this->get_field_id( 'digit_height' ); ?>"> 331 351 <?php _e( 'Digit Height:', 'jellyfish_cw' ); ?> … … 411 431 $instance['after_text'] = sanitize_text_field( $new_instance['after_text'] ); 412 432 $instance['direction'] = sanitize_text_field( $new_instance['direction'] ); 433 $instance['alignment'] = sanitize_text_field( $new_instance['alignment'] ); 413 434 $instance['format'] = sanitize_text_field( $new_instance['format'] ); 414 435 … … 501 522 $digit_bustedness = $instance['digit_bustedness']; 502 523 $digit_style = $instance['digit_style']; 524 $alignment = $instance['alignment']; 503 525 $widget_title = $instance['widget_title']; 504 526 $before_text = esc_attr( $instance['before_text'] ); … … 552 574 data-digit-padding="' . $digit_padding .'" 553 575 data-digit-style="' . $digit_style .'" 576 data-alignment="' . $alignment .'" 554 577 data-bustedness="' . $digit_bustedness .'" 555 578 data-flat="' . $disable_depth .'" -
jellyfish-counter-widget/trunk/js/jellyfish-odometer.js
r1009887 r1013767 39 39 this.bustedness = 2; 40 40 this.digitStyle = ''; 41 this.alignment = 'center'; 41 42 this.currentValue = -1; 42 43 this.flat = false; … … 171 172 // render the complete odometer into the dom 172 173 this.drawOdometer = function(container) { 174 switch(this.alignment) { 175 case 'left': 176 container.className += ' jcw-left'; 177 break; 178 case 'right': 179 container.className += ' jcw-right'; 180 break; 181 case 'inline': 182 container.className += ' jcw-inline'; 183 break; 184 default: 185 container.className += ' jcw-center'; 186 } 173 187 var odometerDiv = document.createElement("div"); 174 188 odometerDiv.className = "jcw-odometer-div"; -
jellyfish-counter-widget/trunk/languages/jellyfish_cw-en_GB.po
r1009887 r1013767 3 3 "Project-Id-Version: Jellyfish Counter Widget v1.0\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 2014- 09-19 19:14+0930\n"6 "PO-Revision-Date: 2014- 09-19 19:15+0930\n"5 "POT-Creation-Date: 2014-10-25 20:29+0930\n" 6 "PO-Revision-Date: 2014-10-25 20:31+0930\n" 7 7 "Last-Translator: Rob Miller <rob@strawberryjellyfish.com>\n" 8 8 "Language-Team: \n" … … 21 21 22 22 # @ jellyfish_cw 23 #: jellyfish-counter-widget.php: 9423 #: jellyfish-counter-widget.php:177 24 24 msgid "Start Value:" 25 25 msgstr "Start Value:" 26 26 27 27 # @ jellyfish_cw 28 #: jellyfish-counter-widget.php:1 0428 #: jellyfish-counter-widget.php:187 29 29 msgid "This counter is active, the current count is" 30 30 msgstr "This counter is active, the current count is" 31 31 32 32 # @ jellyfish_cw 33 #: jellyfish-counter-widget.php:1 0533 #: jellyfish-counter-widget.php:188 34 34 msgid "Changing the start value will restart the counter." 35 35 msgstr "Changing the start value will restart the counter." 36 36 37 37 # @ jellyfish_cw 38 #: jellyfish-counter-widget.php:1 1138 #: jellyfish-counter-widget.php:195 39 39 msgid "End Value:" 40 40 msgstr "End Value:" 41 41 42 42 # @ jellyfish_cw 43 #: jellyfish-counter-widget.php: 12243 #: jellyfish-counter-widget.php:206 44 44 msgid "Counter Type:" 45 45 msgstr "Counter Type:" 46 46 47 47 # @ jellyfish_cw 48 #: jellyfish-counter-widget.php: 12748 #: jellyfish-counter-widget.php:211 49 49 msgid "Count Up" 50 50 msgstr "Count Up" 51 51 52 52 # @ jellyfish_cw 53 #: jellyfish-counter-widget.php: 13053 #: jellyfish-counter-widget.php:214 54 54 msgid "Static" 55 55 msgstr "Static" 56 56 57 57 # @ jellyfish_cw 58 #: jellyfish-counter-widget.php: 13358 #: jellyfish-counter-widget.php:217 59 59 msgid "Count Down" 60 60 msgstr "Count Down" 61 61 62 62 # @ jellyfish_cw 63 #: jellyfish-counter-widget.php: 14363 #: jellyfish-counter-widget.php:227 64 64 msgid "Continuous Counter" 65 65 msgstr "Continuous Counter" 66 66 67 67 # @ jellyfish_cw 68 #: jellyfish-counter-widget.php: 14768 #: jellyfish-counter-widget.php:231 69 69 msgid "" 70 70 "Counts continuously in the background, starts as soon as this widget is " … … 75 75 76 76 # @ jellyfish_cw 77 #: jellyfish-counter-widget.php: 15277 #: jellyfish-counter-widget.php:236 78 78 msgid "Continuous Interval:" 79 79 msgstr "Continuous Interval:" 80 80 81 81 # @ jellyfish_cw 82 #: jellyfish-counter-widget.php: 15982 #: jellyfish-counter-widget.php:243 83 83 msgid "seconds" 84 84 msgstr "seconds" 85 85 86 86 # @ jellyfish_cw 87 #: jellyfish-counter-widget.php: 16387 #: jellyfish-counter-widget.php:247 88 88 msgid "How often a continuous style counter updates" 89 89 msgstr "How often a continuous style counter updates" 90 90 91 91 # @ jellyfish_cw 92 #: jellyfish-counter-widget.php: 16792 #: jellyfish-counter-widget.php:251 93 93 msgid "Appearance" 94 94 msgstr "Appearance" 95 95 96 96 # @ jellyfish_cw 97 #: jellyfish-counter-widget.php: 17097 #: jellyfish-counter-widget.php:254 98 98 msgid "Widget Title:" 99 99 msgstr "Widget Title:" 100 100 101 101 # @ jellyfish_cw 102 #: jellyfish-counter-widget.php: 184102 #: jellyfish-counter-widget.php:269 103 103 msgid "Hide Title" 104 104 msgstr "Hide Title" 105 105 106 106 # @ jellyfish_cw 107 #: jellyfish-counter-widget.php: 189107 #: jellyfish-counter-widget.php:274 108 108 msgid "Text to display before counter:" 109 109 msgstr "Text to display before counter:" 110 110 111 111 # @ jellyfish_cw 112 #: jellyfish-counter-widget.php: 194112 #: jellyfish-counter-widget.php:280 113 113 msgid "Text to display after counter:" 114 114 msgstr "Text to display after counter:" 115 115 116 116 # @ jellyfish_cw 117 #: jellyfish-counter-widget.php: 199117 #: jellyfish-counter-widget.php:286 118 118 msgid "Number of Digits:" 119 119 msgstr "Number of Digits:" 120 120 121 #: jellyfish-counter-widget.php:2 10121 #: jellyfish-counter-widget.php:297 122 122 msgid "Format:" 123 123 msgstr "Format:" 124 124 125 #: jellyfish-counter-widget.php: 219125 #: jellyfish-counter-widget.php:306 126 126 msgid "" 127 127 "Allows a custom format for the counter e.g $00.00. This option with override " … … 134 134 135 135 # @ jellyfish_cw 136 #: jellyfish-counter-widget.php: 228136 #: jellyfish-counter-widget.php:314 137 137 msgid "Disable Tenths" 138 138 msgstr "Disable Tenths" 139 139 140 140 # @ jellyfish_cw 141 #: jellyfish-counter-widget.php: 233141 #: jellyfish-counter-widget.php:319 142 142 msgid "Animation Speed:" 143 143 msgstr "Animation Speed:" 144 144 145 145 # @ jellyfish_cw 146 #: jellyfish-counter-widget.php: 243146 #: jellyfish-counter-widget.php:329 147 147 msgid "A value (1-100). Not used for continuous style counters" 148 148 msgstr "A value (1-100). Not used for continuous style counters" 149 149 150 150 # @ jellyfish_cw 151 #: jellyfish-counter-widget.php:248 151 #: jellyfish-counter-widget.php:334 152 msgid "Counter Alignment:" 153 msgstr "Counter Alignment" 154 155 #: jellyfish-counter-widget.php:339 156 msgid "Left" 157 msgstr "Left" 158 159 #: jellyfish-counter-widget.php:342 160 msgid "Center" 161 msgstr "Centre" 162 163 #: jellyfish-counter-widget.php:345 164 msgid "Right" 165 msgstr "Right" 166 167 # @ jellyfish_cw 168 #: jellyfish-counter-widget.php:351 152 169 msgid "Digit Height:" 153 170 msgstr "Digit Height:" 154 171 155 172 # @ jellyfish_cw 156 #: jellyfish-counter-widget.php: 260173 #: jellyfish-counter-widget.php:363 157 174 msgid "Digit Width:" 158 175 msgstr "Digit Width:" 159 176 160 177 # @ jellyfish_cw 161 #: jellyfish-counter-widget.php: 272178 #: jellyfish-counter-widget.php:375 162 179 msgid "Digit Padding:" 163 180 msgstr "Digit Padding:" 164 181 165 182 # @ jellyfish_cw 166 #: jellyfish-counter-widget.php: 287183 #: jellyfish-counter-widget.php:390 167 184 msgid "Disable 3D effect" 168 185 msgstr "Disable 3D effect" 169 186 170 187 # @ jellyfish_cw 171 #: jellyfish-counter-widget.php: 292188 #: jellyfish-counter-widget.php:395 172 189 msgid "Bustedness:" 173 190 msgstr "Bustedness:" 174 191 175 192 # @ jellyfish_cw 176 #: jellyfish-counter-widget.php: 305193 #: jellyfish-counter-widget.php:408 177 194 msgid "Digit Style:" 178 195 msgstr "Digit Style:" 179 196 180 197 # @ jellyfish_cw 181 #: jellyfish-counter-widget.php: 315198 #: jellyfish-counter-widget.php:418 182 199 msgid "CSS entered here will alter the appearance of the digits" 183 200 msgstr "CSS entered here will alter the appearance of the digits" -
jellyfish-counter-widget/trunk/readme.txt
r1009923 r1013767 7 7 Requires at least: 3.0 8 8 Tested up to: 4.0 9 Stable tag: 1. 39 Stable tag: 1.4 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 72 72 73 73 == Changelog == 74 75 =1.4= 76 * New Counter alignment option for widgets and shortcodes, easily align a 77 counter to left, center or right without touching style sheets. Additionally 78 a shortcode counter can be rendered inline within a line of content. 74 79 75 80 = 1.3 = … … 214 219 * digit_padding : number, pixel padding for digits 215 220 * digit_style : a string, custom css styles for the digits 221 * alignment : 'left', 'center', 'right', 'inline' overall counter alignment 216 222 * bustedness : a number, misalignment of digits 217 223 * flat : true/false, don't show 3d effect, show 3d effect
Note: See TracChangeset
for help on using the changeset viewer.