Version Description
- Internationalization fix.
- Code improvements.
Download this release
Release Info
Developer | sksmatt |
Plugin | Dynamic "To Top" Plugin |
Version | 3.3 |
Comparing to | |
See all releases |
Code changes from version 3.2 to 3.3
- dynamic-to-top.php +23 -2
- inc/dynamic-to-top-class.php +42 -26
- inc/dynamic-to-top-options.php +3 -2
- js/dynamic.to.top.dev.js +1 -1
- js/dynamic.to.top.min.js +1 -1
- js/{dynamic.to.top.settings.js → dynamic.to.top.settings.dev.js} +6 -7
- js/dynamic.to.top.settings.min.js +15 -0
- lan/dynamic-to-top-es_ES.mo +0 -0
- lan/dynamic-to-top-es_ES.po +100 -49
- readme.txt +6 -2
dynamic-to-top.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Dynamic To Top
|
4 |
-
Version: 3.
|
5 |
Plugin URI: http://www.mattvarone.com/featured-content/dynamic-to-top/
|
6 |
Description: Adds an automatic and dynamic "To Top" button to scroll long pages back to the top.
|
7 |
Author: Matt Varone
|
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
30 |
|--------------------------------------------------------------------------
|
31 |
*/
|
32 |
|
33 |
-
define( 'MV_DYNAMIC_TO_TOP_VERSION', '3.
|
34 |
|
35 |
/*
|
36 |
|--------------------------------------------------------------------------
|
@@ -51,6 +51,11 @@ define( 'MV_DYNAMIC_TO_TOP_VERSION', '3.2' );
|
|
51 |
|
52 |
if ( ! function_exists( 'mv_dynamic_to_top_plugins_loaded' ) ) {
|
53 |
function mv_dynamic_to_top_plugins_loaded() {
|
|
|
|
|
|
|
|
|
|
|
54 |
if ( is_admin() )
|
55 |
require_once( plugin_dir_path( __FILE__ ) . 'inc/dynamic-to-top-options.php' );
|
56 |
else
|
@@ -59,6 +64,22 @@ if ( ! function_exists( 'mv_dynamic_to_top_plugins_loaded' ) ) {
|
|
59 |
}
|
60 |
add_action( 'plugins_loaded', 'mv_dynamic_to_top_plugins_loaded' );
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
/*
|
63 |
|--------------------------------------------------------------------------
|
64 |
| DYNAMIC TO TOP ACTIVATION
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Dynamic To Top
|
4 |
+
Version: 3.3
|
5 |
Plugin URI: http://www.mattvarone.com/featured-content/dynamic-to-top/
|
6 |
Description: Adds an automatic and dynamic "To Top" button to scroll long pages back to the top.
|
7 |
Author: Matt Varone
|
30 |
|--------------------------------------------------------------------------
|
31 |
*/
|
32 |
|
33 |
+
define( 'MV_DYNAMIC_TO_TOP_VERSION', '3.3' );
|
34 |
|
35 |
/*
|
36 |
|--------------------------------------------------------------------------
|
51 |
|
52 |
if ( ! function_exists( 'mv_dynamic_to_top_plugins_loaded' ) ) {
|
53 |
function mv_dynamic_to_top_plugins_loaded() {
|
54 |
+
|
55 |
+
// translation
|
56 |
+
add_action( 'init', 'mv_dynamic_to_top_load_textdomain' );
|
57 |
+
|
58 |
+
// require files
|
59 |
if ( is_admin() )
|
60 |
require_once( plugin_dir_path( __FILE__ ) . 'inc/dynamic-to-top-options.php' );
|
61 |
else
|
64 |
}
|
65 |
add_action( 'plugins_loaded', 'mv_dynamic_to_top_plugins_loaded' );
|
66 |
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Load Textdomain
|
70 |
+
*
|
71 |
+
* @access private
|
72 |
+
* @since 3.3
|
73 |
+
* @return void
|
74 |
+
*/
|
75 |
+
|
76 |
+
if ( ! function_exists( 'mv_dynamic_to_top_load_textdomain' ) ) {
|
77 |
+
function mv_dynamic_to_top_load_textdomain() {
|
78 |
+
// load textdomain
|
79 |
+
load_plugin_textdomain( 'dynamic-to-top', false, dirname( plugin_basename( __FILE__ ) ) . '/lan' );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
/*
|
84 |
|--------------------------------------------------------------------------
|
85 |
| DYNAMIC TO TOP ACTIVATION
|
inc/dynamic-to-top-class.php
CHANGED
@@ -12,33 +12,11 @@ global $OBJ_dynamic_to_top;
|
|
12 |
if ( ! class_exists( 'MV_Dynamic_To_Top' ) ) {
|
13 |
class MV_Dynamic_To_Top
|
14 |
{
|
15 |
-
|
16 |
public $options;
|
17 |
|
18 |
-
|
19 |
-
private $defaults
|
20 |
-
'speed' => 1000,
|
21 |
-
'distance' => 200,
|
22 |
-
'easing' => 'in-out',
|
23 |
-
'position' => 'bottom-right',
|
24 |
-
'padding_top_bottom' => '21',
|
25 |
-
'padding_left_right' => '20',
|
26 |
-
'font_size' => '1',
|
27 |
-
'text_color' => '#fff',
|
28 |
-
'bold' => '0',
|
29 |
-
'text_shadow' => '0',
|
30 |
-
'shadow_color' => '#111',
|
31 |
-
'background_color' => '#272727',
|
32 |
-
'border_color' => '#000',
|
33 |
-
'border_width' => '1',
|
34 |
-
'radius' => '9',
|
35 |
-
'shadow' => '1',
|
36 |
-
'inset' => '1',
|
37 |
-
'text' => '0',
|
38 |
-
'margin'=> 20,
|
39 |
-
'text_version' => '0',
|
40 |
-
);
|
41 |
-
|
42 |
|
43 |
/**
|
44 |
* Dynamic To Top
|
@@ -75,6 +53,44 @@ if ( ! class_exists( 'MV_Dynamic_To_Top' ) ) {
|
|
75 |
$this->enqueue_assets();
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
/**
|
80 |
* Get Options
|
@@ -87,7 +103,7 @@ if ( ! class_exists( 'MV_Dynamic_To_Top' ) ) {
|
|
87 |
*/
|
88 |
|
89 |
function get_options() {
|
90 |
-
$this->options = wp_parse_args( get_option( 'dynamic_to_top' ), $this->
|
91 |
}
|
92 |
|
93 |
|
12 |
if ( ! class_exists( 'MV_Dynamic_To_Top' ) ) {
|
13 |
class MV_Dynamic_To_Top
|
14 |
{
|
15 |
+
// Holds the current options
|
16 |
public $options;
|
17 |
|
18 |
+
// Holds the default options
|
19 |
+
private $defaults;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
/**
|
22 |
* Dynamic To Top
|
53 |
$this->enqueue_assets();
|
54 |
}
|
55 |
|
56 |
+
/**
|
57 |
+
* Get Defaults
|
58 |
+
*
|
59 |
+
* Returns default values.
|
60 |
+
*
|
61 |
+
* @package Dynamic To Top
|
62 |
+
* @subpackage Main Class
|
63 |
+
* @since 3.3
|
64 |
+
*/
|
65 |
+
|
66 |
+
function get_defaults() {
|
67 |
+
|
68 |
+
$defaults = array(
|
69 |
+
'speed' => 1000,
|
70 |
+
'distance' => 200,
|
71 |
+
'easing' => 'in-out',
|
72 |
+
'position' => 'bottom-right',
|
73 |
+
'padding_top_bottom' => '17',
|
74 |
+
'padding_left_right' => '16',
|
75 |
+
'font_size' => '1',
|
76 |
+
'text_color' => '#fff',
|
77 |
+
'bold' => '0',
|
78 |
+
'text_shadow' => '0',
|
79 |
+
'shadow_color' => '#111',
|
80 |
+
'background_color' => '#272727',
|
81 |
+
'border_color' => '#000',
|
82 |
+
'border_width' => '1',
|
83 |
+
'radius' => '30',
|
84 |
+
'shadow' => '1',
|
85 |
+
'inset' => '1',
|
86 |
+
'text' => '0',
|
87 |
+
'margin'=> 20,
|
88 |
+
'text_version' => '0',
|
89 |
+
);
|
90 |
+
|
91 |
+
return apply_filters( 'mv_dynamic_to_top_default_values', $defaults );
|
92 |
+
}
|
93 |
+
|
94 |
|
95 |
/**
|
96 |
* Get Options
|
103 |
*/
|
104 |
|
105 |
function get_options() {
|
106 |
+
$this->options = wp_parse_args( get_option( 'dynamic_to_top' ), $this->get_defaults() );
|
107 |
}
|
108 |
|
109 |
|
inc/dynamic-to-top-options.php
CHANGED
@@ -213,7 +213,8 @@ if ( ! function_exists( 'mv_dynamic_to_top_scripts' ) ) {
|
|
213 |
wp_enqueue_script( 'jquery-ui-mouse', plugin_dir_url( dirname( __FILE__ ) ) . 'js/libs/jquery.ui.mouse.js', array( 'jquery-ui-widget' ), '1.8.14' );
|
214 |
wp_enqueue_script( 'jquery-ui-slider', plugin_dir_url( dirname( __FILE__ ) ) . 'js/libs/jquery.ui.slider.js', array( 'jquery-ui-mouse' ), '1.8.14' );
|
215 |
}
|
216 |
-
|
|
|
217 |
}
|
218 |
}
|
219 |
}
|
@@ -689,7 +690,7 @@ if ( ! function_exists( 'mv_dynamic_to_top_do_select' ) ) {
|
|
689 |
if ( $value == $option_slug )
|
690 |
$selected = 'selected="selected"';
|
691 |
|
692 |
-
$options_out .= '<option
|
693 |
}
|
694 |
|
695 |
if ( $desc != "" )
|
213 |
wp_enqueue_script( 'jquery-ui-mouse', plugin_dir_url( dirname( __FILE__ ) ) . 'js/libs/jquery.ui.mouse.js', array( 'jquery-ui-widget' ), '1.8.14' );
|
214 |
wp_enqueue_script( 'jquery-ui-slider', plugin_dir_url( dirname( __FILE__ ) ) . 'js/libs/jquery.ui.slider.js', array( 'jquery-ui-mouse' ), '1.8.14' );
|
215 |
}
|
216 |
+
$env = ( WP_DEBUG || SCRIPT_DEBUG ) ? 'dev' : 'min';
|
217 |
+
wp_enqueue_script( 'dynamic-to-top-settings', plugin_dir_url( dirname( __FILE__ ) ) . 'js/dynamic.to.top.settings.'.$env.'.js', array( 'jquery-ui-slider', 'farbtastic' ), '1.0', true );
|
218 |
}
|
219 |
}
|
220 |
}
|
690 |
if ( $value == $option_slug )
|
691 |
$selected = 'selected="selected"';
|
692 |
|
693 |
+
$options_out .= '<option value="'.sanitize_title( $option ).'" '.$selected.' >'.$label.'</option>';
|
694 |
}
|
695 |
|
696 |
if ( $desc != "" )
|
js/dynamic.to.top.dev.js
CHANGED
@@ -33,7 +33,7 @@ var mv_dynamic_to_top;
|
|
33 |
}, settings.speed, settings.easing);
|
34 |
return false;
|
35 |
});
|
36 |
-
$(window).scroll
|
37 |
var sd = jQuery(window).scrollTop();
|
38 |
if (typeof document.body.style.maxHeight === "undefined") {
|
39 |
$toTop.css({
|
33 |
}, settings.speed, settings.easing);
|
34 |
return false;
|
35 |
});
|
36 |
+
$(window).on( 'scroll', function () {
|
37 |
var sd = jQuery(window).scrollTop();
|
38 |
if (typeof document.body.style.maxHeight === "undefined") {
|
39 |
$toTop.css({
|
js/dynamic.to.top.min.js
CHANGED
@@ -8,5 +8,5 @@
|
|
8 |
*/
|
9 |
var mv_dynamic_to_top;(function($,mv_dynamic_to_top){jQuery.fn.DynamicToTop=function(options){var defaults={text:mv_dynamic_to_top.text,min:parseInt(mv_dynamic_to_top.min,10),fade_in:600,fade_out:400,speed:parseInt(mv_dynamic_to_top.speed,10),easing:mv_dynamic_to_top.easing,version:mv_dynamic_to_top.version,id:'dynamic-to-top'},settings=$.extend(defaults,options);if(settings.version===""||settings.version==='0'){settings.text='<span> </span>';}
|
10 |
if(!$.isFunction(settings.easing)){settings.easing='linear';}
|
11 |
-
var $toTop=$('<a href=\"#\" id=\"'+settings.id+'\"></a>').html(settings.text);$toTop.hide().appendTo('body').click(function(){$('html, body').stop().animate({scrollTop:0},settings.speed,settings.easing);return false;});$(window).scroll
|
12 |
if(sd>settings.min){$toTop.fadeIn(settings.fade_in);}else{$toTop.fadeOut(settings.fade_out);}});};$('body').DynamicToTop();})(jQuery,mv_dynamic_to_top);
|
8 |
*/
|
9 |
var mv_dynamic_to_top;(function($,mv_dynamic_to_top){jQuery.fn.DynamicToTop=function(options){var defaults={text:mv_dynamic_to_top.text,min:parseInt(mv_dynamic_to_top.min,10),fade_in:600,fade_out:400,speed:parseInt(mv_dynamic_to_top.speed,10),easing:mv_dynamic_to_top.easing,version:mv_dynamic_to_top.version,id:'dynamic-to-top'},settings=$.extend(defaults,options);if(settings.version===""||settings.version==='0'){settings.text='<span> </span>';}
|
10 |
if(!$.isFunction(settings.easing)){settings.easing='linear';}
|
11 |
+
var $toTop=$('<a href=\"#\" id=\"'+settings.id+'\"></a>').html(settings.text);$toTop.hide().appendTo('body').click(function(){$('html, body').stop().animate({scrollTop:0},settings.speed,settings.easing);return false;});$(window).on('scroll',function(){var sd=jQuery(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$toTop.css({'position':'absolute','top':sd+$(window).height()-mv_dynamic_to_top.margin});}
|
12 |
if(sd>settings.min){$toTop.fadeIn(settings.fade_in);}else{$toTop.fadeOut(settings.fade_out);}});};$('body').DynamicToTop();})(jQuery,mv_dynamic_to_top);
|
js/{dynamic.to.top.settings.js → dynamic.to.top.settings.dev.js}
RENAMED
@@ -89,7 +89,7 @@ jQuery(document).ready(function ($) {
|
|
89 |
jQuery('#slider-picker-speed').slider({
|
90 |
range: "max",
|
91 |
value: slider_3.val(),
|
92 |
-
min:
|
93 |
step: 100,
|
94 |
max: 3000,
|
95 |
slide: function (event, ui) {
|
@@ -233,9 +233,9 @@ jQuery(document).ready(function ($) {
|
|
233 |
|
234 |
function update_position() {
|
235 |
var preview_position = $('#select-position').val();
|
236 |
-
|
237 |
switch (preview_position) {
|
238 |
-
case '
|
239 |
preview.css({
|
240 |
top: '10px',
|
241 |
left: '10px',
|
@@ -244,7 +244,7 @@ jQuery(document).ready(function ($) {
|
|
244 |
});
|
245 |
break;
|
246 |
|
247 |
-
case '
|
248 |
preview.css({
|
249 |
top: '10px',
|
250 |
right: '10px',
|
@@ -253,7 +253,7 @@ jQuery(document).ready(function ($) {
|
|
253 |
});
|
254 |
break;
|
255 |
|
256 |
-
case '
|
257 |
preview.css({
|
258 |
bottom: '10px',
|
259 |
left: '10px',
|
@@ -262,7 +262,7 @@ jQuery(document).ready(function ($) {
|
|
262 |
});
|
263 |
break;
|
264 |
|
265 |
-
case '
|
266 |
preview.css({
|
267 |
bottom: '10px',
|
268 |
right: '10px',
|
@@ -286,7 +286,6 @@ jQuery(document).ready(function ($) {
|
|
286 |
preview.shadow = $('#checkbox-shadow').attr("checked");
|
287 |
preview.inset = $('#checkbox-inset').attr("checked");
|
288 |
preview.bold = $('#checkbox-bold').attr("checked");
|
289 |
-
preview.position = $('#select-position').val();
|
290 |
preview.text_shadow = $('#checkbox-text-shadow').attr("checked");
|
291 |
preview.text_shadow_color = $('#farbtastic-shadow-color').val();
|
292 |
|
89 |
jQuery('#slider-picker-speed').slider({
|
90 |
range: "max",
|
91 |
value: slider_3.val(),
|
92 |
+
min: 100,
|
93 |
step: 100,
|
94 |
max: 3000,
|
95 |
slide: function (event, ui) {
|
233 |
|
234 |
function update_position() {
|
235 |
var preview_position = $('#select-position').val();
|
236 |
+
|
237 |
switch (preview_position) {
|
238 |
+
case 'top-left':
|
239 |
preview.css({
|
240 |
top: '10px',
|
241 |
left: '10px',
|
244 |
});
|
245 |
break;
|
246 |
|
247 |
+
case 'top-right':
|
248 |
preview.css({
|
249 |
top: '10px',
|
250 |
right: '10px',
|
253 |
});
|
254 |
break;
|
255 |
|
256 |
+
case 'bottom-left':
|
257 |
preview.css({
|
258 |
bottom: '10px',
|
259 |
left: '10px',
|
262 |
});
|
263 |
break;
|
264 |
|
265 |
+
case 'bottom-right':
|
266 |
preview.css({
|
267 |
bottom: '10px',
|
268 |
right: '10px',
|
286 |
preview.shadow = $('#checkbox-shadow').attr("checked");
|
287 |
preview.inset = $('#checkbox-inset').attr("checked");
|
288 |
preview.bold = $('#checkbox-bold').attr("checked");
|
|
|
289 |
preview.text_shadow = $('#checkbox-text-shadow').attr("checked");
|
290 |
preview.text_shadow_color = $('#farbtastic-shadow-color').val();
|
291 |
|
js/dynamic.to.top.settings.min.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Dynamic To Top Plugin Settings
|
3 |
+
* http://www.mattvarone.com
|
4 |
+
*
|
5 |
+
* By Matt Varone
|
6 |
+
* @sksmatt
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
jQuery(document).ready(function($){var preview=$('#dynamic-to-top-button'),preview_button_version=$('#dynamic-to-top-button #dtt-image'),preview_text_version=$('#dynamic-to-top-button #dtt-text'),hide_on_button=$('#text-text, #slider-font-size, #checkbox-bold, #checkbox-text-shadow, #farbtastic-text-color, #farbtastic-shadow-color').parent().parent();toggle_text_version();update_preview();update_position();$('#checkbox-text-version').on('click',function(){toggle_text_version();});$('#checkbox-bold, #checkbox-inset, #checkbox-shadow, #checkbox-text-shadow, .colorvalue').on('change',function(){update_preview()});$('#select-position').on('change',function(){update_position();});$('#text-text').on('keyup',function(){update_preview()});$('.ddt-bg-colors a').on('click',function(e){e.preventDefault();$('#dynamic-to-top-preview').css('background-color',$(this).attr('title')||'white');});var slider=jQuery("#slider-radius").hide(),slider_val=jQuery('span#radius-val').html(slider.val());jQuery('#slider-picker-radius').slider({range:"min",value:slider.val(),min:0,max:30,slide:function(event,ui){slider.val(ui.value);slider_val.html(ui.value);preview.css('border-radius',ui.value+'px');}});var slider_2=jQuery("#slider-border-width").hide(),slider_val_2=jQuery('span#border-val').html(slider_2.val());jQuery('#slider-picker-border-width').slider({range:"min",value:slider_2.val(),min:0,max:10,slide:function(event,ui){slider_2.val(ui.value);slider_val_2.html(ui.value);preview.css('border-width',ui.value+'px');}});var slider_3=jQuery('#slider-speed').hide(),slider_val_3=jQuery('span#speed-val').html(slider_3.val());jQuery('#slider-picker-speed').slider({range:"max",value:slider_3.val(),min:100,step:100,max:3000,slide:function(event,ui){slider_3.val(ui.value);slider_val_3.html(ui.value);}});var slider_4=jQuery("#slider-padding-top-bottom").hide(),slider_val_4=jQuery('span#padding-top-bottom-val').html(slider_4.val());jQuery('#slider-picker-padding-top-bottom').slider({range:"min",value:slider_4.val(),min:2,max:21,slide:function(event,ui){slider_4.val(ui.value);slider_val_4.html(ui.value);preview.css({paddingTop:ui.value+'px',paddingBottom:ui.value+'px'});}});var slider_5=jQuery("#slider-padding-left-right").hide(),slider_val_5=jQuery('span#padding-left-right-val').html(slider_5.val());jQuery('#slider-picker-padding-left-right').slider({range:"min",value:slider_5.val(),min:2,max:40,slide:function(event,ui){slider_5.val(ui.value);slider_val_5.html(ui.value);preview.css({paddingLeft:ui.value+'px',paddingRight:ui.value+'px'});}});var slider_6=jQuery("#slider-font-size").hide(),slider_val_6=jQuery('span#font-size-val').html(slider_6.val());jQuery('#slider-picker-font-size').slider({range:"min",value:slider_6.val(),min:0.8,max:2,step:0.05,slide:function(event,ui){slider_6.val(ui.value);slider_val_6.html(ui.value);preview.css({fontSize:ui.value+'em'});}});jQuery('.dtt-slider').css('width','25em');var Picker=function(picker){this.picker=picker;this.input=this.picker.prev().prev();this.anchor=this.picker.prev();this.combined=this.input.add(this.anchor);this.open=false;this.init();}
|
10 |
+
Picker.prototype=function(){var init=function(){this.picker.farbtastic(this.input).hide().css('margin-bottom','15px').on('mouseup',function(){update_preview();});this.combined.on('click',{p:this},function(e){e.preventDefault();tooglePicker.call(e.data.p);});},tooglePicker=function(){var id=this.picker.attr('id');$('.dtt-farbtastic').each(function(){if($(this).attr('id')!=id){var other_prev=$(this).prev();if(other_prev.hasClass('picker-opened')){var open=other_prev.attr('data-open');other_prev.removeClass('picker-opened');other_prev.html(open);$(this).toggle();}}});this.picker.toggle();var open=this.anchor.attr('data-open');if(this.anchor.html()===open){this.anchor.html(this.anchor.attr('data-closed'));this.anchor.addClass('picker-opened');}else{this.anchor.removeClass('picker-opened');this.anchor.html(open);}};return{init:init};}();$('.dtt-farbtastic').each(function(index,item){new Picker($(item));});function toggle_text_version(){if(jQuery('#checkbox-text-version').attr('checked')){preview_button_version.hide();preview_text_version.show();preview.removeClass('button-version');hide_on_button.show();}else{preview_button_version.show().css('display','block');preview_text_version.hide();preview.addClass('button-version');hide_on_button.hide();}}
|
11 |
+
function update_position(){var preview_position=$('#select-position').val();switch(preview_position){case'top-left':preview.css({top:'10px',left:'10px',bottom:'',right:''});break;case'top-right':preview.css({top:'10px',right:'10px',bottom:'',left:''});break;case'bottom-left':preview.css({bottom:'10px',left:'10px',top:'',right:''});break;case'bottom-right':preview.css({bottom:'10px',right:'10px',top:'',left:''});break;}}
|
12 |
+
function update_preview(){preview.text=$('#text-text').val();preview.border_width=$('#slider-border-width').val();preview.border_radius=$('#slider-radius').val();preview.text_color=$('#farbtastic-text-color').val();preview.bg_color=$('#farbtastic-background-color').val();preview.border_color=$('#farbtastic-border-color').val();preview.padding_top_bottom=$('#slider-padding-top-bottom').val();preview.padding_left_right=$('#slider-padding-left-right').val();preview.find('#dtt-text').font_size=$('#slider-font-size').val();preview.shadow=$('#checkbox-shadow').attr("checked");preview.inset=$('#checkbox-inset').attr("checked");preview.bold=$('#checkbox-bold').attr("checked");preview.text_shadow=$('#checkbox-text-shadow').attr("checked");preview.text_shadow_color=$('#farbtastic-shadow-color').val();preview.css({borderStyle:'solid',borderWidth:preview.border_width+'px',borderRadius:preview.border_radius+'px',borderColor:preview.border_color,backgroundColor:preview.bg_color,color:preview.text_color,paddingTop:preview.padding_top_bottom+'px',paddingBottom:preview.padding_top_bottom+'px',paddingLeft:preview.padding_left_right+'px',paddingRight:preview.padding_left_right+'px',fontSize:preview.font_size+'em',}).find('#dtt-text').html(preview.text);if(preview.bold){preview.css('font-weight','bold');}else{preview.css('font-weight','normal');}
|
13 |
+
if(preview.shadow){preview.addClass('dynamic-to-top-shadow');}else{preview.removeClass('dynamic-to-top-shadow');}
|
14 |
+
if(preview.inset){preview.addClass('dynamic-to-top-inset');}else{preview.removeClass('dynamic-to-top-inset');}
|
15 |
+
if(preview.text_shadow){preview.css('text-shadow','0 1px 0 '+preview.text_shadow_color);}else{preview.css('text-shadow','');}}});
|
lan/dynamic-to-top-es_ES.mo
CHANGED
Binary file
|
lan/dynamic-to-top-es_ES.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Dynamic To Top\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: Matt Varone <plugins@mattvarone.com>\n"
|
8 |
"Language-Team: Matt Varone\n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -15,6 +15,16 @@ msgstr ""
|
|
15 |
"X-Poedit-Country: ARGENTINA\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
#: inc/dynamic-to-top-options.php:50
|
19 |
msgid "Behavior"
|
20 |
msgstr "Comportamiento"
|
@@ -103,137 +113,178 @@ msgstr "Insertar Resaltado"
|
|
103 |
msgid "Shadow"
|
104 |
msgstr "Sombra"
|
105 |
|
106 |
-
#: inc/dynamic-to-top-options.php:
|
107 |
-
|
108 |
-
|
|
|
109 |
|
110 |
-
#: inc/dynamic-to-top-options.php:
|
111 |
-
msgid "
|
112 |
-
msgstr "
|
113 |
|
114 |
-
#: inc/dynamic-to-top-options.php:
|
115 |
msgid "Save Changes"
|
116 |
msgstr "Guardar Cambios"
|
117 |
|
118 |
-
#: inc/dynamic-to-top-options.php:
|
119 |
msgid "<strong>Dynamic To Top</strong> plugin brought to you by"
|
120 |
msgstr "<strong>Dynamic To Top</strong> plugin por "
|
121 |
|
122 |
-
#: inc/dynamic-to-top-options.php:
|
|
|
|
|
|
|
|
|
123 |
msgid "Preview over"
|
124 |
msgstr "Previsualizar sobre"
|
125 |
|
126 |
-
#: inc/dynamic-to-top-options.php:
|
127 |
msgid "black"
|
128 |
msgstr "negro"
|
129 |
|
130 |
-
#: inc/dynamic-to-top-options.php:
|
131 |
msgid "grey"
|
132 |
msgstr "gris"
|
133 |
|
134 |
-
#: inc/dynamic-to-top-options.php:
|
135 |
msgid "white"
|
136 |
msgstr "blanco"
|
137 |
|
138 |
-
#: inc/dynamic-to-top-options.php:
|
139 |
msgid "Color for the button border."
|
140 |
msgstr "Color para el borde del botón."
|
141 |
|
142 |
-
#: inc/dynamic-to-top-options.php:
|
143 |
msgid "Background color for the button."
|
144 |
msgstr "Color para el fondo del botón."
|
145 |
|
146 |
-
#: inc/dynamic-to-top-options.php:
|
147 |
msgid "Button text color."
|
148 |
msgstr "Color del texto del botón."
|
149 |
|
150 |
-
#: inc/dynamic-to-top-options.php:
|
151 |
-
#: inc/dynamic-to-top-options.php:
|
152 |
msgid "Text shadow color."
|
153 |
msgstr "Color de la sombra del texto."
|
154 |
|
155 |
-
#: inc/dynamic-to-top-options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
msgid "<a href=\"http://gsgd.co.uk/sandbox/jquery/easing\" title=\"Easing type\">Easing type</a> used to scroll the page up."
|
157 |
msgstr "Tipo de <a href=\"http://gsgd.co.uk/sandbox/jquery/easing\" title=\"Easing type\">Easing</a> usado para desplazar la página."
|
158 |
|
159 |
-
#: inc/dynamic-to-top-options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
msgid "Button position."
|
161 |
msgstr "Posición del botón."
|
162 |
|
163 |
-
#: inc/dynamic-to-top-options.php:
|
164 |
msgid "Time it takes for the page to scroll up. Less for faster. ( <span id=\"speed-val\"></span> Milliseconds )"
|
165 |
msgstr "Tiempo que le lleva a la página desplazarse. Menos para mas rápido. ( <span id=\"speed-val\"></span> Milisegundos )"
|
166 |
|
167 |
-
#: inc/dynamic-to-top-options.php:
|
168 |
msgid "Button text size. ( <span id=\"font-size-val\"></span> Em/s )"
|
169 |
msgstr "Tamaño del texto. ( <span id=\"font-size-val\"></span> Em/s )"
|
170 |
|
171 |
-
#: inc/dynamic-to-top-options.php:
|
172 |
msgid "Spacing on Top and Bottom. ( <span id=\"padding-top-bottom-val\"></span>px )"
|
173 |
msgstr "Espaciado hacia arriba y abajo. ( <span id=\"padding-top-bottom-val\"></span>px )"
|
174 |
|
175 |
-
#: inc/dynamic-to-top-options.php:
|
176 |
msgid "Spacing on Left and Right. ( <span id=\"padding-left-right-val\"></span>px )"
|
177 |
msgstr "Espaciado a los laterales. ( <span id=\"padding-left-right-val\"></span>px )"
|
178 |
|
179 |
-
#: inc/dynamic-to-top-options.php:
|
180 |
msgid "Button border width"
|
181 |
msgstr "Ancho del borde del botón"
|
182 |
|
183 |
-
#: inc/dynamic-to-top-options.php:
|
184 |
msgid "Button border radius"
|
185 |
msgstr "Radio del borde del botón"
|
186 |
|
187 |
-
#: inc/dynamic-to-top-options.php:
|
188 |
msgid "Distance from top to show the button. ( Pixels )"
|
189 |
msgstr "Distancia a partir de la cual se debe mostrar el botón. ( Pixeles )"
|
190 |
|
191 |
-
#: inc/dynamic-to-top-options.php:
|
192 |
-
msgid "To Top"
|
193 |
-
msgstr "Ir Arriba"
|
194 |
-
|
195 |
-
#: inc/dynamic-to-top-options.php:492
|
196 |
msgid "Text displayed on the button."
|
197 |
msgstr "Texto del botón."
|
198 |
|
199 |
-
#: inc/dynamic-to-top-options.php:
|
200 |
-
#: inc/dynamic-to-top-options.php:
|
201 |
-
#: inc/dynamic-to-top-options.php:
|
202 |
-
#: inc/dynamic-to-top-options.php:
|
203 |
-
#: inc/dynamic-to-top-options.php:
|
204 |
-
#: inc/dynamic-to-top-options.php:
|
205 |
msgid "Yes"
|
206 |
msgstr "Si"
|
207 |
|
208 |
-
#: inc/dynamic-to-top-options.php:
|
209 |
msgid "Disable the button on mobile browsers."
|
210 |
msgstr "Deshabilitar el botón en celulares y móviles."
|
211 |
|
212 |
-
#: inc/dynamic-to-top-options.php:
|
213 |
msgid "Show a text version instead of the arrow up icon."
|
214 |
msgstr "Usar versión de texto."
|
215 |
|
216 |
-
#: inc/dynamic-to-top-options.php:
|
217 |
msgid "Add CSS3 inset-highlight."
|
218 |
msgstr "Usar CSS3 inset-highlight."
|
219 |
|
220 |
-
#: inc/dynamic-to-top-options.php:
|
221 |
-
msgid "Add CSS3 shadow."
|
222 |
-
msgstr "
|
223 |
|
224 |
-
#: inc/dynamic-to-top-options.php:
|
225 |
msgid "Make the text bold."
|
226 |
msgstr "Hace el texto negrita."
|
227 |
|
228 |
-
#: inc/dynamic-to-top-options.php:
|
229 |
msgid "Add a subtle text shadow."
|
230 |
msgstr "Agrega una sombra sutil al texto."
|
231 |
|
232 |
-
#: inc/dynamic-to-top-options.php:
|
233 |
msgid "close"
|
234 |
msgstr "cerrar"
|
235 |
|
236 |
-
#: inc/dynamic-to-top-options.php:
|
237 |
msgid "select a color"
|
238 |
msgstr "seleccionar un color"
|
239 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Dynamic To Top\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-06-19 08:45-0300\n"
|
6 |
+
"PO-Revision-Date: 2012-06-19 08:47-0300\n"
|
7 |
"Last-Translator: Matt Varone <plugins@mattvarone.com>\n"
|
8 |
"Language-Team: Matt Varone\n"
|
9 |
"MIME-Version: 1.0\n"
|
15 |
"X-Poedit-Country: ARGENTINA\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
+
#: inc/dynamic-to-top-options.php:29
|
19 |
+
#: inc/dynamic-to-top-options.php:95
|
20 |
+
msgid "Dynamic To Top Options"
|
21 |
+
msgstr "Opciones de Dynamic To Top"
|
22 |
+
|
23 |
+
#: inc/dynamic-to-top-options.php:29
|
24 |
+
#: inc/dynamic-to-top-options.php:491
|
25 |
+
msgid "To Top"
|
26 |
+
msgstr "Ir Arriba"
|
27 |
+
|
28 |
#: inc/dynamic-to-top-options.php:50
|
29 |
msgid "Behavior"
|
30 |
msgstr "Comportamiento"
|
113 |
msgid "Shadow"
|
114 |
msgstr "Sombra"
|
115 |
|
116 |
+
#: inc/dynamic-to-top-options.php:97
|
117 |
+
#, php-format
|
118 |
+
msgid "Welcome to the <strong>Dynamic To Top</strong> plugin settings. Click %s to learn more about this plugin."
|
119 |
+
msgstr "Bienvenido a la configuración de <strong>Dynamic To Top</strong>. Para aprender mas de este plugin visite %s."
|
120 |
|
121 |
+
#: inc/dynamic-to-top-options.php:97
|
122 |
+
msgid "here"
|
123 |
+
msgstr "aqui"
|
124 |
|
125 |
+
#: inc/dynamic-to-top-options.php:105
|
126 |
msgid "Save Changes"
|
127 |
msgstr "Guardar Cambios"
|
128 |
|
129 |
+
#: inc/dynamic-to-top-options.php:108
|
130 |
msgid "<strong>Dynamic To Top</strong> plugin brought to you by"
|
131 |
msgstr "<strong>Dynamic To Top</strong> plugin por "
|
132 |
|
133 |
+
#: inc/dynamic-to-top-options.php:108
|
134 |
+
msgid "Donate"
|
135 |
+
msgstr "Donar"
|
136 |
+
|
137 |
+
#: inc/dynamic-to-top-options.php:129
|
138 |
msgid "Preview over"
|
139 |
msgstr "Previsualizar sobre"
|
140 |
|
141 |
+
#: inc/dynamic-to-top-options.php:129
|
142 |
msgid "black"
|
143 |
msgstr "negro"
|
144 |
|
145 |
+
#: inc/dynamic-to-top-options.php:129
|
146 |
msgid "grey"
|
147 |
msgstr "gris"
|
148 |
|
149 |
+
#: inc/dynamic-to-top-options.php:129
|
150 |
msgid "white"
|
151 |
msgstr "blanco"
|
152 |
|
153 |
+
#: inc/dynamic-to-top-options.php:273
|
154 |
msgid "Color for the button border."
|
155 |
msgstr "Color para el borde del botón."
|
156 |
|
157 |
+
#: inc/dynamic-to-top-options.php:287
|
158 |
msgid "Background color for the button."
|
159 |
msgstr "Color para el fondo del botón."
|
160 |
|
161 |
+
#: inc/dynamic-to-top-options.php:301
|
162 |
msgid "Button text color."
|
163 |
msgstr "Color del texto del botón."
|
164 |
|
165 |
+
#: inc/dynamic-to-top-options.php:315
|
166 |
+
#: inc/dynamic-to-top-options.php:329
|
167 |
msgid "Text shadow color."
|
168 |
msgstr "Color de la sombra del texto."
|
169 |
|
170 |
+
#: inc/dynamic-to-top-options.php:346
|
171 |
+
msgid "Linear"
|
172 |
+
msgstr "Lineal"
|
173 |
+
|
174 |
+
#: inc/dynamic-to-top-options.php:347
|
175 |
+
msgid "In"
|
176 |
+
msgstr "Entrada"
|
177 |
+
|
178 |
+
#: inc/dynamic-to-top-options.php:348
|
179 |
+
msgid "Out"
|
180 |
+
msgstr "Salida"
|
181 |
+
|
182 |
+
#: inc/dynamic-to-top-options.php:349
|
183 |
+
msgid "In Out"
|
184 |
+
msgstr "Entrada Salida"
|
185 |
+
|
186 |
+
#: inc/dynamic-to-top-options.php:350
|
187 |
+
msgid "Bounce"
|
188 |
+
msgstr "Rebotar"
|
189 |
+
|
190 |
+
#: inc/dynamic-to-top-options.php:351
|
191 |
+
msgid "Elastic"
|
192 |
+
msgstr "Elastico"
|
193 |
+
|
194 |
+
#: inc/dynamic-to-top-options.php:354
|
195 |
msgid "<a href=\"http://gsgd.co.uk/sandbox/jquery/easing\" title=\"Easing type\">Easing type</a> used to scroll the page up."
|
196 |
msgstr "Tipo de <a href=\"http://gsgd.co.uk/sandbox/jquery/easing\" title=\"Easing type\">Easing</a> usado para desplazar la página."
|
197 |
|
198 |
+
#: inc/dynamic-to-top-options.php:369
|
199 |
+
msgid "Top Left"
|
200 |
+
msgstr "Arriba a la Izquierda"
|
201 |
+
|
202 |
+
#: inc/dynamic-to-top-options.php:370
|
203 |
+
msgid "Top Right"
|
204 |
+
msgstr "Arriba a la derecha"
|
205 |
+
|
206 |
+
#: inc/dynamic-to-top-options.php:371
|
207 |
+
msgid "Bottom Left"
|
208 |
+
msgstr "Abajo a la Izquierda"
|
209 |
+
|
210 |
+
#: inc/dynamic-to-top-options.php:372
|
211 |
+
msgid "Bottom Right"
|
212 |
+
msgstr "Abajo a la derecha"
|
213 |
+
|
214 |
+
#: inc/dynamic-to-top-options.php:375
|
215 |
msgid "Button position."
|
216 |
msgstr "Posición del botón."
|
217 |
|
218 |
+
#: inc/dynamic-to-top-options.php:391
|
219 |
msgid "Time it takes for the page to scroll up. Less for faster. ( <span id=\"speed-val\"></span> Milliseconds )"
|
220 |
msgstr "Tiempo que le lleva a la página desplazarse. Menos para mas rápido. ( <span id=\"speed-val\"></span> Milisegundos )"
|
221 |
|
222 |
+
#: inc/dynamic-to-top-options.php:405
|
223 |
msgid "Button text size. ( <span id=\"font-size-val\"></span> Em/s )"
|
224 |
msgstr "Tamaño del texto. ( <span id=\"font-size-val\"></span> Em/s )"
|
225 |
|
226 |
+
#: inc/dynamic-to-top-options.php:419
|
227 |
msgid "Spacing on Top and Bottom. ( <span id=\"padding-top-bottom-val\"></span>px )"
|
228 |
msgstr "Espaciado hacia arriba y abajo. ( <span id=\"padding-top-bottom-val\"></span>px )"
|
229 |
|
230 |
+
#: inc/dynamic-to-top-options.php:433
|
231 |
msgid "Spacing on Left and Right. ( <span id=\"padding-left-right-val\"></span>px )"
|
232 |
msgstr "Espaciado a los laterales. ( <span id=\"padding-left-right-val\"></span>px )"
|
233 |
|
234 |
+
#: inc/dynamic-to-top-options.php:447
|
235 |
msgid "Button border width"
|
236 |
msgstr "Ancho del borde del botón"
|
237 |
|
238 |
+
#: inc/dynamic-to-top-options.php:461
|
239 |
msgid "Button border radius"
|
240 |
msgstr "Radio del borde del botón"
|
241 |
|
242 |
+
#: inc/dynamic-to-top-options.php:477
|
243 |
msgid "Distance from top to show the button. ( Pixels )"
|
244 |
msgstr "Distancia a partir de la cual se debe mostrar el botón. ( Pixeles )"
|
245 |
|
246 |
+
#: inc/dynamic-to-top-options.php:491
|
|
|
|
|
|
|
|
|
247 |
msgid "Text displayed on the button."
|
248 |
msgstr "Texto del botón."
|
249 |
|
250 |
+
#: inc/dynamic-to-top-options.php:507
|
251 |
+
#: inc/dynamic-to-top-options.php:521
|
252 |
+
#: inc/dynamic-to-top-options.php:535
|
253 |
+
#: inc/dynamic-to-top-options.php:549
|
254 |
+
#: inc/dynamic-to-top-options.php:563
|
255 |
+
#: inc/dynamic-to-top-options.php:577
|
256 |
msgid "Yes"
|
257 |
msgstr "Si"
|
258 |
|
259 |
+
#: inc/dynamic-to-top-options.php:507
|
260 |
msgid "Disable the button on mobile browsers."
|
261 |
msgstr "Deshabilitar el botón en celulares y móviles."
|
262 |
|
263 |
+
#: inc/dynamic-to-top-options.php:521
|
264 |
msgid "Show a text version instead of the arrow up icon."
|
265 |
msgstr "Usar versión de texto."
|
266 |
|
267 |
+
#: inc/dynamic-to-top-options.php:535
|
268 |
msgid "Add CSS3 inset-highlight."
|
269 |
msgstr "Usar CSS3 inset-highlight."
|
270 |
|
271 |
+
#: inc/dynamic-to-top-options.php:549
|
272 |
+
msgid "Add a CSS3 shadow."
|
273 |
+
msgstr "Agregar sombra CSS3."
|
274 |
|
275 |
+
#: inc/dynamic-to-top-options.php:563
|
276 |
msgid "Make the text bold."
|
277 |
msgstr "Hace el texto negrita."
|
278 |
|
279 |
+
#: inc/dynamic-to-top-options.php:577
|
280 |
msgid "Add a subtle text shadow."
|
281 |
msgstr "Agrega una sombra sutil al texto."
|
282 |
|
283 |
+
#: inc/dynamic-to-top-options.php:735
|
284 |
msgid "close"
|
285 |
msgstr "cerrar"
|
286 |
|
287 |
+
#: inc/dynamic-to-top-options.php:735
|
288 |
msgid "select a color"
|
289 |
msgstr "seleccionar un color"
|
290 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: sksmatt
|
|
3 |
Donate link: http://www.mattvarone.com/donate/
|
4 |
Tags: Scroll, To top, Button, jQuery, Dynamic, UI, Automatic, Enhance, UX
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 3.
|
8 |
|
9 |
Adds an automatic and dynamic "To Top" button to easily scroll long pages back to the top.
|
10 |
|
@@ -43,6 +43,10 @@ Would you like to help translate the plugin into more languages? [Contact Matt](
|
|
43 |
|
44 |
== Change log ==
|
45 |
|
|
|
|
|
|
|
|
|
46 |
= 3.2 =
|
47 |
* Fixes the speed slider/attribute.
|
48 |
* Code improvements.
|
3 |
Donate link: http://www.mattvarone.com/donate/
|
4 |
Tags: Scroll, To top, Button, jQuery, Dynamic, UI, Automatic, Enhance, UX
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 3.4
|
7 |
+
Stable tag: 3.3
|
8 |
|
9 |
Adds an automatic and dynamic "To Top" button to easily scroll long pages back to the top.
|
10 |
|
43 |
|
44 |
== Change log ==
|
45 |
|
46 |
+
= 3.3 =
|
47 |
+
* Internationalization fix.
|
48 |
+
* Code improvements.
|
49 |
+
|
50 |
= 3.2 =
|
51 |
* Fixes the speed slider/attribute.
|
52 |
* Code improvements.
|