Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Easy Modal |
Version | 1.2.0.9 |
Comparing to | |
See all releases |
Code changes from version 1.2.0.4 to 1.2.0.9
- easy-modal.php +8 -7
- inc/ajax/content.php +0 -17
- inc/css/easy-modal-admin.css +170 -182
- inc/css/easy-modal-admin.min.css +1 -184
- inc/css/easy-modal.css +3 -3
- inc/css/easy-modal.min.css +1 -94
- inc/js/colorpicker.js +483 -483
- inc/js/easy-modal-admin.js +326 -333
- inc/js/easy-modal-admin.min.js +1 -72
- inc/js/easy-modal.min.js +1 -928
- inc/js/jquery.form.js +0 -12
- inc/views/_notes/dwsync.xml +0 -23
- readme.txt +5 -2
easy-modal.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Modal
|
|
4 |
Plugin URI: https://easy-modal.com
|
5 |
Description: Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
|
6 |
Author: Wizard Internet Solutions
|
7 |
-
Version: 1.2.0.
|
8 |
Author URI: http://wizardinternetsolutions.com
|
9 |
*/
|
10 |
if (!defined('EASYMODAL'))
|
@@ -20,7 +20,7 @@ if (!defined('EASYMODAL_URL'))
|
|
20 |
define('EASYMODAL_URL', WP_PLUGIN_URL . '/' . EASYMODAL_SLUG);
|
21 |
|
22 |
if (!defined('EASYMODAL_VERSION'))
|
23 |
-
define('EASYMODAL_VERSION', '1.2.0.
|
24 |
|
25 |
class Easy_Modal {
|
26 |
protected $api_url = 'http://easy-modal.com/api';
|
@@ -167,14 +167,14 @@ class Easy_Modal {
|
|
167 |
else
|
168 |
{
|
169 |
$current_version = get_option('EasyModal_Version');
|
170 |
-
if(in_array($current_version,array('1.1.9.9','1.2','1.2.0.1','1.2.0.2')))
|
171 |
{
|
172 |
foreach($this->getModalList() as $key => $name)
|
173 |
{
|
174 |
$modal = $this->getModalSettings($key);
|
175 |
-
$modal['sitewide'] = true;
|
176 |
-
$modal['overlayClose'] = $modal['overlayClose'] == 'true' || $modal['overlayClose'] ==
|
177 |
-
$modal['overlayEscClose'] = $modal['overlayEscClose'] == 'true' || $modal['overlayEscClose'] ==
|
178 |
$this->updateModalSettings($key, $modal);
|
179 |
}
|
180 |
}
|
@@ -945,6 +945,7 @@ class Easy_Modal {
|
|
945 |
// Activated With Valid License
|
946 |
public function check_updates($checked_data)
|
947 |
{
|
|
|
948 |
if (empty($checked_data->checked))
|
949 |
{
|
950 |
return $checked_data;
|
@@ -955,7 +956,7 @@ class Easy_Modal {
|
|
955 |
{
|
956 |
$response = unserialize($request['body']);
|
957 |
}
|
958 |
-
if (!empty($response) && is_object($response)) // Feed the update data into WP updater
|
959 |
{
|
960 |
$checked_data->response[EASYMODAL_SLUG .'/'. EASYMODAL_SLUG .'.php'] = $response;
|
961 |
}
|
4 |
Plugin URI: https://easy-modal.com
|
5 |
Description: Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
|
6 |
Author: Wizard Internet Solutions
|
7 |
+
Version: 1.2.0.9
|
8 |
Author URI: http://wizardinternetsolutions.com
|
9 |
*/
|
10 |
if (!defined('EASYMODAL'))
|
20 |
define('EASYMODAL_URL', WP_PLUGIN_URL . '/' . EASYMODAL_SLUG);
|
21 |
|
22 |
if (!defined('EASYMODAL_VERSION'))
|
23 |
+
define('EASYMODAL_VERSION', '1.2.0.9' );
|
24 |
|
25 |
class Easy_Modal {
|
26 |
protected $api_url = 'http://easy-modal.com/api';
|
167 |
else
|
168 |
{
|
169 |
$current_version = get_option('EasyModal_Version');
|
170 |
+
if(in_array($current_version,array('1.1.9.9','1.2','1.2.0.1','1.2.0.2','1.2.0.4')))
|
171 |
{
|
172 |
foreach($this->getModalList() as $key => $name)
|
173 |
{
|
174 |
$modal = $this->getModalSettings($key);
|
175 |
+
$modal['sitewide'] = !empty($modal['sitewide']) ? $modal['sitewide'] : true;
|
176 |
+
$modal['overlayClose'] = !empty($modal['overlayClose']) && ($modal['overlayClose'] == 'true' || $modal['overlayClose'] == true) ? true : false;
|
177 |
+
$modal['overlayEscClose'] = !empty($modal['overlayEscClose']) && ($modal['overlayEscClose'] == 'true' || $modal['overlayEscClose'] == true) ? true : false;
|
178 |
$this->updateModalSettings($key, $modal);
|
179 |
}
|
180 |
}
|
945 |
// Activated With Valid License
|
946 |
public function check_updates($checked_data)
|
947 |
{
|
948 |
+
unset($checked_data->response[EASYMODAL_SLUG .'/'. EASYMODAL_SLUG .'.php']);
|
949 |
if (empty($checked_data->checked))
|
950 |
{
|
951 |
return $checked_data;
|
956 |
{
|
957 |
$response = unserialize($request['body']);
|
958 |
}
|
959 |
+
if (!empty($response) && is_object($response) && strpos($response->version,'p') !== false) // Feed the update data into WP updater
|
960 |
{
|
961 |
$checked_data->response[EASYMODAL_SLUG .'/'. EASYMODAL_SLUG .'.php'] = $response;
|
962 |
}
|
inc/ajax/content.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Easy Modal
|
4 |
-
* http://wizardinternetsolutions.com/plugins/easy-modal/
|
5 |
-
*/
|
6 |
-
require( '../../../../../wp-load.php' );
|
7 |
-
global $EM;
|
8 |
-
$options = $EM->getModalSettings($_POST['modalId']);
|
9 |
-
|
10 |
-
if($_POST['modalId'] == 'Link'){?>
|
11 |
-
<iframe src="<?php echo $_POST['url']?>" height="<?php echo $_POST['iframeHeight']?>" width="<?php echo $_POST['iframeWidth']?>" style="background:#fff" >
|
12 |
-
<p>Your browser does not support iframes.</p>
|
13 |
-
</iframe><?php
|
14 |
-
} else {?>
|
15 |
-
<h1 id='eModal-Title'><?php echo $options['title'] ?></h1>
|
16 |
-
<?php echo do_shortcode($options['content']);
|
17 |
-
}?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/css/easy-modal-admin.css
CHANGED
@@ -1,183 +1,171 @@
|
|
1 |
-
#icon-easy-modal {
|
2 |
-
background: transparent url('../images/admin/easy-modal-icon.png') no-repeat;
|
3 |
-
}
|
4 |
-
#poststuff h2 { margin-bottom:0; }
|
5 |
-
.em-tab {
|
6 |
-
display: none;
|
7 |
-
}
|
8 |
-
.em-tab.active {
|
9 |
-
display: block;
|
10 |
-
padding: 0.5em 0.9em;
|
11 |
-
border: 1px solid #ddd;
|
12 |
-
background-color: #fff;
|
13 |
-
border-radius: 0 3px 3px 3px;
|
14 |
-
}
|
15 |
-
.colorSelect {
|
16 |
-
width:100px!important;
|
17 |
-
display:inline-block;
|
18 |
-
}
|
19 |
-
.color-swatch {
|
20 |
-
margin-top:1px;
|
21 |
-
margin-right:10px;
|
22 |
-
width:1.75em;
|
23 |
-
height:1.75em;
|
24 |
-
display:block;
|
25 |
-
float:left;
|
26 |
-
border-style: solid;
|
27 |
-
border-width: 1px;
|
28 |
-
border-radius: 3px;
|
29 |
-
cursor:pointer;
|
30 |
-
}
|
31 |
-
#userHeight, #userWidth, #duration{
|
32 |
-
width:100px;
|
33 |
-
}
|
34 |
-
.share-buttons {
|
35 |
-
margin:0;
|
36 |
-
width:100%;
|
37 |
-
display:block;
|
38 |
-
clear:both;
|
39 |
-
}
|
40 |
-
.share-buttons li {
|
41 |
-
text-align:center;
|
42 |
-
width:32%;
|
43 |
-
display:inline-block; float:left; margin-right:1%;
|
44 |
-
margin-bottom:0;
|
45 |
-
}
|
46 |
-
.share-buttons li:last-child {
|
47 |
-
margin-right:0;
|
48 |
-
}
|
49 |
-
ul.bullets {
|
50 |
-
padding-left:1em;
|
51 |
-
list-style:circle;
|
52 |
-
}
|
53 |
-
ul.bullets li {
|
54 |
-
margin-bottom:.125em;
|
55 |
-
}
|
56 |
-
.postbox .inside p, .postbox .inside ul { margin-top:0; }
|
57 |
-
.postbox .inside h2,
|
58 |
-
.postbox .inside h3,
|
59 |
-
.postbox .inside h4,
|
60 |
-
.postbox .inside h5,
|
61 |
-
.postbox .inside h6 { margin-bottom:0; }
|
62 |
-
|
63 |
-
.modal
|
64 |
-
.modal
|
65 |
-
.modal
|
66 |
-
.modal
|
67 |
-
.modal
|
68 |
-
.modal img.
|
69 |
-
.modal
|
70 |
-
.
|
71 |
-
.value
|
72 |
-
.
|
73 |
-
|
74 |
-
|
75 |
-
.empreview{
|
76 |
-
.
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
|
106 |
-
.
|
107 |
-
.
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
.
|
112 |
-
.colorpicker{
|
113 |
-
.
|
114 |
-
.
|
115 |
-
.
|
116 |
-
.
|
117 |
-
.
|
118 |
-
.
|
119 |
-
.
|
120 |
-
.
|
121 |
-
.
|
122 |
-
.
|
123 |
-
.
|
124 |
-
.
|
125 |
-
.
|
126 |
-
|
127 |
-
.
|
128 |
-
|
129 |
-
.
|
130 |
-
.
|
131 |
-
.
|
132 |
-
|
133 |
-
.
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
.ui-
|
150 |
-
.ui-
|
151 |
-
.ui-
|
152 |
-
.ui-
|
153 |
-
.ui-
|
154 |
-
.ui-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
.ui-slider{
|
160 |
-
.ui-slider .ui-slider-
|
161 |
-
.ui-slider .ui-slider-range{
|
162 |
-
.
|
163 |
-
.
|
164 |
-
.
|
165 |
-
.
|
166 |
-
.
|
167 |
-
.
|
168 |
-
.
|
169 |
-
.
|
170 |
-
.
|
171 |
-
.ui-slider-vertical .ui-slider-range-max{top:0}
|
172 |
-
|
173 |
-
|
174 |
-
.cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}
|
175 |
-
.cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:bold}
|
176 |
-
.cb-enable span{background-position:left -90px;padding:0 10px}
|
177 |
-
.cb-disable span{background-position:right -180px;padding:0 10px}
|
178 |
-
.cb-disable.selected{background-position:0 -30px}
|
179 |
-
.cb-disable.selected span{background-position:right -210px;color:#fff}
|
180 |
-
.cb-enable.selected{background-position:0 -60px}
|
181 |
-
.cb-enable.selected span{background-position:left -150px;color:#fff}
|
182 |
-
.switch label{cursor:pointer}
|
183 |
.switch input{display:none}
|
1 |
+
#icon-easy-modal {
|
2 |
+
background: transparent url('../images/admin/easy-modal-icon.png') no-repeat;
|
3 |
+
}
|
4 |
+
#poststuff h2#em-tabs { margin-bottom:0; }
|
5 |
+
.em-tab {
|
6 |
+
display: none;
|
7 |
+
}
|
8 |
+
.em-tab.active {
|
9 |
+
display: block;
|
10 |
+
padding: 0.5em 0.9em;
|
11 |
+
border: 1px solid #ddd;
|
12 |
+
background-color: #fff;
|
13 |
+
border-radius: 0 3px 3px 3px;
|
14 |
+
}
|
15 |
+
.colorSelect {
|
16 |
+
width:100px!important;
|
17 |
+
display:inline-block;
|
18 |
+
}
|
19 |
+
.color-swatch {
|
20 |
+
margin-top:1px;
|
21 |
+
margin-right:10px;
|
22 |
+
width:1.75em;
|
23 |
+
height:1.75em;
|
24 |
+
display:block;
|
25 |
+
float:left;
|
26 |
+
border-style: solid;
|
27 |
+
border-width: 1px;
|
28 |
+
border-radius: 3px;
|
29 |
+
cursor:pointer;
|
30 |
+
}
|
31 |
+
#userHeight, #userWidth, #duration{
|
32 |
+
width:100px;
|
33 |
+
}
|
34 |
+
.share-buttons {
|
35 |
+
margin:0;
|
36 |
+
width:100%;
|
37 |
+
display:block;
|
38 |
+
clear:both;
|
39 |
+
}
|
40 |
+
.share-buttons li {
|
41 |
+
text-align:center;
|
42 |
+
width:32%;
|
43 |
+
display:inline-block; float:left; margin-right:1%;
|
44 |
+
margin-bottom:0;
|
45 |
+
}
|
46 |
+
.share-buttons li:last-child {
|
47 |
+
margin-right:0;
|
48 |
+
}
|
49 |
+
ul.bullets {
|
50 |
+
padding-left:1em;
|
51 |
+
list-style:circle;
|
52 |
+
}
|
53 |
+
ul.bullets li {
|
54 |
+
margin-bottom:.125em;
|
55 |
+
}
|
56 |
+
.postbox .inside p, .postbox .inside ul { margin-top:0; }
|
57 |
+
.postbox .inside h2,
|
58 |
+
.postbox .inside h3,
|
59 |
+
.postbox .inside h4,
|
60 |
+
.postbox .inside h5,
|
61 |
+
.postbox .inside h6 { margin-bottom:0; }
|
62 |
+
.modal h2,
|
63 |
+
.modal h3,
|
64 |
+
.modal h4,
|
65 |
+
.modal h5,
|
66 |
+
.modal h6 { margin-bottom:.5em; }
|
67 |
+
.modal img.left { margin-right:.5em; }
|
68 |
+
.modal img.right { margin-left:.5em; }
|
69 |
+
.modal p { margin-top:0; }
|
70 |
+
.value-slider { margin-right:10px; min-width:75%; display:inline-block; }
|
71 |
+
.slider-value { display:inline-block; }
|
72 |
+
.nav-tab { margin-right:0; }
|
73 |
+
|
74 |
+
.empreview{width:42%;float:left;position:relative;border:1px solid #666}
|
75 |
+
.empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}
|
76 |
+
#eModal-Preview .example-modal {
|
77 |
+
position:relative;
|
78 |
+
width:300px;
|
79 |
+
top:10px;
|
80 |
+
margin:auto;
|
81 |
+
font-size:16px;
|
82 |
+
position: relative;
|
83 |
+
z-index: 99;
|
84 |
+
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
85 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
86 |
+
}
|
87 |
+
#eModal-Preview .example-modal .close-modal {
|
88 |
+
text-decoration:none;
|
89 |
+
text-align:center;
|
90 |
+
font-size: 1.375em;
|
91 |
+
line-height: 1;
|
92 |
+
position: absolute;
|
93 |
+
top: 0.5em;
|
94 |
+
right: 0.6875em;
|
95 |
+
color: #aaa;
|
96 |
+
text-shadow: 0 -1px 1px rbga(0,0,0,.6);
|
97 |
+
font-weight: bold;
|
98 |
+
cursor: pointer;
|
99 |
+
}
|
100 |
+
#eModal-Preview .example-modal, #eModal-Preview .example-modal-overlay { display:block; }
|
101 |
+
.empreview #eModal-Preview{height:450px;width:100%;position:relative}
|
102 |
+
.example-modal-overlay{position:absolute;width:100%;height:100%;top:0;left:0}
|
103 |
+
.emthemes{display:inline-block;float:left;width:57%;margin-right:.5%}
|
104 |
+
.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}
|
105 |
+
.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}
|
106 |
+
.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}
|
107 |
+
.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}
|
108 |
+
.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}
|
109 |
+
.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}
|
110 |
+
.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}
|
111 |
+
.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}
|
112 |
+
.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}
|
113 |
+
.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}
|
114 |
+
.colorpicker_hex input{right:6px}
|
115 |
+
.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}
|
116 |
+
.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}
|
117 |
+
.colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}
|
118 |
+
.colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}
|
119 |
+
.colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}
|
120 |
+
.colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}
|
121 |
+
.colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}
|
122 |
+
.colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}
|
123 |
+
.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}
|
124 |
+
.colorpicker_focus{background-position:center}
|
125 |
+
.colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}
|
126 |
+
/*!
|
127 |
+
* jQuery UI CSS Framework 1.8.22
|
128 |
+
*
|
129 |
+
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
130 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
131 |
+
* http://jquery.org/license
|
132 |
+
*
|
133 |
+
* http://docs.jquery.com/UI/Theming/API
|
134 |
+
*
|
135 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
136 |
+
*/
|
137 |
+
.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}
|
138 |
+
.ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}
|
139 |
+
.ui-widget-content a{color:#222}
|
140 |
+
.ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}
|
141 |
+
.ui-state-default,.ui-widget-content .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#2e6e9e}
|
142 |
+
.ui-corner-all{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}
|
143 |
+
.ui-corner-all{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}
|
144 |
+
.ui-corner-all{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}
|
145 |
+
.ui-corner-all{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}
|
146 |
+
/*!
|
147 |
+
* jQuery UI Slider 1.8.22
|
148 |
+
*/
|
149 |
+
.ui-slider{position:relative;text-align:left}
|
150 |
+
.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}
|
151 |
+
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}
|
152 |
+
.ui-slider-horizontal{height:.8em}
|
153 |
+
.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}
|
154 |
+
.ui-slider-horizontal .ui-slider-range{top:0;height:100%}
|
155 |
+
.ui-slider-horizontal .ui-slider-range-min{left:0}
|
156 |
+
.ui-slider-horizontal .ui-slider-range-max{right:0}
|
157 |
+
.ui-slider-vertical{width:.8em;height:100px}
|
158 |
+
.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}
|
159 |
+
.ui-slider-vertical .ui-slider-range{left:0;width:100%}
|
160 |
+
.ui-slider-vertical .ui-slider-range-min{bottom:0}
|
161 |
+
.ui-slider-vertical .ui-slider-range-max{top:0}
|
162 |
+
.cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}
|
163 |
+
.cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:bold}
|
164 |
+
.cb-enable span{background-position:left -90px;padding:0 10px}
|
165 |
+
.cb-disable span{background-position:right -180px;padding:0 10px}
|
166 |
+
.cb-disable.selected{background-position:0 -30px}
|
167 |
+
.cb-disable.selected span{background-position:right -210px;color:#fff}
|
168 |
+
.cb-enable.selected{background-position:0 -60px}
|
169 |
+
.cb-enable.selected span{background-position:left -150px;color:#fff}
|
170 |
+
.switch label{cursor:pointer}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
.switch input{display:none}
|
inc/css/easy-modal-admin.min.css
CHANGED
@@ -1,184 +1 @@
|
|
1 |
-
#icon-easy-modal {
|
2 |
-
background: transparent url('../images/admin/easy-modal-icon.png') no-repeat;
|
3 |
-
}
|
4 |
-
#poststuff h2#em-tabs { margin-bottom:0; }
|
5 |
-
|
6 |
-
.em-tab {
|
7 |
-
display: none;
|
8 |
-
}
|
9 |
-
.em-tab.active {
|
10 |
-
display: block;
|
11 |
-
padding: 0.5em 0.9em;
|
12 |
-
border: 1px solid #ddd;
|
13 |
-
background-color: #fff;
|
14 |
-
border-radius: 0 3px 3px 3px;
|
15 |
-
}
|
16 |
-
.colorSelect {
|
17 |
-
width:100px!important;
|
18 |
-
display:inline-block;
|
19 |
-
}
|
20 |
-
.color-swatch {
|
21 |
-
margin-top:1px;
|
22 |
-
margin-right:10px;
|
23 |
-
width:1.75em;
|
24 |
-
height:1.75em;
|
25 |
-
display:block;
|
26 |
-
float:left;
|
27 |
-
border-style: solid;
|
28 |
-
border-width: 1px;
|
29 |
-
border-radius: 3px;
|
30 |
-
cursor:pointer;
|
31 |
-
}
|
32 |
-
#userHeight, #userWidth, #duration{
|
33 |
-
width:100px;
|
34 |
-
}
|
35 |
-
.share-buttons {
|
36 |
-
margin:0;
|
37 |
-
width:100%;
|
38 |
-
display:block;
|
39 |
-
clear:both;
|
40 |
-
}
|
41 |
-
.share-buttons li {
|
42 |
-
text-align:center;
|
43 |
-
width:32%;
|
44 |
-
display:inline-block; float:left; margin-right:1%;
|
45 |
-
margin-bottom:0;
|
46 |
-
}
|
47 |
-
.share-buttons li:last-child {
|
48 |
-
margin-right:0;
|
49 |
-
}
|
50 |
-
ul.bullets {
|
51 |
-
padding-left:1em;
|
52 |
-
list-style:circle;
|
53 |
-
}
|
54 |
-
ul.bullets li {
|
55 |
-
margin-bottom:.125em;
|
56 |
-
}
|
57 |
-
.postbox .inside p, .postbox .inside ul { margin-top:0; }
|
58 |
-
.postbox .inside h2,
|
59 |
-
.postbox .inside h3,
|
60 |
-
.postbox .inside h4,
|
61 |
-
.postbox .inside h5,
|
62 |
-
.postbox .inside h6 { margin-bottom:0; }
|
63 |
-
|
64 |
-
.modal h2,
|
65 |
-
.modal h3,
|
66 |
-
.modal h4,
|
67 |
-
.modal h5,
|
68 |
-
.modal h6 { margin-bottom:.5em; }
|
69 |
-
.modal img.left { margin-right:.5em; }
|
70 |
-
.modal img.right { margin-left:.5em; }
|
71 |
-
.modal p { margin-top:0; }
|
72 |
-
.value-slider { margin-right:10px; min-width:75%; display:inline-block; }
|
73 |
-
.slider-value { display:inline-block; }
|
74 |
-
.nav-tab { margin-right:0; }
|
75 |
-
|
76 |
-
.empreview{width:42%;float:left;position:relative;border:1px solid #666}
|
77 |
-
.empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
#eModal-Preview .example-modal {
|
82 |
-
position:relative;
|
83 |
-
width:300px;
|
84 |
-
top:10px;
|
85 |
-
margin:auto;
|
86 |
-
font-size:16px;
|
87 |
-
position: relative;
|
88 |
-
z-index: 99;
|
89 |
-
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
90 |
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
91 |
-
}
|
92 |
-
#eModal-Preview .example-modal .close-modal {
|
93 |
-
text-decoration:none;
|
94 |
-
text-align:center;
|
95 |
-
font-size: 1.375em;
|
96 |
-
line-height: 1;
|
97 |
-
position: absolute;
|
98 |
-
top: 0.5em;
|
99 |
-
right: 0.6875em;
|
100 |
-
color: #aaa;
|
101 |
-
text-shadow: 0 -1px 1px rbga(0,0,0,.6);
|
102 |
-
font-weight: bold;
|
103 |
-
cursor: pointer;
|
104 |
-
}
|
105 |
-
#eModal-Preview .example-modal, #eModal-Preview .example-modal-overlay { display:block; }
|
106 |
-
|
107 |
-
.empreview #eModal-Preview{height:450px;width:100%;position:relative}
|
108 |
-
.example-modal-overlay{position:absolute;width:100%;height:100%;top:0;left:0}
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
.emthemes{display:inline-block;float:left;width:57%;margin-right:.5%}
|
113 |
-
.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}
|
114 |
-
.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}
|
115 |
-
.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}
|
116 |
-
.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}
|
117 |
-
.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}
|
118 |
-
.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}
|
119 |
-
.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}
|
120 |
-
.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}
|
121 |
-
.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}
|
122 |
-
.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}
|
123 |
-
.colorpicker_hex input{right:6px}
|
124 |
-
.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}
|
125 |
-
.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}
|
126 |
-
.colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}
|
127 |
-
.colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}
|
128 |
-
.colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}
|
129 |
-
.colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}
|
130 |
-
.colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}
|
131 |
-
.colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}
|
132 |
-
.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}
|
133 |
-
.colorpicker_focus{background-position:center}
|
134 |
-
.colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}
|
135 |
-
|
136 |
-
/*!
|
137 |
-
* jQuery UI CSS Framework 1.8.22
|
138 |
-
*
|
139 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
140 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
141 |
-
* http://jquery.org/license
|
142 |
-
*
|
143 |
-
* http://docs.jquery.com/UI/Theming/API
|
144 |
-
*
|
145 |
-
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
146 |
-
*/
|
147 |
-
.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}
|
148 |
-
.ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}
|
149 |
-
.ui-widget-content a{color:#222}
|
150 |
-
.ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}
|
151 |
-
.ui-state-default,.ui-widget-content .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#2e6e9e}
|
152 |
-
.ui-corner-all{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}
|
153 |
-
.ui-corner-all{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}
|
154 |
-
.ui-corner-all{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}
|
155 |
-
.ui-corner-all{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}
|
156 |
-
|
157 |
-
/*!
|
158 |
-
* jQuery UI Slider 1.8.22
|
159 |
-
*/
|
160 |
-
.ui-slider{position:relative;text-align:left}
|
161 |
-
.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}
|
162 |
-
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}
|
163 |
-
.ui-slider-horizontal{height:.8em}
|
164 |
-
.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}
|
165 |
-
.ui-slider-horizontal .ui-slider-range{top:0;height:100%}
|
166 |
-
.ui-slider-horizontal .ui-slider-range-min{left:0}
|
167 |
-
.ui-slider-horizontal .ui-slider-range-max{right:0}
|
168 |
-
.ui-slider-vertical{width:.8em;height:100px}
|
169 |
-
.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}
|
170 |
-
.ui-slider-vertical .ui-slider-range{left:0;width:100%}
|
171 |
-
.ui-slider-vertical .ui-slider-range-min{bottom:0}
|
172 |
-
.ui-slider-vertical .ui-slider-range-max{top:0}
|
173 |
-
|
174 |
-
|
175 |
-
.cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}
|
176 |
-
.cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:bold}
|
177 |
-
.cb-enable span{background-position:left -90px;padding:0 10px}
|
178 |
-
.cb-disable span{background-position:right -180px;padding:0 10px}
|
179 |
-
.cb-disable.selected{background-position:0 -30px}
|
180 |
-
.cb-disable.selected span{background-position:right -210px;color:#fff}
|
181 |
-
.cb-enable.selected{background-position:0 -60px}
|
182 |
-
.cb-enable.selected span{background-position:left -150px;color:#fff}
|
183 |
-
.switch label{cursor:pointer}
|
184 |
-
.switch input{display:none}
|
1 |
+
#icon-easy-modal{background:transparent url(../images/admin/easy-modal-icon.png) no-repeat}#poststuff h2#em-tabs{margin-bottom:0}.em-tab{display:none}.em-tab.active{display:block;padding:.5em .9em;border:1px solid #ddd;background-color:#fff;border-radius:0 3px 3px}.colorSelect{width:100px!important;display:inline-block}.color-swatch{margin-top:1px;margin-right:10px;width:1.75em;height:1.75em;display:block;float:left;border-style:solid;border-width:1px;border-radius:3px;cursor:pointer}#userHeight,#userWidth,#duration{width:100px}.share-buttons{margin:0;width:100%;display:block;clear:both}.share-buttons li{text-align:center;width:32%;display:inline-block;float:left;margin-right:1%;margin-bottom:0}.share-buttons li:last-child{margin-right:0}ul.bullets{padding-left:1em;list-style:circle}ul.bullets li{margin-bottom:.125em}.postbox .inside p,.postbox .inside ul{margin-top:0}.postbox .inside h2,.postbox .inside h3,.postbox .inside h4,.postbox .inside h5,.postbox .inside h6{margin-bottom:0}.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{margin-bottom:.5em}.modal img.left{margin-right:.5em}.modal img.right{margin-left:.5em}.modal p{margin-top:0}.value-slider{margin-right:10px;min-width:75%;display:inline-block}.slider-value{display:inline-block}.nav-tab{margin-right:0}.empreview{width:42%;float:left;position:relative;border:1px solid #666}.empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}#eModal-Preview .example-modal{position:relative;width:300px;top:10px;margin:auto;font-size:16px;position:relative;z-index:99;-webkit-box-shadow:0 0 10px rgba(0,0,0,.4);box-shadow:0 0 10px rgba(0,0,0,.4)}#eModal-Preview .example-modal .close-modal{text-decoration:none;text-align:center;font-size:1.375em;line-height:1;position:absolute;top:.5em;right:.6875em;color:#aaa;text-shadow:0 -1px 1px rbga(0,0,0,.6);font-weight:700;cursor:pointer}#eModal-Preview .example-modal,#eModal-Preview .example-modal-overlay{display:block}.empreview #eModal-Preview{height:450px;width:100%;position:relative}.example-modal-overlay{position:absolute;width:100%;height:100%;top:0;left:0}.emthemes{display:inline-block;float:left;width:57%;margin-right:.5%}.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}.colorpicker_hex input{right:6px}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}.colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}.colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}.colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}.colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}.colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}.colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}.colorpicker_focus{background-position:center}.colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}.ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:700}.ui-state-default,.ui-widget-content .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:700;color:#2e6e9e}.ui-corner-all{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}.ui-corner-all{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}.ui-corner-all{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}.ui-corner-all{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}.cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:700}.cb-enable span{background-position:left -90px;padding:0 10px}.cb-disable span{background-position:right -180px;padding:0 10px}.cb-disable.selected{background-position:0 -30px}.cb-disable.selected span{background-position:right -210px;color:#fff}.cb-enable.selected{background-position:0 -60px}.cb-enable.selected span{background-position:left -150px;color:#fff}.switch label{cursor:pointer}.switch input{display:none}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/css/easy-modal.css
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
width: 100%;
|
5 |
background: #000;
|
6 |
background: rgba(0,0,0,0.45);
|
7 |
-
z-index:
|
8 |
display: none;
|
9 |
top: 0;
|
10 |
left: 0;
|
@@ -23,9 +23,9 @@
|
|
23 |
height: auto;
|
24 |
background-color: white;
|
25 |
border: solid 1px #666;
|
|
|
26 |
position: absolute;
|
27 |
-
|
28 |
-
z-index: 99;
|
29 |
padding: 1.25em;
|
30 |
-webkit-border-radius: 5px;
|
31 |
border-radius: 5px;
|
4 |
width: 100%;
|
5 |
background: #000;
|
6 |
background: rgba(0,0,0,0.45);
|
7 |
+
z-index: 998;
|
8 |
display: none;
|
9 |
top: 0;
|
10 |
left: 0;
|
23 |
height: auto;
|
24 |
background-color: white;
|
25 |
border: solid 1px #666;
|
26 |
+
overflow:visible;
|
27 |
position: absolute;
|
28 |
+
z-index: 999;
|
|
|
29 |
padding: 1.25em;
|
30 |
-webkit-border-radius: 5px;
|
31 |
border-radius: 5px;
|
inc/css/easy-modal.min.css
CHANGED
@@ -1,94 +1 @@
|
|
1 |
-
#modal-overlay {
|
2 |
-
position: fixed;
|
3 |
-
height: 100%;
|
4 |
-
width: 100%;
|
5 |
-
background: #000;
|
6 |
-
background: rgba(0,0,0,0.45);
|
7 |
-
z-index: 98;
|
8 |
-
display: none;
|
9 |
-
top: 0;
|
10 |
-
left: 0;
|
11 |
-
}
|
12 |
-
.modal, .modal:before, .modal:after, .modal * {
|
13 |
-
-moz-box-sizing: border-box;
|
14 |
-
}
|
15 |
-
.modal {
|
16 |
-
font-size: 16px;
|
17 |
-
display: none;
|
18 |
-
visibility: hidden;
|
19 |
-
top: 100px;
|
20 |
-
left: 50%;
|
21 |
-
margin-left: -40%;
|
22 |
-
width: 80%;
|
23 |
-
height: auto;
|
24 |
-
background-color: white;
|
25 |
-
border: solid 1px #666;
|
26 |
-
overflow:hidden;
|
27 |
-
position: absolute;
|
28 |
-
z-index: 99;
|
29 |
-
padding: 1.25em;
|
30 |
-
-webkit-border-radius: 5px;
|
31 |
-
border-radius: 5px;
|
32 |
-
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
33 |
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
34 |
-
transform: scale(1, 1);
|
35 |
-
transform-origin: 0;
|
36 |
-
}
|
37 |
-
.modal .close-modal {
|
38 |
-
text-decoration: none;
|
39 |
-
text-align: center;
|
40 |
-
font-size: 1.375em;
|
41 |
-
line-height: 1;
|
42 |
-
position: absolute;
|
43 |
-
top: .5em;
|
44 |
-
right: .6875em;
|
45 |
-
color: #aaa;
|
46 |
-
text-shadow: 0 -1px 1px rbga(0, 0, 0, .6);
|
47 |
-
font-weight: bold;
|
48 |
-
cursor: pointer;
|
49 |
-
}
|
50 |
-
.modal .title {
|
51 |
-
display: block;
|
52 |
-
}
|
53 |
-
.modal-placeholder {
|
54 |
-
z-index: 100;
|
55 |
-
left: 50%;
|
56 |
-
position: absolute;
|
57 |
-
}
|
58 |
-
@media only screen and (min-width: 768px) {
|
59 |
-
.modal {
|
60 |
-
padding: 1.875em;
|
61 |
-
top: 6.25em;
|
62 |
-
}
|
63 |
-
.modal.tiny {
|
64 |
-
margin-left: -15%;
|
65 |
-
width: 30%;
|
66 |
-
}
|
67 |
-
.modal.small {
|
68 |
-
margin-left: -20%;
|
69 |
-
width: 40%;
|
70 |
-
}
|
71 |
-
.modal.medium {
|
72 |
-
margin-left: -30%;
|
73 |
-
width: 60%;
|
74 |
-
}
|
75 |
-
.modal.large {
|
76 |
-
margin-left: -35%;
|
77 |
-
width: 70%;
|
78 |
-
}
|
79 |
-
.modal.xlarge {
|
80 |
-
margin-left: -47.5%;
|
81 |
-
width: 95%;
|
82 |
-
}
|
83 |
-
.modal>:first-child {
|
84 |
-
margin-top: 0;
|
85 |
-
}
|
86 |
-
.modal>:last-child {
|
87 |
-
margin-bottom: 0;
|
88 |
-
}
|
89 |
-
}
|
90 |
-
@media print {
|
91 |
-
.modal {
|
92 |
-
background: white!important;
|
93 |
-
}
|
94 |
-
}
|
1 |
+
#modal-overlay { position: fixed; height: 100%; width: 100%; background: #000; background: rgba(0,0,0,0.45); z-index: 998; display: none; top: 0; left: 0;}.modal, .modal:before, .modal:after, .modal * { -moz-box-sizing: border-box;}.modal { font-size: 16px; display: none; visibility: hidden; top: 100px; left: 50%; margin-left: -40%; width: 80%; height: auto; background-color: white; border: solid 1px #666; overflow:visible; position: absolute; z-index: 999; padding: 1.25em; -webkit-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); transform: scale(1, 1); transform-origin: 0;}.modal .close-modal { text-decoration: none; text-align: center; font-size: 1.375em; line-height: 1; position: absolute; top: .5em; right: .6875em; color: #aaa; text-shadow: 0 -1px 1px rbga(0, 0, 0, .6); font-weight: bold; cursor: pointer;}.modal .title { display: block;}.modal-placeholder { z-index: 100; left: 50%; position: absolute;} @media only screen and (min-width: 768px){.modal { padding: 1.875em; top: 6.25em;}.modal.tiny { margin-left: -15%; width: 30%;}.modal.small { margin-left: -20%; width: 40%;}.modal.medium { margin-left: -30%; width: 60%;}.modal.large { margin-left: -35%; width: 70%;}.modal.xlarge { margin-left: -47.5%; width: 95%;}.modal>:first-child { margin-top: 0;}.modal>:last-child { margin-bottom: 0;}} @media print{.modal { background: white!important;}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/colorpicker.js
CHANGED
@@ -1,484 +1,484 @@
|
|
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 ($) {
|
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 |
-
$(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 |
-
$(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 |
-
$(cal).data('colorpicker').fields
|
43 |
-
.eq(0).val(HSBToHex(hsb)).end();
|
44 |
-
},
|
45 |
-
setSelector = function (hsb, cal) {
|
46 |
-
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
47 |
-
$(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 |
-
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
54 |
-
},
|
55 |
-
setCurrentColor = function (hsb, cal) {
|
56 |
-
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
57 |
-
},
|
58 |
-
setNewColor = function (hsb, cal) {
|
59 |
-
$(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 = $(this).parent().parent();
|
67 |
-
if (cal.data('colorpicker').livePreview === true) {
|
68 |
-
change.apply(this);
|
69 |
-
}
|
70 |
-
},
|
71 |
-
change = function (ev) {
|
72 |
-
var cal = $(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 = $(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 |
-
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
105 |
-
$(this).parent().addClass('colorpicker_focus');
|
106 |
-
},
|
107 |
-
downIncrement = function (ev) {
|
108 |
-
var field = $(this).parent().find('input').focus();
|
109 |
-
var current = {
|
110 |
-
el: $(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: $(this).parent().parent().data('colorpicker').livePreview
|
116 |
-
};
|
117 |
-
$(document).bind('mouseup', current, upIncrement);
|
118 |
-
$(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 |
-
$(document).unbind('mouseup', upIncrement);
|
131 |
-
$(document).unbind('mousemove', moveIncrement);
|
132 |
-
return false;
|
133 |
-
},
|
134 |
-
downHue = function (ev) {
|
135 |
-
var current = {
|
136 |
-
cal: $(this).parent(),
|
137 |
-
y: $(this).offset().top
|
138 |
-
};
|
139 |
-
current.preview = current.cal.data('colorpicker').livePreview;
|
140 |
-
$(document).bind('mouseup', current, upHue);
|
141 |
-
$(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 |
-
$(document).unbind('mouseup', upHue);
|
158 |
-
$(document).unbind('mousemove', moveHue);
|
159 |
-
return false;
|
160 |
-
},
|
161 |
-
downSelector = function (ev) {
|
162 |
-
var current = {
|
163 |
-
cal: $(this).parent(),
|
164 |
-
pos: $(this).offset()
|
165 |
-
};
|
166 |
-
current.preview = current.cal.data('colorpicker').livePreview;
|
167 |
-
$(document).bind('mouseup', current, upSelector);
|
168 |
-
$(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 |
-
$(document).unbind('mouseup', upSelector);
|
188 |
-
$(document).unbind('mousemove', moveSelector);
|
189 |
-
return false;
|
190 |
-
},
|
191 |
-
enterSubmit = function (ev) {
|
192 |
-
$(this).addClass('colorpicker_focus');
|
193 |
-
},
|
194 |
-
leaveSubmit = function (ev) {
|
195 |
-
$(this).removeClass('colorpicker_focus');
|
196 |
-
},
|
197 |
-
clickSubmit = function (ev) {
|
198 |
-
var cal = $(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 = $('#' + $(this).data('colorpickerId'));
|
206 |
-
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
207 |
-
var pos = $(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 |
-
$(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 |
-
$(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 |
-
$.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 = $(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 = $.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 (!$(this).data('colorpickerId')) {
|
388 |
-
var options = $.extend({}, opt);
|
389 |
-
options.origColor = opt.color;
|
390 |
-
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
391 |
-
$(this).data('colorpickerId', id);
|
392 |
-
var cal = $(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 |
-
$(this).bind(options.eventName, show);
|
433 |
-
}
|
434 |
-
}
|
435 |
-
});
|
436 |
-
},
|
437 |
-
showPicker: function() {
|
438 |
-
return this.each( function () {
|
439 |
-
if ($(this).data('colorpickerId')) {
|
440 |
-
show.apply(this);
|
441 |
-
}
|
442 |
-
});
|
443 |
-
},
|
444 |
-
hidePicker: function() {
|
445 |
-
return this.each( function () {
|
446 |
-
if ($(this).data('colorpickerId')) {
|
447 |
-
$('#' + $(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 ($(this).data('colorpickerId')) {
|
463 |
-
var cal = $('#' + $(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 |
-
$.fn.extend({
|
479 |
-
ColorPicker: ColorPicker.init,
|
480 |
-
ColorPickerHide: ColorPicker.hidePicker,
|
481 |
-
ColorPickerShow: ColorPicker.showPicker,
|
482 |
-
ColorPickerSetColor: ColorPicker.setColor
|
483 |
-
});
|
484 |
})(jQuery)
|
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 ($) {
|
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 |
+
$(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 |
+
$(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 |
+
$(cal).data('colorpicker').fields
|
43 |
+
.eq(0).val(HSBToHex(hsb)).end();
|
44 |
+
},
|
45 |
+
setSelector = function (hsb, cal) {
|
46 |
+
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
47 |
+
$(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 |
+
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
54 |
+
},
|
55 |
+
setCurrentColor = function (hsb, cal) {
|
56 |
+
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
57 |
+
},
|
58 |
+
setNewColor = function (hsb, cal) {
|
59 |
+
$(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 = $(this).parent().parent();
|
67 |
+
if (cal.data('colorpicker').livePreview === true) {
|
68 |
+
change.apply(this);
|
69 |
+
}
|
70 |
+
},
|
71 |
+
change = function (ev) {
|
72 |
+
var cal = $(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 = $(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 |
+
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
105 |
+
$(this).parent().addClass('colorpicker_focus');
|
106 |
+
},
|
107 |
+
downIncrement = function (ev) {
|
108 |
+
var field = $(this).parent().find('input').focus();
|
109 |
+
var current = {
|
110 |
+
el: $(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: $(this).parent().parent().data('colorpicker').livePreview
|
116 |
+
};
|
117 |
+
$(document).bind('mouseup', current, upIncrement);
|
118 |
+
$(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 |
+
$(document).unbind('mouseup', upIncrement);
|
131 |
+
$(document).unbind('mousemove', moveIncrement);
|
132 |
+
return false;
|
133 |
+
},
|
134 |
+
downHue = function (ev) {
|
135 |
+
var current = {
|
136 |
+
cal: $(this).parent(),
|
137 |
+
y: $(this).offset().top
|
138 |
+
};
|
139 |
+
current.preview = current.cal.data('colorpicker').livePreview;
|
140 |
+
$(document).bind('mouseup', current, upHue);
|
141 |
+
$(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 |
+
$(document).unbind('mouseup', upHue);
|
158 |
+
$(document).unbind('mousemove', moveHue);
|
159 |
+
return false;
|
160 |
+
},
|
161 |
+
downSelector = function (ev) {
|
162 |
+
var current = {
|
163 |
+
cal: $(this).parent(),
|
164 |
+
pos: $(this).offset()
|
165 |
+
};
|
166 |
+
current.preview = current.cal.data('colorpicker').livePreview;
|
167 |
+
$(document).bind('mouseup', current, upSelector);
|
168 |
+
$(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 |
+
$(document).unbind('mouseup', upSelector);
|
188 |
+
$(document).unbind('mousemove', moveSelector);
|
189 |
+
return false;
|
190 |
+
},
|
191 |
+
enterSubmit = function (ev) {
|
192 |
+
$(this).addClass('colorpicker_focus');
|
193 |
+
},
|
194 |
+
leaveSubmit = function (ev) {
|
195 |
+
$(this).removeClass('colorpicker_focus');
|
196 |
+
},
|
197 |
+
clickSubmit = function (ev) {
|
198 |
+
var cal = $(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 = $('#' + $(this).data('colorpickerId'));
|
206 |
+
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
207 |
+
var pos = $(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 |
+
$(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 |
+
$(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 |
+
$.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 = $(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 = $.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 (!$(this).data('colorpickerId')) {
|
388 |
+
var options = $.extend({}, opt);
|
389 |
+
options.origColor = opt.color;
|
390 |
+
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
391 |
+
$(this).data('colorpickerId', id);
|
392 |
+
var cal = $(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 |
+
$(this).bind(options.eventName, show);
|
433 |
+
}
|
434 |
+
}
|
435 |
+
});
|
436 |
+
},
|
437 |
+
showPicker: function() {
|
438 |
+
return this.each( function () {
|
439 |
+
if ($(this).data('colorpickerId')) {
|
440 |
+
show.apply(this);
|
441 |
+
}
|
442 |
+
});
|
443 |
+
},
|
444 |
+
hidePicker: function() {
|
445 |
+
return this.each( function () {
|
446 |
+
if ($(this).data('colorpickerId')) {
|
447 |
+
$('#' + $(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 ($(this).data('colorpickerId')) {
|
463 |
+
var cal = $('#' + $(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 |
+
$.fn.extend({
|
479 |
+
ColorPicker: ColorPicker.init,
|
480 |
+
ColorPickerHide: ColorPicker.hidePicker,
|
481 |
+
ColorPickerShow: ColorPicker.showPicker,
|
482 |
+
ColorPickerSetColor: ColorPicker.setColor
|
483 |
+
});
|
484 |
})(jQuery)
|
inc/js/easy-modal-admin.js
CHANGED
@@ -1,334 +1,327 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
2 |
-
var active_tab = window.location.hash.replace('#top#','');
|
3 |
-
if ( active_tab == '' )
|
4 |
-
active_tab = jQuery('.em-tab').attr('id');
|
5 |
-
jQuery('#'+active_tab).addClass('active');
|
6 |
-
jQuery('#'+active_tab+'-tab').addClass('nav-tab-active');
|
7 |
-
|
8 |
-
jQuery('#em-tabs a').click(function() {
|
9 |
-
jQuery('#em-tabs a').removeClass('nav-tab-active');
|
10 |
-
jQuery('.em-tab').removeClass('active');
|
11 |
-
|
12 |
-
var id = jQuery(this).attr('id').replace('-tab','');
|
13 |
-
jQuery('#'+id).addClass('active');
|
14 |
-
jQuery(this).addClass('nav-tab-active');
|
15 |
-
});
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
jQuery("
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
jQuery("
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
jQuery("
|
45 |
-
|
46 |
-
|
47 |
-
"
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
jQuery("
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
jQuery("
|
63 |
-
|
64 |
-
|
65 |
-
"
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
jQuery("
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
jQuery("
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
jQuery("
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
case "
|
150 |
-
break;
|
151 |
-
case "
|
152 |
-
break;
|
153 |
-
case "
|
154 |
-
break;
|
155 |
-
case "
|
156 |
-
break;
|
157 |
-
case "
|
158 |
-
break;
|
159 |
-
case "
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
case "
|
175 |
-
break;
|
176 |
-
case "
|
177 |
-
break;
|
178 |
-
case "
|
179 |
-
break;
|
180 |
-
case "
|
181 |
-
break;
|
182 |
-
case "
|
183 |
-
break;
|
184 |
-
case "
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
jQuery("
|
193 |
-
.
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
jQuery(
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
{
|
224 |
-
jQuery('.border-only').
|
225 |
-
}
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
jQuery('.
|
267 |
-
}
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
{
|
279 |
-
jQuery('.custom-size-only').
|
280 |
-
}
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
{
|
292 |
-
jQuery('.animation-only').
|
293 |
-
}
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
jQuery("#
|
301 |
-
jQuery("#
|
302 |
-
jQuery("#
|
303 |
-
jQuery("#
|
304 |
-
|
305 |
-
jQuery(
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
jQuery(this).
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
.on("click", '.write-it', function(){
|
328 |
-
jQuery('<div class="modal-overlay" />').appendTo('body').fadeIn();
|
329 |
-
jQuery('#eModal-Admin-1').css('visibility','visible').fadeIn();
|
330 |
-
return false;
|
331 |
-
})
|
332 |
-
|
333 |
-
|
334 |
});
|
1 |
+
jQuery(document).ready(function(){
|
2 |
+
var active_tab = window.location.hash.replace('#top#','');
|
3 |
+
if ( active_tab == '' )
|
4 |
+
active_tab = jQuery('.em-tab').attr('id');
|
5 |
+
jQuery('#'+active_tab).addClass('active');
|
6 |
+
jQuery('#'+active_tab+'-tab').addClass('nav-tab-active');
|
7 |
+
|
8 |
+
jQuery('#em-tabs a').click(function() {
|
9 |
+
jQuery('#em-tabs a').removeClass('nav-tab-active');
|
10 |
+
jQuery('.em-tab').removeClass('active');
|
11 |
+
|
12 |
+
var id = jQuery(this).attr('id').replace('-tab','');
|
13 |
+
jQuery('#'+id).addClass('active');
|
14 |
+
jQuery(this).addClass('nav-tab-active');
|
15 |
+
});
|
16 |
+
|
17 |
+
/* Value Sliders */
|
18 |
+
jQuery("#overlayOpacitySlider")
|
19 |
+
.slider({value: 0,range: "min",min: 0,max: 100,step: 1,slide: function(t, n){
|
20 |
+
jQuery("#overlayOpacity").val(n.value)
|
21 |
+
jQuery("#overlayOpacityValue").text(n.value)
|
22 |
+
jQuery(".example-modal-overlay").css({
|
23 |
+
opacity: n.value / 100
|
24 |
+
})
|
25 |
+
}})
|
26 |
+
jQuery("#containerPaddingSlider")
|
27 |
+
.slider({value: 0,range: "min",min: 0,max: 40,step: 1,slide: function(t, n){
|
28 |
+
jQuery("#containerPadding").val(n.value)
|
29 |
+
jQuery("#containerPaddingValue").text(n.value)
|
30 |
+
jQuery(".example-modal").css({
|
31 |
+
padding: n.value + "px"
|
32 |
+
})
|
33 |
+
}})
|
34 |
+
jQuery("#containerBorderWidthSlider")
|
35 |
+
.slider({value: 0,range: "min",min: 0,max: 10,step: 1,slide: function(t, n){
|
36 |
+
jQuery("#containerBorderWidth").val(n.value), jQuery("#containerBorderWidthValue").text(n.value), jQuery(".example-modal").css({
|
37 |
+
borderWidth: n.value + "px"
|
38 |
+
})
|
39 |
+
}})
|
40 |
+
jQuery("#containerBorderRadiusSlider")
|
41 |
+
.slider({value: 0,range: "min",min: 0,max: 50,step: 1,slide: function(t, n){
|
42 |
+
jQuery("#containerBorderRadius").val(n.value), jQuery("#containerBorderRadiusValue").text(n.value);
|
43 |
+
var r = n.value + "px";
|
44 |
+
jQuery(".example-modal").css({
|
45 |
+
"-moz-border-radius": r,
|
46 |
+
"-webkit-border-radius": r,
|
47 |
+
"border-radius": r
|
48 |
+
})
|
49 |
+
}})
|
50 |
+
jQuery("#contentTitleFontSizeSlider")
|
51 |
+
.slider({value: 0,range: "min",min: 12,max: 48,step: 1,slide: function(t, n){
|
52 |
+
jQuery("#contentTitleFontSize").val(n.value), jQuery("#contentTitleFontSizeValue").text(n.value);
|
53 |
+
var r = n.value + "px";
|
54 |
+
jQuery(".example-modal .title").css({
|
55 |
+
fontSize: r
|
56 |
+
})
|
57 |
+
}})
|
58 |
+
jQuery("#closeBorderRadiusSlider")
|
59 |
+
.slider({value: 0,range: "min",min: 0,max: Math.round(jQuery("#closeSize").val() / 2),step: 1,slide: function(t, n){
|
60 |
+
jQuery("#closeBorderRadius").val(n.value), jQuery("#closeBorderRadiusValue").text(n.value);
|
61 |
+
var r = n.value + "px";
|
62 |
+
jQuery(".example-modal .close-modal").css({
|
63 |
+
"-moz-border-radius": r,
|
64 |
+
"-webkit-border-radius": r,
|
65 |
+
"border-radius": r
|
66 |
+
})
|
67 |
+
}})
|
68 |
+
jQuery("#closeFontSizeSlider")
|
69 |
+
.slider({value: 0,range: "min",min: 0,max: Math.round(jQuery("#closeSize").val() - 2),step: 1,slide: function(t, n){
|
70 |
+
jQuery("#closeFontSize").val(n.value), jQuery("#closeFontSizeValue").text(n.value);
|
71 |
+
var r = n.value + "px";
|
72 |
+
jQuery(".example-modal .close-modal").css({
|
73 |
+
fontSize: r
|
74 |
+
})
|
75 |
+
}})
|
76 |
+
jQuery("#closeSizeSlider")
|
77 |
+
.slider({value: 0,range: "min",min: 0,max: 40,step: 1,slide: function(t, n){
|
78 |
+
jQuery("#closeSize").val(n.value)
|
79 |
+
jQuery("#closeSizeValue").text(n.value);
|
80 |
+
var r = n.value,i = s = o = u = "auto";
|
81 |
+
switch (jQuery("[name=closePosition]").val()) {
|
82 |
+
case "topright":
|
83 |
+
i = -(r / 2) + "px", u = -(r / 2) + "px";
|
84 |
+
break;
|
85 |
+
case "topleft":
|
86 |
+
i = -(r / 2) + "px", o = -(r / 2) + "px";
|
87 |
+
break;
|
88 |
+
case "bottomright":
|
89 |
+
s = -(r / 2) + "px", u = -(r / 2) + "px";
|
90 |
+
break;
|
91 |
+
case "bottomleft":
|
92 |
+
s = -(r / 2) + "px", o = -(r / 2) + "px"
|
93 |
+
}
|
94 |
+
|
95 |
+
var a = jQuery("#closeFontSizeSlider").slider("value");
|
96 |
+
|
97 |
+
a > r - 2 && (a = r - 2)
|
98 |
+
jQuery("#closeFontSizeValue").text(a)
|
99 |
+
jQuery(".example-modal .close-modal")
|
100 |
+
.css({fontSize: a + "px"})
|
101 |
+
|
102 |
+
jQuery("#closeFontSizeSlider")
|
103 |
+
.slider("option", "max", r - 2)
|
104 |
+
.slider("option", "value", a);
|
105 |
+
|
106 |
+
var f = Math.round(r / 2),
|
107 |
+
l = jQuery("#closeBorderRadiusSlider").slider("value");
|
108 |
+
l > f && (l = f)
|
109 |
+
jQuery("#closeBorderRadiusValue").text(l)
|
110 |
+
|
111 |
+
jQuery(".example-modal .close-modal")
|
112 |
+
.css({"-webkit-border-radius": l + "px","border-radius": l + "px"})
|
113 |
+
|
114 |
+
jQuery("#closeBorderRadiusSlider")
|
115 |
+
.slider("option", "max", f)
|
116 |
+
.slider("option", "value", l)
|
117 |
+
|
118 |
+
jQuery(".example-modal .close-modal")
|
119 |
+
.css({width: r + "px",height: r + "px",lineHeight: r + "px",left: o,right: u,top: i,bottom: s})
|
120 |
+
}})
|
121 |
+
jQuery("#autoOpenDelaySlider")
|
122 |
+
.slider({value: 0,range: "min",min: 0,max: 1e4,step: 500,slide: function(t, n){
|
123 |
+
jQuery("#autoOpenDelay").val(n.value)
|
124 |
+
jQuery("#autoOpenDelayValue").text(n.value)
|
125 |
+
}})
|
126 |
+
/* Color Pickers */
|
127 |
+
|
128 |
+
|
129 |
+
jQuery(".color-swatch")
|
130 |
+
.each(function(){
|
131 |
+
var swatch = jQuery(this);
|
132 |
+
var input = swatch.prev('.colorSelect');
|
133 |
+
swatch.ColorPicker({
|
134 |
+
color: input.val(),
|
135 |
+
onShow: function(colpkr){
|
136 |
+
return jQuery(colpkr).fadeIn(500), !1
|
137 |
+
},
|
138 |
+
onHide: function(colpkr){
|
139 |
+
return jQuery(colpkr).fadeOut(500), !1
|
140 |
+
},
|
141 |
+
onChange: function(n, r, i){
|
142 |
+
swatch.css("backgroundColor", "#" + r)
|
143 |
+
input.val("#" + r);
|
144 |
+
switch (input.attr("name")) {
|
145 |
+
case "overlayColor": jQuery(".example-modal-overlay").css({backgroundColor: "#" + r});
|
146 |
+
break;
|
147 |
+
case "containerBgColor": jQuery(".example-modal").css({backgroundColor: "#" + r});
|
148 |
+
break;
|
149 |
+
case "containerBorderColor": jQuery(".example-modal").css({borderColor: "#" + r});
|
150 |
+
break;
|
151 |
+
case "contentTitleFontColor": jQuery(".example-modal .title").css({color: "#" + r});
|
152 |
+
break;
|
153 |
+
case "contentFontColor": jQuery(".example-modal").css({color: "#" + r});
|
154 |
+
break;
|
155 |
+
case "closeBgColor": jQuery(".example-modal .close-modal").css({backgroundColor: "#" + r});
|
156 |
+
break;
|
157 |
+
case "closeBorderColor": jQuery(".example-modal .close-modal").css({borderColor: "#" + r});
|
158 |
+
break;
|
159 |
+
case "closeFontColor": jQuery(".example-modal .close-modal").css({color: "#" + r})
|
160 |
+
}
|
161 |
+
}
|
162 |
+
})
|
163 |
+
})
|
164 |
+
jQuery(".colorSelect")
|
165 |
+
.on('focusout', function(){
|
166 |
+
var $this = jQuery(this);
|
167 |
+
$this.next('.color-swatch').css('backgroundColor', $this.val()).ColorPickerSetColor($this.val())
|
168 |
+
var color = $this.val();
|
169 |
+
switch ($this.attr("name")){
|
170 |
+
case "overlayColor": jQuery(".example-modal-overlay").css({backgroundColor: color});
|
171 |
+
break;
|
172 |
+
case "containerBgColor": jQuery(".example-modal").css({backgroundColor: color});
|
173 |
+
break;
|
174 |
+
case "containerBorderColor": jQuery(".example-modal").css({borderColor: color});
|
175 |
+
break;
|
176 |
+
case "contentTitleFontColor": jQuery(".example-modal .title").css({color: color});
|
177 |
+
break;
|
178 |
+
case "contentFontColor": jQuery(".example-modal").css({color: color});
|
179 |
+
break;
|
180 |
+
case "closeBgColor": jQuery(".example-modal .close-modal").css({backgroundColor: color});
|
181 |
+
break;
|
182 |
+
case "closeBorderColor": jQuery(".example-modal .close-modal").css({borderColor: color});
|
183 |
+
break;
|
184 |
+
case "closeFontColor": jQuery(".example-modal .close-modal").css({color: color})
|
185 |
+
}
|
186 |
+
})
|
187 |
+
|
188 |
+
jQuery("#autoOpenDelay")
|
189 |
+
.on("change", function(){
|
190 |
+
jQuery("#autoOpenDelaySlider").slider("option", "value", jQuery(this).val())
|
191 |
+
})
|
192 |
+
jQuery(".cb-enable")
|
193 |
+
.click(function(){
|
194 |
+
var t = jQuery(this).parents(".switch");
|
195 |
+
jQuery(".cb-disable", t).removeClass("selected")
|
196 |
+
jQuery(this).addClass("selected")
|
197 |
+
jQuery(".checkbox", t).attr("checked", !0)
|
198 |
+
})
|
199 |
+
|
200 |
+
jQuery(".cb-disable")
|
201 |
+
.click(function(){
|
202 |
+
var t = jQuery(this).parents(".switch");
|
203 |
+
jQuery(".cb-enable", t).removeClass("selected")
|
204 |
+
jQuery(this).addClass("selected")
|
205 |
+
jQuery(".checkbox", t).attr("checked", !1)
|
206 |
+
})
|
207 |
+
jQuery(".switch")
|
208 |
+
.each(function(){
|
209 |
+
var t = jQuery(this),
|
210 |
+
n = jQuery(".checkbox", t);
|
211 |
+
n.is(":checked") && (jQuery(".cb-disable", t).removeClass("selected"), jQuery(".cb-enable", t).addClass("selected"))
|
212 |
+
})
|
213 |
+
jQuery("#containerBorderStyle")
|
214 |
+
.on('change',function(){
|
215 |
+
var $this = jQuery(this)
|
216 |
+
var val = $this.val();
|
217 |
+
jQuery(".example-modal").css({borderStyle: val})
|
218 |
+
if(val == 'none')
|
219 |
+
{
|
220 |
+
jQuery('.border-only').hide()
|
221 |
+
}
|
222 |
+
else
|
223 |
+
{
|
224 |
+
jQuery('.border-only').show()
|
225 |
+
}
|
226 |
+
})
|
227 |
+
|
228 |
+
jQuery("#contentTitleFontFamily")
|
229 |
+
.change(function(){
|
230 |
+
var t = jQuery(this).val();
|
231 |
+
jQuery(".example-modal .title").css({
|
232 |
+
fontFamily: t
|
233 |
+
})
|
234 |
+
})
|
235 |
+
jQuery("#closePosition")
|
236 |
+
.change(function(){
|
237 |
+
var t = parseInt(jQuery("#closeSize").val()),
|
238 |
+
n = bottom = left = right = "auto";
|
239 |
+
switch (jQuery(this).val()) {
|
240 |
+
case "topright":
|
241 |
+
n = -(t / 2) + "px", right = -(t / 2) + "px";
|
242 |
+
break;
|
243 |
+
case "topleft":
|
244 |
+
n = -(t / 2) + "px", left = -(t / 2) + "px";
|
245 |
+
break;
|
246 |
+
case "bottomright":
|
247 |
+
bottom = -(t / 2) + "px", right = -(t / 2) + "px";
|
248 |
+
break;
|
249 |
+
case "bottomleft":
|
250 |
+
bottom = -(t / 2) + "px", left = -(t / 2) + "px"
|
251 |
+
}
|
252 |
+
jQuery(".example-modal .close-modal")
|
253 |
+
.css({left: left,right: right,top: n,bottom: bottom})
|
254 |
+
})
|
255 |
+
jQuery('#closeLocation')
|
256 |
+
.on('change',function(){
|
257 |
+
var $this = jQuery(this)
|
258 |
+
var val = $this.val();
|
259 |
+
if(val == 'inside')
|
260 |
+
{
|
261 |
+
jQuery('.outside-only').hide()
|
262 |
+
jQuery('.close-modal').removeAttr('styles');
|
263 |
+
}
|
264 |
+
else
|
265 |
+
{
|
266 |
+
jQuery('.outside-only').show()
|
267 |
+
}
|
268 |
+
})
|
269 |
+
jQuery("#size")
|
270 |
+
.on('change',function(){
|
271 |
+
var $this = jQuery(this)
|
272 |
+
var val = $this.val();
|
273 |
+
if(val != 'custom')
|
274 |
+
{
|
275 |
+
jQuery('.custom-size-only').hide()
|
276 |
+
}
|
277 |
+
else
|
278 |
+
{
|
279 |
+
jQuery('.custom-size-only').show()
|
280 |
+
}
|
281 |
+
})
|
282 |
+
jQuery("#animation")
|
283 |
+
.on('change',function(){
|
284 |
+
var $this = jQuery(this)
|
285 |
+
var val = $this.val();
|
286 |
+
if(val == 'fade' || val == 'grow')
|
287 |
+
{
|
288 |
+
jQuery('.animation-only').hide()
|
289 |
+
}
|
290 |
+
else
|
291 |
+
{
|
292 |
+
jQuery('.animation-only').show()
|
293 |
+
}
|
294 |
+
})
|
295 |
+
jQuery("#overlayOpacitySlider").slider("option", "value", jQuery("#overlayOpacity").val())
|
296 |
+
jQuery("#containerPaddingSlider").slider("option", "value", jQuery("#containerPadding").val())
|
297 |
+
jQuery("#containerBorderWidthSlider").slider("option", "value", jQuery("#containerBorderWidth").val())
|
298 |
+
jQuery("#containerBorderRadiusSlider").slider("option", "value", jQuery("#containerBorderRadius").val())
|
299 |
+
jQuery("#contentTitleFontSizeSlider").slider("option", "value", jQuery("#contentTitleFontSize").val())
|
300 |
+
jQuery("#closeBorderRadiusSlider").slider("option", "value", jQuery("#closeBorderRadius").val())
|
301 |
+
jQuery("#closeFontSizeSlider").slider("option", "value", jQuery("#closeFontSize").val())
|
302 |
+
jQuery("#closeSizeSlider").slider("option", "value", jQuery("#closeSize").val())
|
303 |
+
jQuery("#autoOpenDelaySlider").slider("option", "value", jQuery("#autoOpenDelay").val())
|
304 |
+
|
305 |
+
jQuery(document)
|
306 |
+
.on("click", '.close-modal',function(){
|
307 |
+
jQuery(this).parent('.modal').fadeOut();
|
308 |
+
jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})
|
309 |
+
})
|
310 |
+
.on("click", '.modal-overlay',function(){
|
311 |
+
jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});
|
312 |
+
jQuery(this).fadeOut(function(){jQuery(this).remove();})
|
313 |
+
})
|
314 |
+
.on("keyup",function(e){
|
315 |
+
if (e.keyCode == 27) {
|
316 |
+
jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});
|
317 |
+
jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})
|
318 |
+
}
|
319 |
+
})
|
320 |
+
|
321 |
+
jQuery(document)
|
322 |
+
.on("click", '.write-it', function(){
|
323 |
+
jQuery('<div class="modal-overlay" />').appendTo('body').fadeIn();
|
324 |
+
jQuery('#eModal-Admin-1').css('visibility','visible').fadeIn();
|
325 |
+
return false;
|
326 |
+
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
});
|
inc/js/easy-modal-admin.min.js
CHANGED
@@ -1,72 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){var
|
2 |
-
active_tab=jQuery('.em-tab').attr('id');jQuery('#'+active_tab).addClass('active');jQuery('#'+active_tab+'-tab').addClass('nav-tab-active');jQuery('#em-tabs a').click(function(){jQuery('#em-tabs a').removeClass('nav-tab-active');jQuery('.em-tab').removeClass('active');var id=jQuery(this).attr('id').replace('-tab','');jQuery('#'+id).addClass('active');jQuery(this).addClass('nav-tab-active');});jQuery("#overlayOpacitySlider").slider({value:0,range:"min",min:0,max:100,step:1,slide:function(t,n){jQuery("#overlayOpacity").val(n.value)
|
3 |
-
jQuery("#overlayOpacityValue").text(n.value)
|
4 |
-
jQuery(".example-modal-overlay").css({opacity:n.value/100})}})
|
5 |
-
jQuery("#containerPaddingSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(t,n){jQuery("#containerPadding").val(n.value)
|
6 |
-
jQuery("#containerPaddingValue").text(n.value)
|
7 |
-
jQuery(".example-modal").css({padding:n.value+"px"})}})
|
8 |
-
jQuery("#containerBorderWidthSlider").slider({value:0,range:"min",min:0,max:10,step:1,slide:function(t,n){jQuery("#containerBorderWidth").val(n.value),jQuery("#containerBorderWidthValue").text(n.value),jQuery(".example-modal").css({borderWidth:n.value+"px"})}})
|
9 |
-
jQuery("#containerBorderRadiusSlider").slider({value:0,range:"min",min:0,max:50,step:1,slide:function(t,n){jQuery("#containerBorderRadius").val(n.value),jQuery("#containerBorderRadiusValue").text(n.value);var r=n.value+"px";jQuery(".example-modal").css({"-moz-border-radius":r,"-webkit-border-radius":r,"border-radius":r})}})
|
10 |
-
jQuery("#contentTitleFontSizeSlider").slider({value:0,range:"min",min:12,max:48,step:1,slide:function(t,n){jQuery("#contentTitleFontSize").val(n.value),jQuery("#contentTitleFontSizeValue").text(n.value);var r=n.value+"px";jQuery(".example-modal .title").css({fontSize:r})}})
|
11 |
-
jQuery("#closeBorderRadiusSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()/2),step:1,slide:function(t,n){jQuery("#closeBorderRadius").val(n.value),jQuery("#closeBorderRadiusValue").text(n.value);var r=n.value+"px";jQuery(".example-modal .close-modal").css({"-moz-border-radius":r,"-webkit-border-radius":r,"border-radius":r})}})
|
12 |
-
jQuery("#closeFontSizeSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()-2),step:1,slide:function(t,n){jQuery("#closeFontSize").val(n.value),jQuery("#closeFontSizeValue").text(n.value);var r=n.value+"px";jQuery(".example-modal .close-modal").css({fontSize:r})}})
|
13 |
-
jQuery("#closeSizeSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(t,n){jQuery("#closeSize").val(n.value)
|
14 |
-
jQuery("#closeSizeValue").text(n.value);var r=n.value,i=s=o=u="auto";switch(jQuery("[name=closePosition]").val()){case"topright":i=-(r/2)+"px",u=-(r/2)+"px";break;case"topleft":i=-(r/2)+"px",o=-(r/2)+"px";break;case"bottomright":s=-(r/2)+"px",u=-(r/2)+"px";break;case"bottomleft":s=-(r/2)+"px",o=-(r/2)+"px"}
|
15 |
-
var a=jQuery("#closeFontSizeSlider").slider("value");a>r-2&&(a=r-2)
|
16 |
-
jQuery("#closeFontSizeValue").text(a)
|
17 |
-
jQuery(".example-modal .close-modal").css({fontSize:a+"px"})
|
18 |
-
jQuery("#closeFontSizeSlider").slider("option","max",r-2).slider("option","value",a);var f=Math.round(r/2),l=jQuery("#closeBorderRadiusSlider").slider("value");l>f&&(l=f)
|
19 |
-
jQuery("#closeBorderRadiusValue").text(l)
|
20 |
-
jQuery(".example-modal .close-modal").css({"-webkit-border-radius":l+"px","border-radius":l+"px"})
|
21 |
-
jQuery("#closeBorderRadiusSlider").slider("option","max",f).slider("option","value",l)
|
22 |
-
jQuery(".example-modal .close-modal").css({width:r+"px",height:r+"px",lineHeight:r+"px",left:o,right:u,top:i,bottom:s})}})
|
23 |
-
jQuery("#autoOpenDelaySlider").slider({value:0,range:"min",min:0,max:1e4,step:500,slide:function(t,n){jQuery("#autoOpenDelay").val(n.value)
|
24 |
-
jQuery("#autoOpenDelayValue").text(n.value)}})
|
25 |
-
jQuery(".color-swatch").each(function(){var swatch=jQuery(this);var input=swatch.prev('.colorSelect');swatch.ColorPicker({color:input.val(),onShow:function(colpkr){return jQuery(colpkr).fadeIn(500),!1},onHide:function(colpkr){return jQuery(colpkr).fadeOut(500),!1},onChange:function(n,r,i){swatch.css("backgroundColor","#"+r)
|
26 |
-
input.val("#"+r);switch(input.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:"#"+r});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:"#"+r});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:"#"+r});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:"#"+r});break;case"contentFontColor":jQuery(".example-modal").css({color:"#"+r});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:"#"+r});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:"#"+r});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:"#"+r})}}})})
|
27 |
-
jQuery(".colorSelect").on('focusout',function(){var $this=jQuery(this);$this.next('.color-swatch').css('backgroundColor',$this.val()).ColorPickerSetColor($this.val())
|
28 |
-
var color=$this.val();switch($this.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:color});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:color});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:color});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:color});break;case"contentFontColor":jQuery(".example-modal").css({color:color});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:color});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:color});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:color})}})
|
29 |
-
jQuery("#autoOpenDelay").on("change",function(){jQuery("#autoOpenDelaySlider").slider("option","value",jQuery(this).val())})
|
30 |
-
jQuery(".cb-enable").click(function(){var t=jQuery(this).parents(".switch");jQuery(".cb-disable",t).removeClass("selected")
|
31 |
-
jQuery(this).addClass("selected")
|
32 |
-
jQuery(".checkbox",t).attr("checked",!0)})
|
33 |
-
jQuery(".cb-disable").click(function(){var t=jQuery(this).parents(".switch");jQuery(".cb-enable",t).removeClass("selected")
|
34 |
-
jQuery(this).addClass("selected")
|
35 |
-
jQuery(".checkbox",t).attr("checked",!1)})
|
36 |
-
jQuery(".switch").each(function(){var t=jQuery(this),n=jQuery(".checkbox",t);n.is(":checked")&&(jQuery(".cb-disable",t).removeClass("selected"),jQuery(".cb-enable",t).addClass("selected"))})
|
37 |
-
jQuery("#containerBorderStyle").on('change',function(){var $this=jQuery(this)
|
38 |
-
var val=$this.val();jQuery(".example-modal").css({borderStyle:val})
|
39 |
-
if(val=='none')
|
40 |
-
{jQuery('.border-only').hide()}
|
41 |
-
else
|
42 |
-
{jQuery('.border-only').show()}})
|
43 |
-
jQuery("#contentTitleFontFamily").change(function(){var t=jQuery(this).val();jQuery(".example-modal .title").css({fontFamily:t})})
|
44 |
-
jQuery("#closePosition").change(function(){var t=parseInt(jQuery("#closeSize").val()),n=bottom=left=right="auto";switch(jQuery(this).val()){case"topright":n=-(t/2)+"px",right=-(t/2)+"px";break;case"topleft":n=-(t/2)+"px",left=-(t/2)+"px";break;case"bottomright":bottom=-(t/2)+"px",right=-(t/2)+"px";break;case"bottomleft":bottom=-(t/2)+"px",left=-(t/2)+"px"}
|
45 |
-
jQuery(".example-modal .close-modal").css({left:left,right:right,top:n,bottom:bottom})})
|
46 |
-
jQuery('#closeLocation').on('change',function(){var $this=jQuery(this)
|
47 |
-
var val=$this.val();if(val=='inside')
|
48 |
-
{jQuery('.outside-only').hide()
|
49 |
-
jQuery('.close-modal').removeAttr('styles');}
|
50 |
-
else
|
51 |
-
{jQuery('.outside-only').show()}})
|
52 |
-
jQuery("#size").on('change',function(){var $this=jQuery(this)
|
53 |
-
var val=$this.val();if(val!='custom')
|
54 |
-
{jQuery('.custom-size-only').hide()}
|
55 |
-
else
|
56 |
-
{jQuery('.custom-size-only').show()}})
|
57 |
-
jQuery("#animation").on('change',function(){var $this=jQuery(this)
|
58 |
-
var val=$this.val();if(val=='fade'||val=='grow')
|
59 |
-
{jQuery('.animation-only').hide()}
|
60 |
-
else
|
61 |
-
{jQuery('.animation-only').show()}})
|
62 |
-
jQuery("#overlayOpacitySlider").slider("option","value",jQuery("#overlayOpacity").val())
|
63 |
-
jQuery("#containerPaddingSlider").slider("option","value",jQuery("#containerPadding").val())
|
64 |
-
jQuery("#containerBorderWidthSlider").slider("option","value",jQuery("#containerBorderWidth").val())
|
65 |
-
jQuery("#containerBorderRadiusSlider").slider("option","value",jQuery("#containerBorderRadius").val())
|
66 |
-
jQuery("#contentTitleFontSizeSlider").slider("option","value",jQuery("#contentTitleFontSize").val())
|
67 |
-
jQuery("#closeBorderRadiusSlider").slider("option","value",jQuery("#closeBorderRadius").val())
|
68 |
-
jQuery("#closeFontSizeSlider").slider("option","value",jQuery("#closeFontSize").val())
|
69 |
-
jQuery("#closeSizeSlider").slider("option","value",jQuery("#closeSize").val())
|
70 |
-
jQuery("#autoOpenDelaySlider").slider("option","value",jQuery("#autoOpenDelay").val())
|
71 |
-
jQuery(document).on("click",'.close-modal',function(){jQuery(this).parent('.modal').fadeOut();jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})}).on("click",'.modal-overlay',function(){jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});jQuery(this).fadeOut(function(){jQuery(this).remove();})}).on("keyup",function(e){if(e.keyCode==27){jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})}})
|
72 |
-
jQuery(document).on("click",'.write-it',function(){jQuery('<div class="modal-overlay" />').appendTo('body').fadeIn();jQuery('#eModal-Admin-1').css('visibility','visible').fadeIn();return false;})});
|
1 |
+
jQuery(document).ready(function(){var e=window.location.hash.replace("#top#","");""==e&&(e=jQuery(".em-tab").attr("id")),jQuery("#"+e).addClass("active"),jQuery("#"+e+"-tab").addClass("nav-tab-active"),jQuery("#em-tabs a").click(function(){jQuery("#em-tabs a").removeClass("nav-tab-active"),jQuery(".em-tab").removeClass("active");var e=jQuery(this).attr("id").replace("-tab","");jQuery("#"+e).addClass("active"),jQuery(this).addClass("nav-tab-active")}),jQuery("#overlayOpacitySlider").slider({value:0,range:"min",min:0,max:100,step:1,slide:function(e,t){jQuery("#overlayOpacity").val(t.value),jQuery("#overlayOpacityValue").text(t.value),jQuery(".example-modal-overlay").css({opacity:t.value/100})}}),jQuery("#containerPaddingSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(e,t){jQuery("#containerPadding").val(t.value),jQuery("#containerPaddingValue").text(t.value),jQuery(".example-modal").css({padding:t.value+"px"})}}),jQuery("#containerBorderWidthSlider").slider({value:0,range:"min",min:0,max:10,step:1,slide:function(e,t){jQuery("#containerBorderWidth").val(t.value),jQuery("#containerBorderWidthValue").text(t.value),jQuery(".example-modal").css({borderWidth:t.value+"px"})}}),jQuery("#containerBorderRadiusSlider").slider({value:0,range:"min",min:0,max:50,step:1,slide:function(e,t){jQuery("#containerBorderRadius").val(t.value),jQuery("#containerBorderRadiusValue").text(t.value);var i=t.value+"px";jQuery(".example-modal").css({"-moz-border-radius":i,"-webkit-border-radius":i,"border-radius":i})}}),jQuery("#contentTitleFontSizeSlider").slider({value:0,range:"min",min:12,max:48,step:1,slide:function(e,t){jQuery("#contentTitleFontSize").val(t.value),jQuery("#contentTitleFontSizeValue").text(t.value);var i=t.value+"px";jQuery(".example-modal .title").css({fontSize:i})}}),jQuery("#closeBorderRadiusSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()/2),step:1,slide:function(e,t){jQuery("#closeBorderRadius").val(t.value),jQuery("#closeBorderRadiusValue").text(t.value);var i=t.value+"px";jQuery(".example-modal .close-modal").css({"-moz-border-radius":i,"-webkit-border-radius":i,"border-radius":i})}}),jQuery("#closeFontSizeSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()-2),step:1,slide:function(e,t){jQuery("#closeFontSize").val(t.value),jQuery("#closeFontSizeValue").text(t.value);var i=t.value+"px";jQuery(".example-modal .close-modal").css({fontSize:i})}}),jQuery("#closeSizeSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(e,t){jQuery("#closeSize").val(t.value),jQuery("#closeSizeValue").text(t.value);var i=t.value,n=s=o=u="auto";switch(jQuery("[name=closePosition]").val()){case"topright":n=-(i/2)+"px",u=-(i/2)+"px";break;case"topleft":n=-(i/2)+"px",o=-(i/2)+"px";break;case"bottomright":s=-(i/2)+"px",u=-(i/2)+"px";break;case"bottomleft":s=-(i/2)+"px",o=-(i/2)+"px"}var a=jQuery("#closeFontSizeSlider").slider("value");a>i-2&&(a=i-2),jQuery("#closeFontSizeValue").text(a),jQuery(".example-modal .close-modal").css({fontSize:a+"px"}),jQuery("#closeFontSizeSlider").slider("option","max",i-2).slider("option","value",a);var r=Math.round(i/2),l=jQuery("#closeBorderRadiusSlider").slider("value");l>r&&(l=r),jQuery("#closeBorderRadiusValue").text(l),jQuery(".example-modal .close-modal").css({"-webkit-border-radius":l+"px","border-radius":l+"px"}),jQuery("#closeBorderRadiusSlider").slider("option","max",r).slider("option","value",l),jQuery(".example-modal .close-modal").css({width:i+"px",height:i+"px",lineHeight:i+"px",left:o,right:u,top:n,bottom:s})}}),jQuery("#autoOpenDelaySlider").slider({value:0,range:"min",min:0,max:1e4,step:500,slide:function(e,t){jQuery("#autoOpenDelay").val(t.value),jQuery("#autoOpenDelayValue").text(t.value)}}),jQuery(".color-swatch").each(function(){var e=jQuery(this),t=e.prev(".colorSelect");e.ColorPicker({color:t.val(),onShow:function(e){return jQuery(e).fadeIn(500),!1},onHide:function(e){return jQuery(e).fadeOut(500),!1},onChange:function(i,n){switch(e.css("backgroundColor","#"+n),t.val("#"+n),t.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:"#"+n});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:"#"+n});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:"#"+n});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:"#"+n});break;case"contentFontColor":jQuery(".example-modal").css({color:"#"+n});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:"#"+n});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:"#"+n});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:"#"+n})}}})}),jQuery(".colorSelect").on("focusout",function(){var e=jQuery(this);e.next(".color-swatch").css("backgroundColor",e.val()).ColorPickerSetColor(e.val());var t=e.val();switch(e.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:t});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:t});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:t});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:t});break;case"contentFontColor":jQuery(".example-modal").css({color:t});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:t});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:t});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:t})}}),jQuery("#autoOpenDelay").on("change",function(){jQuery("#autoOpenDelaySlider").slider("option","value",jQuery(this).val())}),jQuery(".cb-enable").click(function(){var e=jQuery(this).parents(".switch");jQuery(".cb-disable",e).removeClass("selected"),jQuery(this).addClass("selected"),jQuery(".checkbox",e).attr("checked",!0)}),jQuery(".cb-disable").click(function(){var e=jQuery(this).parents(".switch");jQuery(".cb-enable",e).removeClass("selected"),jQuery(this).addClass("selected"),jQuery(".checkbox",e).attr("checked",!1)}),jQuery(".switch").each(function(){var e=jQuery(this),t=jQuery(".checkbox",e);t.is(":checked")&&(jQuery(".cb-disable",e).removeClass("selected"),jQuery(".cb-enable",e).addClass("selected"))}),jQuery("#containerBorderStyle").on("change",function(){var e=jQuery(this),t=e.val();jQuery(".example-modal").css({borderStyle:t}),"none"==t?jQuery(".border-only").hide():jQuery(".border-only").show()}),jQuery("#contentTitleFontFamily").change(function(){var e=jQuery(this).val();jQuery(".example-modal .title").css({fontFamily:e})}),jQuery("#closePosition").change(function(){var e=parseInt(jQuery("#closeSize").val()),t=bottom=left=right="auto";switch(jQuery(this).val()){case"topright":t=-(e/2)+"px",right=-(e/2)+"px";break;case"topleft":t=-(e/2)+"px",left=-(e/2)+"px";break;case"bottomright":bottom=-(e/2)+"px",right=-(e/2)+"px";break;case"bottomleft":bottom=-(e/2)+"px",left=-(e/2)+"px"}jQuery(".example-modal .close-modal").css({left:left,right:right,top:t,bottom:bottom})}),jQuery("#closeLocation").on("change",function(){var e=jQuery(this),t=e.val();"inside"==t?(jQuery(".outside-only").hide(),jQuery(".close-modal").removeAttr("styles")):jQuery(".outside-only").show()}),jQuery("#size").on("change",function(){var e=jQuery(this),t=e.val();"custom"!=t?jQuery(".custom-size-only").hide():jQuery(".custom-size-only").show()}),jQuery("#animation").on("change",function(){var e=jQuery(this),t=e.val();"fade"==t||"grow"==t?jQuery(".animation-only").hide():jQuery(".animation-only").show()}),jQuery("#overlayOpacitySlider").slider("option","value",jQuery("#overlayOpacity").val()),jQuery("#containerPaddingSlider").slider("option","value",jQuery("#containerPadding").val()),jQuery("#containerBorderWidthSlider").slider("option","value",jQuery("#containerBorderWidth").val()),jQuery("#containerBorderRadiusSlider").slider("option","value",jQuery("#containerBorderRadius").val()),jQuery("#contentTitleFontSizeSlider").slider("option","value",jQuery("#contentTitleFontSize").val()),jQuery("#closeBorderRadiusSlider").slider("option","value",jQuery("#closeBorderRadius").val()),jQuery("#closeFontSizeSlider").slider("option","value",jQuery("#closeFontSize").val()),jQuery("#closeSizeSlider").slider("option","value",jQuery("#closeSize").val()),jQuery("#autoOpenDelaySlider").slider("option","value",jQuery("#autoOpenDelay").val()),jQuery(document).on("click",".close-modal",function(){jQuery(this).parent(".modal").fadeOut(),jQuery(".modal-overlay").fadeOut(function(){jQuery(this).remove()})}).on("click",".modal-overlay",function(){jQuery(".modal:visible").fadeOut(function(){jQuery(this).css("visibility","hidden")}),jQuery(this).fadeOut(function(){jQuery(this).remove()})}).on("keyup",function(e){27==e.keyCode&&(jQuery(".modal:visible").fadeOut(function(){jQuery(this).css("visibility","hidden")}),jQuery(".modal-overlay").fadeOut(function(){jQuery(this).remove()}))}),jQuery(document).on("click",".write-it",function(){return jQuery('<div class="modal-overlay" />').appendTo("body").fadeIn(),jQuery("#eModal-Admin-1").css("visibility","visible").fadeIn(),!1})});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/easy-modal.min.js
CHANGED
@@ -1,928 +1 @@
|
|
1 |
-
// Easy Modal v1.2
|
2 |
-
(function ($)
|
3 |
-
{
|
4 |
-
var currentMousePos = { x: -1, y: -1 };
|
5 |
-
var methods = {
|
6 |
-
init: function (options)
|
7 |
-
{
|
8 |
-
var opts = $.extend({}, $.fn.emodal.defaults, options);
|
9 |
-
return $(this).data('emodal', opts);
|
10 |
-
},
|
11 |
-
close: function (options)
|
12 |
-
{
|
13 |
-
var options = $.extend({
|
14 |
-
speed: 'fast',
|
15 |
-
overlay: true
|
16 |
-
}, $.fn.emodal.defaults, options);
|
17 |
-
|
18 |
-
var $this = $(this);
|
19 |
-
var opts = $this.data('emodal');
|
20 |
-
$this.removeClass('active').fadeOut(options.speed,function(){
|
21 |
-
if(options.overlay)
|
22 |
-
$('#modal-overlay').fadeOut(options.speed,function(){
|
23 |
-
options.onClose();
|
24 |
-
});
|
25 |
-
})
|
26 |
-
$(window).unbind('scroll.emodal').unbind('keyup.emodal');
|
27 |
-
return this;
|
28 |
-
},
|
29 |
-
open: function()
|
30 |
-
{
|
31 |
-
var $this = $(this);
|
32 |
-
var opts = $this.data('emodal');
|
33 |
-
if(themes[opts.theme] === undefined)
|
34 |
-
{
|
35 |
-
var theme = themes[1];
|
36 |
-
}
|
37 |
-
else
|
38 |
-
{
|
39 |
-
var theme = themes[opts.theme];
|
40 |
-
}
|
41 |
-
// Check for and create Modal Overlay
|
42 |
-
if(!$('#modal-overlay').length){ $('<div id="modal-overlay">').appendTo('body'); }
|
43 |
-
|
44 |
-
// If not stackable close all other modals.
|
45 |
-
if($('.modal.active').length)
|
46 |
-
{
|
47 |
-
$('.modal.active').each(function(){$(this).emodal('close',{speed:100,overlay:false})});
|
48 |
-
}
|
49 |
-
else
|
50 |
-
{
|
51 |
-
$('#modal-overlay').css('opacity',0).show(0);
|
52 |
-
}
|
53 |
-
|
54 |
-
$this.addClass('active');
|
55 |
-
// Modal Clos Button
|
56 |
-
|
57 |
-
if(!opts.closeDisabled && $('.close-modal',$this).length)
|
58 |
-
{
|
59 |
-
$('.close-modal',$this)
|
60 |
-
.unbind('click')
|
61 |
-
.click(function(){ $this.emodal('close'); })
|
62 |
-
.themeClose(opts);
|
63 |
-
}
|
64 |
-
$('#modal-overlay')
|
65 |
-
.unbind('click')
|
66 |
-
.click(function()
|
67 |
-
{
|
68 |
-
if (opts.overlayClose == true)
|
69 |
-
{
|
70 |
-
$this.emodal('close');
|
71 |
-
}
|
72 |
-
})
|
73 |
-
.themeOverlay(opts);
|
74 |
-
|
75 |
-
if(opts.overlayEscClose == true)
|
76 |
-
{
|
77 |
-
$(window).bind('keyup.emodal',function(e){
|
78 |
-
if($('.modal.active').length && e.keyCode == 27)
|
79 |
-
{
|
80 |
-
$this.emodal('close');
|
81 |
-
}
|
82 |
-
});
|
83 |
-
}
|
84 |
-
$this.themeModal(opts);
|
85 |
-
$this.animation(opts.animation,opts);
|
86 |
-
return $this;
|
87 |
-
}/*,
|
88 |
-
show: function ()
|
89 |
-
{
|
90 |
-
if (opts.type === 'Image')
|
91 |
-
{
|
92 |
-
container.css(
|
93 |
-
{
|
94 |
-
maxWidth: opts.maxWidth,
|
95 |
-
maxHeight: opts.maxHeight
|
96 |
-
});
|
97 |
-
var abcs = $("a.eModal-Image")
|
98 |
-
var prevButton = $('<a>')
|
99 |
-
.attr('id',opts.prevId)
|
100 |
-
.click(function (){
|
101 |
-
var current = $('.eModal-Opened')
|
102 |
-
var prev = abcs.eq(abcs.index(current) - 1)
|
103 |
-
current.removeClass('eModal-Opened')
|
104 |
-
if (prev.length <= 0) prev = abcs.eq(abcs.length)
|
105 |
-
prev.addClass('eModal-Opened')
|
106 |
-
container
|
107 |
-
.animate({opacity: '.01'}, function (){
|
108 |
-
var img = $("<img/>")
|
109 |
-
.attr('src', prev.attr('href'))
|
110 |
-
.css({
|
111 |
-
maxWidth: '100%',
|
112 |
-
maxHeight: '100%'
|
113 |
-
})
|
114 |
-
.load(function (){
|
115 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
|
116 |
-
{
|
117 |
-
alert('broken image!')
|
118 |
-
}
|
119 |
-
else
|
120 |
-
{
|
121 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
122 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
123 |
-
content
|
124 |
-
.html(img)
|
125 |
-
.css({opacity:'.01'})
|
126 |
-
|
127 |
-
container
|
128 |
-
.emodal('center')
|
129 |
-
.animate({opacity:'.01'})
|
130 |
-
.animate({opacity:'1'})
|
131 |
-
|
132 |
-
content.animate({opacity: '1'})
|
133 |
-
}
|
134 |
-
})
|
135 |
-
})
|
136 |
-
return false
|
137 |
-
})
|
138 |
-
var nextButton = $('<a>')
|
139 |
-
.attr('id',opts.nextId)
|
140 |
-
.click(function (){
|
141 |
-
var current = $('.eModal-Opened')
|
142 |
-
var next = abcs.eq(abcs.index(current) + 1)
|
143 |
-
current.removeClass('eModal-Opened')
|
144 |
-
if (next.length == 0) next = abcs.eq(0)
|
145 |
-
next.addClass('eModal-Opened')
|
146 |
-
container
|
147 |
-
.animate({opacity: '.01'}, function (){
|
148 |
-
var img = $("<img/>")
|
149 |
-
.attr('src', next.attr('href'))
|
150 |
-
.css({
|
151 |
-
maxWidth: '100%',
|
152 |
-
maxHeight: '100%'
|
153 |
-
})
|
154 |
-
.load(function (){
|
155 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
|
156 |
-
{
|
157 |
-
alert('broken image!')
|
158 |
-
}
|
159 |
-
else
|
160 |
-
{
|
161 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
162 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
163 |
-
content
|
164 |
-
.html(img)
|
165 |
-
.css({opacity:'.01'})
|
166 |
-
|
167 |
-
container
|
168 |
-
.emodal('center')
|
169 |
-
.animate({opacity:'.01'})
|
170 |
-
.animate({opacity:'1'})
|
171 |
-
|
172 |
-
content.animate({opacity: '1'})
|
173 |
-
}
|
174 |
-
})
|
175 |
-
})
|
176 |
-
return false
|
177 |
-
})
|
178 |
-
var buttons = $('<div>')
|
179 |
-
.attr('id',opts.buttonsId)
|
180 |
-
.append(prevButton, nextButton)
|
181 |
-
.appendTo(container)
|
182 |
-
}
|
183 |
-
if (opts.type === 'Link')
|
184 |
-
{
|
185 |
-
opts.requestData.url = $(this).attr('href')
|
186 |
-
opts.requestData.iframeWidth = opts.maxWidth
|
187 |
-
opts.requestData.iframeHeight = opts.maxHeight
|
188 |
-
}
|
189 |
-
var loaded = false
|
190 |
-
if (opts.url != null){
|
191 |
-
if (opts.type === 'Image'){
|
192 |
-
var img = $("<img/>")
|
193 |
-
.attr('src', opts.url)
|
194 |
-
.css({
|
195 |
-
maxWidth: '100%',
|
196 |
-
maxHeight: '100%'
|
197 |
-
})
|
198 |
-
.load(function (){
|
199 |
-
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) alert('broken image!')
|
200 |
-
else {
|
201 |
-
if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
|
202 |
-
if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
|
203 |
-
content.append(img)
|
204 |
-
loaded = true
|
205 |
-
}
|
206 |
-
})
|
207 |
-
}
|
208 |
-
else
|
209 |
-
{
|
210 |
-
$.post(opts.url, opts.requestData, function (data){
|
211 |
-
content.prepend(data)
|
212 |
-
if($('form',content).length)
|
213 |
-
{
|
214 |
-
$orig_action = $('form',content).attr('action').split('#');
|
215 |
-
$('form',content).attr('action',"#" + $orig_action[1]).attr('action')
|
216 |
-
}
|
217 |
-
container
|
218 |
-
.show()
|
219 |
-
.css({opacity: '.01'});
|
220 |
-
if(opts.userMaxHeight > 0)
|
221 |
-
{
|
222 |
-
content.css({maxHeight: $(window).height() * (opts.userMaxHeight / 100) + 'px'});
|
223 |
-
}
|
224 |
-
else if(content.innerHeight() > opts.maxHeight && opts.type != 'Link')
|
225 |
-
{
|
226 |
-
content.css({maxHeight: (opts.maxHeight - 60) + 'px'});
|
227 |
-
}
|
228 |
-
|
229 |
-
if(opts.userHeight > 0)
|
230 |
-
{
|
231 |
-
content.css({height: opts.userHeight + 'px'});
|
232 |
-
}
|
233 |
-
|
234 |
-
if(opts.userMaxWidth > 0)
|
235 |
-
{
|
236 |
-
content.css({maxWidth: $(window).width() * (opts.userMaxWidth / 100) + 'px'});
|
237 |
-
}
|
238 |
-
|
239 |
-
if(opts.userWidth > 0)
|
240 |
-
{
|
241 |
-
content.css({width: opts.userWidth + 'px'});
|
242 |
-
}
|
243 |
-
var title = content
|
244 |
-
.find("#eModal-Title")
|
245 |
-
.css({
|
246 |
-
color: theme.contentTitleFontColor,
|
247 |
-
fontFamily: theme.contentTitleFontFamily,
|
248 |
-
fontSize: theme.contentTitleFontSize + 'px'
|
249 |
-
})
|
250 |
-
if(title) title.attr('title', title.text()).appendTo(controls)
|
251 |
-
opts.onLoad()
|
252 |
-
if(opts.cf7form == true) loadCf7()
|
253 |
-
if(opts.gravityform == true) loadGravityForms()
|
254 |
-
loaded = true
|
255 |
-
})
|
256 |
-
}
|
257 |
-
}
|
258 |
-
},*/
|
259 |
-
};
|
260 |
-
$.fn.emodal = function(method)
|
261 |
-
{
|
262 |
-
// Method calling logic
|
263 |
-
if (methods[method])
|
264 |
-
{
|
265 |
-
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
266 |
-
}
|
267 |
-
else if (typeof method === 'object' || !method)
|
268 |
-
{
|
269 |
-
return methods.init.apply(this, arguments);
|
270 |
-
}
|
271 |
-
else
|
272 |
-
{
|
273 |
-
$.error('Method ' + method + ' does not exist on jQuery.emodal');
|
274 |
-
}
|
275 |
-
};
|
276 |
-
$.fn.themeOverlay = function(opts)
|
277 |
-
{
|
278 |
-
var $this = $(this);
|
279 |
-
if(themes[opts.theme] === undefined)
|
280 |
-
{
|
281 |
-
var theme = themes[1];
|
282 |
-
}
|
283 |
-
else
|
284 |
-
{
|
285 |
-
var theme = themes[opts.theme];
|
286 |
-
}
|
287 |
-
return $this
|
288 |
-
.addClass('theme-'+opts.theme)
|
289 |
-
.animate({
|
290 |
-
backgroundColor: theme.overlayColor,
|
291 |
-
opacity: theme.overlayOpacity / 100
|
292 |
-
},opts.duration);
|
293 |
-
};
|
294 |
-
$.fn.themeModal = function(opts)
|
295 |
-
{
|
296 |
-
var $this = $(this);
|
297 |
-
if(themes[opts.theme] === undefined)
|
298 |
-
{
|
299 |
-
var theme = themes[1];
|
300 |
-
}
|
301 |
-
else
|
302 |
-
{
|
303 |
-
var theme = themes[opts.theme];
|
304 |
-
}
|
305 |
-
if(opts.size == 'custom')
|
306 |
-
{
|
307 |
-
$this.css({
|
308 |
-
'height': opts.userHeight ? opts.userHeight + opts.userHeightUnit : $this.css('height'),
|
309 |
-
'width': opts.userWidth ? opts.userWidth + opts.userWidthUnit : $this.css('width'),
|
310 |
-
'margin-left': opts.userWidth ? -(opts.userWidth / 2) + opts.userWidthUnit : $this.css('margin-left')
|
311 |
-
});
|
312 |
-
}
|
313 |
-
return $this
|
314 |
-
.addClass('theme-'+opts.theme)
|
315 |
-
.css({
|
316 |
-
color: theme.contentFontColor,
|
317 |
-
backgroundColor: theme.containerBgColor,
|
318 |
-
padding: theme.containerPadding + 'px',
|
319 |
-
border: theme.containerBorderColor + ' ' + theme.containerBorderStyle + ' ' + theme.containerBorderWidth + 'px',
|
320 |
-
"-webkit-border-radius": theme.containerBorderRadius + 'px',
|
321 |
-
"border-radius": theme.containerBorderRadius + 'px'
|
322 |
-
})
|
323 |
-
};
|
324 |
-
$.fn.themeClose = function(opts)
|
325 |
-
{
|
326 |
-
var $this = $(this);
|
327 |
-
if(themes[opts.theme] === undefined)
|
328 |
-
{
|
329 |
-
var theme = themes[1];
|
330 |
-
}
|
331 |
-
else
|
332 |
-
{
|
333 |
-
var theme = themes[opts.theme];
|
334 |
-
}
|
335 |
-
if(theme.closeLocation == 'outside')
|
336 |
-
{
|
337 |
-
var val = theme.closeSize;
|
338 |
-
var top = bottom = left = right = 'auto';
|
339 |
-
switch (theme.closePosition)
|
340 |
-
{
|
341 |
-
case 'topright':
|
342 |
-
top = -(val / 2) + 'px';
|
343 |
-
right = -(val / 2) + 'px';
|
344 |
-
break;
|
345 |
-
case 'topleft':
|
346 |
-
top = -(val / 2) + 'px';
|
347 |
-
left = -(val / 2) + 'px';
|
348 |
-
break;
|
349 |
-
case 'bottomright':
|
350 |
-
bottom = -(val / 2) + 'px';
|
351 |
-
right = -(val / 2) + 'px';
|
352 |
-
break;
|
353 |
-
case 'bottomleft':
|
354 |
-
bottom = -(val / 2) + 'px';
|
355 |
-
left = -(val / 2) + 'px';
|
356 |
-
break;
|
357 |
-
}
|
358 |
-
$this
|
359 |
-
.addClass('outside')
|
360 |
-
.css({
|
361 |
-
left: left,
|
362 |
-
right: right,
|
363 |
-
top: top,
|
364 |
-
bottom: bottom,
|
365 |
-
height: theme.closeSize + 'px',
|
366 |
-
fontSize: theme.closeFontSize + 'px',
|
367 |
-
width: theme.closeSize + 'px',
|
368 |
-
backgroundColor: theme.closeBgColor,
|
369 |
-
"-webkit-border-radius": theme.closeBorderRadius + 'px',
|
370 |
-
"border-radius": theme.closeBorderRadius + 'px',
|
371 |
-
lineHeight: theme.closeSize + 'px'
|
372 |
-
});
|
373 |
-
}
|
374 |
-
return $this
|
375 |
-
.addClass('theme-'+opts.theme)
|
376 |
-
.html(theme.closeText)
|
377 |
-
.css({
|
378 |
-
color: theme.closeFontColor,
|
379 |
-
});
|
380 |
-
};
|
381 |
-
|
382 |
-
var animations = {
|
383 |
-
fade: function(options)
|
384 |
-
{
|
385 |
-
var $this = $(this).show(0).css({'opacity':0,'top':$(window).scrollTop() + 100 +'px'});
|
386 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
387 |
-
$this.animate({
|
388 |
-
opacity: 1
|
389 |
-
},parseInt(opts.duration),opts.easing,function(){
|
390 |
-
$this
|
391 |
-
.removeAttr('style')
|
392 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
393 |
-
.themeModal(opts);
|
394 |
-
});
|
395 |
-
},
|
396 |
-
fadeAndSlide: function(options)
|
397 |
-
{
|
398 |
-
var $this = $(this).show(0).css('opacity',0);
|
399 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
400 |
-
switch(opts.direction)
|
401 |
-
{
|
402 |
-
case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
|
403 |
-
case 'top': $this.css({'top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
404 |
-
case 'left': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
405 |
-
case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
406 |
-
case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
407 |
-
case 'topleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
408 |
-
case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
409 |
-
case 'bottomleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
410 |
-
case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
411 |
-
}
|
412 |
-
$('html').css('overflow-x','hidden');
|
413 |
-
$this.animate({
|
414 |
-
'left': '50%',
|
415 |
-
'top': $(window).scrollTop() + 100 +'px'
|
416 |
-
},{duration: opts.duration , queue:false},opts.easing);
|
417 |
-
setTimeout(function()
|
418 |
-
{
|
419 |
-
$this.animate({
|
420 |
-
'opacity': 1
|
421 |
-
},opts.duration * .75,opts.easing,function(){
|
422 |
-
$this
|
423 |
-
.removeAttr('style')
|
424 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
425 |
-
.themeModal(opts);
|
426 |
-
$('html').css('overflow-x','inherit');
|
427 |
-
});
|
428 |
-
},opts.duration * .25);
|
429 |
-
},
|
430 |
-
grow: function(options)
|
431 |
-
{
|
432 |
-
var $this = $(this).show(0);
|
433 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
434 |
-
var currently = {
|
435 |
-
width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
|
436 |
-
height: parseInt($this.css('height')),
|
437 |
-
marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
438 |
-
padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
|
439 |
-
};
|
440 |
-
$('*',$this).fadeOut(0);
|
441 |
-
$this.css({
|
442 |
-
'top': (currently.height/10) * 5 + $(window).scrollTop() + 100 +'px',
|
443 |
-
'left': (currently.width/10) * 5 + ($(window).innerWidth() / 2) +'px',
|
444 |
-
'height': 0,
|
445 |
-
'width': 0,
|
446 |
-
'padding': 0,
|
447 |
-
'margin-left': 0
|
448 |
-
}).animate({
|
449 |
-
'top': $(window).scrollTop() + 100 +'px',
|
450 |
-
'left': '50%',
|
451 |
-
'padding': currently.padding,
|
452 |
-
'height': currently.height,
|
453 |
-
'width': currently.width,
|
454 |
-
'margin-left': currently.marginLeft
|
455 |
-
},opts.duration,function(){
|
456 |
-
$this
|
457 |
-
.removeAttr('style')
|
458 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
459 |
-
.themeModal(opts);
|
460 |
-
$('*',$this).fadeIn('fast');
|
461 |
-
});
|
462 |
-
},
|
463 |
-
growAndSlide: function(options)
|
464 |
-
{
|
465 |
-
var $this = $(this).show(0);
|
466 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
467 |
-
var currently = {
|
468 |
-
width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
|
469 |
-
height: parseInt($this.css('height')),
|
470 |
-
marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
471 |
-
padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
|
472 |
-
};
|
473 |
-
$('html,body').css('overflow-x','hidden');
|
474 |
-
$('*',$this).fadeOut(0);
|
475 |
-
$this.css({
|
476 |
-
'opacity': 1,
|
477 |
-
'height': 0,
|
478 |
-
'width': 0,
|
479 |
-
'padding': 0,
|
480 |
-
'margin-left': 0
|
481 |
-
});
|
482 |
-
switch(opts.direction)
|
483 |
-
{
|
484 |
-
case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
|
485 |
-
case 'top': $this.css({'top': $(window).scrollTop() + $this.outerHeight(true) + 'px'}); break;
|
486 |
-
case 'left': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px'}); break;
|
487 |
-
case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
488 |
-
case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
|
489 |
-
case 'topleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
490 |
-
case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
|
491 |
-
case 'bottomleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
492 |
-
case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
|
493 |
-
}
|
494 |
-
$this.animate({
|
495 |
-
'height': currently.height,
|
496 |
-
'padding': currently.padding,
|
497 |
-
'width': currently.width,
|
498 |
-
'margin-left': currently.marginLeft
|
499 |
-
},{duration: opts.duration , queue:false},opts.easing);
|
500 |
-
setTimeout(function()
|
501 |
-
{
|
502 |
-
$this.animate({
|
503 |
-
'height': 'auto',
|
504 |
-
'top': ($(window).scrollTop() + 100) +'px',
|
505 |
-
'left': '50%'
|
506 |
-
},opts.duration * .95,opts.easing,function(){
|
507 |
-
$this
|
508 |
-
.removeAttr('style')
|
509 |
-
.css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
|
510 |
-
.themeModal(opts);
|
511 |
-
$('*',$this).fadeIn('fast');
|
512 |
-
$('html').css('overflow-x','inherit');
|
513 |
-
});
|
514 |
-
},opts.duration * .05);
|
515 |
-
}/*,
|
516 |
-
canvas: function(options)
|
517 |
-
{
|
518 |
-
var $this = $(this)
|
519 |
-
$this.css('top',$(document).height() + $this.height()).show(0);
|
520 |
-
html2canvas($this, {
|
521 |
-
onrendered: function(canvas) {
|
522 |
-
var canvas = canvas;
|
523 |
-
//$('body').append(canvas);
|
524 |
-
var x = 4,
|
525 |
-
y = 3,
|
526 |
-
random = true,
|
527 |
-
width = parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100,
|
528 |
-
height = parseInt($this.css('height')),
|
529 |
-
marginLeft = '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
|
530 |
-
$img = canvas.toDataURL(),
|
531 |
-
n_tiles = x * y, // total number of tiles
|
532 |
-
tiles = [],
|
533 |
-
$tiles = {};
|
534 |
-
|
535 |
-
for ( var i = 0; i < n_tiles; i++ ) {
|
536 |
-
tiles.push('<div class="tile"/>');
|
537 |
-
}
|
538 |
-
|
539 |
-
$tiles = $( tiles.join('') );
|
540 |
-
// Hide original image and insert tiles in DOM
|
541 |
-
$this.hide().after(
|
542 |
-
$('<div class="modal-placeholder"/>').attr('style', $this.attr('style')).css({
|
543 |
-
'opacity': 1,
|
544 |
-
'height': height,
|
545 |
-
'margin-left': '-' + (parseInt(width) / 2) + '%',
|
546 |
-
'padding': 0,
|
547 |
-
'width': parseInt(width) + '%',
|
548 |
-
'top': $(window).scrollTop() + 100
|
549 |
-
})
|
550 |
-
.show(0)
|
551 |
-
.append( $tiles )
|
552 |
-
);
|
553 |
-
// Adjust position
|
554 |
-
$tiles.each(function(){
|
555 |
-
var pos = $(this).position();
|
556 |
-
|
557 |
-
console.log($this.outerHeight() / y + 'px');
|
558 |
-
$(this).css({
|
559 |
-
'border': 0,
|
560 |
-
'backgroundPosition': -pos.left +'px ' + -pos.top + 'px',
|
561 |
-
'width': $this.outerWidth() / x + 'px',
|
562 |
-
'height': $this.outerHeight() / y + 'px',
|
563 |
-
'background-image': 'url('+ $img +')'
|
564 |
-
});
|
565 |
-
});
|
566 |
-
|
567 |
-
}
|
568 |
-
});
|
569 |
-
//$this.hide(0);
|
570 |
-
var opts = $.extend($.fn.animation.defaults, options);
|
571 |
-
}*/
|
572 |
-
};
|
573 |
-
$.fn.animation = function(style)
|
574 |
-
{
|
575 |
-
// Method calling logic
|
576 |
-
if (animations[style])
|
577 |
-
{
|
578 |
-
return animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
|
579 |
-
}
|
580 |
-
else
|
581 |
-
{
|
582 |
-
$.error('Animation style ' + animations + ' does not exist on jQuery.animation');
|
583 |
-
}
|
584 |
-
};
|
585 |
-
|
586 |
-
$.fn.animation.defaults = {
|
587 |
-
duration:750,
|
588 |
-
direction: 'mouse',
|
589 |
-
easing: 'swing'
|
590 |
-
};
|
591 |
-
$.fn.emodal.defaults = {
|
592 |
-
theme: 1,
|
593 |
-
onLoad: function (){},
|
594 |
-
onClose: function (){},
|
595 |
-
type: null,
|
596 |
-
maxHeight: null,
|
597 |
-
maxWidth: null,
|
598 |
-
userHeight: null,
|
599 |
-
userWidth: null,
|
600 |
-
animation: 'fadeAndSlide',
|
601 |
-
direction: 'bottom',
|
602 |
-
overlayClose: false,
|
603 |
-
overlayEscClose: false
|
604 |
-
};
|
605 |
-
var modals = easymodal.modals;
|
606 |
-
var themes = easymodal.themes;
|
607 |
-
var settings = easymodal.settings;
|
608 |
-
|
609 |
-
$(document).ready(function()
|
610 |
-
{
|
611 |
-
$('.modal').each(function()
|
612 |
-
{
|
613 |
-
var $this = $(this).css({visibility:'visible'}).hide(0);
|
614 |
-
var modalId = $this.attr('id').split("-")[1];
|
615 |
-
$this.emodal(modals[modalId]);
|
616 |
-
|
617 |
-
$(document).on('click','.'+$this.attr('id'),function(e){
|
618 |
-
e.preventDefault();
|
619 |
-
e.stopPropagation();
|
620 |
-
currentMousePos.x = e.pageX;
|
621 |
-
currentMousePos.y = e.pageY;
|
622 |
-
$this.emodal('open');
|
623 |
-
});
|
624 |
-
$('.'+$this.attr('id')).css('cursor','pointer');
|
625 |
-
});
|
626 |
-
if(easymodal.autoOpen && !$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id))
|
627 |
-
{
|
628 |
-
setTimeout(function(){
|
629 |
-
$('#eModal-'+easymodal.autoOpen.id).emodal('open');
|
630 |
-
$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id, true, { expires : parseInt(easymodal.autoOpen.timer) });
|
631 |
-
},easymodal.autoOpen.delay);
|
632 |
-
}
|
633 |
-
if(easymodal.autoExit && !$.cookie("eModal-autoExit-"+easymodal.autoExit.id))
|
634 |
-
{
|
635 |
-
$('body').one('mouseleave',function(){
|
636 |
-
if(easymodal.force_user_login)
|
637 |
-
{
|
638 |
-
return false;
|
639 |
-
}
|
640 |
-
$this = $('#eModal-'+easymodal.autoExit.id).emodal('open');
|
641 |
-
$.cookie("eModal-autoExit-"+easymodal.autoExit.id, true, { expires : parseInt(easymodal.autoExit.timer) });
|
642 |
-
});
|
643 |
-
}
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
// Run our login ajax
|
648 |
-
$('#eModal-Login form').on('submit', function(e) {
|
649 |
-
$form = $(this);
|
650 |
-
// Stop the form from submitting so we can use ajax.
|
651 |
-
e.preventDefault();
|
652 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
653 |
-
// Display our loading message while we check the credentials.
|
654 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
655 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
656 |
-
$.ajax({
|
657 |
-
type: 'POST',
|
658 |
-
dataType: 'json',
|
659 |
-
url: easymodal.ajaxLogin,
|
660 |
-
data: {
|
661 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
662 |
-
'username' : $('#user_login',$form).val(),
|
663 |
-
'password' : $('#user_pass',$form).val(),
|
664 |
-
'rememberme' : $('#rememberme',$form).is(':checked') ? true : false,
|
665 |
-
'login' : true,
|
666 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
667 |
-
},
|
668 |
-
success: function(results) {
|
669 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
670 |
-
if(results.loggedin === true) {
|
671 |
-
$('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
|
672 |
-
setTimeout(function(){
|
673 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
674 |
-
window.location.href = easymodal.redirecturl;
|
675 |
-
}});
|
676 |
-
|
677 |
-
},2000);
|
678 |
-
|
679 |
-
} else {
|
680 |
-
$('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
|
681 |
-
}
|
682 |
-
}
|
683 |
-
});
|
684 |
-
});
|
685 |
-
// Run our register ajax
|
686 |
-
$('#eModal-Register form').on('submit', function(e) {
|
687 |
-
$form = $(this);
|
688 |
-
// Stop the form from submitting so we can use ajax.
|
689 |
-
e.preventDefault();
|
690 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
691 |
-
// Display our loading message while we check the credentials.
|
692 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
693 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
694 |
-
$.ajax({
|
695 |
-
type: 'POST',
|
696 |
-
dataType: 'json',
|
697 |
-
url: easymodal.ajaxLogin,
|
698 |
-
data: {
|
699 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
700 |
-
'username' : $('#forgot_login',$form).val(),
|
701 |
-
'email' : $('#reg_email',$form).val(),
|
702 |
-
'register' : true,
|
703 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
704 |
-
},
|
705 |
-
success: function(results) {
|
706 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
707 |
-
if(results.loggedin === true) {
|
708 |
-
$('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
|
709 |
-
setTimeout(function(){
|
710 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
711 |
-
window.location.href = easymodal.redirecturl;
|
712 |
-
}});
|
713 |
-
|
714 |
-
},2000);
|
715 |
-
|
716 |
-
} else {
|
717 |
-
$('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
|
718 |
-
}
|
719 |
-
}
|
720 |
-
});
|
721 |
-
});
|
722 |
-
// Run our forgot password ajax
|
723 |
-
$('#eModal-Forgot form').on('submit', function(e) {
|
724 |
-
$form = $(this);
|
725 |
-
// Stop the form from submitting so we can use ajax.
|
726 |
-
e.preventDefault();
|
727 |
-
// Check what form is currently being submitted so we can return the right values for the ajax request.
|
728 |
-
// Display our loading message while we check the credentials.
|
729 |
-
$form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
|
730 |
-
// Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
|
731 |
-
$.ajax({
|
732 |
-
type: 'POST',
|
733 |
-
dataType: 'json',
|
734 |
-
url: easymodal.ajaxLogin,
|
735 |
-
data: {
|
736 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
737 |
-
'username' : $('#forgot_login',$form).val(),
|
738 |
-
'forgotten' : true,
|
739 |
-
'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
|
740 |
-
},
|
741 |
-
success: function(results) {
|
742 |
-
// Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
|
743 |
-
if(results.loggedin === true) {
|
744 |
-
$('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
|
745 |
-
setTimeout(function(){
|
746 |
-
$('#eModal-Login').emodal('close',{onClose: function(){
|
747 |
-
window.location.href = easymodal.redirecturl;
|
748 |
-
}});
|
749 |
-
|
750 |
-
},2000);
|
751 |
-
|
752 |
-
} else {
|
753 |
-
$('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
|
754 |
-
}
|
755 |
-
}
|
756 |
-
});
|
757 |
-
});
|
758 |
-
/*
|
759 |
-
} else if ( form_id === 'register' ) {
|
760 |
-
$.ajax({
|
761 |
-
type: 'GET',
|
762 |
-
dataType: 'json',
|
763 |
-
url: wpml_script.ajax,
|
764 |
-
data: {
|
765 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
766 |
-
'username' : $('#form #reg_user').val(),
|
767 |
-
'email' : $('#form #reg_email').val(),
|
768 |
-
'register' : $('#form input[name="register"]').val(),
|
769 |
-
'security' : $('#form #security').val()
|
770 |
-
},
|
771 |
-
success: function(results) {
|
772 |
-
if(results.registerd === true) {
|
773 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
|
774 |
-
$('#register #form input:not(#user-submit)').val('');
|
775 |
-
} else {
|
776 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
|
777 |
-
}
|
778 |
-
}
|
779 |
-
});
|
780 |
-
} else if ( form_id === 'forgotten' ) {
|
781 |
-
$.ajax({
|
782 |
-
type: 'GET',
|
783 |
-
dataType: 'json',
|
784 |
-
url: wpml_script.ajax,
|
785 |
-
data: {
|
786 |
-
'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
|
787 |
-
'username' : $('#form #forgot_login').val(),
|
788 |
-
'forgotten' : $('#form input[name="register"]').val(),
|
789 |
-
'security' : $('#form #security').val()
|
790 |
-
},
|
791 |
-
success: function(results) {
|
792 |
-
if(results.reset === true) {
|
793 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
|
794 |
-
$('#forgotten #form input:not(#user-submit)').val('');
|
795 |
-
} else {
|
796 |
-
$('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
|
797 |
-
}
|
798 |
-
}
|
799 |
-
});
|
800 |
-
} else {
|
801 |
-
// if all else fails and we've hit here... something strange happen and notify the user.
|
802 |
-
$('.wpml-content > p.message').text('Something Please refresh your window and try again.');
|
803 |
-
}
|
804 |
-
});
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
/*
|
811 |
-
$.expr[':'].external = function (obj)
|
812 |
-
{
|
813 |
-
return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname);
|
814 |
-
};
|
815 |
-
$('a:external').addClass('external eModal-Link').emodal(easymodal.modals['Link']);
|
816 |
-
$('a[href$=".gif"], a[href$=".jpg"], a[href$=".png"], a[href$=".bmp"]').children('img').each(function ()
|
817 |
-
{
|
818 |
-
var anch = $(this).parents('a').addClass('eModal-Image');
|
819 |
-
var url = $(anch).attr('href');
|
820 |
-
$(anch).emodal(
|
821 |
-
{
|
822 |
-
url: url,
|
823 |
-
theme: '1',
|
824 |
-
type: 'Image'
|
825 |
-
});
|
826 |
-
});
|
827 |
-
if(settings.autoOpen == 'true')
|
828 |
-
{
|
829 |
-
setTimeout(function(){
|
830 |
-
$('#emModal-'+settings.autoOpenId).emodal('open');
|
831 |
-
}, settings.autoOpenDelay);
|
832 |
-
}
|
833 |
-
*/
|
834 |
-
})
|
835 |
-
})(jQuery);
|
836 |
-
/*!
|
837 |
-
* jQuery Cookie Plugin v1.3.1
|
838 |
-
* https://github.com/carhartl/jquery-cookie
|
839 |
-
*
|
840 |
-
* Copyright 2013 Klaus Hartl
|
841 |
-
* Released under the MIT license
|
842 |
-
*/
|
843 |
-
|
844 |
-
(function (factory) {
|
845 |
-
if (typeof define === 'function' && define.amd) {
|
846 |
-
// AMD. Register as anonymous module.
|
847 |
-
define(['jquery'], factory);
|
848 |
-
} else {
|
849 |
-
// Browser globals.
|
850 |
-
factory(jQuery);
|
851 |
-
}
|
852 |
-
}(function ($) {
|
853 |
-
var pluses = /\+/g;
|
854 |
-
function raw(s) {
|
855 |
-
return s;
|
856 |
-
}
|
857 |
-
function decoded(s) {
|
858 |
-
return decodeURIComponent(s.replace(pluses, ' '));
|
859 |
-
}
|
860 |
-
function converted(s) {
|
861 |
-
if (s.indexOf('"') === 0) {
|
862 |
-
// This is a quoted cookie as according to RFC2068, unescape
|
863 |
-
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
864 |
-
}
|
865 |
-
try {
|
866 |
-
return config.json ? JSON.parse(s) : s;
|
867 |
-
} catch(er) {}
|
868 |
-
}
|
869 |
-
var config = $.cookie = function (key, value, options) {
|
870 |
-
// write
|
871 |
-
if (value !== undefined) {
|
872 |
-
options = $.extend({}, config.defaults, options);
|
873 |
-
if (typeof options.expires === 'number') {
|
874 |
-
var days = options.expires, t = options.expires = new Date();
|
875 |
-
t.setDate(t.getDate() + days);
|
876 |
-
}
|
877 |
-
value = config.json ? JSON.stringify(value) : String(value);
|
878 |
-
return (document.cookie = [
|
879 |
-
config.raw ? key : encodeURIComponent(key),
|
880 |
-
'=',
|
881 |
-
config.raw ? value : encodeURIComponent(value),
|
882 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
883 |
-
options.path ? '; path=' + options.path : '',
|
884 |
-
options.domain ? '; domain=' + options.domain : '',
|
885 |
-
options.secure ? '; secure' : ''
|
886 |
-
].join(''));
|
887 |
-
}
|
888 |
-
// read
|
889 |
-
var decode = config.raw ? raw : decoded;
|
890 |
-
var cookies = document.cookie.split('; ');
|
891 |
-
var result = key ? undefined : {};
|
892 |
-
for (var i = 0, l = cookies.length; i < l; i++) {
|
893 |
-
var parts = cookies[i].split('=');
|
894 |
-
var name = decode(parts.shift());
|
895 |
-
var cookie = decode(parts.join('='));
|
896 |
-
if (key && key === name) {
|
897 |
-
result = converted(cookie);
|
898 |
-
break;
|
899 |
-
}
|
900 |
-
if (!key) {
|
901 |
-
result[name] = converted(cookie);
|
902 |
-
}
|
903 |
-
}
|
904 |
-
return result;
|
905 |
-
};
|
906 |
-
config.defaults = {};
|
907 |
-
$.removeCookie = function (key, options) {
|
908 |
-
if ($.cookie(key) !== undefined) {
|
909 |
-
// Must not alter options, thus extending a fresh object...
|
910 |
-
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
911 |
-
return true;
|
912 |
-
}
|
913 |
-
return false;
|
914 |
-
};
|
915 |
-
}));
|
916 |
-
(function(h,m){function n(a,b,c){var d=r[b.type]||{};if(null==a)return c||!b.def?null:b.def;a=d.floor?~~a:parseFloat(a);return isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a}function s(a){var b=f(),c=b._rgba=[],a=a.toLowerCase();j(v,function(d,g){var e,i=g.re.exec(a);e=i&&g.parse(i);i=g.space||"rgba";if(e)return e=b[i](e),b[k[i].cache]=e[k[i].cache],c=b._rgba=e._rgba,!1});return c.length?("0,0,0,0"===c.join()&&h.extend(c,o.transparent),b):o[a]}function p(a,b,c){c=(c+1)%1;return 1>6*c?
|
917 |
-
a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}var w=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),
|
918 |
-
parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],f=h.Color=function(a,b,c,d){return new h.Color.fn.parse(a,b,c,d)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,
|
919 |
-
type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},r={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},t=f.support={},u=h("<p>")[0],o,j=h.each;u.style.cssText="background-color:rgba(1,1,1,.5)";t.rgba=-1<u.style.backgroundColor.indexOf("rgba");j(k,function(a,b){b.cache="_"+a;b.props.alpha={idx:3,type:"percent",def:1}});f.fn=h.extend(f.prototype,{parse:function(a,b,c,d){if(a===m)return this._rgba=[null,null,null,null],this;if(a.jquery||a.nodeType)a=
|
920 |
-
h(a).css(b),b=m;var g=this,e=h.type(a),i=this._rgba=[];b!==m&&(a=[a,b,c,d],e="array");if("string"===e)return this.parse(s(a)||o._default);if("array"===e)return j(k.rgba.props,function(d,c){i[c.idx]=n(a[c.idx],c)}),this;if("object"===e)return a instanceof f?j(k,function(c,d){a[d.cache]&&(g[d.cache]=a[d.cache].slice())}):j(k,function(d,c){var b=c.cache;j(c.props,function(d,e){if(!g[b]&&c.to){if(d==="alpha"||a[d]==null)return;g[b]=c.to(g._rgba)}g[b][e.idx]=n(a[d],e,true)});if(g[b]&&h.inArray(null,g[b].slice(0,
|
921 |
-
3))<0){g[b][3]=1;if(c.from)g._rgba=c.from(g[b])}}),this},is:function(a){var b=f(a),c=!0,d=this;j(k,function(a,e){var i,h=b[e.cache];h&&(i=d[e.cache]||e.to&&e.to(d._rgba)||[],j(e.props,function(a,d){if(null!=h[d.idx])return c=h[d.idx]===i[d.idx]}));return c});return c},_space:function(){var a=[],b=this;j(k,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a,b){var c=f(a),d=c._space(),g=k[d],e=0===this.alpha()?f("transparent"):this,i=e[g.cache]||g.to(e._rgba),h=i.slice(),c=c[g.cache];
|
922 |
-
j(g.props,function(a,d){var g=d.idx,e=i[g],f=c[g],j=r[d.type]||{};null!==f&&(null===e?h[g]=f:(j.mod&&(f-e>j.mod/2?e+=j.mod:e-f>j.mod/2&&(e-=j.mod)),h[g]=n((f-e)*b+e,d)))});return this[d](h)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),c=b.pop(),d=f(a)._rgba;return f(h.map(b,function(a,b){return(1-c)*d[b]+c*a}))},toRgbaString:function(){var a="rgba(",b=h.map(this._rgba,function(a,d){return null==a?2<d?1:0:a});1===b[3]&&(b.pop(),a="rgb(");return a+b.join()+")"},toHslaString:function(){var a=
|
923 |
-
"hsla(",b=h.map(this.hsla(),function(a,d){null==a&&(a=2<d?1:0);d&&3>d&&(a=Math.round(100*a)+"%");return a});1===b[3]&&(b.pop(),a="hsl(");return a+b.join()+")"},toHexString:function(a){var b=this._rgba.slice(),c=b.pop();a&&b.push(~~(255*c));return"#"+h.map(b,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});f.fn.parse.prototype=f.fn;k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,
|
924 |
-
null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255,a=a[3],g=Math.max(b,c,d),e=Math.min(b,c,d),i=g-e,h=g+e,f=0.5*h;return[Math.round(e===g?0:b===g?60*(c-d)/i+360:c===g?60*(d-b)/i+120:60*(b-c)/i+240)%360,0===f||1===f?f:0.5>=f?i/h:i/(2-h),f,null==a?1:a]};k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],a=a[3],c=0.5>=d?d*(1+c):d+c-d*c,d=2*d-c;return[Math.round(255*p(d,c,b+1/3)),Math.round(255*p(d,c,b)),Math.round(255*p(d,c,b-1/3)),
|
925 |
-
a]};j(k,function(a,b){var c=b.props,d=b.cache,g=b.to,e=b.from;f.fn[a]=function(a){g&&!this[d]&&(this[d]=g(this._rgba));if(a===m)return this[d].slice();var b,q=h.type(a),k="array"===q||"object"===q?a:arguments,l=this[d].slice();j(c,function(a,d){var b=k["object"===q?a:d.idx];null==b&&(b=l[d.idx]);l[d.idx]=n(b,d)});return e?(b=f(e(l)),b[d]=l,b):f(l)};j(c,function(d,b){f.fn[d]||(f.fn[d]=function(c){var e=h.type(c),g="alpha"===d?this._hsla?"hsla":"rgba":a,f=this[g](),j=f[b.idx];if("undefined"===e)return j;
|
926 |
-
"function"===e&&(c=c.call(this,j),e=h.type(c));if(null==c&&b.empty)return this;"string"===e&&(e=w.exec(c))&&(c=j+parseFloat(e[2])*("+"===e[1]?1:-1));f[b.idx]=c;return this[g](f)})})});f.hook=function(a){a=a.split(" ");j(a,function(a,c){h.cssHooks[c]={set:function(a,b){var e,i="";if("string"!==h.type(b)||(e=s(b))){b=f(e||b);if(!t.rgba&&1!==b._rgba[3]){for(e="backgroundColor"===c?a.parentNode:a;(""===i||"transparent"===i)&&e&&e.style;)try{i=h.css(e,"backgroundColor"),e=e.parentNode}catch(j){}b=b.blend(i&&
|
927 |
-
"transparent"!==i?i:"_default")}b=b.toRgbaString()}try{a.style[c]=b}catch(k){}}};h.fx.step[c]=function(a){a.colorInit||(a.start=f(a.elem,c),a.end=f(a.end),a.colorInit=!0);h.cssHooks[c].set(a.elem,a.start.transition(a.end,a.pos))}})};f.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");h.cssHooks.borderColor={expand:function(a){var b={};j(["Top","Right","Bottom","Left"],function(c,d){b["border"+
|
928 |
-
d+"Color"]=a});return b}};o=h.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);
|
1 |
+
!function(t){var e={x:-1,y:-1},i={init:function(e){var i=t.extend({},t.fn.emodal.defaults,e);return t(this).data("emodal",i)},close:function(e){var e=t.extend({speed:"fast",overlay:!0},t.fn.emodal.defaults,e),i=t(this);return i.data("emodal"),i.removeClass("active").fadeOut(e.speed,function(){e.overlay&&t("#modal-overlay").fadeOut(e.speed,function(){e.onClose()})}),t(window).unbind("scroll.emodal").unbind("keyup.emodal"),this},open:function(){var e=t(this),i=e.data("emodal");return void 0===s[i.theme]?s[1]:s[i.theme],t("#modal-overlay").length||t('<div id="modal-overlay">').appendTo("body"),t(".modal.active").length?t(".modal.active").each(function(){t(this).emodal("close",{speed:100,overlay:!1})}):t("#modal-overlay").css("opacity",0).show(0),e.addClass("active"),!i.closeDisabled&&t(".close-modal",e).length&&t(".close-modal",e).unbind("click").click(function(){e.emodal("close")}).themeClose(i),t("#modal-overlay").unbind("click").click(function(){1==i.overlayClose&&e.emodal("close")}).themeOverlay(i),1==i.overlayEscClose&&t(window).bind("keyup.emodal",function(i){t(".modal.active").length&&27==i.keyCode&&e.emodal("close")}),e.themeModal(i),e.animation(i.animation,i),e}};t.fn.emodal=function(e){return i[e]?i[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?(t.error("Method "+e+" does not exist on jQuery.emodal"),void 0):i.init.apply(this,arguments)},t.fn.themeOverlay=function(e){var i=t(this);if(void 0===s[e.theme])var n=s[1];else var n=s[e.theme];return i.addClass("theme-"+e.theme).animate({backgroundColor:n.overlayColor,opacity:n.overlayOpacity/100},e.duration)},t.fn.themeModal=function(e){var i=t(this);if(void 0===s[e.theme])var n=s[1];else var n=s[e.theme];return"custom"==e.size&&i.css({height:e.userHeight?e.userHeight+e.userHeightUnit:i.css("height"),width:e.userWidth?e.userWidth+e.userWidthUnit:i.css("width"),"margin-left":e.userWidth?-(e.userWidth/2)+e.userWidthUnit:i.css("margin-left")}),i.addClass(e.size).addClass("theme-"+e.theme).css({color:n.contentFontColor,backgroundColor:n.containerBgColor,padding:n.containerPadding+"px",border:n.containerBorderColor+" "+n.containerBorderStyle+" "+n.containerBorderWidth+"px","-webkit-border-radius":n.containerBorderRadius+"px","border-radius":n.containerBorderRadius+"px"})},t.fn.themeClose=function(e){var i=t(this);if(void 0===s[e.theme])var n=s[1];else var n=s[e.theme];if("outside"==n.closeLocation){var o=n.closeSize,r=bottom=left=right="auto";switch(n.closePosition){case"topright":r=-(o/2)+"px",right=-(o/2)+"px";break;case"topleft":r=-(o/2)+"px",left=-(o/2)+"px";break;case"bottomright":bottom=-(o/2)+"px",right=-(o/2)+"px";break;case"bottomleft":bottom=-(o/2)+"px",left=-(o/2)+"px"}i.addClass("outside").css({left:left,right:right,top:r,bottom:bottom,height:n.closeSize+"px",fontSize:n.closeFontSize+"px",width:n.closeSize+"px",backgroundColor:n.closeBgColor,"-webkit-border-radius":n.closeBorderRadius+"px","border-radius":n.closeBorderRadius+"px",lineHeight:n.closeSize+"px"})}return i.addClass("theme-"+e.theme).html(n.closeText).css({color:n.closeFontColor})};var n={fade:function(e){var i=t(this).show(0).css({opacity:0,top:t(window).scrollTop()+100+"px"}),n=t.extend(t.fn.animation.defaults,e);i.animate({opacity:1},parseInt(n.duration),n.easing,function(){i.removeAttr("style").css({display:"block",visibility:"visible",top:t(window).scrollTop()+100+"px"}).themeModal(n)})},fadeAndSlide:function(i){var n=t(this).show(0).css("opacity",0),o=t.extend(t.fn.animation.defaults,i);switch(o.direction){case"mouse":n.css({top:e.y+"px",left:e.x+"px"});break;case"top":n.css({top:t(window).scrollTop()-n.outerHeight(!0)+"px"});break;case"left":n.css({left:"-"+n.outerWidth(!0)+"px",top:t(window).scrollTop()+100+"px"});break;case"bottom":n.css({top:t(window).innerHeight()+t(window).scrollTop()+"px"});break;case"right":n.css({left:t(window).innerWidth()+"px",top:t(window).scrollTop()+100+"px"});break;case"topleft":n.css({left:"-"+n.outerWidth(!0)+"px",top:t(window).scrollTop()+100+"px",top:t(window).scrollTop()-n.outerHeight(!0)+"px"});break;case"topright":n.css({left:t(window).innerWidth()+"px",top:t(window).scrollTop()-n.outerHeight(!0)+"px"});break;case"bottomleft":n.css({left:"-"+n.outerWidth(!0)+"px",top:t(window).scrollTop()+100+"px",top:t(window).innerHeight()+t(window).scrollTop()+"px"});break;case"bottomright":n.css({left:t(window).innerWidth()+"px",top:t(window).innerHeight()+t(window).scrollTop()+"px"})}t("html").css("overflow-x","hidden"),n.animate({left:"50%",top:t(window).scrollTop()+100+"px"},{duration:o.duration,queue:!1},o.easing),setTimeout(function(){n.animate({opacity:1},.75*o.duration,o.easing,function(){n.removeAttr("style").css({display:"block",visibility:"visible",top:t(window).scrollTop()+100+"px"}).themeModal(o),t("html").css("overflow-x","inherit")})},.25*o.duration)},grow:function(e){var i=t(this).show(0),n=t.extend(t.fn.animation.defaults,e),o={width:100*(parseInt(i.css("width"))/parseInt(i.parent().innerWidth()))+"%",height:parseInt(i.css("height")),marginLeft:"-"+100*(parseInt(i.css("width"))/parseInt(i.parent().innerWidth()))/2+"%",padding:parseInt(i.css("padding-left"))/parseInt(i.css("font-size"))+"em"};t("*",i).fadeOut(0),i.css({top:5*(o.height/10)+t(window).scrollTop()+100+"px",left:5*(o.width/10)+t(window).innerWidth()/2+"px",height:0,width:0,padding:0,"margin-left":0}).animate({top:t(window).scrollTop()+100+"px",left:"50%",padding:o.padding,height:o.height,width:o.width,"margin-left":o.marginLeft},n.duration,function(){i.removeAttr("style").css({display:"block",visibility:"visible",top:t(window).scrollTop()+100+"px"}).themeModal(n),t("*",i).fadeIn("fast")})},growAndSlide:function(i){var n=t(this).show(0),o=t.extend(t.fn.animation.defaults,i),s={width:100*(parseInt(n.css("width"))/parseInt(n.parent().innerWidth()))+"%",height:parseInt(n.css("height")),marginLeft:"-"+100*(parseInt(n.css("width"))/parseInt(n.parent().innerWidth()))/2+"%",padding:parseInt(n.css("padding-left"))/parseInt(n.css("font-size"))+"em"};switch(t("html,body").css("overflow-x","hidden"),t("*",n).fadeOut(0),n.css({opacity:1,height:0,width:0,padding:0,"margin-left":0}),o.direction){case"mouse":n.css({top:e.y+"px",left:e.x+"px"});break;case"top":n.css({top:t(window).scrollTop()+n.outerHeight(!0)+"px"});break;case"left":n.css({left:0,top:t(window).scrollTop()+100+"px"});break;case"bottom":n.css({top:t(window).innerHeight()+t(window).scrollTop()+"px"});break;case"right":n.css({left:t(window).innerWidth()+"px",top:t(window).scrollTop()+100+"px"});break;case"topleft":n.css({left:0,top:t(window).scrollTop()+100+"px",top:t(window).scrollTop()-n.outerHeight(!0)+"px"});break;case"topright":n.css({left:t(window).innerWidth()+"px",top:t(window).scrollTop()-n.outerHeight(!0)+"px"});break;case"bottomleft":n.css({left:0,top:t(window).scrollTop()+100+"px",top:t(window).innerHeight()+t(window).scrollTop()+"px"});break;case"bottomright":n.css({left:t(window).innerWidth()+"px",top:t(window).innerHeight()+t(window).scrollTop()+"px"})}n.animate({height:s.height,padding:s.padding,width:s.width,"margin-left":s.marginLeft},{duration:o.duration,queue:!1},o.easing),setTimeout(function(){n.animate({height:"auto",top:t(window).scrollTop()+100+"px",left:"50%"},.95*o.duration,o.easing,function(){n.removeAttr("style").css({display:"block",visibility:"visible",top:t(window).scrollTop()+100+"px"}).themeModal(o),t("*",n).fadeIn("fast"),t("html").css("overflow-x","inherit")})},.05*o.duration)}};t.fn.animation=function(e){return n[e]?n[e].apply(this,Array.prototype.slice.call(arguments,1)):(t.error("Animation style "+n+" does not exist on jQuery.animation"),void 0)},t.fn.animation.defaults={duration:750,direction:"mouse",easing:"swing"},t.fn.emodal.defaults={theme:1,onLoad:function(){},onClose:function(){},type:null,maxHeight:null,maxWidth:null,userHeight:null,userWidth:null,animation:"fadeAndSlide",direction:"bottom",overlayClose:!1,overlayEscClose:!1};var o=easymodal.modals,s=easymodal.themes;easymodal.settings,t(document).ready(function(){t(".modal").each(function(){var i=t(this).css({visibility:"visible"}).hide(0),n=i.attr("id").split("-")[1];i.emodal(o[n]),t(document).on("click","."+i.attr("id"),function(t){t.preventDefault(),t.stopPropagation(),e.x=t.pageX,e.y=t.pageY,i.emodal("open")}),t("."+i.attr("id")).css("cursor","pointer")}),easymodal.autoOpen&&!t.cookie("eModal-autoOpen-"+easymodal.autoOpen.id)&&setTimeout(function(){t("#eModal-"+easymodal.autoOpen.id).emodal("open"),t.cookie("eModal-autoOpen-"+easymodal.autoOpen.id,!0,{expires:parseInt(easymodal.autoOpen.timer)})},easymodal.autoOpen.delay),easymodal.autoExit&&!t.cookie("eModal-autoExit-"+easymodal.autoExit.id)&&t("body").one("mouseleave",function(){return easymodal.force_user_login?!1:($this=t("#eModal-"+easymodal.autoExit.id).emodal("open"),t.cookie("eModal-autoExit-"+easymodal.autoExit.id,!0,{expires:parseInt(easymodal.autoExit.timer)}),void 0)}),t("#eModal-Login form").on("submit",function(e){$form=t(this),e.preventDefault(),$form.append('<p class="message notice">'+easymodal.loadingtext+"</p>"),t.ajax({type:"POST",dataType:"json",url:easymodal.ajaxLogin,data:{action:"ajaxlogin",username:t("#user_login",$form).val(),password:t("#user_pass",$form).val(),rememberme:t("#rememberme",$form).is(":checked")?!0:!1,login:!0,"easy-modal":t("#safe_csrf_nonce_easy_modal",$form).val()},success:function(e){e.loggedin===!0?(t("p.message",$form).removeClass("notice").addClass("success").text(e.message).show(),setTimeout(function(){t("#eModal-Login").emodal("close",{onClose:function(){window.location.href=easymodal.redirecturl}})},2e3)):t("p.message",$form).removeClass("notice").addClass("error").text(e.message).show()}})}),t("#eModal-Register form").on("submit",function(e){$form=t(this),e.preventDefault(),$form.append('<p class="message notice">'+easymodal.loadingtext+"</p>"),t.ajax({type:"POST",dataType:"json",url:easymodal.ajaxLogin,data:{action:"ajaxlogin",username:t("#forgot_login",$form).val(),email:t("#reg_email",$form).val(),register:!0,"easy-modal":t("#safe_csrf_nonce_easy_modal",$form).val()},success:function(e){e.loggedin===!0?(t("p.message",$form).removeClass("notice").addClass("success").text(e.message).show(),setTimeout(function(){t("#eModal-Login").emodal("close",{onClose:function(){window.location.href=easymodal.redirecturl}})},2e3)):t("p.message",$form).removeClass("notice").addClass("error").text(e.message).show()}})}),t("#eModal-Forgot form").on("submit",function(e){$form=t(this),e.preventDefault(),$form.append('<p class="message notice">'+easymodal.loadingtext+"</p>"),t.ajax({type:"POST",dataType:"json",url:easymodal.ajaxLogin,data:{action:"ajaxlogin",username:t("#forgot_login",$form).val(),forgotten:!0,"easy-modal":t("#safe_csrf_nonce_easy_modal",$form).val()},success:function(e){e.loggedin===!0?(t("p.message",$form).removeClass("notice").addClass("success").text(e.message).show(),setTimeout(function(){t("#eModal-Login").emodal("close",{onClose:function(){window.location.href=easymodal.redirecturl}})},2e3)):t("p.message",$form).removeClass("notice").addClass("error").text(e.message).show()}})})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){return t}function i(t){return decodeURIComponent(t.replace(o," "))}function n(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return s.json?JSON.parse(t):t}catch(e){}}var o=/\+/g,s=t.cookie=function(o,r,a){if(void 0!==r){if(a=t.extend({},s.defaults,a),"number"==typeof a.expires){var l=a.expires,c=a.expires=new Date;c.setDate(c.getDate()+l)}return r=s.json?JSON.stringify(r):String(r),document.cookie=[s.raw?o:encodeURIComponent(o),"=",s.raw?r:encodeURIComponent(r),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}for(var u=s.raw?e:i,d=document.cookie.split("; "),h=o?void 0:{},p=0,f=d.length;f>p;p++){var m=d[p].split("="),g=u(m.shift()),v=u(m.join("="));if(o&&o===g){h=n(v);break}o||(h[g]=n(v))}return h};s.defaults={},t.removeCookie=function(e,i){return void 0!==t.cookie(e)?(t.cookie(e,"",t.extend({},i,{expires:-1})),!0):!1}}),function(t,e){function i(t,e,i){var n=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function n(e){var i=l(),n=i._rgba=[],e=e.toLowerCase();return p(a,function(t,o){var s,r=o.re.exec(e);return s=r&&o.parse(r),r=o.space||"rgba",s?(s=i[r](s),i[c[r].cache]=s[c[r].cache],n=i._rgba=s._rgba,!1):void 0}),n.length?("0,0,0,0"===n.join()&&t.extend(n,s.transparent),i):s[e]}function o(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var s,r=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,n,o){return new t.Color.fn.parse(e,i,n,o)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},h=t("<p>")[0],p=t.each;h.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=-1<h.style.backgroundColor.indexOf("rgba"),p(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(o,r,a,u){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(r),r=e);var d=this,h=t.type(o),f=this._rgba=[];return r!==e&&(o=[o,r,a,u],h="array"),"string"===h?this.parse(n(o)||s._default):"array"===h?(p(c.rgba.props,function(t,e){f[e.idx]=i(o[e.idx],e)}),this):"object"===h?(o instanceof l?p(c,function(t,e){o[e.cache]&&(d[e.cache]=o[e.cache].slice())}):p(c,function(e,n){var s=n.cache;p(n.props,function(t,e){if(!d[s]&&n.to){if("alpha"===t||null==o[t])return;d[s]=n.to(d._rgba)}d[s][e.idx]=i(o[t],e,!0)}),d[s]&&t.inArray(null,d[s].slice(0,3))<0&&(d[s][3]=1,n.from&&(d._rgba=n.from(d[s])))}),this):void 0},is:function(t){var e=l(t),i=!0,n=this;return p(c,function(t,o){var s,r=e[o.cache];return r&&(s=n[o.cache]||o.to&&o.to(n._rgba)||[],p(o.props,function(t,e){return null!=r[e.idx]?i=r[e.idx]===s[e.idx]:void 0})),i}),i},_space:function(){var t=[],e=this;return p(c,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=l(t),o=n._space(),s=c[o],r=0===this.alpha()?l("transparent"):this,a=r[s.cache]||s.to(r._rgba),d=a.slice(),n=n[s.cache];return p(s.props,function(t,o){var s=o.idx,r=a[s],l=n[s],c=u[o.type]||{};null!==l&&(null===r?d[s]=l:(c.mod&&(l-r>c.mod/2?r+=c.mod:r-l>c.mod/2&&(r-=c.mod)),d[s]=i((l-r)*e+r,o)))}),this[o](d)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),o=l(e)._rgba;return l(t.map(i,function(t,e){return(1-n)*o[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,n=t[2]/255,t=t[3],o=Math.max(e,i,n),s=Math.min(e,i,n),r=o-s,a=o+s,l=.5*a;return[Math.round(s===o?0:e===o?60*(i-n)/r+360:i===o?60*(n-e)/r+120:60*(e-i)/r+240)%360,0===l||1===l?l:.5>=l?r/a:r/(2-a),l,null==t?1:t]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],t=t[3],i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i;return[Math.round(255*o(n,i,e+1/3)),Math.round(255*o(n,i,e)),Math.round(255*o(n,i,e-1/3)),t]},p(c,function(n,o){var s=o.props,a=o.cache,c=o.to,u=o.from;l.fn[n]=function(n){if(c&&!this[a]&&(this[a]=c(this._rgba)),n===e)return this[a].slice();var o,r=t.type(n),d="array"===r||"object"===r?n:arguments,h=this[a].slice();return p(s,function(t,e){var n=d["object"===r?t:e.idx];null==n&&(n=h[e.idx]),h[e.idx]=i(n,e)}),u?(o=l(u(h)),o[a]=h,o):l(h)},p(s,function(e,i){l.fn[e]||(l.fn[e]=function(o){var s=t.type(o),a="alpha"===e?this._hsla?"hsla":"rgba":n,l=this[a](),c=l[i.idx];return"undefined"===s?c:("function"===s&&(o=o.call(this,c),s=t.type(o)),null==o&&i.empty?this:("string"===s&&(s=r.exec(o))&&(o=c+parseFloat(s[2])*("+"===s[1]?1:-1)),l[i.idx]=o,this[a](l)))})})}),l.hook=function(e){e=e.split(" "),p(e,function(e,i){t.cssHooks[i]={set:function(e,o){var s,r="";if("string"!==t.type(o)||(s=n(o))){if(o=l(s||o),!d.rgba&&1!==o._rgba[3]){for(s="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&s&&s.style;)try{r=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}o=o.blend(r&&"transparent"!==r?r:"_default")}o=o.toRgbaString()}try{e.style[i]=o}catch(c){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},s=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/jquery.form.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery Form Plugin
|
3 |
-
* version: 3.14 (30-JUL-2012)
|
4 |
-
* @requires jQuery v1.3.2 or later
|
5 |
-
*
|
6 |
-
* Examples and documentation at: http://malsup.com/jquery/form/
|
7 |
-
* Project repository: https://github.com/malsup/form
|
8 |
-
* Dual licensed under the MIT and GPL licenses:
|
9 |
-
* http://malsup.github.com/mit-license.txt
|
10 |
-
* http://malsup.github.com/gpl-license-v2.txt
|
11 |
-
*/
|
12 |
-
(function(e){var c={};c.fileapi=e("<input type='file'/>").get(0).files!==undefined;c.formdata=window.FormData!==undefined;e.fn.ajaxSubmit=function(g){if(!this.length){d("ajaxSubmit: skipping submit process - no element selected");return this}var f,w,i,l=this;if(typeof g=="function"){g={success:g}}f=this.attr("method");w=this.attr("action");i=(typeof w==="string")?e.trim(w):"";i=i||window.location.href||"";if(i){i=(i.match(/^([^#]+)/)||[])[1]}g=e.extend(true,{url:i,success:e.ajaxSettings.success,type:f||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},g);var r={};this.trigger("form-pre-serialize",[this,g,r]);if(r.veto){d("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(g.beforeSerialize&&g.beforeSerialize(this,g)===false){d("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var j=g.traditional;if(j===undefined){j=e.ajaxSettings.traditional}var o=[];var z,A=this.formToArray(g.semantic,o);if(g.data){g.extraData=g.data;z=e.param(g.data,j)}if(g.beforeSubmit&&g.beforeSubmit(A,this,g)===false){d("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[A,this,g,r]);if(r.veto){d("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var u=e.param(A,j);if(z){u=(u?(u+"&"+z):z)}if(g.type.toUpperCase()=="GET"){g.url+=(g.url.indexOf("?")>=0?"&":"?")+u;g.data=null}else{g.data=u}var C=[];if(g.resetForm){C.push(function(){l.resetForm()})}if(g.clearForm){C.push(function(){l.clearForm(g.includeHidden)})}if(!g.dataType&&g.target){var h=g.success||function(){};C.push(function(q){var k=g.replaceTarget?"replaceWith":"html";e(g.target)[k](q).each(h,arguments)})}else{if(g.success){C.push(g.success)}}g.success=function(F,q,G){var E=g.context||this;for(var D=0,k=C.length;D<k;D++){C[D].apply(E,[F,q,G||l,l])}};var y=e("input:file:enabled[value]",this);var m=y.length>0;var x="multipart/form-data";var t=(l.attr("enctype")==x||l.attr("encoding")==x);var s=c.fileapi&&c.formdata;d("fileAPI :"+s);var n=(m||t)&&!s;if(g.iframe!==false&&(g.iframe||n)){if(g.closeKeepAlive){e.get(g.closeKeepAlive,function(){B(A)})}else{B(A)}}else{if((m||t)&&s){p(A)}else{e.ajax(g)}}for(var v=0;v<o.length;v++){o[v]=null}this.trigger("form-submit-notify",[this,g]);return this;function p(q){var k=new FormData();for(var D=0;D<q.length;D++){k.append(q[D].name,q[D].value)}if(g.extraData){for(var G in g.extraData){if(g.extraData.hasOwnProperty(G)){k.append(G,g.extraData[G])}}}g.data=null;var F=e.extend(true,{},e.ajaxSettings,g,{contentType:false,processData:false,cache:false,type:"POST"});if(g.uploadProgress){F.xhr=function(){var H=jQuery.ajaxSettings.xhr();if(H.upload){H.upload.onprogress=function(L){var K=0;var I=L.loaded||L.position;var J=L.total;if(L.lengthComputable){K=Math.ceil(I/J*100)}g.uploadProgress(L,I,J,K)}}return H}}F.data=null;var E=F.beforeSend;F.beforeSend=function(I,H){H.data=k;if(E){E.call(this,I,H)}};e.ajax(F)}function B(ab){var G=l[0],F,X,R,Z,U,I,M,K,L,V,Y,P;var J=!!e.fn.prop;if(e(":input[name=submit],:input[id=submit]",G).length){alert('Error: Form elements must not have name or id of "submit".');return}if(ab){for(X=0;X<o.length;X++){F=e(o[X]);if(J){F.prop("disabled",false)}else{F.removeAttr("disabled")}}}R=e.extend(true,{},e.ajaxSettings,g);R.context=R.context||R;U="jqFormIO"+(new Date().getTime());if(R.iframeTarget){I=e(R.iframeTarget);V=I.attr("name");if(!V){I.attr("name",U)}else{U=V}}else{I=e('<iframe name="'+U+'" src="'+R.iframeSrc+'" />');I.css({position:"absolute",top:"-1000px",left:"-1000px"})}M=I[0];K={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(ae){var af=(ae==="timeout"?"timeout":"aborted");d("aborting upload... "+af);this.aborted=1;if(M.contentWindow.document.execCommand){try{M.contentWindow.document.execCommand("Stop")}catch(ag){}}I.attr("src",R.iframeSrc);K.error=af;if(R.error){R.error.call(R.context,K,af,ae)}if(Z){e.event.trigger("ajaxError",[K,R,af])}if(R.complete){R.complete.call(R.context,K,af)}}};Z=R.global;if(Z&&0===e.active++){e.event.trigger("ajaxStart")}if(Z){e.event.trigger("ajaxSend",[K,R])}if(R.beforeSend&&R.beforeSend.call(R.context,K,R)===false){if(R.global){e.active--}return}if(K.aborted){return}L=G.clk;if(L){V=L.name;if(V&&!L.disabled){R.extraData=R.extraData||{};R.extraData[V]=L.value;if(L.type=="image"){R.extraData[V+".x"]=G.clk_x;R.extraData[V+".y"]=G.clk_y}}}var Q=1;var N=2;function O(af){var ae=af.contentWindow?af.contentWindow.document:af.contentDocument?af.contentDocument:af.document;return ae}var E=e("meta[name=csrf-token]").attr("content");var D=e("meta[name=csrf-param]").attr("content");if(D&&E){R.extraData=R.extraData||{};R.extraData[D]=E}function W(){var ag=l.attr("target"),ae=l.attr("action");G.setAttribute("target",U);if(!f){G.setAttribute("method","POST")}if(ae!=R.url){G.setAttribute("action",R.url)}if(!R.skipEncodingOverride&&(!f||/post/i.test(f))){l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(R.timeout){P=setTimeout(function(){Y=true;T(Q)},R.timeout)}function ah(){try{var aj=O(M).readyState;d("state = "+aj);if(aj&&aj.toLowerCase()=="uninitialized"){setTimeout(ah,50)}}catch(ak){d("Server abort: ",ak," (",ak.name,")");T(N);if(P){clearTimeout(P)}P=undefined}}var af=[];try{if(R.extraData){for(var ai in R.extraData){if(R.extraData.hasOwnProperty(ai)){if(e.isPlainObject(R.extraData[ai])&&R.extraData[ai].hasOwnProperty("name")&&R.extraData[ai].hasOwnProperty("value")){af.push(e('<input type="hidden" name="'+R.extraData[ai].name+'">').attr("value",R.extraData[ai].value).appendTo(G)[0])}else{af.push(e('<input type="hidden" name="'+ai+'">').attr("value",R.extraData[ai]).appendTo(G)[0])}}}}if(!R.iframeTarget){I.appendTo("body");if(M.attachEvent){M.attachEvent("onload",T)}else{M.addEventListener("load",T,false)}}setTimeout(ah,15);G.submit()}finally{G.setAttribute("action",ae);if(ag){G.setAttribute("target",ag)}else{l.removeAttr("target")}e(af).remove()}}if(R.forceSync){W()}else{setTimeout(W,10)}var ac,ad,aa=50,H;function T(aj){if(K.aborted||H){return}try{ad=O(M)}catch(am){d("cannot access response document: ",am);aj=N}if(aj===Q&&K){K.abort("timeout");return}else{if(aj==N&&K){K.abort("server abort");return}}if(!ad||ad.location.href==R.iframeSrc){if(!Y){return}}if(M.detachEvent){M.detachEvent("onload",T)}else{M.removeEventListener("load",T,false)}var ah="success",al;try{if(Y){throw"timeout"}var ag=R.dataType=="xml"||ad.XMLDocument||e.isXMLDoc(ad);d("isXml="+ag);if(!ag&&window.opera&&(ad.body===null||!ad.body.innerHTML)){if(--aa){d("requeing onLoad callback, DOM not available");setTimeout(T,250);return}}var an=ad.body?ad.body:ad.documentElement;K.responseText=an?an.innerHTML:null;K.responseXML=ad.XMLDocument?ad.XMLDocument:ad;if(ag){R.dataType="xml"}K.getResponseHeader=function(aq){var ap={"content-type":R.dataType};return ap[aq]};if(an){K.status=Number(an.getAttribute("status"))||K.status;K.statusText=an.getAttribute("statusText")||K.statusText}var ae=(R.dataType||"").toLowerCase();var ak=/(json|script|text)/.test(ae);if(ak||R.textarea){var ai=ad.getElementsByTagName("textarea")[0];if(ai){K.responseText=ai.value;K.status=Number(ai.getAttribute("status"))||K.status;K.statusText=ai.getAttribute("statusText")||K.statusText}else{if(ak){var af=ad.getElementsByTagName("pre")[0];var ao=ad.getElementsByTagName("body")[0];if(af){K.responseText=af.textContent?af.textContent:af.innerText}else{if(ao){K.responseText=ao.textContent?ao.textContent:ao.innerText}}}}}else{if(ae=="xml"&&!K.responseXML&&K.responseText){K.responseXML=S(K.responseText)}}try{ac=k(K,ae,R)}catch(aj){ah="parsererror";K.error=al=(aj||ah)}}catch(aj){d("error caught: ",aj);ah="error";K.error=al=(aj||ah)}if(K.aborted){d("upload aborted");ah=null}if(K.status){ah=(K.status>=200&&K.status<300||K.status===304)?"success":"error"}if(ah==="success"){if(R.success){R.success.call(R.context,ac,"success",K)}if(Z){e.event.trigger("ajaxSuccess",[K,R])}}else{if(ah){if(al===undefined){al=K.statusText}if(R.error){R.error.call(R.context,K,ah,al)}if(Z){e.event.trigger("ajaxError",[K,R,al])}}}if(Z){e.event.trigger("ajaxComplete",[K,R])}if(Z&&!--e.active){e.event.trigger("ajaxStop")}if(R.complete){R.complete.call(R.context,K,ah)}H=true;if(R.timeout){clearTimeout(P)}setTimeout(function(){if(!R.iframeTarget){I.remove()}K.responseXML=null},100)}var S=e.parseXML||function(ae,af){if(window.ActiveXObject){af=new ActiveXObject("Microsoft.XMLDOM");af.async="false";af.loadXML(ae)}else{af=(new DOMParser()).parseFromString(ae,"text/xml")}return(af&&af.documentElement&&af.documentElement.nodeName!="parsererror")?af:null};var q=e.parseJSON||function(ae){return window["eval"]("("+ae+")")};var k=function(aj,ah,ag){var af=aj.getResponseHeader("content-type")||"",ae=ah==="xml"||!ah&&af.indexOf("xml")>=0,ai=ae?aj.responseXML:aj.responseText;if(ae&&ai.documentElement.nodeName==="parsererror"){if(e.error){e.error("parsererror")}}if(ag&&ag.dataFilter){ai=ag.dataFilter(ai,ah)}if(typeof ai==="string"){if(ah==="json"||!ah&&af.indexOf("json")>=0){ai=q(ai)}else{if(ah==="script"||!ah&&af.indexOf("javascript")>=0){e.globalEval(ai)}}}return ai}}};e.fn.ajaxForm=function(f){f=f||{};f.delegation=f.delegation&&e.isFunction(e.fn.on);if(!f.delegation&&this.length===0){var g={s:this.selector,c:this.context};if(!e.isReady&&g.s){d("DOM not ready, queuing ajaxForm");e(function(){e(g.s,g.c).ajaxForm(f)});return this}d("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}if(f.delegation){e(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,f,b).on("click.form-plugin",this.selector,f,a);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",f,b).bind("click.form-plugin",f,a)};function b(g){var f=g.data;if(!g.isDefaultPrevented()){g.preventDefault();e(this).ajaxSubmit(f)}}function a(j){var i=j.target;var g=e(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length===0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!==undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof e.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)}e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};e.fn.formToArray=function(w,f){var u=[];if(this.length===0){return u}var k=this[0];var o=w?k.getElementsByTagName("*"):k.elements;if(!o){return u}var q,p,m,x,l,s,h;for(q=0,s=o.length;q<s;q++){l=o[q];m=l.name;if(!m){continue}if(w&&k.clk&&l.type=="image"){if(!l.disabled&&k.clk==l){u.push({name:m,value:e(l).val(),type:l.type});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}continue}x=e.fieldValue(l,true);if(x&&x.constructor==Array){if(f){f.push(l)}for(p=0,h=x.length;p<h;p++){u.push({name:m,value:x[p]})}}else{if(c.fileapi&&l.type=="file"&&!l.disabled){if(f){f.push(l)}var g=l.files;if(g.length){for(p=0;p<g.length;p++){u.push({name:m,value:g[p],type:l.type})}}else{u.push({name:m,value:"",type:l.type})}}else{if(x!==null&&typeof x!="undefined"){if(f){f.push(l)}u.push({name:m,value:x,type:l.type,required:l.required})}}}}if(!w&&k.clk){var r=e(k.clk),t=r[0];m=t.name;if(m&&!t.disabled&&t.type=="image"){u.push({name:m,value:r.val()});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}}return u};e.fn.formSerialize=function(f){return e.param(this.formToArray(f))};e.fn.fieldSerialize=function(g){var f=[];this.each(function(){var l=this.name;if(!l){return}var j=e.fieldValue(this,g);if(j&&j.constructor==Array){for(var k=0,h=j.length;k<h;k++){f.push({name:l,value:j[k]})}}else{if(j!==null&&typeof j!="undefined"){f.push({name:this.name,value:j})}}});return e.param(f)};e.fn.fieldValue=function(l){for(var k=[],h=0,f=this.length;h<f;h++){var j=this[h];var g=e.fieldValue(j,l);if(g===null||typeof g=="undefined"||(g.constructor==Array&&!g.length)){continue}if(g.constructor==Array){e.merge(k,g)}else{k.push(g)}}return k};e.fieldValue=function(f,m){var h=f.name,s=f.type,u=f.tagName.toLowerCase();if(m===undefined){m=true}if(m&&(!h||f.disabled||s=="reset"||s=="button"||(s=="checkbox"||s=="radio")&&!f.checked||(s=="submit"||s=="image")&&f.form&&f.form.clk!=f||u=="select"&&f.selectedIndex==-1)){return null}if(u=="select"){var o=f.selectedIndex;if(o<0){return null}var q=[],g=f.options;var k=(s=="select-one");var p=(k?o+1:g.length);for(var j=(k?o:0);j<p;j++){var l=g[j];if(l.selected){var r=l.value;if(!r){r=(l.attributes&&l.attributes.value&&!(l.attributes.value.specified))?l.text:l.value}if(k){return r}q.push(r)}}return q}return e(f).val()};e.fn.clearForm=function(f){return this.each(function(){e("input,select,textarea",this).clearFields(f)})};e.fn.clearFields=e.fn.clearInputs=function(f){var g=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var i=this.type,h=this.tagName.toLowerCase();if(g.test(i)||h=="textarea"){this.value=""}else{if(i=="checkbox"||i=="radio"){this.checked=false}else{if(h=="select"){this.selectedIndex=-1}else{if(f){if((f===true&&/hidden/.test(i))||(typeof f=="string"&&e(this).is(f))){this.value=""}}}}}})};e.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};e.fn.enable=function(f){if(f===undefined){f=true}return this.each(function(){this.disabled=!f})};e.fn.selected=function(f){if(f===undefined){f=true}return this.each(function(){var g=this.type;if(g=="checkbox"||g=="radio"){this.checked=f}else{if(this.tagName.toLowerCase()=="option"){var h=e(this).parent("select");if(f&&h[0]&&h[0].type=="select-one"){h.find("option").selected(false)}this.selected=f}}})};e.fn.ajaxSubmit.debug=false;function d(){if(!e.fn.ajaxSubmit.debug){return}var f="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(f)}else{if(window.opera&&window.opera.postError){window.opera.postError(f)}}}})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/views/_notes/dwsync.xml
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8" ?>
|
2 |
-
<dwsync>
|
3 |
-
<file name="admin_footer.php" server="easy-modal.com//public_html/" local="130207651112394977" remote="130208443200000000" Dst="2" />
|
4 |
-
<file name="help.php" server="easy-modal.com//public_html/" local="130207651112514984" remote="130208443200000000" Dst="2" />
|
5 |
-
<file name="modal.php" server="easy-modal.com//public_html/" local="130207651112684994" remote="130208443200000000" Dst="2" />
|
6 |
-
<file name="metaboxes.php" server="easy-modal.com//public_html/" local="130207651112594989" remote="130208443200000000" Dst="2" />
|
7 |
-
<file name="modal_delete.php" server="easy-modal.com//public_html/" local="130207651112774999" remote="130208443200000000" Dst="2" />
|
8 |
-
<file name="modal_settings.php" server="easy-modal.com//public_html/" local="130207651113455038" remote="130208443200000000" Dst="2" />
|
9 |
-
<file name="settings.php" server="easy-modal.com//public_html/" local="130207651113595046" remote="130208443200000000" Dst="2" />
|
10 |
-
<file name="modal_list.php" server="easy-modal.com//public_html/" local="130207651112965010" remote="130208443200000000" Dst="2" />
|
11 |
-
<file name="sidebar.php" server="easy-modal.com//public_html/" local="130207651113665050" remote="130208443200000000" Dst="2" />
|
12 |
-
<file name="theme_settings.php" server="easy-modal.com//public_html/" local="130207651114745112" remote="130208443200000000" Dst="2" />
|
13 |
-
<file name="modal.php" server="easy-modal.com" local="130224633336764562" remote="130224597000000000" Dst="2" />
|
14 |
-
<file name="sidebar.php" server="easy-modal.com" local="130219725758308718" remote="130219689600000000" Dst="2" />
|
15 |
-
<file name="admin_footer.php" server="easy-modal.com" local="130219723239704663" remote="130219687200000000" Dst="2" />
|
16 |
-
<file name="modal_delete.php" server="easy-modal.com" local="130218604452439616" remote="130218568200000000" Dst="2" />
|
17 |
-
<file name="settings.php" server="easy-modal.com" local="130218604757107042" remote="130218568200000000" Dst="2" />
|
18 |
-
<file name="help.php" server="easy-modal.com" local="130218604264468864" remote="130218567600000000" Dst="2" />
|
19 |
-
<file name="metaboxes.php" server="easy-modal.com" local="130218604333102790" remote="130218568200000000" Dst="2" />
|
20 |
-
<file name="modal_list.php" server="easy-modal.com" local="130218604525373787" remote="130218568200000000" Dst="2" />
|
21 |
-
<file name="modal_settings.php" server="easy-modal.com" local="130218604639310304" remote="130218568200000000" Dst="2" />
|
22 |
-
<file name="theme_settings.php" server="easy-modal.com" local="130218604839951780" remote="130218568200000000" Dst="2" />
|
23 |
-
</dwsync>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
6 |
Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
|
7 |
Requires at least: 3.2
|
8 |
Tested up to: 3.6
|
9 |
-
Stable tag: 1.2.0.
|
10 |
Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos, slideshows & more.
|
11 |
|
12 |
== Description ==
|
@@ -54,10 +54,13 @@ To be notified of plugin updates, [follow us on Twitter](http://twitter.com/Easy
|
|
54 |
5. Copy and Add ``eModal-#` class from the modals settings page to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
|
55 |
|
56 |
== Changelog ==
|
|
|
|
|
|
|
|
|
57 |
= 1.2.0.4 =
|
58 |
* Fixed data migration issue ( wasn't setting sites to sitewide )
|
59 |
* Added filters for modal content. Use add_filter('em_modal_content', 'your_custom_function'); function your_custom_function($content);
|
60 |
-
|
61 |
= 1.2.0.2 =
|
62 |
* Fixed issue of undefined array key.
|
63 |
= 1.2.0.1 =
|
6 |
Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
|
7 |
Requires at least: 3.2
|
8 |
Tested up to: 3.6
|
9 |
+
Stable tag: 1.2.0.9
|
10 |
Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos, slideshows & more.
|
11 |
|
12 |
== Description ==
|
54 |
5. Copy and Add ``eModal-#` class from the modals settings page to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
|
55 |
|
56 |
== Changelog ==
|
57 |
+
= 1.2.0.9=
|
58 |
+
* Fixed CSS z-index issues ( set modal z-index to 999, and overlay to 998 to make sure they are above other elements )
|
59 |
+
* Fixed an issue with upgrading from previous versions.
|
60 |
+
|
61 |
= 1.2.0.4 =
|
62 |
* Fixed data migration issue ( wasn't setting sites to sitewide )
|
63 |
* Added filters for modal content. Use add_filter('em_modal_content', 'your_custom_function'); function your_custom_function($content);
|
|
|
64 |
= 1.2.0.2 =
|
65 |
* Fixed issue of undefined array key.
|
66 |
= 1.2.0.1 =
|