Version Description
- Now user can disable plugin, when browser window width is less then specified value (check plugin options).
Download this release
Release Info
Developer | Max Bond |
Plugin | Q2W3 Fixed Widget |
Version | 2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.3
- js/q2w3-fixed-widget.js +14 -0
- lang/ru_RU.mo +0 -0
- lang/ru_RU.po +20 -14
- q2w3-fixed-widget.php +8 -4
- readme.txt +4 -1
- screenshot-2.jpg +0 -0
js/q2w3-fixed-widget.js
CHANGED
@@ -117,6 +117,20 @@ function q2w3_sidebar(options) {
|
|
117 |
}
|
118 |
}).trigger('scroll.' + options.sidebar);
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
|
122 |
}
|
117 |
}
|
118 |
}).trigger('scroll.' + options.sidebar);
|
119 |
|
120 |
+
jQuery(window).on('resize', function() {
|
121 |
+
if ( jQuery(window).width() <= options.min_window_width ) {
|
122 |
+
jQuery(window).off('load scroll.' + options.sidebar);
|
123 |
+
widget.obj.css('position', '');
|
124 |
+
widget.obj.css('top', '');
|
125 |
+
widget.obj.css('width', '');
|
126 |
+
widget.obj.css('margin', '');
|
127 |
+
widget.obj.css('padding', '');
|
128 |
+
style_applied_normal = true;
|
129 |
+
style_applied_top = false;
|
130 |
+
style_applied_bottom = false;
|
131 |
+
}
|
132 |
+
}).trigger('resize');
|
133 |
+
|
134 |
}
|
135 |
|
136 |
}
|
lang/ru_RU.mo
CHANGED
Binary file
|
lang/ru_RU.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Q2W3 Fixed Widget\n"
|
4 |
-
"POT-Creation-Date: 2013-
|
5 |
-
"PO-Revision-Date: 2013-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
@@ -21,65 +21,71 @@ msgstr "Зафиксировать виджет"
|
|
21 |
|
22 |
#: c:\Program Files
|
23 |
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:175
|
24 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
25 |
msgid "Fixed Widget Options"
|
26 |
msgstr "Фикс. Виджеты"
|
27 |
|
28 |
#: c:\Program Files
|
29 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
30 |
msgid "Settings saved."
|
31 |
msgstr ""
|
32 |
|
33 |
#: c:\Program Files
|
34 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
35 |
msgid "Margin Top:"
|
36 |
msgstr "Верхний отступ:"
|
37 |
|
38 |
#: c:\Program Files
|
39 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:237
|
40 |
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:239
|
|
|
|
|
41 |
msgid "px"
|
42 |
msgstr "пикс."
|
43 |
|
44 |
#: c:\Program Files
|
45 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
46 |
msgid "Margin Bottom:"
|
47 |
msgstr "Нижний отступ:"
|
48 |
|
49 |
#: c:\Program Files
|
50 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
51 |
msgid "Refresh interval:"
|
52 |
msgstr "Интервал обновления:"
|
53 |
|
54 |
#: c:\Program Files
|
55 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
56 |
msgid "milliseconds"
|
57 |
msgstr "миллисекунды"
|
58 |
|
59 |
#: c:\Program Files
|
60 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
61 |
msgid "Set 0 to disable."
|
62 |
msgstr "Установите 0, чтобы отключить пересчет параметров"
|
63 |
|
64 |
#: c:\Program Files
|
65 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
66 |
msgid "Custom HTML IDs (each one on a new line):"
|
67 |
msgstr ""
|
68 |
"HTML-идентификаторы статических виджетов и прочих<br/> нестандартных "
|
69 |
"элементов (каждый на новой строке):"
|
70 |
|
71 |
#: c:\Program Files
|
72 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
|
|
|
|
|
|
|
|
|
|
73 |
msgid "Disable plugin on phone devices:"
|
74 |
msgstr "Отключить плагин на мобильных:"
|
75 |
|
76 |
#: c:\Program Files
|
77 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
78 |
msgid "Disable plugin on tablet devices:"
|
79 |
msgstr "Отключить плагин на планшетах:"
|
80 |
|
81 |
#: c:\Program Files
|
82 |
-
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:
|
83 |
msgid "Save Changes"
|
84 |
msgstr ""
|
85 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Q2W3 Fixed Widget\n"
|
4 |
+
"POT-Creation-Date: 2013-05-21 21:47+0400\n"
|
5 |
+
"PO-Revision-Date: 2013-05-21 21:48+0400\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
21 |
|
22 |
#: c:\Program Files
|
23 |
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:175
|
24 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:223
|
25 |
msgid "Fixed Widget Options"
|
26 |
msgstr "Фикс. Виджеты"
|
27 |
|
28 |
#: c:\Program Files
|
29 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:227
|
30 |
msgid "Settings saved."
|
31 |
msgstr ""
|
32 |
|
33 |
#: c:\Program Files
|
34 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:239
|
35 |
msgid "Margin Top:"
|
36 |
msgstr "Верхний отступ:"
|
37 |
|
38 |
#: c:\Program Files
|
|
|
39 |
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:239
|
40 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:241
|
41 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:247
|
42 |
msgid "px"
|
43 |
msgstr "пикс."
|
44 |
|
45 |
#: c:\Program Files
|
46 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:241
|
47 |
msgid "Margin Bottom:"
|
48 |
msgstr "Нижний отступ:"
|
49 |
|
50 |
#: c:\Program Files
|
51 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:243
|
52 |
msgid "Refresh interval:"
|
53 |
msgstr "Интервал обновления:"
|
54 |
|
55 |
#: c:\Program Files
|
56 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:243
|
57 |
msgid "milliseconds"
|
58 |
msgstr "миллисекунды"
|
59 |
|
60 |
#: c:\Program Files
|
61 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:243
|
62 |
msgid "Set 0 to disable."
|
63 |
msgstr "Установите 0, чтобы отключить пересчет параметров"
|
64 |
|
65 |
#: c:\Program Files
|
66 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:245
|
67 |
msgid "Custom HTML IDs (each one on a new line):"
|
68 |
msgstr ""
|
69 |
"HTML-идентификаторы статических виджетов и прочих<br/> нестандартных "
|
70 |
"элементов (каждый на новой строке):"
|
71 |
|
72 |
#: c:\Program Files
|
73 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:247
|
74 |
+
msgid "Disable plugin, when browser window width is less then:"
|
75 |
+
msgstr "Отключить плагин, если ширина окна браузера меньше чем:"
|
76 |
+
|
77 |
+
#: c:\Program Files
|
78 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:249
|
79 |
msgid "Disable plugin on phone devices:"
|
80 |
msgstr "Отключить плагин на мобильных:"
|
81 |
|
82 |
#: c:\Program Files
|
83 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:251
|
84 |
msgid "Disable plugin on tablet devices:"
|
85 |
msgstr "Отключить плагин на планшетах:"
|
86 |
|
87 |
#: c:\Program Files
|
88 |
+
#: (x86)\Zend\Apache2\htdocs\q2w3.ru-dev\wp-content\plugins\q2w3-fixed-widget/q2w3-fixed-widget.php:253
|
89 |
msgid "Save Changes"
|
90 |
msgstr ""
|
91 |
|
q2w3-fixed-widget.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Q2W3 Fixed Widget
|
|
4 |
Plugin URI: http://www.q2w3.ru/q2w3-fixed-widget-wordpress-plugin/
|
5 |
Description: Fixes positioning of the selected widgets, when the page is scrolled down.
|
6 |
Author: Max Bond
|
7 |
-
Version: 2.
|
8 |
Author URI: http://www.q2w3.ru/
|
9 |
*/
|
10 |
|
@@ -48,7 +48,7 @@ class q2w3_fixed_widget {
|
|
48 |
|
49 |
public static function init() {
|
50 |
|
51 |
-
wp_enqueue_script('q2w3-fixed-widget', plugin_dir_url( __FILE__ ) . 'js/q2w3-fixed-widget.js', array('jquery'), '2.
|
52 |
|
53 |
self::check_custom_ids();
|
54 |
|
@@ -56,7 +56,7 @@ class q2w3_fixed_widget {
|
|
56 |
|
57 |
public static function check($instance, $widget, $args){
|
58 |
|
59 |
-
if ( $instance['q2w3_fixed_widget'] ) self::$fixed_widgets[$widget->id] = "'". $widget->id ."'";
|
60 |
|
61 |
return $instance;
|
62 |
|
@@ -106,7 +106,7 @@ class q2w3_fixed_widget {
|
|
106 |
|
107 |
echo 'jQuery(document).ready(function(){'.PHP_EOL;
|
108 |
|
109 |
-
echo ' var q2w3_sidebar_options = { "sidebar" : "q2w3_default", "margin_top" : '. $options['margin-top'] .', "margin_bottom" : '. $options['margin-bottom'] .', "widgets" : ['. $array .'] }'.PHP_EOL;
|
110 |
|
111 |
if ( $options['refresh-interval'] > 0 ) {
|
112 |
|
@@ -184,6 +184,8 @@ class q2w3_fixed_widget {
|
|
184 |
|
185 |
$d['refresh-interval'] = 1000;
|
186 |
|
|
|
|
|
187 |
return $d;
|
188 |
|
189 |
}
|
@@ -242,6 +244,8 @@ class q2w3_fixed_widget {
|
|
242 |
|
243 |
echo '<p><span >'. __('Custom HTML IDs (each one on a new line):', 'q2w3_fixed_widget') .'</span><br/><textarea name="'. self::ID .'[custom-ids]" style="width: 320px; height: 120px;">'. $options['custom-ids'] .'</textarea>'.PHP_EOL;
|
244 |
|
|
|
|
|
245 |
echo '<p><span style="display: inline-block; width: 195px;">'. __('Disable plugin on phone devices:', 'q2w3_fixed_widget') .'</span><input type="checkbox" name="'. self::ID .'[disable-phone]" value="yes" '. checked('yes', $options['disable-phone'], false) .' /></p>'.PHP_EOL;
|
246 |
|
247 |
echo '<p><span style="display: inline-block; width: 195px;">'. __('Disable plugin on tablet devices:', 'q2w3_fixed_widget') .'</span><input type="checkbox" name="'. self::ID .'[disable-tablet]" value="yes" '. checked('yes', $options['disable-tablet'], false) .' /></p>'.PHP_EOL;
|
4 |
Plugin URI: http://www.q2w3.ru/q2w3-fixed-widget-wordpress-plugin/
|
5 |
Description: Fixes positioning of the selected widgets, when the page is scrolled down.
|
6 |
Author: Max Bond
|
7 |
+
Version: 2.3
|
8 |
Author URI: http://www.q2w3.ru/
|
9 |
*/
|
10 |
|
48 |
|
49 |
public static function init() {
|
50 |
|
51 |
+
wp_enqueue_script('q2w3-fixed-widget', plugin_dir_url( __FILE__ ) . 'js/q2w3-fixed-widget.js', array('jquery'), '2.3');
|
52 |
|
53 |
self::check_custom_ids();
|
54 |
|
56 |
|
57 |
public static function check($instance, $widget, $args){
|
58 |
|
59 |
+
if ( isset($instance['q2w3_fixed_widget']) && $instance['q2w3_fixed_widget'] ) self::$fixed_widgets[$widget->id] = "'". $widget->id ."'";
|
60 |
|
61 |
return $instance;
|
62 |
|
106 |
|
107 |
echo 'jQuery(document).ready(function(){'.PHP_EOL;
|
108 |
|
109 |
+
echo ' var q2w3_sidebar_options = { "sidebar" : "q2w3_default", "margin_top" : '. $options['margin-top'] .', "margin_bottom" : '. $options['margin-bottom'] .', "min_window_width" : '. $options['min-window-width'] .', "widgets" : ['. $array .'] }'.PHP_EOL;
|
110 |
|
111 |
if ( $options['refresh-interval'] > 0 ) {
|
112 |
|
184 |
|
185 |
$d['refresh-interval'] = 1000;
|
186 |
|
187 |
+
$d['min-window-width'] = 0;
|
188 |
+
|
189 |
return $d;
|
190 |
|
191 |
}
|
244 |
|
245 |
echo '<p><span >'. __('Custom HTML IDs (each one on a new line):', 'q2w3_fixed_widget') .'</span><br/><textarea name="'. self::ID .'[custom-ids]" style="width: 320px; height: 120px;">'. $options['custom-ids'] .'</textarea>'.PHP_EOL;
|
246 |
|
247 |
+
echo '<p><span style="display: inline-block; width: 195px;">'. __('Disable plugin, when browser window width is less then:', 'q2w3_fixed_widget') .'</span><input type="text" name="'. self::ID .'[min-window-width]" value="'. $options['min-window-width'] .'" style="width: 50px; text-align: center;" /> '. __('px', 'q2w3_fixed_widget') .'</p>'.PHP_EOL;
|
248 |
+
|
249 |
echo '<p><span style="display: inline-block; width: 195px;">'. __('Disable plugin on phone devices:', 'q2w3_fixed_widget') .'</span><input type="checkbox" name="'. self::ID .'[disable-phone]" value="yes" '. checked('yes', $options['disable-phone'], false) .' /></p>'.PHP_EOL;
|
250 |
|
251 |
echo '<p><span style="display: inline-block; width: 195px;">'. __('Disable plugin on tablet devices:', 'q2w3_fixed_widget') .'</span><input type="checkbox" name="'. self::ID .'[disable-tablet]" value="yes" '. checked('yes', $options['disable-tablet'], false) .' /></p>'.PHP_EOL;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: sidebar, widget, scroll, fixed, floating, sticky, russian, q2w3
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
Fixes positioning of the selected widgets, when the page is scrolled down.
|
10 |
|
@@ -74,6 +74,9 @@ This option defines (in milliseconds, 1 sec = 1000 ms) how often plugin recalcul
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
77 |
= 2.2.4 =
|
78 |
* This version is jQuery 1.9 compatible
|
79 |
|
4 |
Tags: sidebar, widget, scroll, fixed, floating, sticky, russian, q2w3
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 2.3
|
8 |
|
9 |
Fixes positioning of the selected widgets, when the page is scrolled down.
|
10 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 2.3 =
|
78 |
+
* Now user can disable plugin, when browser window width is less then specified value (check plugin options).
|
79 |
+
|
80 |
= 2.2.4 =
|
81 |
* This version is jQuery 1.9 compatible
|
82 |
|
screenshot-2.jpg
CHANGED
Binary file
|