Version Description
Download this release
Release Info
Developer | MattyRob |
Plugin | Subscribe2 |
Version | 8.2 |
Comparing to | |
See all releases |
Code changes from version 8.1 to 8.2
- ReadMe.txt +9 -1
- admin/send_email.php +2 -2
- admin/settings.php +1 -1
- admin/subscribers.php +1 -1
- classes/class-s2-admin.php +4 -6
- classes/class-s2-core.php +9 -5
- include/colorpicker/css/colorpicker.css +0 -161
- include/colorpicker/images/blank.gif +0 -0
- include/colorpicker/images/colorpicker_background.png +0 -0
- include/colorpicker/images/colorpicker_hex.png +0 -0
- include/colorpicker/images/colorpicker_hsb_b.png +0 -0
- include/colorpicker/images/colorpicker_hsb_h.png +0 -0
- include/colorpicker/images/colorpicker_hsb_s.png +0 -0
- include/colorpicker/images/colorpicker_indic.gif +0 -0
- include/colorpicker/images/colorpicker_overlay.png +0 -0
- include/colorpicker/images/colorpicker_rgb_b.png +0 -0
- include/colorpicker/images/colorpicker_rgb_g.png +0 -0
- include/colorpicker/images/colorpicker_rgb_r.png +0 -0
- include/colorpicker/images/colorpicker_select.gif +0 -0
- include/colorpicker/images/colorpicker_submit.png +0 -0
- include/colorpicker/images/select.png +0 -0
- include/colorpicker/images/select2.png +0 -0
- include/colorpicker/images/slider.png +0 -0
- include/colorpicker/js/colorpicker.dev.js +0 -484
- include/colorpicker/js/colorpicker.js +0 -1
- include/counterwidget.php +5 -4
- include/s2_colorpicker.dev.js +42 -39
- include/s2_colorpicker.js +1 -1
- subscribe2.php +2 -2
- subscribe2.pot +46 -46
ReadMe.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_butt
|
|
4 |
Tags: posts, subscription, email, subscribe, notify, notification
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.3.1
|
7 |
-
Stable tag: 8.
|
8 |
|
9 |
Sends a list of subscribers an email notification when new posts are published to your blog
|
10 |
|
@@ -303,6 +303,14 @@ Secondly, make sure that the token ([subscribe2] or <!--subscribe2-->) is correc
|
|
303 |
|
304 |
== Changelog ==
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
= Version 8.1 by Matthew Robinson =
|
307 |
|
308 |
* Fixed redirect errors and crash affecting multisite installs on upgrade to 8.0 - thanks in particular to Ed Cooper
|
4 |
Tags: posts, subscription, email, subscribe, notify, notification
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.3.1
|
7 |
+
Stable tag: 8.2
|
8 |
|
9 |
Sends a list of subscribers an email notification when new posts are published to your blog
|
10 |
|
303 |
|
304 |
== Changelog ==
|
305 |
|
306 |
+
= Version 8.2 by Matthew Robinson =
|
307 |
+
|
308 |
+
* Implemented use of Farbtastic as colour chooser in the Counter Widget because ColorPicker has been deprecated in WordPress
|
309 |
+
* Fixed one hook call in WordPress to pass $this variable by reference to save a little more RAM
|
310 |
+
* Fixed Subscribe2 implementation of custom taxonomies
|
311 |
+
* Fixed Bulk Management Format Change code to apply for all users
|
312 |
+
* Fix for low impact security vulnerability
|
313 |
+
|
314 |
= Version 8.1 by Matthew Robinson =
|
315 |
|
316 |
* Fixed redirect errors and crash affecting multisite installs on upgrade to 8.0 - thanks in particular to Ed Cooper
|
admin/send_email.php
CHANGED
@@ -8,7 +8,7 @@ global $wpdb, $s2nonce, $current_user;
|
|
8 |
// was anything POSTed?
|
9 |
if ( isset($_POST['s2_admin']) && 'mail' == $_POST['s2_admin'] ) {
|
10 |
check_admin_referer('subscribe2-write_subscribers' . $s2nonce);
|
11 |
-
$subject = $this->substitute(stripslashes(strip_tags($_POST['subject'])));
|
12 |
$body = $this->substitute(stripslashes($_POST['content']));
|
13 |
if ( '' != $current_user->display_name || '' != $current_user->user_email ) {
|
14 |
$this->myname = html_entity_decode($current_user->display_name, ENT_QUOTES);
|
@@ -54,7 +54,7 @@ if ( function_exists('wp_nonce_field') ) {
|
|
54 |
wp_nonce_field('subscribe2-write_subscribers' . $s2nonce);
|
55 |
}
|
56 |
if ( isset($_POST['subject']) ) {
|
57 |
-
$subject = $_POST['subject'];
|
58 |
} else {
|
59 |
$subject = __('A message from', 'subscribe2') . " " . html_entity_decode(get_option('blogname'), ENT_QUOTES);
|
60 |
}
|
8 |
// was anything POSTed?
|
9 |
if ( isset($_POST['s2_admin']) && 'mail' == $_POST['s2_admin'] ) {
|
10 |
check_admin_referer('subscribe2-write_subscribers' . $s2nonce);
|
11 |
+
$subject = html_entity_decode($this->substitute(stripslashes(strip_tags($_POST['subject']))), ENT_QUOTES);
|
12 |
$body = $this->substitute(stripslashes($_POST['content']));
|
13 |
if ( '' != $current_user->display_name || '' != $current_user->user_email ) {
|
14 |
$this->myname = html_entity_decode($current_user->display_name, ENT_QUOTES);
|
54 |
wp_nonce_field('subscribe2-write_subscribers' . $s2nonce);
|
55 |
}
|
56 |
if ( isset($_POST['subject']) ) {
|
57 |
+
$subject = stripslashes(esc_html($_POST['subject']));
|
58 |
} else {
|
59 |
$subject = __('A message from', 'subscribe2') . " " . html_entity_decode(get_option('blogname'), ENT_QUOTES);
|
60 |
}
|
admin/settings.php
CHANGED
@@ -460,7 +460,7 @@ echo "<div class=\"s2_admin\" id=\"s2_barred_domains\">\r\n";
|
|
460 |
echo "<h2>" . __('Barred Domains', 'subscribe2') . "</h2>\r\n";
|
461 |
echo "<p>";
|
462 |
echo __('Enter domains to bar from public subscriptions: <br /> (Use a new line for each entry and omit the "@" symbol, for example email.com)', 'subscribe2');
|
463 |
-
echo "<br />\r\n<textarea style=\"width: 98%;\" rows=\"4\" cols=\"60\" name=\"barred\">" . $this->subscribe2_options['barred'] . "</textarea>";
|
464 |
echo "</p>";
|
465 |
echo "</div>\r\n";
|
466 |
|
460 |
echo "<h2>" . __('Barred Domains', 'subscribe2') . "</h2>\r\n";
|
461 |
echo "<p>";
|
462 |
echo __('Enter domains to bar from public subscriptions: <br /> (Use a new line for each entry and omit the "@" symbol, for example email.com)', 'subscribe2');
|
463 |
+
echo "<br />\r\n<textarea style=\"width: 98%;\" rows=\"4\" cols=\"60\" name=\"barred\">" . esc_textarea($this->subscribe2_options['barred']) . "</textarea>";
|
464 |
echo "</p>";
|
465 |
echo "</div>\r\n";
|
466 |
|
admin/subscribers.php
CHANGED
@@ -229,7 +229,7 @@ echo "<br /><br />";
|
|
229 |
// show the selected subscribers
|
230 |
$alternate = 'alternate';
|
231 |
echo "<table class=\"widefat\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\">";
|
232 |
-
$searchterm = ( $_POST['searchterm'] ) ? $_POST['searchterm'] : '';
|
233 |
echo "<tr class=\"alternate\"><td colspan=\"3\"><input type=\"text\" name=\"searchterm\" value=\"" . $searchterm . "\" /></td>\r\n";
|
234 |
echo "<td><input type=\"submit\" class=\"button-secondary\" name=\"search\" value=\"" . __('Search Subscribers', 'subscribe2') . "\" /></td>\r\n";
|
235 |
if ( $reminderform ) {
|
229 |
// show the selected subscribers
|
230 |
$alternate = 'alternate';
|
231 |
echo "<table class=\"widefat\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\">";
|
232 |
+
$searchterm = ( $_POST['searchterm'] ) ? stripslashes(esc_html($_POST['searchterm'])) : '';
|
233 |
echo "<tr class=\"alternate\"><td colspan=\"3\"><input type=\"text\" name=\"searchterm\" value=\"" . $searchterm . "\" /></td>\r\n";
|
234 |
echo "<td><input type=\"submit\" class=\"button-secondary\" name=\"search\" value=\"" . __('Search Subscribers', 'subscribe2') . "\" /></td>\r\n";
|
235 |
if ( $reminderform ) {
|
classes/class-s2-admin.php
CHANGED
@@ -132,11 +132,9 @@ class s2_admin extends s2class {
|
|
132 |
function widget_s2counter_css_and_js() {
|
133 |
// ensure we only add colorpicker js to widgets page
|
134 |
if ( stripos($_SERVER['REQUEST_URI'], 'widgets.php' ) !== false ) {
|
135 |
-
|
136 |
-
|
137 |
-
wp_register_script('s2_colorpicker', S2URL . 'include/s2_colorpicker' . $this->script_debug . '.js', array('
|
138 |
-
wp_enqueue_style('colorpicker');
|
139 |
-
wp_enqueue_script('colorpicker_js');
|
140 |
wp_enqueue_script('s2_colorpicker');
|
141 |
}
|
142 |
} // end widget_s2_counter_css_and_js()
|
@@ -594,7 +592,7 @@ class s2_admin extends s2class {
|
|
594 |
if ( empty($format) ) { return; }
|
595 |
|
596 |
global $wpdb;
|
597 |
-
$subscribers = explode(
|
598 |
$emails = "'" . implode("', '", $subscribers) . "'";
|
599 |
$ids = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_email IN ($emails)");
|
600 |
$ids = implode(',', $ids);
|
132 |
function widget_s2counter_css_and_js() {
|
133 |
// ensure we only add colorpicker js to widgets page
|
134 |
if ( stripos($_SERVER['REQUEST_URI'], 'widgets.php' ) !== false ) {
|
135 |
+
wp_enqueue_style('farbtastic');
|
136 |
+
wp_enqueue_script('farbtastic');
|
137 |
+
wp_register_script('s2_colorpicker', S2URL . 'include/s2_colorpicker' . $this->script_debug . '.js', array('farbtastic'), '1.0'); //my js
|
|
|
|
|
138 |
wp_enqueue_script('s2_colorpicker');
|
139 |
}
|
140 |
} // end widget_s2_counter_css_and_js()
|
592 |
if ( empty($format) ) { return; }
|
593 |
|
594 |
global $wpdb;
|
595 |
+
$subscribers = explode(",\r\n", $subscribers_string);
|
596 |
$emails = "'" . implode("', '", $subscribers) . "'";
|
597 |
$ids = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_email IN ($emails)");
|
598 |
$ids = implode(',', $ids);
|
classes/class-s2-core.php
CHANGED
@@ -465,7 +465,9 @@ class s2class {
|
|
465 |
return $post;
|
466 |
}
|
467 |
|
468 |
-
$
|
|
|
|
|
469 |
$check = false;
|
470 |
// is the current post assigned to any categories
|
471 |
// which should not generate a notification email?
|
@@ -538,7 +540,7 @@ class s2class {
|
|
538 |
$this->myname = html_entity_decode($user->display_name, ENT_QUOTES);
|
539 |
}
|
540 |
|
541 |
-
$this->post_cat_names = implode(', ',
|
542 |
$this->post_tag_names = implode(', ', wp_get_post_tags($post->ID, array('fields' => 'names')));
|
543 |
|
544 |
// Get email subject
|
@@ -1441,7 +1443,9 @@ class s2class {
|
|
1441 |
$message_post= '';
|
1442 |
$message_posttime = '';
|
1443 |
foreach ( $posts as $post ) {
|
1444 |
-
$
|
|
|
|
|
1445 |
$post_cats_string = implode(',', $post_cats);
|
1446 |
$all_post_cats = array_unique(array_merge($all_post_cats, $post_cats));
|
1447 |
$check = false;
|
@@ -1499,7 +1503,7 @@ class s2class {
|
|
1499 |
$message_posttime .= __('Posted on', 'subscribe2') . ": " . mysql2date($datetime, $post->post_date) . "\r\n";
|
1500 |
$message_posttime .= $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
|
1501 |
if ( strstr($mailtext, "{CATS}") ) {
|
1502 |
-
$post_cat_names = implode(', ',
|
1503 |
$message_post .= __('Posted in', 'subscribe2') . ": " . $post_cat_names . "\r\n";
|
1504 |
$message_posttime .= __('Posted in', 'subscribe2') . ": " . $post_cat_names . "\r\n";
|
1505 |
}
|
@@ -1687,7 +1691,7 @@ class s2class {
|
|
1687 |
// Add actions specific to admin or frontend
|
1688 |
if ( is_admin() ) {
|
1689 |
//add menu, authoring and category admin actions
|
1690 |
-
add_action('admin_menu', array(
|
1691 |
add_action('admin_menu', array(&$this, 's2_meta_init'));
|
1692 |
add_action('save_post', array(&$this, 's2_meta_handler'));
|
1693 |
add_action('create_category', array(&$this, 'new_category'));
|
465 |
return $post;
|
466 |
}
|
467 |
|
468 |
+
$s2_taxonomies = array('category');
|
469 |
+
$s2_taxonomies = apply_filters('s2_taxonomies', $s2_taxonomies);
|
470 |
+
$post_cats = wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'ids'));
|
471 |
$check = false;
|
472 |
// is the current post assigned to any categories
|
473 |
// which should not generate a notification email?
|
540 |
$this->myname = html_entity_decode($user->display_name, ENT_QUOTES);
|
541 |
}
|
542 |
|
543 |
+
$this->post_cat_names = implode(', ', wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'names')));
|
544 |
$this->post_tag_names = implode(', ', wp_get_post_tags($post->ID, array('fields' => 'names')));
|
545 |
|
546 |
// Get email subject
|
1443 |
$message_post= '';
|
1444 |
$message_posttime = '';
|
1445 |
foreach ( $posts as $post ) {
|
1446 |
+
$s2_taxonomies = array('category');
|
1447 |
+
$s2_taxonomies = apply_filters('s2_taxonomies', $s2_taxonomies);
|
1448 |
+
$post_cats = wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'ids'));
|
1449 |
$post_cats_string = implode(',', $post_cats);
|
1450 |
$all_post_cats = array_unique(array_merge($all_post_cats, $post_cats));
|
1451 |
$check = false;
|
1503 |
$message_posttime .= __('Posted on', 'subscribe2') . ": " . mysql2date($datetime, $post->post_date) . "\r\n";
|
1504 |
$message_posttime .= $this->get_tracking_link(get_permalink($post->ID)) . "\r\n";
|
1505 |
if ( strstr($mailtext, "{CATS}") ) {
|
1506 |
+
$post_cat_names = implode(', ', wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'names')));
|
1507 |
$message_post .= __('Posted in', 'subscribe2') . ": " . $post_cat_names . "\r\n";
|
1508 |
$message_posttime .= __('Posted in', 'subscribe2') . ": " . $post_cat_names . "\r\n";
|
1509 |
}
|
1691 |
// Add actions specific to admin or frontend
|
1692 |
if ( is_admin() ) {
|
1693 |
//add menu, authoring and category admin actions
|
1694 |
+
add_action('admin_menu', array(&$this, 'admin_menu'));
|
1695 |
add_action('admin_menu', array(&$this, 's2_meta_init'));
|
1696 |
add_action('save_post', array(&$this, 's2_meta_handler'));
|
1697 |
add_action('create_category', array(&$this, 'new_category'));
|
include/colorpicker/css/colorpicker.css
DELETED
@@ -1,161 +0,0 @@
|
|
1 |
-
.colorpicker {
|
2 |
-
width: 356px;
|
3 |
-
height: 176px;
|
4 |
-
overflow: hidden;
|
5 |
-
position: absolute;
|
6 |
-
background: url(../images/colorpicker_background.png);
|
7 |
-
font-family: Arial, Helvetica, sans-serif;
|
8 |
-
display: none;
|
9 |
-
}
|
10 |
-
.colorpicker_color {
|
11 |
-
width: 150px;
|
12 |
-
height: 150px;
|
13 |
-
left: 14px;
|
14 |
-
top: 13px;
|
15 |
-
position: absolute;
|
16 |
-
background: #f00;
|
17 |
-
overflow: hidden;
|
18 |
-
cursor: crosshair;
|
19 |
-
}
|
20 |
-
.colorpicker_color div {
|
21 |
-
position: absolute;
|
22 |
-
top: 0;
|
23 |
-
left: 0;
|
24 |
-
width: 150px;
|
25 |
-
height: 150px;
|
26 |
-
background: url(../images/colorpicker_overlay.png);
|
27 |
-
}
|
28 |
-
.colorpicker_color div div {
|
29 |
-
position: absolute;
|
30 |
-
top: 0;
|
31 |
-
left: 0;
|
32 |
-
width: 11px;
|
33 |
-
height: 11px;
|
34 |
-
overflow: hidden;
|
35 |
-
background: url(../images/colorpicker_select.gif);
|
36 |
-
margin: -5px 0 0 -5px;
|
37 |
-
}
|
38 |
-
.colorpicker_hue {
|
39 |
-
position: absolute;
|
40 |
-
top: 13px;
|
41 |
-
left: 171px;
|
42 |
-
width: 35px;
|
43 |
-
height: 150px;
|
44 |
-
cursor: n-resize;
|
45 |
-
}
|
46 |
-
.colorpicker_hue div {
|
47 |
-
position: absolute;
|
48 |
-
width: 35px;
|
49 |
-
height: 9px;
|
50 |
-
overflow: hidden;
|
51 |
-
background: url(../images/colorpicker_indic.gif) left top;
|
52 |
-
margin: -4px 0 0 0;
|
53 |
-
left: 0px;
|
54 |
-
}
|
55 |
-
.colorpicker_new_color {
|
56 |
-
position: absolute;
|
57 |
-
width: 60px;
|
58 |
-
height: 30px;
|
59 |
-
left: 213px;
|
60 |
-
top: 13px;
|
61 |
-
background: #f00;
|
62 |
-
}
|
63 |
-
.colorpicker_current_color {
|
64 |
-
position: absolute;
|
65 |
-
width: 60px;
|
66 |
-
height: 30px;
|
67 |
-
left: 283px;
|
68 |
-
top: 13px;
|
69 |
-
background: #f00;
|
70 |
-
}
|
71 |
-
.colorpicker input {
|
72 |
-
background-color: transparent;
|
73 |
-
border: 1px solid transparent;
|
74 |
-
position: absolute;
|
75 |
-
font-size: 10px;
|
76 |
-
font-family: Arial, Helvetica, sans-serif;
|
77 |
-
color: #898989;
|
78 |
-
top: 4px;
|
79 |
-
right: 11px;
|
80 |
-
text-align: right;
|
81 |
-
margin: 0;
|
82 |
-
padding: 0;
|
83 |
-
height: 11px;
|
84 |
-
}
|
85 |
-
.colorpicker_hex {
|
86 |
-
position: absolute;
|
87 |
-
width: 72px;
|
88 |
-
height: 22px;
|
89 |
-
background: url(../images/colorpicker_hex.png) top;
|
90 |
-
left: 212px;
|
91 |
-
top: 142px;
|
92 |
-
}
|
93 |
-
.colorpicker_hex input {
|
94 |
-
right: 6px;
|
95 |
-
}
|
96 |
-
.colorpicker_field {
|
97 |
-
height: 22px;
|
98 |
-
width: 62px;
|
99 |
-
background-position: top;
|
100 |
-
position: absolute;
|
101 |
-
}
|
102 |
-
.colorpicker_field span {
|
103 |
-
position: absolute;
|
104 |
-
width: 12px;
|
105 |
-
height: 22px;
|
106 |
-
overflow: hidden;
|
107 |
-
top: 0;
|
108 |
-
right: 0;
|
109 |
-
cursor: n-resize;
|
110 |
-
}
|
111 |
-
.colorpicker_rgb_r {
|
112 |
-
background-image: url(../images/colorpicker_rgb_r.png);
|
113 |
-
top: 52px;
|
114 |
-
left: 212px;
|
115 |
-
}
|
116 |
-
.colorpicker_rgb_g {
|
117 |
-
background-image: url(../images/colorpicker_rgb_g.png);
|
118 |
-
top: 82px;
|
119 |
-
left: 212px;
|
120 |
-
}
|
121 |
-
.colorpicker_rgb_b {
|
122 |
-
background-image: url(../images/colorpicker_rgb_b.png);
|
123 |
-
top: 112px;
|
124 |
-
left: 212px;
|
125 |
-
}
|
126 |
-
.colorpicker_hsb_h {
|
127 |
-
background-image: url(../images/colorpicker_hsb_h.png);
|
128 |
-
top: 52px;
|
129 |
-
left: 282px;
|
130 |
-
}
|
131 |
-
.colorpicker_hsb_s {
|
132 |
-
background-image: url(../images/colorpicker_hsb_s.png);
|
133 |
-
top: 82px;
|
134 |
-
left: 282px;
|
135 |
-
}
|
136 |
-
.colorpicker_hsb_b {
|
137 |
-
background-image: url(../images/colorpicker_hsb_b.png);
|
138 |
-
top: 112px;
|
139 |
-
left: 282px;
|
140 |
-
}
|
141 |
-
.colorpicker_submit {
|
142 |
-
position: absolute;
|
143 |
-
width: 22px;
|
144 |
-
height: 22px;
|
145 |
-
background: url(../images/colorpicker_submit.png) top;
|
146 |
-
left: 322px;
|
147 |
-
top: 142px;
|
148 |
-
overflow: hidden;
|
149 |
-
}
|
150 |
-
.colorpicker_focus {
|
151 |
-
background-position: center;
|
152 |
-
}
|
153 |
-
.colorpicker_hex.colorpicker_focus {
|
154 |
-
background-position: bottom;
|
155 |
-
}
|
156 |
-
.colorpicker_submit.colorpicker_focus {
|
157 |
-
background-position: bottom;
|
158 |
-
}
|
159 |
-
.colorpicker_slider {
|
160 |
-
background-position: bottom;
|
161 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/colorpicker/images/blank.gif
DELETED
Binary file
|
include/colorpicker/images/colorpicker_background.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_hex.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_hsb_b.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_hsb_h.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_hsb_s.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_indic.gif
DELETED
Binary file
|
include/colorpicker/images/colorpicker_overlay.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_rgb_b.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_rgb_g.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_rgb_r.png
DELETED
Binary file
|
include/colorpicker/images/colorpicker_select.gif
DELETED
Binary file
|
include/colorpicker/images/colorpicker_submit.png
DELETED
Binary file
|
include/colorpicker/images/select.png
DELETED
Binary file
|
include/colorpicker/images/select2.png
DELETED
Binary file
|
include/colorpicker/images/slider.png
DELETED
Binary file
|
include/colorpicker/js/colorpicker.dev.js
DELETED
@@ -1,484 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
*
|
3 |
-
* Color picker
|
4 |
-
* Author: Stefan Petre www.eyecon.ro
|
5 |
-
*
|
6 |
-
* Dual licensed under the MIT and GPL licenses
|
7 |
-
*
|
8 |
-
*/
|
9 |
-
(function (jQuery) {
|
10 |
-
var ColorPicker = function () {
|
11 |
-
var
|
12 |
-
ids = {},
|
13 |
-
inAction,
|
14 |
-
charMin = 65,
|
15 |
-
visible,
|
16 |
-
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
17 |
-
defaults = {
|
18 |
-
eventName: 'click',
|
19 |
-
onShow: function () {},
|
20 |
-
onBeforeShow: function(){},
|
21 |
-
onHide: function () {},
|
22 |
-
onChange: function () {},
|
23 |
-
onSubmit: function () {},
|
24 |
-
color: 'ff0000',
|
25 |
-
livePreview: true,
|
26 |
-
flat: false
|
27 |
-
},
|
28 |
-
fillRGBFields = function (hsb, cal) {
|
29 |
-
var rgb = HSBToRGB(hsb);
|
30 |
-
jQuery(cal).data('colorpicker').fields
|
31 |
-
.eq(1).val(rgb.r).end()
|
32 |
-
.eq(2).val(rgb.g).end()
|
33 |
-
.eq(3).val(rgb.b).end();
|
34 |
-
},
|
35 |
-
fillHSBFields = function (hsb, cal) {
|
36 |
-
jQuery(cal).data('colorpicker').fields
|
37 |
-
.eq(4).val(hsb.h).end()
|
38 |
-
.eq(5).val(hsb.s).end()
|
39 |
-
.eq(6).val(hsb.b).end();
|
40 |
-
},
|
41 |
-
fillHexFields = function (hsb, cal) {
|
42 |
-
jQuery(cal).data('colorpicker').fields
|
43 |
-
.eq(0).val(HSBToHex(hsb)).end();
|
44 |
-
},
|
45 |
-
setSelector = function (hsb, cal) {
|
46 |
-
jQuery(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
47 |
-
jQuery(cal).data('colorpicker').selectorIndic.css({
|
48 |
-
left: parseInt(150 * hsb.s/100, 10),
|
49 |
-
top: parseInt(150 * (100-hsb.b)/100, 10)
|
50 |
-
});
|
51 |
-
},
|
52 |
-
setHue = function (hsb, cal) {
|
53 |
-
jQuery(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
54 |
-
},
|
55 |
-
setCurrentColor = function (hsb, cal) {
|
56 |
-
jQuery(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
57 |
-
},
|
58 |
-
setNewColor = function (hsb, cal) {
|
59 |
-
jQuery(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
60 |
-
},
|
61 |
-
keyDown = function (ev) {
|
62 |
-
var pressedKey = ev.charCode || ev.keyCode || -1;
|
63 |
-
if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
|
64 |
-
return false;
|
65 |
-
}
|
66 |
-
var cal = jQuery(this).parent().parent();
|
67 |
-
if (cal.data('colorpicker').livePreview === true) {
|
68 |
-
change.apply(this);
|
69 |
-
}
|
70 |
-
},
|
71 |
-
change = function (ev) {
|
72 |
-
var cal = jQuery(this).parent().parent(), col;
|
73 |
-
if (this.parentNode.className.indexOf('_hex') > 0) {
|
74 |
-
cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
|
75 |
-
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
76 |
-
cal.data('colorpicker').color = col = fixHSB({
|
77 |
-
h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
|
78 |
-
s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
|
79 |
-
b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
|
80 |
-
});
|
81 |
-
} else {
|
82 |
-
cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
|
83 |
-
r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
|
84 |
-
g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
|
85 |
-
b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
|
86 |
-
}));
|
87 |
-
}
|
88 |
-
if (ev) {
|
89 |
-
fillRGBFields(col, cal.get(0));
|
90 |
-
fillHexFields(col, cal.get(0));
|
91 |
-
fillHSBFields(col, cal.get(0));
|
92 |
-
}
|
93 |
-
setSelector(col, cal.get(0));
|
94 |
-
setHue(col, cal.get(0));
|
95 |
-
setNewColor(col, cal.get(0));
|
96 |
-
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
97 |
-
},
|
98 |
-
blur = function (ev) {
|
99 |
-
var cal = jQuery(this).parent().parent();
|
100 |
-
cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
101 |
-
},
|
102 |
-
focus = function () {
|
103 |
-
charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
|
104 |
-
jQuery(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
105 |
-
jQuery(this).parent().addClass('colorpicker_focus');
|
106 |
-
},
|
107 |
-
downIncrement = function (ev) {
|
108 |
-
var field = jQuery(this).parent().find('input').focus();
|
109 |
-
var current = {
|
110 |
-
el: jQuery(this).parent().addClass('colorpicker_slider'),
|
111 |
-
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
112 |
-
y: ev.pageY,
|
113 |
-
field: field,
|
114 |
-
val: parseInt(field.val(), 10),
|
115 |
-
preview: jQuery(this).parent().parent().data('colorpicker').livePreview
|
116 |
-
};
|
117 |
-
jQuery(document).bind('mouseup', current, upIncrement);
|
118 |
-
jQuery(document).bind('mousemove', current, moveIncrement);
|
119 |
-
},
|
120 |
-
moveIncrement = function (ev) {
|
121 |
-
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
|
122 |
-
if (ev.data.preview) {
|
123 |
-
change.apply(ev.data.field.get(0), [true]);
|
124 |
-
}
|
125 |
-
return false;
|
126 |
-
},
|
127 |
-
upIncrement = function (ev) {
|
128 |
-
change.apply(ev.data.field.get(0), [true]);
|
129 |
-
ev.data.el.removeClass('colorpicker_slider').find('input').focus();
|
130 |
-
jQuery(document).unbind('mouseup', upIncrement);
|
131 |
-
jQuery(document).unbind('mousemove', moveIncrement);
|
132 |
-
return false;
|
133 |
-
},
|
134 |
-
downHue = function (ev) {
|
135 |
-
var current = {
|
136 |
-
cal: jQuery(this).parent(),
|
137 |
-
y: jQuery(this).offset().top
|
138 |
-
};
|
139 |
-
current.preview = current.cal.data('colorpicker').livePreview;
|
140 |
-
jQuery(document).bind('mouseup', current, upHue);
|
141 |
-
jQuery(document).bind('mousemove', current, moveHue);
|
142 |
-
},
|
143 |
-
moveHue = function (ev) {
|
144 |
-
change.apply(
|
145 |
-
ev.data.cal.data('colorpicker')
|
146 |
-
.fields
|
147 |
-
.eq(4)
|
148 |
-
.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
|
149 |
-
.get(0),
|
150 |
-
[ev.data.preview]
|
151 |
-
);
|
152 |
-
return false;
|
153 |
-
},
|
154 |
-
upHue = function (ev) {
|
155 |
-
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
156 |
-
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
157 |
-
jQuery(document).unbind('mouseup', upHue);
|
158 |
-
jQuery(document).unbind('mousemove', moveHue);
|
159 |
-
return false;
|
160 |
-
},
|
161 |
-
downSelector = function (ev) {
|
162 |
-
var current = {
|
163 |
-
cal: jQuery(this).parent(),
|
164 |
-
pos: jQuery(this).offset()
|
165 |
-
};
|
166 |
-
current.preview = current.cal.data('colorpicker').livePreview;
|
167 |
-
jQuery(document).bind('mouseup', current, upSelector);
|
168 |
-
jQuery(document).bind('mousemove', current, moveSelector);
|
169 |
-
},
|
170 |
-
moveSelector = function (ev) {
|
171 |
-
change.apply(
|
172 |
-
ev.data.cal.data('colorpicker')
|
173 |
-
.fields
|
174 |
-
.eq(6)
|
175 |
-
.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
|
176 |
-
.end()
|
177 |
-
.eq(5)
|
178 |
-
.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
|
179 |
-
.get(0),
|
180 |
-
[ev.data.preview]
|
181 |
-
);
|
182 |
-
return false;
|
183 |
-
},
|
184 |
-
upSelector = function (ev) {
|
185 |
-
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
186 |
-
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
187 |
-
jQuery(document).unbind('mouseup', upSelector);
|
188 |
-
jQuery(document).unbind('mousemove', moveSelector);
|
189 |
-
return false;
|
190 |
-
},
|
191 |
-
enterSubmit = function (ev) {
|
192 |
-
jQuery(this).addClass('colorpicker_focus');
|
193 |
-
},
|
194 |
-
leaveSubmit = function (ev) {
|
195 |
-
jQuery(this).removeClass('colorpicker_focus');
|
196 |
-
},
|
197 |
-
clickSubmit = function (ev) {
|
198 |
-
var cal = jQuery(this).parent();
|
199 |
-
var col = cal.data('colorpicker').color;
|
200 |
-
cal.data('colorpicker').origColor = col;
|
201 |
-
setCurrentColor(col, cal.get(0));
|
202 |
-
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
|
203 |
-
},
|
204 |
-
show = function (ev) {
|
205 |
-
var cal = jQuery('#' + jQuery(this).data('colorpickerId'));
|
206 |
-
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
207 |
-
var pos = jQuery(this).offset();
|
208 |
-
var viewPort = getViewport();
|
209 |
-
var top = pos.top + this.offsetHeight;
|
210 |
-
var left = pos.left;
|
211 |
-
if (top + 176 > viewPort.t + viewPort.h) {
|
212 |
-
top -= this.offsetHeight + 176;
|
213 |
-
}
|
214 |
-
if (left + 356 > viewPort.l + viewPort.w) {
|
215 |
-
left -= 356;
|
216 |
-
}
|
217 |
-
cal.css({left: left + 'px', top: top + 'px'});
|
218 |
-
if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
|
219 |
-
cal.show();
|
220 |
-
}
|
221 |
-
jQuery(document).bind('mousedown', {cal: cal}, hide);
|
222 |
-
return false;
|
223 |
-
},
|
224 |
-
hide = function (ev) {
|
225 |
-
if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
|
226 |
-
if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
227 |
-
ev.data.cal.hide();
|
228 |
-
}
|
229 |
-
jQuery(document).unbind('mousedown', hide);
|
230 |
-
}
|
231 |
-
},
|
232 |
-
isChildOf = function(parentEl, el, container) {
|
233 |
-
if (parentEl == el) {
|
234 |
-
return true;
|
235 |
-
}
|
236 |
-
if (parentEl.contains) {
|
237 |
-
return parentEl.contains(el);
|
238 |
-
}
|
239 |
-
if ( parentEl.compareDocumentPosition ) {
|
240 |
-
return !!(parentEl.compareDocumentPosition(el) & 16);
|
241 |
-
}
|
242 |
-
var prEl = el.parentNode;
|
243 |
-
while(prEl && prEl != container) {
|
244 |
-
if (prEl == parentEl)
|
245 |
-
return true;
|
246 |
-
prEl = prEl.parentNode;
|
247 |
-
}
|
248 |
-
return false;
|
249 |
-
},
|
250 |
-
getViewport = function () {
|
251 |
-
var m = document.compatMode == 'CSS1Compat';
|
252 |
-
return {
|
253 |
-
l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
254 |
-
t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
|
255 |
-
w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
|
256 |
-
h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
|
257 |
-
};
|
258 |
-
},
|
259 |
-
fixHSB = function (hsb) {
|
260 |
-
return {
|
261 |
-
h: Math.min(360, Math.max(0, hsb.h)),
|
262 |
-
s: Math.min(100, Math.max(0, hsb.s)),
|
263 |
-
b: Math.min(100, Math.max(0, hsb.b))
|
264 |
-
};
|
265 |
-
},
|
266 |
-
fixRGB = function (rgb) {
|
267 |
-
return {
|
268 |
-
r: Math.min(255, Math.max(0, rgb.r)),
|
269 |
-
g: Math.min(255, Math.max(0, rgb.g)),
|
270 |
-
b: Math.min(255, Math.max(0, rgb.b))
|
271 |
-
};
|
272 |
-
},
|
273 |
-
fixHex = function (hex) {
|
274 |
-
var len = 6 - hex.length;
|
275 |
-
if (len > 0) {
|
276 |
-
var o = [];
|
277 |
-
for (var i=0; i<len; i++) {
|
278 |
-
o.push('0');
|
279 |
-
}
|
280 |
-
o.push(hex);
|
281 |
-
hex = o.join('');
|
282 |
-
}
|
283 |
-
return hex;
|
284 |
-
},
|
285 |
-
HexToRGB = function (hex) {
|
286 |
-
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
287 |
-
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
288 |
-
},
|
289 |
-
HexToHSB = function (hex) {
|
290 |
-
return RGBToHSB(HexToRGB(hex));
|
291 |
-
},
|
292 |
-
RGBToHSB = function (rgb) {
|
293 |
-
var hsb = {
|
294 |
-
h: 0,
|
295 |
-
s: 0,
|
296 |
-
b: 0
|
297 |
-
};
|
298 |
-
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
299 |
-
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
300 |
-
var delta = max - min;
|
301 |
-
hsb.b = max;
|
302 |
-
if (max != 0) {
|
303 |
-
|
304 |
-
}
|
305 |
-
hsb.s = max != 0 ? 255 * delta / max : 0;
|
306 |
-
if (hsb.s != 0) {
|
307 |
-
if (rgb.r == max) {
|
308 |
-
hsb.h = (rgb.g - rgb.b) / delta;
|
309 |
-
} else if (rgb.g == max) {
|
310 |
-
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
311 |
-
} else {
|
312 |
-
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
313 |
-
}
|
314 |
-
} else {
|
315 |
-
hsb.h = -1;
|
316 |
-
}
|
317 |
-
hsb.h *= 60;
|
318 |
-
if (hsb.h < 0) {
|
319 |
-
hsb.h += 360;
|
320 |
-
}
|
321 |
-
hsb.s *= 100/255;
|
322 |
-
hsb.b *= 100/255;
|
323 |
-
return hsb;
|
324 |
-
},
|
325 |
-
HSBToRGB = function (hsb) {
|
326 |
-
var rgb = {};
|
327 |
-
var h = Math.round(hsb.h);
|
328 |
-
var s = Math.round(hsb.s*255/100);
|
329 |
-
var v = Math.round(hsb.b*255/100);
|
330 |
-
if(s == 0) {
|
331 |
-
rgb.r = rgb.g = rgb.b = v;
|
332 |
-
} else {
|
333 |
-
var t1 = v;
|
334 |
-
var t2 = (255-s)*v/255;
|
335 |
-
var t3 = (t1-t2)*(h%60)/60;
|
336 |
-
if(h==360) h = 0;
|
337 |
-
if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
|
338 |
-
else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
|
339 |
-
else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
|
340 |
-
else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
|
341 |
-
else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
|
342 |
-
else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
|
343 |
-
else {rgb.r=0; rgb.g=0; rgb.b=0}
|
344 |
-
}
|
345 |
-
return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
|
346 |
-
},
|
347 |
-
RGBToHex = function (rgb) {
|
348 |
-
var hex = [
|
349 |
-
rgb.r.toString(16),
|
350 |
-
rgb.g.toString(16),
|
351 |
-
rgb.b.toString(16)
|
352 |
-
];
|
353 |
-
jQuery.each(hex, function (nr, val) {
|
354 |
-
if (val.length == 1) {
|
355 |
-
hex[nr] = '0' + val;
|
356 |
-
}
|
357 |
-
});
|
358 |
-
return hex.join('');
|
359 |
-
},
|
360 |
-
HSBToHex = function (hsb) {
|
361 |
-
return RGBToHex(HSBToRGB(hsb));
|
362 |
-
},
|
363 |
-
restoreOriginal = function () {
|
364 |
-
var cal = jQuery(this).parent();
|
365 |
-
var col = cal.data('colorpicker').origColor;
|
366 |
-
cal.data('colorpicker').color = col;
|
367 |
-
fillRGBFields(col, cal.get(0));
|
368 |
-
fillHexFields(col, cal.get(0));
|
369 |
-
fillHSBFields(col, cal.get(0));
|
370 |
-
setSelector(col, cal.get(0));
|
371 |
-
setHue(col, cal.get(0));
|
372 |
-
setNewColor(col, cal.get(0));
|
373 |
-
};
|
374 |
-
return {
|
375 |
-
init: function (opt) {
|
376 |
-
opt = jQuery.extend({}, defaults, opt||{});
|
377 |
-
if (typeof opt.color == 'string') {
|
378 |
-
opt.color = HexToHSB(opt.color);
|
379 |
-
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
380 |
-
opt.color = RGBToHSB(opt.color);
|
381 |
-
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
382 |
-
opt.color = fixHSB(opt.color);
|
383 |
-
} else {
|
384 |
-
return this;
|
385 |
-
}
|
386 |
-
return this.each(function () {
|
387 |
-
if (!jQuery(this).data('colorpickerId')) {
|
388 |
-
var options = jQuery.extend({}, opt);
|
389 |
-
options.origColor = opt.color;
|
390 |
-
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
391 |
-
jQuery(this).data('colorpickerId', id);
|
392 |
-
var cal = jQuery(tpl).attr('id', id);
|
393 |
-
if (options.flat) {
|
394 |
-
cal.appendTo(this).show();
|
395 |
-
} else {
|
396 |
-
cal.appendTo(document.body);
|
397 |
-
}
|
398 |
-
options.fields = cal
|
399 |
-
.find('input')
|
400 |
-
.bind('keyup', keyDown)
|
401 |
-
.bind('change', change)
|
402 |
-
.bind('blur', blur)
|
403 |
-
.bind('focus', focus);
|
404 |
-
cal
|
405 |
-
.find('span').bind('mousedown', downIncrement).end()
|
406 |
-
.find('>div.colorpicker_current_color').bind('click', restoreOriginal);
|
407 |
-
options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
|
408 |
-
options.selectorIndic = options.selector.find('div div');
|
409 |
-
options.el = this;
|
410 |
-
options.hue = cal.find('div.colorpicker_hue div');
|
411 |
-
cal.find('div.colorpicker_hue').bind('mousedown', downHue);
|
412 |
-
options.newColor = cal.find('div.colorpicker_new_color');
|
413 |
-
options.currentColor = cal.find('div.colorpicker_current_color');
|
414 |
-
cal.data('colorpicker', options);
|
415 |
-
cal.find('div.colorpicker_submit')
|
416 |
-
.bind('mouseenter', enterSubmit)
|
417 |
-
.bind('mouseleave', leaveSubmit)
|
418 |
-
.bind('click', clickSubmit);
|
419 |
-
fillRGBFields(options.color, cal.get(0));
|
420 |
-
fillHSBFields(options.color, cal.get(0));
|
421 |
-
fillHexFields(options.color, cal.get(0));
|
422 |
-
setHue(options.color, cal.get(0));
|
423 |
-
setSelector(options.color, cal.get(0));
|
424 |
-
setCurrentColor(options.color, cal.get(0));
|
425 |
-
setNewColor(options.color, cal.get(0));
|
426 |
-
if (options.flat) {
|
427 |
-
cal.css({
|
428 |
-
position: 'relative',
|
429 |
-
display: 'block'
|
430 |
-
});
|
431 |
-
} else {
|
432 |
-
jQuery(this).bind(options.eventName, show);
|
433 |
-
}
|
434 |
-
}
|
435 |
-
});
|
436 |
-
},
|
437 |
-
showPicker: function() {
|
438 |
-
return this.each( function () {
|
439 |
-
if (jQuery(this).data('colorpickerId')) {
|
440 |
-
show.apply(this);
|
441 |
-
}
|
442 |
-
});
|
443 |
-
},
|
444 |
-
hidePicker: function() {
|
445 |
-
return this.each( function () {
|
446 |
-
if (jQuery(this).data('colorpickerId')) {
|
447 |
-
jQuery('#' + jQuery(this).data('colorpickerId')).hide();
|
448 |
-
}
|
449 |
-
});
|
450 |
-
},
|
451 |
-
setColor: function(col) {
|
452 |
-
if (typeof col == 'string') {
|
453 |
-
col = HexToHSB(col);
|
454 |
-
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
455 |
-
col = RGBToHSB(col);
|
456 |
-
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
457 |
-
col = fixHSB(col);
|
458 |
-
} else {
|
459 |
-
return this;
|
460 |
-
}
|
461 |
-
return this.each(function(){
|
462 |
-
if (jQuery(this).data('colorpickerId')) {
|
463 |
-
var cal = jQuery('#' + jQuery(this).data('colorpickerId'));
|
464 |
-
cal.data('colorpicker').color = col;
|
465 |
-
cal.data('colorpicker').origColor = col;
|
466 |
-
fillRGBFields(col, cal.get(0));
|
467 |
-
fillHSBFields(col, cal.get(0));
|
468 |
-
fillHexFields(col, cal.get(0));
|
469 |
-
setHue(col, cal.get(0));
|
470 |
-
setSelector(col, cal.get(0));
|
471 |
-
setCurrentColor(col, cal.get(0));
|
472 |
-
setNewColor(col, cal.get(0));
|
473 |
-
}
|
474 |
-
});
|
475 |
-
}
|
476 |
-
};
|
477 |
-
}();
|
478 |
-
jQuery.fn.extend({
|
479 |
-
ColorPicker: ColorPicker.init,
|
480 |
-
ColorPickerHide: ColorPicker.hidePicker,
|
481 |
-
ColorPickerShow: ColorPicker.showPicker,
|
482 |
-
ColorPickerSetColor: ColorPicker.setColor
|
483 |
-
});
|
484 |
-
})(jQuery)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/colorpicker/js/colorpicker.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(jQuery){var ColorPicker=function(){var ids={},inAction,charMin=65,visible,tpl='<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',defaults={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:true,flat:false},fillRGBFields=function(hsb,cal){var rgb=HSBToRGB(hsb);jQuery(cal).data("colorpicker").fields.eq(1).val(rgb.r).end().eq(2).val(rgb.g).end().eq(3).val(rgb.b).end()},fillHSBFields=function(hsb,cal){jQuery(cal).data("colorpicker").fields.eq(4).val(hsb.h).end().eq(5).val(hsb.s).end().eq(6).val(hsb.b).end()},fillHexFields=function(hsb,cal){jQuery(cal).data("colorpicker").fields.eq(0).val(HSBToHex(hsb)).end()},setSelector=function(hsb,cal){jQuery(cal).data("colorpicker").selector.css("backgroundColor","#"+HSBToHex({h:hsb.h,s:100,b:100}));jQuery(cal).data("colorpicker").selectorIndic.css({left:parseInt(150*hsb.s/100,10),top:parseInt(150*(100-hsb.b)/100,10)})},setHue=function(hsb,cal){jQuery(cal).data("colorpicker").hue.css("top",parseInt(150-150*hsb.h/360,10))},setCurrentColor=function(hsb,cal){jQuery(cal).data("colorpicker").currentColor.css("backgroundColor","#"+HSBToHex(hsb))},setNewColor=function(hsb,cal){jQuery(cal).data("colorpicker").newColor.css("backgroundColor","#"+HSBToHex(hsb))},keyDown=function(ev){var pressedKey=ev.charCode||ev.keyCode||-1;if((pressedKey>charMin&&pressedKey<=90)||pressedKey==32){return false}var cal=jQuery(this).parent().parent();if(cal.data("colorpicker").livePreview===true){change.apply(this)}},change=function(ev){var cal=jQuery(this).parent().parent(),col;if(this.parentNode.className.indexOf("_hex")>0){cal.data("colorpicker").color=col=HexToHSB(fixHex(this.value))}else{if(this.parentNode.className.indexOf("_hsb")>0){cal.data("colorpicker").color=col=fixHSB({h:parseInt(cal.data("colorpicker").fields.eq(4).val(),10),s:parseInt(cal.data("colorpicker").fields.eq(5).val(),10),b:parseInt(cal.data("colorpicker").fields.eq(6).val(),10)})}else{cal.data("colorpicker").color=col=RGBToHSB(fixRGB({r:parseInt(cal.data("colorpicker").fields.eq(1).val(),10),g:parseInt(cal.data("colorpicker").fields.eq(2).val(),10),b:parseInt(cal.data("colorpicker").fields.eq(3).val(),10)}))}}if(ev){fillRGBFields(col,cal.get(0));fillHexFields(col,cal.get(0));fillHSBFields(col,cal.get(0))}setSelector(col,cal.get(0));setHue(col,cal.get(0));setNewColor(col,cal.get(0));cal.data("colorpicker").onChange.apply(cal,[col,HSBToHex(col),HSBToRGB(col)])},blur=function(ev){var cal=jQuery(this).parent().parent();cal.data("colorpicker").fields.parent().removeClass("colorpicker_focus")},focus=function(){charMin=this.parentNode.className.indexOf("_hex")>0?70:65;jQuery(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus");jQuery(this).parent().addClass("colorpicker_focus")},downIncrement=function(ev){var field=jQuery(this).parent().find("input").focus();var current={el:jQuery(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:(this.parentNode.className.indexOf("_hsb")>0?100:255),y:ev.pageY,field:field,val:parseInt(field.val(),10),preview:jQuery(this).parent().parent().data("colorpicker").livePreview};jQuery(document).bind("mouseup",current,upIncrement);jQuery(document).bind("mousemove",current,moveIncrement)},moveIncrement=function(ev){ev.data.field.val(Math.max(0,Math.min(ev.data.max,parseInt(ev.data.val+ev.pageY-ev.data.y,10))));if(ev.data.preview){change.apply(ev.data.field.get(0),[true])}return false},upIncrement=function(ev){change.apply(ev.data.field.get(0),[true]);ev.data.el.removeClass("colorpicker_slider").find("input").focus();jQuery(document).unbind("mouseup",upIncrement);jQuery(document).unbind("mousemove",moveIncrement);return false},downHue=function(ev){var current={cal:jQuery(this).parent(),y:jQuery(this).offset().top};current.preview=current.cal.data("colorpicker").livePreview;jQuery(document).bind("mouseup",current,upHue);jQuery(document).bind("mousemove",current,moveHue)},moveHue=function(ev){change.apply(ev.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(ev.pageY-ev.data.y))))/150,10)).get(0),[ev.data.preview]);return false},upHue=function(ev){fillRGBFields(ev.data.cal.data("colorpicker").color,ev.data.cal.get(0));fillHexFields(ev.data.cal.data("colorpicker").color,ev.data.cal.get(0));jQuery(document).unbind("mouseup",upHue);jQuery(document).unbind("mousemove",moveHue);return false},downSelector=function(ev){var current={cal:jQuery(this).parent(),pos:jQuery(this).offset()};current.preview=current.cal.data("colorpicker").livePreview;jQuery(document).bind("mouseup",current,upSelector);jQuery(document).bind("mousemove",current,moveSelector)},moveSelector=function(ev){change.apply(ev.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(ev.pageY-ev.data.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX-ev.data.pos.left))))/150,10)).get(0),[ev.data.preview]);return false},upSelector=function(ev){fillRGBFields(ev.data.cal.data("colorpicker").color,ev.data.cal.get(0));fillHexFields(ev.data.cal.data("colorpicker").color,ev.data.cal.get(0));jQuery(document).unbind("mouseup",upSelector);jQuery(document).unbind("mousemove",moveSelector);return false},enterSubmit=function(ev){jQuery(this).addClass("colorpicker_focus")},leaveSubmit=function(ev){jQuery(this).removeClass("colorpicker_focus")},clickSubmit=function(ev){var cal=jQuery(this).parent();var col=cal.data("colorpicker").color;cal.data("colorpicker").origColor=col;setCurrentColor(col,cal.get(0));cal.data("colorpicker").onSubmit(col,HSBToHex(col),HSBToRGB(col),cal.data("colorpicker").el)},show=function(ev){var cal=jQuery("#"+jQuery(this).data("colorpickerId"));cal.data("colorpicker").onBeforeShow.apply(this,[cal.get(0)]);var pos=jQuery(this).offset();var viewPort=getViewport();var top=pos.top+this.offsetHeight;var left=pos.left;if(top+176>viewPort.t+viewPort.h){top-=this.offsetHeight+176}if(left+356>viewPort.l+viewPort.w){left-=356}cal.css({left:left+"px",top:top+"px"});if(cal.data("colorpicker").onShow.apply(this,[cal.get(0)])!=false){cal.show()}jQuery(document).bind("mousedown",{cal:cal},hide);return false},hide=function(ev){if(!isChildOf(ev.data.cal.get(0),ev.target,ev.data.cal.get(0))){if(ev.data.cal.data("colorpicker").onHide.apply(this,[ev.data.cal.get(0)])!=false){ev.data.cal.hide()}jQuery(document).unbind("mousedown",hide)}},isChildOf=function(parentEl,el,container){if(parentEl==el){return true}if(parentEl.contains){return parentEl.contains(el)}if(parentEl.compareDocumentPosition){return !!(parentEl.compareDocumentPosition(el)&16)}var prEl=el.parentNode;while(prEl&&prEl!=container){if(prEl==parentEl){return true}prEl=prEl.parentNode}return false},getViewport=function(){var m=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(m?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(m?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(m?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(m?document.documentElement.clientHeight:document.body.clientHeight)}},fixHSB=function(hsb){return{h:Math.min(360,Math.max(0,hsb.h)),s:Math.min(100,Math.max(0,hsb.s)),b:Math.min(100,Math.max(0,hsb.b))}},fixRGB=function(rgb){return{r:Math.min(255,Math.max(0,rgb.r)),g:Math.min(255,Math.max(0,rgb.g)),b:Math.min(255,Math.max(0,rgb.b))}},fixHex=function(hex){var len=6-hex.length;if(len>0){var o=[];for(var i=0;i<len;i++){o.push("0")}o.push(hex);hex=o.join("")}return hex},HexToRGB=function(hex){var hex=parseInt(((hex.indexOf("#")>-1)?hex.substring(1):hex),16);return{r:hex>>16,g:(hex&65280)>>8,b:(hex&255)}},HexToHSB=function(hex){return RGBToHSB(HexToRGB(hex))},RGBToHSB=function(rgb){var hsb={h:0,s:0,b:0};var min=Math.min(rgb.r,rgb.g,rgb.b);var max=Math.max(rgb.r,rgb.g,rgb.b);var delta=max-min;hsb.b=max;if(max!=0){}hsb.s=max!=0?255*delta/max:0;if(hsb.s!=0){if(rgb.r==max){hsb.h=(rgb.g-rgb.b)/delta}else{if(rgb.g==max){hsb.h=2+(rgb.b-rgb.r)/delta}else{hsb.h=4+(rgb.r-rgb.g)/delta}}}else{hsb.h=-1}hsb.h*=60;if(hsb.h<0){hsb.h+=360}hsb.s*=100/255;hsb.b*=100/255;return hsb},HSBToRGB=function(hsb){var rgb={};var h=Math.round(hsb.h);var s=Math.round(hsb.s*255/100);var v=Math.round(hsb.b*255/100);if(s==0){rgb.r=rgb.g=rgb.b=v}else{var t1=v;var t2=(255-s)*v/255;var t3=(t1-t2)*(h%60)/60;if(h==360){h=0}if(h<60){rgb.r=t1;rgb.b=t2;rgb.g=t2+t3}else{if(h<120){rgb.g=t1;rgb.b=t2;rgb.r=t1-t3}else{if(h<180){rgb.g=t1;rgb.r=t2;rgb.b=t2+t3}else{if(h<240){rgb.b=t1;rgb.r=t2;rgb.g=t1-t3}else{if(h<300){rgb.b=t1;rgb.g=t2;rgb.r=t2+t3}else{if(h<360){rgb.r=t1;rgb.g=t2;rgb.b=t1-t3}else{rgb.r=0;rgb.g=0;rgb.b=0}}}}}}}return{r:Math.round(rgb.r),g:Math.round(rgb.g),b:Math.round(rgb.b)}},RGBToHex=function(rgb){var hex=[rgb.r.toString(16),rgb.g.toString(16),rgb.b.toString(16)];jQuery.each(hex,function(nr,val){if(val.length==1){hex[nr]="0"+val}});return hex.join("")},HSBToHex=function(hsb){return RGBToHex(HSBToRGB(hsb))},restoreOriginal=function(){var cal=jQuery(this).parent();var col=cal.data("colorpicker").origColor;cal.data("colorpicker").color=col;fillRGBFields(col,cal.get(0));fillHexFields(col,cal.get(0));fillHSBFields(col,cal.get(0));setSelector(col,cal.get(0));setHue(col,cal.get(0));setNewColor(col,cal.get(0))};return{init:function(opt){opt=jQuery.extend({},defaults,opt||{});if(typeof opt.color=="string"){opt.color=HexToHSB(opt.color)}else{if(opt.color.r!=undefined&&opt.color.g!=undefined&&opt.color.b!=undefined){opt.color=RGBToHSB(opt.color)}else{if(opt.color.h!=undefined&&opt.color.s!=undefined&&opt.color.b!=undefined){opt.color=fixHSB(opt.color)}else{return this}}}return this.each(function(){if(!jQuery(this).data("colorpickerId")){var options=jQuery.extend({},opt);options.origColor=opt.color;var id="collorpicker_"+parseInt(Math.random()*1000);jQuery(this).data("colorpickerId",id);var cal=jQuery(tpl).attr("id",id);if(options.flat){cal.appendTo(this).show()}else{cal.appendTo(document.body)}options.fields=cal.find("input").bind("keyup",keyDown).bind("change",change).bind("blur",blur).bind("focus",focus);cal.find("span").bind("mousedown",downIncrement).end().find(">div.colorpicker_current_color").bind("click",restoreOriginal);options.selector=cal.find("div.colorpicker_color").bind("mousedown",downSelector);options.selectorIndic=options.selector.find("div div");options.el=this;options.hue=cal.find("div.colorpicker_hue div");cal.find("div.colorpicker_hue").bind("mousedown",downHue);options.newColor=cal.find("div.colorpicker_new_color");options.currentColor=cal.find("div.colorpicker_current_color");cal.data("colorpicker",options);cal.find("div.colorpicker_submit").bind("mouseenter",enterSubmit).bind("mouseleave",leaveSubmit).bind("click",clickSubmit);fillRGBFields(options.color,cal.get(0));fillHSBFields(options.color,cal.get(0));fillHexFields(options.color,cal.get(0));setHue(options.color,cal.get(0));setSelector(options.color,cal.get(0));setCurrentColor(options.color,cal.get(0));setNewColor(options.color,cal.get(0));if(options.flat){cal.css({position:"relative",display:"block"})}else{jQuery(this).bind(options.eventName,show)}}})},showPicker:function(){return this.each(function(){if(jQuery(this).data("colorpickerId")){show.apply(this)}})},hidePicker:function(){return this.each(function(){if(jQuery(this).data("colorpickerId")){jQuery("#"+jQuery(this).data("colorpickerId")).hide()}})},setColor:function(col){if(typeof col=="string"){col=HexToHSB(col)}else{if(col.r!=undefined&&col.g!=undefined&&col.b!=undefined){col=RGBToHSB(col)}else{if(col.h!=undefined&&col.s!=undefined&&col.b!=undefined){col=fixHSB(col)}else{return this}}}return this.each(function(){if(jQuery(this).data("colorpickerId")){var cal=jQuery("#"+jQuery(this).data("colorpickerId"));cal.data("colorpicker").color=col;cal.data("colorpicker").origColor=col;fillRGBFields(col,cal.get(0));fillHSBFields(col,cal.get(0));fillHexFields(col,cal.get(0));setHue(col,cal.get(0));setSelector(col,cal.get(0));setCurrentColor(col,cal.get(0));setNewColor(col,cal.get(0))}})}}}();jQuery.fn.extend({ColorPicker:ColorPicker.init,ColorPickerHide:ColorPicker.hidePicker,ColorPickerShow:ColorPicker.showPicker,ColorPickerSetColor:ColorPicker.setColor})})(jQuery);
|
|
include/counterwidget.php
CHANGED
@@ -16,8 +16,8 @@ class S2_Counter_widget extends WP_Widget {
|
|
16 |
extract($args);
|
17 |
|
18 |
$title = empty($instance['title']) ? 'Subscriber Count' : $instance['title'];
|
19 |
-
$s2w_bg = empty($instance['s2w_bg']) ? '
|
20 |
-
$s2w_fg = empty($instance['s2w_fg']) ? '345797' : $instance['s2w_fg'];
|
21 |
$s2w_width = empty($instance['s2w_width']) ? '82' : $instance['s2w_width'];
|
22 |
$s2w_height = empty($instance['s2w_height']) ? '16' : $instance['s2w_height'];
|
23 |
$s2w_font = empty($instance['s2w_font']) ? '11' : $instance['s2w_font'];
|
@@ -28,7 +28,7 @@ class S2_Counter_widget extends WP_Widget {
|
|
28 |
$registered = $mysubscribe2->get_registered();
|
29 |
$confirmed = $mysubscribe2->get_public();
|
30 |
$count = (count($registered) + count($confirmed));
|
31 |
-
echo "<ul><div style=\"text-align:center; background-color
|
32 |
echo $count;
|
33 |
echo "</span></div></ul>";
|
34 |
echo $after_widget;
|
@@ -56,7 +56,7 @@ class S2_Counter_widget extends WP_Widget {
|
|
56 |
// set some defaults
|
57 |
$options = get_option('widget_s2counter');
|
58 |
if ( $options === false ) {
|
59 |
-
$defaults = array('title'=>'Subscriber Count', 's2w_bg'=>'
|
60 |
} else {
|
61 |
$defaults = array('title'=>$options['title'], 's2w_bg'=>$options['s2w_bg'], 's2w_fg'=>$options['s2w_fg'], 's2w_width'=>$options['s2w_width'], 's2w_height'=>$options['s2w_height'], 's2w_font'=>$options['s2w_font']);
|
62 |
delete_option('widget_s2counter');
|
@@ -80,6 +80,7 @@ class S2_Counter_widget extends WP_Widget {
|
|
80 |
echo "<input type=\"text\" name=\"" . $this->get_field_name('s2w_bg') . "\" id=\"" . $this->get_field_id('s2w_bg') . "\" maxlength=\"6\" value=\"" . $s2w_bg . "\" class=\"colorpickerField\" style=\"width:60px;\" /> " . __('Body', 'subscribe2') . "</label><br />\r\n";
|
81 |
echo "<label>\r\n";
|
82 |
echo "<input type=\"text\" name=\"" . $this->get_field_name('s2w_fg') . "\" id=\"" . $this->get_field_id('s2w_fg') . "\" maxlength=\"6\" value=\"" . $s2w_fg . "\" class=\"colorpickerField\" style=\"width:60px;\" /> " . __('Text', 'subscribe2') . "</label><br />\r\n";
|
|
|
83 |
echo "</fieldset>";
|
84 |
|
85 |
echo "<fieldset>\r\n";
|
16 |
extract($args);
|
17 |
|
18 |
$title = empty($instance['title']) ? 'Subscriber Count' : $instance['title'];
|
19 |
+
$s2w_bg = empty($instance['s2w_bg']) ? '#e3dacf' : $instance['s2w_bg'];
|
20 |
+
$s2w_fg = empty($instance['s2w_fg']) ? '#345797' : $instance['s2w_fg'];
|
21 |
$s2w_width = empty($instance['s2w_width']) ? '82' : $instance['s2w_width'];
|
22 |
$s2w_height = empty($instance['s2w_height']) ? '16' : $instance['s2w_height'];
|
23 |
$s2w_font = empty($instance['s2w_font']) ? '11' : $instance['s2w_font'];
|
28 |
$registered = $mysubscribe2->get_registered();
|
29 |
$confirmed = $mysubscribe2->get_public();
|
30 |
$count = (count($registered) + count($confirmed));
|
31 |
+
echo "<ul><div style=\"text-align:center; background-color:" . $s2w_bg . "; color:" . $s2w_fg . "; width:" . $s2w_width . "px; height:" . $s2w_height . "px; font:" . $s2w_font . "pt Verdana, Arial, Helvetica, sans-serif; vertical-align:middle; padding:3px; border:1px solid #444;\">";
|
32 |
echo $count;
|
33 |
echo "</span></div></ul>";
|
34 |
echo $after_widget;
|
56 |
// set some defaults
|
57 |
$options = get_option('widget_s2counter');
|
58 |
if ( $options === false ) {
|
59 |
+
$defaults = array('title'=>'Subscriber Count', 's2w_bg'=>'#e3dacf', 's2w_fg'=>'#345797', 's2w_width'=>'82', 's2w_height'=>'16', 's2w_font'=>'11');
|
60 |
} else {
|
61 |
$defaults = array('title'=>$options['title'], 's2w_bg'=>$options['s2w_bg'], 's2w_fg'=>$options['s2w_fg'], 's2w_width'=>$options['s2w_width'], 's2w_height'=>$options['s2w_height'], 's2w_font'=>$options['s2w_font']);
|
62 |
delete_option('widget_s2counter');
|
80 |
echo "<input type=\"text\" name=\"" . $this->get_field_name('s2w_bg') . "\" id=\"" . $this->get_field_id('s2w_bg') . "\" maxlength=\"6\" value=\"" . $s2w_bg . "\" class=\"colorpickerField\" style=\"width:60px;\" /> " . __('Body', 'subscribe2') . "</label><br />\r\n";
|
81 |
echo "<label>\r\n";
|
82 |
echo "<input type=\"text\" name=\"" . $this->get_field_name('s2w_fg') . "\" id=\"" . $this->get_field_id('s2w_fg') . "\" maxlength=\"6\" value=\"" . $s2w_fg . "\" class=\"colorpickerField\" style=\"width:60px;\" /> " . __('Text', 'subscribe2') . "</label><br />\r\n";
|
83 |
+
echo "<div class=\"s2_colorpicker\" id =\"" . $this->get_field_id('s2_colorpicker') . "\"></div>";
|
84 |
echo "</fieldset>";
|
85 |
|
86 |
echo "<fieldset>\r\n";
|
include/s2_colorpicker.dev.js
CHANGED
@@ -1,43 +1,46 @@
|
|
1 |
-
// version 1.0 - original
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
jQuery(
|
18 |
-
return false;
|
19 |
-
},
|
20 |
-
onHide: function (el) {
|
21 |
-
jQuery(el).fadeOut(500);
|
22 |
-
return false;
|
23 |
-
},
|
24 |
-
onChange: function (hsb, hex, rgb) {
|
25 |
-
a = hex.toUpperCase();
|
26 |
-
id.value = a;
|
27 |
-
},
|
28 |
-
onSubmit: function (hsb, hex, rgb, el) {
|
29 |
-
a = hex.toUpperCase();
|
30 |
-
id.value = a;
|
31 |
-
jQuery('.colorpicker').fadeOut(500);
|
32 |
-
return false;
|
33 |
}
|
34 |
});
|
35 |
-
|
36 |
-
jQuery
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
});
|
42 |
-
}
|
43 |
-
});
|
1 |
+
// version 1.0 - original version
|
2 |
+
jQuery(document).ready(function() {
|
3 |
+
var version = jQuery.fn.jquery.split('.');
|
4 |
+
if (parseFloat(version[1]) < 7) {
|
5 |
+
// use .live as we are on jQuery prior to 1.7
|
6 |
+
jQuery('.colorpickerField').live('click', function() {
|
7 |
+
if ( jQuery(this).attr('id').search("__i__") === -1 ) {
|
8 |
+
var picker;
|
9 |
+
var field = jQuery(this).attr('id').substr(0,20);
|
10 |
+
jQuery('.s2_colorpicker').hide();
|
11 |
+
jQuery('.s2_colorpicker').each(function(){
|
12 |
+
if ( jQuery(this).attr('id').search(field) !== -1) {
|
13 |
+
picker = jQuery(this).attr('id');
|
14 |
+
}
|
15 |
+
});
|
16 |
+
jQuery.farbtastic('#' + picker).linkTo(this);
|
17 |
+
jQuery('#' + picker).slideDown();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
});
|
20 |
+
} else {
|
21 |
+
// use .on as we are using jQuery 1.7 and up where .live is deprecated
|
22 |
+
jQuery(document).on('focus', '.colorpickerField',function(){
|
23 |
+
if (jQuery(this).is('.s2_initialised') || this.id.search('__i__') !== -1) {
|
24 |
+
return; // exit early, already initialized or not activated
|
25 |
}
|
26 |
+
jQuery(this).addClass('s2_initialised');
|
27 |
+
var picker;
|
28 |
+
var field = jQuery(this).attr('id').substr(0,20);
|
29 |
+
jQuery('.s2_colorpicker').each(function() {
|
30 |
+
if ( jQuery(this).attr('id').search(field) !== -1) {
|
31 |
+
picker = jQuery(this).attr('id');
|
32 |
+
return false; // stop looping
|
33 |
+
}
|
34 |
+
});
|
35 |
+
jQuery(this).on('focusin', function(event) {
|
36 |
+
jQuery('.s2_colorpicker').hide();
|
37 |
+
jQuery.farbtastic('#' + picker).linkTo(this);
|
38 |
+
jQuery('#' + picker).slideDown();
|
39 |
+
});
|
40 |
+
jQuery(this).on('focusout', function(event) {
|
41 |
+
jQuery('#' + picker).slideUp();
|
42 |
+
});
|
43 |
+
jQuery(this).trigger('focus'); // retrigger focus event for plugin to work
|
44 |
});
|
45 |
+
}
|
46 |
+
});
|
include/s2_colorpicker.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){var
|
1 |
+
jQuery(document).ready(function(){var version=jQuery.fn.jquery.split('.');if(parseFloat(version[1])<7){jQuery('.colorpickerField').live('click',function(){if(jQuery(this).attr('id').search("__i__")===-1){var picker;var field=jQuery(this).attr('id').substr(0,20);jQuery('.s2_colorpicker').hide();jQuery('.s2_colorpicker').each(function(){if(jQuery(this).attr('id').search(field)!==-1){picker=jQuery(this).attr('id')}});jQuery.farbtastic('#'+picker).linkTo(this);jQuery('#'+picker).slideDown()}})}else{jQuery(document).on('focus','.colorpickerField',function(){if(jQuery(this).is('.s2_initialised')||this.id.search('__i__')!==-1){return}jQuery(this).addClass('s2_initialised');var picker;var field=jQuery(this).attr('id').substr(0,20);jQuery('.s2_colorpicker').each(function(){if(jQuery(this).attr('id').search(field)!==-1){picker=jQuery(this).attr('id');return false}});jQuery(this).on('focusin',function(event){jQuery('.s2_colorpicker').hide();jQuery.farbtastic('#'+picker).linkTo(this);jQuery('#'+picker).slideDown()});jQuery(this).on('focusout',function(event){jQuery('#'+picker).slideUp()});jQuery(this).trigger('focus')})}});
|
subscribe2.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Subscribe2
|
4 |
Plugin URI: http://subscribe2.wordpress.com
|
5 |
Description: Notifies an email list when new entries are posted.
|
6 |
-
Version: 8.
|
7 |
Author: Matthew Robinson
|
8 |
Author URI: http://subscribe2.wordpress.com
|
9 |
Licence: GPL3
|
@@ -43,7 +43,7 @@ if ( version_compare($GLOBALS['wp_version'], '3.1', '<') || !function_exists( 'a
|
|
43 |
|
44 |
// our version number. Don't touch this or any line below
|
45 |
// unless you know exactly what you are doing
|
46 |
-
define( 'S2VERSION', '8.
|
47 |
define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
|
48 |
define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
|
49 |
define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
|
3 |
Plugin Name: Subscribe2
|
4 |
Plugin URI: http://subscribe2.wordpress.com
|
5 |
Description: Notifies an email list when new entries are posted.
|
6 |
+
Version: 8.2
|
7 |
Author: Matthew Robinson
|
8 |
Author URI: http://subscribe2.wordpress.com
|
9 |
Licence: GPL3
|
43 |
|
44 |
// our version number. Don't touch this or any line below
|
45 |
// unless you know exactly what you are doing
|
46 |
+
define( 'S2VERSION', '8.2' );
|
47 |
define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
|
48 |
define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
|
49 |
define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
|
subscribe2.pot
CHANGED
@@ -8,7 +8,7 @@ msgid ""
|
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: PACKAGE VERSION\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
-
"POT-Creation-Date: 2012-04-
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -566,8 +566,8 @@ msgstr ""
|
|
566 |
msgid "Delete this email address"
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: admin/subscribers.php:272 classes/class-s2-admin.php:
|
570 |
-
#: classes/class-s2-admin.php:
|
571 |
msgid "Select / Unselect All"
|
572 |
msgstr ""
|
573 |
|
@@ -717,96 +717,96 @@ msgstr ""
|
|
717 |
msgid "Donate"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: classes/class-s2-admin.php:
|
721 |
msgid "Subscribe2 Notification Override"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: classes/class-s2-admin.php:
|
725 |
msgid ""
|
726 |
"Check here to disable sending of an email notification for this post/page"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: classes/class-s2-admin.php:
|
730 |
msgid "All Users and Subscribers"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: classes/class-s2-admin.php:
|
734 |
msgid "Public Subscribers"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: classes/class-s2-admin.php:
|
738 |
msgid "Confirmed"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: classes/class-s2-admin.php:
|
742 |
msgid "Unconfirmed"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: classes/class-s2-admin.php:
|
746 |
msgid "All Registered Users"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: classes/class-s2-admin.php:
|
750 |
msgid "Registered Subscribers"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: classes/class-s2-admin.php:
|
754 |
msgid "Post Author"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: classes/class-s2-admin.php:
|
758 |
msgid ""
|
759 |
"The WordPress cron functions may be disabled on this server. Digest "
|
760 |
"notifications may not work."
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: classes/class-s2-admin.php:
|
764 |
msgid "For each Post"
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: classes/class-s2-admin.php:
|
768 |
msgid "Send Digest Notification at"
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: classes/class-s2-admin.php:
|
772 |
msgid ""
|
773 |
"This option will be ignored if the time selected is not in the future in "
|
774 |
"relation to the current time"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: classes/class-s2-admin.php:
|
778 |
msgid "Current UTC time is"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: classes/class-s2-admin.php:
|
782 |
msgid "Current blog time is"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: classes/class-s2-admin.php:
|
786 |
msgid "Next email notification will be sent when your blog time is after"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: classes/class-s2-admin.php:
|
790 |
msgid "Attempt to resend the last Digest Notification email"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: classes/class-s2-admin.php:
|
794 |
msgid "Resend Digest"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: classes/class-s2-admin.php:
|
798 |
msgid "Email subscription"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: classes/class-s2-admin.php:
|
802 |
msgid "Subscribe / Unsubscribe"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: classes/class-s2-admin.php:
|
806 |
msgid "Receive notifications"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: classes/class-s2-admin.php:
|
810 |
msgid ""
|
811 |
"Check if you want to receive email notification when new posts are published"
|
812 |
msgstr ""
|
@@ -899,73 +899,73 @@ msgstr ""
|
|
899 |
msgid "Options reset!"
|
900 |
msgstr ""
|
901 |
|
902 |
-
#: classes/class-s2-core.php:
|
903 |
msgid "Plain Text Excerpt Preview"
|
904 |
msgstr ""
|
905 |
|
906 |
-
#: classes/class-s2-core.php:
|
907 |
msgid "Plain Text Full Preview"
|
908 |
msgstr ""
|
909 |
|
910 |
-
#: classes/class-s2-core.php:
|
911 |
msgid "HTML Excerpt Preview"
|
912 |
msgstr ""
|
913 |
|
914 |
-
#: classes/class-s2-core.php:
|
915 |
msgid "HTML Full Preview"
|
916 |
msgstr ""
|
917 |
|
918 |
-
#: classes/class-s2-core.php:
|
919 |
msgid "Registered User"
|
920 |
msgstr ""
|
921 |
|
922 |
-
#: classes/class-s2-core.php:
|
923 |
msgid "Confirmed Public Subscriber"
|
924 |
msgstr ""
|
925 |
|
926 |
-
#: classes/class-s2-core.php:
|
927 |
msgid "Unconfirmed Public Subscriber"
|
928 |
msgstr ""
|
929 |
|
930 |
-
#: classes/class-s2-core.php:
|
931 |
msgid "Check here to Subscribe to email notifications for new posts"
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: classes/class-s2-core.php:
|
935 |
msgid ""
|
936 |
"By registering with this blog you are also agreeing to receive email "
|
937 |
"notifications for new posts but you can unsubscribe at anytime"
|
938 |
msgstr ""
|
939 |
|
940 |
-
#: classes/class-s2-core.php:
|
941 |
msgid "Check here to Subscribe to notifications for new posts"
|
942 |
msgstr ""
|
943 |
|
944 |
-
#: classes/class-s2-core.php:
|
945 |
msgid "Weekly"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: classes/class-s2-core.php:
|
949 |
msgid "Author"
|
950 |
msgstr ""
|
951 |
|
952 |
-
#: classes/class-s2-core.php:
|
953 |
msgid "Posted on"
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: classes/class-s2-core.php:
|
957 |
msgid "Posted in"
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: classes/class-s2-core.php:
|
961 |
msgid "Tagged as"
|
962 |
msgstr ""
|
963 |
|
964 |
-
#: classes/class-s2-core.php:
|
965 |
msgid "Digest Email"
|
966 |
msgstr ""
|
967 |
|
968 |
-
#: classes/class-s2-core.php:
|
969 |
msgid "Digest Preview"
|
970 |
msgstr ""
|
971 |
|
@@ -1029,19 +1029,19 @@ msgstr ""
|
|
1029 |
msgid "Text"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: include/counterwidget.php:
|
1033 |
msgid "Width, Height and Font Size"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: include/counterwidget.php:
|
1037 |
msgid "Width"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
-
#: include/counterwidget.php:
|
1041 |
msgid "Height"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: include/counterwidget.php:
|
1045 |
msgid "Font"
|
1046 |
msgstr ""
|
1047 |
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: PACKAGE VERSION\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
+
"POT-Creation-Date: 2012-04-18 20:21+0100\n"
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
566 |
msgid "Delete this email address"
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: admin/subscribers.php:272 classes/class-s2-admin.php:204
|
570 |
+
#: classes/class-s2-admin.php:250 classes/class-s2-admin.php:290
|
571 |
msgid "Select / Unselect All"
|
572 |
msgstr ""
|
573 |
|
717 |
msgid "Donate"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: classes/class-s2-admin.php:147 classes/class-s2-admin.php:148
|
721 |
msgid "Subscribe2 Notification Override"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: classes/class-s2-admin.php:158
|
725 |
msgid ""
|
726 |
"Check here to disable sending of an email notification for this post/page"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: classes/class-s2-admin.php:342
|
730 |
msgid "All Users and Subscribers"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: classes/class-s2-admin.php:343
|
734 |
msgid "Public Subscribers"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: classes/class-s2-admin.php:344
|
738 |
msgid "Confirmed"
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: classes/class-s2-admin.php:345
|
742 |
msgid "Unconfirmed"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: classes/class-s2-admin.php:346
|
746 |
msgid "All Registered Users"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: classes/class-s2-admin.php:347
|
750 |
msgid "Registered Subscribers"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: classes/class-s2-admin.php:429
|
754 |
msgid "Post Author"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: classes/class-s2-admin.php:453
|
758 |
msgid ""
|
759 |
"The WordPress cron functions may be disabled on this server. Digest "
|
760 |
"notifications may not work."
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: classes/class-s2-admin.php:457
|
764 |
msgid "For each Post"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: classes/class-s2-admin.php:471
|
768 |
msgid "Send Digest Notification at"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: classes/class-s2-admin.php:483
|
772 |
msgid ""
|
773 |
"This option will be ignored if the time selected is not in the future in "
|
774 |
"relation to the current time"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: classes/class-s2-admin.php:486
|
778 |
msgid "Current UTC time is"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: classes/class-s2-admin.php:488
|
782 |
msgid "Current blog time is"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: classes/class-s2-admin.php:490
|
786 |
msgid "Next email notification will be sent when your blog time is after"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: classes/class-s2-admin.php:493
|
790 |
msgid "Attempt to resend the last Digest Notification email"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: classes/class-s2-admin.php:494
|
794 |
msgid "Resend Digest"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: classes/class-s2-admin.php:717
|
798 |
msgid "Email subscription"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: classes/class-s2-admin.php:719
|
802 |
msgid "Subscribe / Unsubscribe"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: classes/class-s2-admin.php:720
|
806 |
msgid "Receive notifications"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: classes/class-s2-admin.php:721
|
810 |
msgid ""
|
811 |
"Check if you want to receive email notification when new posts are published"
|
812 |
msgstr ""
|
899 |
msgid "Options reset!"
|
900 |
msgstr ""
|
901 |
|
902 |
+
#: classes/class-s2-core.php:620
|
903 |
msgid "Plain Text Excerpt Preview"
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: classes/class-s2-core.php:622
|
907 |
msgid "Plain Text Full Preview"
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: classes/class-s2-core.php:624
|
911 |
msgid "HTML Excerpt Preview"
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: classes/class-s2-core.php:626
|
915 |
msgid "HTML Full Preview"
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: classes/class-s2-core.php:1205
|
919 |
msgid "Registered User"
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: classes/class-s2-core.php:1210
|
923 |
msgid "Confirmed Public Subscriber"
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: classes/class-s2-core.php:1212
|
927 |
msgid "Unconfirmed Public Subscriber"
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: classes/class-s2-core.php:1249
|
931 |
msgid "Check here to Subscribe to email notifications for new posts"
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: classes/class-s2-core.php:1255
|
935 |
msgid ""
|
936 |
"By registering with this blog you are also agreeing to receive email "
|
937 |
"notifications for new posts but you can unsubscribe at anytime"
|
938 |
msgstr ""
|
939 |
|
940 |
+
#: classes/class-s2-core.php:1281
|
941 |
msgid "Check here to Subscribe to notifications for new posts"
|
942 |
msgstr ""
|
943 |
|
944 |
+
#: classes/class-s2-core.php:1371
|
945 |
msgid "Weekly"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: classes/class-s2-core.php:1494 classes/class-s2-core.php:1495
|
949 |
msgid "Author"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: classes/class-s2-core.php:1503
|
953 |
msgid "Posted on"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: classes/class-s2-core.php:1507 classes/class-s2-core.php:1508
|
957 |
msgid "Posted in"
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: classes/class-s2-core.php:1513 classes/class-s2-core.php:1514
|
961 |
msgid "Tagged as"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: classes/class-s2-core.php:1578
|
965 |
msgid "Digest Email"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: classes/class-s2-core.php:1588
|
969 |
msgid "Digest Preview"
|
970 |
msgstr ""
|
971 |
|
1029 |
msgid "Text"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: include/counterwidget.php:87
|
1033 |
msgid "Width, Height and Font Size"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: include/counterwidget.php:89
|
1037 |
msgid "Width"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: include/counterwidget.php:91
|
1041 |
msgid "Height"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: include/counterwidget.php:93
|
1045 |
msgid "Font"
|
1046 |
msgstr ""
|
1047 |
|