Version Description
- Feature: Gutenberg module for ads #60
- Fix: Ads in middle of the post not working properly when custom HTML markup was added in the post #57
Download this release
Release Info
Developer | wpquads |
Plugin | ![]() |
Version | 1.8.10 |
Comparing to | |
See all releases |
Code changes from version 1.8.9 to 1.8.10
- README.md +36 -36
- assets/css/quads-admin-all.css +121 -121
- assets/css/quads-admin.css +1204 -1204
- assets/css/quads-admin.min.css +1204 -1
- assets/css/quads-plugins-admin.min.css +40 -40
- assets/js/blocks.js +21 -21
- assets/js/chosen.jquery.js +1284 -1284
- assets/js/chosen.jquery.min.js +1 -1
- assets/js/jscolor.min.js +9 -9
- assets/js/quads-admin.js +1799 -1799
- assets/js/quads-admin.min.js +1799 -1799
- assets/js/quads-plugins-admin.js +79 -79
- assets/js/quads-plugins-admin.min.js +79 -79
- dist/blocks.build.js +122 -0
- dist/blocks.editor.build.css +12 -0
- dist/blocks.style.build.css +11 -0
- includes/Autoloader.php +154 -154
- includes/Cron/Cron.php +54 -54
- includes/DI/InjectionAware.php +38 -38
- includes/Forms/Elements.php +299 -299
- includes/Forms/Elements/Check.php +65 -65
- includes/Forms/Elements/Date.php +27 -27
- includes/Forms/Elements/DateTime.php +25 -25
- includes/Forms/Elements/Email.php +27 -27
- includes/Forms/Elements/File.php +27 -27
- includes/Forms/Elements/Hidden.php +28 -28
- includes/Forms/Elements/Interfaces/InterfaceElement.php +134 -134
- includes/Forms/Elements/Interfaces/InterfaceElementWithOptions.php +33 -33
- includes/Forms/Elements/Numerical.php +25 -25
- includes/Forms/Elements/Password.php +28 -28
- includes/Forms/Elements/Radio.php +43 -43
- includes/Forms/Elements/Select.php +58 -58
- includes/Forms/Elements/SelectMultiple.php +57 -57
- includes/Forms/Elements/Text.php +27 -27
- includes/Forms/Elements/TextArea.php +27 -27
- includes/Forms/Elements/TextAreaHidden.php +27 -27
- includes/Forms/ElementsWithOptions.php +75 -75
- includes/Forms/Form.php +59 -59
- includes/QUADS_SL_Plugin_Updater.php +338 -338
- includes/admin/add-ons.php +121 -121
- includes/admin/admin-actions.php +150 -150
- includes/admin/admin-footer.php +34 -34
- includes/admin/admin-notices.php +728 -728
- includes/admin/admin-pages.php +83 -83
- includes/admin/adsTxt.php +106 -106
- includes/admin/plugins.php +61 -61
- includes/admin/settings/contextual-help.php +50 -50
- includes/admin/settings/display-settings.php +354 -354
- includes/admin/settings/register-settings.php +813 -2380
README.md
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
# [WP QUADS (Quick AdSense Reloaded)](https://wordpress.org/support/plugin/quick-adsense-reloaded)
|
2 |
-
|
3 |
-
### Welcome to WP QUADS GitHub Repository
|
4 |
-
|
5 |
-
A further development of Quick Adsense! Insert Google AdSense or any Ads code into your website.
|
6 |
-
|
7 |
-
More information can be found at [wordpress.org](https://wordpress.org/support/plugin/quick-adsense-reloaded).
|
8 |
-
|
9 |
-
## Note ##
|
10 |
-
|
11 |
-
This is the latest developer version of WP QUADS.
|
12 |
-
if you just want to use WP QUADS install the productive version which you get at [wordpress.org](https://wordpress.org/support/plugin/quick-adsense-reloaded)
|
13 |
-
|
14 |
-
## Installation ##
|
15 |
-
|
16 |
-
1. You can clone the GitHub repository: `https://github.com/rene-hermenau/quick-adsense-reloaded.git`
|
17 |
-
2. Or download it directly as a ZIP file: `https://github.com/rene-hermenau/quick-adsense-reloaded/archive/master.zip`
|
18 |
-
|
19 |
-
This will download the latest developer copy of Quick AdSense Reloaded.
|
20 |
-
|
21 |
-
## Bugs ##
|
22 |
-
If you find an issue, let us know [here](https://github.com/rene-hermenau/quick-adsense-reloaded/issues)!
|
23 |
-
|
24 |
-
## Support ##
|
25 |
-
This is a developer's portal for WP QUADS and should _not_ be used for support.
|
26 |
-
Please visit the [support forums](https://wordpress.org/support/plugin/quick-adsense-reloaded/).
|
27 |
-
|
28 |
-
## Contributions ##
|
29 |
-
Anyone is welcome to contribute to WP QUADS. Please read the [guidelines for contributing](https://github.com/rene-hermenau/quick-adsense-reloaded/blob/master/CONTRIBUTING.md) to this repository.
|
30 |
-
|
31 |
-
There are various ways you can contribute:
|
32 |
-
|
33 |
-
1. Raise an [Issue](https://github.com/rene-hermenau/quick-adsense-reloaded/issues) on GitHub
|
34 |
-
2. Send us a Pull Request with your bug fixes and/or new features to the dev branch
|
35 |
-
3. Translate WP QUADS into different languages
|
36 |
-
4. Provide feedback and suggestions on [enhancements](https://github.com/rene-hermenau/quick-adsense-reloaded/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open)
|
1 |
+
# [WP QUADS (Quick AdSense Reloaded)](https://wordpress.org/support/plugin/quick-adsense-reloaded)
|
2 |
+
|
3 |
+
### Welcome to WP QUADS GitHub Repository
|
4 |
+
|
5 |
+
A further development of Quick Adsense! Insert Google AdSense or any Ads code into your website.
|
6 |
+
|
7 |
+
More information can be found at [wordpress.org](https://wordpress.org/support/plugin/quick-adsense-reloaded).
|
8 |
+
|
9 |
+
## Note ##
|
10 |
+
|
11 |
+
This is the latest developer version of WP QUADS.
|
12 |
+
if you just want to use WP QUADS install the productive version which you get at [wordpress.org](https://wordpress.org/support/plugin/quick-adsense-reloaded)
|
13 |
+
|
14 |
+
## Installation ##
|
15 |
+
|
16 |
+
1. You can clone the GitHub repository: `https://github.com/rene-hermenau/quick-adsense-reloaded.git`
|
17 |
+
2. Or download it directly as a ZIP file: `https://github.com/rene-hermenau/quick-adsense-reloaded/archive/master.zip`
|
18 |
+
|
19 |
+
This will download the latest developer copy of Quick AdSense Reloaded.
|
20 |
+
|
21 |
+
## Bugs ##
|
22 |
+
If you find an issue, let us know [here](https://github.com/rene-hermenau/quick-adsense-reloaded/issues)!
|
23 |
+
|
24 |
+
## Support ##
|
25 |
+
This is a developer's portal for WP QUADS and should _not_ be used for support.
|
26 |
+
Please visit the [support forums](https://wordpress.org/support/plugin/quick-adsense-reloaded/).
|
27 |
+
|
28 |
+
## Contributions ##
|
29 |
+
Anyone is welcome to contribute to WP QUADS. Please read the [guidelines for contributing](https://github.com/rene-hermenau/quick-adsense-reloaded/blob/master/CONTRIBUTING.md) to this repository.
|
30 |
+
|
31 |
+
There are various ways you can contribute:
|
32 |
+
|
33 |
+
1. Raise an [Issue](https://github.com/rene-hermenau/quick-adsense-reloaded/issues) on GitHub
|
34 |
+
2. Send us a Pull Request with your bug fixes and/or new features to the dev branch
|
35 |
+
3. Translate WP QUADS into different languages
|
36 |
+
4. Provide feedback and suggestions on [enhancements](https://github.com/rene-hermenau/quick-adsense-reloaded/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open)
|
assets/css/quads-admin-all.css
CHANGED
@@ -1,121 +1,121 @@
|
|
1 |
-
/**
|
2 |
-
* QUADS Admin All CSS
|
3 |
-
*
|
4 |
-
* @package QUADS
|
5 |
-
* @subpackage Admin CSS
|
6 |
-
* @copyright Copyright (c) 2017, René Hermenau
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
*/
|
9 |
-
|
10 |
-
|
11 |
-
@media (max-width:506px){
|
12 |
-
.quads-banner-columns {
|
13 |
-
display: block !important;
|
14 |
-
}
|
15 |
-
.quads-banner-sidebar-second{
|
16 |
-
width: 100% !important;
|
17 |
-
}
|
18 |
-
}
|
19 |
-
@media (max-width:780px){
|
20 |
-
.quads-banner-wrapper{
|
21 |
-
margin-right:12px !important;
|
22 |
-
}
|
23 |
-
}
|
24 |
-
|
25 |
-
.quads-banner-wrapper{
|
26 |
-
display: flex;
|
27 |
-
flex-direction: column;
|
28 |
-
clear:both;
|
29 |
-
background: #fff;
|
30 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
31 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
32 |
-
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
33 |
-
margin: 5px 5px 2px;
|
34 |
-
margin-right:20px;
|
35 |
-
padding: 1px 12px;
|
36 |
-
}
|
37 |
-
.quads-banner-content {
|
38 |
-
display: flex;
|
39 |
-
flex: 1;
|
40 |
-
color: #000;
|
41 |
-
}
|
42 |
-
.quads-banner-columns{
|
43 |
-
display: flex;
|
44 |
-
flex:1;
|
45 |
-
-ms-flex-align: center;
|
46 |
-
-webkit-align-items: center;
|
47 |
-
-webkit-box-align: center;
|
48 |
-
|
49 |
-
align-items: center;
|
50 |
-
}
|
51 |
-
.quads-banner-main{
|
52 |
-
flex: 1;
|
53 |
-
order: 2;
|
54 |
-
}
|
55 |
-
.quads-banner-sidebar-first{
|
56 |
-
min-width: 160px;
|
57 |
-
width: 13%;
|
58 |
-
order: 1;
|
59 |
-
}
|
60 |
-
.quads-banner-sidebar-second{
|
61 |
-
width: 19%;
|
62 |
-
order: 3;
|
63 |
-
}
|
64 |
-
|
65 |
-
|
66 |
-
.quads-button-primary {
|
67 |
-
display: inline-block;
|
68 |
-
text-decoration: none;
|
69 |
-
font-size: 16px;
|
70 |
-
line-height: 32px;
|
71 |
-
height: 36px;
|
72 |
-
margin: 0;
|
73 |
-
padding: 0 13px 1px;
|
74 |
-
cursor: pointer;
|
75 |
-
border-width: 1px;
|
76 |
-
border-style: solid;
|
77 |
-
-webkit-appearance: none;
|
78 |
-
-webkit-border-radius: 3px;
|
79 |
-
border-radius: 3px;
|
80 |
-
white-space: nowrap;
|
81 |
-
-webkit-box-sizing: border-box;
|
82 |
-
-moz-box-sizing: border-box;
|
83 |
-
box-sizing: border-box;
|
84 |
-
font-weight: bold;
|
85 |
-
}
|
86 |
-
|
87 |
-
.quads-button-primary {
|
88 |
-
background: #0085ba;
|
89 |
-
border-color: #0073aa #006799 #006799;
|
90 |
-
-webkit-box-shadow: 0 1px 0 #006799;
|
91 |
-
box-shadow: 0 1px 0 #006799;
|
92 |
-
color: #fff;
|
93 |
-
text-decoration: none;
|
94 |
-
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
95 |
-
}
|
96 |
-
|
97 |
-
.quads-notice-dismiss {
|
98 |
-
display: inline-block;
|
99 |
-
position: relative;
|
100 |
-
top: 0;
|
101 |
-
right: 1px;
|
102 |
-
border: none;
|
103 |
-
margin: 0;
|
104 |
-
padding: 0px;
|
105 |
-
background: 0 0;
|
106 |
-
color: #72777c;
|
107 |
-
cursor: pointer;
|
108 |
-
}
|
109 |
-
|
110 |
-
.quads-notice-dismiss:before{
|
111 |
-
display: inline-block;
|
112 |
-
background: 0 0;
|
113 |
-
color: #72777c;
|
114 |
-
content: "\f153";
|
115 |
-
font: 400 16px/20px dashicons;
|
116 |
-
speak: none;
|
117 |
-
height: 20px;
|
118 |
-
text-align: center;
|
119 |
-
width: 20px;
|
120 |
-
-webkit-font-smoothing: antialiased;
|
121 |
-
}
|
1 |
+
/**
|
2 |
+
* QUADS Admin All CSS
|
3 |
+
*
|
4 |
+
* @package QUADS
|
5 |
+
* @subpackage Admin CSS
|
6 |
+
* @copyright Copyright (c) 2017, René Hermenau
|
7 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
@media (max-width:506px){
|
12 |
+
.quads-banner-columns {
|
13 |
+
display: block !important;
|
14 |
+
}
|
15 |
+
.quads-banner-sidebar-second{
|
16 |
+
width: 100% !important;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
@media (max-width:780px){
|
20 |
+
.quads-banner-wrapper{
|
21 |
+
margin-right:12px !important;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
.quads-banner-wrapper{
|
26 |
+
display: flex;
|
27 |
+
flex-direction: column;
|
28 |
+
clear:both;
|
29 |
+
background: #fff;
|
30 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
31 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
32 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
33 |
+
margin: 5px 5px 2px;
|
34 |
+
margin-right:20px;
|
35 |
+
padding: 1px 12px;
|
36 |
+
}
|
37 |
+
.quads-banner-content {
|
38 |
+
display: flex;
|
39 |
+
flex: 1;
|
40 |
+
color: #000;
|
41 |
+
}
|
42 |
+
.quads-banner-columns{
|
43 |
+
display: flex;
|
44 |
+
flex:1;
|
45 |
+
-ms-flex-align: center;
|
46 |
+
-webkit-align-items: center;
|
47 |
+
-webkit-box-align: center;
|
48 |
+
|
49 |
+
align-items: center;
|
50 |
+
}
|
51 |
+
.quads-banner-main{
|
52 |
+
flex: 1;
|
53 |
+
order: 2;
|
54 |
+
}
|
55 |
+
.quads-banner-sidebar-first{
|
56 |
+
min-width: 160px;
|
57 |
+
width: 13%;
|
58 |
+
order: 1;
|
59 |
+
}
|
60 |
+
.quads-banner-sidebar-second{
|
61 |
+
width: 19%;
|
62 |
+
order: 3;
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
.quads-button-primary {
|
67 |
+
display: inline-block;
|
68 |
+
text-decoration: none;
|
69 |
+
font-size: 16px;
|
70 |
+
line-height: 32px;
|
71 |
+
height: 36px;
|
72 |
+
margin: 0;
|
73 |
+
padding: 0 13px 1px;
|
74 |
+
cursor: pointer;
|
75 |
+
border-width: 1px;
|
76 |
+
border-style: solid;
|
77 |
+
-webkit-appearance: none;
|
78 |
+
-webkit-border-radius: 3px;
|
79 |
+
border-radius: 3px;
|
80 |
+
white-space: nowrap;
|
81 |
+
-webkit-box-sizing: border-box;
|
82 |
+
-moz-box-sizing: border-box;
|
83 |
+
box-sizing: border-box;
|
84 |
+
font-weight: bold;
|
85 |
+
}
|
86 |
+
|
87 |
+
.quads-button-primary {
|
88 |
+
background: #0085ba;
|
89 |
+
border-color: #0073aa #006799 #006799;
|
90 |
+
-webkit-box-shadow: 0 1px 0 #006799;
|
91 |
+
box-shadow: 0 1px 0 #006799;
|
92 |
+
color: #fff;
|
93 |
+
text-decoration: none;
|
94 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
95 |
+
}
|
96 |
+
|
97 |
+
.quads-notice-dismiss {
|
98 |
+
display: inline-block;
|
99 |
+
position: relative;
|
100 |
+
top: 0;
|
101 |
+
right: 1px;
|
102 |
+
border: none;
|
103 |
+
margin: 0;
|
104 |
+
padding: 0px;
|
105 |
+
background: 0 0;
|
106 |
+
color: #72777c;
|
107 |
+
cursor: pointer;
|
108 |
+
}
|
109 |
+
|
110 |
+
.quads-notice-dismiss:before{
|
111 |
+
display: inline-block;
|
112 |
+
background: 0 0;
|
113 |
+
color: #72777c;
|
114 |
+
content: "\f153";
|
115 |
+
font: 400 16px/20px dashicons;
|
116 |
+
speak: none;
|
117 |
+
height: 20px;
|
118 |
+
text-align: center;
|
119 |
+
width: 20px;
|
120 |
+
-webkit-font-smoothing: antialiased;
|
121 |
+
}
|
assets/css/quads-admin.css
CHANGED
@@ -1,1205 +1,1205 @@
|
|
1 |
-
/**
|
2 |
-
* QUADS Admin CSS
|
3 |
-
*
|
4 |
-
* @package QUADS
|
5 |
-
* @subpackage Admin CSS
|
6 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
*/
|
9 |
-
|
10 |
-
.quads-share-button-container{
|
11 |
-
margin: 5px 0;
|
12 |
-
}
|
13 |
-
|
14 |
-
.quads-share-button-container p{
|
15 |
-
margin:0px 0 10px 0;
|
16 |
-
}
|
17 |
-
|
18 |
-
.quads-share-button {
|
19 |
-
display: inline-block;
|
20 |
-
}
|
21 |
-
|
22 |
-
.quads-share-button a{
|
23 |
-
text-decoration:none;
|
24 |
-
}
|
25 |
-
|
26 |
-
.quads-share-button .quads-share {
|
27 |
-
font-family:sans-serif;
|
28 |
-
font-weight:bold;
|
29 |
-
text-decoration:none;
|
30 |
-
text-align:center;
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
.quads-share-button .quads-share {
|
35 |
-
-webkit-border-radius:2px;
|
36 |
-
-moz-border-radius:2px;
|
37 |
-
border-radius:2px;
|
38 |
-
color:#FFF;
|
39 |
-
display:inline;
|
40 |
-
font-size:16px;
|
41 |
-
width:40px;
|
42 |
-
padding:4px 8px;
|
43 |
-
}
|
44 |
-
|
45 |
-
.quads-share-button-twitter .quads-share {
|
46 |
-
background-color:#00ABF0;
|
47 |
-
}
|
48 |
-
|
49 |
-
.quads-share-button-facebook .quads-share {
|
50 |
-
background-color:#3b5998;
|
51 |
-
}
|
52 |
-
|
53 |
-
.quads-share-button-googleplus .quads-share {
|
54 |
-
background-color:#F53424;
|
55 |
-
}
|
56 |
-
|
57 |
-
.quads-share-button-twitter .share:active,.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active {
|
58 |
-
background-color:#353535;
|
59 |
-
}
|
60 |
-
|
61 |
-
/* Responsive */
|
62 |
-
@media (max-width: 925px) {
|
63 |
-
.quads-share-button .quads-share{
|
64 |
-
font-size:15px;
|
65 |
-
padding: 8px 16px; /* Double the padding */
|
66 |
-
}
|
67 |
-
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
/* Input forms */
|
72 |
-
/*.quads-textarea{
|
73 |
-
font-size:11px;
|
74 |
-
}*/
|
75 |
-
.quads-richeditor{
|
76 |
-
font-size:11px;
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
/* =Add Ons Styles
|
82 |
-
-------------------------------------------------------------- */
|
83 |
-
#quads-add-ons h2 { margin: 0 0 15px; }
|
84 |
-
#quads-add-ons .quadsshare-addons { float: left; margin: 0 15px 15px 0; background: #f0f0f0; border: 1px solid #ccc; width: 320px; padding: 8px; height: 315px; position: relative; }
|
85 |
-
#quads-add-ons .quadsshare-addons h3 { margin: 0 0 8px; font-size: 13px; }
|
86 |
-
#quads-add-ons .quadsshare-addons .button-secondary { position: absolute; bottom: 8px; left: 8px; }
|
87 |
-
/*#quads-add-ons .quadsshare-addons { clear:both; width:100%; }*/
|
88 |
-
#quads-add-ons .quadsshare-addons .third-party { display: none; }
|
89 |
-
|
90 |
-
|
91 |
-
/* System Info page styles
|
92 |
-
-------------------------------------------------------------- */
|
93 |
-
#system-info-textarea { width: 580px; height: 400px; font-family: Menlo, Monaco, monospace; background: none; white-space: pre; overflow: auto; display: block; }
|
94 |
-
|
95 |
-
|
96 |
-
/* General styles
|
97 |
-
-------------------------------------------------------------- */
|
98 |
-
.quads-select-chosen { width: 300px; }
|
99 |
-
|
100 |
-
input.large-text, textarea.large-text {
|
101 |
-
max-width: 600px;
|
102 |
-
}
|
103 |
-
input.medium-text, textarea.medium-text {
|
104 |
-
min-width: 190px;
|
105 |
-
}
|
106 |
-
|
107 |
-
/* CSS for Tabs */
|
108 |
-
|
109 |
-
#quads_tab_container ul {
|
110 |
-
/*height: 200px;*/
|
111 |
-
list-style: none;
|
112 |
-
margin: 0;
|
113 |
-
padding: 0;
|
114 |
-
background: #fff;
|
115 |
-
float: left;
|
116 |
-
padding-top: 0px;
|
117 |
-
/*list-style-type: square;*/
|
118 |
-
}
|
119 |
-
|
120 |
-
#quads_tab_container ul li:first-child.selected-tab {
|
121 |
-
border-top: none;
|
122 |
-
}
|
123 |
-
|
124 |
-
#quads_tab_container ul li a.selected-tab {
|
125 |
-
font-weight: bold;
|
126 |
-
text-decoration: none;
|
127 |
-
}
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
#quads_tab_container .quads-row{
|
132 |
-
padding-top:12px;
|
133 |
-
padding-bottom:12px;
|
134 |
-
}
|
135 |
-
|
136 |
-
|
137 |
-
#quads_tab_container .quads-row label strong, #tab_container .quads-row strong {
|
138 |
-
font-weight: bold;
|
139 |
-
}
|
140 |
-
|
141 |
-
.quads-tabs a {
|
142 |
-
padding:5px;
|
143 |
-
color:#a1a1a1;
|
144 |
-
text-transform: uppercase;
|
145 |
-
}
|
146 |
-
.quads-tabs a strong {
|
147 |
-
font-weight: 700;
|
148 |
-
}
|
149 |
-
|
150 |
-
li.quads-tabs {
|
151 |
-
float:left;
|
152 |
-
margin-left:0px;
|
153 |
-
background-color: #e5e5e5;
|
154 |
-
}
|
155 |
-
|
156 |
-
/*@media only screen and (min-width:400px) {
|
157 |
-
li.quads-tabs {
|
158 |
-
float:left;
|
159 |
-
margin-left:14px;
|
160 |
-
}
|
161 |
-
}*/
|
162 |
-
|
163 |
-
#quads_tab_container > ul > li.quads-tabs.active {
|
164 |
-
background-color:#fff;
|
165 |
-
}
|
166 |
-
#quads_tab_container > ul > li.quads-tabs.active a {
|
167 |
-
color: #83c11f;
|
168 |
-
}
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
/* Layout of admin table and rows
|
173 |
-
*/
|
174 |
-
|
175 |
-
|
176 |
-
#quads_tab_container .quads-panel-container {
|
177 |
-
background: #FFF;
|
178 |
-
padding:20px;
|
179 |
-
overflow:auto;
|
180 |
-
text-align:left;
|
181 |
-
margin-bottom:10px;
|
182 |
-
max-width: 640px;
|
183 |
-
float: left;
|
184 |
-
clear:both;
|
185 |
-
}
|
186 |
-
|
187 |
-
.form-table{
|
188 |
-
margin-top:-20px;
|
189 |
-
}
|
190 |
-
|
191 |
-
#quads_tab_container .form-table th {
|
192 |
-
vertical-align: top;
|
193 |
-
text-align: left;
|
194 |
-
padding: 20px 10px 20px 0;
|
195 |
-
width: 200px;
|
196 |
-
line-height: 1.3;
|
197 |
-
font-weight: bold;
|
198 |
-
font-size: 14px;
|
199 |
-
color:#484848;
|
200 |
-
width: 30%;
|
201 |
-
}
|
202 |
-
|
203 |
-
/*#quads_tab_container .form-table tr{
|
204 |
-
padding:0px;
|
205 |
-
}*/
|
206 |
-
|
207 |
-
#quads_tab_container .form-table tr {
|
208 |
-
border-bottom: 1px solid #E7E7E7;
|
209 |
-
}
|
210 |
-
|
211 |
-
#quads_tab_container span.description{
|
212 |
-
display: block;
|
213 |
-
font-weight: 400;
|
214 |
-
font-style: normal;
|
215 |
-
font-size: 13px;
|
216 |
-
margin-top: 7px;
|
217 |
-
color:#484848;
|
218 |
-
}
|
219 |
-
|
220 |
-
#quads_tab_container .col-title{
|
221 |
-
font-size: 18px;
|
222 |
-
color:#484848;
|
223 |
-
}
|
224 |
-
|
225 |
-
@media only screen and (max-width:680px) {
|
226 |
-
#quads_tab_container ul {
|
227 |
-
float:none;
|
228 |
-
background: #fff;
|
229 |
-
}
|
230 |
-
#quads_tab_container .form-table tr > th {
|
231 |
-
width:100%;
|
232 |
-
}
|
233 |
-
#quads_tab_container span.description{
|
234 |
-
font-size: 14px;
|
235 |
-
}
|
236 |
-
#quads_tab_container .form-table tr > th, #tab_container .form-table tr > td {
|
237 |
-
padding:10px;
|
238 |
-
}
|
239 |
-
#quads_tab_container .quads-tabs a{
|
240 |
-
text-align: left;
|
241 |
-
}
|
242 |
-
#quads_tab_container li.quads-tabs {
|
243 |
-
float:none;
|
244 |
-
margin-left:0px;
|
245 |
-
}
|
246 |
-
}
|
247 |
-
|
248 |
-
#quads_tab_container ul li.quads-tabs {
|
249 |
-
margin-bottom:0px;
|
250 |
-
}
|
251 |
-
|
252 |
-
#quads_tab_container ul li.quads-tabs a {
|
253 |
-
display: block;
|
254 |
-
padding:10px 10px 10px 10px;
|
255 |
-
text-decoration: none;
|
256 |
-
font-weight: bold;
|
257 |
-
}
|
258 |
-
#quads_tab_container ul li.quads-tabs a:hover {
|
259 |
-
color:#383838;
|
260 |
-
}
|
261 |
-
#quads_tab_container ul li.quads-tabs a.active {
|
262 |
-
text-decoration: underline;
|
263 |
-
}
|
264 |
-
|
265 |
-
|
266 |
-
#quads_tab_container table tbody tr:nth-child(1) > th > div {
|
267 |
-
font-size: 20px;
|
268 |
-
}
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
/* End layout of admin table and rows
|
273 |
-
*/
|
274 |
-
#quadstabcontainer > .quadstabs {
|
275 |
-
background-color: #ffffff;
|
276 |
-
}
|
277 |
-
|
278 |
-
#quadstabcontainer ul .active {
|
279 |
-
background-color: #00adef;
|
280 |
-
color: white;
|
281 |
-
border-bottom-color: #0098D2;
|
282 |
-
}
|
283 |
-
|
284 |
-
#quadstabcontainer ul .active:hover {
|
285 |
-
background-color: #00A4E2;
|
286 |
-
color: white;
|
287 |
-
border-bottom-color: #0098D2;
|
288 |
-
}
|
289 |
-
|
290 |
-
#quadstabcontainer ul li a {
|
291 |
-
padding: 10px 14px 10px 14px;
|
292 |
-
background-color: #f3f3f3
|
293 |
-
|
294 |
-
}
|
295 |
-
|
296 |
-
#quadstabcontainer .quadstab-container {
|
297 |
-
border: 0px solid #ececec;
|
298 |
-
}
|
299 |
-
|
300 |
-
.quads-quote-docs {
|
301 |
-
font-family:Courier New,Courier,Fixed;
|
302 |
-
color:#050;
|
303 |
-
}
|
304 |
-
|
305 |
-
.quads-desc{
|
306 |
-
display:block;
|
307 |
-
font-style:italic;
|
308 |
-
padding-top:10px;
|
309 |
-
}
|
310 |
-
|
311 |
-
.quads-postbox {
|
312 |
-
padding:10px;
|
313 |
-
position: relative;
|
314 |
-
min-width: 255px;
|
315 |
-
border: 1px solid #e5e5e5;
|
316 |
-
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
317 |
-
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
318 |
-
background: #fff;
|
319 |
-
margin-bottom:20px;
|
320 |
-
}
|
321 |
-
|
322 |
-
.nav-tab-active{
|
323 |
-
background-color: white;
|
324 |
-
border-bottom:0px;
|
325 |
-
}
|
326 |
-
|
327 |
-
/*.wp-admin .quads-align-input{
|
328 |
-
padding: 0px;
|
329 |
-
line-height: 23px;
|
330 |
-
height: 24px;
|
331 |
-
vertical-align: top;
|
332 |
-
}*/
|
333 |
-
|
334 |
-
|
335 |
-
#quads-add-ons {
|
336 |
-
padding: 20px;
|
337 |
-
}
|
338 |
-
.quads-toggle {
|
339 |
-
position: absolute;
|
340 |
-
right: 0px;
|
341 |
-
top: 0px;
|
342 |
-
}
|
343 |
-
|
344 |
-
.quads-box-close .quads-close-open-icon {
|
345 |
-
background-position: 0px -38px;
|
346 |
-
}
|
347 |
-
|
348 |
-
.quads-close-open-icon {
|
349 |
-
width: 38px;
|
350 |
-
height: 38px;
|
351 |
-
background: #f4f4f4 url("../images/arrow-close.png") repeat-y;
|
352 |
-
background-position: 0px 0px;
|
353 |
-
}
|
354 |
-
.quads-ad-toggle-header {
|
355 |
-
position: relative;
|
356 |
-
background-color: #f4f4f4;
|
357 |
-
margin-bottom: 2px;
|
358 |
-
padding: 10px 10px 10px 15px;
|
359 |
-
-moz-user-select: -moz-none;
|
360 |
-
-khtml-user-select: none;
|
361 |
-
-webkit-user-select: none;
|
362 |
-
-o-user-select: none;
|
363 |
-
user-select: none;
|
364 |
-
cursor: pointer !important;
|
365 |
-
min-height: 20px;
|
366 |
-
}
|
367 |
-
|
368 |
-
.quads-ad-toggle-container{
|
369 |
-
padding:20px;
|
370 |
-
background-color: #f4f4f4;
|
371 |
-
}
|
372 |
-
|
373 |
-
.quads-toogle-title{
|
374 |
-
font-size:16px;
|
375 |
-
font-weight: bold;
|
376 |
-
}
|
377 |
-
|
378 |
-
.quads-advanced-description label{
|
379 |
-
float:left;
|
380 |
-
width:215px;
|
381 |
-
font-size: 12px;
|
382 |
-
font-weight: 600;
|
383 |
-
text-transform: uppercase;
|
384 |
-
}
|
385 |
-
|
386 |
-
.quads-advanced-ad-box{
|
387 |
-
clear: both;
|
388 |
-
margin-top:20px;
|
389 |
-
margin-bottom:20px;
|
390 |
-
}
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
.adsense-size-title {
|
395 |
-
margin-right: 0px;
|
396 |
-
float: left;
|
397 |
-
line-height: 32px;
|
398 |
-
margin-left: 14px;
|
399 |
-
min-width: 100px;
|
400 |
-
font-weight: 600;
|
401 |
-
font-size: 12px;
|
402 |
-
text-transform: uppercase;
|
403 |
-
}
|
404 |
-
|
405 |
-
.quads-select-style-overwrite {
|
406 |
-
border: 1px solid #e6e6e6;
|
407 |
-
width: 150px;
|
408 |
-
overflow: hidden;
|
409 |
-
background: #ffffff url("../images/box_arrow.png") repeat-y 120px 0px;
|
410 |
-
margin: 0px 0px 5px 0px;
|
411 |
-
}
|
412 |
-
.quads-select-style-overwrite select {
|
413 |
-
width:150px;
|
414 |
-
}
|
415 |
-
|
416 |
-
/*.quads-select{
|
417 |
-
max-width:100px;
|
418 |
-
}*/
|
419 |
-
|
420 |
-
.quads-size-input {
|
421 |
-
position: relative;
|
422 |
-
top: -1px;
|
423 |
-
width: 110%;
|
424 |
-
border: none;
|
425 |
-
box-shadow: none;
|
426 |
-
background: transparent;
|
427 |
-
background-image: none;
|
428 |
-
-webkit-appearance: none;
|
429 |
-
font-family: 'Open Sans', arial, sans-serif;
|
430 |
-
color: #555555;
|
431 |
-
font-size: 12px;
|
432 |
-
/*margin-left:5px;*/
|
433 |
-
}
|
434 |
-
|
435 |
-
.quads-pro-overlay{
|
436 |
-
height: 200px;
|
437 |
-
}
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
.quads-license-error-notice,
|
442 |
-
.quads-license-expires-soon-notice {
|
443 |
-
background-color: #fff;
|
444 |
-
padding: 10px;
|
445 |
-
border-left: 4px solid #7ad03a;
|
446 |
-
overflow: auto;
|
447 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
448 |
-
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
449 |
-
border: 1px solid #ECECEC;
|
450 |
-
border-radius: 3px;
|
451 |
-
}
|
452 |
-
.quads-license-error-notice a {
|
453 |
-
color: #0097df;
|
454 |
-
text-decoration: underline;
|
455 |
-
}
|
456 |
-
.quads-license-error-notice { border-left: 4px solid #dd3d36; }
|
457 |
-
.quads-license-lifetime-notice,
|
458 |
-
.quads-license-expiration-date-notice,
|
459 |
-
.quads-license-null { padding: 0 0 0 0px; }
|
460 |
-
.quads-license-lifetime-notice .quads-license-data p,
|
461 |
-
.quads-license-expiration-date-notice .quads-license-data p { color: #666; font-size: 14px; font-style: italic; margin: 4px 0 0; }
|
462 |
-
|
463 |
-
#quads_settingslicenses_header-nav{
|
464 |
-
display:none;
|
465 |
-
}
|
466 |
-
|
467 |
-
#quads_settingslicenses_header{
|
468 |
-
max-width:640px;
|
469 |
-
}
|
470 |
-
|
471 |
-
#quads_settingslicenses_header .quads-row.th{
|
472 |
-
min-width:250px;
|
473 |
-
}
|
474 |
-
|
475 |
-
.quads-notice{
|
476 |
-
background: #fff;
|
477 |
-
border-left: 4px solid #46b450;
|
478 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
479 |
-
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
480 |
-
margin: 5px 15px 2px;
|
481 |
-
padding: 1px 12px;
|
482 |
-
}
|
483 |
-
|
484 |
-
.quads_admin h2.nav-tab-wrapper{
|
485 |
-
border:0px;
|
486 |
-
}
|
487 |
-
|
488 |
-
.quads_admin .nav-tab{
|
489 |
-
border:0px;
|
490 |
-
text-transform: uppercase;
|
491 |
-
color: #a1a1a1;
|
492 |
-
font-weight: 700;
|
493 |
-
}
|
494 |
-
|
495 |
-
.quads-h1 {
|
496 |
-
font-size: 2.75em;
|
497 |
-
margin-bottom: 1.35rem;
|
498 |
-
font-size: 2.5em;
|
499 |
-
line-height: 3.68rem;
|
500 |
-
letter-spacing: normal;
|
501 |
-
}
|
502 |
-
|
503 |
-
.quads-h2 {
|
504 |
-
margin-top:0px;
|
505 |
-
margin-bottom: 1.2rem;
|
506 |
-
font-size: 30px;
|
507 |
-
line-height: 2.5rem;
|
508 |
-
}
|
509 |
-
|
510 |
-
.quads-heading-pro{
|
511 |
-
color: #83c11f;
|
512 |
-
font-weight: bold;
|
513 |
-
}
|
514 |
-
|
515 |
-
.quads-button.green {
|
516 |
-
display:inline-block;
|
517 |
-
background-color: #83c11f;
|
518 |
-
padding:10px;
|
519 |
-
min-width: 170px;
|
520 |
-
color: white;
|
521 |
-
font-size: 16px;
|
522 |
-
text-decoration: none;
|
523 |
-
text-align:center;
|
524 |
-
margin-top:20px;
|
525 |
-
}
|
526 |
-
|
527 |
-
#quads-add-ons .quads-footer {
|
528 |
-
clear:both;
|
529 |
-
margin-top:20px;
|
530 |
-
font-style: italic;
|
531 |
-
}
|
532 |
-
|
533 |
-
#quads-footer {
|
534 |
-
clear:both;
|
535 |
-
}
|
536 |
-
|
537 |
-
#quads-add-ons li {
|
538 |
-
font-size:18px;
|
539 |
-
line-height: 29px;
|
540 |
-
position: relative;
|
541 |
-
padding-left: 23px;
|
542 |
-
list-style: none!important;
|
543 |
-
}
|
544 |
-
|
545 |
-
#quads-add-ons li:before {
|
546 |
-
width: 1em;
|
547 |
-
height: 100%;
|
548 |
-
background: url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;
|
549 |
-
background-size: contain;
|
550 |
-
content: "";
|
551 |
-
position: absolute;
|
552 |
-
top: 0;
|
553 |
-
left: 0;
|
554 |
-
color: #77b227;
|
555 |
-
}
|
556 |
-
|
557 |
-
.adsense_admin_header {
|
558 |
-
font-size: 14px;
|
559 |
-
font-weight: 500;
|
560 |
-
}
|
561 |
-
|
562 |
-
#quads-adsense-bg-div{
|
563 |
-
position: fixed;
|
564 |
-
top: 0;
|
565 |
-
left: 0;
|
566 |
-
width: 100%;
|
567 |
-
height: 100%;
|
568 |
-
background-color: rgba(0, 0, 0, 0.65);
|
569 |
-
z-index: 250000;
|
570 |
-
}
|
571 |
-
|
572 |
-
#quads-adsense-container {
|
573 |
-
text-align: center;
|
574 |
-
width: 480px;
|
575 |
-
margin: 85px auto 0 auto;
|
576 |
-
background-color: #fff;
|
577 |
-
padding: 2%;
|
578 |
-
border-radius: 2px;
|
579 |
-
}
|
580 |
-
#quads-adsense-container h3{
|
581 |
-
margin-top:0px;
|
582 |
-
}
|
583 |
-
|
584 |
-
#quads-adsense-container textarea{
|
585 |
-
width: 100%;
|
586 |
-
}
|
587 |
-
|
588 |
-
|
589 |
-
.quads-ad-toggle-container textarea{
|
590 |
-
width: 100%;
|
591 |
-
}
|
592 |
-
|
593 |
-
.quads-ad-toggle-container input{
|
594 |
-
margin-top: 7px;
|
595 |
-
margin-bottom:10px;
|
596 |
-
}
|
597 |
-
|
598 |
-
.quads-adsense-code label, input{
|
599 |
-
margin-right:2px;
|
600 |
-
}
|
601 |
-
|
602 |
-
#quads_settings\5b ad2\5d \5b g_data_ad_client\5d {
|
603 |
-
width:200px;
|
604 |
-
}
|
605 |
-
|
606 |
-
.quads-ad-toggle-container label {
|
607 |
-
display: inline-block;
|
608 |
-
margin-right:2px;
|
609 |
-
margin-top:-3px;
|
610 |
-
}
|
611 |
-
|
612 |
-
/*.quads-adsense-code > label:nth-child(1){
|
613 |
-
min-width: 74px;
|
614 |
-
}*/
|
615 |
-
|
616 |
-
.quads_adsense_code .quads-add-adsense {
|
617 |
-
margin:20px;
|
618 |
-
margin-left:0px;
|
619 |
-
margin-right:5px;
|
620 |
-
}
|
621 |
-
|
622 |
-
.quads-label-left {
|
623 |
-
min-width: 71px;
|
624 |
-
}
|
625 |
-
|
626 |
-
#quads-label-Type {
|
627 |
-
min-width: 67px;
|
628 |
-
}
|
629 |
-
|
630 |
-
.quads-medium-size{
|
631 |
-
width: 110px;
|
632 |
-
}
|
633 |
-
|
634 |
-
#quads-msg{
|
635 |
-
display:none;
|
636 |
-
margin: 5px;
|
637 |
-
background-color: #c55c5c;
|
638 |
-
color: white;
|
639 |
-
}
|
640 |
-
|
641 |
-
.quads-success-modal {
|
642 |
-
display: block;
|
643 |
-
position: fixed;
|
644 |
-
top: 45%;
|
645 |
-
left: 25%;
|
646 |
-
width: 200px;
|
647 |
-
height: auto;
|
648 |
-
padding: 5px 20px;
|
649 |
-
z-index:1002;
|
650 |
-
overflow: auto;
|
651 |
-
}
|
652 |
-
.quads-loader {
|
653 |
-
display: block;
|
654 |
-
position: fixed;
|
655 |
-
top: 45%;
|
656 |
-
left: 25%;
|
657 |
-
width: 200px;
|
658 |
-
height: auto;
|
659 |
-
padding: 5px 20px;
|
660 |
-
z-index:1002;
|
661 |
-
overflow: auto;
|
662 |
-
}
|
663 |
-
|
664 |
-
.quads-form-table{
|
665 |
-
width: 100%;
|
666 |
-
}
|
667 |
-
|
668 |
-
.quads-left-box{
|
669 |
-
width:45%;
|
670 |
-
min-height:100px;
|
671 |
-
float:left;
|
672 |
-
line-height: 35px;
|
673 |
-
min-width: 300px;
|
674 |
-
}
|
675 |
-
|
676 |
-
@media screen and (max-width:700px){
|
677 |
-
.adsense-size-title {
|
678 |
-
margin-left: 0px;
|
679 |
-
}
|
680 |
-
.quads-left-box{
|
681 |
-
width:45%;
|
682 |
-
min-height:100px;
|
683 |
-
float:none;
|
684 |
-
line-height: 35px;
|
685 |
-
min-width: 300px;
|
686 |
-
}
|
687 |
-
|
688 |
-
.quads-style img{
|
689 |
-
max-width: 50px;
|
690 |
-
}
|
691 |
-
|
692 |
-
}
|
693 |
-
|
694 |
-
.adsense_admin_header ul li{
|
695 |
-
margin-top:2px;
|
696 |
-
margin-left:20px;
|
697 |
-
list-style-type: square;
|
698 |
-
}
|
699 |
-
|
700 |
-
.quads-helper {
|
701 |
-
border-radius: 50%;
|
702 |
-
border: 2px solid #fff;
|
703 |
-
background-color: #83c11f;
|
704 |
-
width: 15px;
|
705 |
-
height: 15px;
|
706 |
-
display: inline-block;
|
707 |
-
position: relative;
|
708 |
-
top: 4px;
|
709 |
-
margin-top: -4px;
|
710 |
-
cursor: pointer;
|
711 |
-
margin-left: 2px;
|
712 |
-
}
|
713 |
-
|
714 |
-
.quads-helper:after {
|
715 |
-
height: 20px;
|
716 |
-
font-family: sans-serif;
|
717 |
-
content: "?";
|
718 |
-
color: #fff;
|
719 |
-
font-size: 11px;
|
720 |
-
font-weight: bold;
|
721 |
-
left: 4px;
|
722 |
-
position: absolute;
|
723 |
-
margin-top: -10px;
|
724 |
-
}
|
725 |
-
|
726 |
-
.quads-general-helper:after {
|
727 |
-
height: 20px;
|
728 |
-
font-family: sans-serif;
|
729 |
-
content: "?";
|
730 |
-
color: #fff;
|
731 |
-
font-size: 11px;
|
732 |
-
font-weight: bold;
|
733 |
-
left: 4px;
|
734 |
-
position: absolute;
|
735 |
-
margin-top: -2px;
|
736 |
-
}
|
737 |
-
.quads-general-helper {
|
738 |
-
border-radius: 50%;
|
739 |
-
border: 2px solid #fff;
|
740 |
-
background-color: #83c11f;
|
741 |
-
width: 15px;
|
742 |
-
height: 15px;
|
743 |
-
display: inline-block;
|
744 |
-
position: relative;
|
745 |
-
top: 4px;
|
746 |
-
margin-top: -4px;
|
747 |
-
cursor: pointer;
|
748 |
-
margin-left: 2px;
|
749 |
-
}
|
750 |
-
|
751 |
-
.quads-message{
|
752 |
-
display:block;
|
753 |
-
padding: 10px;
|
754 |
-
border: 1px solid #FBFBFB;
|
755 |
-
border-radius: 2px;
|
756 |
-
background-color: #F8F8F8;
|
757 |
-
position: absolute;
|
758 |
-
max-width: 500px;
|
759 |
-
z-index: 9999;
|
760 |
-
display: none;
|
761 |
-
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
762 |
-
font-weight: normal;
|
763 |
-
line-height: 20px;
|
764 |
-
text-transform: none;
|
765 |
-
font-size: 14px;
|
766 |
-
}
|
767 |
-
|
768 |
-
#quads-pro-hover{
|
769 |
-
background-color: #83c11f;
|
770 |
-
padding:20px;
|
771 |
-
min-width: 150px;
|
772 |
-
color:white;
|
773 |
-
display: block;
|
774 |
-
position: relative;
|
775 |
-
margin-top: -100px;
|
776 |
-
margin-left: 50%;
|
777 |
-
}
|
778 |
-
|
779 |
-
#quads-pro-hover-background{
|
780 |
-
width: 100%; height:100%;background:rgba(0,0,0,0.6);
|
781 |
-
}
|
782 |
-
|
783 |
-
#quads-open-toggle{
|
784 |
-
clear: both;
|
785 |
-
float:left;
|
786 |
-
margin-top:10px;
|
787 |
-
}
|
788 |
-
|
789 |
-
#quads_settingsadsense_header input[type="number"].small-text{
|
790 |
-
width: 55px;
|
791 |
-
}
|
792 |
-
|
793 |
-
.quads_adsense_code input.quads-bggrey {
|
794 |
-
background-color: whitesmoke;
|
795 |
-
color: #939393;
|
796 |
-
}
|
797 |
-
|
798 |
-
.quads-amp-code{
|
799 |
-
color: #939393;
|
800 |
-
height: 130px;
|
801 |
-
}
|
802 |
-
|
803 |
-
.quads-chosen-select .chosen-choices li.search-field input{
|
804 |
-
min-height: 25px;
|
805 |
-
}
|
806 |
-
|
807 |
-
|
808 |
-
#quads-validate{
|
809 |
-
display: block;
|
810 |
-
margin-left: 2px;
|
811 |
-
margin-bottom: 20px;
|
812 |
-
font-weight: bold;
|
813 |
-
clear: both;
|
814 |
-
}
|
815 |
-
|
816 |
-
@font-face {
|
817 |
-
font-family: 'quads';
|
818 |
-
src: url('data:application/octet-stream;base64,d09GRgABAAAAAAxYAA8AAAAAFUQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IEkBY21hcAAAAdgAAABQAAABfohD7KljdnQgAAACKAAAABMAAAAgBtX/BGZwZ20AAAI8AAAFkAAAC3CKkZBZZ2FzcAAAB8wAAAAIAAAACAAAABBnbHlmAAAH1AAAAdIAAAJWlz85pGhlYWQAAAmoAAAAMwAAADYNxZM1aGhlYQAACdwAAAAfAAAAJAc6A1BobXR4AAAJ/AAAAAwAAAAMClL//WxvY2EAAAoIAAAACAAAAAgAxAErbWF4cAAAChAAAAAgAAAAIAESDApuYW1lAAAKMAAAAXcAAALNzJ0dH3Bvc3QAAAuoAAAAMwAAAESFVFBUcHJlcAAAC9wAAAB6AAAAhuVBK7x4nGNgZGB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lWKqoocWPprk2odCr7cq4S48excjy13PPYD9axq/fhfp74Oo1UIltOc69GfuJr1/izXfV0E7SNmcu5Vks5tBlypdXC94wTGrPqNhp/z8MACitsoRHxqkIYSNRo65zbaKKFDmnKDMnMPCtCAhcxjYs1d4TZSsq4zzFnlND6zIjJDjx+l0d+TAq4P2YVfbR6GE9IuzOizEv25bC7w6wRKcky3czOfntPseFpbVrDXbsuddaVxPCghuR97NYWNB69k92Koe2iwfef//sB5m6EUQB4nGNgYoAALgbsgJmRiZGZkYWBu6QosThDNzW3oKSSpyCntFg3ObMoOSc1hYEBAI3CCXgAeJxj8N7BcCIoYiMjY1/kBsadHAwcDMkFGxlYnTYxMDJogRibuZgYOSAsPgYwi81pF9MBoDQnkM3utIvBAcJmZnDZqMLYERixwaEjYiNzistGNRBvF0cDAyOLQ0dySARISSQQbOZhYuTR2sH4v3UDS+9GJgYXAAx2I/QAAA==') format('woff'),
|
819 |
-
url('data:application/octet-stream;base64,AAEAAAAPAIAAAwBwR1NVQiCLJXoAAAD8AAAAVE9TLzI+IEkBAAABUAAAAFZjbWFwiEPsqQAAAagAAAF+Y3Z0IAbV/wQAAAksAAAAIGZwZ22KkZBZAAAJTAAAC3BnYXNwAAAAEAAACSQAAAAIZ2x5Zpc/OaQAAAMoAAACVmhlYWQNxZM1AAAFgAAAADZoaGVhBzoDUAAABbgAAAAkaG10eApS//0AAAXcAAAADGxvY2EAxAErAAAF6AAAAAhtYXhwARIMCgAABfAAAAAgbmFtZcydHR8AAAYQAAACzXBvc3SFVFBUAAAI4AAAAERwcmVw5UErvAAAFLwAAACGAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAEDcQGQAAUAAAJ6ArwAAACMAnoCvAAAAeAAMQECAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAQOgA6AEDUv9qAFoD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/LLA2K4ogIDywBCNCijgjIC5GsAIlRlJYIDxZLrErARQrsARDLrArKy2wQCywABawBCWwBCYgLkcjRyNhsAlDKyMgPCAuIzixKwEUKy2wQSyxCAQlQrAAFrAEJbAEJSAuRyNHI2EgsAQjQrAJQysgsGBQWCCwQFFYswIgAyAbswImAxpZQkIjIEewBEOwAmIgsABQWLBAYFlmsAFjYCCwASsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsAJiILAAUFiwQGBZZrABY2GwAiVGYTgjIDwjOBshICBGI0ewASsjYTghWbErARQrLbBCLLA1Ky6xKwEUKy2wQyywNishIyAgPLAEI0IjOLErARQrsARDLrArKy2wRCywABUgR7AAI0KyAAEBFRQTLrAxKi2wRSywABUgR7AAI0KyAAEBFRQTLrAxKi2wRiyxAAEUE7AyKi2wRyywNCotsEgssAAWRSMgLiBGiiNhOLErARQrLbBJLLAII0KwSCstsEossgAAQSstsEsssgABQSstsEwssgEAQSstsE0ssgEBQSstsE4ssgAAQistsE8ssgABQistsFAssgEAQistsFEssgEBQistsFIssgAAPistsFMssgABPistsFQssgEAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKyAAEAKrEABUKzCgIBCCqxAAVCsw4AAQgqsQAGQroCwAABAAkqsQAHQroAQAABAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbMMAgEMKrgB/4WwBI2xAgBEAAA=') format('truetype');
|
820 |
-
}
|
821 |
-
#quads-add-new-ad:before {
|
822 |
-
font-family: 'quads';
|
823 |
-
content: '\e801';
|
824 |
-
text-decoration: none;
|
825 |
-
margin-right:5px;
|
826 |
-
color: #383838;
|
827 |
-
}
|
828 |
-
|
829 |
-
#quads-add-new-ad{
|
830 |
-
margin-left: 3px;
|
831 |
-
margin-top: 5px;
|
832 |
-
display: block;
|
833 |
-
margin-bottom: 20px;
|
834 |
-
text-decoration: none;
|
835 |
-
font-size: 14px;
|
836 |
-
font-weight: 600;
|
837 |
-
color: #383838;
|
838 |
-
}
|
839 |
-
|
840 |
-
#quads-submit-button{
|
841 |
-
z-index: 999999;
|
842 |
-
}
|
843 |
-
|
844 |
-
p.submit{
|
845 |
-
float:left;
|
846 |
-
padding-top:0px;
|
847 |
-
padding-bottom:0px;
|
848 |
-
}
|
849 |
-
|
850 |
-
.quads-delete-ad{
|
851 |
-
clear:both;
|
852 |
-
display:block;
|
853 |
-
//background: url('../images/remove-icon.png');
|
854 |
-
//background-size: 20px 20px;
|
855 |
-
//background-repeat: no-repeat;
|
856 |
-
//height: 20px;
|
857 |
-
//padding-left:30px;
|
858 |
-
margin-right:5px;
|
859 |
-
font-size: 14px;
|
860 |
-
font-weight: 600;
|
861 |
-
text-decoration: none;
|
862 |
-
color: #383838;
|
863 |
-
}
|
864 |
-
.quads-delete-ad:before{
|
865 |
-
font-family: 'quads';
|
866 |
-
content: '\e800';
|
867 |
-
margin-right:5px;
|
868 |
-
color: #383838;
|
869 |
-
}
|
870 |
-
|
871 |
-
#backup-settings-textarea{
|
872 |
-
width: 580px;
|
873 |
-
height: 400px;
|
874 |
-
font-family: Menlo, Monaco, monospace;
|
875 |
-
background: none;
|
876 |
-
white-space: normal;
|
877 |
-
overflow: auto;
|
878 |
-
display: block;
|
879 |
-
}
|
880 |
-
|
881 |
-
@media (max-width:506px){
|
882 |
-
.quads-banner-columns {
|
883 |
-
display: block !important;
|
884 |
-
}
|
885 |
-
.quads-banner-sidebar-second{
|
886 |
-
width: 100% !important;
|
887 |
-
}
|
888 |
-
}
|
889 |
-
@media (max-width:780px){
|
890 |
-
.quads-banner-wrapper{
|
891 |
-
margin-right:12px !important;
|
892 |
-
}
|
893 |
-
}
|
894 |
-
|
895 |
-
.quads-banner-wrapper{
|
896 |
-
display: flex;
|
897 |
-
flex-direction: column;
|
898 |
-
clear:both;
|
899 |
-
background: #fff;
|
900 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
901 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
902 |
-
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
903 |
-
margin: 5px 5px 2px;
|
904 |
-
margin-right:20px;
|
905 |
-
padding: 1px 12px;
|
906 |
-
}
|
907 |
-
.quads-banner-content {
|
908 |
-
display: flex;
|
909 |
-
flex: 1;
|
910 |
-
color: #000;
|
911 |
-
}
|
912 |
-
.quads-banner-columns{
|
913 |
-
display: flex;
|
914 |
-
flex:1;
|
915 |
-
-ms-flex-align: center;
|
916 |
-
-webkit-align-items: center;
|
917 |
-
-webkit-box-align: center;
|
918 |
-
|
919 |
-
align-items: center;
|
920 |
-
}
|
921 |
-
.quads-banner-main{
|
922 |
-
flex: 1;
|
923 |
-
order: 2;
|
924 |
-
}
|
925 |
-
.quads-banner-sidebar-first{
|
926 |
-
min-width: 160px;
|
927 |
-
width: 13%;
|
928 |
-
order: 1;
|
929 |
-
}
|
930 |
-
.quads-banner-sidebar-second{
|
931 |
-
width: 19%;
|
932 |
-
order: 3;
|
933 |
-
}
|
934 |
-
|
935 |
-
|
936 |
-
.quads-button-primary {
|
937 |
-
display: inline-block;
|
938 |
-
text-decoration: none;
|
939 |
-
font-size: 16px;
|
940 |
-
line-height: 32px;
|
941 |
-
height: 36px;
|
942 |
-
margin: 0;
|
943 |
-
padding: 0 13px 1px;
|
944 |
-
cursor: pointer;
|
945 |
-
border-width: 1px;
|
946 |
-
border-style: solid;
|
947 |
-
-webkit-appearance: none;
|
948 |
-
-webkit-border-radius: 3px;
|
949 |
-
border-radius: 3px;
|
950 |
-
white-space: nowrap;
|
951 |
-
-webkit-box-sizing: border-box;
|
952 |
-
-moz-box-sizing: border-box;
|
953 |
-
box-sizing: border-box;
|
954 |
-
font-weight: bold;
|
955 |
-
}
|
956 |
-
|
957 |
-
.quads-button-primary {
|
958 |
-
background: #0085ba;
|
959 |
-
border-color: #0073aa #006799 #006799;
|
960 |
-
-webkit-box-shadow: 0 1px 0 #006799;
|
961 |
-
box-shadow: 0 1px 0 #006799;
|
962 |
-
color: #fff;
|
963 |
-
text-decoration: none;
|
964 |
-
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
965 |
-
}
|
966 |
-
|
967 |
-
.quads-notice-dismiss {
|
968 |
-
display: inline-block;
|
969 |
-
position: relative;
|
970 |
-
top: 0;
|
971 |
-
right: 1px;
|
972 |
-
border: none;
|
973 |
-
margin: 0;
|
974 |
-
padding: 0px;
|
975 |
-
background: 0 0;
|
976 |
-
color: #72777c;
|
977 |
-
cursor: pointer;
|
978 |
-
}
|
979 |
-
|
980 |
-
.quads-notice-dismiss:before{
|
981 |
-
display: inline-block;
|
982 |
-
background: 0 0;
|
983 |
-
color: #72777c;
|
984 |
-
content: "\f153";
|
985 |
-
font: 400 16px/20px dashicons;
|
986 |
-
speak: none;
|
987 |
-
height: 20px;
|
988 |
-
text-align: center;
|
989 |
-
width: 20px;
|
990 |
-
-webkit-font-smoothing: antialiased;
|
991 |
-
}
|
992 |
-
|
993 |
-
.quads-widget-buttons {
|
994 |
-
float:right;
|
995 |
-
}
|
996 |
-
.quads-widget-buttons a{
|
997 |
-
min-width: 80px;text-align: center;font-weight: 600;
|
998 |
-
}
|
999 |
-
|
1000 |
-
#quads-vi-widget ul {
|
1001 |
-
margin: 0;
|
1002 |
-
margin-left:25px;
|
1003 |
-
padding: 0;
|
1004 |
-
background: #fff;
|
1005 |
-
float: none;
|
1006 |
-
padding-top: 0px;
|
1007 |
-
list-style-type: square;
|
1008 |
-
}
|
1009 |
-
|
1010 |
-
#quads-vi-signup-fullscreen{
|
1011 |
-
display:none;
|
1012 |
-
z-index: 999999;
|
1013 |
-
box-sizing:border-box;
|
1014 |
-
-webkit-box-sizing:border-box;
|
1015 |
-
-moz-box-sizing:border-box;
|
1016 |
-
height: 100%;
|
1017 |
-
width: 100%;
|
1018 |
-
position: absolute;
|
1019 |
-
top: 50%;
|
1020 |
-
left: 50%;
|
1021 |
-
transform: translate(-50%, -50%);
|
1022 |
-
background-color:#f0f0f0;
|
1023 |
-
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
#quads-vi-signup-container {
|
1027 |
-
width:99%;
|
1028 |
-
height:99%;
|
1029 |
-
max-width:868px;
|
1030 |
-
max-height:552px;
|
1031 |
-
}
|
1032 |
-
|
1033 |
-
#quads-vi-close{
|
1034 |
-
cursor:pointer;
|
1035 |
-
position: relative;
|
1036 |
-
display: inline-block;
|
1037 |
-
width: 20px;
|
1038 |
-
height: 20px;
|
1039 |
-
overflow: hidden;
|
1040 |
-
float: right;
|
1041 |
-
margin-right: 20px;
|
1042 |
-
margin-top: 20px;
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
#quads-vi-close::before, #quads-vi-close::after {
|
1046 |
-
content: '';
|
1047 |
-
position: absolute;
|
1048 |
-
height: 2px;
|
1049 |
-
width: 100%;
|
1050 |
-
top: 50%;
|
1051 |
-
left: 0;
|
1052 |
-
margin-top: -1px;
|
1053 |
-
background: #7d7d7d;
|
1054 |
-
}
|
1055 |
-
|
1056 |
-
#quads-vi-close::before {
|
1057 |
-
-webkit-transform: rotate(45deg);
|
1058 |
-
-moz-transform: rotate(45deg);
|
1059 |
-
-ms-transform: rotate(45deg);
|
1060 |
-
-o-transform: rotate(45deg);
|
1061 |
-
transform: rotate(45deg);
|
1062 |
-
}
|
1063 |
-
#quads-vi-close::after {
|
1064 |
-
-webkit-transform: rotate(-45deg);
|
1065 |
-
-moz-transform: rotate(-45deg);
|
1066 |
-
-ms-transform: rotate(-45deg);
|
1067 |
-
-o-transform: rotate(-45deg);
|
1068 |
-
transform: rotate(-45deg);
|
1069 |
-
}
|
1070 |
-
|
1071 |
-
|
1072 |
-
#quads-vi-signup-fullscreen iframe{
|
1073 |
-
width:100%;
|
1074 |
-
height:100%;
|
1075 |
-
z-index: 999999;
|
1076 |
-
display: block;
|
1077 |
-
background:#FFF;
|
1078 |
-
border:none;
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
.quads-spinner {
|
1082 |
-
background: url('/wp-admin/images/spinner.gif') no-repeat;
|
1083 |
-
background-size: 16px 16px;
|
1084 |
-
display: none;
|
1085 |
-
float: left;
|
1086 |
-
opacity: .7;
|
1087 |
-
filter: alpha(opacity=70);
|
1088 |
-
width: 160px;
|
1089 |
-
height: 16px;
|
1090 |
-
margin: 5px 5px 0;
|
1091 |
-
clear:both;
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
#quads-vi-revenue-wrapper{
|
1095 |
-
margin-top: 10px;
|
1096 |
-
min-width: 565px;
|
1097 |
-
min-height: 350px;
|
1098 |
-
}
|
1099 |
-
|
1100 |
-
#quads-vi-revenue-sum {
|
1101 |
-
font-weight: bold;
|
1102 |
-
font-size: 36px;
|
1103 |
-
}
|
1104 |
-
|
1105 |
-
#quads-vi-revenue-sum-wrapper{
|
1106 |
-
margin-top: 20px;
|
1107 |
-
line-height: 26px;
|
1108 |
-
}
|
1109 |
-
|
1110 |
-
#quads-vi-customize-player label {
|
1111 |
-
display:inline-block;
|
1112 |
-
width:170px;
|
1113 |
-
color:black;
|
1114 |
-
font-weight: 500;
|
1115 |
-
}
|
1116 |
-
#quads-vi-shortcodes label {
|
1117 |
-
display:inline-block;
|
1118 |
-
width:170px;
|
1119 |
-
}
|
1120 |
-
#quads-vi-save-settings {
|
1121 |
-
margin-top:20px;
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
#quads-vi-welcome ul {
|
1125 |
-
float:none;
|
1126 |
-
list-style: square;
|
1127 |
-
margin-left:25px;
|
1128 |
-
}
|
1129 |
-
|
1130 |
-
.quads-tooltip {
|
1131 |
-
border-radius: 50%;
|
1132 |
-
border: 2px solid #fff;
|
1133 |
-
background-color: #e7db00;
|
1134 |
-
width: 15px;
|
1135 |
-
height: 15px;
|
1136 |
-
display: inline-block;
|
1137 |
-
position: relative;
|
1138 |
-
top: 4px;
|
1139 |
-
margin-top: -4px;
|
1140 |
-
cursor: pointer;
|
1141 |
-
margin-left: 2px;
|
1142 |
-
}
|
1143 |
-
|
1144 |
-
.quads-tooltip:after {
|
1145 |
-
height: 20px;
|
1146 |
-
font-family: sans-serif;
|
1147 |
-
content: "?";
|
1148 |
-
color: #fff;
|
1149 |
-
font-size: 11px;
|
1150 |
-
font-weight: 700;
|
1151 |
-
left: 4px;
|
1152 |
-
top:-2px;
|
1153 |
-
position: absolute;
|
1154 |
-
}
|
1155 |
-
|
1156 |
-
.quads-tooltip-message {
|
1157 |
-
padding: 10px;
|
1158 |
-
border: 1px solid #FBFBFB;
|
1159 |
-
border-radius: 2px;
|
1160 |
-
background-color: #F8F8F8;
|
1161 |
-
position: absolute;
|
1162 |
-
max-width: 500px;
|
1163 |
-
z-index: 9999;
|
1164 |
-
display: none;
|
1165 |
-
box-shadow: 0 0 5px rgba(0,0,0,.2);
|
1166 |
-
font-weight: 400;
|
1167 |
-
}
|
1168 |
-
|
1169 |
-
#quads-vi-layout label{
|
1170 |
-
width: 100px;
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
#quads_vi_ads-ads-1-align-left-label{
|
1174 |
-
content: url('../images/align_left.png');
|
1175 |
-
}
|
1176 |
-
#quads_vi_ads-ads-1-align-right-label{
|
1177 |
-
content: url('../images/align_right.png');
|
1178 |
-
}
|
1179 |
-
#quads_vi_ads-ads-1-align-middle-label{
|
1180 |
-
content: url('../images/align_middle.png');
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
/*.quads-vi-welcome-white {
|
1184 |
-
text-decoration: underline;
|
1185 |
-
border-bottom:3px solid yellow;
|
1186 |
-
font-weight: bold;
|
1187 |
-
color:black;
|
1188 |
-
}
|
1189 |
-
.quads-vi-welcome-black {
|
1190 |
-
text-decoration: underline;
|
1191 |
-
border-bottom:3px solid yellow;
|
1192 |
-
font-weight: bold;
|
1193 |
-
color:white;
|
1194 |
-
}*/
|
1195 |
-
|
1196 |
-
#quads_vi_automatic_integration select{
|
1197 |
-
min-width: 180px;
|
1198 |
-
}
|
1199 |
-
|
1200 |
-
#quads_vi_ads\[ads\]\[1\]\[marginLeft\],
|
1201 |
-
#quads_vi_ads\[ads\]\[1\]\[marginTop\],
|
1202 |
-
#quads_vi_ads\[ads\]\[1\]\[marginRight\],
|
1203 |
-
#quads_vi_ads\[ads\]\[1\]\[marginBottom\]{
|
1204 |
-
width: 60px;
|
1205 |
Â
}
|
1 |
+
/**
|
2 |
+
* QUADS Admin CSS
|
3 |
+
*
|
4 |
+
* @package QUADS
|
5 |
+
* @subpackage Admin CSS
|
6 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
7 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
+
*/
|
9 |
+
|
10 |
+
.quads-share-button-container{
|
11 |
+
margin: 5px 0;
|
12 |
+
}
|
13 |
+
|
14 |
+
.quads-share-button-container p{
|
15 |
+
margin:0px 0 10px 0;
|
16 |
+
}
|
17 |
+
|
18 |
+
.quads-share-button {
|
19 |
+
display: inline-block;
|
20 |
+
}
|
21 |
+
|
22 |
+
.quads-share-button a{
|
23 |
+
text-decoration:none;
|
24 |
+
}
|
25 |
+
|
26 |
+
.quads-share-button .quads-share {
|
27 |
+
font-family:sans-serif;
|
28 |
+
font-weight:bold;
|
29 |
+
text-decoration:none;
|
30 |
+
text-align:center;
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
.quads-share-button .quads-share {
|
35 |
+
-webkit-border-radius:2px;
|
36 |
+
-moz-border-radius:2px;
|
37 |
+
border-radius:2px;
|
38 |
+
color:#FFF;
|
39 |
+
display:inline;
|
40 |
+
font-size:16px;
|
41 |
+
width:40px;
|
42 |
+
padding:4px 8px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.quads-share-button-twitter .quads-share {
|
46 |
+
background-color:#00ABF0;
|
47 |
+
}
|
48 |
+
|
49 |
+
.quads-share-button-facebook .quads-share {
|
50 |
+
background-color:#3b5998;
|
51 |
+
}
|
52 |
+
|
53 |
+
.quads-share-button-googleplus .quads-share {
|
54 |
+
background-color:#F53424;
|
55 |
+
}
|
56 |
+
|
57 |
+
.quads-share-button-twitter .share:active,.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active {
|
58 |
+
background-color:#353535;
|
59 |
+
}
|
60 |
+
|
61 |
+
/* Responsive */
|
62 |
+
@media (max-width: 925px) {
|
63 |
+
.quads-share-button .quads-share{
|
64 |
+
font-size:15px;
|
65 |
+
padding: 8px 16px; /* Double the padding */
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
/* Input forms */
|
72 |
+
/*.quads-textarea{
|
73 |
+
font-size:11px;
|
74 |
+
}*/
|
75 |
+
.quads-richeditor{
|
76 |
+
font-size:11px;
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
/* =Add Ons Styles
|
82 |
+
-------------------------------------------------------------- */
|
83 |
+
#quads-add-ons h2 { margin: 0 0 15px; }
|
84 |
+
#quads-add-ons .quadsshare-addons { float: left; margin: 0 15px 15px 0; background: #f0f0f0; border: 1px solid #ccc; width: 320px; padding: 8px; height: 315px; position: relative; }
|
85 |
+
#quads-add-ons .quadsshare-addons h3 { margin: 0 0 8px; font-size: 13px; }
|
86 |
+
#quads-add-ons .quadsshare-addons .button-secondary { position: absolute; bottom: 8px; left: 8px; }
|
87 |
+
/*#quads-add-ons .quadsshare-addons { clear:both; width:100%; }*/
|
88 |
+
#quads-add-ons .quadsshare-addons .third-party { display: none; }
|
89 |
+
|
90 |
+
|
91 |
+
/* System Info page styles
|
92 |
+
-------------------------------------------------------------- */
|
93 |
+
#system-info-textarea { width: 580px; height: 400px; font-family: Menlo, Monaco, monospace; background: none; white-space: pre; overflow: auto; display: block; }
|
94 |
+
|
95 |
+
|
96 |
+
/* General styles
|
97 |
+
-------------------------------------------------------------- */
|
98 |
+
.quads-select-chosen { width: 300px; }
|
99 |
+
|
100 |
+
input.large-text, textarea.large-text {
|
101 |
+
max-width: 600px;
|
102 |
+
}
|
103 |
+
input.medium-text, textarea.medium-text {
|
104 |
+
min-width: 190px;
|
105 |
+
}
|
106 |
+
|
107 |
+
/* CSS for Tabs */
|
108 |
+
|
109 |
+
#quads_tab_container ul {
|
110 |
+
/*height: 200px;*/
|
111 |
+
list-style: none;
|
112 |
+
margin: 0;
|
113 |
+
padding: 0;
|
114 |
+
background: #fff;
|
115 |
+
float: left;
|
116 |
+
padding-top: 0px;
|
117 |
+
/*list-style-type: square;*/
|
118 |
+
}
|
119 |
+
|
120 |
+
#quads_tab_container ul li:first-child.selected-tab {
|
121 |
+
border-top: none;
|
122 |
+
}
|
123 |
+
|
124 |
+
#quads_tab_container ul li a.selected-tab {
|
125 |
+
font-weight: bold;
|
126 |
+
text-decoration: none;
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
#quads_tab_container .quads-row{
|
132 |
+
padding-top:12px;
|
133 |
+
padding-bottom:12px;
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
+
#quads_tab_container .quads-row label strong, #tab_container .quads-row strong {
|
138 |
+
font-weight: bold;
|
139 |
+
}
|
140 |
+
|
141 |
+
.quads-tabs a {
|
142 |
+
padding:5px;
|
143 |
+
color:#a1a1a1;
|
144 |
+
text-transform: uppercase;
|
145 |
+
}
|
146 |
+
.quads-tabs a strong {
|
147 |
+
font-weight: 700;
|
148 |
+
}
|
149 |
+
|
150 |
+
li.quads-tabs {
|
151 |
+
float:left;
|
152 |
+
margin-left:0px;
|
153 |
+
background-color: #e5e5e5;
|
154 |
+
}
|
155 |
+
|
156 |
+
/*@media only screen and (min-width:400px) {
|
157 |
+
li.quads-tabs {
|
158 |
+
float:left;
|
159 |
+
margin-left:14px;
|
160 |
+
}
|
161 |
+
}*/
|
162 |
+
|
163 |
+
#quads_tab_container > ul > li.quads-tabs.active {
|
164 |
+
background-color:#fff;
|
165 |
+
}
|
166 |
+
#quads_tab_container > ul > li.quads-tabs.active a {
|
167 |
+
color: #83c11f;
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
|
172 |
+
/* Layout of admin table and rows
|
173 |
+
*/
|
174 |
+
|
175 |
+
|
176 |
+
#quads_tab_container .quads-panel-container {
|
177 |
+
background: #FFF;
|
178 |
+
padding:20px;
|
179 |
+
overflow:auto;
|
180 |
+
text-align:left;
|
181 |
+
margin-bottom:10px;
|
182 |
+
max-width: 640px;
|
183 |
+
float: left;
|
184 |
+
clear:both;
|
185 |
+
}
|
186 |
+
|
187 |
+
.form-table{
|
188 |
+
margin-top:-20px;
|
189 |
+
}
|
190 |
+
|
191 |
+
#quads_tab_container .form-table th {
|
192 |
+
vertical-align: top;
|
193 |
+
text-align: left;
|
194 |
+
padding: 20px 10px 20px 0;
|
195 |
+
width: 200px;
|
196 |
+
line-height: 1.3;
|
197 |
+
font-weight: bold;
|
198 |
+
font-size: 14px;
|
199 |
+
color:#484848;
|
200 |
+
width: 30%;
|
201 |
+
}
|
202 |
+
|
203 |
+
/*#quads_tab_container .form-table tr{
|
204 |
+
padding:0px;
|
205 |
+
}*/
|
206 |
+
|
207 |
+
#quads_tab_container .form-table tr {
|
208 |
+
border-bottom: 1px solid #E7E7E7;
|
209 |
+
}
|
210 |
+
|
211 |
+
#quads_tab_container span.description{
|
212 |
+
display: block;
|
213 |
+
font-weight: 400;
|
214 |
+
font-style: normal;
|
215 |
+
font-size: 13px;
|
216 |
+
margin-top: 7px;
|
217 |
+
color:#484848;
|
218 |
+
}
|
219 |
+
|
220 |
+
#quads_tab_container .col-title{
|
221 |
+
font-size: 18px;
|
222 |
+
color:#484848;
|
223 |
+
}
|
224 |
+
|
225 |
+
@media only screen and (max-width:680px) {
|
226 |
+
#quads_tab_container ul {
|
227 |
+
float:none;
|
228 |
+
background: #fff;
|
229 |
+
}
|
230 |
+
#quads_tab_container .form-table tr > th {
|
231 |
+
width:100%;
|
232 |
+
}
|
233 |
+
#quads_tab_container span.description{
|
234 |
+
font-size: 14px;
|
235 |
+
}
|
236 |
+
#quads_tab_container .form-table tr > th, #tab_container .form-table tr > td {
|
237 |
+
padding:10px;
|
238 |
+
}
|
239 |
+
#quads_tab_container .quads-tabs a{
|
240 |
+
text-align: left;
|
241 |
+
}
|
242 |
+
#quads_tab_container li.quads-tabs {
|
243 |
+
float:none;
|
244 |
+
margin-left:0px;
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
#quads_tab_container ul li.quads-tabs {
|
249 |
+
margin-bottom:0px;
|
250 |
+
}
|
251 |
+
|
252 |
+
#quads_tab_container ul li.quads-tabs a {
|
253 |
+
display: block;
|
254 |
+
padding:10px 10px 10px 10px;
|
255 |
+
text-decoration: none;
|
256 |
+
font-weight: bold;
|
257 |
+
}
|
258 |
+
#quads_tab_container ul li.quads-tabs a:hover {
|
259 |
+
color:#383838;
|
260 |
+
}
|
261 |
+
#quads_tab_container ul li.quads-tabs a.active {
|
262 |
+
text-decoration: underline;
|
263 |
+
}
|
264 |
+
|
265 |
+
|
266 |
+
#quads_tab_container table tbody tr:nth-child(1) > th > div {
|
267 |
+
font-size: 20px;
|
268 |
+
}
|
269 |
+
|
270 |
+
|
271 |
+
|
272 |
+
/* End layout of admin table and rows
|
273 |
+
*/
|
274 |
+
#quadstabcontainer > .quadstabs {
|
275 |
+
background-color: #ffffff;
|
276 |
+
}
|
277 |
+
|
278 |
+
#quadstabcontainer ul .active {
|
279 |
+
background-color: #00adef;
|
280 |
+
color: white;
|
281 |
+
border-bottom-color: #0098D2;
|
282 |
+
}
|
283 |
+
|
284 |
+
#quadstabcontainer ul .active:hover {
|
285 |
+
background-color: #00A4E2;
|
286 |
+
color: white;
|
287 |
+
border-bottom-color: #0098D2;
|
288 |
+
}
|
289 |
+
|
290 |
+
#quadstabcontainer ul li a {
|
291 |
+
padding: 10px 14px 10px 14px;
|
292 |
+
background-color: #f3f3f3
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
#quadstabcontainer .quadstab-container {
|
297 |
+
border: 0px solid #ececec;
|
298 |
+
}
|
299 |
+
|
300 |
+
.quads-quote-docs {
|
301 |
+
font-family:Courier New,Courier,Fixed;
|
302 |
+
color:#050;
|
303 |
+
}
|
304 |
+
|
305 |
+
.quads-desc{
|
306 |
+
display:block;
|
307 |
+
font-style:italic;
|
308 |
+
padding-top:10px;
|
309 |
+
}
|
310 |
+
|
311 |
+
.quads-postbox {
|
312 |
+
padding:10px;
|
313 |
+
position: relative;
|
314 |
+
min-width: 255px;
|
315 |
+
border: 1px solid #e5e5e5;
|
316 |
+
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
317 |
+
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
318 |
+
background: #fff;
|
319 |
+
margin-bottom:20px;
|
320 |
+
}
|
321 |
+
|
322 |
+
.nav-tab-active{
|
323 |
+
background-color: white;
|
324 |
+
border-bottom:0px;
|
325 |
+
}
|
326 |
+
|
327 |
+
/*.wp-admin .quads-align-input{
|
328 |
+
padding: 0px;
|
329 |
+
line-height: 23px;
|
330 |
+
height: 24px;
|
331 |
+
vertical-align: top;
|
332 |
+
}*/
|
333 |
+
|
334 |
+
|
335 |
+
#quads-add-ons {
|
336 |
+
padding: 20px;
|
337 |
+
}
|
338 |
+
.quads-toggle {
|
339 |
+
position: absolute;
|
340 |
+
right: 0px;
|
341 |
+
top: 0px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.quads-box-close .quads-close-open-icon {
|
345 |
+
background-position: 0px -38px;
|
346 |
+
}
|
347 |
+
|
348 |
+
.quads-close-open-icon {
|
349 |
+
width: 38px;
|
350 |
+
height: 38px;
|
351 |
+
background: #f4f4f4 url("../images/arrow-close.png") repeat-y;
|
352 |
+
background-position: 0px 0px;
|
353 |
+
}
|
354 |
+
.quads-ad-toggle-header {
|
355 |
+
position: relative;
|
356 |
+
background-color: #f4f4f4;
|
357 |
+
margin-bottom: 2px;
|
358 |
+
padding: 10px 10px 10px 15px;
|
359 |
+
-moz-user-select: -moz-none;
|
360 |
+
-khtml-user-select: none;
|
361 |
+
-webkit-user-select: none;
|
362 |
+
-o-user-select: none;
|
363 |
+
user-select: none;
|
364 |
+
cursor: pointer !important;
|
365 |
+
min-height: 20px;
|
366 |
+
}
|
367 |
+
|
368 |
+
.quads-ad-toggle-container{
|
369 |
+
padding:20px;
|
370 |
+
background-color: #f4f4f4;
|
371 |
+
}
|
372 |
+
|
373 |
+
.quads-toogle-title{
|
374 |
+
font-size:16px;
|
375 |
+
font-weight: bold;
|
376 |
+
}
|
377 |
+
|
378 |
+
.quads-advanced-description label{
|
379 |
+
float:left;
|
380 |
+
width:215px;
|
381 |
+
font-size: 12px;
|
382 |
+
font-weight: 600;
|
383 |
+
text-transform: uppercase;
|
384 |
+
}
|
385 |
+
|
386 |
+
.quads-advanced-ad-box{
|
387 |
+
clear: both;
|
388 |
+
margin-top:20px;
|
389 |
+
margin-bottom:20px;
|
390 |
+
}
|
391 |
+
|
392 |
+
|
393 |
+
|
394 |
+
.adsense-size-title {
|
395 |
+
margin-right: 0px;
|
396 |
+
float: left;
|
397 |
+
line-height: 32px;
|
398 |
+
margin-left: 14px;
|
399 |
+
min-width: 100px;
|
400 |
+
font-weight: 600;
|
401 |
+
font-size: 12px;
|
402 |
+
text-transform: uppercase;
|
403 |
+
}
|
404 |
+
|
405 |
+
.quads-select-style-overwrite {
|
406 |
+
border: 1px solid #e6e6e6;
|
407 |
+
width: 150px;
|
408 |
+
overflow: hidden;
|
409 |
+
background: #ffffff url("../images/box_arrow.png") repeat-y 120px 0px;
|
410 |
+
margin: 0px 0px 5px 0px;
|
411 |
+
}
|
412 |
+
.quads-select-style-overwrite select {
|
413 |
+
width:150px;
|
414 |
+
}
|
415 |
+
|
416 |
+
/*.quads-select{
|
417 |
+
max-width:100px;
|
418 |
+
}*/
|
419 |
+
|
420 |
+
.quads-size-input {
|
421 |
+
position: relative;
|
422 |
+
top: -1px;
|
423 |
+
width: 110%;
|
424 |
+
border: none;
|
425 |
+
box-shadow: none;
|
426 |
+
background: transparent;
|
427 |
+
background-image: none;
|
428 |
+
-webkit-appearance: none;
|
429 |
+
font-family: 'Open Sans', arial, sans-serif;
|
430 |
+
color: #555555;
|
431 |
+
font-size: 12px;
|
432 |
+
/*margin-left:5px;*/
|
433 |
+
}
|
434 |
+
|
435 |
+
.quads-pro-overlay{
|
436 |
+
height: 200px;
|
437 |
+
}
|
438 |
+
|
439 |
+
|
440 |
+
|
441 |
+
.quads-license-error-notice,
|
442 |
+
.quads-license-expires-soon-notice {
|
443 |
+
background-color: #fff;
|
444 |
+
padding: 10px;
|
445 |
+
border-left: 4px solid #7ad03a;
|
446 |
+
overflow: auto;
|
447 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
448 |
+
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
449 |
+
border: 1px solid #ECECEC;
|
450 |
+
border-radius: 3px;
|
451 |
+
}
|
452 |
+
.quads-license-error-notice a {
|
453 |
+
color: #0097df;
|
454 |
+
text-decoration: underline;
|
455 |
+
}
|
456 |
+
.quads-license-error-notice { border-left: 4px solid #dd3d36; }
|
457 |
+
.quads-license-lifetime-notice,
|
458 |
+
.quads-license-expiration-date-notice,
|
459 |
+
.quads-license-null { padding: 0 0 0 0px; }
|
460 |
+
.quads-license-lifetime-notice .quads-license-data p,
|
461 |
+
.quads-license-expiration-date-notice .quads-license-data p { color: #666; font-size: 14px; font-style: italic; margin: 4px 0 0; }
|
462 |
+
|
463 |
+
#quads_settingslicenses_header-nav{
|
464 |
+
display:none;
|
465 |
+
}
|
466 |
+
|
467 |
+
#quads_settingslicenses_header{
|
468 |
+
max-width:640px;
|
469 |
+
}
|
470 |
+
|
471 |
+
#quads_settingslicenses_header .quads-row.th{
|
472 |
+
min-width:250px;
|
473 |
+
}
|
474 |
+
|
475 |
+
.quads-notice{
|
476 |
+
background: #fff;
|
477 |
+
border-left: 4px solid #46b450;
|
478 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
479 |
+
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
480 |
+
margin: 5px 15px 2px;
|
481 |
+
padding: 1px 12px;
|
482 |
+
}
|
483 |
+
|
484 |
+
.quads_admin h2.nav-tab-wrapper{
|
485 |
+
border:0px;
|
486 |
+
}
|
487 |
+
|
488 |
+
.quads_admin .nav-tab{
|
489 |
+
border:0px;
|
490 |
+
text-transform: uppercase;
|
491 |
+
color: #a1a1a1;
|
492 |
+
font-weight: 700;
|
493 |
+
}
|
494 |
+
|
495 |
+
.quads-h1 {
|
496 |
+
font-size: 2.75em;
|
497 |
+
margin-bottom: 1.35rem;
|
498 |
+
font-size: 2.5em;
|
499 |
+
line-height: 3.68rem;
|
500 |
+
letter-spacing: normal;
|
501 |
+
}
|
502 |
+
|
503 |
+
.quads-h2 {
|
504 |
+
margin-top:0px;
|
505 |
+
margin-bottom: 1.2rem;
|
506 |
+
font-size: 30px;
|
507 |
+
line-height: 2.5rem;
|
508 |
+
}
|
509 |
+
|
510 |
+
.quads-heading-pro{
|
511 |
+
color: #83c11f;
|
512 |
+
font-weight: bold;
|
513 |
+
}
|
514 |
+
|
515 |
+
.quads-button.green {
|
516 |
+
display:inline-block;
|
517 |
+
background-color: #83c11f;
|
518 |
+
padding:10px;
|
519 |
+
min-width: 170px;
|
520 |
+
color: white;
|
521 |
+
font-size: 16px;
|
522 |
+
text-decoration: none;
|
523 |
+
text-align:center;
|
524 |
+
margin-top:20px;
|
525 |
+
}
|
526 |
+
|
527 |
+
#quads-add-ons .quads-footer {
|
528 |
+
clear:both;
|
529 |
+
margin-top:20px;
|
530 |
+
font-style: italic;
|
531 |
+
}
|
532 |
+
|
533 |
+
#quads-footer {
|
534 |
+
clear:both;
|
535 |
+
}
|
536 |
+
|
537 |
+
#quads-add-ons li {
|
538 |
+
font-size:18px;
|
539 |
+
line-height: 29px;
|
540 |
+
position: relative;
|
541 |
+
padding-left: 23px;
|
542 |
+
list-style: none!important;
|
543 |
+
}
|
544 |
+
|
545 |
+
#quads-add-ons li:before {
|
546 |
+
width: 1em;
|
547 |
+
height: 100%;
|
548 |
+
background: url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;
|
549 |
+
background-size: contain;
|
550 |
+
content: "";
|
551 |
+
position: absolute;
|
552 |
+
top: 0;
|
553 |
+
left: 0;
|
554 |
+
color: #77b227;
|
555 |
+
}
|
556 |
+
|
557 |
+
.adsense_admin_header {
|
558 |
+
font-size: 14px;
|
559 |
+
font-weight: 500;
|
560 |
+
}
|
561 |
+
|
562 |
+
#quads-adsense-bg-div{
|
563 |
+
position: fixed;
|
564 |
+
top: 0;
|
565 |
+
left: 0;
|
566 |
+
width: 100%;
|
567 |
+
height: 100%;
|
568 |
+
background-color: rgba(0, 0, 0, 0.65);
|
569 |
+
z-index: 250000;
|
570 |
+
}
|
571 |
+
|
572 |
+
#quads-adsense-container {
|
573 |
+
text-align: center;
|
574 |
+
width: 480px;
|
575 |
+
margin: 85px auto 0 auto;
|
576 |
+
background-color: #fff;
|
577 |
+
padding: 2%;
|
578 |
+
border-radius: 2px;
|
579 |
+
}
|
580 |
+
#quads-adsense-container h3{
|
581 |
+
margin-top:0px;
|
582 |
+
}
|
583 |
+
|
584 |
+
#quads-adsense-container textarea{
|
585 |
+
width: 100%;
|
586 |
+
}
|
587 |
+
|
588 |
+
|
589 |
+
.quads-ad-toggle-container textarea{
|
590 |
+
width: 100%;
|
591 |
+
}
|
592 |
+
|
593 |
+
.quads-ad-toggle-container input{
|
594 |
+
margin-top: 7px;
|
595 |
+
margin-bottom:10px;
|
596 |
+
}
|
597 |
+
|
598 |
+
.quads-adsense-code label, input{
|
599 |
+
margin-right:2px;
|
600 |
+
}
|
601 |
+
|
602 |
+
#quads_settings\5b ad2\5d \5b g_data_ad_client\5d {
|
603 |
+
width:200px;
|
604 |
+
}
|
605 |
+
|
606 |
+
.quads-ad-toggle-container label {
|
607 |
+
display: inline-block;
|
608 |
+
margin-right:2px;
|
609 |
+
margin-top:-3px;
|
610 |
+
}
|
611 |
+
|
612 |
+
/*.quads-adsense-code > label:nth-child(1){
|
613 |
+
min-width: 74px;
|
614 |
+
}*/
|
615 |
+
|
616 |
+
.quads_adsense_code .quads-add-adsense {
|
617 |
+
margin:20px;
|
618 |
+
margin-left:0px;
|
619 |
+
margin-right:5px;
|
620 |
+
}
|
621 |
+
|
622 |
+
.quads-label-left {
|
623 |
+
min-width: 71px;
|
624 |
+
}
|
625 |
+
|
626 |
+
#quads-label-Type {
|
627 |
+
min-width: 67px;
|
628 |
+
}
|
629 |
+
|
630 |
+
.quads-medium-size{
|
631 |
+
width: 110px;
|
632 |
+
}
|
633 |
+
|
634 |
+
#quads-msg{
|
635 |
+
display:none;
|
636 |
+
margin: 5px;
|
637 |
+
background-color: #c55c5c;
|
638 |
+
color: white;
|
639 |
+
}
|
640 |
+
|
641 |
+
.quads-success-modal {
|
642 |
+
display: block;
|
643 |
+
position: fixed;
|
644 |
+
top: 45%;
|
645 |
+
left: 25%;
|
646 |
+
width: 200px;
|
647 |
+
height: auto;
|
648 |
+
padding: 5px 20px;
|
649 |
+
z-index:1002;
|
650 |
+
overflow: auto;
|
651 |
+
}
|
652 |
+
.quads-loader {
|
653 |
+
display: block;
|
654 |
+
position: fixed;
|
655 |
+
top: 45%;
|
656 |
+
left: 25%;
|
657 |
+
width: 200px;
|
658 |
+
height: auto;
|
659 |
+
padding: 5px 20px;
|
660 |
+
z-index:1002;
|
661 |
+
overflow: auto;
|
662 |
+
}
|
663 |
+
|
664 |
+
.quads-form-table{
|
665 |
+
width: 100%;
|
666 |
+
}
|
667 |
+
|
668 |
+
.quads-left-box{
|
669 |
+
width:45%;
|
670 |
+
min-height:100px;
|
671 |
+
float:left;
|
672 |
+
line-height: 35px;
|
673 |
+
min-width: 300px;
|
674 |
+
}
|
675 |
+
|
676 |
+
@media screen and (max-width:700px){
|
677 |
+
.adsense-size-title {
|
678 |
+
margin-left: 0px;
|
679 |
+
}
|
680 |
+
.quads-left-box{
|
681 |
+
width:45%;
|
682 |
+
min-height:100px;
|
683 |
+
float:none;
|
684 |
+
line-height: 35px;
|
685 |
+
min-width: 300px;
|
686 |
+
}
|
687 |
+
|
688 |
+
.quads-style img{
|
689 |
+
max-width: 50px;
|
690 |
+
}
|
691 |
+
|
692 |
+
}
|
693 |
+
|
694 |
+
.adsense_admin_header ul li{
|
695 |
+
margin-top:2px;
|
696 |
+
margin-left:20px;
|
697 |
+
list-style-type: square;
|
698 |
+
}
|
699 |
+
|
700 |
+
.quads-helper {
|
701 |
+
border-radius: 50%;
|
702 |
+
border: 2px solid #fff;
|
703 |
+
background-color: #83c11f;
|
704 |
+
width: 15px;
|
705 |
+
height: 15px;
|
706 |
+
display: inline-block;
|
707 |
+
position: relative;
|
708 |
+
top: 4px;
|
709 |
+
margin-top: -4px;
|
710 |
+
cursor: pointer;
|
711 |
+
margin-left: 2px;
|
712 |
+
}
|
713 |
+
|
714 |
+
.quads-helper:after {
|
715 |
+
height: 20px;
|
716 |
+
font-family: sans-serif;
|
717 |
+
content: "?";
|
718 |
+
color: #fff;
|
719 |
+
font-size: 11px;
|
720 |
+
font-weight: bold;
|
721 |
+
left: 4px;
|
722 |
+
position: absolute;
|
723 |
+
margin-top: -10px;
|
724 |
+
}
|
725 |
+
|
726 |
+
.quads-general-helper:after {
|
727 |
+
height: 20px;
|
728 |
+
font-family: sans-serif;
|
729 |
+
content: "?";
|
730 |
+
color: #fff;
|
731 |
+
font-size: 11px;
|
732 |
+
font-weight: bold;
|
733 |
+
left: 4px;
|
734 |
+
position: absolute;
|
735 |
+
margin-top: -2px;
|
736 |
+
}
|
737 |
+
.quads-general-helper {
|
738 |
+
border-radius: 50%;
|
739 |
+
border: 2px solid #fff;
|
740 |
+
background-color: #83c11f;
|
741 |
+
width: 15px;
|
742 |
+
height: 15px;
|
743 |
+
display: inline-block;
|
744 |
+
position: relative;
|
745 |
+
top: 4px;
|
746 |
+
margin-top: -4px;
|
747 |
+
cursor: pointer;
|
748 |
+
margin-left: 2px;
|
749 |
+
}
|
750 |
+
|
751 |
+
.quads-message{
|
752 |
+
display:block;
|
753 |
+
padding: 10px;
|
754 |
+
border: 1px solid #FBFBFB;
|
755 |
+
border-radius: 2px;
|
756 |
+
background-color: #F8F8F8;
|
757 |
+
position: absolute;
|
758 |
+
max-width: 500px;
|
759 |
+
z-index: 9999;
|
760 |
+
display: none;
|
761 |
+
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
762 |
+
font-weight: normal;
|
763 |
+
line-height: 20px;
|
764 |
+
text-transform: none;
|
765 |
+
font-size: 14px;
|
766 |
+
}
|
767 |
+
|
768 |
+
#quads-pro-hover{
|
769 |
+
background-color: #83c11f;
|
770 |
+
padding:20px;
|
771 |
+
min-width: 150px;
|
772 |
+
color:white;
|
773 |
+
display: block;
|
774 |
+
position: relative;
|
775 |
+
margin-top: -100px;
|
776 |
+
margin-left: 50%;
|
777 |
+
}
|
778 |
+
|
779 |
+
#quads-pro-hover-background{
|
780 |
+
width: 100%; height:100%;background:rgba(0,0,0,0.6);
|
781 |
+
}
|
782 |
+
|
783 |
+
#quads-open-toggle{
|
784 |
+
clear: both;
|
785 |
+
float:left;
|
786 |
+
margin-top:10px;
|
787 |
+
}
|
788 |
+
|
789 |
+
#quads_settingsadsense_header input[type="number"].small-text{
|
790 |
+
width: 55px;
|
791 |
+
}
|
792 |
+
|
793 |
+
.quads_adsense_code input.quads-bggrey {
|
794 |
+
background-color: whitesmoke;
|
795 |
+
color: #939393;
|
796 |
+
}
|
797 |
+
|
798 |
+
.quads-amp-code{
|
799 |
+
color: #939393;
|
800 |
+
height: 130px;
|
801 |
+
}
|
802 |
+
|
803 |
+
.quads-chosen-select .chosen-choices li.search-field input{
|
804 |
+
min-height: 25px;
|
805 |
+
}
|
806 |
+
|
807 |
+
|
808 |
+
#quads-validate{
|
809 |
+
display: block;
|
810 |
+
margin-left: 2px;
|
811 |
+
margin-bottom: 20px;
|
812 |
+
font-weight: bold;
|
813 |
+
clear: both;
|
814 |
+
}
|
815 |
+
|
816 |
+
@font-face {
|
817 |
+
font-family: 'quads';
|
818 |
+
src: url('data:application/octet-stream;base64,d09GRgABAAAAAAxYAA8AAAAAFUQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IEkBY21hcAAAAdgAAABQAAABfohD7KljdnQgAAACKAAAABMAAAAgBtX/BGZwZ20AAAI8AAAFkAAAC3CKkZBZZ2FzcAAAB8wAAAAIAAAACAAAABBnbHlmAAAH1AAAAdIAAAJWlz85pGhlYWQAAAmoAAAAMwAAADYNxZM1aGhlYQAACdwAAAAfAAAAJAc6A1BobXR4AAAJ/AAAAAwAAAAMClL//W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rwFwjW8I5M8TR84CZ4xyPsEpepYL9M+Wi+QXyyVU8Wa5TP9uuYIHBJaruMEHK4jiOaMFPi0LXIlLyye4EHeWC/SPlovknuUSbsWr5TK9Z7mCiUgtV3EvvgZqtdVREBpZG9Rlu9nqyOlWKqoocWPprk2odCr7cq4S48excjy13PPYD9axq/fhfp74Oo1UIltOc69GfuJr1/izXfV0E7SNmcu5Vks5tBlypdXC94wTGrPqNhp/z8MACitsoRHxqkIYSNRo65zbaKKFDmnKDMnMPCtCAhcxjYs1d4TZSsq4zzFnlND6zIjJDjx+l0d+TAq4P2YVfbR6GE9IuzOizEv25bC7w6wRKcky3czOfntPseFpbVrDXbsuddaVxPCghuR97NYWNB69k92Koe2iwfef//sB5m6EUQB4nGNgYoAALgbsgJmRiZGZkYWBu6QosThDNzW3oKSSpyCntFg3ObMoOSc1hYEBAI3CCXgAeJxj8N7BcCIoYiMjY1/kBsadHAwcDMkFGxlYnTYxMDJogRibuZgYOSAsPgYwi81pF9MBoDQnkM3utIvBAcJmZnDZqMLYERixwaEjYiNzistGNRBvF0cDAyOLQ0dySARISSQQbOZhYuTR2sH4v3UDS+9GJgYXAAx2I/QAAA==') format('woff'),
|
819 |
+
url('data:application/octet-stream;base64,AAEAAAAPAIAAAwBwR1NVQiCLJXoAAAD8AAAAVE9TLzI+IEkBAAABUAAAAFZjbWFwiEPsqQAAAagAAAF+Y3Z0IAbV/wQAAAksAAAAIGZwZ22KkZBZAAAJTAAAC3BnYXNwAAAAEAAACSQAAAAIZ2x5Zpc/OaQAAAMoAAACVmhlYWQNxZM1AAAFgAAAADZoaGVhBzoDUAAABbgAAAAkaG10eApS//0AAAXcAAAADGxvY2EAxAErAAAF6AAAAAhtYXhwARIMCgAABfAAAAAgbmFtZcydHR8AAAYQAAACzXBvc3SFVFBUAAAI4AAAAERwcmVw5UErvAAAFLwAAACGAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdh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A7LCMgLkawAiVGUlggPFkusSsBFCstsDwsIyAuRrACJUZQWCA8WS6xKwEUKy2wPSwjIC5GsAIlRlJYIDxZIyAuRrACJUZQWCA8WS6xKwEUKy2wPiywNSsjIC5GsAIlRlJYIDxZLrErARQrLbA/LLA2K4ogIDywBCNCijgjIC5GsAIlRlJYIDxZLrErARQrsARDLrArKy2wQCywABawBCWwBCYgLkcjRyNhsAlDKyMgPCAuIzixKwEUKy2wQSyxCAQlQrAAFrAEJbAEJSAuRyNHI2EgsAQjQrAJQysgsGBQWCCwQFFYswIgAyAbswImAxpZQkIjIEewBEOwAmIgsABQWLBAYFlmsAFjYCCwASsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsAJiILAAUFiwQGBZZrABY2GwAiVGYTgjIDwjOBshICBGI0ewASsjYTghWbErARQrLbBCLLA1Ky6xKwEUKy2wQyywNishIyAgPLAEI0IjOLErARQrsARDLrArKy2wRCywABUgR7AAI0KyAAEBFRQTLrAxKi2wRSywABUgR7AAI0KyAAEBFRQTLrAxKi2wRiyxAAEUE7AyKi2wRyywNCotsEgssAAWRSMgLiBGiiNhOLErARQrLbBJLLAII0KwSCstsEossgAAQSstsEsssgABQSstsEwssgEAQSstsE0ssgEBQSstsE4ssgAAQistsE8ssgABQistsFAssgEAQistsFEssgEBQistsFIssgAAPistsFMssgABPistsFQssgEAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKyAAEAKrEABUKzCgIBCCqxAAVCsw4AAQgqsQAGQroCwAABAAkqsQAHQroAQAABAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbMMAgEMKrgB/4WwBI2xAgBEAAA=') format('truetype');
|
820 |
+
}
|
821 |
+
#quads-add-new-ad:before {
|
822 |
+
font-family: 'quads';
|
823 |
+
content: '\e801';
|
824 |
+
text-decoration: none;
|
825 |
+
margin-right:5px;
|
826 |
+
color: #383838;
|
827 |
+
}
|
828 |
+
|
829 |
+
#quads-add-new-ad{
|
830 |
+
margin-left: 3px;
|
831 |
+
margin-top: 5px;
|
832 |
+
display: block;
|
833 |
+
margin-bottom: 20px;
|
834 |
+
text-decoration: none;
|
835 |
+
font-size: 14px;
|
836 |
+
font-weight: 600;
|
837 |
+
color: #383838;
|
838 |
+
}
|
839 |
+
|
840 |
+
#quads-submit-button{
|
841 |
+
z-index: 999999;
|
842 |
+
}
|
843 |
+
|
844 |
+
p.submit{
|
845 |
+
float:left;
|
846 |
+
padding-top:0px;
|
847 |
+
padding-bottom:0px;
|
848 |
+
}
|
849 |
+
|
850 |
+
.quads-delete-ad{
|
851 |
+
clear:both;
|
852 |
+
display:block;
|
853 |
+
//background: url('../images/remove-icon.png');
|
854 |
+
//background-size: 20px 20px;
|
855 |
+
//background-repeat: no-repeat;
|
856 |
+
//height: 20px;
|
857 |
+
//padding-left:30px;
|
858 |
+
margin-right:5px;
|
859 |
+
font-size: 14px;
|
860 |
+
font-weight: 600;
|
861 |
+
text-decoration: none;
|
862 |
+
color: #383838;
|
863 |
+
}
|
864 |
+
.quads-delete-ad:before{
|
865 |
+
font-family: 'quads';
|
866 |
+
content: '\e800';
|
867 |
+
margin-right:5px;
|
868 |
+
color: #383838;
|
869 |
+
}
|
870 |
+
|
871 |
+
#backup-settings-textarea{
|
872 |
+
width: 580px;
|
873 |
+
height: 400px;
|
874 |
+
font-family: Menlo, Monaco, monospace;
|
875 |
+
background: none;
|
876 |
+
white-space: normal;
|
877 |
+
overflow: auto;
|
878 |
+
display: block;
|
879 |
+
}
|
880 |
+
|
881 |
+
@media (max-width:506px){
|
882 |
+
.quads-banner-columns {
|
883 |
+
display: block !important;
|
884 |
+
}
|
885 |
+
.quads-banner-sidebar-second{
|
886 |
+
width: 100% !important;
|
887 |
+
}
|
888 |
+
}
|
889 |
+
@media (max-width:780px){
|
890 |
+
.quads-banner-wrapper{
|
891 |
+
margin-right:12px !important;
|
892 |
+
}
|
893 |
+
}
|
894 |
+
|
895 |
+
.quads-banner-wrapper{
|
896 |
+
display: flex;
|
897 |
+
flex-direction: column;
|
898 |
+
clear:both;
|
899 |
+
background: #fff;
|
900 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
901 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
902 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
903 |
+
margin: 5px 5px 2px;
|
904 |
+
margin-right:20px;
|
905 |
+
padding: 1px 12px;
|
906 |
+
}
|
907 |
+
.quads-banner-content {
|
908 |
+
display: flex;
|
909 |
+
flex: 1;
|
910 |
+
color: #000;
|
911 |
+
}
|
912 |
+
.quads-banner-columns{
|
913 |
+
display: flex;
|
914 |
+
flex:1;
|
915 |
+
-ms-flex-align: center;
|
916 |
+
-webkit-align-items: center;
|
917 |
+
-webkit-box-align: center;
|
918 |
+
|
919 |
+
align-items: center;
|
920 |
+
}
|
921 |
+
.quads-banner-main{
|
922 |
+
flex: 1;
|
923 |
+
order: 2;
|
924 |
+
}
|
925 |
+
.quads-banner-sidebar-first{
|
926 |
+
min-width: 160px;
|
927 |
+
width: 13%;
|
928 |
+
order: 1;
|
929 |
+
}
|
930 |
+
.quads-banner-sidebar-second{
|
931 |
+
width: 19%;
|
932 |
+
order: 3;
|
933 |
+
}
|
934 |
+
|
935 |
+
|
936 |
+
.quads-button-primary {
|
937 |
+
display: inline-block;
|
938 |
+
text-decoration: none;
|
939 |
+
font-size: 16px;
|
940 |
+
line-height: 32px;
|
941 |
+
height: 36px;
|
942 |
+
margin: 0;
|
943 |
+
padding: 0 13px 1px;
|
944 |
+
cursor: pointer;
|
945 |
+
border-width: 1px;
|
946 |
+
border-style: solid;
|
947 |
+
-webkit-appearance: none;
|
948 |
+
-webkit-border-radius: 3px;
|
949 |
+
border-radius: 3px;
|
950 |
+
white-space: nowrap;
|
951 |
+
-webkit-box-sizing: border-box;
|
952 |
+
-moz-box-sizing: border-box;
|
953 |
+
box-sizing: border-box;
|
954 |
+
font-weight: bold;
|
955 |
+
}
|
956 |
+
|
957 |
+
.quads-button-primary {
|
958 |
+
background: #0085ba;
|
959 |
+
border-color: #0073aa #006799 #006799;
|
960 |
+
-webkit-box-shadow: 0 1px 0 #006799;
|
961 |
+
box-shadow: 0 1px 0 #006799;
|
962 |
+
color: #fff;
|
963 |
+
text-decoration: none;
|
964 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
965 |
+
}
|
966 |
+
|
967 |
+
.quads-notice-dismiss {
|
968 |
+
display: inline-block;
|
969 |
+
position: relative;
|
970 |
+
top: 0;
|
971 |
+
right: 1px;
|
972 |
+
border: none;
|
973 |
+
margin: 0;
|
974 |
+
padding: 0px;
|
975 |
+
background: 0 0;
|
976 |
+
color: #72777c;
|
977 |
+
cursor: pointer;
|
978 |
+
}
|
979 |
+
|
980 |
+
.quads-notice-dismiss:before{
|
981 |
+
display: inline-block;
|
982 |
+
background: 0 0;
|
983 |
+
color: #72777c;
|
984 |
+
content: "\f153";
|
985 |
+
font: 400 16px/20px dashicons;
|
986 |
+
speak: none;
|
987 |
+
height: 20px;
|
988 |
+
text-align: center;
|
989 |
+
width: 20px;
|
990 |
+
-webkit-font-smoothing: antialiased;
|
991 |
+
}
|
992 |
+
|
993 |
+
.quads-widget-buttons {
|
994 |
+
float:right;
|
995 |
+
}
|
996 |
+
.quads-widget-buttons a{
|
997 |
+
min-width: 80px;text-align: center;font-weight: 600;
|
998 |
+
}
|
999 |
+
|
1000 |
+
#quads-vi-widget ul {
|
1001 |
+
margin: 0;
|
1002 |
+
margin-left:25px;
|
1003 |
+
padding: 0;
|
1004 |
+
background: #fff;
|
1005 |
+
float: none;
|
1006 |
+
padding-top: 0px;
|
1007 |
+
list-style-type: square;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
#quads-vi-signup-fullscreen{
|
1011 |
+
display:none;
|
1012 |
+
z-index: 999999;
|
1013 |
+
box-sizing:border-box;
|
1014 |
+
-webkit-box-sizing:border-box;
|
1015 |
+
-moz-box-sizing:border-box;
|
1016 |
+
height: 100%;
|
1017 |
+
width: 100%;
|
1018 |
+
position: absolute;
|
1019 |
+
top: 50%;
|
1020 |
+
left: 50%;
|
1021 |
+
transform: translate(-50%, -50%);
|
1022 |
+
background-color:#f0f0f0;
|
1023 |
+
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
#quads-vi-signup-container {
|
1027 |
+
width:99%;
|
1028 |
+
height:99%;
|
1029 |
+
max-width:868px;
|
1030 |
+
max-height:552px;
|
1031 |
+
}
|
1032 |
+
|
1033 |
+
#quads-vi-close{
|
1034 |
+
cursor:pointer;
|
1035 |
+
position: relative;
|
1036 |
+
display: inline-block;
|
1037 |
+
width: 20px;
|
1038 |
+
height: 20px;
|
1039 |
+
overflow: hidden;
|
1040 |
+
float: right;
|
1041 |
+
margin-right: 20px;
|
1042 |
+
margin-top: 20px;
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
#quads-vi-close::before, #quads-vi-close::after {
|
1046 |
+
content: '';
|
1047 |
+
position: absolute;
|
1048 |
+
height: 2px;
|
1049 |
+
width: 100%;
|
1050 |
+
top: 50%;
|
1051 |
+
left: 0;
|
1052 |
+
margin-top: -1px;
|
1053 |
+
background: #7d7d7d;
|
1054 |
+
}
|
1055 |
+
|
1056 |
+
#quads-vi-close::before {
|
1057 |
+
-webkit-transform: rotate(45deg);
|
1058 |
+
-moz-transform: rotate(45deg);
|
1059 |
+
-ms-transform: rotate(45deg);
|
1060 |
+
-o-transform: rotate(45deg);
|
1061 |
+
transform: rotate(45deg);
|
1062 |
+
}
|
1063 |
+
#quads-vi-close::after {
|
1064 |
+
-webkit-transform: rotate(-45deg);
|
1065 |
+
-moz-transform: rotate(-45deg);
|
1066 |
+
-ms-transform: rotate(-45deg);
|
1067 |
+
-o-transform: rotate(-45deg);
|
1068 |
+
transform: rotate(-45deg);
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
|
1072 |
+
#quads-vi-signup-fullscreen iframe{
|
1073 |
+
width:100%;
|
1074 |
+
height:100%;
|
1075 |
+
z-index: 999999;
|
1076 |
+
display: block;
|
1077 |
+
background:#FFF;
|
1078 |
+
border:none;
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
.quads-spinner {
|
1082 |
+
background: url('/wp-admin/images/spinner.gif') no-repeat;
|
1083 |
+
background-size: 16px 16px;
|
1084 |
+
display: none;
|
1085 |
+
float: left;
|
1086 |
+
opacity: .7;
|
1087 |
+
filter: alpha(opacity=70);
|
1088 |
+
width: 160px;
|
1089 |
+
height: 16px;
|
1090 |
+
margin: 5px 5px 0;
|
1091 |
+
clear:both;
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
#quads-vi-revenue-wrapper{
|
1095 |
+
margin-top: 10px;
|
1096 |
+
min-width: 565px;
|
1097 |
+
min-height: 350px;
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
#quads-vi-revenue-sum {
|
1101 |
+
font-weight: bold;
|
1102 |
+
font-size: 36px;
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
#quads-vi-revenue-sum-wrapper{
|
1106 |
+
margin-top: 20px;
|
1107 |
+
line-height: 26px;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
#quads-vi-customize-player label {
|
1111 |
+
display:inline-block;
|
1112 |
+
width:170px;
|
1113 |
+
color:black;
|
1114 |
+
font-weight: 500;
|
1115 |
+
}
|
1116 |
+
#quads-vi-shortcodes label {
|
1117 |
+
display:inline-block;
|
1118 |
+
width:170px;
|
1119 |
+
}
|
1120 |
+
#quads-vi-save-settings {
|
1121 |
+
margin-top:20px;
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
#quads-vi-welcome ul {
|
1125 |
+
float:none;
|
1126 |
+
list-style: square;
|
1127 |
+
margin-left:25px;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
.quads-tooltip {
|
1131 |
+
border-radius: 50%;
|
1132 |
+
border: 2px solid #fff;
|
1133 |
+
background-color: #e7db00;
|
1134 |
+
width: 15px;
|
1135 |
+
height: 15px;
|
1136 |
+
display: inline-block;
|
1137 |
+
position: relative;
|
1138 |
+
top: 4px;
|
1139 |
+
margin-top: -4px;
|
1140 |
+
cursor: pointer;
|
1141 |
+
margin-left: 2px;
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
.quads-tooltip:after {
|
1145 |
+
height: 20px;
|
1146 |
+
font-family: sans-serif;
|
1147 |
+
content: "?";
|
1148 |
+
color: #fff;
|
1149 |
+
font-size: 11px;
|
1150 |
+
font-weight: 700;
|
1151 |
+
left: 4px;
|
1152 |
+
top:-2px;
|
1153 |
+
position: absolute;
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
.quads-tooltip-message {
|
1157 |
+
padding: 10px;
|
1158 |
+
border: 1px solid #FBFBFB;
|
1159 |
+
border-radius: 2px;
|
1160 |
+
background-color: #F8F8F8;
|
1161 |
+
position: absolute;
|
1162 |
+
max-width: 500px;
|
1163 |
+
z-index: 9999;
|
1164 |
+
display: none;
|
1165 |
+
box-shadow: 0 0 5px rgba(0,0,0,.2);
|
1166 |
+
font-weight: 400;
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
#quads-vi-layout label{
|
1170 |
+
width: 100px;
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
#quads_vi_ads-ads-1-align-left-label{
|
1174 |
+
content: url('../images/align_left.png');
|
1175 |
+
}
|
1176 |
+
#quads_vi_ads-ads-1-align-right-label{
|
1177 |
+
content: url('../images/align_right.png');
|
1178 |
+
}
|
1179 |
+
#quads_vi_ads-ads-1-align-middle-label{
|
1180 |
+
content: url('../images/align_middle.png');
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
/*.quads-vi-welcome-white {
|
1184 |
+
text-decoration: underline;
|
1185 |
+
border-bottom:3px solid yellow;
|
1186 |
+
font-weight: bold;
|
1187 |
+
color:black;
|
1188 |
+
}
|
1189 |
+
.quads-vi-welcome-black {
|
1190 |
+
text-decoration: underline;
|
1191 |
+
border-bottom:3px solid yellow;
|
1192 |
+
font-weight: bold;
|
1193 |
+
color:white;
|
1194 |
+
}*/
|
1195 |
+
|
1196 |
+
#quads_vi_automatic_integration select{
|
1197 |
+
min-width: 180px;
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
#quads_vi_ads\[ads\]\[1\]\[marginLeft\],
|
1201 |
+
#quads_vi_ads\[ads\]\[1\]\[marginTop\],
|
1202 |
+
#quads_vi_ads\[ads\]\[1\]\[marginRight\],
|
1203 |
+
#quads_vi_ads\[ads\]\[1\]\[marginBottom\]{
|
1204 |
+
width: 60px;
|
1205 |
Â
}
|
assets/css/quads-admin.min.css
CHANGED
@@ -1 +1,1204 @@
|
|
1 |
-
.quads-share-button-container{margin:5px 0}.quads-share-button-container p{margin:0 0 10px}.quads-share-button{display:inline-block}.quads-share-button a{text-decoration:none}.quads-share-button .quads-share{font-family:sans-serif;font-weight:700;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;color:#FFF;display:inline;font-size:16px;width:40px;padding:4px 8px}.quads-share-button-twitter .quads-share{background-color:#00ABF0}.quads-share-button-facebook .quads-share{background-color:#3b5998}.quads-share-button-googleplus .quads-share{background-color:#F53424}.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active,.quads-share-button-twitter .share:active{background-color:#353535}@media (max-width:925px){.quads-share-button .quads-share{font-size:15px;padding:8px 16px}}.quads-richeditor{font-size:11px}#quads-add-ons h2{margin:0 0 15px}#quads-add-ons .quadsshare-addons{float:left;margin:0 15px 15px 0;background:#f0f0f0;border:1px solid #ccc;width:320px;padding:8px;height:315px;position:relative}#quads-add-ons .quadsshare-addons h3{margin:0 0 8px;font-size:13px}#quads-add-ons .quadsshare-addons .button-secondary{position:absolute;bottom:8px;left:8px}#quads-add-ons .quadsshare-addons .third-party{display:none}#system-info-textarea{width:580px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:pre;overflow:auto;display:block}.quads-select-chosen{width:300px}input.large-text,textarea.large-text{max-width:600px}input.medium-text,textarea.medium-text{min-width:190px}#quads_tab_container ul{list-style:none;margin:0;padding:0;background:#fff;float:left}#quads_tab_container ul li:first-child.selected-tab{border-top:none}#quads_tab_container ul li a.selected-tab{font-weight:700;text-decoration:none}#quads_tab_container .quads-row{padding-top:12px;padding-bottom:12px}#quads_tab_container .quads-row label strong,#tab_container .quads-row strong{font-weight:700}.quads-tabs a{padding:5px;color:#a1a1a1;text-transform:uppercase}.quads-tabs a strong{font-weight:700}li.quads-tabs{float:left;margin-left:0;background-color:#e5e5e5}#quads_tab_container>ul>li.quads-tabs.active{background-color:#fff}#quads_tab_container>ul>li.quads-tabs.active a{color:#83c11f}#quads_tab_container .quads-panel-container{background:#FFF;padding:20px;overflow:auto;text-align:left;margin-bottom:10px;max-width:640px;float:left;clear:both}.form-table{margin-top:-20px}#quads_tab_container .form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;line-height:1.3;font-weight:700;font-size:14px;color:#484848;width:30%}#quads_tab_container .form-table tr{border-bottom:1px solid #E7E7E7}#quads_tab_container span.description{display:block;font-weight:400;font-style:normal;font-size:13px;margin-top:7px;color:#484848}#quads_tab_container .col-title{font-size:18px;color:#484848}@media only screen and (max-width:680px){#quads_tab_container ul{float:none;background:#fff}#quads_tab_container .form-table tr>th{width:100%}#quads_tab_container span.description{font-size:14px}#quads_tab_container .form-table tr>th,#tab_container .form-table tr>td{padding:10px}#quads_tab_container .quads-tabs a{text-align:left}#quads_tab_container li.quads-tabs{float:none;margin-left:0}}#quads_tab_container ul li.quads-tabs{margin-bottom:0}#quads_tab_container ul li.quads-tabs a{display:block;padding:10px;text-decoration:none;font-weight:700}#quads_tab_container ul li.quads-tabs a:hover{color:#383838}#quads_tab_container ul li.quads-tabs a.active{text-decoration:underline}#quads_tab_container table tbody tr:nth-child(1)>th>div{font-size:20px}#quadstabcontainer>.quadstabs{background-color:#fff}#quadstabcontainer ul .active{background-color:#00adef;color:#fff;border-bottom-color:#0098D2}#quadstabcontainer ul .active:hover{background-color:#00A4E2;color:#fff;border-bottom-color:#0098D2}#quadstabcontainer ul li a{padding:10px 14px;background-color:#f3f3f3}#quadstabcontainer .quadstab-container{border:0 solid #ececec}.quads-quote-docs{font-family:Courier New,Courier,Fixed;color:#050}.quads-desc{display:block;font-style:italic;padding-top:10px}.quads-postbox{padding:10px;position:relative;min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;margin-bottom:20px}.nav-tab-active{background-color:#fff;border-bottom:0}#quads-add-ons{padding:20px}.quads-toggle{position:absolute;right:0;top:0}.quads-box-close .quads-close-open-icon{background-position:0 -38px}.quads-close-open-icon{width:38px;height:38px;background:url(../images/arrow-close.png) repeat-y #f4f4f4}.quads-ad-toggle-header{position:relative;background-color:#f4f4f4;margin-bottom:2px;padding:10px 10px 10px 15px;-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none;cursor:pointer!important;min-height:20px}.quads-ad-toggle-container{padding:20px;background-color:#f4f4f4}.quads-toogle-title{font-size:16px;font-weight:700}.adsense-size-title,.quads-advanced-description label{font-weight:600;font-size:12px;text-transform:uppercase;float:left}.quads-advanced-description label{width:215px}.quads-advanced-ad-box{clear:both;margin-top:20px;margin-bottom:20px}.adsense-size-title{margin-right:0;line-height:32px;margin-left:14px;min-width:100px}.quads-select-style-overwrite{border:1px solid #e6e6e6;width:150px;overflow:hidden;background:url(../images/box_arrow.png) 120px 0 repeat-y #fff;margin:0 0 5px}.quads-select-style-overwrite select{width:150px}.quads-size-input{position:relative;top:-1px;width:110%;border:none;box-shadow:none;background:0 0;-webkit-appearance:none;font-family:'Open Sans',arial,sans-serif;color:#555;font-size:12px}.quads-pro-overlay{height:200px}.quads-license-error-notice,.quads-license-expires-soon-notice{background-color:#fff;padding:10px;overflow:auto;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);border:1px solid #ECECEC;border-radius:3px}.quads-license-error-notice a{color:#0097df;text-decoration:underline}.quads-license-error-notice{border-left:4px solid #dd3d36}.quads-license-expiration-date-notice,.quads-license-lifetime-notice,.quads-license-null{padding:0}.quads-license-expiration-date-notice .quads-license-data p,.quads-license-lifetime-notice .quads-license-data p{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}#quads_settingslicenses_header-nav{display:none}#quads_settingslicenses_header{max-width:640px}#quads_settingslicenses_header .quads-row.th{min-width:250px}.quads-notice{background:#fff;border-left:4px solid #46b450;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 15px 2px;padding:1px 12px}.quads_admin h2.nav-tab-wrapper{border:0}.quads_admin .nav-tab{border:0;text-transform:uppercase;color:#a1a1a1;font-weight:700}.quads-h1{margin-bottom:1.35rem;font-size:2.5em;line-height:3.68rem;letter-spacing:normal}.quads-h2{margin-top:0;margin-bottom:1.2rem;font-size:30px;line-height:2.5rem}.quads-heading-pro{color:#83c11f;font-weight:700}.quads-button.green{display:inline-block;background-color:#83c11f;padding:10px;min-width:170px;color:#fff;font-size:16px;text-decoration:none;text-align:center;margin-top:20px}#quads-add-ons .quads-footer{clear:both;margin-top:20px;font-style:italic}#quads-footer{clear:both}#quads-add-ons li{font-size:18px;line-height:29px;position:relative;padding-left:23px;list-style:none!important}#quads-add-ons li:before{width:1em;height:100%;background:url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;background-size:contain;content:"";position:absolute;top:0;left:0;color:#77b227}.adsense_admin_header{font-size:14px;font-weight:500}#quads-adsense-bg-div{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.65);z-index:250000}#quads-adsense-container{text-align:center;width:480px;margin:85px auto 0;background-color:#fff;padding:2%;border-radius:2px}#quads-adsense-container h3{margin-top:0}#quads-adsense-container textarea,.quads-ad-toggle-container textarea{width:100%}.quads-ad-toggle-container input{margin-top:7px;margin-bottom:10px}.quads-adsense-code label,input{margin-right:2px}#quads_settings\5b ad2\5d \5b g_data_ad_client\5d{width:200px}.quads-ad-toggle-container label{display:inline-block;margin-right:2px;margin-top:-3px}.quads_adsense_code .quads-add-adsense{margin:20px 5px 20px 0}.quads-label-left{min-width:71px}#quads-label-Type{min-width:67px}.quads-medium-size{width:110px}#quads-msg{display:none;margin:5px;background-color:#c55c5c;color:#fff}.quads-loader,.quads-success-modal{display:block;position:fixed;top:45%;left:25%;width:200px;height:auto;padding:5px 20px;z-index:1002;overflow:auto}.quads-general-helper,.quads-helper{background-color:#83c11f;display:inline-block}.quads-form-table{width:100%}.quads-left-box{width:45%;min-height:100px;float:left;line-height:35px;min-width:300px}@media screen and (max-width:700px){.adsense-size-title{margin-left:0}.quads-left-box{width:45%;min-height:100px;float:none;line-height:35px;min-width:300px}.quads-style img{max-width:50px}}.adsense_admin_header ul li{margin-top:2px;margin-left:20px;list-style-type:square}.quads-helper{border-radius:50%;border:2px solid #fff;width:15px;height:15px;position:relative;top:4px;margin-top:-4px;cursor:pointer;margin-left:2px}.quads-general-helper:after,.quads-helper:after{height:20px;font-family:sans-serif;content:"?";font-size:11px;font-weight:700;left:4px;position:absolute;color:#fff}.quads-helper:after{margin-top:-10px}.quads-general-helper:after{margin-top:-2px}#quads-add-new-ad:before,.quads-delete-ad:before{font-family:quads;margin-right:5px}.quads-general-helper{border-radius:50%;border:2px solid #fff;width:15px;height:15px;position:relative;top:4px;margin-top:-4px;cursor:pointer;margin-left:2px}.quads-message{padding:10px;border:1px solid #FBFBFB;border-radius:2px;background-color:#F8F8F8;position:absolute;max-width:500px;z-index:9999;display:none;box-shadow:0 0 5px rgba(0,0,0,.2);font-weight:400;line-height:20px;text-transform:none;font-size:14px}#quads-pro-hover{background-color:#83c11f;padding:20px;min-width:150px;color:#fff;display:block;position:relative;margin-top:-100px;margin-left:50%}#quads-pro-hover-background{width:100%;height:100%;background:rgba(0,0,0,.6)}#quads-open-toggle{clear:both;float:left;margin-top:10px}#quads_settingsadsense_header input[type=number].small-text{width:55px}.quads_adsense_code input.quads-bggrey{background-color:#f5f5f5;color:#939393}.quads-amp-code{color:#939393;height:130px}.quads-chosen-select .chosen-choices li.search-field input{min-height:25px}#quads-validate{display:block;margin-left:2px;margin-bottom:20px;font-weight:700;clear:both}#quads-add-new-ad,.quads-delete-ad{font-size:14px;font-weight:600;color:#383838;display:block;text-decoration:none}@font-face{font-family:quads;src:url(data:application/octet-stream;base64,d09GRgABAAAAAAxYAA8AAAAAFUQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIA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/AIowXE1YfgpG///7fyPzC2ZuIJeDgQkkCgB97A5TAHicY2BkYGAO+p8FJF/8//v/F/MLBqAICmAGALYGB48AA+gAAAMRAAADWf/9AAAAAADEASsAAQAAAAMAaAAGAAAAAAACACAAMABzAAAAdQtwAAAAAHicdZDdasIwGIbfzJ9tCtvYYKfL0VDG6g8MQRAEh55sJzI8HbXWtlIbSaPgbewedjG7iV3LXts4hrKWNM/35MuXrwFwjW8I5M8TR84CZ4xyPsEpepYL9M+Wi+QXyyVU8Wa5TP9uuYIHBJaruMEHK4jiOaMFPi0LXIlLyye4EHeWC/SPlovknuUSbsWr5TK9Z7mCiUgtV3EvvgZqtdVREBpZG9Rlu9nqyOlWKqoocWPprk2odCr7cq4S48excjy13PPYD9axq/fhfp74Oo1UIltOc69GfuJr1/izXfV0E7SNmcu5Vks5tBlypdXC94wTGrPqNhp/z8MACitsoRHxqkIYSNRo65zbaKKFDmnKDMnMPCtCAhcxjYs1d4TZSsq4zzFnlND6zIjJDjx+l0d+TAq4P2YVfbR6GE9IuzOizEv25bC7w6wRKcky3czOfntPseFpbVrDXbsuddaVxPCghuR97NYWNB69k92Koe2iwfef//sB5m6EUQB4nGNgYoAALgbsgJmRiZGZkYWBu6QosThDNzW3oKSSpyCntFg3ObMoOSc1hYEBAI3CCXgAeJxj8N7BcCIoYiMjY1/kBsadHAwcDMkFGxlYnTYxMDJogRibuZgYOSAsPgYwi81pF9MBoDQnkM3utIvBAcJmZnDZqMLYERixwaEjYiNzistGNRBvF0cDAyOLQ0dySARISSQQbOZhYuTR2sH4v3UDS+9GJgYXAAx2I/QAAA==) format('woff'),url(data:application/octet-stream;base64,AAEAAAAPAIAAAwBwR1NVQiCLJXoAAAD8AAAAVE9TLzI+IEkBAAABUAAAAFZjbWFwiEPsqQAAAagAAAF+Y3Z0IAbV/wQAAAksAAAAIGZwZ22KkZBZAAAJTAAAC3BnYXNwAAAAEAAACSQAAAAIZ2x5Zpc/OaQAAAMoAAACVmhlYWQNxZM1AA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gsAgjQiAgIEYjR7ABKyNhOC2wOSywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhuQgACABjYyMgWGIbIVljuAQAYiCwAFBYsEBgWWawAWNgIy4jICA8ijgjIVktsDossAAWILAIQyAuRyNHI2EgYLAgYGawAmIgsABQWLBAYFlmsAFjIyAgPIo4LbA7LCMgLkawAiVGUlggPFkusSsBFCstsDwsIyAuRrACJUZQWCA8WS6xKwEUKy2wPSwjIC5GsAIlRlJYIDxZIyAuRrACJUZQWCA8WS6xKwEUKy2wPiywNSsjIC5GsAIlRlJYIDxZLrErARQrLbA/LLA2K4ogIDywBCNCijgjIC5GsAIlRlJYIDxZLrErARQrsARDLrArKy2wQCywABawBCWwBCYgLkcjRyNhsAlDKyMgPCAuIzixKwEUKy2wQSyxCAQlQrAAFrAEJbAEJSAuRyNHI2EgsAQjQrAJQysgsGBQWCCwQFFYswIgAyAbswImAxpZQkIjIEewBEOwAmIgsABQWLBAYFlmsAFjYCCwASsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsAJiILAAUFiwQGBZZrABY2GwAiVGYTgjIDwjOBshICBGI0ewASsjYTghWbErARQrLbBCLLA1Ky6xKwEUKy2wQyywNishIyAgPLAEI0IjOLErARQrsARDLrArKy2wRCywABUgR7AAI0KyAAEBFRQTLrAxKi2wRSywABUgR7AAI0KyAAEBFRQTLrAxKi2wRiyxAAEUE7AyKi2wRyywNCotsEgssAAWRSMgLiBGiiNhOLErARQrLbBJLLAII0KwSCstsEossgAAQSstsEsssgABQSstsEwssgEAQSstsE0ssgEBQSstsE4ssgAAQistsE8ssgABQistsFAssgEAQistsFEssgEBQistsFIssgAAPistsFMssgABPistsFQssgEAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKyAAEAKrEABUKzCgIBCCqxAAVCsw4AAQgqsQAGQroCwAABAAkqsQAHQroAQAABAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbMMAgEMKrgB/4WwBI2xAgBEAAA=) format('truetype')}#quads-add-new-ad:before{content:'\e801';text-decoration:none;color:#383838}#quads-add-new-ad{margin-left:3px;margin-top:5px;margin-bottom:20px}#quads-submit-button{z-index:999999}p.submit{float:left;padding-top:0;padding-bottom:0}.quads-delete-ad{clear:both;//background:url(../images/remove-icon.png);//background-size:20px 20px;//background-repeat:no-repeat;//height:20px;//padding-left:30px;margin-right:5px}.quads-delete-ad:before{content:'\e800';color:#383838}#backup-settings-textarea{width:580px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:normal;overflow:auto;display:block}@media (max-width:506px){.quads-banner-columns{display:block!important}.quads-banner-sidebar-second{width:100%!important}}@media (max-width:780px){.quads-banner-wrapper{margin-right:12px!important}}.quads-banner-wrapper{display:flex;flex-direction:column;clear:both;background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 20px 2px 5px;padding:1px 12px}.quads-banner-content{display:flex;flex:1;color:#000}.quads-banner-columns{display:flex;flex:1;-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;align-items:center}.quads-banner-main{flex:1;order:2}.quads-banner-sidebar-first{min-width:160px;width:13%;order:1}.quads-banner-sidebar-second{width:19%;order:3}.quads-button-primary{display:inline-block;font-size:16px;line-height:32px;height:36px;margin:0;padding:0 13px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-weight:700;background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.quads-notice-dismiss{display:inline-block;position:relative;top:0;right:1px;border:none;margin:0;padding:0;background:0 0;color:#72777c;cursor:pointer}.quads-notice-dismiss:before{display:inline-block;background:0 0;color:#72777c;content:"\f153";font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased}.quads-widget-buttons{float:right}.quads-widget-buttons a{min-width:80px;text-align:center;font-weight:600}#quads-vi-widget ul{margin:0 0 0 25px;padding:0;background:#fff;float:none;list-style-type:square}#quads-vi-signup-fullscreen{display:none;z-index:999999;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;height:100%;width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:#f0f0f0}#quads-vi-signup-container{width:99%;height:99%;max-width:868px;max-height:552px}#quads-vi-close{cursor:pointer;position:relative;display:inline-block;width:20px;height:20px;overflow:hidden;float:right;margin-right:20px;margin-top:20px}#quads-vi-close::after,#quads-vi-close::before{content:'';position:absolute;height:2px;width:100%;top:50%;left:0;margin-top:-1px;background:#7d7d7d}#quads-vi-close::before{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}#quads-vi-close::after{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}#quads-vi-signup-fullscreen iframe{width:100%;height:100%;z-index:999999;display:block;background:#FFF;border:none}.quads-spinner{background:url(/wp-admin/images/spinner.gif) no-repeat;background-size:16px 16px;display:none;float:left;opacity:.7;filter:alpha(opacity=70);width:160px;height:16px;margin:5px 5px 0;clear:both}#quads-vi-customize-player label,#quads-vi-shortcodes label{width:170px;display:inline-block}#quads-vi-revenue-wrapper{margin-top:10px;min-width:565px;min-height:350px}#quads-vi-revenue-sum{font-weight:700;font-size:36px}#quads-vi-revenue-sum-wrapper{margin-top:20px;line-height:26px}#quads-vi-customize-player label{color:#000;font-weight:500}#quads-vi-save-settings{margin-top:20px}#quads-vi-welcome ul{float:none;list-style:square;margin-left:25px}.quads-tooltip{border-radius:50%;border:2px solid #fff;background-color:#e7db00;width:15px;height:15px;display:inline-block;position:relative;top:4px;margin-top:-4px;cursor:pointer;margin-left:2px}.quads-tooltip:after{height:20px;font-family:sans-serif;content:"?";color:#fff;font-size:11px;font-weight:700;left:4px;top:-2px;position:absolute}.quads-tooltip-message{padding:10px;border:1px solid #FBFBFB;border-radius:2px;background-color:#F8F8F8;position:absolute;max-width:500px;z-index:9999;display:none;box-shadow:0 0 5px rgba(0,0,0,.2);font-weight:400}#quads-vi-layout label{width:100px}#quads_vi_ads-ads-1-align-left-label{content:url(../images/align_left.png)}#quads_vi_ads-ads-1-align-right-label{content:url(../images/align_right.png)}#quads_vi_ads-ads-1-align-middle-label{content:url(../images/align_middle.png)}#quads_vi_automatic_integration select{min-width:180px}#quads_vi_ads\[ads\]\[1\]\[marginBottom\],#quads_vi_ads\[ads\]\[1\]\[marginLeft\],#quads_vi_ads\[ads\]\[1\]\[marginRight\],#quads_vi_ads\[ads\]\[1\]\[marginTop\]{width:60px}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* QUADS Admin CSS
|
3 |
+
*
|
4 |
+
* @package QUADS
|
5 |
+
* @subpackage Admin CSS
|
6 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
7 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
+
*/
|
9 |
+
|
10 |
+
.quads-share-button-container{
|
11 |
+
margin: 5px 0;
|
12 |
+
}
|
13 |
+
|
14 |
+
.quads-share-button-container p{
|
15 |
+
margin:0px 0 10px 0;
|
16 |
+
}
|
17 |
+
|
18 |
+
.quads-share-button {
|
19 |
+
display: inline-block;
|
20 |
+
}
|
21 |
+
|
22 |
+
.quads-share-button a{
|
23 |
+
text-decoration:none;
|
24 |
+
}
|
25 |
+
|
26 |
+
.quads-share-button .quads-share {
|
27 |
+
font-family:sans-serif;
|
28 |
+
font-weight:bold;
|
29 |
+
text-decoration:none;
|
30 |
+
text-align:center;
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
.quads-share-button .quads-share {
|
35 |
+
-webkit-border-radius:2px;
|
36 |
+
-moz-border-radius:2px;
|
37 |
+
border-radius:2px;
|
38 |
+
color:#FFF;
|
39 |
+
display:inline;
|
40 |
+
font-size:16px;
|
41 |
+
width:40px;
|
42 |
+
padding:4px 8px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.quads-share-button-twitter .quads-share {
|
46 |
+
background-color:#00ABF0;
|
47 |
+
}
|
48 |
+
|
49 |
+
.quads-share-button-facebook .quads-share {
|
50 |
+
background-color:#3b5998;
|
51 |
+
}
|
52 |
+
|
53 |
+
.quads-share-button-googleplus .quads-share {
|
54 |
+
background-color:#F53424;
|
55 |
+
}
|
56 |
+
|
57 |
+
.quads-share-button-twitter .share:active,.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active {
|
58 |
+
background-color:#353535;
|
59 |
+
}
|
60 |
+
|
61 |
+
/* Responsive */
|
62 |
+
@media (max-width: 925px) {
|
63 |
+
.quads-share-button .quads-share{
|
64 |
+
font-size:15px;
|
65 |
+
padding: 8px 16px; /* Double the padding */
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
/* Input forms */
|
72 |
+
/*.quads-textarea{
|
73 |
+
font-size:11px;
|
74 |
+
}*/
|
75 |
+
.quads-richeditor{
|
76 |
+
font-size:11px;
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
/* =Add Ons Styles
|
82 |
+
-------------------------------------------------------------- */
|
83 |
+
#quads-add-ons h2 { margin: 0 0 15px; }
|
84 |
+
#quads-add-ons .quadsshare-addons { float: left; margin: 0 15px 15px 0; background: #f0f0f0; border: 1px solid #ccc; width: 320px; padding: 8px; height: 315px; position: relative; }
|
85 |
+
#quads-add-ons .quadsshare-addons h3 { margin: 0 0 8px; font-size: 13px; }
|
86 |
+
#quads-add-ons .quadsshare-addons .button-secondary { position: absolute; bottom: 8px; left: 8px; }
|
87 |
+
/*#quads-add-ons .quadsshare-addons { clear:both; width:100%; }*/
|
88 |
+
#quads-add-ons .quadsshare-addons .third-party { display: none; }
|
89 |
+
|
90 |
+
|
91 |
+
/* System Info page styles
|
92 |
+
-------------------------------------------------------------- */
|
93 |
+
#system-info-textarea { width: 580px; height: 400px; font-family: Menlo, Monaco, monospace; background: none; white-space: pre; overflow: auto; display: block; }
|
94 |
+
|
95 |
+
|
96 |
+
/* General styles
|
97 |
+
-------------------------------------------------------------- */
|
98 |
+
.quads-select-chosen { width: 300px; }
|
99 |
+
|
100 |
+
input.large-text, textarea.large-text {
|
101 |
+
max-width: 600px;
|
102 |
+
}
|
103 |
+
input.medium-text, textarea.medium-text {
|
104 |
+
min-width: 190px;
|
105 |
+
}
|
106 |
+
|
107 |
+
/* CSS for Tabs */
|
108 |
+
|
109 |
+
#quads_tab_container ul {
|
110 |
+
/*height: 200px;*/
|
111 |
+
list-style: none;
|
112 |
+
margin: 0;
|
113 |
+
padding: 0;
|
114 |
+
background: #fff;
|
115 |
+
float: left;
|
116 |
+
padding-top: 0px;
|
117 |
+
/*list-style-type: square;*/
|
118 |
+
}
|
119 |
+
|
120 |
+
#quads_tab_container ul li:first-child.selected-tab {
|
121 |
+
border-top: none;
|
122 |
+
}
|
123 |
+
|
124 |
+
#quads_tab_container ul li a.selected-tab {
|
125 |
+
font-weight: bold;
|
126 |
+
text-decoration: none;
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
#quads_tab_container .quads-row{
|
132 |
+
padding-top:12px;
|
133 |
+
padding-bottom:12px;
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
+
#quads_tab_container .quads-row label strong, #tab_container .quads-row strong {
|
138 |
+
font-weight: bold;
|
139 |
+
}
|
140 |
+
|
141 |
+
.quads-tabs a {
|
142 |
+
padding:5px;
|
143 |
+
color:#a1a1a1;
|
144 |
+
text-transform: uppercase;
|
145 |
+
}
|
146 |
+
.quads-tabs a strong {
|
147 |
+
font-weight: 700;
|
148 |
+
}
|
149 |
+
|
150 |
+
li.quads-tabs {
|
151 |
+
float:left;
|
152 |
+
margin-left:0px;
|
153 |
+
background-color: #e5e5e5;
|
154 |
+
}
|
155 |
+
|
156 |
+
/*@media only screen and (min-width:400px) {
|
157 |
+
li.quads-tabs {
|
158 |
+
float:left;
|
159 |
+
margin-left:14px;
|
160 |
+
}
|
161 |
+
}*/
|
162 |
+
|
163 |
+
#quads_tab_container > ul > li.quads-tabs.active {
|
164 |
+
background-color:#fff;
|
165 |
+
}
|
166 |
+
#quads_tab_container > ul > li.quads-tabs.active a {
|
167 |
+
color: #83c11f;
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
|
172 |
+
/* Layout of admin table and rows
|
173 |
+
*/
|
174 |
+
|
175 |
+
|
176 |
+
#quads_tab_container .quads-panel-container {
|
177 |
+
background: #FFF;
|
178 |
+
padding:20px;
|
179 |
+
overflow:auto;
|
180 |
+
text-align:left;
|
181 |
+
margin-bottom:10px;
|
182 |
+
max-width: 640px;
|
183 |
+
float: left;
|
184 |
+
clear:both;
|
185 |
+
}
|
186 |
+
|
187 |
+
.form-table{
|
188 |
+
margin-top:-20px;
|
189 |
+
}
|
190 |
+
|
191 |
+
#quads_tab_container .form-table th {
|
192 |
+
vertical-align: top;
|
193 |
+
text-align: left;
|
194 |
+
padding: 20px 10px 20px 0;
|
195 |
+
width: 200px;
|
196 |
+
line-height: 1.3;
|
197 |
+
font-weight: bold;
|
198 |
+
font-size: 14px;
|
199 |
+
color:#484848;
|
200 |
+
width: 30%;
|
201 |
+
}
|
202 |
+
|
203 |
+
/*#quads_tab_container .form-table tr{
|
204 |
+
padding:0px;
|
205 |
+
}*/
|
206 |
+
|
207 |
+
#quads_tab_container .form-table tr {
|
208 |
+
border-bottom: 1px solid #E7E7E7;
|
209 |
+
}
|
210 |
+
|
211 |
+
#quads_tab_container span.description{
|
212 |
+
display: block;
|
213 |
+
font-weight: 400;
|
214 |
+
font-style: normal;
|
215 |
+
font-size: 13px;
|
216 |
+
margin-top: 7px;
|
217 |
+
color:#484848;
|
218 |
+
}
|
219 |
+
|
220 |
+
#quads_tab_container .col-title{
|
221 |
+
font-size: 18px;
|
222 |
+
color:#484848;
|
223 |
+
}
|
224 |
+
|
225 |
+
@media only screen and (max-width:680px) {
|
226 |
+
#quads_tab_container ul {
|
227 |
+
float:none;
|
228 |
+
background: #fff;
|
229 |
+
}
|
230 |
+
#quads_tab_container .form-table tr > th {
|
231 |
+
width:100%;
|
232 |
+
}
|
233 |
+
#quads_tab_container span.description{
|
234 |
+
font-size: 14px;
|
235 |
+
}
|
236 |
+
#quads_tab_container .form-table tr > th, #tab_container .form-table tr > td {
|
237 |
+
padding:10px;
|
238 |
+
}
|
239 |
+
#quads_tab_container .quads-tabs a{
|
240 |
+
text-align: left;
|
241 |
+
}
|
242 |
+
#quads_tab_container li.quads-tabs {
|
243 |
+
float:none;
|
244 |
+
margin-left:0px;
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
#quads_tab_container ul li.quads-tabs {
|
249 |
+
margin-bottom:0px;
|
250 |
+
}
|
251 |
+
|
252 |
+
#quads_tab_container ul li.quads-tabs a {
|
253 |
+
display: block;
|
254 |
+
padding:10px 10px 10px 10px;
|
255 |
+
text-decoration: none;
|
256 |
+
font-weight: bold;
|
257 |
+
}
|
258 |
+
#quads_tab_container ul li.quads-tabs a:hover {
|
259 |
+
color:#383838;
|
260 |
+
}
|
261 |
+
#quads_tab_container ul li.quads-tabs a.active {
|
262 |
+
text-decoration: underline;
|
263 |
+
}
|
264 |
+
|
265 |
+
|
266 |
+
#quads_tab_container table tbody tr:nth-child(1) > th > div {
|
267 |
+
font-size: 20px;
|
268 |
+
}
|
269 |
+
|
270 |
+
|
271 |
+
|
272 |
+
/* End layout of admin table and rows
|
273 |
+
*/
|
274 |
+
#quadstabcontainer > .quadstabs {
|
275 |
+
background-color: #ffffff;
|
276 |
+
}
|
277 |
+
|
278 |
+
#quadstabcontainer ul .active {
|
279 |
+
background-color: #00adef;
|
280 |
+
color: white;
|
281 |
+
border-bottom-color: #0098D2;
|
282 |
+
}
|
283 |
+
|
284 |
+
#quadstabcontainer ul .active:hover {
|
285 |
+
background-color: #00A4E2;
|
286 |
+
color: white;
|
287 |
+
border-bottom-color: #0098D2;
|
288 |
+
}
|
289 |
+
|
290 |
+
#quadstabcontainer ul li a {
|
291 |
+
padding: 10px 14px 10px 14px;
|
292 |
+
background-color: #f3f3f3
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
#quadstabcontainer .quadstab-container {
|
297 |
+
border: 0px solid #ececec;
|
298 |
+
}
|
299 |
+
|
300 |
+
.quads-quote-docs {
|
301 |
+
font-family:Courier New,Courier,Fixed;
|
302 |
+
color:#050;
|
303 |
+
}
|
304 |
+
|
305 |
+
.quads-desc{
|
306 |
+
display:block;
|
307 |
+
font-style:italic;
|
308 |
+
padding-top:10px;
|
309 |
+
}
|
310 |
+
|
311 |
+
.quads-postbox {
|
312 |
+
padding:10px;
|
313 |
+
position: relative;
|
314 |
+
min-width: 255px;
|
315 |
+
border: 1px solid #e5e5e5;
|
316 |
+
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
317 |
+
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
318 |
+
background: #fff;
|
319 |
+
margin-bottom:20px;
|
320 |
+
}
|
321 |
+
|
322 |
+
.nav-tab-active{
|
323 |
+
background-color: white;
|
324 |
+
border-bottom:0px;
|
325 |
+
}
|
326 |
+
|
327 |
+
/*.wp-admin .quads-align-input{
|
328 |
+
padding: 0px;
|
329 |
+
line-height: 23px;
|
330 |
+
height: 24px;
|
331 |
+
vertical-align: top;
|
332 |
+
}*/
|
333 |
+
|
334 |
+
|
335 |
+
#quads-add-ons {
|
336 |
+
padding: 20px;
|
337 |
+
}
|
338 |
+
.quads-toggle {
|
339 |
+
position: absolute;
|
340 |
+
right: 0px;
|
341 |
+
top: 0px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.quads-box-close .quads-close-open-icon {
|
345 |
+
background-position: 0px -38px;
|
346 |
+
}
|
347 |
+
|
348 |
+
.quads-close-open-icon {
|
349 |
+
width: 38px;
|
350 |
+
height: 38px;
|
351 |
+
background: #f4f4f4 url("../images/arrow-close.png") repeat-y;
|
352 |
+
background-position: 0px 0px;
|
353 |
+
}
|
354 |
+
.quads-ad-toggle-header {
|
355 |
+
position: relative;
|
356 |
+
background-color: #f4f4f4;
|
357 |
+
margin-bottom: 2px;
|
358 |
+
padding: 10px 10px 10px 15px;
|
359 |
+
-moz-user-select: -moz-none;
|
360 |
+
-khtml-user-select: none;
|
361 |
+
-webkit-user-select: none;
|
362 |
+
-o-user-select: none;
|
363 |
+
user-select: none;
|
364 |
+
cursor: pointer !important;
|
365 |
+
min-height: 20px;
|
366 |
+
}
|
367 |
+
|
368 |
+
.quads-ad-toggle-container{
|
369 |
+
padding:20px;
|
370 |
+
background-color: #f4f4f4;
|
371 |
+
}
|
372 |
+
|
373 |
+
.quads-toogle-title{
|
374 |
+
font-size:16px;
|
375 |
+
font-weight: bold;
|
376 |
+
}
|
377 |
+
|
378 |
+
.quads-advanced-description label{
|
379 |
+
float:left;
|
380 |
+
width:215px;
|
381 |
+
font-size: 12px;
|
382 |
+
font-weight: 600;
|
383 |
+
text-transform: uppercase;
|
384 |
+
}
|
385 |
+
|
386 |
+
.quads-advanced-ad-box{
|
387 |
+
clear: both;
|
388 |
+
margin-top:20px;
|
389 |
+
margin-bottom:20px;
|
390 |
+
}
|
391 |
+
|
392 |
+
|
393 |
+
|
394 |
+
.adsense-size-title {
|
395 |
+
margin-right: 0px;
|
396 |
+
float: left;
|
397 |
+
line-height: 32px;
|
398 |
+
margin-left: 14px;
|
399 |
+
min-width: 100px;
|
400 |
+
font-weight: 600;
|
401 |
+
font-size: 12px;
|
402 |
+
text-transform: uppercase;
|
403 |
+
}
|
404 |
+
|
405 |
+
.quads-select-style-overwrite {
|
406 |
+
border: 1px solid #e6e6e6;
|
407 |
+
width: 150px;
|
408 |
+
overflow: hidden;
|
409 |
+
background: #ffffff url("../images/box_arrow.png") repeat-y 120px 0px;
|
410 |
+
margin: 0px 0px 5px 0px;
|
411 |
+
}
|
412 |
+
.quads-select-style-overwrite select {
|
413 |
+
width:150px;
|
414 |
+
}
|
415 |
+
|
416 |
+
/*.quads-select{
|
417 |
+
max-width:100px;
|
418 |
+
}*/
|
419 |
+
|
420 |
+
.quads-size-input {
|
421 |
+
position: relative;
|
422 |
+
top: -1px;
|
423 |
+
width: 110%;
|
424 |
+
border: none;
|
425 |
+
box-shadow: none;
|
426 |
+
background: transparent;
|
427 |
+
background-image: none;
|
428 |
+
-webkit-appearance: none;
|
429 |
+
font-family: 'Open Sans', arial, sans-serif;
|
430 |
+
color: #555555;
|
431 |
+
font-size: 12px;
|
432 |
+
/*margin-left:5px;*/
|
433 |
+
}
|
434 |
+
|
435 |
+
.quads-pro-overlay{
|
436 |
+
height: 200px;
|
437 |
+
}
|
438 |
+
|
439 |
+
|
440 |
+
|
441 |
+
.quads-license-error-notice,
|
442 |
+
.quads-license-expires-soon-notice {
|
443 |
+
background-color: #fff;
|
444 |
+
padding: 10px;
|
445 |
+
border-left: 4px solid #7ad03a;
|
446 |
+
overflow: auto;
|
447 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
448 |
+
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
449 |
+
border: 1px solid #ECECEC;
|
450 |
+
border-radius: 3px;
|
451 |
+
}
|
452 |
+
.quads-license-error-notice a {
|
453 |
+
color: #0097df;
|
454 |
+
text-decoration: underline;
|
455 |
+
}
|
456 |
+
.quads-license-error-notice { border-left: 4px solid #dd3d36; }
|
457 |
+
.quads-license-lifetime-notice,
|
458 |
+
.quads-license-expiration-date-notice,
|
459 |
+
.quads-license-null { padding: 0 0 0 0px; }
|
460 |
+
.quads-license-lifetime-notice .quads-license-data p,
|
461 |
+
.quads-license-expiration-date-notice .quads-license-data p { color: #666; font-size: 14px; font-style: italic; margin: 4px 0 0; }
|
462 |
+
|
463 |
+
#quads_settingslicenses_header-nav{
|
464 |
+
display:none;
|
465 |
+
}
|
466 |
+
|
467 |
+
#quads_settingslicenses_header{
|
468 |
+
max-width:640px;
|
469 |
+
}
|
470 |
+
|
471 |
+
#quads_settingslicenses_header .quads-row.th{
|
472 |
+
min-width:250px;
|
473 |
+
}
|
474 |
+
|
475 |
+
.quads-notice{
|
476 |
+
background: #fff;
|
477 |
+
border-left: 4px solid #46b450;
|
478 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
479 |
+
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
480 |
+
margin: 5px 15px 2px;
|
481 |
+
padding: 1px 12px;
|
482 |
+
}
|
483 |
+
|
484 |
+
.quads_admin h2.nav-tab-wrapper{
|
485 |
+
border:0px;
|
486 |
+
}
|
487 |
+
|
488 |
+
.quads_admin .nav-tab{
|
489 |
+
border:0px;
|
490 |
+
text-transform: uppercase;
|
491 |
+
color: #a1a1a1;
|
492 |
+
font-weight: 700;
|
493 |
+
}
|
494 |
+
|
495 |
+
.quads-h1 {
|
496 |
+
font-size: 2.75em;
|
497 |
+
margin-bottom: 1.35rem;
|
498 |
+
font-size: 2.5em;
|
499 |
+
line-height: 3.68rem;
|
500 |
+
letter-spacing: normal;
|
501 |
+
}
|
502 |
+
|
503 |
+
.quads-h2 {
|
504 |
+
margin-top:0px;
|
505 |
+
margin-bottom: 1.2rem;
|
506 |
+
font-size: 30px;
|
507 |
+
line-height: 2.5rem;
|
508 |
+
}
|
509 |
+
|
510 |
+
.quads-heading-pro{
|
511 |
+
color: #83c11f;
|
512 |
+
font-weight: bold;
|
513 |
+
}
|
514 |
+
|
515 |
+
.quads-button.green {
|
516 |
+
display:inline-block;
|
517 |
+
background-color: #83c11f;
|
518 |
+
padding:10px;
|
519 |
+
min-width: 170px;
|
520 |
+
color: white;
|
521 |
+
font-size: 16px;
|
522 |
+
text-decoration: none;
|
523 |
+
text-align:center;
|
524 |
+
margin-top:20px;
|
525 |
+
}
|
526 |
+
|
527 |
+
#quads-add-ons .quads-footer {
|
528 |
+
clear:both;
|
529 |
+
margin-top:20px;
|
530 |
+
font-style: italic;
|
531 |
+
}
|
532 |
+
|
533 |
+
#quads-footer {
|
534 |
+
clear:both;
|
535 |
+
}
|
536 |
+
|
537 |
+
#quads-add-ons li {
|
538 |
+
font-size:18px;
|
539 |
+
line-height: 29px;
|
540 |
+
position: relative;
|
541 |
+
padding-left: 23px;
|
542 |
+
list-style: none!important;
|
543 |
+
}
|
544 |
+
|
545 |
+
#quads-add-ons li:before {
|
546 |
+
width: 1em;
|
547 |
+
height: 100%;
|
548 |
+
background: url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;
|
549 |
+
background-size: contain;
|
550 |
+
content: "";
|
551 |
+
position: absolute;
|
552 |
+
top: 0;
|
553 |
+
left: 0;
|
554 |
+
color: #77b227;
|
555 |
+
}
|
556 |
+
|
557 |
+
.adsense_admin_header {
|
558 |
+
font-size: 14px;
|
559 |
+
font-weight: 500;
|
560 |
+
}
|
561 |
+
|
562 |
+
#quads-adsense-bg-div{
|
563 |
+
position: fixed;
|
564 |
+
top: 0;
|
565 |
+
left: 0;
|
566 |
+
width: 100%;
|
567 |
+
height: 100%;
|
568 |
+
background-color: rgba(0, 0, 0, 0.65);
|
569 |
+
z-index: 250000;
|
570 |
+
}
|
571 |
+
|
572 |
+
#quads-adsense-container {
|
573 |
+
text-align: center;
|
574 |
+
width: 480px;
|
575 |
+
margin: 85px auto 0 auto;
|
576 |
+
background-color: #fff;
|
577 |
+
padding: 2%;
|
578 |
+
border-radius: 2px;
|
579 |
+
}
|
580 |
+
#quads-adsense-container h3{
|
581 |
+
margin-top:0px;
|
582 |
+
}
|
583 |
+
|
584 |
+
#quads-adsense-container textarea{
|
585 |
+
width: 100%;
|
586 |
+
}
|
587 |
+
|
588 |
+
|
589 |
+
.quads-ad-toggle-container textarea{
|
590 |
+
width: 100%;
|
591 |
+
}
|
592 |
+
|
593 |
+
.quads-ad-toggle-container input{
|
594 |
+
margin-top: 7px;
|
595 |
+
margin-bottom:10px;
|
596 |
+
}
|
597 |
+
|
598 |
+
.quads-adsense-code label, input{
|
599 |
+
margin-right:2px;
|
600 |
+
}
|
601 |
+
|
602 |
+
#quads_settings\5b ad2\5d \5b g_data_ad_client\5d {
|
603 |
+
width:200px;
|
604 |
+
}
|
605 |
+
|
606 |
+
.quads-ad-toggle-container label {
|
607 |
+
display: inline-block;
|
608 |
+
margin-right:2px;
|
609 |
+
margin-top:-3px;
|
610 |
+
}
|
611 |
+
|
612 |
+
/*.quads-adsense-code > label:nth-child(1){
|
613 |
+
min-width: 74px;
|
614 |
+
}*/
|
615 |
+
|
616 |
+
.quads_adsense_code .quads-add-adsense {
|
617 |
+
margin:20px;
|
618 |
+
margin-left:0px;
|
619 |
+
margin-right:5px;
|
620 |
+
}
|
621 |
+
|
622 |
+
.quads-label-left {
|
623 |
+
min-width: 71px;
|
624 |
+
}
|
625 |
+
|
626 |
+
#quads-label-Type {
|
627 |
+
min-width: 67px;
|
628 |
+
}
|
629 |
+
|
630 |
+
.quads-medium-size{
|
631 |
+
width: 110px;
|
632 |
+
}
|
633 |
+
|
634 |
+
#quads-msg{
|
635 |
+
display:none;
|
636 |
+
margin: 5px;
|
637 |
+
background-color: #c55c5c;
|
638 |
+
color: white;
|
639 |
+
}
|
640 |
+
|
641 |
+
.quads-success-modal {
|
642 |
+
display: block;
|
643 |
+
position: fixed;
|
644 |
+
top: 45%;
|
645 |
+
left: 25%;
|
646 |
+
width: 200px;
|
647 |
+
height: auto;
|
648 |
+
padding: 5px 20px;
|
649 |
+
z-index:1002;
|
650 |
+
overflow: auto;
|
651 |
+
}
|
652 |
+
.quads-loader {
|
653 |
+
display: block;
|
654 |
+
position: fixed;
|
655 |
+
top: 45%;
|
656 |
+
left: 25%;
|
657 |
+
width: 200px;
|
658 |
+
height: auto;
|
659 |
+
padding: 5px 20px;
|
660 |
+
z-index:1002;
|
661 |
+
overflow: auto;
|
662 |
+
}
|
663 |
+
|
664 |
+
.quads-form-table{
|
665 |
+
width: 100%;
|
666 |
+
}
|
667 |
+
|
668 |
+
.quads-left-box{
|
669 |
+
width:45%;
|
670 |
+
min-height:100px;
|
671 |
+
float:left;
|
672 |
+
line-height: 35px;
|
673 |
+
min-width: 300px;
|
674 |
+
}
|
675 |
+
|
676 |
+
@media screen and (max-width:700px){
|
677 |
+
.adsense-size-title {
|
678 |
+
margin-left: 0px;
|
679 |
+
}
|
680 |
+
.quads-left-box{
|
681 |
+
width:45%;
|
682 |
+
min-height:100px;
|
683 |
+
float:none;
|
684 |
+
line-height: 35px;
|
685 |
+
min-width: 300px;
|
686 |
+
}
|
687 |
+
|
688 |
+
.quads-style img{
|
689 |
+
max-width: 50px;
|
690 |
+
}
|
691 |
+
|
692 |
+
}
|
693 |
+
|
694 |
+
.adsense_admin_header ul li{
|
695 |
+
margin-top:2px;
|
696 |
+
margin-left:20px;
|
697 |
+
list-style-type: square;
|
698 |
+
}
|
699 |
+
|
700 |
+
.quads-helper {
|
701 |
+
border-radius: 50%;
|
702 |
+
border: 2px solid #fff;
|
703 |
+
background-color: #83c11f;
|
704 |
+
width: 15px;
|
705 |
+
height: 15px;
|
706 |
+
display: inline-block;
|
707 |
+
position: relative;
|
708 |
+
top: 4px;
|
709 |
+
margin-top: -4px;
|
710 |
+
cursor: pointer;
|
711 |
+
margin-left: 2px;
|
712 |
+
}
|
713 |
+
|
714 |
+
.quads-helper:after {
|
715 |
+
height: 20px;
|
716 |
+
font-family: sans-serif;
|
717 |
+
content: "?";
|
718 |
+
color: #fff;
|
719 |
+
font-size: 11px;
|
720 |
+
font-weight: bold;
|
721 |
+
left: 4px;
|
722 |
+
position: absolute;
|
723 |
+
margin-top: -10px;
|
724 |
+
}
|
725 |
+
|
726 |
+
.quads-general-helper:after {
|
727 |
+
height: 20px;
|
728 |
+
font-family: sans-serif;
|
729 |
+
content: "?";
|
730 |
+
color: #fff;
|
731 |
+
font-size: 11px;
|
732 |
+
font-weight: bold;
|
733 |
+
left: 4px;
|
734 |
+
position: absolute;
|
735 |
+
margin-top: -2px;
|
736 |
+
}
|
737 |
+
.quads-general-helper {
|
738 |
+
border-radius: 50%;
|
739 |
+
border: 2px solid #fff;
|
740 |
+
background-color: #83c11f;
|
741 |
+
width: 15px;
|
742 |
+
height: 15px;
|
743 |
+
display: inline-block;
|
744 |
+
position: relative;
|
745 |
+
top: 4px;
|
746 |
+
margin-top: -4px;
|
747 |
+
cursor: pointer;
|
748 |
+
margin-left: 2px;
|
749 |
+
}
|
750 |
+
|
751 |
+
.quads-message{
|
752 |
+
display:block;
|
753 |
+
padding: 10px;
|
754 |
+
border: 1px solid #FBFBFB;
|
755 |
+
border-radius: 2px;
|
756 |
+
background-color: #F8F8F8;
|
757 |
+
position: absolute;
|
758 |
+
max-width: 500px;
|
759 |
+
z-index: 9999;
|
760 |
+
display: none;
|
761 |
+
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
762 |
+
font-weight: normal;
|
763 |
+
line-height: 20px;
|
764 |
+
text-transform: none;
|
765 |
+
font-size: 14px;
|
766 |
+
}
|
767 |
+
|
768 |
+
#quads-pro-hover{
|
769 |
+
background-color: #83c11f;
|
770 |
+
padding:20px;
|
771 |
+
min-width: 150px;
|
772 |
+
color:white;
|
773 |
+
display: block;
|
774 |
+
position: relative;
|
775 |
+
margin-top: -100px;
|
776 |
+
margin-left: 50%;
|
777 |
+
}
|
778 |
+
|
779 |
+
#quads-pro-hover-background{
|
780 |
+
width: 100%; height:100%;background:rgba(0,0,0,0.6);
|
781 |
+
}
|
782 |
+
|
783 |
+
#quads-open-toggle{
|
784 |
+
clear: both;
|
785 |
+
float:left;
|
786 |
+
margin-top:10px;
|
787 |
+
}
|
788 |
+
|
789 |
+
#quads_settingsadsense_header input[type="number"].small-text{
|
790 |
+
width: 55px;
|
791 |
+
}
|
792 |
+
|
793 |
+
.quads_adsense_code input.quads-bggrey {
|
794 |
+
background-color: whitesmoke;
|
795 |
+
color: #939393;
|
796 |
+
}
|
797 |
+
|
798 |
+
.quads-amp-code{
|
799 |
+
color: #939393;
|
800 |
+
height: 130px;
|
801 |
+
}
|
802 |
+
|
803 |
+
.quads-chosen-select .chosen-choices li.search-field input{
|
804 |
+
min-height: 25px;
|
805 |
+
}
|
806 |
+
|
807 |
+
|
808 |
+
#quads-validate{
|
809 |
+
display: block;
|
810 |
+
margin-left: 2px;
|
811 |
+
margin-bottom: 20px;
|
812 |
+
font-weight: bold;
|
813 |
+
clear: both;
|
814 |
+
}
|
815 |
+
|
816 |
+
@font-face {
|
817 |
+
font-family: 'quads';
|
818 |
+
src: url('data:application/octet-stream;base64,d09GRgABAAAAAAxYAA8AAAAAFUQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IEkBY21hcAAAAdgAAABQAAABfohD7KljdnQgAAACKAAAABMAAAAgBtX/BGZwZ20AAAI8AAAFkAAAC3CKkZBZZ2FzcAAAB8wAAAAIAAAACAAAABBnbHlmAAAH1AAAAdIAAAJWlz85pGhlYWQAAAmoAAAAMwAAADYNxZM1aGhlYQAACdwAAAAfAAAAJAc6A1BobXR4AAAJ/AAAAAwAAAAMClL//WxvY2EAAAoIAAAACAAAAAgAxAErbWF4cAAAChAAAAAgAAAAIAESDApuYW1lAAAKMAAAAXcAAALNzJ0dH3Bvc3QAAAuoAAAAMwAAAESFVFBUcHJlcAAAC9wAAAB6AAAAhuVBK7x4nGNgZGBg4GIwYLBjYHJx8wlh4MtJLMljkGJgYYAAkDwymzEnMz2RgQPGA8qxgGkOIGaDiAIAJjsFSAB4nGNgZC5knMDAysDAVMW0h4GBoQdCMz5gMGRkAooysDIzYAUBaa4pDA4vGF4wMgf9z2KIYg5imAYUZgTJAQDj3AufAHic7ZCxDYAwDATPiaFAjEFBwTBU7F+yRfK2GYOX7qR/uTKwAF1cwsEejMit1XLvbLk7R9547K+NIRNW93STVv7s6fNrLf5U1OcK2gTMuAtdeJxjYEADEhDIHP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gjIDwjOBshICBGI0ewASsjYTghWbErARQrLbBCLLA1Ky6xKwEUKy2wQyywNishIyAgPLAEI0IjOLErARQrsARDLrArKy2wRCywABUgR7AAI0KyAAEBFRQTLrAxKi2wRSywABUgR7AAI0KyAAEBFRQTLrAxKi2wRiyxAAEUE7AyKi2wRyywNCotsEgssAAWRSMgLiBGiiNhOLErARQrLbBJLLAII0KwSCstsEossgAAQSstsEsssgABQSstsEwssgEAQSstsE0ssgEBQSstsE4ssgAAQistsE8ssgABQistsFAssgEAQistsFEssgEBQistsFIssgAAPistsFMssgABPistsFQssgEAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKyAAEAKrEABUKzCgIBCCqxAAVCsw4AAQgqsQAGQroCwAABAAkqsQAHQroAQAABAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbMMAgEMKrgB/4WwBI2xAgBEAAA=') format('truetype');
|
820 |
+
}
|
821 |
+
#quads-add-new-ad:before {
|
822 |
+
font-family: 'quads';
|
823 |
+
content: '\e801';
|
824 |
+
text-decoration: none;
|
825 |
+
margin-right:5px;
|
826 |
+
color: #383838;
|
827 |
+
}
|
828 |
+
|
829 |
+
#quads-add-new-ad{
|
830 |
+
margin-left: 3px;
|
831 |
+
margin-top: 5px;
|
832 |
+
display: block;
|
833 |
+
margin-bottom: 20px;
|
834 |
+
text-decoration: none;
|
835 |
+
font-size: 14px;
|
836 |
+
font-weight: 600;
|
837 |
+
color: #383838;
|
838 |
+
}
|
839 |
+
|
840 |
+
#quads-submit-button{
|
841 |
+
z-index: 999999;
|
842 |
+
}
|
843 |
+
|
844 |
+
p.submit{
|
845 |
+
float:left;
|
846 |
+
padding-top:0px;
|
847 |
+
padding-bottom:0px;
|
848 |
+
}
|
849 |
+
|
850 |
+
.quads-delete-ad{
|
851 |
+
clear:both;
|
852 |
+
display:block;
|
853 |
+
//background: url('../images/remove-icon.png');
|
854 |
+
//background-size: 20px 20px;
|
855 |
+
//background-repeat: no-repeat;
|
856 |
+
//height: 20px;
|
857 |
+
//padding-left:30px;
|
858 |
+
margin-right:5px;
|
859 |
+
font-size: 14px;
|
860 |
+
font-weight: 600;
|
861 |
+
text-decoration: none;
|
862 |
+
color: #383838;
|
863 |
+
}
|
864 |
+
.quads-delete-ad:before{
|
865 |
+
font-family: 'quads';
|
866 |
+
content: '\e800';
|
867 |
+
margin-right:5px;
|
868 |
+
color: #383838;
|
869 |
+
}
|
870 |
+
|
871 |
+
#backup-settings-textarea{
|
872 |
+
width: 580px;
|
873 |
+
height: 400px;
|
874 |
+
font-family: Menlo, Monaco, monospace;
|
875 |
+
background: none;
|
876 |
+
white-space: normal;
|
877 |
+
overflow: auto;
|
878 |
+
display: block;
|
879 |
+
}
|
880 |
+
|
881 |
+
@media (max-width:506px){
|
882 |
+
.quads-banner-columns {
|
883 |
+
display: block !important;
|
884 |
+
}
|
885 |
+
.quads-banner-sidebar-second{
|
886 |
+
width: 100% !important;
|
887 |
+
}
|
888 |
+
}
|
889 |
+
@media (max-width:780px){
|
890 |
+
.quads-banner-wrapper{
|
891 |
+
margin-right:12px !important;
|
892 |
+
}
|
893 |
+
}
|
894 |
+
|
895 |
+
.quads-banner-wrapper{
|
896 |
+
display: flex;
|
897 |
+
flex-direction: column;
|
898 |
+
clear:both;
|
899 |
+
background: #fff;
|
900 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
901 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
902 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
903 |
+
margin: 5px 5px 2px;
|
904 |
+
margin-right:20px;
|
905 |
+
padding: 1px 12px;
|
906 |
+
}
|
907 |
+
.quads-banner-content {
|
908 |
+
display: flex;
|
909 |
+
flex: 1;
|
910 |
+
color: #000;
|
911 |
+
}
|
912 |
+
.quads-banner-columns{
|
913 |
+
display: flex;
|
914 |
+
flex:1;
|
915 |
+
-ms-flex-align: center;
|
916 |
+
-webkit-align-items: center;
|
917 |
+
-webkit-box-align: center;
|
918 |
+
|
919 |
+
align-items: center;
|
920 |
+
}
|
921 |
+
.quads-banner-main{
|
922 |
+
flex: 1;
|
923 |
+
order: 2;
|
924 |
+
}
|
925 |
+
.quads-banner-sidebar-first{
|
926 |
+
min-width: 160px;
|
927 |
+
width: 13%;
|
928 |
+
order: 1;
|
929 |
+
}
|
930 |
+
.quads-banner-sidebar-second{
|
931 |
+
width: 19%;
|
932 |
+
order: 3;
|
933 |
+
}
|
934 |
+
|
935 |
+
|
936 |
+
.quads-button-primary {
|
937 |
+
display: inline-block;
|
938 |
+
text-decoration: none;
|
939 |
+
font-size: 16px;
|
940 |
+
line-height: 32px;
|
941 |
+
height: 36px;
|
942 |
+
margin: 0;
|
943 |
+
padding: 0 13px 1px;
|
944 |
+
cursor: pointer;
|
945 |
+
border-width: 1px;
|
946 |
+
border-style: solid;
|
947 |
+
-webkit-appearance: none;
|
948 |
+
-webkit-border-radius: 3px;
|
949 |
+
border-radius: 3px;
|
950 |
+
white-space: nowrap;
|
951 |
+
-webkit-box-sizing: border-box;
|
952 |
+
-moz-box-sizing: border-box;
|
953 |
+
box-sizing: border-box;
|
954 |
+
font-weight: bold;
|
955 |
+
}
|
956 |
+
|
957 |
+
.quads-button-primary {
|
958 |
+
background: #0085ba;
|
959 |
+
border-color: #0073aa #006799 #006799;
|
960 |
+
-webkit-box-shadow: 0 1px 0 #006799;
|
961 |
+
box-shadow: 0 1px 0 #006799;
|
962 |
+
color: #fff;
|
963 |
+
text-decoration: none;
|
964 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
965 |
+
}
|
966 |
+
|
967 |
+
.quads-notice-dismiss {
|
968 |
+
display: inline-block;
|
969 |
+
position: relative;
|
970 |
+
top: 0;
|
971 |
+
right: 1px;
|
972 |
+
border: none;
|
973 |
+
margin: 0;
|
974 |
+
padding: 0px;
|
975 |
+
background: 0 0;
|
976 |
+
color: #72777c;
|
977 |
+
cursor: pointer;
|
978 |
+
}
|
979 |
+
|
980 |
+
.quads-notice-dismiss:before{
|
981 |
+
display: inline-block;
|
982 |
+
background: 0 0;
|
983 |
+
color: #72777c;
|
984 |
+
content: "\f153";
|
985 |
+
font: 400 16px/20px dashicons;
|
986 |
+
speak: none;
|
987 |
+
height: 20px;
|
988 |
+
text-align: center;
|
989 |
+
width: 20px;
|
990 |
+
-webkit-font-smoothing: antialiased;
|
991 |
+
}
|
992 |
+
|
993 |
+
.quads-widget-buttons {
|
994 |
+
float:right;
|
995 |
+
}
|
996 |
+
.quads-widget-buttons a{
|
997 |
+
min-width: 80px;text-align: center;font-weight: 600;
|
998 |
+
}
|
999 |
+
|
1000 |
+
#quads-vi-widget ul {
|
1001 |
+
margin: 0;
|
1002 |
+
margin-left:25px;
|
1003 |
+
padding: 0;
|
1004 |
+
background: #fff;
|
1005 |
+
float: none;
|
1006 |
+
padding-top: 0px;
|
1007 |
+
list-style-type: square;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
#quads-vi-signup-fullscreen{
|
1011 |
+
display:none;
|
1012 |
+
z-index: 999999;
|
1013 |
+
box-sizing:border-box;
|
1014 |
+
-webkit-box-sizing:border-box;
|
1015 |
+
-moz-box-sizing:border-box;
|
1016 |
+
height: 100%;
|
1017 |
+
width: 100%;
|
1018 |
+
position: absolute;
|
1019 |
+
top: 50%;
|
1020 |
+
left: 50%;
|
1021 |
+
transform: translate(-50%, -50%);
|
1022 |
+
background-color:#f0f0f0;
|
1023 |
+
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
#quads-vi-signup-container {
|
1027 |
+
width:99%;
|
1028 |
+
height:99%;
|
1029 |
+
max-width:868px;
|
1030 |
+
max-height:552px;
|
1031 |
+
}
|
1032 |
+
|
1033 |
+
#quads-vi-close{
|
1034 |
+
cursor:pointer;
|
1035 |
+
position: relative;
|
1036 |
+
display: inline-block;
|
1037 |
+
width: 20px;
|
1038 |
+
height: 20px;
|
1039 |
+
overflow: hidden;
|
1040 |
+
float: right;
|
1041 |
+
margin-right: 20px;
|
1042 |
+
margin-top: 20px;
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
#quads-vi-close::before, #quads-vi-close::after {
|
1046 |
+
content: '';
|
1047 |
+
position: absolute;
|
1048 |
+
height: 2px;
|
1049 |
+
width: 100%;
|
1050 |
+
top: 50%;
|
1051 |
+
left: 0;
|
1052 |
+
margin-top: -1px;
|
1053 |
+
background: #7d7d7d;
|
1054 |
+
}
|
1055 |
+
|
1056 |
+
#quads-vi-close::before {
|
1057 |
+
-webkit-transform: rotate(45deg);
|
1058 |
+
-moz-transform: rotate(45deg);
|
1059 |
+
-ms-transform: rotate(45deg);
|
1060 |
+
-o-transform: rotate(45deg);
|
1061 |
+
transform: rotate(45deg);
|
1062 |
+
}
|
1063 |
+
#quads-vi-close::after {
|
1064 |
+
-webkit-transform: rotate(-45deg);
|
1065 |
+
-moz-transform: rotate(-45deg);
|
1066 |
+
-ms-transform: rotate(-45deg);
|
1067 |
+
-o-transform: rotate(-45deg);
|
1068 |
+
transform: rotate(-45deg);
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
|
1072 |
+
#quads-vi-signup-fullscreen iframe{
|
1073 |
+
width:100%;
|
1074 |
+
height:100%;
|
1075 |
+
z-index: 999999;
|
1076 |
+
display: block;
|
1077 |
+
background:#FFF;
|
1078 |
+
border:none;
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
.quads-spinner {
|
1082 |
+
background: url('/wp-admin/images/spinner.gif') no-repeat;
|
1083 |
+
background-size: 16px 16px;
|
1084 |
+
display: none;
|
1085 |
+
float: left;
|
1086 |
+
opacity: .7;
|
1087 |
+
filter: alpha(opacity=70);
|
1088 |
+
width: 160px;
|
1089 |
+
height: 16px;
|
1090 |
+
margin: 5px 5px 0;
|
1091 |
+
clear:both;
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
#quads-vi-revenue-wrapper{
|
1095 |
+
margin-top: 10px;
|
1096 |
+
min-width: 565px;
|
1097 |
+
min-height: 350px;
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
#quads-vi-revenue-sum {
|
1101 |
+
font-weight: bold;
|
1102 |
+
font-size: 36px;
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
#quads-vi-revenue-sum-wrapper{
|
1106 |
+
margin-top: 20px;
|
1107 |
+
line-height: 26px;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
#quads-vi-customize-player label {
|
1111 |
+
display:inline-block;
|
1112 |
+
width:170px;
|
1113 |
+
color:black;
|
1114 |
+
font-weight: 500;
|
1115 |
+
}
|
1116 |
+
#quads-vi-shortcodes label {
|
1117 |
+
display:inline-block;
|
1118 |
+
width:170px;
|
1119 |
+
}
|
1120 |
+
#quads-vi-save-settings {
|
1121 |
+
margin-top:20px;
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
#quads-vi-welcome ul {
|
1125 |
+
float:none;
|
1126 |
+
list-style: square;
|
1127 |
+
margin-left:25px;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
.quads-tooltip {
|
1131 |
+
border-radius: 50%;
|
1132 |
+
border: 2px solid #fff;
|
1133 |
+
background-color: #e7db00;
|
1134 |
+
width: 15px;
|
1135 |
+
height: 15px;
|
1136 |
+
display: inline-block;
|
1137 |
+
position: relative;
|
1138 |
+
top: 4px;
|
1139 |
+
margin-top: -4px;
|
1140 |
+
cursor: pointer;
|
1141 |
+
margin-left: 2px;
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
.quads-tooltip:after {
|
1145 |
+
height: 20px;
|
1146 |
+
font-family: sans-serif;
|
1147 |
+
content: "?";
|
1148 |
+
color: #fff;
|
1149 |
+
font-size: 11px;
|
1150 |
+
font-weight: 700;
|
1151 |
+
left: 4px;
|
1152 |
+
top:-2px;
|
1153 |
+
position: absolute;
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
.quads-tooltip-message {
|
1157 |
+
padding: 10px;
|
1158 |
+
border: 1px solid #FBFBFB;
|
1159 |
+
border-radius: 2px;
|
1160 |
+
background-color: #F8F8F8;
|
1161 |
+
position: absolute;
|
1162 |
+
max-width: 500px;
|
1163 |
+
z-index: 9999;
|
1164 |
+
display: none;
|
1165 |
+
box-shadow: 0 0 5px rgba(0,0,0,.2);
|
1166 |
+
font-weight: 400;
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
#quads-vi-layout label{
|
1170 |
+
width: 100px;
|
1171 |
+
}
|
1172 |
+
#quads_vi_ads\[ads\]\[1\]\[marginLeft\],
|
1173 |
+
#quads_vi_ads\[ads\]\[1\]\[marginTop\],
|
1174 |
+
#quads_vi_ads\[ads\]\[1\]\[marginRight\],
|
1175 |
+
#quads_vi_ads\[ads\]\[1\]\[marginBottom\]{
|
1176 |
+
width: 60px;
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
#quads_vi_ads-ads-1-align-left-label{
|
1180 |
+
content: url('../images/align_left.png');
|
1181 |
+
}
|
1182 |
+
#quads_vi_ads-ads-1-align-right-label{
|
1183 |
+
content: url('../images/align_right.png');
|
1184 |
+
}
|
1185 |
+
#quads_vi_ads-ads-1-align-middle-label{
|
1186 |
+
content: url('../images/align_middle.png');
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
/*.quads-vi-welcome-white {
|
1190 |
+
text-decoration: underline;
|
1191 |
+
border-bottom:3px solid yellow;
|
1192 |
+
font-weight: bold;
|
1193 |
+
color:black;
|
1194 |
+
}
|
1195 |
+
.quads-vi-welcome-black {
|
1196 |
+
text-decoration: underline;
|
1197 |
+
border-bottom:3px solid yellow;
|
1198 |
+
font-weight: bold;
|
1199 |
+
color:white;
|
1200 |
+
}*/
|
1201 |
+
|
1202 |
+
#quads_vi_automatic_integration select{
|
1203 |
+
min-width: 180px;
|
1204 |
+
}
|
assets/css/quads-plugins-admin.min.css
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
/**
|
2 |
-
PLUGINS ADMIN PAGE
|
3 |
-
*/
|
4 |
-
#quick-adsense-reloaded-feedback-overlay {
|
5 |
-
/* Height & width depends on how you want to reveal the overlay (see JS below) */
|
6 |
-
height: 100%;
|
7 |
-
width: 100%;
|
8 |
-
position: fixed; /* Stay in place */
|
9 |
-
z-index: 10000; /* Sit on top */
|
10 |
-
left: 0;
|
11 |
-
top: 0;
|
12 |
-
background-color: rgb(120,120,120); /* Black fallback color */
|
13 |
-
background-color: rgba(0,0,0, 0.5); /* Black w/opacity */
|
14 |
-
}
|
15 |
-
#quick-adsense-reloaded-feedback-content {
|
16 |
-
position: relative;
|
17 |
-
top: 25%; /* 25% from the top */
|
18 |
-
width: 500px;
|
19 |
-
max-width: 100%;
|
20 |
-
margin: auto;
|
21 |
-
margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */
|
22 |
-
max-height: 50%;
|
23 |
-
padding: 20px;
|
24 |
-
background-color: #fff;
|
25 |
-
overflow-y: auto;
|
26 |
-
}
|
27 |
-
#quick-adsense-reloaded-feedback-content textarea,
|
28 |
-
#quick-adsense-reloaded-feedback-content input[type="text"] { display:none;width:100%; }
|
29 |
-
.quick-adsense-reloaded-feedback-not-deactivate { display: block; text-align: right; }
|
30 |
-
|
31 |
-
#quick-adsense-reloaded-feedback-content h3{
|
32 |
-
margin:5px;
|
33 |
-
}
|
34 |
-
|
35 |
-
|
36 |
-
@media screen and (max-width:400px){
|
37 |
-
#quick-adsense-reloaded-feedback-content {
|
38 |
-
padding:0px;
|
39 |
-
padding-bottom:50px;
|
40 |
-
}
|
41 |
Â
}
|
1 |
+
/**
|
2 |
+
PLUGINS ADMIN PAGE
|
3 |
+
*/
|
4 |
+
#quick-adsense-reloaded-feedback-overlay {
|
5 |
+
/* Height & width depends on how you want to reveal the overlay (see JS below) */
|
6 |
+
height: 100%;
|
7 |
+
width: 100%;
|
8 |
+
position: fixed; /* Stay in place */
|
9 |
+
z-index: 10000; /* Sit on top */
|
10 |
+
left: 0;
|
11 |
+
top: 0;
|
12 |
+
background-color: rgb(120,120,120); /* Black fallback color */
|
13 |
+
background-color: rgba(0,0,0, 0.5); /* Black w/opacity */
|
14 |
+
}
|
15 |
+
#quick-adsense-reloaded-feedback-content {
|
16 |
+
position: relative;
|
17 |
+
top: 25%; /* 25% from the top */
|
18 |
+
width: 500px;
|
19 |
+
max-width: 100%;
|
20 |
+
margin: auto;
|
21 |
+
margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */
|
22 |
+
max-height: 50%;
|
23 |
+
padding: 20px;
|
24 |
+
background-color: #fff;
|
25 |
+
overflow-y: auto;
|
26 |
+
}
|
27 |
+
#quick-adsense-reloaded-feedback-content textarea,
|
28 |
+
#quick-adsense-reloaded-feedback-content input[type="text"] { display:none;width:100%; }
|
29 |
+
.quick-adsense-reloaded-feedback-not-deactivate { display: block; text-align: right; }
|
30 |
+
|
31 |
+
#quick-adsense-reloaded-feedback-content h3{
|
32 |
+
margin:5px;
|
33 |
+
}
|
34 |
+
|
35 |
+
|
36 |
+
@media screen and (max-width:400px){
|
37 |
+
#quick-adsense-reloaded-feedback-content {
|
38 |
+
padding:0px;
|
39 |
+
padding-bottom:50px;
|
40 |
+
}
|
41 |
Â
}
|
assets/js/blocks.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
var el = wp.element.createElement,
|
2 |
-
registerBlockType = wp.blocks.registerBlockType,
|
3 |
-
blockStyle = { backgroundColor: '#900', color: '#fff', padding: '20px' };
|
4 |
-
|
5 |
-
registerBlockType( 'wpquads/blocks', {
|
6 |
-
title: 'Hello World (Step 1)',
|
7 |
-
|
8 |
-
icon: 'universal-access-alt',
|
9 |
-
|
10 |
-
category: 'layout',
|
11 |
-
|
12 |
-
edit: function() {
|
13 |
-
return el( 'p', { style: blockStyle }, 'Hello editor.' );
|
14 |
-
},
|
15 |
-
|
16 |
-
save: function() {
|
17 |
-
return el( 'p', { style: blockStyle }, 'Hello saved content.' );
|
18 |
-
},
|
19 |
-
} );
|
20 |
-
|
21 |
-
|
1 |
+
var el = wp.element.createElement,
|
2 |
+
registerBlockType = wp.blocks.registerBlockType,
|
3 |
+
blockStyle = { backgroundColor: '#900', color: '#fff', padding: '20px' };
|
4 |
+
|
5 |
+
registerBlockType( 'wpquads/blocks', {
|
6 |
+
title: 'Hello World (Step 1)',
|
7 |
+
|
8 |
+
icon: 'universal-access-alt',
|
9 |
+
|
10 |
+
category: 'layout',
|
11 |
+
|
12 |
+
edit: function() {
|
13 |
+
return el( 'p', { style: blockStyle }, 'Hello editor.' );
|
14 |
+
},
|
15 |
+
|
16 |
+
save: function() {
|
17 |
+
return el( 'p', { style: blockStyle }, 'Hello saved content.' );
|
18 |
+
},
|
19 |
+
} );
|
20 |
+
|
21 |
+
|
assets/js/chosen.jquery.js
CHANGED
@@ -1,1284 +1,1284 @@
|
|
1 |
-
/*!
|
2 |
-
Chosen, a Select Box Enhancer for jQuery and Prototype
|
3 |
-
by Patrick Filler for Harvest, http://getharvest.com
|
4 |
-
|
5 |
-
Version 1.5.1
|
6 |
-
Full source at https://github.com/harvesthq/chosen
|
7 |
-
Copyright (c) 2011-2016 Harvest http://getharvest.com
|
8 |
-
|
9 |
-
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
10 |
-
This file is generated by `grunt build`, do not edit it by hand.
|
11 |
-
*/
|
12 |
-
|
13 |
-
(function() {
|
14 |
-
var $, AbstractChosen, Chosen, SelectParser, _ref,
|
15 |
-
__hasProp = {}.hasOwnProperty,
|
16 |
-
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
17 |
-
|
18 |
-
SelectParser = (function() {
|
19 |
-
function SelectParser() {
|
20 |
-
this.options_index = 0;
|
21 |
-
this.parsed = [];
|
22 |
-
}
|
23 |
-
|
24 |
-
SelectParser.prototype.add_node = function(child) {
|
25 |
-
if (child.nodeName.toUpperCase() === "OPTGROUP") {
|
26 |
-
return this.add_group(child);
|
27 |
-
} else {
|
28 |
-
return this.add_option(child);
|
29 |
-
}
|
30 |
-
};
|
31 |
-
|
32 |
-
SelectParser.prototype.add_group = function(group) {
|
33 |
-
var group_position, option, _i, _len, _ref, _results;
|
34 |
-
group_position = this.parsed.length;
|
35 |
-
this.parsed.push({
|
36 |
-
array_index: group_position,
|
37 |
-
group: true,
|
38 |
-
label: this.escapeExpression(group.label),
|
39 |
-
title: group.title ? group.title : void 0,
|
40 |
-
children: 0,
|
41 |
-
disabled: group.disabled,
|
42 |
-
classes: group.className
|
43 |
-
});
|
44 |
-
_ref = group.childNodes;
|
45 |
-
_results = [];
|
46 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
47 |
-
option = _ref[_i];
|
48 |
-
_results.push(this.add_option(option, group_position, group.disabled));
|
49 |
-
}
|
50 |
-
return _results;
|
51 |
-
};
|
52 |
-
|
53 |
-
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
54 |
-
if (option.nodeName.toUpperCase() === "OPTION") {
|
55 |
-
if (option.text !== "") {
|
56 |
-
if (group_position != null) {
|
57 |
-
this.parsed[group_position].children += 1;
|
58 |
-
}
|
59 |
-
this.parsed.push({
|
60 |
-
array_index: this.parsed.length,
|
61 |
-
options_index: this.options_index,
|
62 |
-
value: option.value,
|
63 |
-
text: option.text,
|
64 |
-
html: option.innerHTML,
|
65 |
-
title: option.title ? option.title : void 0,
|
66 |
-
selected: option.selected,
|
67 |
-
disabled: group_disabled === true ? group_disabled : option.disabled,
|
68 |
-
group_array_index: group_position,
|
69 |
-
group_label: group_position != null ? this.parsed[group_position].label : null,
|
70 |
-
classes: option.className,
|
71 |
-
style: option.style.cssText
|
72 |
-
});
|
73 |
-
} else {
|
74 |
-
this.parsed.push({
|
75 |
-
array_index: this.parsed.length,
|
76 |
-
options_index: this.options_index,
|
77 |
-
empty: true
|
78 |
-
});
|
79 |
-
}
|
80 |
-
return this.options_index += 1;
|
81 |
-
}
|
82 |
-
};
|
83 |
-
|
84 |
-
SelectParser.prototype.escapeExpression = function(text) {
|
85 |
-
var map, unsafe_chars;
|
86 |
-
if ((text == null) || text === false) {
|
87 |
-
return "";
|
88 |
-
}
|
89 |
-
if (!/[\&\<\>\"\'\`]/.test(text)) {
|
90 |
-
return text;
|
91 |
-
}
|
92 |
-
map = {
|
93 |
-
"<": "<",
|
94 |
-
">": ">",
|
95 |
-
'"': """,
|
96 |
-
"'": "'",
|
97 |
-
"`": "`"
|
98 |
-
};
|
99 |
-
unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
|
100 |
-
return text.replace(unsafe_chars, function(chr) {
|
101 |
-
return map[chr] || "&";
|
102 |
-
});
|
103 |
-
};
|
104 |
-
|
105 |
-
return SelectParser;
|
106 |
-
|
107 |
-
})();
|
108 |
-
|
109 |
-
SelectParser.select_to_array = function(select) {
|
110 |
-
var child, parser, _i, _len, _ref;
|
111 |
-
parser = new SelectParser();
|
112 |
-
_ref = select.childNodes;
|
113 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
114 |
-
child = _ref[_i];
|
115 |
-
parser.add_node(child);
|
116 |
-
}
|
117 |
-
return parser.parsed;
|
118 |
-
};
|
119 |
-
|
120 |
-
AbstractChosen = (function() {
|
121 |
-
function AbstractChosen(form_field, options) {
|
122 |
-
this.form_field = form_field;
|
123 |
-
this.options = options != null ? options : {};
|
124 |
-
if (!AbstractChosen.browser_is_supported()) {
|
125 |
-
return;
|
126 |
-
}
|
127 |
-
this.is_multiple = this.form_field.multiple;
|
128 |
-
this.set_default_text();
|
129 |
-
this.set_default_values();
|
130 |
-
this.setup();
|
131 |
-
this.set_up_html();
|
132 |
-
this.register_observers();
|
133 |
-
this.on_ready();
|
134 |
-
}
|
135 |
-
|
136 |
-
AbstractChosen.prototype.set_default_values = function() {
|
137 |
-
var _this = this;
|
138 |
-
this.click_test_action = function(evt) {
|
139 |
-
return _this.test_active_click(evt);
|
140 |
-
};
|
141 |
-
this.activate_action = function(evt) {
|
142 |
-
return _this.activate_field(evt);
|
143 |
-
};
|
144 |
-
this.active_field = false;
|
145 |
-
this.mouse_on_container = false;
|
146 |
-
this.results_showing = false;
|
147 |
-
this.result_highlighted = null;
|
148 |
-
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
149 |
-
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
150 |
-
this.disable_search = this.options.disable_search || false;
|
151 |
-
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
|
152 |
-
this.group_search = this.options.group_search != null ? this.options.group_search : true;
|
153 |
-
this.search_contains = this.options.search_contains || false;
|
154 |
-
this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
|
155 |
-
this.max_selected_options = this.options.max_selected_options || Infinity;
|
156 |
-
this.inherit_select_classes = this.options.inherit_select_classes || false;
|
157 |
-
this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
|
158 |
-
this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
|
159 |
-
this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
|
160 |
-
return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
|
161 |
-
};
|
162 |
-
|
163 |
-
AbstractChosen.prototype.set_default_text = function() {
|
164 |
-
if (this.form_field.getAttribute("data-placeholder")) {
|
165 |
-
this.default_text = this.form_field.getAttribute("data-placeholder");
|
166 |
-
} else if (this.is_multiple) {
|
167 |
-
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
|
168 |
-
} else {
|
169 |
-
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
|
170 |
-
}
|
171 |
-
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
|
172 |
-
};
|
173 |
-
|
174 |
-
AbstractChosen.prototype.choice_label = function(item) {
|
175 |
-
if (this.include_group_label_in_selected && (item.group_label != null)) {
|
176 |
-
return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
|
177 |
-
} else {
|
178 |
-
return item.html;
|
179 |
-
}
|
180 |
-
};
|
181 |
-
|
182 |
-
AbstractChosen.prototype.mouse_enter = function() {
|
183 |
-
return this.mouse_on_container = true;
|
184 |
-
};
|
185 |
-
|
186 |
-
AbstractChosen.prototype.mouse_leave = function() {
|
187 |
-
return this.mouse_on_container = false;
|
188 |
-
};
|
189 |
-
|
190 |
-
AbstractChosen.prototype.input_focus = function(evt) {
|
191 |
-
var _this = this;
|
192 |
-
if (this.is_multiple) {
|
193 |
-
if (!this.active_field) {
|
194 |
-
return setTimeout((function() {
|
195 |
-
return _this.container_mousedown();
|
196 |
-
}), 50);
|
197 |
-
}
|
198 |
-
} else {
|
199 |
-
if (!this.active_field) {
|
200 |
-
return this.activate_field();
|
201 |
-
}
|
202 |
-
}
|
203 |
-
};
|
204 |
-
|
205 |
-
AbstractChosen.prototype.input_blur = function(evt) {
|
206 |
-
var _this = this;
|
207 |
-
if (!this.mouse_on_container) {
|
208 |
-
this.active_field = false;
|
209 |
-
return setTimeout((function() {
|
210 |
-
return _this.blur_test();
|
211 |
-
}), 100);
|
212 |
-
}
|
213 |
-
};
|
214 |
-
|
215 |
-
AbstractChosen.prototype.results_option_build = function(options) {
|
216 |
-
var content, data, data_content, shown_results, _i, _len, _ref;
|
217 |
-
content = '';
|
218 |
-
shown_results = 0;
|
219 |
-
_ref = this.results_data;
|
220 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
221 |
-
data = _ref[_i];
|
222 |
-
data_content = '';
|
223 |
-
if (data.group) {
|
224 |
-
data_content = this.result_add_group(data);
|
225 |
-
} else {
|
226 |
-
data_content = this.result_add_option(data);
|
227 |
-
}
|
228 |
-
if (data_content !== '') {
|
229 |
-
shown_results++;
|
230 |
-
content += data_content;
|
231 |
-
}
|
232 |
-
if (options != null ? options.first : void 0) {
|
233 |
-
if (data.selected && this.is_multiple) {
|
234 |
-
this.choice_build(data);
|
235 |
-
} else if (data.selected && !this.is_multiple) {
|
236 |
-
this.single_set_selected_text(this.choice_label(data));
|
237 |
-
}
|
238 |
-
}
|
239 |
-
if (shown_results >= this.max_shown_results) {
|
240 |
-
break;
|
241 |
-
}
|
242 |
-
}
|
243 |
-
return content;
|
244 |
-
};
|
245 |
-
|
246 |
-
AbstractChosen.prototype.result_add_option = function(option) {
|
247 |
-
var classes, option_el;
|
248 |
-
if (!option.search_match) {
|
249 |
-
return '';
|
250 |
-
}
|
251 |
-
if (!this.include_option_in_results(option)) {
|
252 |
-
return '';
|
253 |
-
}
|
254 |
-
classes = [];
|
255 |
-
if (!option.disabled && !(option.selected && this.is_multiple)) {
|
256 |
-
classes.push("active-result");
|
257 |
-
}
|
258 |
-
if (option.disabled && !(option.selected && this.is_multiple)) {
|
259 |
-
classes.push("disabled-result");
|
260 |
-
}
|
261 |
-
if (option.selected) {
|
262 |
-
classes.push("result-selected");
|
263 |
-
}
|
264 |
-
if (option.group_array_index != null) {
|
265 |
-
classes.push("group-option");
|
266 |
-
}
|
267 |
-
if (option.classes !== "") {
|
268 |
-
classes.push(option.classes);
|
269 |
-
}
|
270 |
-
option_el = document.createElement("li");
|
271 |
-
option_el.className = classes.join(" ");
|
272 |
-
option_el.style.cssText = option.style;
|
273 |
-
option_el.setAttribute("data-option-array-index", option.array_index);
|
274 |
-
option_el.innerHTML = option.search_text;
|
275 |
-
if (option.title) {
|
276 |
-
option_el.title = option.title;
|
277 |
-
}
|
278 |
-
return this.outerHTML(option_el);
|
279 |
-
};
|
280 |
-
|
281 |
-
AbstractChosen.prototype.result_add_group = function(group) {
|
282 |
-
var classes, group_el;
|
283 |
-
if (!(group.search_match || group.group_match)) {
|
284 |
-
return '';
|
285 |
-
}
|
286 |
-
if (!(group.active_options > 0)) {
|
287 |
-
return '';
|
288 |
-
}
|
289 |
-
classes = [];
|
290 |
-
classes.push("group-result");
|
291 |
-
if (group.classes) {
|
292 |
-
classes.push(group.classes);
|
293 |
-
}
|
294 |
-
group_el = document.createElement("li");
|
295 |
-
group_el.className = classes.join(" ");
|
296 |
-
group_el.innerHTML = group.search_text;
|
297 |
-
if (group.title) {
|
298 |
-
group_el.title = group.title;
|
299 |
-
}
|
300 |
-
return this.outerHTML(group_el);
|
301 |
-
};
|
302 |
-
|
303 |
-
AbstractChosen.prototype.results_update_field = function() {
|
304 |
-
this.set_default_text();
|
305 |
-
if (!this.is_multiple) {
|
306 |
-
this.results_reset_cleanup();
|
307 |
-
}
|
308 |
-
this.result_clear_highlight();
|
309 |
-
this.results_build();
|
310 |
-
if (this.results_showing) {
|
311 |
-
return this.winnow_results();
|
312 |
-
}
|
313 |
-
};
|
314 |
-
|
315 |
-
AbstractChosen.prototype.reset_single_select_options = function() {
|
316 |
-
var result, _i, _len, _ref, _results;
|
317 |
-
_ref = this.results_data;
|
318 |
-
_results = [];
|
319 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
320 |
-
result = _ref[_i];
|
321 |
-
if (result.selected) {
|
322 |
-
_results.push(result.selected = false);
|
323 |
-
} else {
|
324 |
-
_results.push(void 0);
|
325 |
-
}
|
326 |
-
}
|
327 |
-
return _results;
|
328 |
-
};
|
329 |
-
|
330 |
-
AbstractChosen.prototype.results_toggle = function() {
|
331 |
-
if (this.results_showing) {
|
332 |
-
return this.results_hide();
|
333 |
-
} else {
|
334 |
-
return this.results_show();
|
335 |
-
}
|
336 |
-
};
|
337 |
-
|
338 |
-
AbstractChosen.prototype.results_search = function(evt) {
|
339 |
-
if (this.results_showing) {
|
340 |
-
return this.winnow_results();
|
341 |
-
} else {
|
342 |
-
return this.results_show();
|
343 |
-
}
|
344 |
-
};
|
345 |
-
|
346 |
-
AbstractChosen.prototype.winnow_results = function() {
|
347 |
-
var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
|
348 |
-
this.no_results_clear();
|
349 |
-
results = 0;
|
350 |
-
searchText = this.get_search_text();
|
351 |
-
escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
352 |
-
zregex = new RegExp(escapedSearchText, 'i');
|
353 |
-
regex = this.get_search_regex(escapedSearchText);
|
354 |
-
_ref = this.results_data;
|
355 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
356 |
-
option = _ref[_i];
|
357 |
-
option.search_match = false;
|
358 |
-
results_group = null;
|
359 |
-
if (this.include_option_in_results(option)) {
|
360 |
-
if (option.group) {
|
361 |
-
option.group_match = false;
|
362 |
-
option.active_options = 0;
|
363 |
-
}
|
364 |
-
if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
|
365 |
-
results_group = this.results_data[option.group_array_index];
|
366 |
-
if (results_group.active_options === 0 && results_group.search_match) {
|
367 |
-
results += 1;
|
368 |
-
}
|
369 |
-
results_group.active_options += 1;
|
370 |
-
}
|
371 |
-
option.search_text = option.group ? option.label : option.html;
|
372 |
-
if (!(option.group && !this.group_search)) {
|
373 |
-
option.search_match = this.search_string_match(option.search_text, regex);
|
374 |
-
if (option.search_match && !option.group) {
|
375 |
-
results += 1;
|
376 |
-
}
|
377 |
-
if (option.search_match) {
|
378 |
-
if (searchText.length) {
|
379 |
-
startpos = option.search_text.search(zregex);
|
380 |
-
text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
|
381 |
-
option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
|
382 |
-
}
|
383 |
-
if (results_group != null) {
|
384 |
-
results_group.group_match = true;
|
385 |
-
}
|
386 |
-
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
|
387 |
-
option.search_match = true;
|
388 |
-
}
|
389 |
-
}
|
390 |
-
}
|
391 |
-
}
|
392 |
-
this.result_clear_highlight();
|
393 |
-
if (results < 1 && searchText.length) {
|
394 |
-
this.update_results_content("");
|
395 |
-
return this.no_results(searchText);
|
396 |
-
} else {
|
397 |
-
this.update_results_content(this.results_option_build());
|
398 |
-
return this.winnow_results_set_highlight();
|
399 |
-
}
|
400 |
-
};
|
401 |
-
|
402 |
-
AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
|
403 |
-
var regex_anchor;
|
404 |
-
regex_anchor = this.search_contains ? "" : "^";
|
405 |
-
return new RegExp(regex_anchor + escaped_search_string, 'i');
|
406 |
-
};
|
407 |
-
|
408 |
-
AbstractChosen.prototype.search_string_match = function(search_string, regex) {
|
409 |
-
var part, parts, _i, _len;
|
410 |
-
if (regex.test(search_string)) {
|
411 |
-
return true;
|
412 |
-
} else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
|
413 |
-
parts = search_string.replace(/\[|\]/g, "").split(" ");
|
414 |
-
if (parts.length) {
|
415 |
-
for (_i = 0, _len = parts.length; _i < _len; _i++) {
|
416 |
-
part = parts[_i];
|
417 |
-
if (regex.test(part)) {
|
418 |
-
return true;
|
419 |
-
}
|
420 |
-
}
|
421 |
-
}
|
422 |
-
}
|
423 |
-
};
|
424 |
-
|
425 |
-
AbstractChosen.prototype.choices_count = function() {
|
426 |
-
var option, _i, _len, _ref;
|
427 |
-
if (this.selected_option_count != null) {
|
428 |
-
return this.selected_option_count;
|
429 |
-
}
|
430 |
-
this.selected_option_count = 0;
|
431 |
-
_ref = this.form_field.options;
|
432 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
433 |
-
option = _ref[_i];
|
434 |
-
if (option.selected) {
|
435 |
-
this.selected_option_count += 1;
|
436 |
-
}
|
437 |
-
}
|
438 |
-
return this.selected_option_count;
|
439 |
-
};
|
440 |
-
|
441 |
-
AbstractChosen.prototype.choices_click = function(evt) {
|
442 |
-
evt.preventDefault();
|
443 |
-
if (!(this.results_showing || this.is_disabled)) {
|
444 |
-
return this.results_show();
|
445 |
-
}
|
446 |
-
};
|
447 |
-
|
448 |
-
AbstractChosen.prototype.keyup_checker = function(evt) {
|
449 |
-
var stroke, _ref;
|
450 |
-
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
451 |
-
this.search_field_scale();
|
452 |
-
switch (stroke) {
|
453 |
-
case 8:
|
454 |
-
if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
|
455 |
-
return this.keydown_backstroke();
|
456 |
-
} else if (!this.pending_backstroke) {
|
457 |
-
this.result_clear_highlight();
|
458 |
-
return this.results_search();
|
459 |
-
}
|
460 |
-
break;
|
461 |
-
case 13:
|
462 |
-
evt.preventDefault();
|
463 |
-
if (this.results_showing) {
|
464 |
-
return this.result_select(evt);
|
465 |
-
}
|
466 |
-
break;
|
467 |
-
case 27:
|
468 |
-
if (this.results_showing) {
|
469 |
-
this.results_hide();
|
470 |
-
}
|
471 |
-
return true;
|
472 |
-
case 9:
|
473 |
-
case 38:
|
474 |
-
case 40:
|
475 |
-
case 16:
|
476 |
-
case 91:
|
477 |
-
case 17:
|
478 |
-
case 18:
|
479 |
-
break;
|
480 |
-
default:
|
481 |
-
return this.results_search();
|
482 |
-
}
|
483 |
-
};
|
484 |
-
|
485 |
-
AbstractChosen.prototype.clipboard_event_checker = function(evt) {
|
486 |
-
var _this = this;
|
487 |
-
return setTimeout((function() {
|
488 |
-
return _this.results_search();
|
489 |
-
}), 50);
|
490 |
-
};
|
491 |
-
|
492 |
-
AbstractChosen.prototype.container_width = function() {
|
493 |
-
if (this.options.width != null) {
|
494 |
-
return this.options.width;
|
495 |
-
} else {
|
496 |
-
return "" + this.form_field.offsetWidth + "px";
|
497 |
-
}
|
498 |
-
};
|
499 |
-
|
500 |
-
AbstractChosen.prototype.include_option_in_results = function(option) {
|
501 |
-
if (this.is_multiple && (!this.display_selected_options && option.selected)) {
|
502 |
-
return false;
|
503 |
-
}
|
504 |
-
if (!this.display_disabled_options && option.disabled) {
|
505 |
-
return false;
|
506 |
-
}
|
507 |
-
if (option.empty) {
|
508 |
-
return false;
|
509 |
-
}
|
510 |
-
return true;
|
511 |
-
};
|
512 |
-
|
513 |
-
AbstractChosen.prototype.search_results_touchstart = function(evt) {
|
514 |
-
this.touch_started = true;
|
515 |
-
return this.search_results_mouseover(evt);
|
516 |
-
};
|
517 |
-
|
518 |
-
AbstractChosen.prototype.search_results_touchmove = function(evt) {
|
519 |
-
this.touch_started = false;
|
520 |
-
return this.search_results_mouseout(evt);
|
521 |
-
};
|
522 |
-
|
523 |
-
AbstractChosen.prototype.search_results_touchend = function(evt) {
|
524 |
-
if (this.touch_started) {
|
525 |
-
return this.search_results_mouseup(evt);
|
526 |
-
}
|
527 |
-
};
|
528 |
-
|
529 |
-
AbstractChosen.prototype.outerHTML = function(element) {
|
530 |
-
var tmp;
|
531 |
-
if (element.outerHTML) {
|
532 |
-
return element.outerHTML;
|
533 |
-
}
|
534 |
-
tmp = document.createElement("div");
|
535 |
-
tmp.appendChild(element);
|
536 |
-
return tmp.innerHTML;
|
537 |
-
};
|
538 |
-
|
539 |
-
AbstractChosen.browser_is_supported = function() {
|
540 |
-
if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
|
541 |
-
return false;
|
542 |
-
}
|
543 |
-
if (/Android/i.test(window.navigator.userAgent)) {
|
544 |
-
if (/Mobile/i.test(window.navigator.userAgent)) {
|
545 |
-
return false;
|
546 |
-
}
|
547 |
-
}
|
548 |
-
if (/IEMobile/i.test(window.navigator.userAgent)) {
|
549 |
-
return false;
|
550 |
-
}
|
551 |
-
if (/Windows Phone/i.test(window.navigator.userAgent)) {
|
552 |
-
return false;
|
553 |
-
}
|
554 |
-
if (/BlackBerry/i.test(window.navigator.userAgent)) {
|
555 |
-
return false;
|
556 |
-
}
|
557 |
-
if (/BB10/i.test(window.navigator.userAgent)) {
|
558 |
-
return false;
|
559 |
-
}
|
560 |
-
if (window.navigator.appName === "Microsoft Internet Explorer") {
|
561 |
-
return document.documentMode >= 8;
|
562 |
-
}
|
563 |
-
return true;
|
564 |
-
};
|
565 |
-
|
566 |
-
AbstractChosen.default_multiple_text = "Select Some Options";
|
567 |
-
|
568 |
-
AbstractChosen.default_single_text = "Select an Option";
|
569 |
-
|
570 |
-
AbstractChosen.default_no_result_text = "No results match";
|
571 |
-
|
572 |
-
return AbstractChosen;
|
573 |
-
|
574 |
-
})();
|
575 |
-
|
576 |
-
$ = jQuery;
|
577 |
-
|
578 |
-
$.fn.extend({
|
579 |
-
chosen: function(options) {
|
580 |
-
if (!AbstractChosen.browser_is_supported()) {
|
581 |
-
return this;
|
582 |
-
}
|
583 |
-
return this.each(function(input_field) {
|
584 |
-
var $this, chosen;
|
585 |
-
$this = $(this);
|
586 |
-
chosen = $this.data('chosen');
|
587 |
-
if (options === 'destroy') {
|
588 |
-
if (chosen instanceof Chosen) {
|
589 |
-
chosen.destroy();
|
590 |
-
}
|
591 |
-
return;
|
592 |
-
}
|
593 |
-
if (!(chosen instanceof Chosen)) {
|
594 |
-
$this.data('chosen', new Chosen(this, options));
|
595 |
-
}
|
596 |
-
});
|
597 |
-
}
|
598 |
-
});
|
599 |
-
|
600 |
-
Chosen = (function(_super) {
|
601 |
-
__extends(Chosen, _super);
|
602 |
-
|
603 |
-
function Chosen() {
|
604 |
-
_ref = Chosen.__super__.constructor.apply(this, arguments);
|
605 |
-
return _ref;
|
606 |
-
}
|
607 |
-
|
608 |
-
Chosen.prototype.setup = function() {
|
609 |
-
this.form_field_jq = $(this.form_field);
|
610 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
611 |
-
return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
|
612 |
-
};
|
613 |
-
|
614 |
-
Chosen.prototype.set_up_html = function() {
|
615 |
-
var container_classes, container_props;
|
616 |
-
container_classes = ["chosen-container"];
|
617 |
-
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
|
618 |
-
if (this.inherit_select_classes && this.form_field.className) {
|
619 |
-
container_classes.push(this.form_field.className);
|
620 |
-
}
|
621 |
-
if (this.is_rtl) {
|
622 |
-
container_classes.push("chosen-rtl");
|
623 |
-
}
|
624 |
-
container_props = {
|
625 |
-
'class': container_classes.join(' '),
|
626 |
-
'style': "width: " + (this.container_width()) + ";",
|
627 |
-
'title': this.form_field.title
|
628 |
-
};
|
629 |
-
if (this.form_field.id.length) {
|
630 |
-
container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
|
631 |
-
}
|
632 |
-
this.container = $("<div />", container_props);
|
633 |
-
if (this.is_multiple) {
|
634 |
-
this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
|
635 |
-
} else {
|
636 |
-
this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
|
637 |
-
}
|
638 |
-
this.form_field_jq.hide().after(this.container);
|
639 |
-
this.dropdown = this.container.find('div.chosen-drop').first();
|
640 |
-
this.search_field = this.container.find('input').first();
|
641 |
-
this.search_results = this.container.find('ul.chosen-results').first();
|
642 |
-
this.search_field_scale();
|
643 |
-
this.search_no_results = this.container.find('li.no-results').first();
|
644 |
-
if (this.is_multiple) {
|
645 |
-
this.search_choices = this.container.find('ul.chosen-choices').first();
|
646 |
-
this.search_container = this.container.find('li.search-field').first();
|
647 |
-
} else {
|
648 |
-
this.search_container = this.container.find('div.chosen-search').first();
|
649 |
-
this.selected_item = this.container.find('.chosen-single').first();
|
650 |
-
}
|
651 |
-
this.results_build();
|
652 |
-
this.set_tab_index();
|
653 |
-
return this.set_label_behavior();
|
654 |
-
};
|
655 |
-
|
656 |
-
Chosen.prototype.on_ready = function() {
|
657 |
-
return this.form_field_jq.trigger("chosen:ready", {
|
658 |
-
chosen: this
|
659 |
-
});
|
660 |
-
};
|
661 |
-
|
662 |
-
Chosen.prototype.register_observers = function() {
|
663 |
-
var _this = this;
|
664 |
-
this.container.bind('touchstart.chosen', function(evt) {
|
665 |
-
_this.container_mousedown(evt);
|
666 |
-
return evt.preventDefault();
|
667 |
-
});
|
668 |
-
this.container.bind('touchend.chosen', function(evt) {
|
669 |
-
_this.container_mouseup(evt);
|
670 |
-
return evt.preventDefault();
|
671 |
-
});
|
672 |
-
this.container.bind('mousedown.chosen', function(evt) {
|
673 |
-
_this.container_mousedown(evt);
|
674 |
-
});
|
675 |
-
this.container.bind('mouseup.chosen', function(evt) {
|
676 |
-
_this.container_mouseup(evt);
|
677 |
-
});
|
678 |
-
this.container.bind('mouseenter.chosen', function(evt) {
|
679 |
-
_this.mouse_enter(evt);
|
680 |
-
});
|
681 |
-
this.container.bind('mouseleave.chosen', function(evt) {
|
682 |
-
_this.mouse_leave(evt);
|
683 |
-
});
|
684 |
-
this.search_results.bind('mouseup.chosen', function(evt) {
|
685 |
-
_this.search_results_mouseup(evt);
|
686 |
-
});
|
687 |
-
this.search_results.bind('mouseover.chosen', function(evt) {
|
688 |
-
_this.search_results_mouseover(evt);
|
689 |
-
});
|
690 |
-
this.search_results.bind('mouseout.chosen', function(evt) {
|
691 |
-
_this.search_results_mouseout(evt);
|
692 |
-
});
|
693 |
-
this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
|
694 |
-
_this.search_results_mousewheel(evt);
|
695 |
-
});
|
696 |
-
this.search_results.bind('touchstart.chosen', function(evt) {
|
697 |
-
_this.search_results_touchstart(evt);
|
698 |
-
});
|
699 |
-
this.search_results.bind('touchmove.chosen', function(evt) {
|
700 |
-
_this.search_results_touchmove(evt);
|
701 |
-
});
|
702 |
-
this.search_results.bind('touchend.chosen', function(evt) {
|
703 |
-
_this.search_results_touchend(evt);
|
704 |
-
});
|
705 |
-
this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
|
706 |
-
_this.results_update_field(evt);
|
707 |
-
});
|
708 |
-
this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
|
709 |
-
_this.activate_field(evt);
|
710 |
-
});
|
711 |
-
this.form_field_jq.bind("chosen:open.chosen", function(evt) {
|
712 |
-
_this.container_mousedown(evt);
|
713 |
-
});
|
714 |
-
this.form_field_jq.bind("chosen:close.chosen", function(evt) {
|
715 |
-
_this.input_blur(evt);
|
716 |
-
});
|
717 |
-
this.search_field.bind('blur.chosen', function(evt) {
|
718 |
-
_this.input_blur(evt);
|
719 |
-
});
|
720 |
-
this.search_field.bind('keyup.chosen', function(evt) {
|
721 |
-
_this.keyup_checker(evt);
|
722 |
-
});
|
723 |
-
this.search_field.bind('keydown.chosen', function(evt) {
|
724 |
-
_this.keydown_checker(evt);
|
725 |
-
});
|
726 |
-
this.search_field.bind('focus.chosen', function(evt) {
|
727 |
-
_this.input_focus(evt);
|
728 |
-
});
|
729 |
-
this.search_field.bind('cut.chosen', function(evt) {
|
730 |
-
_this.clipboard_event_checker(evt);
|
731 |
-
});
|
732 |
-
this.search_field.bind('paste.chosen', function(evt) {
|
733 |
-
_this.clipboard_event_checker(evt);
|
734 |
-
});
|
735 |
-
if (this.is_multiple) {
|
736 |
-
return this.search_choices.bind('click.chosen', function(evt) {
|
737 |
-
_this.choices_click(evt);
|
738 |
-
});
|
739 |
-
} else {
|
740 |
-
return this.container.bind('click.chosen', function(evt) {
|
741 |
-
evt.preventDefault();
|
742 |
-
});
|
743 |
-
}
|
744 |
-
};
|
745 |
-
|
746 |
-
Chosen.prototype.destroy = function() {
|
747 |
-
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
748 |
-
if (this.search_field[0].tabIndex) {
|
749 |
-
this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
|
750 |
-
}
|
751 |
-
this.container.remove();
|
752 |
-
this.form_field_jq.removeData('chosen');
|
753 |
-
return this.form_field_jq.show();
|
754 |
-
};
|
755 |
-
|
756 |
-
Chosen.prototype.search_field_disabled = function() {
|
757 |
-
this.is_disabled = this.form_field_jq[0].disabled;
|
758 |
-
if (this.is_disabled) {
|
759 |
-
this.container.addClass('chosen-disabled');
|
760 |
-
this.search_field[0].disabled = true;
|
761 |
-
if (!this.is_multiple) {
|
762 |
-
this.selected_item.unbind("focus.chosen", this.activate_action);
|
763 |
-
}
|
764 |
-
return this.close_field();
|
765 |
-
} else {
|
766 |
-
this.container.removeClass('chosen-disabled');
|
767 |
-
this.search_field[0].disabled = false;
|
768 |
-
if (!this.is_multiple) {
|
769 |
-
return this.selected_item.bind("focus.chosen", this.activate_action);
|
770 |
-
}
|
771 |
-
}
|
772 |
-
};
|
773 |
-
|
774 |
-
Chosen.prototype.container_mousedown = function(evt) {
|
775 |
-
if (!this.is_disabled) {
|
776 |
-
if (evt && evt.type === "mousedown" && !this.results_showing) {
|
777 |
-
evt.preventDefault();
|
778 |
-
}
|
779 |
-
if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
|
780 |
-
if (!this.active_field) {
|
781 |
-
if (this.is_multiple) {
|
782 |
-
this.search_field.val("");
|
783 |
-
}
|
784 |
-
$(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
|
785 |
-
this.results_show();
|
786 |
-
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
|
787 |
-
evt.preventDefault();
|
788 |
-
this.results_toggle();
|
789 |
-
}
|
790 |
-
return this.activate_field();
|
791 |
-
}
|
792 |
-
}
|
793 |
-
};
|
794 |
-
|
795 |
-
Chosen.prototype.container_mouseup = function(evt) {
|
796 |
-
if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
|
797 |
-
return this.results_reset(evt);
|
798 |
-
}
|
799 |
-
};
|
800 |
-
|
801 |
-
Chosen.prototype.search_results_mousewheel = function(evt) {
|
802 |
-
var delta;
|
803 |
-
if (evt.originalEvent) {
|
804 |
-
delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
|
805 |
-
}
|
806 |
-
if (delta != null) {
|
807 |
-
evt.preventDefault();
|
808 |
-
if (evt.type === 'DOMMouseScroll') {
|
809 |
-
delta = delta * 40;
|
810 |
-
}
|
811 |
-
return this.search_results.scrollTop(delta + this.search_results.scrollTop());
|
812 |
-
}
|
813 |
-
};
|
814 |
-
|
815 |
-
Chosen.prototype.blur_test = function(evt) {
|
816 |
-
if (!this.active_field && this.container.hasClass("chosen-container-active")) {
|
817 |
-
return this.close_field();
|
818 |
-
}
|
819 |
-
};
|
820 |
-
|
821 |
-
Chosen.prototype.close_field = function() {
|
822 |
-
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
823 |
-
this.active_field = false;
|
824 |
-
this.results_hide();
|
825 |
-
this.container.removeClass("chosen-container-active");
|
826 |
-
this.clear_backstroke();
|
827 |
-
this.show_search_field_default();
|
828 |
-
return this.search_field_scale();
|
829 |
-
};
|
830 |
-
|
831 |
-
Chosen.prototype.activate_field = function() {
|
832 |
-
this.container.addClass("chosen-container-active");
|
833 |
-
this.active_field = true;
|
834 |
-
this.search_field.val(this.search_field.val());
|
835 |
-
return this.search_field.focus();
|
836 |
-
};
|
837 |
-
|
838 |
-
Chosen.prototype.test_active_click = function(evt) {
|
839 |
-
var active_container;
|
840 |
-
active_container = $(evt.target).closest('.chosen-container');
|
841 |
-
if (active_container.length && this.container[0] === active_container[0]) {
|
842 |
-
return this.active_field = true;
|
843 |
-
} else {
|
844 |
-
return this.close_field();
|
845 |
-
}
|
846 |
-
};
|
847 |
-
|
848 |
-
Chosen.prototype.results_build = function() {
|
849 |
-
this.parsing = true;
|
850 |
-
this.selected_option_count = null;
|
851 |
-
this.results_data = SelectParser.select_to_array(this.form_field);
|
852 |
-
if (this.is_multiple) {
|
853 |
-
this.search_choices.find("li.search-choice").remove();
|
854 |
-
} else if (!this.is_multiple) {
|
855 |
-
this.single_set_selected_text();
|
856 |
-
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
|
857 |
-
this.search_field[0].readOnly = true;
|
858 |
-
this.container.addClass("chosen-container-single-nosearch");
|
859 |
-
} else {
|
860 |
-
this.search_field[0].readOnly = false;
|
861 |
-
this.container.removeClass("chosen-container-single-nosearch");
|
862 |
-
}
|
863 |
-
}
|
864 |
-
this.update_results_content(this.results_option_build({
|
865 |
-
first: true
|
866 |
-
}));
|
867 |
-
this.search_field_disabled();
|
868 |
-
this.show_search_field_default();
|
869 |
-
this.search_field_scale();
|
870 |
-
return this.parsing = false;
|
871 |
-
};
|
872 |
-
|
873 |
-
Chosen.prototype.result_do_highlight = function(el) {
|
874 |
-
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
875 |
-
if (el.length) {
|
876 |
-
this.result_clear_highlight();
|
877 |
-
this.result_highlight = el;
|
878 |
-
this.result_highlight.addClass("highlighted");
|
879 |
-
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
|
880 |
-
visible_top = this.search_results.scrollTop();
|
881 |
-
visible_bottom = maxHeight + visible_top;
|
882 |
-
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
|
883 |
-
high_bottom = high_top + this.result_highlight.outerHeight();
|
884 |
-
if (high_bottom >= visible_bottom) {
|
885 |
-
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
|
886 |
-
} else if (high_top < visible_top) {
|
887 |
-
return this.search_results.scrollTop(high_top);
|
888 |
-
}
|
889 |
-
}
|
890 |
-
};
|
891 |
-
|
892 |
-
Chosen.prototype.result_clear_highlight = function() {
|
893 |
-
if (this.result_highlight) {
|
894 |
-
this.result_highlight.removeClass("highlighted");
|
895 |
-
}
|
896 |
-
return this.result_highlight = null;
|
897 |
-
};
|
898 |
-
|
899 |
-
Chosen.prototype.results_show = function() {
|
900 |
-
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
901 |
-
this.form_field_jq.trigger("chosen:maxselected", {
|
902 |
-
chosen: this
|
903 |
-
});
|
904 |
-
return false;
|
905 |
-
}
|
906 |
-
this.container.addClass("chosen-with-drop");
|
907 |
-
this.results_showing = true;
|
908 |
-
this.search_field.focus();
|
909 |
-
this.search_field.val(this.search_field.val());
|
910 |
-
this.winnow_results();
|
911 |
-
return this.form_field_jq.trigger("chosen:showing_dropdown", {
|
912 |
-
chosen: this
|
913 |
-
});
|
914 |
-
};
|
915 |
-
|
916 |
-
Chosen.prototype.update_results_content = function(content) {
|
917 |
-
return this.search_results.html(content);
|
918 |
-
};
|
919 |
-
|
920 |
-
Chosen.prototype.results_hide = function() {
|
921 |
-
if (this.results_showing) {
|
922 |
-
this.result_clear_highlight();
|
923 |
-
this.container.removeClass("chosen-with-drop");
|
924 |
-
this.form_field_jq.trigger("chosen:hiding_dropdown", {
|
925 |
-
chosen: this
|
926 |
-
});
|
927 |
-
}
|
928 |
-
return this.results_showing = false;
|
929 |
-
};
|
930 |
-
|
931 |
-
Chosen.prototype.set_tab_index = function(el) {
|
932 |
-
var ti;
|
933 |
-
if (this.form_field.tabIndex) {
|
934 |
-
ti = this.form_field.tabIndex;
|
935 |
-
this.form_field.tabIndex = -1;
|
936 |
-
return this.search_field[0].tabIndex = ti;
|
937 |
-
}
|
938 |
-
};
|
939 |
-
|
940 |
-
Chosen.prototype.set_label_behavior = function() {
|
941 |
-
var _this = this;
|
942 |
-
this.form_field_label = this.form_field_jq.parents("label");
|
943 |
-
if (!this.form_field_label.length && this.form_field.id.length) {
|
944 |
-
this.form_field_label = $("label[for='" + this.form_field.id + "']");
|
945 |
-
}
|
946 |
-
if (this.form_field_label.length > 0) {
|
947 |
-
return this.form_field_label.bind('click.chosen', function(evt) {
|
948 |
-
if (_this.is_multiple) {
|
949 |
-
return _this.container_mousedown(evt);
|
950 |
-
} else {
|
951 |
-
return _this.activate_field();
|
952 |
-
}
|
953 |
-
});
|
954 |
-
}
|
955 |
-
};
|
956 |
-
|
957 |
-
Chosen.prototype.show_search_field_default = function() {
|
958 |
-
if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
|
959 |
-
this.search_field.val(this.default_text);
|
960 |
-
return this.search_field.addClass("default");
|
961 |
-
} else {
|
962 |
-
this.search_field.val("");
|
963 |
-
return this.search_field.removeClass("default");
|
964 |
-
}
|
965 |
-
};
|
966 |
-
|
967 |
-
Chosen.prototype.search_results_mouseup = function(evt) {
|
968 |
-
var target;
|
969 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
970 |
-
if (target.length) {
|
971 |
-
this.result_highlight = target;
|
972 |
-
this.result_select(evt);
|
973 |
-
return this.search_field.focus();
|
974 |
-
}
|
975 |
-
};
|
976 |
-
|
977 |
-
Chosen.prototype.search_results_mouseover = function(evt) {
|
978 |
-
var target;
|
979 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
980 |
-
if (target) {
|
981 |
-
return this.result_do_highlight(target);
|
982 |
-
}
|
983 |
-
};
|
984 |
-
|
985 |
-
Chosen.prototype.search_results_mouseout = function(evt) {
|
986 |
-
if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
|
987 |
-
return this.result_clear_highlight();
|
988 |
-
}
|
989 |
-
};
|
990 |
-
|
991 |
-
Chosen.prototype.choice_build = function(item) {
|
992 |
-
var choice, close_link,
|
993 |
-
_this = this;
|
994 |
-
choice = $('<li />', {
|
995 |
-
"class": "search-choice"
|
996 |
-
}).html("<span>" + (this.choice_label(item)) + "</span>");
|
997 |
-
if (item.disabled) {
|
998 |
-
choice.addClass('search-choice-disabled');
|
999 |
-
} else {
|
1000 |
-
close_link = $('<a />', {
|
1001 |
-
"class": 'search-choice-close',
|
1002 |
-
'data-option-array-index': item.array_index
|
1003 |
-
});
|
1004 |
-
close_link.bind('click.chosen', function(evt) {
|
1005 |
-
return _this.choice_destroy_link_click(evt);
|
1006 |
-
});
|
1007 |
-
choice.append(close_link);
|
1008 |
-
}
|
1009 |
-
return this.search_container.before(choice);
|
1010 |
-
};
|
1011 |
-
|
1012 |
-
Chosen.prototype.choice_destroy_link_click = function(evt) {
|
1013 |
-
evt.preventDefault();
|
1014 |
-
evt.stopPropagation();
|
1015 |
-
if (!this.is_disabled) {
|
1016 |
-
return this.choice_destroy($(evt.target));
|
1017 |
-
}
|
1018 |
-
};
|
1019 |
-
|
1020 |
-
Chosen.prototype.choice_destroy = function(link) {
|
1021 |
-
if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
|
1022 |
-
this.show_search_field_default();
|
1023 |
-
if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
|
1024 |
-
this.results_hide();
|
1025 |
-
}
|
1026 |
-
link.parents('li').first().remove();
|
1027 |
-
return this.search_field_scale();
|
1028 |
-
}
|
1029 |
-
};
|
1030 |
-
|
1031 |
-
Chosen.prototype.results_reset = function() {
|
1032 |
-
this.reset_single_select_options();
|
1033 |
-
this.form_field.options[0].selected = true;
|
1034 |
-
this.single_set_selected_text();
|
1035 |
-
this.show_search_field_default();
|
1036 |
-
this.results_reset_cleanup();
|
1037 |
-
this.form_field_jq.trigger("change");
|
1038 |
-
if (this.active_field) {
|
1039 |
-
return this.results_hide();
|
1040 |
-
}
|
1041 |
-
};
|
1042 |
-
|
1043 |
-
Chosen.prototype.results_reset_cleanup = function() {
|
1044 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
1045 |
-
return this.selected_item.find("abbr").remove();
|
1046 |
-
};
|
1047 |
-
|
1048 |
-
Chosen.prototype.result_select = function(evt) {
|
1049 |
-
var high, item;
|
1050 |
-
if (this.result_highlight) {
|
1051 |
-
high = this.result_highlight;
|
1052 |
-
this.result_clear_highlight();
|
1053 |
-
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
1054 |
-
this.form_field_jq.trigger("chosen:maxselected", {
|
1055 |
-
chosen: this
|
1056 |
-
});
|
1057 |
-
return false;
|
1058 |
-
}
|
1059 |
-
if (this.is_multiple) {
|
1060 |
-
high.removeClass("active-result");
|
1061 |
-
} else {
|
1062 |
-
this.reset_single_select_options();
|
1063 |
-
}
|
1064 |
-
high.addClass("result-selected");
|
1065 |
-
item = this.results_data[high[0].getAttribute("data-option-array-index")];
|
1066 |
-
item.selected = true;
|
1067 |
-
this.form_field.options[item.options_index].selected = true;
|
1068 |
-
this.selected_option_count = null;
|
1069 |
-
if (this.is_multiple) {
|
1070 |
-
this.choice_build(item);
|
1071 |
-
} else {
|
1072 |
-
this.single_set_selected_text(this.choice_label(item));
|
1073 |
-
}
|
1074 |
-
if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
|
1075 |
-
this.results_hide();
|
1076 |
-
}
|
1077 |
-
this.show_search_field_default();
|
1078 |
-
if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
|
1079 |
-
this.form_field_jq.trigger("change", {
|
1080 |
-
'selected': this.form_field.options[item.options_index].value
|
1081 |
-
});
|
1082 |
-
}
|
1083 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
1084 |
-
evt.preventDefault();
|
1085 |
-
return this.search_field_scale();
|
1086 |
-
}
|
1087 |
-
};
|
1088 |
-
|
1089 |
-
Chosen.prototype.single_set_selected_text = function(text) {
|
1090 |
-
if (text == null) {
|
1091 |
-
text = this.default_text;
|
1092 |
-
}
|
1093 |
-
if (text === this.default_text) {
|
1094 |
-
this.selected_item.addClass("chosen-default");
|
1095 |
-
} else {
|
1096 |
-
this.single_deselect_control_build();
|
1097 |
-
this.selected_item.removeClass("chosen-default");
|
1098 |
-
}
|
1099 |
-
return this.selected_item.find("span").html(text);
|
1100 |
-
};
|
1101 |
-
|
1102 |
-
Chosen.prototype.result_deselect = function(pos) {
|
1103 |
-
var result_data;
|
1104 |
-
result_data = this.results_data[pos];
|
1105 |
-
if (!this.form_field.options[result_data.options_index].disabled) {
|
1106 |
-
result_data.selected = false;
|
1107 |
-
this.form_field.options[result_data.options_index].selected = false;
|
1108 |
-
this.selected_option_count = null;
|
1109 |
-
this.result_clear_highlight();
|
1110 |
-
if (this.results_showing) {
|
1111 |
-
this.winnow_results();
|
1112 |
-
}
|
1113 |
-
this.form_field_jq.trigger("change", {
|
1114 |
-
deselected: this.form_field.options[result_data.options_index].value
|
1115 |
-
});
|
1116 |
-
this.search_field_scale();
|
1117 |
-
return true;
|
1118 |
-
} else {
|
1119 |
-
return false;
|
1120 |
-
}
|
1121 |
-
};
|
1122 |
-
|
1123 |
-
Chosen.prototype.single_deselect_control_build = function() {
|
1124 |
-
if (!this.allow_single_deselect) {
|
1125 |
-
return;
|
1126 |
-
}
|
1127 |
-
if (!this.selected_item.find("abbr").length) {
|
1128 |
-
this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
|
1129 |
-
}
|
1130 |
-
return this.selected_item.addClass("chosen-single-with-deselect");
|
1131 |
-
};
|
1132 |
-
|
1133 |
-
Chosen.prototype.get_search_text = function() {
|
1134 |
-
return $('<div/>').text($.trim(this.search_field.val())).html();
|
1135 |
-
};
|
1136 |
-
|
1137 |
-
Chosen.prototype.winnow_results_set_highlight = function() {
|
1138 |
-
var do_high, selected_results;
|
1139 |
-
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
|
1140 |
-
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
|
1141 |
-
if (do_high != null) {
|
1142 |
-
return this.result_do_highlight(do_high);
|
1143 |
-
}
|
1144 |
-
};
|
1145 |
-
|
1146 |
-
Chosen.prototype.no_results = function(terms) {
|
1147 |
-
var no_results_html;
|
1148 |
-
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
|
1149 |
-
no_results_html.find("span").first().html(terms);
|
1150 |
-
this.search_results.append(no_results_html);
|
1151 |
-
return this.form_field_jq.trigger("chosen:no_results", {
|
1152 |
-
chosen: this
|
1153 |
-
});
|
1154 |
-
};
|
1155 |
-
|
1156 |
-
Chosen.prototype.no_results_clear = function() {
|
1157 |
-
return this.search_results.find(".no-results").remove();
|
1158 |
-
};
|
1159 |
-
|
1160 |
-
Chosen.prototype.keydown_arrow = function() {
|
1161 |
-
var next_sib;
|
1162 |
-
if (this.results_showing && this.result_highlight) {
|
1163 |
-
next_sib = this.result_highlight.nextAll("li.active-result").first();
|
1164 |
-
if (next_sib) {
|
1165 |
-
return this.result_do_highlight(next_sib);
|
1166 |
-
}
|
1167 |
-
} else {
|
1168 |
-
return this.results_show();
|
1169 |
-
}
|
1170 |
-
};
|
1171 |
-
|
1172 |
-
Chosen.prototype.keyup_arrow = function() {
|
1173 |
-
var prev_sibs;
|
1174 |
-
if (!this.results_showing && !this.is_multiple) {
|
1175 |
-
return this.results_show();
|
1176 |
-
} else if (this.result_highlight) {
|
1177 |
-
prev_sibs = this.result_highlight.prevAll("li.active-result");
|
1178 |
-
if (prev_sibs.length) {
|
1179 |
-
return this.result_do_highlight(prev_sibs.first());
|
1180 |
-
} else {
|
1181 |
-
if (this.choices_count() > 0) {
|
1182 |
-
this.results_hide();
|
1183 |
-
}
|
1184 |
-
return this.result_clear_highlight();
|
1185 |
-
}
|
1186 |
-
}
|
1187 |
-
};
|
1188 |
-
|
1189 |
-
Chosen.prototype.keydown_backstroke = function() {
|
1190 |
-
var next_available_destroy;
|
1191 |
-
if (this.pending_backstroke) {
|
1192 |
-
this.choice_destroy(this.pending_backstroke.find("a").first());
|
1193 |
-
return this.clear_backstroke();
|
1194 |
-
} else {
|
1195 |
-
next_available_destroy = this.search_container.siblings("li.search-choice").last();
|
1196 |
-
if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
|
1197 |
-
this.pending_backstroke = next_available_destroy;
|
1198 |
-
if (this.single_backstroke_delete) {
|
1199 |
-
return this.keydown_backstroke();
|
1200 |
-
} else {
|
1201 |
-
return this.pending_backstroke.addClass("search-choice-focus");
|
1202 |
-
}
|
1203 |
-
}
|
1204 |
-
}
|
1205 |
-
};
|
1206 |
-
|
1207 |
-
Chosen.prototype.clear_backstroke = function() {
|
1208 |
-
if (this.pending_backstroke) {
|
1209 |
-
this.pending_backstroke.removeClass("search-choice-focus");
|
1210 |
-
}
|
1211 |
-
return this.pending_backstroke = null;
|
1212 |
-
};
|
1213 |
-
|
1214 |
-
Chosen.prototype.keydown_checker = function(evt) {
|
1215 |
-
var stroke, _ref1;
|
1216 |
-
stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
|
1217 |
-
this.search_field_scale();
|
1218 |
-
if (stroke !== 8 && this.pending_backstroke) {
|
1219 |
-
this.clear_backstroke();
|
1220 |
-
}
|
1221 |
-
switch (stroke) {
|
1222 |
-
case 8:
|
1223 |
-
this.backstroke_length = this.search_field.val().length;
|
1224 |
-
break;
|
1225 |
-
case 9:
|
1226 |
-
if (this.results_showing && !this.is_multiple) {
|
1227 |
-
this.result_select(evt);
|
1228 |
-
}
|
1229 |
-
this.mouse_on_container = false;
|
1230 |
-
break;
|
1231 |
-
case 13:
|
1232 |
-
if (this.results_showing) {
|
1233 |
-
evt.preventDefault();
|
1234 |
-
}
|
1235 |
-
break;
|
1236 |
-
case 32:
|
1237 |
-
if (this.disable_search) {
|
1238 |
-
evt.preventDefault();
|
1239 |
-
}
|
1240 |
-
break;
|
1241 |
-
case 38:
|
1242 |
-
evt.preventDefault();
|
1243 |
-
this.keyup_arrow();
|
1244 |
-
break;
|
1245 |
-
case 40:
|
1246 |
-
evt.preventDefault();
|
1247 |
-
this.keydown_arrow();
|
1248 |
-
break;
|
1249 |
-
}
|
1250 |
-
};
|
1251 |
-
|
1252 |
-
Chosen.prototype.search_field_scale = function() {
|
1253 |
-
var div, f_width, h, style, style_block, styles, w, _i, _len;
|
1254 |
-
if (this.is_multiple) {
|
1255 |
-
h = 0;
|
1256 |
-
w = 0;
|
1257 |
-
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
|
1258 |
-
styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
|
1259 |
-
for (_i = 0, _len = styles.length; _i < _len; _i++) {
|
1260 |
-
style = styles[_i];
|
1261 |
-
style_block += style + ":" + this.search_field.css(style) + ";";
|
1262 |
-
}
|
1263 |
-
div = $('<div />', {
|
1264 |
-
'style': style_block
|
1265 |
-
});
|
1266 |
-
div.text(this.search_field.val());
|
1267 |
-
$('body').append(div);
|
1268 |
-
w = div.width() + 25;
|
1269 |
-
div.remove();
|
1270 |
-
f_width = this.container.outerWidth();
|
1271 |
-
if (w > f_width - 10) {
|
1272 |
-
w = f_width - 10;
|
1273 |
-
}
|
1274 |
-
return this.search_field.css({
|
1275 |
-
'width': w + 'px'
|
1276 |
-
});
|
1277 |
-
}
|
1278 |
-
};
|
1279 |
-
|
1280 |
-
return Chosen;
|
1281 |
-
|
1282 |
-
})(AbstractChosen);
|
1283 |
-
|
1284 |
-
}).call(this);
|
1 |
+
/*!
|
2 |
+
Chosen, a Select Box Enhancer for jQuery and Prototype
|
3 |
+
by Patrick Filler for Harvest, http://getharvest.com
|
4 |
+
|
5 |
+
Version 1.5.1
|
6 |
+
Full source at https://github.com/harvesthq/chosen
|
7 |
+
Copyright (c) 2011-2016 Harvest http://getharvest.com
|
8 |
+
|
9 |
+
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
10 |
+
This file is generated by `grunt build`, do not edit it by hand.
|
11 |
+
*/
|
12 |
+
|
13 |
+
(function() {
|
14 |
+
var $, AbstractChosen, Chosen, SelectParser, _ref,
|
15 |
+
__hasProp = {}.hasOwnProperty,
|
16 |
+
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
17 |
+
|
18 |
+
SelectParser = (function() {
|
19 |
+
function SelectParser() {
|
20 |
+
this.options_index = 0;
|
21 |
+
this.parsed = [];
|
22 |
+
}
|
23 |
+
|
24 |
+
SelectParser.prototype.add_node = function(child) {
|
25 |
+
if (child.nodeName.toUpperCase() === "OPTGROUP") {
|
26 |
+
return this.add_group(child);
|
27 |
+
} else {
|
28 |
+
return this.add_option(child);
|
29 |
+
}
|
30 |
+
};
|
31 |
+
|
32 |
+
SelectParser.prototype.add_group = function(group) {
|
33 |
+
var group_position, option, _i, _len, _ref, _results;
|
34 |
+
group_position = this.parsed.length;
|
35 |
+
this.parsed.push({
|
36 |
+
array_index: group_position,
|
37 |
+
group: true,
|
38 |
+
label: this.escapeExpression(group.label),
|
39 |
+
title: group.title ? group.title : void 0,
|
40 |
+
children: 0,
|
41 |
+
disabled: group.disabled,
|
42 |
+
classes: group.className
|
43 |
+
});
|
44 |
+
_ref = group.childNodes;
|
45 |
+
_results = [];
|
46 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
47 |
+
option = _ref[_i];
|
48 |
+
_results.push(this.add_option(option, group_position, group.disabled));
|
49 |
+
}
|
50 |
+
return _results;
|
51 |
+
};
|
52 |
+
|
53 |
+
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
54 |
+
if (option.nodeName.toUpperCase() === "OPTION") {
|
55 |
+
if (option.text !== "") {
|
56 |
+
if (group_position != null) {
|
57 |
+
this.parsed[group_position].children += 1;
|
58 |
+
}
|
59 |
+
this.parsed.push({
|
60 |
+
array_index: this.parsed.length,
|
61 |
+
options_index: this.options_index,
|
62 |
+
value: option.value,
|
63 |
+
text: option.text,
|
64 |
+
html: option.innerHTML,
|
65 |
+
title: option.title ? option.title : void 0,
|
66 |
+
selected: option.selected,
|
67 |
+
disabled: group_disabled === true ? group_disabled : option.disabled,
|
68 |
+
group_array_index: group_position,
|
69 |
+
group_label: group_position != null ? this.parsed[group_position].label : null,
|
70 |
+
classes: option.className,
|
71 |
+
style: option.style.cssText
|
72 |
+
});
|
73 |
+
} else {
|
74 |
+
this.parsed.push({
|
75 |
+
array_index: this.parsed.length,
|
76 |
+
options_index: this.options_index,
|
77 |
+
empty: true
|
78 |
+
});
|
79 |
+
}
|
80 |
+
return this.options_index += 1;
|
81 |
+
}
|
82 |
+
};
|
83 |
+
|
84 |
+
SelectParser.prototype.escapeExpression = function(text) {
|
85 |
+
var map, unsafe_chars;
|
86 |
+
if ((text == null) || text === false) {
|
87 |
+
return "";
|
88 |
+
}
|
89 |
+
if (!/[\&\<\>\"\'\`]/.test(text)) {
|
90 |
+
return text;
|
91 |
+
}
|
92 |
+
map = {
|
93 |
+
"<": "<",
|
94 |
+
">": ">",
|
95 |
+
'"': """,
|
96 |
+
"'": "'",
|
97 |
+
"`": "`"
|
98 |
+
};
|
99 |
+
unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
|
100 |
+
return text.replace(unsafe_chars, function(chr) {
|
101 |
+
return map[chr] || "&";
|
102 |
+
});
|
103 |
+
};
|
104 |
+
|
105 |
+
return SelectParser;
|
106 |
+
|
107 |
+
})();
|
108 |
+
|
109 |
+
SelectParser.select_to_array = function(select) {
|
110 |
+
var child, parser, _i, _len, _ref;
|
111 |
+
parser = new SelectParser();
|
112 |
+
_ref = select.childNodes;
|
113 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
114 |
+
child = _ref[_i];
|
115 |
+
parser.add_node(child);
|
116 |
+
}
|
117 |
+
return parser.parsed;
|
118 |
+
};
|
119 |
+
|
120 |
+
AbstractChosen = (function() {
|
121 |
+
function AbstractChosen(form_field, options) {
|
122 |
+
this.form_field = form_field;
|
123 |
+
this.options = options != null ? options : {};
|
124 |
+
if (!AbstractChosen.browser_is_supported()) {
|
125 |
+
return;
|
126 |
+
}
|
127 |
+
this.is_multiple = this.form_field.multiple;
|
128 |
+
this.set_default_text();
|
129 |
+
this.set_default_values();
|
130 |
+
this.setup();
|
131 |
+
this.set_up_html();
|
132 |
+
this.register_observers();
|
133 |
+
this.on_ready();
|
134 |
+
}
|
135 |
+
|
136 |
+
AbstractChosen.prototype.set_default_values = function() {
|
137 |
+
var _this = this;
|
138 |
+
this.click_test_action = function(evt) {
|
139 |
+
return _this.test_active_click(evt);
|
140 |
+
};
|
141 |
+
this.activate_action = function(evt) {
|
142 |
+
return _this.activate_field(evt);
|
143 |
+
};
|
144 |
+
this.active_field = false;
|
145 |
+
this.mouse_on_container = false;
|
146 |
+
this.results_showing = false;
|
147 |
+
this.result_highlighted = null;
|
148 |
+
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
149 |
+
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
150 |
+
this.disable_search = this.options.disable_search || false;
|
151 |
+
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
|
152 |
+
this.group_search = this.options.group_search != null ? this.options.group_search : true;
|
153 |
+
this.search_contains = this.options.search_contains || false;
|
154 |
+
this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
|
155 |
+
this.max_selected_options = this.options.max_selected_options || Infinity;
|
156 |
+
this.inherit_select_classes = this.options.inherit_select_classes || false;
|
157 |
+
this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
|
158 |
+
this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
|
159 |
+
this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
|
160 |
+
return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
|
161 |
+
};
|
162 |
+
|
163 |
+
AbstractChosen.prototype.set_default_text = function() {
|
164 |
+
if (this.form_field.getAttribute("data-placeholder")) {
|
165 |
+
this.default_text = this.form_field.getAttribute("data-placeholder");
|
166 |
+
} else if (this.is_multiple) {
|
167 |
+
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
|
168 |
+
} else {
|
169 |
+
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
|
170 |
+
}
|
171 |
+
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
|
172 |
+
};
|
173 |
+
|
174 |
+
AbstractChosen.prototype.choice_label = function(item) {
|
175 |
+
if (this.include_group_label_in_selected && (item.group_label != null)) {
|
176 |
+
return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
|
177 |
+
} else {
|
178 |
+
return item.html;
|
179 |
+
}
|
180 |
+
};
|
181 |
+
|
182 |
+
AbstractChosen.prototype.mouse_enter = function() {
|
183 |
+
return this.mouse_on_container = true;
|
184 |
+
};
|
185 |
+
|
186 |
+
AbstractChosen.prototype.mouse_leave = function() {
|
187 |
+
return this.mouse_on_container = false;
|
188 |
+
};
|
189 |
+
|
190 |
+
AbstractChosen.prototype.input_focus = function(evt) {
|
191 |
+
var _this = this;
|
192 |
+
if (this.is_multiple) {
|
193 |
+
if (!this.active_field) {
|
194 |
+
return setTimeout((function() {
|
195 |
+
return _this.container_mousedown();
|
196 |
+
}), 50);
|
197 |
+
}
|
198 |
+
} else {
|
199 |
+
if (!this.active_field) {
|
200 |
+
return this.activate_field();
|
201 |
+
}
|
202 |
+
}
|
203 |
+
};
|
204 |
+
|
205 |
+
AbstractChosen.prototype.input_blur = function(evt) {
|
206 |
+
var _this = this;
|
207 |
+
if (!this.mouse_on_container) {
|
208 |
+
this.active_field = false;
|
209 |
+
return setTimeout((function() {
|
210 |
+
return _this.blur_test();
|
211 |
+
}), 100);
|
212 |
+
}
|
213 |
+
};
|
214 |
+
|
215 |
+
AbstractChosen.prototype.results_option_build = function(options) {
|
216 |
+
var content, data, data_content, shown_results, _i, _len, _ref;
|
217 |
+
content = '';
|
218 |
+
shown_results = 0;
|
219 |
+
_ref = this.results_data;
|
220 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
221 |
+
data = _ref[_i];
|
222 |
+
data_content = '';
|
223 |
+
if (data.group) {
|
224 |
+
data_content = this.result_add_group(data);
|
225 |
+
} else {
|
226 |
+
data_content = this.result_add_option(data);
|
227 |
+
}
|
228 |
+
if (data_content !== '') {
|
229 |
+
shown_results++;
|
230 |
+
content += data_content;
|
231 |
+
}
|
232 |
+
if (options != null ? options.first : void 0) {
|
233 |
+
if (data.selected && this.is_multiple) {
|
234 |
+
this.choice_build(data);
|
235 |
+
} else if (data.selected && !this.is_multiple) {
|
236 |
+
this.single_set_selected_text(this.choice_label(data));
|
237 |
+
}
|
238 |
+
}
|
239 |
+
if (shown_results >= this.max_shown_results) {
|
240 |
+
break;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
return content;
|
244 |
+
};
|
245 |
+
|
246 |
+
AbstractChosen.prototype.result_add_option = function(option) {
|
247 |
+
var classes, option_el;
|
248 |
+
if (!option.search_match) {
|
249 |
+
return '';
|
250 |
+
}
|
251 |
+
if (!this.include_option_in_results(option)) {
|
252 |
+
return '';
|
253 |
+
}
|
254 |
+
classes = [];
|
255 |
+
if (!option.disabled && !(option.selected && this.is_multiple)) {
|
256 |
+
classes.push("active-result");
|
257 |
+
}
|
258 |
+
if (option.disabled && !(option.selected && this.is_multiple)) {
|
259 |
+
classes.push("disabled-result");
|
260 |
+
}
|
261 |
+
if (option.selected) {
|
262 |
+
classes.push("result-selected");
|
263 |
+
}
|
264 |
+
if (option.group_array_index != null) {
|
265 |
+
classes.push("group-option");
|
266 |
+
}
|
267 |
+
if (option.classes !== "") {
|
268 |
+
classes.push(option.classes);
|
269 |
+
}
|
270 |
+
option_el = document.createElement("li");
|
271 |
+
option_el.className = classes.join(" ");
|
272 |
+
option_el.style.cssText = option.style;
|
273 |
+
option_el.setAttribute("data-option-array-index", option.array_index);
|
274 |
+
option_el.innerHTML = option.search_text;
|
275 |
+
if (option.title) {
|
276 |
+
option_el.title = option.title;
|
277 |
+
}
|
278 |
+
return this.outerHTML(option_el);
|
279 |
+
};
|
280 |
+
|
281 |
+
AbstractChosen.prototype.result_add_group = function(group) {
|
282 |
+
var classes, group_el;
|
283 |
+
if (!(group.search_match || group.group_match)) {
|
284 |
+
return '';
|
285 |
+
}
|
286 |
+
if (!(group.active_options > 0)) {
|
287 |
+
return '';
|
288 |
+
}
|
289 |
+
classes = [];
|
290 |
+
classes.push("group-result");
|
291 |
+
if (group.classes) {
|
292 |
+
classes.push(group.classes);
|
293 |
+
}
|
294 |
+
group_el = document.createElement("li");
|
295 |
+
group_el.className = classes.join(" ");
|
296 |
+
group_el.innerHTML = group.search_text;
|
297 |
+
if (group.title) {
|
298 |
+
group_el.title = group.title;
|
299 |
+
}
|
300 |
+
return this.outerHTML(group_el);
|
301 |
+
};
|
302 |
+
|
303 |
+
AbstractChosen.prototype.results_update_field = function() {
|
304 |
+
this.set_default_text();
|
305 |
+
if (!this.is_multiple) {
|
306 |
+
this.results_reset_cleanup();
|
307 |
+
}
|
308 |
+
this.result_clear_highlight();
|
309 |
+
this.results_build();
|
310 |
+
if (this.results_showing) {
|
311 |
+
return this.winnow_results();
|
312 |
+
}
|
313 |
+
};
|
314 |
+
|
315 |
+
AbstractChosen.prototype.reset_single_select_options = function() {
|
316 |
+
var result, _i, _len, _ref, _results;
|
317 |
+
_ref = this.results_data;
|
318 |
+
_results = [];
|
319 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
320 |
+
result = _ref[_i];
|
321 |
+
if (result.selected) {
|
322 |
+
_results.push(result.selected = false);
|
323 |
+
} else {
|
324 |
+
_results.push(void 0);
|
325 |
+
}
|
326 |
+
}
|
327 |
+
return _results;
|
328 |
+
};
|
329 |
+
|
330 |
+
AbstractChosen.prototype.results_toggle = function() {
|
331 |
+
if (this.results_showing) {
|
332 |
+
return this.results_hide();
|
333 |
+
} else {
|
334 |
+
return this.results_show();
|
335 |
+
}
|
336 |
+
};
|
337 |
+
|
338 |
+
AbstractChosen.prototype.results_search = function(evt) {
|
339 |
+
if (this.results_showing) {
|
340 |
+
return this.winnow_results();
|
341 |
+
} else {
|
342 |
+
return this.results_show();
|
343 |
+
}
|
344 |
+
};
|
345 |
+
|
346 |
+
AbstractChosen.prototype.winnow_results = function() {
|
347 |
+
var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
|
348 |
+
this.no_results_clear();
|
349 |
+
results = 0;
|
350 |
+
searchText = this.get_search_text();
|
351 |
+
escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
352 |
+
zregex = new RegExp(escapedSearchText, 'i');
|
353 |
+
regex = this.get_search_regex(escapedSearchText);
|
354 |
+
_ref = this.results_data;
|
355 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
356 |
+
option = _ref[_i];
|
357 |
+
option.search_match = false;
|
358 |
+
results_group = null;
|
359 |
+
if (this.include_option_in_results(option)) {
|
360 |
+
if (option.group) {
|
361 |
+
option.group_match = false;
|
362 |
+
option.active_options = 0;
|
363 |
+
}
|
364 |
+
if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
|
365 |
+
results_group = this.results_data[option.group_array_index];
|
366 |
+
if (results_group.active_options === 0 && results_group.search_match) {
|
367 |
+
results += 1;
|
368 |
+
}
|
369 |
+
results_group.active_options += 1;
|
370 |
+
}
|
371 |
+
option.search_text = option.group ? option.label : option.html;
|
372 |
+
if (!(option.group && !this.group_search)) {
|
373 |
+
option.search_match = this.search_string_match(option.search_text, regex);
|
374 |
+
if (option.search_match && !option.group) {
|
375 |
+
results += 1;
|
376 |
+
}
|
377 |
+
if (option.search_match) {
|
378 |
+
if (searchText.length) {
|
379 |
+
startpos = option.search_text.search(zregex);
|
380 |
+
text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
|
381 |
+
option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
|
382 |
+
}
|
383 |
+
if (results_group != null) {
|
384 |
+
results_group.group_match = true;
|
385 |
+
}
|
386 |
+
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
|
387 |
+
option.search_match = true;
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
}
|
392 |
+
this.result_clear_highlight();
|
393 |
+
if (results < 1 && searchText.length) {
|
394 |
+
this.update_results_content("");
|
395 |
+
return this.no_results(searchText);
|
396 |
+
} else {
|
397 |
+
this.update_results_content(this.results_option_build());
|
398 |
+
return this.winnow_results_set_highlight();
|
399 |
+
}
|
400 |
+
};
|
401 |
+
|
402 |
+
AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
|
403 |
+
var regex_anchor;
|
404 |
+
regex_anchor = this.search_contains ? "" : "^";
|
405 |
+
return new RegExp(regex_anchor + escaped_search_string, 'i');
|
406 |
+
};
|
407 |
+
|
408 |
+
AbstractChosen.prototype.search_string_match = function(search_string, regex) {
|
409 |
+
var part, parts, _i, _len;
|
410 |
+
if (regex.test(search_string)) {
|
411 |
+
return true;
|
412 |
+
} else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
|
413 |
+
parts = search_string.replace(/\[|\]/g, "").split(" ");
|
414 |
+
if (parts.length) {
|
415 |
+
for (_i = 0, _len = parts.length; _i < _len; _i++) {
|
416 |
+
part = parts[_i];
|
417 |
+
if (regex.test(part)) {
|
418 |
+
return true;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
}
|
422 |
+
}
|
423 |
+
};
|
424 |
+
|
425 |
+
AbstractChosen.prototype.choices_count = function() {
|
426 |
+
var option, _i, _len, _ref;
|
427 |
+
if (this.selected_option_count != null) {
|
428 |
+
return this.selected_option_count;
|
429 |
+
}
|
430 |
+
this.selected_option_count = 0;
|
431 |
+
_ref = this.form_field.options;
|
432 |
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
433 |
+
option = _ref[_i];
|
434 |
+
if (option.selected) {
|
435 |
+
this.selected_option_count += 1;
|
436 |
+
}
|
437 |
+
}
|
438 |
+
return this.selected_option_count;
|
439 |
+
};
|
440 |
+
|
441 |
+
AbstractChosen.prototype.choices_click = function(evt) {
|
442 |
+
evt.preventDefault();
|
443 |
+
if (!(this.results_showing || this.is_disabled)) {
|
444 |
+
return this.results_show();
|
445 |
+
}
|
446 |
+
};
|
447 |
+
|
448 |
+
AbstractChosen.prototype.keyup_checker = function(evt) {
|
449 |
+
var stroke, _ref;
|
450 |
+
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
451 |
+
this.search_field_scale();
|
452 |
+
switch (stroke) {
|
453 |
+
case 8:
|
454 |
+
if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
|
455 |
+
return this.keydown_backstroke();
|
456 |
+
} else if (!this.pending_backstroke) {
|
457 |
+
this.result_clear_highlight();
|
458 |
+
return this.results_search();
|
459 |
+
}
|
460 |
+
break;
|
461 |
+
case 13:
|
462 |
+
evt.preventDefault();
|
463 |
+
if (this.results_showing) {
|
464 |
+
return this.result_select(evt);
|
465 |
+
}
|
466 |
+
break;
|
467 |
+
case 27:
|
468 |
+
if (this.results_showing) {
|
469 |
+
this.results_hide();
|
470 |
+
}
|
471 |
+
return true;
|
472 |
+
case 9:
|
473 |
+
case 38:
|
474 |
+
case 40:
|
475 |
+
case 16:
|
476 |
+
case 91:
|
477 |
+
case 17:
|
478 |
+
case 18:
|
479 |
+
break;
|
480 |
+
default:
|
481 |
+
return this.results_search();
|
482 |
+
}
|
483 |
+
};
|
484 |
+
|
485 |
+
AbstractChosen.prototype.clipboard_event_checker = function(evt) {
|
486 |
+
var _this = this;
|
487 |
+
return setTimeout((function() {
|
488 |
+
return _this.results_search();
|
489 |
+
}), 50);
|
490 |
+
};
|
491 |
+
|
492 |
+
AbstractChosen.prototype.container_width = function() {
|
493 |
+
if (this.options.width != null) {
|
494 |
+
return this.options.width;
|
495 |
+
} else {
|
496 |
+
return "" + this.form_field.offsetWidth + "px";
|
497 |
+
}
|
498 |
+
};
|
499 |
+
|
500 |
+
AbstractChosen.prototype.include_option_in_results = function(option) {
|
501 |
+
if (this.is_multiple && (!this.display_selected_options && option.selected)) {
|
502 |
+
return false;
|
503 |
+
}
|
504 |
+
if (!this.display_disabled_options && option.disabled) {
|
505 |
+
return false;
|
506 |
+
}
|
507 |
+
if (option.empty) {
|
508 |
+
return false;
|
509 |
+
}
|
510 |
+
return true;
|
511 |
+
};
|
512 |
+
|
513 |
+
AbstractChosen.prototype.search_results_touchstart = function(evt) {
|
514 |
+
this.touch_started = true;
|
515 |
+
return this.search_results_mouseover(evt);
|
516 |
+
};
|
517 |
+
|
518 |
+
AbstractChosen.prototype.search_results_touchmove = function(evt) {
|
519 |
+
this.touch_started = false;
|
520 |
+
return this.search_results_mouseout(evt);
|
521 |
+
};
|
522 |
+
|
523 |
+
AbstractChosen.prototype.search_results_touchend = function(evt) {
|
524 |
+
if (this.touch_started) {
|
525 |
+
return this.search_results_mouseup(evt);
|
526 |
+
}
|
527 |
+
};
|
528 |
+
|
529 |
+
AbstractChosen.prototype.outerHTML = function(element) {
|
530 |
+
var tmp;
|
531 |
+
if (element.outerHTML) {
|
532 |
+
return element.outerHTML;
|
533 |
+
}
|
534 |
+
tmp = document.createElement("div");
|
535 |
+
tmp.appendChild(element);
|
536 |
+
return tmp.innerHTML;
|
537 |
+
};
|
538 |
+
|
539 |
+
AbstractChosen.browser_is_supported = function() {
|
540 |
+
if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
|
541 |
+
return false;
|
542 |
+
}
|
543 |
+
if (/Android/i.test(window.navigator.userAgent)) {
|
544 |
+
if (/Mobile/i.test(window.navigator.userAgent)) {
|
545 |
+
return false;
|
546 |
+
}
|
547 |
+
}
|
548 |
+
if (/IEMobile/i.test(window.navigator.userAgent)) {
|
549 |
+
return false;
|
550 |
+
}
|
551 |
+
if (/Windows Phone/i.test(window.navigator.userAgent)) {
|
552 |
+
return false;
|
553 |
+
}
|
554 |
+
if (/BlackBerry/i.test(window.navigator.userAgent)) {
|
555 |
+
return false;
|
556 |
+
}
|
557 |
+
if (/BB10/i.test(window.navigator.userAgent)) {
|
558 |
+
return false;
|
559 |
+
}
|
560 |
+
if (window.navigator.appName === "Microsoft Internet Explorer") {
|
561 |
+
return document.documentMode >= 8;
|
562 |
+
}
|
563 |
+
return true;
|
564 |
+
};
|
565 |
+
|
566 |
+
AbstractChosen.default_multiple_text = "Select Some Options";
|
567 |
+
|
568 |
+
AbstractChosen.default_single_text = "Select an Option";
|
569 |
+
|
570 |
+
AbstractChosen.default_no_result_text = "No results match";
|
571 |
+
|
572 |
+
return AbstractChosen;
|
573 |
+
|
574 |
+
})();
|
575 |
+
|
576 |
+
$ = jQuery;
|
577 |
+
|
578 |
+
$.fn.extend({
|
579 |
+
chosen: function(options) {
|
580 |
+
if (!AbstractChosen.browser_is_supported()) {
|
581 |
+
return this;
|
582 |
+
}
|
583 |
+
return this.each(function(input_field) {
|
584 |
+
var $this, chosen;
|
585 |
+
$this = $(this);
|
586 |
+
chosen = $this.data('chosen');
|
587 |
+
if (options === 'destroy') {
|
588 |
+
if (chosen instanceof Chosen) {
|
589 |
+
chosen.destroy();
|
590 |
+
}
|
591 |
+
return;
|
592 |
+
}
|
593 |
+
if (!(chosen instanceof Chosen)) {
|
594 |
+
$this.data('chosen', new Chosen(this, options));
|
595 |
+
}
|
596 |
+
});
|
597 |
+
}
|
598 |
+
});
|
599 |
+
|
600 |
+
Chosen = (function(_super) {
|
601 |
+
__extends(Chosen, _super);
|
602 |
+
|
603 |
+
function Chosen() {
|
604 |
+
_ref = Chosen.__super__.constructor.apply(this, arguments);
|
605 |
+
return _ref;
|
606 |
+
}
|
607 |
+
|
608 |
+
Chosen.prototype.setup = function() {
|
609 |
+
this.form_field_jq = $(this.form_field);
|
610 |
+
this.current_selectedIndex = this.form_field.selectedIndex;
|
611 |
+
return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
|
612 |
+
};
|
613 |
+
|
614 |
+
Chosen.prototype.set_up_html = function() {
|
615 |
+
var container_classes, container_props;
|
616 |
+
container_classes = ["chosen-container"];
|
617 |
+
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
|
618 |
+
if (this.inherit_select_classes && this.form_field.className) {
|
619 |
+
container_classes.push(this.form_field.className);
|
620 |
+
}
|
621 |
+
if (this.is_rtl) {
|
622 |
+
container_classes.push("chosen-rtl");
|
623 |
+
}
|
624 |
+
container_props = {
|
625 |
+
'class': container_classes.join(' '),
|
626 |
+
'style': "width: " + (this.container_width()) + ";",
|
627 |
+
'title': this.form_field.title
|
628 |
+
};
|
629 |
+
if (this.form_field.id.length) {
|
630 |
+
container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
|
631 |
+
}
|
632 |
+
this.container = $("<div />", container_props);
|
633 |
+
if (this.is_multiple) {
|
634 |
+
this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
|
635 |
+
} else {
|
636 |
+
this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
|
637 |
+
}
|
638 |
+
this.form_field_jq.hide().after(this.container);
|
639 |
+
this.dropdown = this.container.find('div.chosen-drop').first();
|
640 |
+
this.search_field = this.container.find('input').first();
|
641 |
+
this.search_results = this.container.find('ul.chosen-results').first();
|
642 |
+
this.search_field_scale();
|
643 |
+
this.search_no_results = this.container.find('li.no-results').first();
|
644 |
+
if (this.is_multiple) {
|
645 |
+
this.search_choices = this.container.find('ul.chosen-choices').first();
|
646 |
+
this.search_container = this.container.find('li.search-field').first();
|
647 |
+
} else {
|
648 |
+
this.search_container = this.container.find('div.chosen-search').first();
|
649 |
+
this.selected_item = this.container.find('.chosen-single').first();
|
650 |
+
}
|
651 |
+
this.results_build();
|
652 |
+
this.set_tab_index();
|
653 |
+
return this.set_label_behavior();
|
654 |
+
};
|
655 |
+
|
656 |
+
Chosen.prototype.on_ready = function() {
|
657 |
+
return this.form_field_jq.trigger("chosen:ready", {
|
658 |
+
chosen: this
|
659 |
+
});
|
660 |
+
};
|
661 |
+
|
662 |
+
Chosen.prototype.register_observers = function() {
|
663 |
+
var _this = this;
|
664 |
+
this.container.bind('touchstart.chosen', function(evt) {
|
665 |
+
_this.container_mousedown(evt);
|
666 |
+
return evt.preventDefault();
|
667 |
+
});
|
668 |
+
this.container.bind('touchend.chosen', function(evt) {
|
669 |
+
_this.container_mouseup(evt);
|
670 |
+
return evt.preventDefault();
|
671 |
+
});
|
672 |
+
this.container.bind('mousedown.chosen', function(evt) {
|
673 |
+
_this.container_mousedown(evt);
|
674 |
+
});
|
675 |
+
this.container.bind('mouseup.chosen', function(evt) {
|
676 |
+
_this.container_mouseup(evt);
|
677 |
+
});
|
678 |
+
this.container.bind('mouseenter.chosen', function(evt) {
|
679 |
+
_this.mouse_enter(evt);
|
680 |
+
});
|
681 |
+
this.container.bind('mouseleave.chosen', function(evt) {
|
682 |
+
_this.mouse_leave(evt);
|
683 |
+
});
|
684 |
+
this.search_results.bind('mouseup.chosen', function(evt) {
|
685 |
+
_this.search_results_mouseup(evt);
|
686 |
+
});
|
687 |
+
this.search_results.bind('mouseover.chosen', function(evt) {
|
688 |
+
_this.search_results_mouseover(evt);
|
689 |
+
});
|
690 |
+
this.search_results.bind('mouseout.chosen', function(evt) {
|
691 |
+
_this.search_results_mouseout(evt);
|
692 |
+
});
|
693 |
+
this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
|
694 |
+
_this.search_results_mousewheel(evt);
|
695 |
+
});
|
696 |
+
this.search_results.bind('touchstart.chosen', function(evt) {
|
697 |
+
_this.search_results_touchstart(evt);
|
698 |
+
});
|
699 |
+
this.search_results.bind('touchmove.chosen', function(evt) {
|
700 |
+
_this.search_results_touchmove(evt);
|
701 |
+
});
|
702 |
+
this.search_results.bind('touchend.chosen', function(evt) {
|
703 |
+
_this.search_results_touchend(evt);
|
704 |
+
});
|
705 |
+
this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
|
706 |
+
_this.results_update_field(evt);
|
707 |
+
});
|
708 |
+
this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
|
709 |
+
_this.activate_field(evt);
|
710 |
+
});
|
711 |
+
this.form_field_jq.bind("chosen:open.chosen", function(evt) {
|
712 |
+
_this.container_mousedown(evt);
|
713 |
+
});
|
714 |
+
this.form_field_jq.bind("chosen:close.chosen", function(evt) {
|
715 |
+
_this.input_blur(evt);
|
716 |
+
});
|
717 |
+
this.search_field.bind('blur.chosen', function(evt) {
|
718 |
+
_this.input_blur(evt);
|
719 |
+
});
|
720 |
+
this.search_field.bind('keyup.chosen', function(evt) {
|
721 |
+
_this.keyup_checker(evt);
|
722 |
+
});
|
723 |
+
this.search_field.bind('keydown.chosen', function(evt) {
|
724 |
+
_this.keydown_checker(evt);
|
725 |
+
});
|
726 |
+
this.search_field.bind('focus.chosen', function(evt) {
|
727 |
+
_this.input_focus(evt);
|
728 |
+
});
|
729 |
+
this.search_field.bind('cut.chosen', function(evt) {
|
730 |
+
_this.clipboard_event_checker(evt);
|
731 |
+
});
|
732 |
+
this.search_field.bind('paste.chosen', function(evt) {
|
733 |
+
_this.clipboard_event_checker(evt);
|
734 |
+
});
|
735 |
+
if (this.is_multiple) {
|
736 |
+
return this.search_choices.bind('click.chosen', function(evt) {
|
737 |
+
_this.choices_click(evt);
|
738 |
+
});
|
739 |
+
} else {
|
740 |
+
return this.container.bind('click.chosen', function(evt) {
|
741 |
+
evt.preventDefault();
|
742 |
+
});
|
743 |
+
}
|
744 |
+
};
|
745 |
+
|
746 |
+
Chosen.prototype.destroy = function() {
|
747 |
+
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
748 |
+
if (this.search_field[0].tabIndex) {
|
749 |
+
this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
|
750 |
+
}
|
751 |
+
this.container.remove();
|
752 |
+
this.form_field_jq.removeData('chosen');
|
753 |
+
return this.form_field_jq.show();
|
754 |
+
};
|
755 |
+
|
756 |
+
Chosen.prototype.search_field_disabled = function() {
|
757 |
+
this.is_disabled = this.form_field_jq[0].disabled;
|
758 |
+
if (this.is_disabled) {
|
759 |
+
this.container.addClass('chosen-disabled');
|
760 |
+
this.search_field[0].disabled = true;
|
761 |
+
if (!this.is_multiple) {
|
762 |
+
this.selected_item.unbind("focus.chosen", this.activate_action);
|
763 |
+
}
|
764 |
+
return this.close_field();
|
765 |
+
} else {
|
766 |
+
this.container.removeClass('chosen-disabled');
|
767 |
+
this.search_field[0].disabled = false;
|
768 |
+
if (!this.is_multiple) {
|
769 |
+
return this.selected_item.bind("focus.chosen", this.activate_action);
|
770 |
+
}
|
771 |
+
}
|
772 |
+
};
|
773 |
+
|
774 |
+
Chosen.prototype.container_mousedown = function(evt) {
|
775 |
+
if (!this.is_disabled) {
|
776 |
+
if (evt && evt.type === "mousedown" && !this.results_showing) {
|
777 |
+
evt.preventDefault();
|
778 |
+
}
|
779 |
+
if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
|
780 |
+
if (!this.active_field) {
|
781 |
+
if (this.is_multiple) {
|
782 |
+
this.search_field.val("");
|
783 |
+
}
|
784 |
+
$(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
|
785 |
+
this.results_show();
|
786 |
+
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
|
787 |
+
evt.preventDefault();
|
788 |
+
this.results_toggle();
|
789 |
+
}
|
790 |
+
return this.activate_field();
|
791 |
+
}
|
792 |
+
}
|
793 |
+
};
|
794 |
+
|
795 |
+
Chosen.prototype.container_mouseup = function(evt) {
|
796 |
+
if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
|
797 |
+
return this.results_reset(evt);
|
798 |
+
}
|
799 |
+
};
|
800 |
+
|
801 |
+
Chosen.prototype.search_results_mousewheel = function(evt) {
|
802 |
+
var delta;
|
803 |
+
if (evt.originalEvent) {
|
804 |
+
delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
|
805 |
+
}
|
806 |
+
if (delta != null) {
|
807 |
+
evt.preventDefault();
|
808 |
+
if (evt.type === 'DOMMouseScroll') {
|
809 |
+
delta = delta * 40;
|
810 |
+
}
|
811 |
+
return this.search_results.scrollTop(delta + this.search_results.scrollTop());
|
812 |
+
}
|
813 |
+
};
|
814 |
+
|
815 |
+
Chosen.prototype.blur_test = function(evt) {
|
816 |
+
if (!this.active_field && this.container.hasClass("chosen-container-active")) {
|
817 |
+
return this.close_field();
|
818 |
+
}
|
819 |
+
};
|
820 |
+
|
821 |
+
Chosen.prototype.close_field = function() {
|
822 |
+
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
823 |
+
this.active_field = false;
|
824 |
+
this.results_hide();
|
825 |
+
this.container.removeClass("chosen-container-active");
|
826 |
+
this.clear_backstroke();
|
827 |
+
this.show_search_field_default();
|
828 |
+
return this.search_field_scale();
|
829 |
+
};
|
830 |
+
|
831 |
+
Chosen.prototype.activate_field = function() {
|
832 |
+
this.container.addClass("chosen-container-active");
|
833 |
+
this.active_field = true;
|
834 |
+
this.search_field.val(this.search_field.val());
|
835 |
+
return this.search_field.focus();
|
836 |
+
};
|
837 |
+
|
838 |
+
Chosen.prototype.test_active_click = function(evt) {
|
839 |
+
var active_container;
|
840 |
+
active_container = $(evt.target).closest('.chosen-container');
|
841 |
+
if (active_container.length && this.container[0] === active_container[0]) {
|
842 |
+
return this.active_field = true;
|
843 |
+
} else {
|
844 |
+
return this.close_field();
|
845 |
+
}
|
846 |
+
};
|
847 |
+
|
848 |
+
Chosen.prototype.results_build = function() {
|
849 |
+
this.parsing = true;
|
850 |
+
this.selected_option_count = null;
|
851 |
+
this.results_data = SelectParser.select_to_array(this.form_field);
|
852 |
+
if (this.is_multiple) {
|
853 |
+
this.search_choices.find("li.search-choice").remove();
|
854 |
+
} else if (!this.is_multiple) {
|
855 |
+
this.single_set_selected_text();
|
856 |
+
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
|
857 |
+
this.search_field[0].readOnly = true;
|
858 |
+
this.container.addClass("chosen-container-single-nosearch");
|
859 |
+
} else {
|
860 |
+
this.search_field[0].readOnly = false;
|
861 |
+
this.container.removeClass("chosen-container-single-nosearch");
|
862 |
+
}
|
863 |
+
}
|
864 |
+
this.update_results_content(this.results_option_build({
|
865 |
+
first: true
|
866 |
+
}));
|
867 |
+
this.search_field_disabled();
|
868 |
+
this.show_search_field_default();
|
869 |
+
this.search_field_scale();
|
870 |
+
return this.parsing = false;
|
871 |
+
};
|
872 |
+
|
873 |
+
Chosen.prototype.result_do_highlight = function(el) {
|
874 |
+
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
875 |
+
if (el.length) {
|
876 |
+
this.result_clear_highlight();
|
877 |
+
this.result_highlight = el;
|
878 |
+
this.result_highlight.addClass("highlighted");
|
879 |
+
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
|
880 |
+
visible_top = this.search_results.scrollTop();
|
881 |
+
visible_bottom = maxHeight + visible_top;
|
882 |
+
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
|
883 |
+
high_bottom = high_top + this.result_highlight.outerHeight();
|
884 |
+
if (high_bottom >= visible_bottom) {
|
885 |
+
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
|
886 |
+
} else if (high_top < visible_top) {
|
887 |
+
return this.search_results.scrollTop(high_top);
|
888 |
+
}
|
889 |
+
}
|
890 |
+
};
|
891 |
+
|
892 |
+
Chosen.prototype.result_clear_highlight = function() {
|
893 |
+
if (this.result_highlight) {
|
894 |
+
this.result_highlight.removeClass("highlighted");
|
895 |
+
}
|
896 |
+
return this.result_highlight = null;
|
897 |
+
};
|
898 |
+
|
899 |
+
Chosen.prototype.results_show = function() {
|
900 |
+
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
901 |
+
this.form_field_jq.trigger("chosen:maxselected", {
|
902 |
+
chosen: this
|
903 |
+
});
|
904 |
+
return false;
|
905 |
+
}
|
906 |
+
this.container.addClass("chosen-with-drop");
|
907 |
+
this.results_showing = true;
|
908 |
+
this.search_field.focus();
|
909 |
+
this.search_field.val(this.search_field.val());
|
910 |
+
this.winnow_results();
|
911 |
+
return this.form_field_jq.trigger("chosen:showing_dropdown", {
|
912 |
+
chosen: this
|
913 |
+
});
|
914 |
+
};
|
915 |
+
|
916 |
+
Chosen.prototype.update_results_content = function(content) {
|
917 |
+
return this.search_results.html(content);
|
918 |
+
};
|
919 |
+
|
920 |
+
Chosen.prototype.results_hide = function() {
|
921 |
+
if (this.results_showing) {
|
922 |
+
this.result_clear_highlight();
|
923 |
+
this.container.removeClass("chosen-with-drop");
|
924 |
+
this.form_field_jq.trigger("chosen:hiding_dropdown", {
|
925 |
+
chosen: this
|
926 |
+
});
|
927 |
+
}
|
928 |
+
return this.results_showing = false;
|
929 |
+
};
|
930 |
+
|
931 |
+
Chosen.prototype.set_tab_index = function(el) {
|
932 |
+
var ti;
|
933 |
+
if (this.form_field.tabIndex) {
|
934 |
+
ti = this.form_field.tabIndex;
|
935 |
+
this.form_field.tabIndex = -1;
|
936 |
+
return this.search_field[0].tabIndex = ti;
|
937 |
+
}
|
938 |
+
};
|
939 |
+
|
940 |
+
Chosen.prototype.set_label_behavior = function() {
|
941 |
+
var _this = this;
|
942 |
+
this.form_field_label = this.form_field_jq.parents("label");
|
943 |
+
if (!this.form_field_label.length && this.form_field.id.length) {
|
944 |
+
this.form_field_label = $("label[for='" + this.form_field.id + "']");
|
945 |
+
}
|
946 |
+
if (this.form_field_label.length > 0) {
|
947 |
+
return this.form_field_label.bind('click.chosen', function(evt) {
|
948 |
+
if (_this.is_multiple) {
|
949 |
+
return _this.container_mousedown(evt);
|
950 |
+
} else {
|
951 |
+
return _this.activate_field();
|
952 |
+
}
|
953 |
+
});
|
954 |
+
}
|
955 |
+
};
|
956 |
+
|
957 |
+
Chosen.prototype.show_search_field_default = function() {
|
958 |
+
if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
|
959 |
+
this.search_field.val(this.default_text);
|
960 |
+
return this.search_field.addClass("default");
|
961 |
+
} else {
|
962 |
+
this.search_field.val("");
|
963 |
+
return this.search_field.removeClass("default");
|
964 |
+
}
|
965 |
+
};
|
966 |
+
|
967 |
+
Chosen.prototype.search_results_mouseup = function(evt) {
|
968 |
+
var target;
|
969 |
+
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
970 |
+
if (target.length) {
|
971 |
+
this.result_highlight = target;
|
972 |
+
this.result_select(evt);
|
973 |
+
return this.search_field.focus();
|
974 |
+
}
|
975 |
+
};
|
976 |
+
|
977 |
+
Chosen.prototype.search_results_mouseover = function(evt) {
|
978 |
+
var target;
|
979 |
+
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
980 |
+
if (target) {
|
981 |
+
return this.result_do_highlight(target);
|
982 |
+
}
|
983 |
+
};
|
984 |
+
|
985 |
+
Chosen.prototype.search_results_mouseout = function(evt) {
|
986 |
+
if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
|
987 |
+
return this.result_clear_highlight();
|
988 |
+
}
|
989 |
+
};
|
990 |
+
|
991 |
+
Chosen.prototype.choice_build = function(item) {
|
992 |
+
var choice, close_link,
|
993 |
+
_this = this;
|
994 |
+
choice = $('<li />', {
|
995 |
+
"class": "search-choice"
|
996 |
+
}).html("<span>" + (this.choice_label(item)) + "</span>");
|
997 |
+
if (item.disabled) {
|
998 |
+
choice.addClass('search-choice-disabled');
|
999 |
+
} else {
|
1000 |
+
close_link = $('<a />', {
|
1001 |
+
"class": 'search-choice-close',
|
1002 |
+
'data-option-array-index': item.array_index
|
1003 |
+
});
|
1004 |
+
close_link.bind('click.chosen', function(evt) {
|
1005 |
+
return _this.choice_destroy_link_click(evt);
|
1006 |
+
});
|
1007 |
+
choice.append(close_link);
|
1008 |
+
}
|
1009 |
+
return this.search_container.before(choice);
|
1010 |
+
};
|
1011 |
+
|
1012 |
+
Chosen.prototype.choice_destroy_link_click = function(evt) {
|
1013 |
+
evt.preventDefault();
|
1014 |
+
evt.stopPropagation();
|
1015 |
+
if (!this.is_disabled) {
|
1016 |
+
return this.choice_destroy($(evt.target));
|
1017 |
+
}
|
1018 |
+
};
|
1019 |
+
|
1020 |
+
Chosen.prototype.choice_destroy = function(link) {
|
1021 |
+
if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
|
1022 |
+
this.show_search_field_default();
|
1023 |
+
if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
|
1024 |
+
this.results_hide();
|
1025 |
+
}
|
1026 |
+
link.parents('li').first().remove();
|
1027 |
+
return this.search_field_scale();
|
1028 |
+
}
|
1029 |
+
};
|
1030 |
+
|
1031 |
+
Chosen.prototype.results_reset = function() {
|
1032 |
+
this.reset_single_select_options();
|
1033 |
+
this.form_field.options[0].selected = true;
|
1034 |
+
this.single_set_selected_text();
|
1035 |
+
this.show_search_field_default();
|
1036 |
+
this.results_reset_cleanup();
|
1037 |
+
this.form_field_jq.trigger("change");
|
1038 |
+
if (this.active_field) {
|
1039 |
+
return this.results_hide();
|
1040 |
+
}
|
1041 |
+
};
|
1042 |
+
|
1043 |
+
Chosen.prototype.results_reset_cleanup = function() {
|
1044 |
+
this.current_selectedIndex = this.form_field.selectedIndex;
|
1045 |
+
return this.selected_item.find("abbr").remove();
|
1046 |
+
};
|
1047 |
+
|
1048 |
+
Chosen.prototype.result_select = function(evt) {
|
1049 |
+
var high, item;
|
1050 |
+
if (this.result_highlight) {
|
1051 |
+
high = this.result_highlight;
|
1052 |
+
this.result_clear_highlight();
|
1053 |
+
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
1054 |
+
this.form_field_jq.trigger("chosen:maxselected", {
|
1055 |
+
chosen: this
|
1056 |
+
});
|
1057 |
+
return false;
|
1058 |
+
}
|
1059 |
+
if (this.is_multiple) {
|
1060 |
+
high.removeClass("active-result");
|
1061 |
+
} else {
|
1062 |
+
this.reset_single_select_options();
|
1063 |
+
}
|
1064 |
+
high.addClass("result-selected");
|
1065 |
+
item = this.results_data[high[0].getAttribute("data-option-array-index")];
|
1066 |
+
item.selected = true;
|
1067 |
+
this.form_field.options[item.options_index].selected = true;
|
1068 |
+
this.selected_option_count = null;
|
1069 |
+
if (this.is_multiple) {
|
1070 |
+
this.choice_build(item);
|
1071 |
+
} else {
|
1072 |
+
this.single_set_selected_text(this.choice_label(item));
|
1073 |
+
}
|
1074 |
+
if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
|
1075 |
+
this.results_hide();
|
1076 |
+
}
|
1077 |
+
this.show_search_field_default();
|
1078 |
+
if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
|
1079 |
+
this.form_field_jq.trigger("change", {
|
1080 |
+
'selected': this.form_field.options[item.options_index].value
|
1081 |
+
});
|
1082 |
+
}
|
1083 |
+
this.current_selectedIndex = this.form_field.selectedIndex;
|
1084 |
+
evt.preventDefault();
|
1085 |
+
return this.search_field_scale();
|
1086 |
+
}
|
1087 |
+
};
|
1088 |
+
|
1089 |
+
Chosen.prototype.single_set_selected_text = function(text) {
|
1090 |
+
if (text == null) {
|
1091 |
+
text = this.default_text;
|
1092 |
+
}
|
1093 |
+
if (text === this.default_text) {
|
1094 |
+
this.selected_item.addClass("chosen-default");
|
1095 |
+
} else {
|
1096 |
+
this.single_deselect_control_build();
|
1097 |
+
this.selected_item.removeClass("chosen-default");
|
1098 |
+
}
|
1099 |
+
return this.selected_item.find("span").html(text);
|
1100 |
+
};
|
1101 |
+
|
1102 |
+
Chosen.prototype.result_deselect = function(pos) {
|
1103 |
+
var result_data;
|
1104 |
+
result_data = this.results_data[pos];
|
1105 |
+
if (!this.form_field.options[result_data.options_index].disabled) {
|
1106 |
+
result_data.selected = false;
|
1107 |
+
this.form_field.options[result_data.options_index].selected = false;
|
1108 |
+
this.selected_option_count = null;
|
1109 |
+
this.result_clear_highlight();
|
1110 |
+
if (this.results_showing) {
|
1111 |
+
this.winnow_results();
|
1112 |
+
}
|
1113 |
+
this.form_field_jq.trigger("change", {
|
1114 |
+
deselected: this.form_field.options[result_data.options_index].value
|
1115 |
+
});
|
1116 |
+
this.search_field_scale();
|
1117 |
+
return true;
|
1118 |
+
} else {
|
1119 |
+
return false;
|
1120 |
+
}
|
1121 |
+
};
|
1122 |
+
|
1123 |
+
Chosen.prototype.single_deselect_control_build = function() {
|
1124 |
+
if (!this.allow_single_deselect) {
|
1125 |
+
return;
|
1126 |
+
}
|
1127 |
+
if (!this.selected_item.find("abbr").length) {
|
1128 |
+
this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
|
1129 |
+
}
|
1130 |
+
return this.selected_item.addClass("chosen-single-with-deselect");
|
1131 |
+
};
|
1132 |
+
|
1133 |
+
Chosen.prototype.get_search_text = function() {
|
1134 |
+
return $('<div/>').text($.trim(this.search_field.val())).html();
|
1135 |
+
};
|
1136 |
+
|
1137 |
+
Chosen.prototype.winnow_results_set_highlight = function() {
|
1138 |
+
var do_high, selected_results;
|
1139 |
+
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
|
1140 |
+
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
|
1141 |
+
if (do_high != null) {
|
1142 |
+
return this.result_do_highlight(do_high);
|
1143 |
+
}
|
1144 |
+
};
|
1145 |
+
|
1146 |
+
Chosen.prototype.no_results = function(terms) {
|
1147 |
+
var no_results_html;
|
1148 |
+
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
|
1149 |
+
no_results_html.find("span").first().html(terms);
|
1150 |
+
this.search_results.append(no_results_html);
|
1151 |
+
return this.form_field_jq.trigger("chosen:no_results", {
|
1152 |
+
chosen: this
|
1153 |
+
});
|
1154 |
+
};
|
1155 |
+
|
1156 |
+
Chosen.prototype.no_results_clear = function() {
|
1157 |
+
return this.search_results.find(".no-results").remove();
|
1158 |
+
};
|
1159 |
+
|
1160 |
+
Chosen.prototype.keydown_arrow = function() {
|
1161 |
+
var next_sib;
|
1162 |
+
if (this.results_showing && this.result_highlight) {
|
1163 |
+
next_sib = this.result_highlight.nextAll("li.active-result").first();
|
1164 |
+
if (next_sib) {
|
1165 |
+
return this.result_do_highlight(next_sib);
|
1166 |
+
}
|
1167 |
+
} else {
|
1168 |
+
return this.results_show();
|
1169 |
+
}
|
1170 |
+
};
|
1171 |
+
|
1172 |
+
Chosen.prototype.keyup_arrow = function() {
|
1173 |
+
var prev_sibs;
|
1174 |
+
if (!this.results_showing && !this.is_multiple) {
|
1175 |
+
return this.results_show();
|
1176 |
+
} else if (this.result_highlight) {
|
1177 |
+
prev_sibs = this.result_highlight.prevAll("li.active-result");
|
1178 |
+
if (prev_sibs.length) {
|
1179 |
+
return this.result_do_highlight(prev_sibs.first());
|
1180 |
+
} else {
|
1181 |
+
if (this.choices_count() > 0) {
|
1182 |
+
this.results_hide();
|
1183 |
+
}
|
1184 |
+
return this.result_clear_highlight();
|
1185 |
+
}
|
1186 |
+
}
|
1187 |
+
};
|
1188 |
+
|
1189 |
+
Chosen.prototype.keydown_backstroke = function() {
|
1190 |
+
var next_available_destroy;
|
1191 |
+
if (this.pending_backstroke) {
|
1192 |
+
this.choice_destroy(this.pending_backstroke.find("a").first());
|
1193 |
+
return this.clear_backstroke();
|
1194 |
+
} else {
|
1195 |
+
next_available_destroy = this.search_container.siblings("li.search-choice").last();
|
1196 |
+
if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
|
1197 |
+
this.pending_backstroke = next_available_destroy;
|
1198 |
+
if (this.single_backstroke_delete) {
|
1199 |
+
return this.keydown_backstroke();
|
1200 |
+
} else {
|
1201 |
+
return this.pending_backstroke.addClass("search-choice-focus");
|
1202 |
+
}
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
};
|
1206 |
+
|
1207 |
+
Chosen.prototype.clear_backstroke = function() {
|
1208 |
+
if (this.pending_backstroke) {
|
1209 |
+
this.pending_backstroke.removeClass("search-choice-focus");
|
1210 |
+
}
|
1211 |
+
return this.pending_backstroke = null;
|
1212 |
+
};
|
1213 |
+
|
1214 |
+
Chosen.prototype.keydown_checker = function(evt) {
|
1215 |
+
var stroke, _ref1;
|
1216 |
+
stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
|
1217 |
+
this.search_field_scale();
|
1218 |
+
if (stroke !== 8 && this.pending_backstroke) {
|
1219 |
+
this.clear_backstroke();
|
1220 |
+
}
|
1221 |
+
switch (stroke) {
|
1222 |
+
case 8:
|
1223 |
+
this.backstroke_length = this.search_field.val().length;
|
1224 |
+
break;
|
1225 |
+
case 9:
|
1226 |
+
if (this.results_showing && !this.is_multiple) {
|
1227 |
+
this.result_select(evt);
|
1228 |
+
}
|
1229 |
+
this.mouse_on_container = false;
|
1230 |
+
break;
|
1231 |
+
case 13:
|
1232 |
+
if (this.results_showing) {
|
1233 |
+
evt.preventDefault();
|
1234 |
+
}
|
1235 |
+
break;
|
1236 |
+
case 32:
|
1237 |
+
if (this.disable_search) {
|
1238 |
+
evt.preventDefault();
|
1239 |
+
}
|
1240 |
+
break;
|
1241 |
+
case 38:
|
1242 |
+
evt.preventDefault();
|
1243 |
+
this.keyup_arrow();
|
1244 |
+
break;
|
1245 |
+
case 40:
|
1246 |
+
evt.preventDefault();
|
1247 |
+
this.keydown_arrow();
|
1248 |
+
break;
|
1249 |
+
}
|
1250 |
+
};
|
1251 |
+
|
1252 |
+
Chosen.prototype.search_field_scale = function() {
|
1253 |
+
var div, f_width, h, style, style_block, styles, w, _i, _len;
|
1254 |
+
if (this.is_multiple) {
|
1255 |
+
h = 0;
|
1256 |
+
w = 0;
|
1257 |
+
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
|
1258 |
+
styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
|
1259 |
+
for (_i = 0, _len = styles.length; _i < _len; _i++) {
|
1260 |
+
style = styles[_i];
|
1261 |
+
style_block += style + ":" + this.search_field.css(style) + ";";
|
1262 |
+
}
|
1263 |
+
div = $('<div />', {
|
1264 |
+
'style': style_block
|
1265 |
+
});
|
1266 |
+
div.text(this.search_field.val());
|
1267 |
+
$('body').append(div);
|
1268 |
+
w = div.width() + 25;
|
1269 |
+
div.remove();
|
1270 |
+
f_width = this.container.outerWidth();
|
1271 |
+
if (w > f_width - 10) {
|
1272 |
+
w = f_width - 10;
|
1273 |
+
}
|
1274 |
+
return this.search_field.css({
|
1275 |
+
'width': w + 'px'
|
1276 |
+
});
|
1277 |
+
}
|
1278 |
+
};
|
1279 |
+
|
1280 |
+
return Chosen;
|
1281 |
+
|
1282 |
+
})(AbstractChosen);
|
1283 |
+
|
1284 |
+
}).call(this);
|
assets/js/chosen.jquery.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/* Chosen v1.5.1 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
Â
(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(c){var d,e;return d=a(this),e=d.data("chosen"),"destroy"===b?void(e instanceof Chosen&&e.destroy()):void(e instanceof Chosen||d.data("chosen",new Chosen(this,b)))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
|
1 |
+
/* Chosen v1.5.1 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
Â
(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(c){var d,e;return d=a(this),e=d.data("chosen"),"destroy"===b?void(e instanceof Chosen&&e.destroy()):void(e instanceof Chosen||d.data("chosen",new Chosen(this,b)))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
|
assets/js/jscolor.min.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
/**
|
2 |
-
* jscolor - JavaScript Color Picker
|
3 |
-
*
|
4 |
-
* @link http://jscolor.com
|
5 |
-
* @license For open source use: GPLv3
|
6 |
-
* For commercial use: JSColor Commercial License
|
7 |
-
* @author Jan Odvarko
|
8 |
-
*
|
9 |
-
* See usage examples at http://jscolor.com/examples/
|
10 |
Â
*/"use strict";window.jscolor||(window.jscolor=function(){var e={register:function(){e.attachDOMReadyEvent(e.init),e.attachEvent(document,"mousedown",e.onDocumentMouseDown),e.attachEvent(document,"touchstart",e.onDocumentTouchStart),e.attachEvent(window,"resize",e.onWindowResize)},init:function(){e.jscolor.lookupClass&&e.jscolor.installByClassName(e.jscolor.lookupClass)},tryInstallOnElements:function(t,n){var r=new RegExp("(^|\\s)("+n+")(\\s*(\\{[^}]*\\})|\\s|$)","i");for(var i=0;i<t.length;i+=1){if(t[i].type!==undefined&&t[i].type.toLowerCase()=="color"&&e.isColorAttrSupported)continue;var s;if(!t[i].jscolor&&t[i].className&&(s=t[i].className.match(r))){var o=t[i],u=null,a=e.getDataAttr(o,"jscolor");a!==null?u=a:s[4]&&(u=s[4]);var f={};if(u)try{f=(new Function("return ("+u+")"))()}catch(l){e.warn("Error parsing jscolor options: "+l+":\n"+u)}o.jscolor=new e.jscolor(o,f)}}},isColorAttrSupported:function(){var e=document.createElement("input");if(e.setAttribute){e.setAttribute("type","color");if(e.type.toLowerCase()=="color")return!0}return!1}(),isCanvasSupported:function(){var e=document.createElement("canvas");return!!e.getContext&&!!e.getContext("2d")}(),fetchElement:function(e){return typeof e=="string"?document.getElementById(e):e},isElementType:function(e,t){return e.nodeName.toLowerCase()===t.toLowerCase()},getDataAttr:function(e,t){var n="data-"+t,r=e.getAttribute(n);return r!==null?r:null},attachEvent:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},detachEvent:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},_attachedGroupEvents:{},attachGroupEvent:function(t,n,r,i){e._attachedGroupEvents.hasOwnProperty(t)||(e._attachedGroupEvents[t]=[]),e._attachedGroupEvents[t].push([n,r,i]),e.attachEvent(n,r,i)},detachGroupEvents:function(t){if(e._attachedGroupEvents.hasOwnProperty(t)){for(var n=0;n<e._attachedGroupEvents[t].length;n+=1){var r=e._attachedGroupEvents[t][n];e.detachEvent(r[0],r[1],r[2])}delete e._attachedGroupEvents[t]}},attachDOMReadyEvent:function(e){var t=!1,n=function(){t||(t=!0,e())};if(document.readyState==="complete"){setTimeout(n,1);return}if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){document.readyState==="complete"&&(document.detachEvent("onreadystatechange",arguments.callee),n())}),window.attachEvent("onload",n);if(document.documentElement.doScroll&&window==window.top){var r=function(){if(!document.body)return;try{document.documentElement.doScroll("left"),n()}catch(e){setTimeout(r,1)}};r()}}},warn:function(e){window.console&&window.console.warn&&window.console.warn(e)},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(t){t.setCapture&&(e._capturedTarget=t,e._capturedTarget.setCapture())},releaseTarget:function(){e._capturedTarget&&(e._capturedTarget.releaseCapture(),e._capturedTarget=null)},fireEvent:function(e,t){if(!e)return;if(document.createEvent){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}else if(document.createEventObject){var n=document.createEventObject();e.fireEvent("on"+t,n)}else e["on"+t]&&e["on"+t]()},classNameToList:function(e){return e.replace(/^\s+|\s+$/g,"").split(/\s+/)},hasClass:function(e,t){return t?-1!=(" "+e.className.replace(/\s+/g," ")+" ").indexOf(" "+t+" "):!1},setClass:function(t,n){var r=e.classNameToList(n);for(var i=0;i<r.length;i+=1)e.hasClass(t,r[i])||(t.className+=(t.className?" ":"")+r[i])},unsetClass:function(t,n){var r=e.classNameToList(n);for(var i=0;i<r.length;i+=1){var s=new RegExp("^\\s*"+r[i]+"\\s*|"+"\\s*"+r[i]+"\\s*$|"+"\\s+"+r[i]+"(\\s+)","g");t.className=t.className.replace(s,"$1")}},getStyle:function(e){return window.getComputedStyle?window.getComputedStyle(e):e.currentStyle},setStyle:function(){var e=document.createElement("div"),t=function(t){for(var n=0;n<t.length;n+=1)if(t[n]in e.style)return t[n]},n={borderRadius:t(["borderRadius","MozBorderRadius","webkitBorderRadius"]),boxShadow:t(["boxShadow","MozBoxShadow","webkitBoxShadow"])};return function(e,t,r){switch(t.toLowerCase()){case"opacity":var i=Math.round(parseFloat(r)*100);e.style.opacity=r,e.style.filter="alpha(opacity="+i+")";break;default:e.style[n[t]]=r}}}(),setBorderRadius:function(t,n){e.setStyle(t,"borderRadius",n||"0")},setBoxShadow:function(t,n){e.setStyle(t,"boxShadow",n||"none")},getElementPos:function(t,n){var r=0,i=0,s=t.getBoundingClientRect();r=s.left,i=s.top;if(!n){var o=e.getViewPos();r+=o[0],i+=o[1]}return[r,i]},getElementSize:function(e){return[e.offsetWidth,e.offsetHeight]},getAbsPointerPos:function(e){e||(e=window.event);var t=0,n=0;return typeof e.changedTouches!="undefined"&&e.changedTouches.length?(t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY):typeof e.clientX=="number"&&(t=e.clientX,n=e.clientY),{x:t,y:n}},getRelPointerPos:function(e){e||(e=window.event);var t=e.target||e.srcElement,n=t.getBoundingClientRect(),r=0,i=0,s=0,o=0;return typeof e.changedTouches!="undefined"&&e.changedTouches.length?(s=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):typeof e.clientX=="number"&&(s=e.clientX,o=e.clientY),r=s-n.left,i=o-n.top,{x:r,y:i}},getViewPos:function(){var e=document.documentElement;return[(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0),(window.pageYOffset||e.scrollTop)-(e.clientTop||0)]},getViewSize:function(){var e=document.documentElement;return[window.innerWidth||e.clientWidth,window.innerHeight||e.clientHeight]},redrawPosition:function(){if(e.picker&&e.picker.owner){var t=e.picker.owner,n,r;t.fixed?(n=e.getElementPos(t.targetElement,!0),r=[0,0]):(n=e.getElementPos(t.targetElement),r=e.getViewPos());var i=e.getElementSize(t.targetElement),s=e.getViewSize(),o=e.getPickerOuterDims(t),u,a,f;switch(t.position.toLowerCase()){case"left":u=1,a=0,f=-1;break;case"right":u=1,a=0,f=1;break;case"top":u=0,a=1,f=-1;break;default:u=0,a=1,f=1}var l=(i[a]+o[a])/2;if(!t.smartPosition)var c=[n[u],n[a]+i[a]-l+l*f];else var c=[-r[u]+n[u]+o[u]>s[u]?-r[u]+n[u]+i[u]/2>s[u]/2&&n[u]+i[u]-o[u]>=0?n[u]+i[u]-o[u]:n[u]:n[u],-r[a]+n[a]+i[a]+o[a]-l+l*f>s[a]?-r[a]+n[a]+i[a]/2>s[a]/2&&n[a]+i[a]-l-l*f>=0?n[a]+i[a]-l-l*f:n[a]+i[a]-l+l*f:n[a]+i[a]-l+l*f>=0?n[a]+i[a]-l+l*f:n[a]+i[a]-l-l*f];var h=c[u],p=c[a],d=t.fixed?"fixed":"absolute",v=(c[0]+o[0]>n[0]||c[0]<n[0]+i[0])&&c[1]+o[1]<n[1]+i[1];e._drawPosition(t,h,p,d,v)}},_drawPosition:function(t,n,r,i,s){var o=s?0:t.shadowBlur;e.picker.wrap.style.position=i,e.picker.wrap.style.left=n+"px",e.picker.wrap.style.top=r+"px",e.setBoxShadow(e.picker.boxS,t.shadow?new e.BoxShadow(0,o,t.shadowBlur,0,t.shadowColor):null)},getPickerDims:function(t){var n=!!e.getSliderComponent(t),r=[2*t.insetWidth+2*t.padding+t.width+(n?2*t.insetWidth+e.getPadToSliderPadding(t)+t.sliderSize:0),2*t.insetWidth+2*t.padding+t.height+(t.closable?2*t.insetWidth+t.padding+t.buttonHeight:0)];return r},getPickerOuterDims:function(t){var n=e.getPickerDims(t);return[n[0]+2*t.borderWidth,n[1]+2*t.borderWidth]},getPadToSliderPadding:function(e){return Math.max(e.padding,1.5*(2*e.pointerBorderWidth+e.pointerThickness))},getPadYComponent:function(e){switch(e.mode.charAt(1).toLowerCase()){case"v":return"v"}return"s"},getSliderComponent:function(e){if(e.mode.length>2)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},onDocumentMouseDown:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,"mouse"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onDocumentTouchStart:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,"touch"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onWindowResize:function(t){e.redrawPosition()},onParentScroll:function(t){e.picker&&e.picker.owner&&e.picker.owner.hide()},_pointerMoveEvent:{mouse:"mousemove",touch:"touchmove"},_pointerEndEvent:{mouse:"mouseup",touch:"touchend"},_pointerOrigin:null,_capturedTarget:null,onControlPointerStart:function(t,n,r,i){var s=n._jscInstance;e.preventDefault(t),e.captureTarget(n);var o=function(s,o){e.attachGroupEvent("drag",s,e._pointerMoveEvent[i],e.onDocumentPointerMove(t,n,r,i,o)),e.attachGroupEvent("drag",s,e._pointerEndEvent[i],e.onDocumentPointerEnd(t,n,r,i))};o(document,[0,0]);if(window.parent&&window.frameElement){var u=window.frameElement.getBoundingClientRect(),a=[-u.left,-u.top];o(window.parent.window.document,a)}var f=e.getAbsPointerPos(t),l=e.getRelPointerPos(t);e._pointerOrigin={x:f.x-l.x,y:f.y-l.y};switch(r){case"pad":switch(e.getSliderComponent(s)){case"s":s.hsv[1]===0&&s.fromHSV(null,100,null);break;case"v":s.hsv[2]===0&&s.fromHSV(null,null,100)}e.setPad(s,t,0,0);break;case"sld":e.setSld(s,t,0)}e.dispatchFineChange(s)},onDocumentPointerMove:function(t,n,r,i,s){return function(t){var i=n._jscInstance;switch(r){case"pad":t||(t=window.event),e.setPad(i,t,s[0],s[1]),e.dispatchFineChange(i);break;case"sld":t||(t=window.event),e.setSld(i,t,s[1]),e.dispatchFineChange(i)}}},onDocumentPointerEnd:function(t,n,r,i){return function(t){var r=n._jscInstance;e.detachGroupEvents("drag"),e.releaseTarget(),e.dispatchChange(r)}},dispatchChange:function(t){t.valueElement&&e.isElementType(t.valueElement,"input")&&e.fireEvent(t.valueElement,"change")},dispatchFineChange:function(e){if(e.onFineChange){var t;typeof e.onFineChange=="string"?t=new Function(e.onFineChange):t=e.onFineChange,t.call(e)}},setPad:function(t,n,r,i){var s=e.getAbsPointerPos(n),o=r+s.x-e._pointerOrigin.x-t.padding-t.insetWidth,u=i+s.y-e._pointerOrigin.y-t.padding-t.insetWidth,a=o*(360/(t.width-1)),f=100-u*(100/(t.height-1));switch(e.getPadYComponent(t)){case"s":t.fromHSV(a,f,null,e.leaveSld);break;case"v":t.fromHSV(a,null,f,e.leaveSld)}},setSld:function(t,n,r){var i=e.getAbsPointerPos(n),s=r+i.y-e._pointerOrigin.y-t.padding-t.insetWidth,o=100-s*(100/(t.height-1));switch(e.getSliderComponent(t)){case"s":t.fromHSV(null,o,null,e.leavePad);break;case"v":t.fromHSV(null,null,o,e.leavePad)}},_vmlNS:"jsc_vml_",_vmlCSS:"jsc_vml_css_",_vmlReady:!1,initVML:function(){if(!e._vmlReady){var t=document;t.namespaces[e._vmlNS]||t.namespaces.add(e._vmlNS,"urn:schemas-microsoft-com:vml");if(!t.styleSheets[e._vmlCSS]){var n=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","rect","roundrect","oval","arc","image"],r=t.createStyleSheet();r.owningElement.id=e._vmlCSS;for(var i=0;i<n.length;i+=1)r.addRule(e._vmlNS+"\\:"+n[i],"behavior:url(#default#VML);")}e._vmlReady=!0}},createPalette:function(){var t={elm:null,draw:null};if(e.isCanvasSupported){var n=document.createElement("canvas"),r=n.getContext("2d"),i=function(e,t,i){n.width=e,n.height=t,r.clearRect(0,0,n.width,n.height);var s=r.createLinearGradient(0,0,n.width,0);s.addColorStop(0,"#F00"),s.addColorStop(1/6,"#FF0"),s.addColorStop(2/6,"#0F0"),s.addColorStop(.5,"#0FF"),s.addColorStop(4/6,"#00F"),s.addColorStop(5/6,"#F0F"),s.addColorStop(1,"#F00"),r.fillStyle=s,r.fillRect(0,0,n.width,n.height);var o=r.createLinearGradient(0,0,0,n.height);switch(i.toLowerCase()){case"s":o.addColorStop(0,"rgba(255,255,255,0)"),o.addColorStop(1,"rgba(255,255,255,1)");break;case"v":o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)")}r.fillStyle=o,r.fillRect(0,0,n.width,n.height)};t.elm=n,t.draw=i}else{e.initVML();var s=document.createElement("div");s.style.position="relative",s.style.overflow="hidden";var o=document.createElement(e._vmlNS+":fill");o.type="gradient",o.method="linear",o.angle="90",o.colors="16.67% #F0F, 33.33% #00F, 50% #0FF, 66.67% #0F0, 83.33% #FF0";var u=document.createElement(e._vmlNS+":rect");u.style.position="absolute",u.style.left="-1px",u.style.top="-1px",u.stroked=!1,u.appendChild(o),s.appendChild(u);var a=document.createElement(e._vmlNS+":fill");a.type="gradient",a.method="linear",a.angle="180",a.opacity="0";var f=document.createElement(e._vmlNS+":rect");f.style.position="absolute",f.style.left="-1px",f.style.top="-1px",f.stroked=!1,f.appendChild(a),s.appendChild(f);var i=function(e,t,n){s.style.width=e+"px",s.style.height=t+"px",u.style.width=f.style.width=e+1+"px",u.style.height=f.style.height=t+1+"px",o.color="#F00",o.color2="#F00";switch(n.toLowerCase()){case"s":a.color=a.color2="#FFF";break;case"v":a.color=a.color2="#000"}};t.elm=s,t.draw=i}return t},createSliderGradient:function(){var t={elm:null,draw:null};if(e.isCanvasSupported){var n=document.createElement("canvas"),r=n.getContext("2d"),i=function(e,t,i,s){n.width=e,n.height=t,r.clearRect(0,0,n.width,n.height);var o=r.createLinearGradient(0,0,0,n.height);o.addColorStop(0,i),o.addColorStop(1,s),r.fillStyle=o,r.fillRect(0,0,n.width,n.height)};t.elm=n,t.draw=i}else{e.initVML();var s=document.createElement("div");s.style.position="relative",s.style.overflow="hidden";var o=document.createElement(e._vmlNS+":fill");o.type="gradient",o.method="linear",o.angle="180";var u=document.createElement(e._vmlNS+":rect");u.style.position="absolute",u.style.left="-1px",u.style.top="-1px",u.stroked=!1,u.appendChild(o),s.appendChild(u);var i=function(e,t,n,r){s.style.width=e+"px",s.style.height=t+"px",u.style.width=e+1+"px",u.style.height=t+1+"px",o.color=n,o.color2=r};t.elm=s,t.draw=i}return t},leaveValue:1,leaveStyle:2,leavePad:4,leaveSld:8,BoxShadow:function(){var e=function(e,t,n,r,i,s){this.hShadow=e,this.vShadow=t,this.blur=n,this.spread=r,this.color=i,this.inset=!!s};return e.prototype.toString=function(){var e=[Math.round(this.hShadow)+"px",Math.round(this.vShadow)+"px",Math.round(this.blur)+"px",Math.round(this.spread)+"px",this.color];return this.inset&&e.push("inset"),e.join(" ")},e}(),jscolor:function(t,n){function i(e,t,n){e/=255,t/=255,n/=255;var r=Math.min(Math.min(e,t),n),i=Math.max(Math.max(e,t),n),s=i-r;if(s===0)return[null,0,100*i];var o=e===r?3+(n-t)/s:t===r?5+(e-n)/s:1+(t-e)/s;return[60*(o===6?0:o),100*(s/i),100*i]}function s(e,t,n){var r=255*(n/100);if(e===null)return[r,r,r];e/=60,t/=100;var i=Math.floor(e),s=i%2?e-i:1-(e-i),o=r*(1-t),u=r*(1-t*s);switch(i){case 6:case 0:return[r,u,o];case 1:return[u,r,o];case 2:return[o,r,u];case 3:return[o,u,r];case 4:return[u,o,r];case 5:return[r,o,u]}}function o(){e.unsetClass(d.targetElement,d.activeClass),e.picker.wrap.parentNode.removeChild(e.picker.wrap),delete e.picker.owner}function u(){function l(){var e=d.insetColor.split(/\s+/),n=e.length<2?e[0]:e[1]+" "+e[0]+" "+e[0]+" "+e[1];t.btn.style.borderColor=n}d._processParentElementsInDOM(),e.picker||(e.picker={owner:null,wrap:document.createElement("div"),box:document.createElement("div"),boxS:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),padPal:e.createPalette(),cross:document.createElement("div"),crossBY:document.createElement("div"),crossBX:document.createElement("div"),crossLY:document.createElement("div"),crossLX:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),sldGrad:e.createSliderGradient(),sldPtrS:document.createElement("div"),sldPtrIB:document.createElement("div"),sldPtrMB:document.createElement("div"),sldPtrOB:document.createElement("div"),btn:document.createElement("div"),btnT:document.createElement("span")},e.picker.pad.appendChild(e.picker.padPal.elm),e.picker.padB.appendChild(e.picker.pad),e.picker.cross.appendChild(e.picker.crossBY),e.picker.cross.appendChild(e.picker.crossBX),e.picker.cross.appendChild(e.picker.crossLY),e.picker.cross.appendChild(e.picker.crossLX),e.picker.padB.appendChild(e.picker.cross),e.picker.box.appendChild(e.picker.padB),e.picker.box.appendChild(e.picker.padM),e.picker.sld.appendChild(e.picker.sldGrad.elm),e.picker.sldB.appendChild(e.picker.sld),e.picker.sldB.appendChild(e.picker.sldPtrOB),e.picker.sldPtrOB.appendChild(e.picker.sldPtrMB),e.picker.sldPtrMB.appendChild(e.picker.sldPtrIB),e.picker.sldPtrIB.appendChild(e.picker.sldPtrS),e.picker.box.appendChild(e.picker.sldB),e.picker.box.appendChild(e.picker.sldM),e.picker.btn.appendChild(e.picker.btnT),e.picker.box.appendChild(e.picker.btn),e.picker.boxB.appendChild(e.picker.box),e.picker.wrap.appendChild(e.picker.boxS),e.picker.wrap.appendChild(e.picker.boxB));var t=e.picker,n=!!e.getSliderComponent(d),r=e.getPickerDims(d),i=2*d.pointerBorderWidth+d.pointerThickness+2*d.crossSize,s=e.getPadToSliderPadding(d),o=Math.min(d.borderRadius,Math.round(d.padding*Math.PI)),u="crosshair";t.wrap.style.clear="both",t.wrap.style.width=r[0]+2*d.borderWidth+"px",t.wrap.style.height=r[1]+2*d.borderWidth+"px",t.wrap.style.zIndex=d.zIndex,t.box.style.width=r[0]+"px",t.box.style.height=r[1]+"px",t.boxS.style.position="absolute",t.boxS.style.left="0",t.boxS.style.top="0",t.boxS.style.width="100%",t.boxS.style.height="100%",e.setBorderRadius(t.boxS,o+"px"),t.boxB.style.position="relative",t.boxB.style.border=d.borderWidth+"px solid",t.boxB.style.borderColor=d.borderColor,t.boxB.style.background=d.backgroundColor,e.setBorderRadius(t.boxB,o+"px"),t.padM.style.background=t.sldM.style.background="#FFF",e.setStyle(t.padM,"opacity","0"),e.setStyle(t.sldM,"opacity","0"),t.pad.style.position="relative",t.pad.style.width=d.width+"px",t.pad.style.height=d.height+"px",t.padPal.draw(d.width,d.height,e.getPadYComponent(d)),t.padB.style.position="absolute",t.padB.style.left=d.padding+"px",t.padB.style.top=d.padding+"px",t.padB.style.border=d.insetWidth+"px solid",t.padB.style.borderColor=d.insetColor,t.padM._jscInstance=d,t.padM._jscControlName="pad",t.padM.style.position="absolute",t.padM.style.left="0",t.padM.style.top="0",t.padM.style.width=d.padding+2*d.insetWidth+d.width+s/2+"px",t.padM.style.height=r[1]+"px",t.padM.style.cursor=u,t.cross.style.position="absolute",t.cross.style.left=t.cross.style.top="0",t.cross.style.width=t.cross.style.height=i+"px",t.crossBY.style.position=t.crossBX.style.position="absolute",t.crossBY.style.background=t.crossBX.style.background=d.pointerBorderColor,t.crossBY.style.width=t.crossBX.style.height=2*d.pointerBorderWidth+d.pointerThickness+"px",t.crossBY.style.height=t.crossBX.style.width=i+"px",t.crossBY.style.left=t.crossBX.style.top=Math.floor(i/2)-Math.floor(d.pointerThickness/2)-d.pointerBorderWidth+"px",t.crossBY.style.top=t.crossBX.style.left="0",t.crossLY.style.position=t.crossLX.style.position="absolute",t.crossLY.style.background=t.crossLX.style.background=d.pointerColor,t.crossLY.style.height=t.crossLX.style.width=i-2*d.pointerBorderWidth+"px",t.crossLY.style.width=t.crossLX.style.height=d.pointerThickness+"px",t.crossLY.style.left=t.crossLX.style.top=Math.floor(i/2)-Math.floor(d.pointerThickness/2)+"px",t.crossLY.style.top=t.crossLX.style.left=d.pointerBorderWidth+"px",t.sld.style.overflow="hidden",t.sld.style.width=d.sliderSize+"px",t.sld.style.height=d.height+"px",t.sldGrad.draw(d.sliderSize,d.height,"#000","#000"),t.sldB.style.display=n?"block":"none",t.sldB.style.position="absolute",t.sldB.style.right=d.padding+"px",t.sldB.style.top=d.padding+"px",t.sldB.style.border=d.insetWidth+"px solid",t.sldB.style.borderColor=d.insetColor,t.sldM._jscInstance=d,t.sldM._jscControlName="sld",t.sldM.style.display=n?"block":"none",t.sldM.style.position="absolute",t.sldM.style.right="0",t.sldM.style.top="0",t.sldM.style.width=d.sliderSize+s/2+d.padding+2*d.insetWidth+"px",t.sldM.style.height=r[1]+"px",t.sldM.style.cursor="default",t.sldPtrIB.style.border=t.sldPtrOB.style.border=d.pointerBorderWidth+"px solid "+d.pointerBorderColor,t.sldPtrOB.style.position="absolute",t.sldPtrOB.style.left=-(2*d.pointerBorderWidth+d.pointerThickness)+"px",t.sldPtrOB.style.top="0",t.sldPtrMB.style.border=d.pointerThickness+"px solid "+d.pointerColor,t.sldPtrS.style.width=d.sliderSize+"px",t.sldPtrS.style.height=m+"px",t.btn.style.display=d.closable?"block":"none",t.btn.style.position="absolute",t.btn.style.left=d.padding+"px",t.btn.style.bottom=d.padding+"px",t.btn.style.padding="0 15px",t.btn.style.height=d.buttonHeight+"px",t.btn.style.border=d.insetWidth+"px solid",l(),t.btn.style.color=d.buttonColor,t.btn.style.font="12px sans-serif",t.btn.style.textAlign="center";try{t.btn.style.cursor="pointer"}catch(c){t.btn.style.cursor="hand"}t.btn.onmousedown=function(){d.hide()},t.btnT.style.lineHeight=d.buttonHeight+"px",t.btnT.innerHTML="",t.btnT.appendChild(document.createTextNode(d.closeText)),a(),f(),e.picker.owner&&e.picker.owner!==d&&e.unsetClass(e.picker.owner.targetElement,d.activeClass),e.picker.owner=d,e.isElementType(v,"body")?e.redrawPosition():e._drawPosition(d,0,0,"relative",!1),t.wrap.parentNode!=v&&v.appendChild(t.wrap),e.setClass(d.targetElement,d.activeClass)}function a(){switch(e.getPadYComponent(d)){case"s":var t=1;break;case"v":var t=2}var n=Math.round(d.hsv[0]/360*(d.width-1)),r=Math.round((1-d.hsv[t]/100)*(d.height-1)),i=2*d.pointerBorderWidth+d.pointerThickness+2*d.crossSize,o=-Math.floor(i/2);e.picker.cross.style.left=n+o+"px",e.picker.cross.style.top=r+o+"px";switch(e.getSliderComponent(d)){case"s":var u=s(d.hsv[0],100,d.hsv[2]),a=s(d.hsv[0],0,d.hsv[2]),f="rgb("+Math.round(u[0])+","+Math.round(u[1])+","+Math.round(u[2])+")",l="rgb("+Math.round(a[0])+","+Math.round(a[1])+","+Math.round(a[2])+")";e.picker.sldGrad.draw(d.sliderSize,d.height,f,l);break;case"v":var c=s(d.hsv[0],d.hsv[1],100),f="rgb("+Math.round(c[0])+","+Math.round(c[1])+","+Math.round(c[2])+")",l="#000";e.picker.sldGrad.draw(d.sliderSize,d.height,f,l)}}function f(){var t=e.getSliderComponent(d);if(t){switch(t){case"s":var n=1;break;case"v":var n=2}var r=Math.round((1-d.hsv[n]/100)*(d.height-1));e.picker.sldPtrOB.style.top=r-(2*d.pointerBorderWidth+d.pointerThickness)-Math.floor(m/2)+"px"}}function l(){return e.picker&&e.picker.owner===d}function c(){d.importColor()}this.value=null,this.valueElement=t,this.styleElement=t,this.required=!0,this.refine=!0,this.hash=!1,this.uppercase=!0,this.onFineChange=null,this.activeClass="jscolor-active",this.minS=0,this.maxS=100,this.minV=0,this.maxV=100,this.hsv=[0,0,100],this.rgb=[255,255,255],this.width=181,this.height=101,this.showOnClick=!0,this.mode="HSV",this.position="bottom",this.smartPosition=!0,this.sliderSize=16,this.crossSize=8,this.closable=!1,this.closeText="Close",this.buttonColor="#000000",this.buttonHeight=18,this.padding=12,this.backgroundColor="#FFFFFF",this.borderWidth=1,this.borderColor="#BBBBBB",this.borderRadius=8,this.insetWidth=1,this.insetColor="#BBBBBB",this.shadow=!0,this.shadowBlur=15,this.shadowColor="rgba(0,0,0,0.2)",this.pointerColor="#4C4C4C",this.pointerBorderColor="#FFFFFF",this.pointerBorderWidth=1,this.pointerThickness=2,this.zIndex=1e3,this.container=null;for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.hide=function(){l()&&o()},this.show=function(){u()},this.redraw=function(){l()&&u()},this.importColor=function(){this.valueElement?e.isElementType(this.valueElement,"input")?this.refine?!this.required&&/^\s*$/.test(this.valueElement.value)?(this.valueElement.value="",this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(e.leaveValue|e.leaveStyle)):this.fromString(this.valueElement.value)||this.exportColor():this.fromString(this.valueElement.value,e.leaveValue)||(this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(e.leaveValue|e.leaveStyle)):this.exportColor():this.exportColor()},this.exportColor=function(t){if(!(t&e.leaveValue)&&this.valueElement){var n=this.toString();this.uppercase&&(n=n.toUpperCase()),this.hash&&(n="#"+n),e.isElementType(this.valueElement,"input")?this.valueElement.value=n:this.valueElement.innerHTML=n}t&e.leaveStyle||this.styleElement&&(this.styleElement.style.backgroundImage="none",this.styleElement.style.backgroundColor="#"+this.toString(),this.styleElement.style.color=this.isLight()?"#000":"#FFF"),!(t&e.leavePad)&&l()&&a(),!(t&e.leaveSld)&&l()&&f()},this.fromHSV=function(e,t,n,r){if(e!==null){if(isNaN(e))return!1;e=Math.max(0,Math.min(360,e))}if(t!==null){if(isNaN(t))return!1;t=Math.max(0,Math.min(100,this.maxS,t),this.minS)}if(n!==null){if(isNaN(n))return!1;n=Math.max(0,Math.min(100,this.maxV,n),this.minV)}this.rgb=s(e===null?this.hsv[0]:this.hsv[0]=e,t===null?this.hsv[1]:this.hsv[1]=t,n===null?this.hsv[2]:this.hsv[2]=n),this.exportColor(r)},this.fromRGB=function(e,t,n,r){if(e!==null){if(isNaN(e))return!1;e=Math.max(0,Math.min(255,e))}if(t!==null){if(isNaN(t))return!1;t=Math.max(0,Math.min(255,t))}if(n!==null){if(isNaN(n))return!1;n=Math.max(0,Math.min(255,n))}var o=i(e===null?this.rgb[0]:e,t===null?this.rgb[1]:t,n===null?this.rgb[2]:n);o[0]!==null&&(this.hsv[0]=Math.max(0,Math.min(360,o[0]))),o[2]!==0&&(this.hsv[1]=o[1]===null?null:Math.max(0,this.minS,Math.min(100,this.maxS,o[1]))),this.hsv[2]=o[2]===null?null:Math.max(0,this.minV,Math.min(100,this.maxV,o[2]));var u=s(this.hsv[0],this.hsv[1],this.hsv[2]);this.rgb[0]=u[0],this.rgb[1]=u[1],this.rgb[2]=u[2],this.exportColor(r)},this.fromString=function(e,t){var n;if(n=e.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))return n[1].length===6?this.fromRGB(parseInt(n[1].substr(0,2),16),parseInt(n[1].substr(2,2),16),parseInt(n[1].substr(4,2),16),t):this.fromRGB(parseInt(n[1].charAt(0)+n[1].charAt(0),16),parseInt(n[1].charAt(1)+n[1].charAt(1),16),parseInt(n[1].charAt(2)+n[1].charAt(2),16),t),!0;if(n=e.match(/^\W*rgba?\(([^)]*)\)\W*$/i)){var r=n[1].split(","),i=/^\s*(\d*)(\.\d+)?\s*$/,s,o,u;if(r.length>=3&&(s=r[0].match(i))&&(o=r[1].match(i))&&(u=r[2].match(i))){var a=parseFloat((s[1]||"0")+(s[2]||"")),f=parseFloat((o[1]||"0")+(o[2]||"")),l=parseFloat((u[1]||"0")+(u[2]||""));return this.fromRGB(a,f,l,t),!0}}return!1},this.toString=function(){return(256|Math.round(this.rgb[0])).toString(16).substr(1)+(256|Math.round(this.rgb[1])).toString(16).substr(1)+(256|Math.round(this.rgb[2])).toString(16).substr(1)},this.toHEXString=function(){return"#"+this.toString().toUpperCase()},this.toRGBString=function(){return"rgb("+Math.round(this.rgb[0])+","+Math.round(this.rgb[1])+","+Math.round(this.rgb[2])+")"},this.isLight=function(){return.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]>127.5},this._processParentElementsInDOM=function(){if(this._linkedElementsProcessed)return;this._linkedElementsProcessed=!0;var t=this.targetElement;do{var n=e.getStyle(t);n&&n.position.toLowerCase()==="fixed"&&(this.fixed=!0),t!==this.targetElement&&(t._jscEventsAttached||(e.attachEvent(t,"scroll",e.onParentScroll),t._jscEventsAttached=!0))}while((t=t.parentNode)&&!e.isElementType(t,"body"))};if(typeof t=="string"){var h=t,p=document.getElementById(h);p?this.targetElement=p:e.warn("Could not find target element with ID '"+h+"'")}else t?this.targetElement=t:e.warn("Invalid target element: '"+t+"'");if(this.targetElement._jscLinkedInstance){e.warn("Cannot link jscolor twice to the same element. Skipping.");return}this.targetElement._jscLinkedInstance=this,this.valueElement=e.fetchElement(this.valueElement),this.styleElement=e.fetchElement(this.styleElement);var d=this,v=this.container?e.fetchElement(this.container):document.getElementsByTagName("body")[0],m=3;if(e.isElementType(this.targetElement,"button"))if(this.targetElement.onclick){var g=this.targetElement.onclick;this.targetElement.onclick=function(e){return g.call(this,e),!1}}else this.targetElement.onclick=function(){return!1};if(this.valueElement&&e.isElementType(this.valueElement,"input")){var y=function(){d.fromString(d.valueElement.value,e.leaveValue),e.dispatchFineChange(d)};e.attachEvent(this.valueElement,"keyup",y),e.attachEvent(this.valueElement,"input",y),e.attachEvent(this.valueElement,"blur",c),this.valueElement.setAttribute("autocomplete","off")}this.styleElement&&(this.styleElement._jscOrigStyle={backgroundImage:this.styleElement.style.backgroundImage,backgroundColor:this.styleElement.style.backgroundColor,color:this.styleElement.style.color}),this.value?this.fromString(this.value)||this.exportColor():this.importColor()}};return e.jscolor.lookupClass="jscolor",e.jscolor.installByClassName=function(t){var n=document.getElementsByTagName("input"),r=document.getElementsByTagName("button");e.tryInstallOnElements(n,t),e.tryInstallOnElements(r,t)},e.register(),e.jscolor}());
|
1 |
+
/**
|
2 |
+
* jscolor - JavaScript Color Picker
|
3 |
+
*
|
4 |
+
* @link http://jscolor.com
|
5 |
+
* @license For open source use: GPLv3
|
6 |
+
* For commercial use: JSColor Commercial License
|
7 |
+
* @author Jan Odvarko
|
8 |
+
*
|
9 |
+
* See usage examples at http://jscolor.com/examples/
|
10 |
Â
*/"use strict";window.jscolor||(window.jscolor=function(){var e={register:function(){e.attachDOMReadyEvent(e.init),e.attachEvent(document,"mousedown",e.onDocumentMouseDown),e.attachEvent(document,"touchstart",e.onDocumentTouchStart),e.attachEvent(window,"resize",e.onWindowResize)},init:function(){e.jscolor.lookupClass&&e.jscolor.installByClassName(e.jscolor.lookupClass)},tryInstallOnElements:function(t,n){var r=new RegExp("(^|\\s)("+n+")(\\s*(\\{[^}]*\\})|\\s|$)","i");for(var i=0;i<t.length;i+=1){if(t[i].type!==undefined&&t[i].type.toLowerCase()=="color"&&e.isColorAttrSupported)continue;var s;if(!t[i].jscolor&&t[i].className&&(s=t[i].className.match(r))){var o=t[i],u=null,a=e.getDataAttr(o,"jscolor");a!==null?u=a:s[4]&&(u=s[4]);var f={};if(u)try{f=(new Function("return ("+u+")"))()}catch(l){e.warn("Error parsing jscolor options: "+l+":\n"+u)}o.jscolor=new e.jscolor(o,f)}}},isColorAttrSupported:function(){var e=document.createElement("input");if(e.setAttribute){e.setAttribute("type","color");if(e.type.toLowerCase()=="color")return!0}return!1}(),isCanvasSupported:function(){var e=document.createElement("canvas");return!!e.getContext&&!!e.getContext("2d")}(),fetchElement:function(e){return typeof e=="string"?document.getElementById(e):e},isElementType:function(e,t){return e.nodeName.toLowerCase()===t.toLowerCase()},getDataAttr:function(e,t){var n="data-"+t,r=e.getAttribute(n);return r!==null?r:null},attachEvent:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},detachEvent:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},_attachedGroupEvents:{},attachGroupEvent:function(t,n,r,i){e._attachedGroupEvents.hasOwnProperty(t)||(e._attachedGroupEvents[t]=[]),e._attachedGroupEvents[t].push([n,r,i]),e.attachEvent(n,r,i)},detachGroupEvents:function(t){if(e._attachedGroupEvents.hasOwnProperty(t)){for(var n=0;n<e._attachedGroupEvents[t].length;n+=1){var r=e._attachedGroupEvents[t][n];e.detachEvent(r[0],r[1],r[2])}delete e._attachedGroupEvents[t]}},attachDOMReadyEvent:function(e){var t=!1,n=function(){t||(t=!0,e())};if(document.readyState==="complete"){setTimeout(n,1);return}if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){document.readyState==="complete"&&(document.detachEvent("onreadystatechange",arguments.callee),n())}),window.attachEvent("onload",n);if(document.documentElement.doScroll&&window==window.top){var r=function(){if(!document.body)return;try{document.documentElement.doScroll("left"),n()}catch(e){setTimeout(r,1)}};r()}}},warn:function(e){window.console&&window.console.warn&&window.console.warn(e)},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(t){t.setCapture&&(e._capturedTarget=t,e._capturedTarget.setCapture())},releaseTarget:function(){e._capturedTarget&&(e._capturedTarget.releaseCapture(),e._capturedTarget=null)},fireEvent:function(e,t){if(!e)return;if(document.createEvent){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}else if(document.createEventObject){var n=document.createEventObject();e.fireEvent("on"+t,n)}else e["on"+t]&&e["on"+t]()},classNameToList:function(e){return e.replace(/^\s+|\s+$/g,"").split(/\s+/)},hasClass:function(e,t){return t?-1!=(" "+e.className.replace(/\s+/g," ")+" ").indexOf(" "+t+" "):!1},setClass:function(t,n){var r=e.classNameToList(n);for(var i=0;i<r.length;i+=1)e.hasClass(t,r[i])||(t.className+=(t.className?" ":"")+r[i])},unsetClass:function(t,n){var r=e.classNameToList(n);for(var i=0;i<r.length;i+=1){var s=new RegExp("^\\s*"+r[i]+"\\s*|"+"\\s*"+r[i]+"\\s*$|"+"\\s+"+r[i]+"(\\s+)","g");t.className=t.className.replace(s,"$1")}},getStyle:function(e){return window.getComputedStyle?window.getComputedStyle(e):e.currentStyle},setStyle:function(){var e=document.createElement("div"),t=function(t){for(var n=0;n<t.length;n+=1)if(t[n]in e.style)return t[n]},n={borderRadius:t(["borderRadius","MozBorderRadius","webkitBorderRadius"]),boxShadow:t(["boxShadow","MozBoxShadow","webkitBoxShadow"])};return function(e,t,r){switch(t.toLowerCase()){case"opacity":var i=Math.round(parseFloat(r)*100);e.style.opacity=r,e.style.filter="alpha(opacity="+i+")";break;default:e.style[n[t]]=r}}}(),setBorderRadius:function(t,n){e.setStyle(t,"borderRadius",n||"0")},setBoxShadow:function(t,n){e.setStyle(t,"boxShadow",n||"none")},getElementPos:function(t,n){var r=0,i=0,s=t.getBoundingClientRect();r=s.left,i=s.top;if(!n){var o=e.getViewPos();r+=o[0],i+=o[1]}return[r,i]},getElementSize:function(e){return[e.offsetWidth,e.offsetHeight]},getAbsPointerPos:function(e){e||(e=window.event);var t=0,n=0;return typeof e.changedTouches!="undefined"&&e.changedTouches.length?(t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY):typeof e.clientX=="number"&&(t=e.clientX,n=e.clientY),{x:t,y:n}},getRelPointerPos:function(e){e||(e=window.event);var t=e.target||e.srcElement,n=t.getBoundingClientRect(),r=0,i=0,s=0,o=0;return typeof e.changedTouches!="undefined"&&e.changedTouches.length?(s=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):typeof e.clientX=="number"&&(s=e.clientX,o=e.clientY),r=s-n.left,i=o-n.top,{x:r,y:i}},getViewPos:function(){var e=document.documentElement;return[(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0),(window.pageYOffset||e.scrollTop)-(e.clientTop||0)]},getViewSize:function(){var e=document.documentElement;return[window.innerWidth||e.clientWidth,window.innerHeight||e.clientHeight]},redrawPosition:function(){if(e.picker&&e.picker.owner){var t=e.picker.owner,n,r;t.fixed?(n=e.getElementPos(t.targetElement,!0),r=[0,0]):(n=e.getElementPos(t.targetElement),r=e.getViewPos());var i=e.getElementSize(t.targetElement),s=e.getViewSize(),o=e.getPickerOuterDims(t),u,a,f;switch(t.position.toLowerCase()){case"left":u=1,a=0,f=-1;break;case"right":u=1,a=0,f=1;break;case"top":u=0,a=1,f=-1;break;default:u=0,a=1,f=1}var l=(i[a]+o[a])/2;if(!t.smartPosition)var c=[n[u],n[a]+i[a]-l+l*f];else var c=[-r[u]+n[u]+o[u]>s[u]?-r[u]+n[u]+i[u]/2>s[u]/2&&n[u]+i[u]-o[u]>=0?n[u]+i[u]-o[u]:n[u]:n[u],-r[a]+n[a]+i[a]+o[a]-l+l*f>s[a]?-r[a]+n[a]+i[a]/2>s[a]/2&&n[a]+i[a]-l-l*f>=0?n[a]+i[a]-l-l*f:n[a]+i[a]-l+l*f:n[a]+i[a]-l+l*f>=0?n[a]+i[a]-l+l*f:n[a]+i[a]-l-l*f];var h=c[u],p=c[a],d=t.fixed?"fixed":"absolute",v=(c[0]+o[0]>n[0]||c[0]<n[0]+i[0])&&c[1]+o[1]<n[1]+i[1];e._drawPosition(t,h,p,d,v)}},_drawPosition:function(t,n,r,i,s){var o=s?0:t.shadowBlur;e.picker.wrap.style.position=i,e.picker.wrap.style.left=n+"px",e.picker.wrap.style.top=r+"px",e.setBoxShadow(e.picker.boxS,t.shadow?new e.BoxShadow(0,o,t.shadowBlur,0,t.shadowColor):null)},getPickerDims:function(t){var n=!!e.getSliderComponent(t),r=[2*t.insetWidth+2*t.padding+t.width+(n?2*t.insetWidth+e.getPadToSliderPadding(t)+t.sliderSize:0),2*t.insetWidth+2*t.padding+t.height+(t.closable?2*t.insetWidth+t.padding+t.buttonHeight:0)];return r},getPickerOuterDims:function(t){var n=e.getPickerDims(t);return[n[0]+2*t.borderWidth,n[1]+2*t.borderWidth]},getPadToSliderPadding:function(e){return Math.max(e.padding,1.5*(2*e.pointerBorderWidth+e.pointerThickness))},getPadYComponent:function(e){switch(e.mode.charAt(1).toLowerCase()){case"v":return"v"}return"s"},getSliderComponent:function(e){if(e.mode.length>2)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},onDocumentMouseDown:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,"mouse"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onDocumentTouchStart:function(t){t||(t=window.event);var n=t.target||t.srcElement;n._jscLinkedInstance?n._jscLinkedInstance.showOnClick&&n._jscLinkedInstance.show():n._jscControlName?e.onControlPointerStart(t,n,n._jscControlName,"touch"):e.picker&&e.picker.owner&&e.picker.owner.hide()},onWindowResize:function(t){e.redrawPosition()},onParentScroll:function(t){e.picker&&e.picker.owner&&e.picker.owner.hide()},_pointerMoveEvent:{mouse:"mousemove",touch:"touchmove"},_pointerEndEvent:{mouse:"mouseup",touch:"touchend"},_pointerOrigin:null,_capturedTarget:null,onControlPointerStart:function(t,n,r,i){var s=n._jscInstance;e.preventDefault(t),e.captureTarget(n);var o=function(s,o){e.attachGroupEvent("drag",s,e._pointerMoveEvent[i],e.onDocumentPointerMove(t,n,r,i,o)),e.attachGroupEvent("drag",s,e._pointerEndEvent[i],e.onDocumentPointerEnd(t,n,r,i))};o(document,[0,0]);if(window.parent&&window.frameElement){var u=window.frameElement.getBoundingClientRect(),a=[-u.left,-u.top];o(window.parent.window.document,a)}var f=e.getAbsPointerPos(t),l=e.getRelPointerPos(t);e._pointerOrigin={x:f.x-l.x,y:f.y-l.y};switch(r){case"pad":switch(e.getSliderComponent(s)){case"s":s.hsv[1]===0&&s.fromHSV(null,100,null);break;case"v":s.hsv[2]===0&&s.fromHSV(null,null,100)}e.setPad(s,t,0,0);break;case"sld":e.setSld(s,t,0)}e.dispatchFineChange(s)},onDocumentPointerMove:function(t,n,r,i,s){return function(t){var i=n._jscInstance;switch(r){case"pad":t||(t=window.event),e.setPad(i,t,s[0],s[1]),e.dispatchFineChange(i);break;case"sld":t||(t=window.event),e.setSld(i,t,s[1]),e.dispatchFineChange(i)}}},onDocumentPointerEnd:function(t,n,r,i){return function(t){var r=n._jscInstance;e.detachGroupEvents("drag"),e.releaseTarget(),e.dispatchChange(r)}},dispatchChange:function(t){t.valueElement&&e.isElementType(t.valueElement,"input")&&e.fireEvent(t.valueElement,"change")},dispatchFineChange:function(e){if(e.onFineChange){var t;typeof e.onFineChange=="string"?t=new Function(e.onFineChange):t=e.onFineChange,t.call(e)}},setPad:function(t,n,r,i){var s=e.getAbsPointerPos(n),o=r+s.x-e._pointerOrigin.x-t.padding-t.insetWidth,u=i+s.y-e._pointerOrigin.y-t.padding-t.insetWidth,a=o*(360/(t.width-1)),f=100-u*(100/(t.height-1));switch(e.getPadYComponent(t)){case"s":t.fromHSV(a,f,null,e.leaveSld);break;case"v":t.fromHSV(a,null,f,e.leaveSld)}},setSld:function(t,n,r){var i=e.getAbsPointerPos(n),s=r+i.y-e._pointerOrigin.y-t.padding-t.insetWidth,o=100-s*(100/(t.height-1));switch(e.getSliderComponent(t)){case"s":t.fromHSV(null,o,null,e.leavePad);break;case"v":t.fromHSV(null,null,o,e.leavePad)}},_vmlNS:"jsc_vml_",_vmlCSS:"jsc_vml_css_",_vmlReady:!1,initVML:function(){if(!e._vmlReady){var t=document;t.namespaces[e._vmlNS]||t.namespaces.add(e._vmlNS,"urn:schemas-microsoft-com:vml");if(!t.styleSheets[e._vmlCSS]){var n=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","rect","roundrect","oval","arc","image"],r=t.createStyleSheet();r.owningElement.id=e._vmlCSS;for(var i=0;i<n.length;i+=1)r.addRule(e._vmlNS+"\\:"+n[i],"behavior:url(#default#VML);")}e._vmlReady=!0}},createPalette:function(){var t={elm:null,draw:null};if(e.isCanvasSupported){var n=document.createElement("canvas"),r=n.getContext("2d"),i=function(e,t,i){n.width=e,n.height=t,r.clearRect(0,0,n.width,n.height);var s=r.createLinearGradient(0,0,n.width,0);s.addColorStop(0,"#F00"),s.addColorStop(1/6,"#FF0"),s.addColorStop(2/6,"#0F0"),s.addColorStop(.5,"#0FF"),s.addColorStop(4/6,"#00F"),s.addColorStop(5/6,"#F0F"),s.addColorStop(1,"#F00"),r.fillStyle=s,r.fillRect(0,0,n.width,n.height);var o=r.createLinearGradient(0,0,0,n.height);switch(i.toLowerCase()){case"s":o.addColorStop(0,"rgba(255,255,255,0)"),o.addColorStop(1,"rgba(255,255,255,1)");break;case"v":o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)")}r.fillStyle=o,r.fillRect(0,0,n.width,n.height)};t.elm=n,t.draw=i}else{e.initVML();var s=document.createElement("div");s.style.position="relative",s.style.overflow="hidden";var o=document.createElement(e._vmlNS+":fill");o.type="gradient",o.method="linear",o.angle="90",o.colors="16.67% #F0F, 33.33% #00F, 50% #0FF, 66.67% #0F0, 83.33% #FF0";var u=document.createElement(e._vmlNS+":rect");u.style.position="absolute",u.style.left="-1px",u.style.top="-1px",u.stroked=!1,u.appendChild(o),s.appendChild(u);var a=document.createElement(e._vmlNS+":fill");a.type="gradient",a.method="linear",a.angle="180",a.opacity="0";var f=document.createElement(e._vmlNS+":rect");f.style.position="absolute",f.style.left="-1px",f.style.top="-1px",f.stroked=!1,f.appendChild(a),s.appendChild(f);var i=function(e,t,n){s.style.width=e+"px",s.style.height=t+"px",u.style.width=f.style.width=e+1+"px",u.style.height=f.style.height=t+1+"px",o.color="#F00",o.color2="#F00";switch(n.toLowerCase()){case"s":a.color=a.color2="#FFF";break;case"v":a.color=a.color2="#000"}};t.elm=s,t.draw=i}return t},createSliderGradient:function(){var t={elm:null,draw:null};if(e.isCanvasSupported){var n=document.createElement("canvas"),r=n.getContext("2d"),i=function(e,t,i,s){n.width=e,n.height=t,r.clearRect(0,0,n.width,n.height);var o=r.createLinearGradient(0,0,0,n.height);o.addColorStop(0,i),o.addColorStop(1,s),r.fillStyle=o,r.fillRect(0,0,n.width,n.height)};t.elm=n,t.draw=i}else{e.initVML();var s=document.createElement("div");s.style.position="relative",s.style.overflow="hidden";var o=document.createElement(e._vmlNS+":fill");o.type="gradient",o.method="linear",o.angle="180";var u=document.createElement(e._vmlNS+":rect");u.style.position="absolute",u.style.left="-1px",u.style.top="-1px",u.stroked=!1,u.appendChild(o),s.appendChild(u);var i=function(e,t,n,r){s.style.width=e+"px",s.style.height=t+"px",u.style.width=e+1+"px",u.style.height=t+1+"px",o.color=n,o.color2=r};t.elm=s,t.draw=i}return t},leaveValue:1,leaveStyle:2,leavePad:4,leaveSld:8,BoxShadow:function(){var e=function(e,t,n,r,i,s){this.hShadow=e,this.vShadow=t,this.blur=n,this.spread=r,this.color=i,this.inset=!!s};return e.prototype.toString=function(){var e=[Math.round(this.hShadow)+"px",Math.round(this.vShadow)+"px",Math.round(this.blur)+"px",Math.round(this.spread)+"px",this.color];return this.inset&&e.push("inset"),e.join(" ")},e}(),jscolor:function(t,n){function i(e,t,n){e/=255,t/=255,n/=255;var r=Math.min(Math.min(e,t),n),i=Math.max(Math.max(e,t),n),s=i-r;if(s===0)return[null,0,100*i];var o=e===r?3+(n-t)/s:t===r?5+(e-n)/s:1+(t-e)/s;return[60*(o===6?0:o),100*(s/i),100*i]}function s(e,t,n){var r=255*(n/100);if(e===null)return[r,r,r];e/=60,t/=100;var i=Math.floor(e),s=i%2?e-i:1-(e-i),o=r*(1-t),u=r*(1-t*s);switch(i){case 6:case 0:return[r,u,o];case 1:return[u,r,o];case 2:return[o,r,u];case 3:return[o,u,r];case 4:return[u,o,r];case 5:return[r,o,u]}}function o(){e.unsetClass(d.targetElement,d.activeClass),e.picker.wrap.parentNode.removeChild(e.picker.wrap),delete e.picker.owner}function u(){function l(){var e=d.insetColor.split(/\s+/),n=e.length<2?e[0]:e[1]+" "+e[0]+" "+e[0]+" "+e[1];t.btn.style.borderColor=n}d._processParentElementsInDOM(),e.picker||(e.picker={owner:null,wrap:document.createElement("div"),box:document.createElement("div"),boxS:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),padPal:e.createPalette(),cross:document.createElement("div"),crossBY:document.createElement("div"),crossBX:document.createElement("div"),crossLY:document.createElement("div"),crossLX:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),sldGrad:e.createSliderGradient(),sldPtrS:document.createElement("div"),sldPtrIB:document.createElement("div"),sldPtrMB:document.createElement("div"),sldPtrOB:document.createElement("div"),btn:document.createElement("div"),btnT:document.createElement("span")},e.picker.pad.appendChild(e.picker.padPal.elm),e.picker.padB.appendChild(e.picker.pad),e.picker.cross.appendChild(e.picker.crossBY),e.picker.cross.appendChild(e.picker.crossBX),e.picker.cross.appendChild(e.picker.crossLY),e.picker.cross.appendChild(e.picker.crossLX),e.picker.padB.appendChild(e.picker.cross),e.picker.box.appendChild(e.picker.padB),e.picker.box.appendChild(e.picker.padM),e.picker.sld.appendChild(e.picker.sldGrad.elm),e.picker.sldB.appendChild(e.picker.sld),e.picker.sldB.appendChild(e.picker.sldPtrOB),e.picker.sldPtrOB.appendChild(e.picker.sldPtrMB),e.picker.sldPtrMB.appendChild(e.picker.sldPtrIB),e.picker.sldPtrIB.appendChild(e.picker.sldPtrS),e.picker.box.appendChild(e.picker.sldB),e.picker.box.appendChild(e.picker.sldM),e.picker.btn.appendChild(e.picker.btnT),e.picker.box.appendChild(e.picker.btn),e.picker.boxB.appendChild(e.picker.box),e.picker.wrap.appendChild(e.picker.boxS),e.picker.wrap.appendChild(e.picker.boxB));var t=e.picker,n=!!e.getSliderComponent(d),r=e.getPickerDims(d),i=2*d.pointerBorderWidth+d.pointerThickness+2*d.crossSize,s=e.getPadToSliderPadding(d),o=Math.min(d.borderRadius,Math.round(d.padding*Math.PI)),u="crosshair";t.wrap.style.clear="both",t.wrap.style.width=r[0]+2*d.borderWidth+"px",t.wrap.style.height=r[1]+2*d.borderWidth+"px",t.wrap.style.zIndex=d.zIndex,t.box.style.width=r[0]+"px",t.box.style.height=r[1]+"px",t.boxS.style.position="absolute",t.boxS.style.left="0",t.boxS.style.top="0",t.boxS.style.width="100%",t.boxS.style.height="100%",e.setBorderRadius(t.boxS,o+"px"),t.boxB.style.position="relative",t.boxB.style.border=d.borderWidth+"px solid",t.boxB.style.borderColor=d.borderColor,t.boxB.style.background=d.backgroundColor,e.setBorderRadius(t.boxB,o+"px"),t.padM.style.background=t.sldM.style.background="#FFF",e.setStyle(t.padM,"opacity","0"),e.setStyle(t.sldM,"opacity","0"),t.pad.style.position="relative",t.pad.style.width=d.width+"px",t.pad.style.height=d.height+"px",t.padPal.draw(d.width,d.height,e.getPadYComponent(d)),t.padB.style.position="absolute",t.padB.style.left=d.padding+"px",t.padB.style.top=d.padding+"px",t.padB.style.border=d.insetWidth+"px solid",t.padB.style.borderColor=d.insetColor,t.padM._jscInstance=d,t.padM._jscControlName="pad",t.padM.style.position="absolute",t.padM.style.left="0",t.padM.style.top="0",t.padM.style.width=d.padding+2*d.insetWidth+d.width+s/2+"px",t.padM.style.height=r[1]+"px",t.padM.style.cursor=u,t.cross.style.position="absolute",t.cross.style.left=t.cross.style.top="0",t.cross.style.width=t.cross.style.height=i+"px",t.crossBY.style.position=t.crossBX.style.position="absolute",t.crossBY.style.background=t.crossBX.style.background=d.pointerBorderColor,t.crossBY.style.width=t.crossBX.style.height=2*d.pointerBorderWidth+d.pointerThickness+"px",t.crossBY.style.height=t.crossBX.style.width=i+"px",t.crossBY.style.left=t.crossBX.style.top=Math.floor(i/2)-Math.floor(d.pointerThickness/2)-d.pointerBorderWidth+"px",t.crossBY.style.top=t.crossBX.style.left="0",t.crossLY.style.position=t.crossLX.style.position="absolute",t.crossLY.style.background=t.crossLX.style.background=d.pointerColor,t.crossLY.style.height=t.crossLX.style.width=i-2*d.pointerBorderWidth+"px",t.crossLY.style.width=t.crossLX.style.height=d.pointerThickness+"px",t.crossLY.style.left=t.crossLX.style.top=Math.floor(i/2)-Math.floor(d.pointerThickness/2)+"px",t.crossLY.style.top=t.crossLX.style.left=d.pointerBorderWidth+"px",t.sld.style.overflow="hidden",t.sld.style.width=d.sliderSize+"px",t.sld.style.height=d.height+"px",t.sldGrad.draw(d.sliderSize,d.height,"#000","#000"),t.sldB.style.display=n?"block":"none",t.sldB.style.position="absolute",t.sldB.style.right=d.padding+"px",t.sldB.style.top=d.padding+"px",t.sldB.style.border=d.insetWidth+"px solid",t.sldB.style.borderColor=d.insetColor,t.sldM._jscInstance=d,t.sldM._jscControlName="sld",t.sldM.style.display=n?"block":"none",t.sldM.style.position="absolute",t.sldM.style.right="0",t.sldM.style.top="0",t.sldM.style.width=d.sliderSize+s/2+d.padding+2*d.insetWidth+"px",t.sldM.style.height=r[1]+"px",t.sldM.style.cursor="default",t.sldPtrIB.style.border=t.sldPtrOB.style.border=d.pointerBorderWidth+"px solid "+d.pointerBorderColor,t.sldPtrOB.style.position="absolute",t.sldPtrOB.style.left=-(2*d.pointerBorderWidth+d.pointerThickness)+"px",t.sldPtrOB.style.top="0",t.sldPtrMB.style.border=d.pointerThickness+"px solid "+d.pointerColor,t.sldPtrS.style.width=d.sliderSize+"px",t.sldPtrS.style.height=m+"px",t.btn.style.display=d.closable?"block":"none",t.btn.style.position="absolute",t.btn.style.left=d.padding+"px",t.btn.style.bottom=d.padding+"px",t.btn.style.padding="0 15px",t.btn.style.height=d.buttonHeight+"px",t.btn.style.border=d.insetWidth+"px solid",l(),t.btn.style.color=d.buttonColor,t.btn.style.font="12px sans-serif",t.btn.style.textAlign="center";try{t.btn.style.cursor="pointer"}catch(c){t.btn.style.cursor="hand"}t.btn.onmousedown=function(){d.hide()},t.btnT.style.lineHeight=d.buttonHeight+"px",t.btnT.innerHTML="",t.btnT.appendChild(document.createTextNode(d.closeText)),a(),f(),e.picker.owner&&e.picker.owner!==d&&e.unsetClass(e.picker.owner.targetElement,d.activeClass),e.picker.owner=d,e.isElementType(v,"body")?e.redrawPosition():e._drawPosition(d,0,0,"relative",!1),t.wrap.parentNode!=v&&v.appendChild(t.wrap),e.setClass(d.targetElement,d.activeClass)}function a(){switch(e.getPadYComponent(d)){case"s":var t=1;break;case"v":var t=2}var n=Math.round(d.hsv[0]/360*(d.width-1)),r=Math.round((1-d.hsv[t]/100)*(d.height-1)),i=2*d.pointerBorderWidth+d.pointerThickness+2*d.crossSize,o=-Math.floor(i/2);e.picker.cross.style.left=n+o+"px",e.picker.cross.style.top=r+o+"px";switch(e.getSliderComponent(d)){case"s":var u=s(d.hsv[0],100,d.hsv[2]),a=s(d.hsv[0],0,d.hsv[2]),f="rgb("+Math.round(u[0])+","+Math.round(u[1])+","+Math.round(u[2])+")",l="rgb("+Math.round(a[0])+","+Math.round(a[1])+","+Math.round(a[2])+")";e.picker.sldGrad.draw(d.sliderSize,d.height,f,l);break;case"v":var c=s(d.hsv[0],d.hsv[1],100),f="rgb("+Math.round(c[0])+","+Math.round(c[1])+","+Math.round(c[2])+")",l="#000";e.picker.sldGrad.draw(d.sliderSize,d.height,f,l)}}function f(){var t=e.getSliderComponent(d);if(t){switch(t){case"s":var n=1;break;case"v":var n=2}var r=Math.round((1-d.hsv[n]/100)*(d.height-1));e.picker.sldPtrOB.style.top=r-(2*d.pointerBorderWidth+d.pointerThickness)-Math.floor(m/2)+"px"}}function l(){return e.picker&&e.picker.owner===d}function c(){d.importColor()}this.value=null,this.valueElement=t,this.styleElement=t,this.required=!0,this.refine=!0,this.hash=!1,this.uppercase=!0,this.onFineChange=null,this.activeClass="jscolor-active",this.minS=0,this.maxS=100,this.minV=0,this.maxV=100,this.hsv=[0,0,100],this.rgb=[255,255,255],this.width=181,this.height=101,this.showOnClick=!0,this.mode="HSV",this.position="bottom",this.smartPosition=!0,this.sliderSize=16,this.crossSize=8,this.closable=!1,this.closeText="Close",this.buttonColor="#000000",this.buttonHeight=18,this.padding=12,this.backgroundColor="#FFFFFF",this.borderWidth=1,this.borderColor="#BBBBBB",this.borderRadius=8,this.insetWidth=1,this.insetColor="#BBBBBB",this.shadow=!0,this.shadowBlur=15,this.shadowColor="rgba(0,0,0,0.2)",this.pointerColor="#4C4C4C",this.pointerBorderColor="#FFFFFF",this.pointerBorderWidth=1,this.pointerThickness=2,this.zIndex=1e3,this.container=null;for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.hide=function(){l()&&o()},this.show=function(){u()},this.redraw=function(){l()&&u()},this.importColor=function(){this.valueElement?e.isElementType(this.valueElement,"input")?this.refine?!this.required&&/^\s*$/.test(this.valueElement.value)?(this.valueElement.value="",this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(e.leaveValue|e.leaveStyle)):this.fromString(this.valueElement.value)||this.exportColor():this.fromString(this.valueElement.value,e.leaveValue)||(this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(e.leaveValue|e.leaveStyle)):this.exportColor():this.exportColor()},this.exportColor=function(t){if(!(t&e.leaveValue)&&this.valueElement){var n=this.toString();this.uppercase&&(n=n.toUpperCase()),this.hash&&(n="#"+n),e.isElementType(this.valueElement,"input")?this.valueElement.value=n:this.valueElement.innerHTML=n}t&e.leaveStyle||this.styleElement&&(this.styleElement.style.backgroundImage="none",this.styleElement.style.backgroundColor="#"+this.toString(),this.styleElement.style.color=this.isLight()?"#000":"#FFF"),!(t&e.leavePad)&&l()&&a(),!(t&e.leaveSld)&&l()&&f()},this.fromHSV=function(e,t,n,r){if(e!==null){if(isNaN(e))return!1;e=Math.max(0,Math.min(360,e))}if(t!==null){if(isNaN(t))return!1;t=Math.max(0,Math.min(100,this.maxS,t),this.minS)}if(n!==null){if(isNaN(n))return!1;n=Math.max(0,Math.min(100,this.maxV,n),this.minV)}this.rgb=s(e===null?this.hsv[0]:this.hsv[0]=e,t===null?this.hsv[1]:this.hsv[1]=t,n===null?this.hsv[2]:this.hsv[2]=n),this.exportColor(r)},this.fromRGB=function(e,t,n,r){if(e!==null){if(isNaN(e))return!1;e=Math.max(0,Math.min(255,e))}if(t!==null){if(isNaN(t))return!1;t=Math.max(0,Math.min(255,t))}if(n!==null){if(isNaN(n))return!1;n=Math.max(0,Math.min(255,n))}var o=i(e===null?this.rgb[0]:e,t===null?this.rgb[1]:t,n===null?this.rgb[2]:n);o[0]!==null&&(this.hsv[0]=Math.max(0,Math.min(360,o[0]))),o[2]!==0&&(this.hsv[1]=o[1]===null?null:Math.max(0,this.minS,Math.min(100,this.maxS,o[1]))),this.hsv[2]=o[2]===null?null:Math.max(0,this.minV,Math.min(100,this.maxV,o[2]));var u=s(this.hsv[0],this.hsv[1],this.hsv[2]);this.rgb[0]=u[0],this.rgb[1]=u[1],this.rgb[2]=u[2],this.exportColor(r)},this.fromString=function(e,t){var n;if(n=e.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))return n[1].length===6?this.fromRGB(parseInt(n[1].substr(0,2),16),parseInt(n[1].substr(2,2),16),parseInt(n[1].substr(4,2),16),t):this.fromRGB(parseInt(n[1].charAt(0)+n[1].charAt(0),16),parseInt(n[1].charAt(1)+n[1].charAt(1),16),parseInt(n[1].charAt(2)+n[1].charAt(2),16),t),!0;if(n=e.match(/^\W*rgba?\(([^)]*)\)\W*$/i)){var r=n[1].split(","),i=/^\s*(\d*)(\.\d+)?\s*$/,s,o,u;if(r.length>=3&&(s=r[0].match(i))&&(o=r[1].match(i))&&(u=r[2].match(i))){var a=parseFloat((s[1]||"0")+(s[2]||"")),f=parseFloat((o[1]||"0")+(o[2]||"")),l=parseFloat((u[1]||"0")+(u[2]||""));return this.fromRGB(a,f,l,t),!0}}return!1},this.toString=function(){return(256|Math.round(this.rgb[0])).toString(16).substr(1)+(256|Math.round(this.rgb[1])).toString(16).substr(1)+(256|Math.round(this.rgb[2])).toString(16).substr(1)},this.toHEXString=function(){return"#"+this.toString().toUpperCase()},this.toRGBString=function(){return"rgb("+Math.round(this.rgb[0])+","+Math.round(this.rgb[1])+","+Math.round(this.rgb[2])+")"},this.isLight=function(){return.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]>127.5},this._processParentElementsInDOM=function(){if(this._linkedElementsProcessed)return;this._linkedElementsProcessed=!0;var t=this.targetElement;do{var n=e.getStyle(t);n&&n.position.toLowerCase()==="fixed"&&(this.fixed=!0),t!==this.targetElement&&(t._jscEventsAttached||(e.attachEvent(t,"scroll",e.onParentScroll),t._jscEventsAttached=!0))}while((t=t.parentNode)&&!e.isElementType(t,"body"))};if(typeof t=="string"){var h=t,p=document.getElementById(h);p?this.targetElement=p:e.warn("Could not find target element with ID '"+h+"'")}else t?this.targetElement=t:e.warn("Invalid target element: '"+t+"'");if(this.targetElement._jscLinkedInstance){e.warn("Cannot link jscolor twice to the same element. Skipping.");return}this.targetElement._jscLinkedInstance=this,this.valueElement=e.fetchElement(this.valueElement),this.styleElement=e.fetchElement(this.styleElement);var d=this,v=this.container?e.fetchElement(this.container):document.getElementsByTagName("body")[0],m=3;if(e.isElementType(this.targetElement,"button"))if(this.targetElement.onclick){var g=this.targetElement.onclick;this.targetElement.onclick=function(e){return g.call(this,e),!1}}else this.targetElement.onclick=function(){return!1};if(this.valueElement&&e.isElementType(this.valueElement,"input")){var y=function(){d.fromString(d.valueElement.value,e.leaveValue),e.dispatchFineChange(d)};e.attachEvent(this.valueElement,"keyup",y),e.attachEvent(this.valueElement,"input",y),e.attachEvent(this.valueElement,"blur",c),this.valueElement.setAttribute("autocomplete","off")}this.styleElement&&(this.styleElement._jscOrigStyle={backgroundImage:this.styleElement.style.backgroundImage,backgroundColor:this.styleElement.style.backgroundColor,color:this.styleElement.style.color}),this.value?this.fromString(this.value)||this.exportColor():this.importColor()}};return e.jscolor.lookupClass="jscolor",e.jscolor.installByClassName=function(t){var n=document.getElementsByTagName("input"),r=document.getElementsByTagName("button");e.tryInstallOnElements(n,t),e.tryInstallOnElements(r,t)},e.register(),e.jscolor}());
|
assets/js/quads-admin.js
CHANGED
@@ -1,1800 +1,1800 @@
|
|
1 |
-
var strict;
|
2 |
-
|
3 |
-
|
4 |
-
jQuery(document).ready(function ($) {
|
5 |
-
|
6 |
-
// show / hide helper description
|
7 |
-
$('.quads-tooltip').click(function (e) {
|
8 |
-
e.preventDefault();
|
9 |
-
var icon = $(this),
|
10 |
-
bubble = $(this).next();
|
11 |
-
|
12 |
-
// Close any that are already open
|
13 |
-
$('.quads-tooltip-message').not(bubble).hide();
|
14 |
-
|
15 |
-
var position = icon.position();
|
16 |
-
if (bubble.hasClass('bottom')) {
|
17 |
-
bubble.css({
|
18 |
-
'left': (position.left - bubble.width() / 2) + 'px',
|
19 |
-
'top': (position.top + icon.height() + 9) + 'px'
|
20 |
-
});
|
21 |
-
} else {
|
22 |
-
bubble.css({
|
23 |
-
'left': (position.left + icon.width() + 9) + 'px',
|
24 |
-
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
25 |
-
});
|
26 |
-
}
|
27 |
-
|
28 |
-
bubble.toggle();
|
29 |
-
e.stopPropagation();
|
30 |
-
});
|
31 |
-
|
32 |
-
$('body').click(function () {
|
33 |
-
$('.quads-tooltip-message').hide();
|
34 |
-
});
|
35 |
-
|
36 |
-
$('.quads-tooltip-message').click(function (e) {
|
37 |
-
e.stopPropagation();
|
38 |
-
});
|
39 |
-
|
40 |
-
|
41 |
-
// vi login process
|
42 |
-
$("#quads_vi_login_submit").click(function(e){
|
43 |
-
e.preventDefault();
|
44 |
-
username = $("#quads-vi-email").val();
|
45 |
-
password = $("#quads-vi-password").val();
|
46 |
-
|
47 |
-
var data = '{"email":"' + username + '", "password":"' + password + '"}';
|
48 |
-
|
49 |
-
$.ajax({
|
50 |
-
type: "POST",
|
51 |
-
//url: "https://dashboard-api-test.vidint.net/v1/api/authenticate",
|
52 |
-
url: quads.vi_login_url,
|
53 |
-
contentType: 'application/json',
|
54 |
-
data: data,
|
55 |
-
statusCode: {
|
56 |
-
502: function () {
|
57 |
-
$("#quads_add_err").html("502 Bad Gateway. Contact support[at]vi.ai");
|
58 |
-
console.log('502 Bad Gateway.');
|
59 |
-
return false;
|
60 |
-
},
|
61 |
-
500: function () {
|
62 |
-
$("#quads_add_err").html("500 Bad Gateway. Contact support[at]vi.ai");
|
63 |
-
console.log('500 Bad Gateway.');
|
64 |
-
return false;
|
65 |
-
}
|
66 |
-
},
|
67 |
-
success: function(response){
|
68 |
-
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
69 |
-
$("#quads_add_err").hide();
|
70 |
-
if (typeof response.data !== 'undefined') {
|
71 |
-
$("#quads_add_err").html("We are logging you in");
|
72 |
-
console.log('We are logging you in' + response);
|
73 |
-
saveViToken(response.data);
|
74 |
-
}
|
75 |
-
else {
|
76 |
-
$("#quads_add_err").html("No valid API response. Can not log you in. Contact support[at]vi.ai");
|
77 |
-
console.log('no valid api response' + response);
|
78 |
-
}
|
79 |
-
},
|
80 |
-
error: function(response){
|
81 |
-
// check if xhr.status is defined in $.ajax.statusCode
|
82 |
-
// if true, return false to stop this function
|
83 |
-
if (typeof this.statusCode[response.status] != 'undefined') {
|
84 |
-
return false;
|
85 |
-
}
|
86 |
-
|
87 |
-
var result = typeof response.responseText !== 'undefined' ? JSON.parse(response.responseText) : '';
|
88 |
-
$("#quads_add_err").html(result.error.message + ' ' + result.error.description);
|
89 |
-
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
90 |
-
$("#quads_add_err").show();
|
91 |
-
$("#quads_add_err").removeClass('quads-spinner');
|
92 |
-
console.log(result);
|
93 |
-
//exit;
|
94 |
-
},
|
95 |
-
beforeSend:function()
|
96 |
-
{
|
97 |
-
$("#quads_vi_loading").css('display', 'inline', 'important').css('visibility', 'visible');
|
98 |
-
$("#quads_add_err").show();
|
99 |
-
},
|
100 |
-
|
101 |
-
complete:function()
|
102 |
-
{
|
103 |
-
$("#quads_vi_loading").css('display', 'none', 'important').css('visibility', 'hidden');
|
104 |
-
}
|
105 |
-
|
106 |
-
});
|
107 |
-
return false;
|
108 |
-
});
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Save vi token
|
112 |
-
*/
|
113 |
-
function saveViToken(token){
|
114 |
-
var data = {
|
115 |
-
'action': 'quads_save_vi_token',
|
116 |
-
'token': token
|
117 |
-
};
|
118 |
-
$.ajax({
|
119 |
-
type: "POST",
|
120 |
-
url: ajaxurl,
|
121 |
-
dataType: "json",
|
122 |
-
data: data,
|
123 |
-
//contentType: 'application/json;charset=utf-8',
|
124 |
-
success: function(response){
|
125 |
-
//response = JSON.stringify(response);
|
126 |
-
console.log(response.status);
|
127 |
-
|
128 |
-
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
129 |
-
$("#quads_add_err").hide();
|
130 |
-
if (typeof response.status != 'undefined' && response.status == 'success') {
|
131 |
-
console.log('Success, login succesfull, token stored' + response);
|
132 |
-
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
133 |
-
return false;
|
134 |
-
}
|
135 |
-
else {
|
136 |
-
console.log("Can not store token");
|
137 |
-
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
138 |
-
return false;
|
139 |
-
}
|
140 |
-
},
|
141 |
-
beforeSend:function()
|
142 |
-
{
|
143 |
-
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
144 |
-
$("#quads_add_err").show();
|
145 |
-
},
|
146 |
-
complete:function()
|
147 |
-
{
|
148 |
-
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
149 |
-
$("#quads_add_err").hide();
|
150 |
-
}
|
151 |
-
|
152 |
-
});
|
153 |
-
}
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
// Remove several unused elements from vi page
|
159 |
-
if (document.location.href.indexOf('vi_header') > - 1) {
|
160 |
-
$('#quads-submit-button').hide();
|
161 |
-
$('#quads-validate').hide();
|
162 |
-
$('#quads-footer').hide();
|
163 |
-
} else {
|
164 |
-
$('#quads-submit-button').show();
|
165 |
-
$('#quads-validate').show();
|
166 |
-
$('#quads-footer').show();
|
167 |
-
}
|
168 |
-
$(window).bind('easytabs:after', function(){
|
169 |
-
if (document.location.href.indexOf('vi_header') > - 1) {
|
170 |
-
$('#quads-submit-button').hide();
|
171 |
-
$('#quads-validate').hide();
|
172 |
-
$('#quads-footer').hide();
|
173 |
-
} else {
|
174 |
-
|
175 |
-
$('#quads-submit-button').show();
|
176 |
-
$('#quads-validate').show();
|
177 |
-
$('#quads-footer').show();
|
178 |
-
}
|
179 |
-
});
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
// VI signup form
|
186 |
-
$('#quads-vi-signup').click(function(e){
|
187 |
-
e.preventDefault();
|
188 |
-
// scroll to top
|
189 |
-
$(window).scrollTop(0);
|
190 |
-
// hide save button
|
191 |
-
$('#quads-submit-button').hide();
|
192 |
-
$('#quads-vi-signup-fullscreen').fadeIn();
|
193 |
-
});
|
194 |
-
$('#quads-vi-close').click(function(e){
|
195 |
-
e.preventDefault();
|
196 |
-
$('#quads-vi-signup-fullscreen').fadeOut();
|
197 |
-
});
|
198 |
-
|
199 |
-
/**
|
200 |
-
* General Tab
|
201 |
-
*/
|
202 |
-
// Inactive select fields are greyed out
|
203 |
-
$('.quads-assign').each(function(e){
|
204 |
-
if (!$(this).prop('checked')){
|
205 |
-
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
206 |
-
}else {
|
207 |
-
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
208 |
-
}
|
209 |
-
});
|
210 |
-
|
211 |
-
$('.quads-assign').click(function(){
|
212 |
-
if (!$(this).prop('checked')){
|
213 |
-
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
214 |
-
} else {
|
215 |
-
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
216 |
-
}
|
217 |
-
});
|
218 |
-
|
219 |
-
/**
|
220 |
-
* AdSense Code Tab
|
221 |
-
*/
|
222 |
-
// Check if submit button is visible than stick it to the bottom of the page
|
223 |
-
$(window).scroll(function() {
|
224 |
-
|
225 |
-
var elem = '#quads_tab_container .submit';
|
226 |
-
|
227 |
-
if ($(elem).length < 1){
|
228 |
-
return;
|
229 |
-
}
|
230 |
-
|
231 |
-
var top_of_element = $(elem).offset().top;
|
232 |
-
var bottom_of_element = $(elem).offset().top + $(elem).outerHeight(false);
|
233 |
-
var bottom_of_screen = $(window).scrollTop() + $(window).height();
|
234 |
-
if (bottom_of_screen > top_of_element){
|
235 |
-
// The element is visible, do something
|
236 |
-
$('#quads-submit-button').css('position', 'relative').css('bottom', '20px');
|
237 |
-
} else {
|
238 |
-
// The element is NOT visible, do something else
|
239 |
-
$('#quads-submit-button').css('position', 'fixed').css('bottom', '20px');
|
240 |
-
}
|
241 |
-
});
|
242 |
-
|
243 |
-
// Activate chosen select boxes
|
244 |
-
// $(".quads-chosen-select").chosen({
|
245 |
-
// inherit_select_classes: true
|
246 |
-
// });
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
// Hid or show AMP code form on click on amp checkbox
|
251 |
-
$('.quads-activate-amp').click(function(){
|
252 |
-
var parent = $(this).parents('.quads-ad-toggle-container').attr('id');
|
253 |
-
if ($(this).attr('checked') === 'checked') {
|
254 |
-
$('#' + parent).find('.quads-amp-code').show();
|
255 |
-
} else {
|
256 |
-
$('#' + parent).find('.quads-amp-code').hide();
|
257 |
-
}
|
258 |
-
});
|
259 |
-
|
260 |
-
|
261 |
-
// Hide or show AMP code form on loading
|
262 |
-
$('.quads-ad-toggle-container').find('.quads-activate-amp').each(function (index, value) {
|
263 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
264 |
-
if ($(this).attr( 'checked') === 'checked' ) {
|
265 |
-
$('#' + parentContainerID).find('.quads-amp-code').show();
|
266 |
-
}else {
|
267 |
-
$('#' + parentContainerID).find('.quads-amp-code').hide();
|
268 |
-
}
|
269 |
-
});
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Toggle Button | Open All Ads
|
275 |
-
*/
|
276 |
-
$('#quads-open-toggle').click(function(){
|
277 |
-
if ($('#quads-open-toggle').text() === 'Open All Ads' ){
|
278 |
-
$('.quads-ad-toggle-container').show();
|
279 |
-
$('#quads-open-toggle').html('Close Ads');
|
280 |
-
}else{
|
281 |
-
$('.quads-ad-toggle-container').hide();
|
282 |
-
$('#quads-open-toggle').html('Open All Ads');
|
283 |
-
}
|
284 |
-
});
|
285 |
-
|
286 |
-
// show / hide helper description
|
287 |
-
$('.quads-helper').click(function (e) {
|
288 |
-
e.preventDefault();
|
289 |
-
var icon = $(this),
|
290 |
-
bubble = $(this).next();
|
291 |
-
|
292 |
-
// Close any that are already open
|
293 |
-
$('.quads-message').not(bubble).hide();
|
294 |
-
|
295 |
-
var position = icon.position();
|
296 |
-
if (bubble.hasClass('bottom')) {
|
297 |
-
bubble.css({
|
298 |
-
'left': (position.left - bubble.width() / 2) + 'px',
|
299 |
-
'top': (position.top + icon.height() + 9) + 'px'
|
300 |
-
});
|
301 |
-
} else {
|
302 |
-
bubble.css({
|
303 |
-
'left': (position.left + icon.width() + 9) + 'px',
|
304 |
-
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
305 |
-
});
|
306 |
-
}
|
307 |
-
|
308 |
-
bubble.toggle();
|
309 |
-
e.stopPropagation();
|
310 |
-
});
|
311 |
-
$('.quads-general-helper').click(function (e) {
|
312 |
-
e.preventDefault();
|
313 |
-
var icon = $(this),
|
314 |
-
bubble = $(this).next();
|
315 |
-
|
316 |
-
// Close any that are already open
|
317 |
-
$('.quads-message').not(bubble).hide();
|
318 |
-
|
319 |
-
var position = icon.position();
|
320 |
-
if (bubble.hasClass('bottom')) {
|
321 |
-
bubble.css({
|
322 |
-
'left': (position.left - bubble.width() / 2) + 'px',
|
323 |
-
'top': (position.top + icon.height() + 9) + 'px'
|
324 |
-
});
|
325 |
-
} else {
|
326 |
-
bubble.css({
|
327 |
-
'left': (position.left + icon.width() + 9) + 'px',
|
328 |
-
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
329 |
-
});
|
330 |
-
}
|
331 |
-
|
332 |
-
bubble.toggle();
|
333 |
-
e.stopPropagation();
|
334 |
-
});
|
335 |
-
|
336 |
-
$('body').click(function () {
|
337 |
-
$('.quads-message').hide();
|
338 |
-
});
|
339 |
-
|
340 |
-
$('.quads-message').click(function (e) {
|
341 |
-
e.stopPropagation();
|
342 |
-
});
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Save settings via ajax
|
346 |
-
*/
|
347 |
-
|
348 |
-
jQuery('#quads_settings').submit(function() {
|
349 |
-
|
350 |
-
// Check if ad name has been changed and prepare new data for saving
|
351 |
-
$('.quads-toogle-title').each(function(){
|
352 |
-
$(this).children('input').val($(this).text());
|
353 |
-
});
|
354 |
-
|
355 |
-
|
356 |
-
// Check current url / settings page
|
357 |
-
var url = window.location.search;
|
358 |
-
var tab_imexport = url.search("page=quads-settings&tab=imexport");
|
359 |
-
var tab_licenses = url.search("page=quads-settings&tab=licenses");
|
360 |
-
|
361 |
-
jQuery('#quads-save-result').html("<div id='quads-loader' class='quads-loader'></div>");
|
362 |
-
jQuery('#quads-loader').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/loader1.gif"></p>').show();
|
363 |
-
jQuery(this).ajaxSubmit({
|
364 |
-
|
365 |
-
success: function(){
|
366 |
-
jQuery('#quads-save-result').html("<div id='quads-save-message' class='quads-success-modal'></div>");
|
367 |
-
jQuery('#quads-save-message').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/saved.gif"></p>').show();
|
368 |
-
quads_hide_success_message();
|
369 |
-
},
|
370 |
-
//,timeout: 0,
|
371 |
-
|
372 |
-
error: function(){
|
373 |
-
//Do not show alert on import/export tab
|
374 |
-
if ( tab_imexport === -1 && tab_licenses === -1 ){
|
375 |
-
alert ('Error: Can not save settings. Try again');
|
376 |
-
}
|
377 |
-
jQuery('#quads-save-result').hide('fast');
|
378 |
-
}
|
379 |
-
});
|
380 |
-
// Do not use ajax saving on import/export and licenses tab
|
381 |
-
if ( tab_imexport === -1 && tab_licenses ===-1 ){
|
382 |
-
return false;
|
383 |
-
}
|
384 |
-
});
|
385 |
-
|
386 |
-
function quads_hide_success_message(){
|
387 |
-
setTimeout("jQuery('#quads-save-message').hide()", 1000);
|
388 |
-
}
|
389 |
-
|
390 |
-
|
391 |
-
/**
|
392 |
-
* Paste AdSense Code form
|
393 |
-
*/
|
394 |
-
$(document).on('click', '#quads-paste-button', function () {
|
395 |
-
|
396 |
-
var content = $('#quads-adsense-form').val();
|
397 |
-
var parseResult = quadsParseAdSenseCode(content);
|
398 |
-
if (false !== parseResult) {
|
399 |
-
console.log(parseResult);
|
400 |
-
setDetailsFromAdCode(parseResult);
|
401 |
-
}else{
|
402 |
-
$('#quads-msg').html('Can not parse AdSense Code. Is the code valid?');
|
403 |
-
$('#quads-msg').show();
|
404 |
-
}
|
405 |
-
});
|
406 |
-
|
407 |
-
|
408 |
-
/**
|
409 |
-
* Populate AdSense Date Fields
|
410 |
-
*
|
411 |
-
* @param object adsense
|
412 |
-
* @param2 string id of the parent container
|
413 |
-
* @returns false
|
414 |
-
*/
|
415 |
-
function setDetailsFromAdCode(GoogleAd) {
|
416 |
-
|
417 |
-
var containerID = $('#quads-adsense-id').val();
|
418 |
-
|
419 |
-
var id = containerID.replace("quads-toggle", "");
|
420 |
-
|
421 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_slot\\]').val(GoogleAd.slotId);
|
422 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_client\\]').val(GoogleAd.pubId);
|
423 |
-
if ('normal' == GoogleAd.type) {
|
424 |
-
console.log($('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]'));
|
425 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('normal');
|
426 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val(GoogleAd.width);
|
427 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val(GoogleAd.height);
|
428 |
-
}
|
429 |
-
if ('responsive' == GoogleAd.type) {
|
430 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('responsive');
|
431 |
-
//$('#ad-resize-type').val('auto');
|
432 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val('');
|
433 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val('');
|
434 |
-
}
|
435 |
-
// Trigger the ad type select
|
436 |
-
$('.quads-select-Type').trigger('change');
|
437 |
-
// Hide the overlay
|
438 |
-
$('#quads-adsense-bg-div').hide();
|
439 |
-
// Ad code input form must not be empty!
|
440 |
-
if ($('#' + containerID).children('textarea').val().length === 0){
|
441 |
-
$('#' + containerID).children('textarea').val('adsense');
|
442 |
-
}
|
443 |
-
|
444 |
-
|
445 |
-
}
|
446 |
-
|
447 |
-
/**
|
448 |
-
* Parse the adsense ad content
|
449 |
-
* @param {type} content
|
450 |
-
* @returns {quads-admin.min_L3.parseAdContent.GoogleAd|Boolean}
|
451 |
-
*/
|
452 |
-
function quadsParseAdSenseCode(content) {
|
453 |
-
|
454 |
-
var rawContent = ('undefined' != typeof (content)) ? content.trim() : '';
|
455 |
-
var GoogleAd = {};
|
456 |
-
var theContent = $('<div />').html(rawContent);
|
457 |
-
var asyncGoogleAd = theContent.find('ins');
|
458 |
-
//var syncGoogleAd = theContent.search('google_ad_client');
|
459 |
-
|
460 |
-
// Its a async adsense ad
|
461 |
-
if (asyncGoogleAd.length > 0) {
|
462 |
-
console.log('async ad');
|
463 |
-
|
464 |
-
// Ad Slot ID
|
465 |
-
GoogleAd.slotId = asyncGoogleAd.attr('data-ad-slot');
|
466 |
-
|
467 |
-
if ('undefined' != typeof (asyncGoogleAd.attr('data-ad-client'))) {
|
468 |
-
// Ad Publisher ID
|
469 |
-
GoogleAd.pubId = asyncGoogleAd.attr('data-ad-client').substr(3);
|
470 |
-
}
|
471 |
-
|
472 |
-
if (undefined !== GoogleAd.slotId && '' != GoogleAd.pubId) {
|
473 |
-
GoogleAd.display = asyncGoogleAd.css('display');
|
474 |
-
GoogleAd.format = asyncGoogleAd.attr('data-ad-format');
|
475 |
-
GoogleAd.style = asyncGoogleAd.attr('style');
|
476 |
-
|
477 |
-
if ('undefined' == typeof (GoogleAd.format) && -1 != GoogleAd.style.indexOf('width')) {
|
478 |
-
/* normal ad */
|
479 |
-
GoogleAd.type = 'normal';
|
480 |
-
GoogleAd.width = asyncGoogleAd.css('width').replace('px', '');
|
481 |
-
GoogleAd.height = asyncGoogleAd.css('height').replace('px', '');
|
482 |
-
return GoogleAd;
|
483 |
-
}
|
484 |
-
|
485 |
-
if ('undefined' != typeof (GoogleAd.format) && 'auto' == GoogleAd.format) {
|
486 |
-
/* Responsive ad, auto resize */
|
487 |
-
GoogleAd.type = 'responsive';
|
488 |
-
return GoogleAd;
|
489 |
-
}
|
490 |
-
return GoogleAd;
|
491 |
-
}
|
492 |
-
|
493 |
-
return false;
|
494 |
-
}
|
495 |
-
|
496 |
-
// Google syncronous ad
|
497 |
-
if (rawContent.search('google_ad_client') > 0) {
|
498 |
-
console.log('syncronous code');
|
499 |
-
|
500 |
-
// Ad Slot ID
|
501 |
-
GoogleAd.slotId = get_google_ad_slot(content);
|
502 |
-
|
503 |
-
console.log(get_google_ad_slot(content));
|
504 |
-
console.log(get_google_ad_client(content));
|
505 |
-
console.log(get_google_ad_height(content));
|
506 |
-
console.log(get_google_ad_width(content));
|
507 |
-
|
508 |
-
if (!quadsIsEmpty(get_google_ad_client(content))) {
|
509 |
-
// Ad Publisher ID
|
510 |
-
GoogleAd.pubId = 'ca-pub-' + get_google_ad_client(content);
|
511 |
-
}else{
|
512 |
-
return false;
|
513 |
-
}
|
514 |
-
|
515 |
-
if (!quadsIsEmpty(GoogleAd.slotId) && !quadsIsEmpty(GoogleAd.pubId)) {
|
516 |
-
|
517 |
-
if (!quadsIsEmpty(get_google_ad_width(content))) {
|
518 |
-
GoogleAd.type = 'normal';
|
519 |
-
GoogleAd.width = get_google_ad_width(content);
|
520 |
-
GoogleAd.height = get_google_ad_height(content);
|
521 |
-
return GoogleAd;
|
522 |
-
}
|
523 |
-
}
|
524 |
-
return false;
|
525 |
-
}
|
526 |
-
|
527 |
-
return false;
|
528 |
-
}
|
529 |
-
|
530 |
-
function get_google_ad_slot(content) {
|
531 |
-
const regex = /google_ad_slot\s*=\s*"(\d*)";/g;
|
532 |
-
const str = content;
|
533 |
-
var m;
|
534 |
-
var result = {};
|
535 |
-
|
536 |
-
while ((m = regex.exec(str)) !== null) {
|
537 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
538 |
-
if (m.index === regex.lastIndex) {
|
539 |
-
regex.lastIndex++;
|
540 |
-
}
|
541 |
-
|
542 |
-
// The result can be accessed through the `m`-variable.
|
543 |
-
m.forEach(function(match, index){
|
544 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
545 |
-
console.log(match);
|
546 |
-
result = match;
|
547 |
-
});
|
548 |
-
}
|
549 |
-
return result;
|
550 |
-
}
|
551 |
-
function get_google_ad_client(content) {
|
552 |
-
const regex = /google_ad_client\s*=\s*"ca-pub-(\d*)";/g;
|
553 |
-
const str = content;
|
554 |
-
var m;
|
555 |
-
var result = {};
|
556 |
-
|
557 |
-
while ((m = regex.exec(str)) !== null) {
|
558 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
559 |
-
if (m.index === regex.lastIndex) {
|
560 |
-
regex.lastIndex++;
|
561 |
-
}
|
562 |
-
|
563 |
-
// The result can be accessed through the `m`-variable.
|
564 |
-
m.forEach(function(match, index){
|
565 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
566 |
-
console.log(match);
|
567 |
-
result = match;
|
568 |
-
});
|
569 |
-
}
|
570 |
-
return result;
|
571 |
-
}
|
572 |
-
function get_google_ad_width(content) {
|
573 |
-
const regex = /google_ad_width\s*=\s*(\d*);/g;
|
574 |
-
const str = content;
|
575 |
-
var m;
|
576 |
-
var result = {};
|
577 |
-
|
578 |
-
while ((m = regex.exec(str)) !== null) {
|
579 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
580 |
-
if (m.index === regex.lastIndex) {
|
581 |
-
regex.lastIndex++;
|
582 |
-
}
|
583 |
-
|
584 |
-
// The result can be accessed through the `m`-variable.
|
585 |
-
m.forEach(function(match, index){
|
586 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
587 |
-
console.log(match);
|
588 |
-
result = match;
|
589 |
-
});
|
590 |
-
}
|
591 |
-
return result;
|
592 |
-
}
|
593 |
-
function get_google_ad_height(content) {
|
594 |
-
const regex = /google_ad_height\s*=\s*(\d*);/g;
|
595 |
-
const str = content;
|
596 |
-
var m;
|
597 |
-
var result = {};
|
598 |
-
|
599 |
-
while ((m = regex.exec(str)) !== null) {
|
600 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
601 |
-
if (m.index === regex.lastIndex) {
|
602 |
-
regex.lastIndex++;
|
603 |
-
}
|
604 |
-
|
605 |
-
// The result can be accessed through the `m`-variable.
|
606 |
-
m.forEach(function(match, index){
|
607 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
608 |
-
console.log(match);
|
609 |
-
result = match;
|
610 |
-
});
|
611 |
-
}
|
612 |
-
return result;
|
613 |
-
}
|
614 |
-
|
615 |
-
/**
|
616 |
-
* Check if return value is empty or not
|
617 |
-
* @param {type} str
|
618 |
-
* @returns {Boolean}
|
619 |
-
*/
|
620 |
-
function quadsIsEmpty(str) {
|
621 |
-
return (!str || 0 === str.length);
|
622 |
-
}
|
623 |
-
|
624 |
-
// AdSense Code Input Form
|
625 |
-
$(document).on('click', '.quads-add-adsense', function (e) {
|
626 |
-
e.preventDefault();
|
627 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
628 |
-
// Empty the ad plain text form
|
629 |
-
$('#quads-adsense-form').val('');
|
630 |
-
$('#quads-adsense-id').val(parentContainerID);
|
631 |
-
$('#quads-adsense-bg-div').show();
|
632 |
-
});
|
633 |
-
$(document).on('click', '#quads-close-button', function (e) {
|
634 |
-
e.preventDefault();
|
635 |
-
$('#quads-adsense-bg-div').hide();
|
636 |
-
});
|
637 |
-
|
638 |
-
|
639 |
-
// Toggle between AdSense or Plain Text option
|
640 |
-
$(document).on('click', '.quads_adsense_type', function () {
|
641 |
-
|
642 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
643 |
-
|
644 |
-
if ($(this).val() === 'adsense') {
|
645 |
-
$('#' + parentContainerID).children('textarea').hide();
|
646 |
-
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
647 |
-
$('#' + parentContainerID).find('.quads-sizes').show();
|
648 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
649 |
-
|
650 |
-
}
|
651 |
-
if ($(this).val() === 'plain_text') {
|
652 |
-
$('#' + parentContainerID).children('textarea').show();
|
653 |
-
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
654 |
-
$('#' + parentContainerID).find('.quads-sizes').hide();
|
655 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
656 |
-
}
|
657 |
-
});
|
658 |
-
|
659 |
-
|
660 |
-
// Hide or show AdSense elements on loading
|
661 |
-
$('.quads-ad-toggle-container').find('.quads_adsense_type').each(function (index, value) {
|
662 |
-
|
663 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
664 |
-
|
665 |
-
if ($(this).attr('checked') === 'checked' && $(this).val() === 'adsense') {
|
666 |
-
$('#' + parentContainerID).children('textarea').fadeOut();
|
667 |
-
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
668 |
-
}
|
669 |
-
if ($(this).attr('checked') === 'checked' && $(this).val() === 'plain_text') {
|
670 |
-
$('#' + parentContainerID).children('textarea').fadeIn();
|
671 |
-
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
672 |
-
}
|
673 |
-
});
|
674 |
-
|
675 |
-
|
676 |
-
// Hide or show AdSense width and height on loading
|
677 |
-
$('.quads-ad-toggle-container').find('.quads-select-Type').each(function (index, value) {
|
678 |
-
|
679 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
680 |
-
|
681 |
-
if ($(this).val() === 'responsive') {
|
682 |
-
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
683 |
-
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
684 |
-
$('#' + parentContainerID).find('.quads-sizes').show();
|
685 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
686 |
-
}
|
687 |
-
if ($(this).val() === 'normal') {
|
688 |
-
$('#' + parentContainerID).find('.quads-type-normal').show();
|
689 |
-
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
690 |
-
$('#' + parentContainerID).find('.quads-sizes').hide();
|
691 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
692 |
-
}
|
693 |
-
});
|
694 |
-
|
695 |
-
|
696 |
-
// Toggle between Fixed Size or Responsive ad type
|
697 |
-
$(document).on('change', '.quads-select-Type', function () {
|
698 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
699 |
-
|
700 |
-
if ($(this).val() === 'responsive') {
|
701 |
-
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
702 |
-
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
703 |
-
$('#' + parentContainerID).find('.quads-sizes').show();
|
704 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
705 |
-
}
|
706 |
-
if ($(this).val() === 'normal') {
|
707 |
-
$('#' + parentContainerID).find('.quads-type-normal').show();
|
708 |
-
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
709 |
-
$('#' + parentContainerID).find('.quads-sizes').hide();
|
710 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
711 |
-
}
|
712 |
-
});
|
713 |
-
|
714 |
-
//*[@id="quads-togglead1"]/div[2]
|
715 |
-
/**
|
716 |
-
* Toggle the adsense container
|
717 |
-
*/
|
718 |
-
//$('.quads-ad-toggle-header').click(function (e) {
|
719 |
-
$('.quads-form-table').on('click', '.quads-ad-toggle-header', function(e) {
|
720 |
-
e.preventDefault();
|
721 |
-
|
722 |
-
var container = $('#' + $(this).data('box-id'));
|
723 |
-
//console.log(container);
|
724 |
-
container.toggle(0, function () {
|
725 |
-
if (container.parents('.quads-ad-toggle-header').hasClass('quads-box-close')) {
|
726 |
-
// open the box
|
727 |
-
container.parents('.quads-ad-toggle-header').removeClass('quads-box-close');
|
728 |
-
} else {
|
729 |
-
container.parents('.quads-ad-toggle-header').addClass('quads-box-close');
|
730 |
-
}
|
731 |
-
});
|
732 |
-
});
|
733 |
-
|
734 |
-
/*
|
735 |
-
* Quick Adsense import process
|
736 |
-
*/
|
737 |
-
|
738 |
-
jQuery('.quads-import-settings').click(function (e) {
|
739 |
-
e.preventDefault();
|
740 |
-
|
741 |
-
if (!confirm('Importing settings from Quick AdSense will overwrite all your current settings. Are you sure?'))
|
742 |
-
return;
|
743 |
-
|
744 |
-
jQuery('#quads-import-settings').addClass('loading');
|
745 |
-
var data = {
|
746 |
-
action: 'quads_import_quick_adsense',
|
747 |
-
nonce: quads.nonce,
|
748 |
-
};
|
749 |
-
$.post(ajaxurl, data, function (resp, status, xhr) {
|
750 |
-
|
751 |
-
//console.log('success:' + resp + status + xhr);
|
752 |
-
quads_show_message(resp);
|
753 |
-
|
754 |
-
}).fail(function (xhr) { // Will be executed when $.post() fails
|
755 |
-
quads_show_message('Ajax Error: ' + xhr.status + ' ' + xhr.statusText);
|
756 |
-
//console.log('error: ' + xhr.statusText);
|
757 |
-
});
|
758 |
-
});
|
759 |
-
|
760 |
-
jQuery('#quads_insert_ads_action').click(function (e) {
|
761 |
-
e.preventDefault();
|
762 |
-
jQuery('#quads_insert_ads_box').toggle();
|
763 |
-
});
|
764 |
-
|
765 |
-
jQuery('#quads_disable_ads_action').click(function (e) {
|
766 |
-
e.preventDefault();
|
767 |
-
jQuery('#quads_disable_ads_box').toggle();
|
768 |
-
});
|
769 |
-
|
770 |
-
|
771 |
-
/**
|
772 |
-
* Show error message and die()
|
773 |
-
* Writes error message into log file
|
774 |
-
*
|
775 |
-
* @param {string} $error notice
|
776 |
-
* @returns void
|
777 |
-
*/
|
778 |
-
function quads_show_message(error) {
|
779 |
-
$('#quads-error-details').show();
|
780 |
-
$('#quads-error-details').html(error);
|
781 |
-
console.log(error);
|
782 |
-
}
|
783 |
-
|
784 |
-
|
785 |
-
/**
|
786 |
-
* Start easytabs()
|
787 |
-
*/
|
788 |
-
if ($(".quads-tabs").length) {
|
789 |
-
$('#quads_tab_container').easytabs({
|
790 |
-
animate: true,
|
791 |
-
updateHash: true,
|
792 |
-
animationSpeed: 'fast'
|
793 |
-
});
|
794 |
-
}
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
}); // document ready
|
800 |
-
|
801 |
-
/*
|
802 |
-
* jQuery hashchange event - v1.3 - 7/21/2010
|
803 |
-
* http://benalman.com/projects/jquery-hashchange-plugin/
|
804 |
-
*
|
805 |
-
* Copyright (c) 2010 "Cowboy" Ben Alman
|
806 |
-
* Dual licensed under the MIT and GPL licenses.
|
807 |
-
* http://benalman.com/about/license/
|
808 |
-
*/
|
809 |
-
(function ($, e, b) {
|
810 |
-
var c = "hashchange", h = document, f, g = $.event.special, i = h.documentMode, d = "on" + c in e && (i === b || i > 7);
|
811 |
-
function a(j) {
|
812 |
-
j = j || location.href;
|
813 |
-
return"#" + j.replace(/^[^#]*#?(.*)$/, "$1")
|
814 |
-
}
|
815 |
-
$.fn[c] = function (j) {
|
816 |
-
return j ? this.bind(c, j) : this.trigger(c)
|
817 |
-
};
|
818 |
-
$.fn[c].delay = 50;
|
819 |
-
g[c] = $.extend(g[c], {setup: function () {
|
820 |
-
if (d) {
|
821 |
-
return false
|
822 |
-
}
|
823 |
-
$(f.start)
|
824 |
-
}, teardown: function () {
|
825 |
-
if (d) {
|
826 |
-
return false
|
827 |
-
}
|
828 |
-
$(f.stop)
|
829 |
-
}});
|
830 |
-
f = (function () {
|
831 |
-
var j = {}, p, m = a(), k = function (q) {
|
832 |
-
return q
|
833 |
-
}, l = k, o = k;
|
834 |
-
j.start = function () {
|
835 |
-
p || n()
|
836 |
-
};
|
837 |
-
j.stop = function () {
|
838 |
-
p && clearTimeout(p);
|
839 |
-
p = b
|
840 |
-
};
|
841 |
-
function n() {
|
842 |
-
var r = a(), q = o(m);
|
843 |
-
if (r !== m) {
|
844 |
-
l(m = r, q);
|
845 |
-
$(e).trigger(c)
|
846 |
-
} else {
|
847 |
-
if (q !== m) {
|
848 |
-
location.href = location.href.replace(/#.*/, "") + q
|
849 |
-
}
|
850 |
-
}
|
851 |
-
p = setTimeout(n, $.fn[c].delay)
|
852 |
-
}
|
853 |
-
$.browser.msie && !d && (function () {
|
854 |
-
var q, r;
|
855 |
-
j.start = function () {
|
856 |
-
if (!q) {
|
857 |
-
r = $.fn[c].src;
|
858 |
-
r = r && r + a();
|
859 |
-
q = $('<iframe tabindex="-1" title="empty"/>').hide().one("load", function () {
|
860 |
-
r || l(a());
|
861 |
-
n()
|
862 |
-
}).attr("src", r || "javascript:0").insertAfter("body")[0].contentWindow;
|
863 |
-
h.onpropertychange = function () {
|
864 |
-
try {
|
865 |
-
if (event.propertyName === "title") {
|
866 |
-
q.document.title = h.title
|
867 |
-
}
|
868 |
-
} catch (s) {
|
869 |
-
}
|
870 |
-
}
|
871 |
-
}
|
872 |
-
};
|
873 |
-
j.stop = k;
|
874 |
-
o = function () {
|
875 |
-
return a(q.location.href)
|
876 |
-
};
|
877 |
-
l = function (v, s) {
|
878 |
-
var u = q.document, t = $.fn[c].domain;
|
879 |
-
if (v !== s) {
|
880 |
-
u.title = h.title;
|
881 |
-
u.open();
|
882 |
-
t && u.write('<script>document.domain="' + t + '"<\/script>');
|
883 |
-
u.close();
|
884 |
-
q.location.hash = v
|
885 |
-
}
|
886 |
-
}
|
887 |
-
})();
|
888 |
-
return j
|
889 |
-
})()
|
890 |
-
})(jQuery, this);
|
891 |
-
|
892 |
-
/*
|
893 |
-
* jQuery EasyTabs plugin 3.2.0
|
894 |
-
*
|
895 |
-
* Copyright (c) 2010-2011 Steve Schwartz (JangoSteve)
|
896 |
-
*
|
897 |
-
* Dual licensed under the MIT and GPL licenses:
|
898 |
-
* http://www.opensource.org/licenses/mit-license.php
|
899 |
-
* http://www.gnu.org/licenses/gpl.html
|
900 |
-
*
|
901 |
-
* Date: Thu May 09 17:30:00 2013 -0500
|
902 |
-
*/
|
903 |
-
(function (a) {
|
904 |
-
a.easytabs = function (j, e) {
|
905 |
-
var f = this, q = a(j), i = {animate: true, panelActiveClass: "active", tabActiveClass: "active", defaultTab: "li:first-child", animationSpeed: "fast", tabs: "> ul > li", updateHash: true, cycle: false, collapsible: false, collapsedClass: "collapsed", collapsedByDefault: true, uiTabs: false, transitionIn: "fadeIn", transitionOut: "fadeOut", transitionInEasing: "swing", transitionOutEasing: "swing", transitionCollapse: "slideUp", transitionUncollapse: "slideDown", transitionCollapseEasing: "swing", transitionUncollapseEasing: "swing", containerClass: "", tabsClass: "", tabClass: "", panelClass: "", cache: true, event: "click", panelContext: q}, h, l, v, m, d, t = {fast: 200, normal: 400, slow: 600}, r;
|
906 |
-
f.init = function () {
|
907 |
-
f.settings = r = a.extend({}, i, e);
|
908 |
-
r.bind_str = r.event + ".easytabs";
|
909 |
-
if (r.uiTabs) {
|
910 |
-
r.tabActiveClass = "ui-tabs-selected";
|
911 |
-
r.containerClass = "ui-tabs ui-widget ui-widget-content ui-corner-all";
|
912 |
-
r.tabsClass = "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all";
|
913 |
-
r.tabClass = "ui-state-default ui-corner-top";
|
914 |
-
r.panelClass = "ui-tabs-panel ui-widget-content ui-corner-bottom"
|
915 |
-
}
|
916 |
-
if (r.collapsible && e.defaultTab !== undefined && e.collpasedByDefault === undefined) {
|
917 |
-
r.collapsedByDefault = false
|
918 |
-
}
|
919 |
-
if (typeof (r.animationSpeed) === "string") {
|
920 |
-
r.animationSpeed = t[r.animationSpeed]
|
921 |
-
}
|
922 |
-
a("a.anchor").remove().prependTo("body");
|
923 |
-
q.data("easytabs", {});
|
924 |
-
f.setTransitions();
|
925 |
-
f.getTabs();
|
926 |
-
b();
|
927 |
-
g();
|
928 |
-
w();
|
929 |
-
n();
|
930 |
-
c();
|
931 |
-
q.attr("data-easytabs", true)
|
932 |
-
};
|
933 |
-
f.setTransitions = function () {
|
934 |
-
v = (r.animate) ? {show: r.transitionIn, hide: r.transitionOut, speed: r.animationSpeed, collapse: r.transitionCollapse, uncollapse: r.transitionUncollapse, halfSpeed: r.animationSpeed / 2} : {show: "show", hide: "hide", speed: 0, collapse: "hide", uncollapse: "show", halfSpeed: 0}
|
935 |
-
};
|
936 |
-
f.getTabs = function () {
|
937 |
-
var x;
|
938 |
-
f.tabs = q.find(r.tabs), f.panels = a(), f.tabs.each(function () {
|
939 |
-
var A = a(this), z = A.children("a"), y = A.children("a").data("target");
|
940 |
-
A.data("easytabs", {});
|
941 |
-
if (y !== undefined && y !== null) {
|
942 |
-
A.data("easytabs").ajax = z.attr("href")
|
943 |
-
} else {
|
944 |
-
y = z.attr("href")
|
945 |
-
}
|
946 |
-
y = y.match(/#([^\?]+)/)[1];
|
947 |
-
x = r.panelContext.find("#" + y);
|
948 |
-
if (x.length) {
|
949 |
-
x.data("easytabs", {position: x.css("position"), visibility: x.css("visibility")});
|
950 |
-
x.not(r.panelActiveClass).hide();
|
951 |
-
f.panels = f.panels.add(x);
|
952 |
-
A.data("easytabs").panel = x
|
953 |
-
} else {
|
954 |
-
f.tabs = f.tabs.not(A);
|
955 |
-
if ("console" in window) {
|
956 |
-
console.warn("Warning: tab without matching panel for selector '#" + y + "' removed from set")
|
957 |
-
}
|
958 |
-
}
|
959 |
-
})
|
960 |
-
};
|
961 |
-
f.selectTab = function (x, C) {
|
962 |
-
var y = window.location, B = y.hash.match(/^[^\?]*/)[0], z = x.parent().data("easytabs").panel, A = x.parent().data("easytabs").ajax;
|
963 |
-
if (r.collapsible && !d && (x.hasClass(r.tabActiveClass) || x.hasClass(r.collapsedClass))) {
|
964 |
-
f.toggleTabCollapse(x, z, A, C)
|
965 |
-
} else {
|
966 |
-
if (!x.hasClass(r.tabActiveClass) || !z.hasClass(r.panelActiveClass)) {
|
967 |
-
o(x, z, A, C)
|
968 |
-
} else {
|
969 |
-
if (!r.cache) {
|
970 |
-
o(x, z, A, C)
|
971 |
-
}
|
972 |
-
}
|
973 |
-
}
|
974 |
-
};
|
975 |
-
f.toggleTabCollapse = function (x, y, z, A) {
|
976 |
-
f.panels.stop(true, true);
|
977 |
-
if (u(q, "easytabs:before", [x, y, r])) {
|
978 |
-
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
979 |
-
if (x.hasClass(r.collapsedClass)) {
|
980 |
-
if (z && (!r.cache || !x.parent().data("easytabs").cached)) {
|
981 |
-
q.trigger("easytabs:ajax:beforeSend", [x, y]);
|
982 |
-
y.load(z, function (C, B, D) {
|
983 |
-
x.parent().data("easytabs").cached = true;
|
984 |
-
q.trigger("easytabs:ajax:complete", [x, y, C, B, D])
|
985 |
-
})
|
986 |
-
}
|
987 |
-
x.parent().removeClass(r.collapsedClass).addClass(r.tabActiveClass).children().removeClass(r.collapsedClass).addClass(r.tabActiveClass);
|
988 |
-
y.addClass(r.panelActiveClass)[v.uncollapse](v.speed, r.transitionUncollapseEasing, function () {
|
989 |
-
q.trigger("easytabs:midTransition", [x, y, r]);
|
990 |
-
if (typeof A == "function") {
|
991 |
-
A()
|
992 |
-
}
|
993 |
-
})
|
994 |
-
} else {
|
995 |
-
x.addClass(r.collapsedClass).parent().addClass(r.collapsedClass);
|
996 |
-
y.removeClass(r.panelActiveClass)[v.collapse](v.speed, r.transitionCollapseEasing, function () {
|
997 |
-
q.trigger("easytabs:midTransition", [x, y, r]);
|
998 |
-
if (typeof A == "function") {
|
999 |
-
A()
|
1000 |
-
}
|
1001 |
-
})
|
1002 |
-
}
|
1003 |
-
}
|
1004 |
-
};
|
1005 |
-
f.matchTab = function (x) {
|
1006 |
-
return f.tabs.find("[href='" + x + "'],[data-target='" + x + "']").first()
|
1007 |
-
};
|
1008 |
-
f.matchInPanel = function (x) {
|
1009 |
-
return(x && f.validId(x) ? f.panels.filter(":has(" + x + ")").first() : [])
|
1010 |
-
};
|
1011 |
-
f.validId = function (x) {
|
1012 |
-
return x.substr(1).match(/^[A-Za-z]+[A-Za-z0-9\-_:\.].$/)
|
1013 |
-
};
|
1014 |
-
f.selectTabFromHashChange = function () {
|
1015 |
-
var y = window.location.hash.match(/^[^\?]*/)[0], x = f.matchTab(y), z;
|
1016 |
-
if (r.updateHash) {
|
1017 |
-
if (x.length) {
|
1018 |
-
d = true;
|
1019 |
-
f.selectTab(x)
|
1020 |
-
} else {
|
1021 |
-
z = f.matchInPanel(y);
|
1022 |
-
if (z.length) {
|
1023 |
-
y = "#" + z.attr("id");
|
1024 |
-
x = f.matchTab(y);
|
1025 |
-
d = true;
|
1026 |
-
f.selectTab(x)
|
1027 |
-
} else {
|
1028 |
-
if (!h.hasClass(r.tabActiveClass) && !r.cycle) {
|
1029 |
-
if (y === "" || f.matchTab(m).length || q.closest(y).length) {
|
1030 |
-
d = true;
|
1031 |
-
f.selectTab(l)
|
1032 |
-
}
|
1033 |
-
}
|
1034 |
-
}
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
};
|
1038 |
-
f.cycleTabs = function (x) {
|
1039 |
-
if (r.cycle) {
|
1040 |
-
x = x % f.tabs.length;
|
1041 |
-
$tab = a(f.tabs[x]).children("a").first();
|
1042 |
-
d = true;
|
1043 |
-
f.selectTab($tab, function () {
|
1044 |
-
setTimeout(function () {
|
1045 |
-
f.cycleTabs(x + 1)
|
1046 |
-
}, r.cycle)
|
1047 |
-
})
|
1048 |
-
}
|
1049 |
-
};
|
1050 |
-
f.publicMethods = {select: function (x) {
|
1051 |
-
var y;
|
1052 |
-
if ((y = f.tabs.filter(x)).length === 0) {
|
1053 |
-
if ((y = f.tabs.find("a[href='" + x + "']")).length === 0) {
|
1054 |
-
if ((y = f.tabs.find("a" + x)).length === 0) {
|
1055 |
-
if ((y = f.tabs.find("[data-target='" + x + "']")).length === 0) {
|
1056 |
-
if ((y = f.tabs.find("a[href$='" + x + "']")).length === 0) {
|
1057 |
-
a.error("Tab '" + x + "' does not exist in tab set")
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
}
|
1061 |
-
}
|
1062 |
-
} else {
|
1063 |
-
y = y.children("a").first()
|
1064 |
-
}
|
1065 |
-
f.selectTab(y)
|
1066 |
-
}};
|
1067 |
-
var u = function (A, x, z) {
|
1068 |
-
var y = a.Event(x);
|
1069 |
-
A.trigger(y, z);
|
1070 |
-
return y.result !== false
|
1071 |
-
};
|
1072 |
-
var b = function () {
|
1073 |
-
q.addClass(r.containerClass);
|
1074 |
-
f.tabs.parent().addClass(r.tabsClass);
|
1075 |
-
f.tabs.addClass(r.tabClass);
|
1076 |
-
f.panels.addClass(r.panelClass)
|
1077 |
-
};
|
1078 |
-
var g = function () {
|
1079 |
-
var y = window.location.hash.match(/^[^\?]*/)[0], x = f.matchTab(y).parent(), z;
|
1080 |
-
if (x.length === 1) {
|
1081 |
-
h = x;
|
1082 |
-
r.cycle = false
|
1083 |
-
} else {
|
1084 |
-
z = f.matchInPanel(y);
|
1085 |
-
if (z.length) {
|
1086 |
-
y = "#" + z.attr("id");
|
1087 |
-
h = f.matchTab(y).parent()
|
1088 |
-
} else {
|
1089 |
-
h = f.tabs.parent().find(r.defaultTab);
|
1090 |
-
if (h.length === 0) {
|
1091 |
-
a.error("The specified default tab ('" + r.defaultTab + "') could not be found in the tab set ('" + r.tabs + "') out of " + f.tabs.length + " tabs.")
|
1092 |
-
}
|
1093 |
-
}
|
1094 |
-
}
|
1095 |
-
l = h.children("a").first();
|
1096 |
-
p(x)
|
1097 |
-
};
|
1098 |
-
var p = function (z) {
|
1099 |
-
var y, x;
|
1100 |
-
if (r.collapsible && z.length === 0 && r.collapsedByDefault) {
|
1101 |
-
h.addClass(r.collapsedClass).children().addClass(r.collapsedClass)
|
1102 |
-
} else {
|
1103 |
-
y = a(h.data("easytabs").panel);
|
1104 |
-
x = h.data("easytabs").ajax;
|
1105 |
-
if (x && (!r.cache || !h.data("easytabs").cached)) {
|
1106 |
-
q.trigger("easytabs:ajax:beforeSend", [l, y]);
|
1107 |
-
y.load(x, function (B, A, C) {
|
1108 |
-
h.data("easytabs").cached = true;
|
1109 |
-
q.trigger("easytabs:ajax:complete", [l, y, B, A, C])
|
1110 |
-
})
|
1111 |
-
}
|
1112 |
-
h.data("easytabs").panel.show().addClass(r.panelActiveClass);
|
1113 |
-
h.addClass(r.tabActiveClass).children().addClass(r.tabActiveClass)
|
1114 |
-
}
|
1115 |
-
q.trigger("easytabs:initialised", [l, y])
|
1116 |
-
};
|
1117 |
-
var w = function () {
|
1118 |
-
f.tabs.children("a").bind(r.bind_str, function (x) {
|
1119 |
-
r.cycle = false;
|
1120 |
-
d = false;
|
1121 |
-
f.selectTab(a(this));
|
1122 |
-
x.preventDefault ? x.preventDefault() : x.returnValue = false
|
1123 |
-
})
|
1124 |
-
};
|
1125 |
-
var o = function (z, D, E, H) {
|
1126 |
-
f.panels.stop(true, true);
|
1127 |
-
if (u(q, "easytabs:before", [z, D, r])) {
|
1128 |
-
var A = f.panels.filter(":visible"), y = D.parent(), F, x, C, G, B = window.location.hash.match(/^[^\?]*/)[0];
|
1129 |
-
if (r.animate) {
|
1130 |
-
F = s(D);
|
1131 |
-
x = A.length ? k(A) : 0;
|
1132 |
-
C = F - x
|
1133 |
-
}
|
1134 |
-
m = B;
|
1135 |
-
G = function () {
|
1136 |
-
q.trigger("easytabs:midTransition", [z, D, r]);
|
1137 |
-
if (r.animate && r.transitionIn == "fadeIn") {
|
1138 |
-
if (C < 0) {
|
1139 |
-
y.animate({height: y.height() + C}, v.halfSpeed).css({"min-height": ""})
|
1140 |
-
}
|
1141 |
-
}
|
1142 |
-
if (r.updateHash && !d) {
|
1143 |
-
window.location.hash = "#" + D.attr("id")
|
1144 |
-
} else {
|
1145 |
-
d = false
|
1146 |
-
}
|
1147 |
-
D[v.show](v.speed, r.transitionInEasing, function () {
|
1148 |
-
y.css({height: "", "min-height": ""});
|
1149 |
-
q.trigger("easytabs:after", [z, D, r]);
|
1150 |
-
if (typeof H == "function") {
|
1151 |
-
H()
|
1152 |
-
}
|
1153 |
-
})
|
1154 |
-
};
|
1155 |
-
if (E && (!r.cache || !z.parent().data("easytabs").cached)) {
|
1156 |
-
q.trigger("easytabs:ajax:beforeSend", [z, D]);
|
1157 |
-
D.load(E, function (J, I, K) {
|
1158 |
-
z.parent().data("easytabs").cached = true;
|
1159 |
-
q.trigger("easytabs:ajax:complete", [z, D, J, I, K])
|
1160 |
-
})
|
1161 |
-
}
|
1162 |
-
if (r.animate && r.transitionOut == "fadeOut") {
|
1163 |
-
if (C > 0) {
|
1164 |
-
y.animate({height: (y.height() + C)}, v.halfSpeed)
|
1165 |
-
} else {
|
1166 |
-
y.css({"min-height": y.height()})
|
1167 |
-
}
|
1168 |
-
}
|
1169 |
-
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
1170 |
-
f.tabs.filter("." + r.collapsedClass).removeClass(r.collapsedClass).children().removeClass(r.collapsedClass);
|
1171 |
-
z.parent().addClass(r.tabActiveClass).children().addClass(r.tabActiveClass);
|
1172 |
-
f.panels.filter("." + r.panelActiveClass).removeClass(r.panelActiveClass);
|
1173 |
-
D.addClass(r.panelActiveClass);
|
1174 |
-
if (A.length) {
|
1175 |
-
A[v.hide](v.speed, r.transitionOutEasing, G)
|
1176 |
-
} else {
|
1177 |
-
D[v.uncollapse](v.speed, r.transitionUncollapseEasing, G)
|
1178 |
-
}
|
1179 |
-
}
|
1180 |
-
};
|
1181 |
-
var s = function (z) {
|
1182 |
-
if (z.data("easytabs") && z.data("easytabs").lastHeight) {
|
1183 |
-
return z.data("easytabs").lastHeight
|
1184 |
-
}
|
1185 |
-
var B = z.css("display"), y, x;
|
1186 |
-
try {
|
1187 |
-
y = a("<div></div>", {position: "absolute", visibility: "hidden", overflow: "hidden"})
|
1188 |
-
} catch (A) {
|
1189 |
-
y = a("<div></div>", {visibility: "hidden", overflow: "hidden"})
|
1190 |
-
}
|
1191 |
-
x = z.wrap(y).css({position: "relative", visibility: "hidden", display: "block"}).outerHeight();
|
1192 |
-
z.unwrap();
|
1193 |
-
z.css({position: z.data("easytabs").position, visibility: z.data("easytabs").visibility, display: B});
|
1194 |
-
z.data("easytabs").lastHeight = x;
|
1195 |
-
return x
|
1196 |
-
};
|
1197 |
-
var k = function (y) {
|
1198 |
-
var x = y.outerHeight();
|
1199 |
-
if (y.data("easytabs")) {
|
1200 |
-
y.data("easytabs").lastHeight = x
|
1201 |
-
} else {
|
1202 |
-
y.data("easytabs", {lastHeight: x})
|
1203 |
-
}
|
1204 |
-
return x
|
1205 |
-
};
|
1206 |
-
var n = function () {
|
1207 |
-
if (typeof a(window).hashchange === "function") {
|
1208 |
-
a(window).hashchange(function () {
|
1209 |
-
f.selectTabFromHashChange()
|
1210 |
-
})
|
1211 |
-
} else {
|
1212 |
-
if (a.address && typeof a.address.change === "function") {
|
1213 |
-
a.address.change(function () {
|
1214 |
-
f.selectTabFromHashChange()
|
1215 |
-
})
|
1216 |
-
}
|
1217 |
-
}
|
1218 |
-
};
|
1219 |
-
var c = function () {
|
1220 |
-
var x;
|
1221 |
-
if (r.cycle) {
|
1222 |
-
x = f.tabs.index(h);
|
1223 |
-
setTimeout(function () {
|
1224 |
-
f.cycleTabs(x + 1)
|
1225 |
-
}, r.cycle)
|
1226 |
-
}
|
1227 |
-
};
|
1228 |
-
f.init()
|
1229 |
-
};
|
1230 |
-
a.fn.easytabs = function (c) {
|
1231 |
-
var b = arguments;
|
1232 |
-
return this.each(function () {
|
1233 |
-
var e = a(this), d = e.data("easytabs");
|
1234 |
-
if (undefined === d) {
|
1235 |
-
d = new a.easytabs(this, c);
|
1236 |
-
e.data("easytabs", d)
|
1237 |
-
}
|
1238 |
-
if (d.publicMethods[c]) {
|
1239 |
-
return d.publicMethods[c](Array.prototype.slice.call(b, 1))
|
1240 |
-
}
|
1241 |
-
})
|
1242 |
-
}
|
1243 |
-
})(jQuery);
|
1244 |
-
|
1245 |
-
|
1246 |
-
/*
|
1247 |
-
colpick Color Picker
|
1248 |
-
Copyright 2013 Jose Vargas. Licensed under GPL license. Based on Stefan Petre's Color Picker www.eyecon.ro, dual licensed under the MIT and GPL licenses
|
1249 |
-
|
1250 |
-
For usage and examples: colpick.com/plugin
|
1251 |
-
*/
|
1252 |
-
|
1253 |
-
(function ($) {
|
1254 |
-
var colpick = function () {
|
1255 |
-
var
|
1256 |
-
tpl = '<div class="colpick"><div class="colpick_color"><div class="colpick_color_overlay1"><div class="colpick_color_overlay2"><div class="colpick_selector_outer"><div class="colpick_selector_inner"></div></div></div></div></div><div class="colpick_hue"><div class="colpick_hue_arrs"><div class="colpick_hue_larr"></div><div class="colpick_hue_rarr"></div></div></div><div class="colpick_new_color"></div><div class="colpick_current_color"></div><div class="colpick_hex_field"><div class="colpick_field_letter">#</div><input type="text" maxlength="6" size="6" /></div><div class="colpick_rgb_r colpick_field"><div class="colpick_field_letter">R</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_g colpick_field"><div class="colpick_field_letter">G</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_h colpick_field"><div class="colpick_field_letter">H</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_s colpick_field"><div class="colpick_field_letter">S</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_submit"></div></div>',
|
1257 |
-
defaults = {
|
1258 |
-
showEvent: 'click',
|
1259 |
-
onShow: function () {
|
1260 |
-
},
|
1261 |
-
onBeforeShow: function () {
|
1262 |
-
},
|
1263 |
-
onHide: function () {
|
1264 |
-
},
|
1265 |
-
onChange: function () {
|
1266 |
-
},
|
1267 |
-
onSubmit: function () {
|
1268 |
-
},
|
1269 |
-
colorScheme: 'light',
|
1270 |
-
color: '3289c7',
|
1271 |
-
livePreview: true,
|
1272 |
-
flat: false,
|
1273 |
-
layout: 'full',
|
1274 |
-
submit: 1,
|
1275 |
-
submitText: 'OK',
|
1276 |
-
height: 156
|
1277 |
-
},
|
1278 |
-
//Fill the inputs of the plugin
|
1279 |
-
fillRGBFields = function (hsb, cal) {
|
1280 |
-
var rgb = hsbToRgb(hsb);
|
1281 |
-
$(cal).data('colpick').fields
|
1282 |
-
.eq(1).val(rgb.r).end()
|
1283 |
-
.eq(2).val(rgb.g).end()
|
1284 |
-
.eq(3).val(rgb.b).end();
|
1285 |
-
},
|
1286 |
-
fillHSBFields = function (hsb, cal) {
|
1287 |
-
$(cal).data('colpick').fields
|
1288 |
-
.eq(4).val(Math.round(hsb.h)).end()
|
1289 |
-
.eq(5).val(Math.round(hsb.s)).end()
|
1290 |
-
.eq(6).val(Math.round(hsb.b)).end();
|
1291 |
-
},
|
1292 |
-
fillHexFields = function (hsb, cal) {
|
1293 |
-
$(cal).data('colpick').fields.eq(0).val(hsbToHex(hsb));
|
1294 |
-
},
|
1295 |
-
//Set the round selector position
|
1296 |
-
setSelector = function (hsb, cal) {
|
1297 |
-
$(cal).data('colpick').selector.css('backgroundColor', '#' + hsbToHex({h: hsb.h, s: 100, b: 100}));
|
1298 |
-
$(cal).data('colpick').selectorIndic.css({
|
1299 |
-
left: parseInt($(cal).data('colpick').height * hsb.s / 100, 10),
|
1300 |
-
top: parseInt($(cal).data('colpick').height * (100 - hsb.b) / 100, 10)
|
1301 |
-
});
|
1302 |
-
},
|
1303 |
-
//Set the hue selector position
|
1304 |
-
setHue = function (hsb, cal) {
|
1305 |
-
$(cal).data('colpick').hue.css('top', parseInt($(cal).data('colpick').height - $(cal).data('colpick').height * hsb.h / 360, 10));
|
1306 |
-
},
|
1307 |
-
//Set current and new colors
|
1308 |
-
setCurrentColor = function (hsb, cal) {
|
1309 |
-
$(cal).data('colpick').currentColor.css('backgroundColor', '#' + hsbToHex(hsb));
|
1310 |
-
},
|
1311 |
-
setNewColor = function (hsb, cal) {
|
1312 |
-
$(cal).data('colpick').newColor.css('backgroundColor', '#' + hsbToHex(hsb));
|
1313 |
-
},
|
1314 |
-
//Called when the new color is changed
|
1315 |
-
change = function (ev) {
|
1316 |
-
var cal = $(this).parent().parent(), col;
|
1317 |
-
if (this.parentNode.className.indexOf('_hex') > 0) {
|
1318 |
-
cal.data('colpick').color = col = hexToHsb(fixHex(this.value));
|
1319 |
-
fillRGBFields(col, cal.get(0));
|
1320 |
-
fillHSBFields(col, cal.get(0));
|
1321 |
-
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
1322 |
-
cal.data('colpick').color = col = fixHSB({
|
1323 |
-
h: parseInt(cal.data('colpick').fields.eq(4).val(), 10),
|
1324 |
-
s: parseInt(cal.data('colpick').fields.eq(5).val(), 10),
|
1325 |
-
b: parseInt(cal.data('colpick').fields.eq(6).val(), 10)
|
1326 |
-
});
|
1327 |
-
fillRGBFields(col, cal.get(0));
|
1328 |
-
fillHexFields(col, cal.get(0));
|
1329 |
-
} else {
|
1330 |
-
cal.data('colpick').color = col = rgbToHsb(fixRGB({
|
1331 |
-
r: parseInt(cal.data('colpick').fields.eq(1).val(), 10),
|
1332 |
-
g: parseInt(cal.data('colpick').fields.eq(2).val(), 10),
|
1333 |
-
b: parseInt(cal.data('colpick').fields.eq(3).val(), 10)
|
1334 |
-
}));
|
1335 |
-
fillHexFields(col, cal.get(0));
|
1336 |
-
fillHSBFields(col, cal.get(0));
|
1337 |
-
}
|
1338 |
-
setSelector(col, cal.get(0));
|
1339 |
-
setHue(col, cal.get(0));
|
1340 |
-
setNewColor(col, cal.get(0));
|
1341 |
-
cal.data('colpick').onChange.apply(cal.parent(), [col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el, 0]);
|
1342 |
-
},
|
1343 |
-
//Change style on blur and on focus of inputs
|
1344 |
-
blur = function (ev) {
|
1345 |
-
$(this).parent().removeClass('colpick_focus');
|
1346 |
-
},
|
1347 |
-
focus = function () {
|
1348 |
-
$(this).parent().parent().data('colpick').fields.parent().removeClass('colpick_focus');
|
1349 |
-
$(this).parent().addClass('colpick_focus');
|
1350 |
-
},
|
1351 |
-
//Increment/decrement arrows functions
|
1352 |
-
downIncrement = function (ev) {
|
1353 |
-
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1354 |
-
var field = $(this).parent().find('input').focus();
|
1355 |
-
var current = {
|
1356 |
-
el: $(this).parent().addClass('colpick_slider'),
|
1357 |
-
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
1358 |
-
y: ev.pageY,
|
1359 |
-
field: field,
|
1360 |
-
val: parseInt(field.val(), 10),
|
1361 |
-
preview: $(this).parent().parent().data('colpick').livePreview
|
1362 |
-
};
|
1363 |
-
$(document).mouseup(current, upIncrement);
|
1364 |
-
$(document).mousemove(current, moveIncrement);
|
1365 |
-
},
|
1366 |
-
moveIncrement = function (ev) {
|
1367 |
-
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val - ev.pageY + ev.data.y, 10))));
|
1368 |
-
if (ev.data.preview) {
|
1369 |
-
change.apply(ev.data.field.get(0), [true]);
|
1370 |
-
}
|
1371 |
-
return false;
|
1372 |
-
},
|
1373 |
-
upIncrement = function (ev) {
|
1374 |
-
change.apply(ev.data.field.get(0), [true]);
|
1375 |
-
ev.data.el.removeClass('colpick_slider').find('input').focus();
|
1376 |
-
$(document).off('mouseup', upIncrement);
|
1377 |
-
$(document).off('mousemove', moveIncrement);
|
1378 |
-
return false;
|
1379 |
-
},
|
1380 |
-
//Hue slider functions
|
1381 |
-
downHue = function (ev) {
|
1382 |
-
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1383 |
-
var current = {
|
1384 |
-
cal: $(this).parent(),
|
1385 |
-
y: $(this).offset().top
|
1386 |
-
};
|
1387 |
-
$(document).on('mouseup touchend', current, upHue);
|
1388 |
-
$(document).on('mousemove touchmove', current, moveHue);
|
1389 |
-
|
1390 |
-
var pageY = ((ev.type == 'touchstart') ? ev.originalEvent.changedTouches[0].pageY : ev.pageY);
|
1391 |
-
change.apply(
|
1392 |
-
current.cal.data('colpick')
|
1393 |
-
.fields.eq(4).val(parseInt(360 * (current.cal.data('colpick').height - (pageY - current.y)) / current.cal.data('colpick').height, 10))
|
1394 |
-
.get(0),
|
1395 |
-
[current.cal.data('colpick').livePreview]
|
1396 |
-
);
|
1397 |
-
return false;
|
1398 |
-
},
|
1399 |
-
moveHue = function (ev) {
|
1400 |
-
var pageY = ((ev.type == 'touchmove') ? ev.originalEvent.changedTouches[0].pageY : ev.pageY);
|
1401 |
-
change.apply(
|
1402 |
-
ev.data.cal.data('colpick')
|
1403 |
-
.fields.eq(4).val(parseInt(360 * (ev.data.cal.data('colpick').height - Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageY - ev.data.y)))) / ev.data.cal.data('colpick').height, 10))
|
1404 |
-
.get(0),
|
1405 |
-
[ev.data.preview]
|
1406 |
-
);
|
1407 |
-
return false;
|
1408 |
-
},
|
1409 |
-
upHue = function (ev) {
|
1410 |
-
fillRGBFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1411 |
-
fillHexFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1412 |
-
$(document).off('mouseup touchend', upHue);
|
1413 |
-
$(document).off('mousemove touchmove', moveHue);
|
1414 |
-
return false;
|
1415 |
-
},
|
1416 |
-
//Color selector functions
|
1417 |
-
downSelector = function (ev) {
|
1418 |
-
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1419 |
-
var current = {
|
1420 |
-
cal: $(this).parent(),
|
1421 |
-
pos: $(this).offset()
|
1422 |
-
};
|
1423 |
-
current.preview = current.cal.data('colpick').livePreview;
|
1424 |
-
|
1425 |
-
$(document).on('mouseup touchend', current, upSelector);
|
1426 |
-
$(document).on('mousemove touchmove', current, moveSelector);
|
1427 |
-
|
1428 |
-
var payeX, pageY;
|
1429 |
-
if (ev.type == 'touchstart') {
|
1430 |
-
pageX = ev.originalEvent.changedTouches[0].pageX,
|
1431 |
-
pageY = ev.originalEvent.changedTouches[0].pageY;
|
1432 |
-
} else {
|
1433 |
-
pageX = ev.pageX;
|
1434 |
-
pageY = ev.pageY;
|
1435 |
-
}
|
1436 |
-
|
1437 |
-
change.apply(
|
1438 |
-
current.cal.data('colpick').fields
|
1439 |
-
.eq(6).val(parseInt(100 * (current.cal.data('colpick').height - (pageY - current.pos.top)) / current.cal.data('colpick').height, 10)).end()
|
1440 |
-
.eq(5).val(parseInt(100 * (pageX - current.pos.left) / current.cal.data('colpick').height, 10))
|
1441 |
-
.get(0),
|
1442 |
-
[current.preview]
|
1443 |
-
);
|
1444 |
-
return false;
|
1445 |
-
},
|
1446 |
-
moveSelector = function (ev) {
|
1447 |
-
var payeX, pageY;
|
1448 |
-
if (ev.type == 'touchmove') {
|
1449 |
-
pageX = ev.originalEvent.changedTouches[0].pageX,
|
1450 |
-
pageY = ev.originalEvent.changedTouches[0].pageY;
|
1451 |
-
} else {
|
1452 |
-
pageX = ev.pageX;
|
1453 |
-
pageY = ev.pageY;
|
1454 |
-
}
|
1455 |
-
|
1456 |
-
change.apply(
|
1457 |
-
ev.data.cal.data('colpick').fields
|
1458 |
-
.eq(6).val(parseInt(100 * (ev.data.cal.data('colpick').height - Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageY - ev.data.pos.top)))) / ev.data.cal.data('colpick').height, 10)).end()
|
1459 |
-
.eq(5).val(parseInt(100 * (Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageX - ev.data.pos.left)))) / ev.data.cal.data('colpick').height, 10))
|
1460 |
-
.get(0),
|
1461 |
-
[ev.data.preview]
|
1462 |
-
);
|
1463 |
-
return false;
|
1464 |
-
},
|
1465 |
-
upSelector = function (ev) {
|
1466 |
-
fillRGBFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1467 |
-
fillHexFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1468 |
-
$(document).off('mouseup touchend', upSelector);
|
1469 |
-
$(document).off('mousemove touchmove', moveSelector);
|
1470 |
-
return false;
|
1471 |
-
},
|
1472 |
-
//Submit button
|
1473 |
-
clickSubmit = function (ev) {
|
1474 |
-
var cal = $(this).parent();
|
1475 |
-
var col = cal.data('colpick').color;
|
1476 |
-
cal.data('colpick').origColor = col;
|
1477 |
-
setCurrentColor(col, cal.get(0));
|
1478 |
-
cal.data('colpick').onSubmit(col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el);
|
1479 |
-
},
|
1480 |
-
//Show/hide the color picker
|
1481 |
-
show = function (ev) {
|
1482 |
-
// Prevent the trigger of any direct parent
|
1483 |
-
ev.stopPropagation();
|
1484 |
-
var cal = $('#' + $(this).data('colpickId'));
|
1485 |
-
cal.data('colpick').onBeforeShow.apply(this, [cal.get(0)]);
|
1486 |
-
var pos = $(this).offset();
|
1487 |
-
var top = pos.top + this.offsetHeight;
|
1488 |
-
var left = pos.left;
|
1489 |
-
var viewPort = getViewport();
|
1490 |
-
var calW = cal.width();
|
1491 |
-
if (left + calW > viewPort.l + viewPort.w) {
|
1492 |
-
left -= calW;
|
1493 |
-
}
|
1494 |
-
cal.css({left: left + 'px', top: top + 'px'});
|
1495 |
-
if (cal.data('colpick').onShow.apply(this, [cal.get(0)]) != false) {
|
1496 |
-
cal.show();
|
1497 |
-
}
|
1498 |
-
//Hide when user clicks outside
|
1499 |
-
$('html').mousedown({cal: cal}, hide);
|
1500 |
-
cal.mousedown(function (ev) {
|
1501 |
-
ev.stopPropagation();
|
1502 |
-
})
|
1503 |
-
},
|
1504 |
-
hide = function (ev) {
|
1505 |
-
if (ev.data.cal.data('colpick').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
1506 |
-
ev.data.cal.hide();
|
1507 |
-
}
|
1508 |
-
$('html').off('mousedown', hide);
|
1509 |
-
},
|
1510 |
-
getViewport = function () {
|
1511 |
-
var m = document.compatMode == 'CSS1Compat';
|
1512 |
-
return {
|
1513 |
-
l: window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
1514 |
-
w: window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth)
|
1515 |
-
};
|
1516 |
-
},
|
1517 |
-
//Fix the values if the user enters a negative or high value
|
1518 |
-
fixHSB = function (hsb) {
|
1519 |
-
return {
|
1520 |
-
h: Math.min(360, Math.max(0, hsb.h)),
|
1521 |
-
s: Math.min(100, Math.max(0, hsb.s)),
|
1522 |
-
b: Math.min(100, Math.max(0, hsb.b))
|
1523 |
-
};
|
1524 |
-
},
|
1525 |
-
fixRGB = function (rgb) {
|
1526 |
-
return {
|
1527 |
-
r: Math.min(255, Math.max(0, rgb.r)),
|
1528 |
-
g: Math.min(255, Math.max(0, rgb.g)),
|
1529 |
-
b: Math.min(255, Math.max(0, rgb.b))
|
1530 |
-
};
|
1531 |
-
},
|
1532 |
-
fixHex = function (hex) {
|
1533 |
-
var len = 6 - hex.length;
|
1534 |
-
if (len > 0) {
|
1535 |
-
var o = [];
|
1536 |
-
for (var i = 0; i < len; i++) {
|
1537 |
-
o.push('0');
|
1538 |
-
}
|
1539 |
-
o.push(hex);
|
1540 |
-
hex = o.join('');
|
1541 |
-
}
|
1542 |
-
return hex;
|
1543 |
-
},
|
1544 |
-
restoreOriginal = function () {
|
1545 |
-
var cal = $(this).parent();
|
1546 |
-
var col = cal.data('colpick').origColor;
|
1547 |
-
cal.data('colpick').color = col;
|
1548 |
-
fillRGBFields(col, cal.get(0));
|
1549 |
-
fillHexFields(col, cal.get(0));
|
1550 |
-
fillHSBFields(col, cal.get(0));
|
1551 |
-
setSelector(col, cal.get(0));
|
1552 |
-
setHue(col, cal.get(0));
|
1553 |
-
setNewColor(col, cal.get(0));
|
1554 |
-
};
|
1555 |
-
return {
|
1556 |
-
init: function (opt) {
|
1557 |
-
opt = $.extend({}, defaults, opt || {});
|
1558 |
-
//Set color
|
1559 |
-
if (typeof opt.color == 'string') {
|
1560 |
-
opt.color = hexToHsb(opt.color);
|
1561 |
-
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
1562 |
-
opt.color = rgbToHsb(opt.color);
|
1563 |
-
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
1564 |
-
opt.color = fixHSB(opt.color);
|
1565 |
-
} else {
|
1566 |
-
return this;
|
1567 |
-
}
|
1568 |
-
|
1569 |
-
//For each selected DOM element
|
1570 |
-
return this.each(function () {
|
1571 |
-
//If the element does not have an ID
|
1572 |
-
if (!$(this).data('colpickId')) {
|
1573 |
-
var options = $.extend({}, opt);
|
1574 |
-
options.origColor = opt.color;
|
1575 |
-
//Generate and assign a random ID
|
1576 |
-
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
1577 |
-
$(this).data('colpickId', id);
|
1578 |
-
//Set the tpl's ID and get the HTML
|
1579 |
-
var cal = $(tpl).attr('id', id);
|
1580 |
-
//Add class according to layout
|
1581 |
-
cal.addClass('colpick_' + options.layout + (options.submit ? '' : ' colpick_' + options.layout + '_ns'));
|
1582 |
-
//Add class if the color scheme is not default
|
1583 |
-
if (options.colorScheme != 'light') {
|
1584 |
-
cal.addClass('colpick_' + options.colorScheme);
|
1585 |
-
}
|
1586 |
-
//Setup submit button
|
1587 |
-
cal.find('div.colpick_submit').html(options.submitText).click(clickSubmit);
|
1588 |
-
//Setup input fields
|
1589 |
-
options.fields = cal.find('input').change(change).blur(blur).focus(focus);
|
1590 |
-
cal.find('div.colpick_field_arrs').mousedown(downIncrement).end().find('div.colpick_current_color').click(restoreOriginal);
|
1591 |
-
//Setup hue selector
|
1592 |
-
options.selector = cal.find('div.colpick_color').on('mousedown touchstart', downSelector);
|
1593 |
-
options.selectorIndic = options.selector.find('div.colpick_selector_outer');
|
1594 |
-
//Store parts of the plugin
|
1595 |
-
options.el = this;
|
1596 |
-
options.hue = cal.find('div.colpick_hue_arrs');
|
1597 |
-
huebar = options.hue.parent();
|
1598 |
-
//Paint the hue bar
|
1599 |
-
var UA = navigator.userAgent.toLowerCase();
|
1600 |
-
var isIE = navigator.appName === 'Microsoft Internet Explorer';
|
1601 |
-
var IEver = isIE ? parseFloat(UA.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]) : 0;
|
1602 |
-
var ngIE = (isIE && IEver < 10);
|
1603 |
-
var stops = ['#ff0000', '#ff0080', '#ff00ff', '#8000ff', '#0000ff', '#0080ff', '#00ffff', '#00ff80', '#00ff00', '#80ff00', '#ffff00', '#ff8000', '#ff0000'];
|
1604 |
-
if (ngIE) {
|
1605 |
-
var i, div;
|
1606 |
-
for (i = 0; i <= 11; i++) {
|
1607 |
-
div = $('<div></div>').attr('style', 'height:8.333333%; filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=' + stops[i] + ', endColorstr=' + stops[i + 1] + '); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=' + stops[i] + ', endColorstr=' + stops[i + 1] + ')";');
|
1608 |
-
huebar.append(div);
|
1609 |
-
}
|
1610 |
-
} else {
|
1611 |
-
stopList = stops.join(',');
|
1612 |
-
huebar.attr('style', 'background:-webkit-linear-gradient(top,' + stopList + '); background: -o-linear-gradient(top,' + stopList + '); background: -ms-linear-gradient(top,' + stopList + '); background:-moz-linear-gradient(top,' + stopList + '); -webkit-linear-gradient(top,' + stopList + '); background:linear-gradient(to bottom,' + stopList + '); ');
|
1613 |
-
}
|
1614 |
-
cal.find('div.colpick_hue').on('mousedown touchstart', downHue);
|
1615 |
-
options.newColor = cal.find('div.colpick_new_color');
|
1616 |
-
options.currentColor = cal.find('div.colpick_current_color');
|
1617 |
-
//Store options and fill with default color
|
1618 |
-
cal.data('colpick', options);
|
1619 |
-
fillRGBFields(options.color, cal.get(0));
|
1620 |
-
fillHSBFields(options.color, cal.get(0));
|
1621 |
-
fillHexFields(options.color, cal.get(0));
|
1622 |
-
setHue(options.color, cal.get(0));
|
1623 |
-
setSelector(options.color, cal.get(0));
|
1624 |
-
setCurrentColor(options.color, cal.get(0));
|
1625 |
-
setNewColor(options.color, cal.get(0));
|
1626 |
-
//Append to body if flat=false, else show in place
|
1627 |
-
if (options.flat) {
|
1628 |
-
cal.appendTo(this).show();
|
1629 |
-
cal.css({
|
1630 |
-
position: 'relative',
|
1631 |
-
display: 'block'
|
1632 |
-
});
|
1633 |
-
} else {
|
1634 |
-
cal.appendTo(document.body);
|
1635 |
-
$(this).on(options.showEvent, show);
|
1636 |
-
cal.css({
|
1637 |
-
position: 'absolute'
|
1638 |
-
});
|
1639 |
-
}
|
1640 |
-
}
|
1641 |
-
});
|
1642 |
-
},
|
1643 |
-
//Shows the picker
|
1644 |
-
showPicker: function () {
|
1645 |
-
return this.each(function () {
|
1646 |
-
if ($(this).data('colpickId')) {
|
1647 |
-
show.apply(this);
|
1648 |
-
}
|
1649 |
-
});
|
1650 |
-
},
|
1651 |
-
//Hides the picker
|
1652 |
-
hidePicker: function () {
|
1653 |
-
return this.each(function () {
|
1654 |
-
if ($(this).data('colpickId')) {
|
1655 |
-
$('#' + $(this).data('colpickId')).hide();
|
1656 |
-
}
|
1657 |
-
});
|
1658 |
-
},
|
1659 |
-
//Sets a color as new and current (default)
|
1660 |
-
setColor: function (col, setCurrent) {
|
1661 |
-
setCurrent = (typeof setCurrent === "undefined") ? 1 : setCurrent;
|
1662 |
-
if (typeof col == 'string') {
|
1663 |
-
col = hexToHsb(col);
|
1664 |
-
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
1665 |
-
col = rgbToHsb(col);
|
1666 |
-
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
1667 |
-
col = fixHSB(col);
|
1668 |
-
} else {
|
1669 |
-
return this;
|
1670 |
-
}
|
1671 |
-
return this.each(function () {
|
1672 |
-
if ($(this).data('colpickId')) {
|
1673 |
-
var cal = $('#' + $(this).data('colpickId'));
|
1674 |
-
cal.data('colpick').color = col;
|
1675 |
-
cal.data('colpick').origColor = col;
|
1676 |
-
fillRGBFields(col, cal.get(0));
|
1677 |
-
fillHSBFields(col, cal.get(0));
|
1678 |
-
fillHexFields(col, cal.get(0));
|
1679 |
-
setHue(col, cal.get(0));
|
1680 |
-
setSelector(col, cal.get(0));
|
1681 |
-
|
1682 |
-
setNewColor(col, cal.get(0));
|
1683 |
-
cal.data('colpick').onChange.apply(cal.parent(), [col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el, 1]);
|
1684 |
-
if (setCurrent) {
|
1685 |
-
setCurrentColor(col, cal.get(0));
|
1686 |
-
}
|
1687 |
-
}
|
1688 |
-
});
|
1689 |
-
}
|
1690 |
-
};
|
1691 |
-
}();
|
1692 |
-
//Color space convertions
|
1693 |
-
var hexToRgb = function (hex) {
|
1694 |
-
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
1695 |
-
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
1696 |
-
};
|
1697 |
-
var hexToHsb = function (hex) {
|
1698 |
-
return rgbToHsb(hexToRgb(hex));
|
1699 |
-
};
|
1700 |
-
var rgbToHsb = function (rgb) {
|
1701 |
-
var hsb = {h: 0, s: 0, b: 0};
|
1702 |
-
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
1703 |
-
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
1704 |
-
var delta = max - min;
|
1705 |
-
hsb.b = max;
|
1706 |
-
hsb.s = max != 0 ? 255 * delta / max : 0;
|
1707 |
-
if (hsb.s != 0) {
|
1708 |
-
if (rgb.r == max)
|
1709 |
-
hsb.h = (rgb.g - rgb.b) / delta;
|
1710 |
-
else if (rgb.g == max)
|
1711 |
-
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
1712 |
-
else
|
1713 |
-
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
1714 |
-
} else
|
1715 |
-
hsb.h = -1;
|
1716 |
-
hsb.h *= 60;
|
1717 |
-
if (hsb.h < 0)
|
1718 |
-
hsb.h += 360;
|
1719 |
-
hsb.s *= 100 / 255;
|
1720 |
-
hsb.b *= 100 / 255;
|
1721 |
-
return hsb;
|
1722 |
-
};
|
1723 |
-
var hsbToRgb = function (hsb) {
|
1724 |
-
var rgb = {};
|
1725 |
-
var h = hsb.h;
|
1726 |
-
var s = hsb.s * 255 / 100;
|
1727 |
-
var v = hsb.b * 255 / 100;
|
1728 |
-
if (s == 0) {
|
1729 |
-
rgb.r = rgb.g = rgb.b = v;
|
1730 |
-
} else {
|
1731 |
-
var t1 = v;
|
1732 |
-
var t2 = (255 - s) * v / 255;
|
1733 |
-
var t3 = (t1 - t2) * (h % 60) / 60;
|
1734 |
-
if (h == 360)
|
1735 |
-
h = 0;
|
1736 |
-
if (h < 60) {
|
1737 |
-
rgb.r = t1;
|
1738 |
-
rgb.b = t2;
|
1739 |
-
rgb.g = t2 + t3
|
1740 |
-
} else if (h < 120) {
|
1741 |
-
rgb.g = t1;
|
1742 |
-
rgb.b = t2;
|
1743 |
-
rgb.r = t1 - t3
|
1744 |
-
} else if (h < 180) {
|
1745 |
-
rgb.g = t1;
|
1746 |
-
rgb.r = t2;
|
1747 |
-
rgb.b = t2 + t3
|
1748 |
-
} else if (h < 240) {
|
1749 |
-
rgb.b = t1;
|
1750 |
-
rgb.r = t2;
|
1751 |
-
rgb.g = t1 - t3
|
1752 |
-
} else if (h < 300) {
|
1753 |
-
rgb.b = t1;
|
1754 |
-
rgb.g = t2;
|
1755 |
-
rgb.r = t2 + t3
|
1756 |
-
} else if (h < 360) {
|
1757 |
-
rgb.r = t1;
|
1758 |
-
rgb.g = t2;
|
1759 |
-
rgb.b = t1 - t3
|
1760 |
-
} else {
|
1761 |
-
rgb.r = 0;
|
1762 |
-
rgb.g = 0;
|
1763 |
-
rgb.b = 0
|
1764 |
-
}
|
1765 |
-
}
|
1766 |
-
return {r: Math.round(rgb.r), g: Math.round(rgb.g), b: Math.round(rgb.b)};
|
1767 |
-
};
|
1768 |
-
var rgbToHex = function (rgb) {
|
1769 |
-
var hex = [
|
1770 |
-
rgb.r.toString(16),
|
1771 |
-
rgb.g.toString(16),
|
1772 |
-
rgb.b.toString(16)
|
1773 |
-
];
|
1774 |
-
$.each(hex, function (nr, val) {
|
1775 |
-
if (val.length == 1) {
|
1776 |
-
hex[nr] = '0' + val;
|
1777 |
-
}
|
1778 |
-
});
|
1779 |
-
return hex.join('');
|
1780 |
-
};
|
1781 |
-
var hsbToHex = function (hsb) {
|
1782 |
-
return rgbToHex(hsbToRgb(hsb));
|
1783 |
-
};
|
1784 |
-
$.fn.extend({
|
1785 |
-
colpick: colpick.init,
|
1786 |
-
colpickHide: colpick.hidePicker,
|
1787 |
-
colpickShow: colpick.showPicker,
|
1788 |
-
colpickSetColor: colpick.setColor
|
1789 |
-
});
|
1790 |
-
$.extend({
|
1791 |
-
colpick: {
|
1792 |
-
rgbToHex: rgbToHex,
|
1793 |
-
rgbToHsb: rgbToHsb,
|
1794 |
-
hsbToHex: hsbToHex,
|
1795 |
-
hsbToRgb: hsbToRgb,
|
1796 |
-
hexToHsb: hexToHsb,
|
1797 |
-
hexToRgb: hexToRgb
|
1798 |
-
}
|
1799 |
-
});
|
1800 |
Â
})(jQuery);
|
1 |
+
var strict;
|
2 |
+
|
3 |
+
|
4 |
+
jQuery(document).ready(function ($) {
|
5 |
+
|
6 |
+
// show / hide helper description
|
7 |
+
$('.quads-tooltip').click(function (e) {
|
8 |
+
e.preventDefault();
|
9 |
+
var icon = $(this),
|
10 |
+
bubble = $(this).next();
|
11 |
+
|
12 |
+
// Close any that are already open
|
13 |
+
$('.quads-tooltip-message').not(bubble).hide();
|
14 |
+
|
15 |
+
var position = icon.position();
|
16 |
+
if (bubble.hasClass('bottom')) {
|
17 |
+
bubble.css({
|
18 |
+
'left': (position.left - bubble.width() / 2) + 'px',
|
19 |
+
'top': (position.top + icon.height() + 9) + 'px'
|
20 |
+
});
|
21 |
+
} else {
|
22 |
+
bubble.css({
|
23 |
+
'left': (position.left + icon.width() + 9) + 'px',
|
24 |
+
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
25 |
+
});
|
26 |
+
}
|
27 |
+
|
28 |
+
bubble.toggle();
|
29 |
+
e.stopPropagation();
|
30 |
+
});
|
31 |
+
|
32 |
+
$('body').click(function () {
|
33 |
+
$('.quads-tooltip-message').hide();
|
34 |
+
});
|
35 |
+
|
36 |
+
$('.quads-tooltip-message').click(function (e) {
|
37 |
+
e.stopPropagation();
|
38 |
+
});
|
39 |
+
|
40 |
+
|
41 |
+
// vi login process
|
42 |
+
$("#quads_vi_login_submit").click(function(e){
|
43 |
+
e.preventDefault();
|
44 |
+
username = $("#quads-vi-email").val();
|
45 |
+
password = $("#quads-vi-password").val();
|
46 |
+
|
47 |
+
var data = '{"email":"' + username + '", "password":"' + password + '"}';
|
48 |
+
|
49 |
+
$.ajax({
|
50 |
+
type: "POST",
|
51 |
+
//url: "https://dashboard-api-test.vidint.net/v1/api/authenticate",
|
52 |
+
url: quads.vi_login_url,
|
53 |
+
contentType: 'application/json',
|
54 |
+
data: data,
|
55 |
+
statusCode: {
|
56 |
+
502: function () {
|
57 |
+
$("#quads_add_err").html("502 Bad Gateway. Contact support[at]vi.ai");
|
58 |
+
console.log('502 Bad Gateway.');
|
59 |
+
return false;
|
60 |
+
},
|
61 |
+
500: function () {
|
62 |
+
$("#quads_add_err").html("500 Bad Gateway. Contact support[at]vi.ai");
|
63 |
+
console.log('500 Bad Gateway.');
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
},
|
67 |
+
success: function(response){
|
68 |
+
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
69 |
+
$("#quads_add_err").hide();
|
70 |
+
if (typeof response.data !== 'undefined') {
|
71 |
+
$("#quads_add_err").html("We are logging you in");
|
72 |
+
console.log('We are logging you in' + response);
|
73 |
+
saveViToken(response.data);
|
74 |
+
}
|
75 |
+
else {
|
76 |
+
$("#quads_add_err").html("No valid API response. Can not log you in. Contact support[at]vi.ai");
|
77 |
+
console.log('no valid api response' + response);
|
78 |
+
}
|
79 |
+
},
|
80 |
+
error: function(response){
|
81 |
+
// check if xhr.status is defined in $.ajax.statusCode
|
82 |
+
// if true, return false to stop this function
|
83 |
+
if (typeof this.statusCode[response.status] != 'undefined') {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
var result = typeof response.responseText !== 'undefined' ? JSON.parse(response.responseText) : '';
|
88 |
+
$("#quads_add_err").html(result.error.message + ' ' + result.error.description);
|
89 |
+
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
90 |
+
$("#quads_add_err").show();
|
91 |
+
$("#quads_add_err").removeClass('quads-spinner');
|
92 |
+
console.log(result);
|
93 |
+
//exit;
|
94 |
+
},
|
95 |
+
beforeSend:function()
|
96 |
+
{
|
97 |
+
$("#quads_vi_loading").css('display', 'inline', 'important').css('visibility', 'visible');
|
98 |
+
$("#quads_add_err").show();
|
99 |
+
},
|
100 |
+
|
101 |
+
complete:function()
|
102 |
+
{
|
103 |
+
$("#quads_vi_loading").css('display', 'none', 'important').css('visibility', 'hidden');
|
104 |
+
}
|
105 |
+
|
106 |
+
});
|
107 |
+
return false;
|
108 |
+
});
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Save vi token
|
112 |
+
*/
|
113 |
+
function saveViToken(token){
|
114 |
+
var data = {
|
115 |
+
'action': 'quads_save_vi_token',
|
116 |
+
'token': token
|
117 |
+
};
|
118 |
+
$.ajax({
|
119 |
+
type: "POST",
|
120 |
+
url: ajaxurl,
|
121 |
+
dataType: "json",
|
122 |
+
data: data,
|
123 |
+
//contentType: 'application/json;charset=utf-8',
|
124 |
+
success: function(response){
|
125 |
+
//response = JSON.stringify(response);
|
126 |
+
console.log(response.status);
|
127 |
+
|
128 |
+
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
129 |
+
$("#quads_add_err").hide();
|
130 |
+
if (typeof response.status != 'undefined' && response.status == 'success') {
|
131 |
+
console.log('Success, login succesfull, token stored' + response);
|
132 |
+
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
133 |
+
return false;
|
134 |
+
}
|
135 |
+
else {
|
136 |
+
console.log("Can not store token");
|
137 |
+
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
},
|
141 |
+
beforeSend:function()
|
142 |
+
{
|
143 |
+
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
144 |
+
$("#quads_add_err").show();
|
145 |
+
},
|
146 |
+
complete:function()
|
147 |
+
{
|
148 |
+
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
149 |
+
$("#quads_add_err").hide();
|
150 |
+
}
|
151 |
+
|
152 |
+
});
|
153 |
+
}
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
// Remove several unused elements from vi page
|
159 |
+
if (document.location.href.indexOf('vi_header') > - 1) {
|
160 |
+
$('#quads-submit-button').hide();
|
161 |
+
$('#quads-validate').hide();
|
162 |
+
$('#quads-footer').hide();
|
163 |
+
} else {
|
164 |
+
$('#quads-submit-button').show();
|
165 |
+
$('#quads-validate').show();
|
166 |
+
$('#quads-footer').show();
|
167 |
+
}
|
168 |
+
$(window).bind('easytabs:after', function(){
|
169 |
+
if (document.location.href.indexOf('vi_header') > - 1) {
|
170 |
+
$('#quads-submit-button').hide();
|
171 |
+
$('#quads-validate').hide();
|
172 |
+
$('#quads-footer').hide();
|
173 |
+
} else {
|
174 |
+
|
175 |
+
$('#quads-submit-button').show();
|
176 |
+
$('#quads-validate').show();
|
177 |
+
$('#quads-footer').show();
|
178 |
+
}
|
179 |
+
});
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
// VI signup form
|
186 |
+
$('#quads-vi-signup').click(function(e){
|
187 |
+
e.preventDefault();
|
188 |
+
// scroll to top
|
189 |
+
$(window).scrollTop(0);
|
190 |
+
// hide save button
|
191 |
+
$('#quads-submit-button').hide();
|
192 |
+
$('#quads-vi-signup-fullscreen').fadeIn();
|
193 |
+
});
|
194 |
+
$('#quads-vi-close').click(function(e){
|
195 |
+
e.preventDefault();
|
196 |
+
$('#quads-vi-signup-fullscreen').fadeOut();
|
197 |
+
});
|
198 |
+
|
199 |
+
/**
|
200 |
+
* General Tab
|
201 |
+
*/
|
202 |
+
// Inactive select fields are greyed out
|
203 |
+
$('.quads-assign').each(function(e){
|
204 |
+
if (!$(this).prop('checked')){
|
205 |
+
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
206 |
+
}else {
|
207 |
+
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
208 |
+
}
|
209 |
+
});
|
210 |
+
|
211 |
+
$('.quads-assign').click(function(){
|
212 |
+
if (!$(this).prop('checked')){
|
213 |
+
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
214 |
+
} else {
|
215 |
+
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
216 |
+
}
|
217 |
+
});
|
218 |
+
|
219 |
+
/**
|
220 |
+
* AdSense Code Tab
|
221 |
+
*/
|
222 |
+
// Check if submit button is visible than stick it to the bottom of the page
|
223 |
+
$(window).scroll(function() {
|
224 |
+
|
225 |
+
var elem = '#quads_tab_container .submit';
|
226 |
+
|
227 |
+
if ($(elem).length < 1){
|
228 |
+
return;
|
229 |
+
}
|
230 |
+
|
231 |
+
var top_of_element = $(elem).offset().top;
|
232 |
+
var bottom_of_element = $(elem).offset().top + $(elem).outerHeight(false);
|
233 |
+
var bottom_of_screen = $(window).scrollTop() + $(window).height();
|
234 |
+
if (bottom_of_screen > top_of_element){
|
235 |
+
// The element is visible, do something
|
236 |
+
$('#quads-submit-button').css('position', 'relative').css('bottom', '20px');
|
237 |
+
} else {
|
238 |
+
// The element is NOT visible, do something else
|
239 |
+
$('#quads-submit-button').css('position', 'fixed').css('bottom', '20px');
|
240 |
+
}
|
241 |
+
});
|
242 |
+
|
243 |
+
// Activate chosen select boxes
|
244 |
+
// $(".quads-chosen-select").chosen({
|
245 |
+
// inherit_select_classes: true
|
246 |
+
// });
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
// Hid or show AMP code form on click on amp checkbox
|
251 |
+
$('.quads-activate-amp').click(function(){
|
252 |
+
var parent = $(this).parents('.quads-ad-toggle-container').attr('id');
|
253 |
+
if ($(this).attr('checked') === 'checked') {
|
254 |
+
$('#' + parent).find('.quads-amp-code').show();
|
255 |
+
} else {
|
256 |
+
$('#' + parent).find('.quads-amp-code').hide();
|
257 |
+
}
|
258 |
+
});
|
259 |
+
|
260 |
+
|
261 |
+
// Hide or show AMP code form on loading
|
262 |
+
$('.quads-ad-toggle-container').find('.quads-activate-amp').each(function (index, value) {
|
263 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
264 |
+
if ($(this).attr( 'checked') === 'checked' ) {
|
265 |
+
$('#' + parentContainerID).find('.quads-amp-code').show();
|
266 |
+
}else {
|
267 |
+
$('#' + parentContainerID).find('.quads-amp-code').hide();
|
268 |
+
}
|
269 |
+
});
|
270 |
+
|
271 |
+
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Toggle Button | Open All Ads
|
275 |
+
*/
|
276 |
+
$('#quads-open-toggle').click(function(){
|
277 |
+
if ($('#quads-open-toggle').text() === 'Open All Ads' ){
|
278 |
+
$('.quads-ad-toggle-container').show();
|
279 |
+
$('#quads-open-toggle').html('Close Ads');
|
280 |
+
}else{
|
281 |
+
$('.quads-ad-toggle-container').hide();
|
282 |
+
$('#quads-open-toggle').html('Open All Ads');
|
283 |
+
}
|
284 |
+
});
|
285 |
+
|
286 |
+
// show / hide helper description
|
287 |
+
$('.quads-helper').click(function (e) {
|
288 |
+
e.preventDefault();
|
289 |
+
var icon = $(this),
|
290 |
+
bubble = $(this).next();
|
291 |
+
|
292 |
+
// Close any that are already open
|
293 |
+
$('.quads-message').not(bubble).hide();
|
294 |
+
|
295 |
+
var position = icon.position();
|
296 |
+
if (bubble.hasClass('bottom')) {
|
297 |
+
bubble.css({
|
298 |
+
'left': (position.left - bubble.width() / 2) + 'px',
|
299 |
+
'top': (position.top + icon.height() + 9) + 'px'
|
300 |
+
});
|
301 |
+
} else {
|
302 |
+
bubble.css({
|
303 |
+
'left': (position.left + icon.width() + 9) + 'px',
|
304 |
+
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
305 |
+
});
|
306 |
+
}
|
307 |
+
|
308 |
+
bubble.toggle();
|
309 |
+
e.stopPropagation();
|
310 |
+
});
|
311 |
+
$('.quads-general-helper').click(function (e) {
|
312 |
+
e.preventDefault();
|
313 |
+
var icon = $(this),
|
314 |
+
bubble = $(this).next();
|
315 |
+
|
316 |
+
// Close any that are already open
|
317 |
+
$('.quads-message').not(bubble).hide();
|
318 |
+
|
319 |
+
var position = icon.position();
|
320 |
+
if (bubble.hasClass('bottom')) {
|
321 |
+
bubble.css({
|
322 |
+
'left': (position.left - bubble.width() / 2) + 'px',
|
323 |
+
'top': (position.top + icon.height() + 9) + 'px'
|
324 |
+
});
|
325 |
+
} else {
|
326 |
+
bubble.css({
|
327 |
+
'left': (position.left + icon.width() + 9) + 'px',
|
328 |
+
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
329 |
+
});
|
330 |
+
}
|
331 |
+
|
332 |
+
bubble.toggle();
|
333 |
+
e.stopPropagation();
|
334 |
+
});
|
335 |
+
|
336 |
+
$('body').click(function () {
|
337 |
+
$('.quads-message').hide();
|
338 |
+
});
|
339 |
+
|
340 |
+
$('.quads-message').click(function (e) {
|
341 |
+
e.stopPropagation();
|
342 |
+
});
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Save settings via ajax
|
346 |
+
*/
|
347 |
+
|
348 |
+
jQuery('#quads_settings').submit(function() {
|
349 |
+
|
350 |
+
// Check if ad name has been changed and prepare new data for saving
|
351 |
+
$('.quads-toogle-title').each(function(){
|
352 |
+
$(this).children('input').val($(this).text());
|
353 |
+
});
|
354 |
+
|
355 |
+
|
356 |
+
// Check current url / settings page
|
357 |
+
var url = window.location.search;
|
358 |
+
var tab_imexport = url.search("page=quads-settings&tab=imexport");
|
359 |
+
var tab_licenses = url.search("page=quads-settings&tab=licenses");
|
360 |
+
|
361 |
+
jQuery('#quads-save-result').html("<div id='quads-loader' class='quads-loader'></div>");
|
362 |
+
jQuery('#quads-loader').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/loader1.gif"></p>').show();
|
363 |
+
jQuery(this).ajaxSubmit({
|
364 |
+
|
365 |
+
success: function(){
|
366 |
+
jQuery('#quads-save-result').html("<div id='quads-save-message' class='quads-success-modal'></div>");
|
367 |
+
jQuery('#quads-save-message').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/saved.gif"></p>').show();
|
368 |
+
quads_hide_success_message();
|
369 |
+
},
|
370 |
+
//,timeout: 0,
|
371 |
+
|
372 |
+
error: function(){
|
373 |
+
//Do not show alert on import/export tab
|
374 |
+
if ( tab_imexport === -1 && tab_licenses === -1 ){
|
375 |
+
alert ('Error: Can not save settings. Try again');
|
376 |
+
}
|
377 |
+
jQuery('#quads-save-result').hide('fast');
|
378 |
+
}
|
379 |
+
});
|
380 |
+
// Do not use ajax saving on import/export and licenses tab
|
381 |
+
if ( tab_imexport === -1 && tab_licenses ===-1 ){
|
382 |
+
return false;
|
383 |
+
}
|
384 |
+
});
|
385 |
+
|
386 |
+
function quads_hide_success_message(){
|
387 |
+
setTimeout("jQuery('#quads-save-message').hide()", 1000);
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Paste AdSense Code form
|
393 |
+
*/
|
394 |
+
$(document).on('click', '#quads-paste-button', function () {
|
395 |
+
|
396 |
+
var content = $('#quads-adsense-form').val();
|
397 |
+
var parseResult = quadsParseAdSenseCode(content);
|
398 |
+
if (false !== parseResult) {
|
399 |
+
console.log(parseResult);
|
400 |
+
setDetailsFromAdCode(parseResult);
|
401 |
+
}else{
|
402 |
+
$('#quads-msg').html('Can not parse AdSense Code. Is the code valid?');
|
403 |
+
$('#quads-msg').show();
|
404 |
+
}
|
405 |
+
});
|
406 |
+
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Populate AdSense Date Fields
|
410 |
+
*
|
411 |
+
* @param object adsense
|
412 |
+
* @param2 string id of the parent container
|
413 |
+
* @returns false
|
414 |
+
*/
|
415 |
+
function setDetailsFromAdCode(GoogleAd) {
|
416 |
+
|
417 |
+
var containerID = $('#quads-adsense-id').val();
|
418 |
+
|
419 |
+
var id = containerID.replace("quads-toggle", "");
|
420 |
+
|
421 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_slot\\]').val(GoogleAd.slotId);
|
422 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_client\\]').val(GoogleAd.pubId);
|
423 |
+
if ('normal' == GoogleAd.type) {
|
424 |
+
console.log($('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]'));
|
425 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('normal');
|
426 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val(GoogleAd.width);
|
427 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val(GoogleAd.height);
|
428 |
+
}
|
429 |
+
if ('responsive' == GoogleAd.type) {
|
430 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('responsive');
|
431 |
+
//$('#ad-resize-type').val('auto');
|
432 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val('');
|
433 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val('');
|
434 |
+
}
|
435 |
+
// Trigger the ad type select
|
436 |
+
$('.quads-select-Type').trigger('change');
|
437 |
+
// Hide the overlay
|
438 |
+
$('#quads-adsense-bg-div').hide();
|
439 |
+
// Ad code input form must not be empty!
|
440 |
+
if ($('#' + containerID).children('textarea').val().length === 0){
|
441 |
+
$('#' + containerID).children('textarea').val('adsense');
|
442 |
+
}
|
443 |
+
|
444 |
+
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Parse the adsense ad content
|
449 |
+
* @param {type} content
|
450 |
+
* @returns {quads-admin.min_L3.parseAdContent.GoogleAd|Boolean}
|
451 |
+
*/
|
452 |
+
function quadsParseAdSenseCode(content) {
|
453 |
+
|
454 |
+
var rawContent = ('undefined' != typeof (content)) ? content.trim() : '';
|
455 |
+
var GoogleAd = {};
|
456 |
+
var theContent = $('<div />').html(rawContent);
|
457 |
+
var asyncGoogleAd = theContent.find('ins');
|
458 |
+
//var syncGoogleAd = theContent.search('google_ad_client');
|
459 |
+
|
460 |
+
// Its a async adsense ad
|
461 |
+
if (asyncGoogleAd.length > 0) {
|
462 |
+
console.log('async ad');
|
463 |
+
|
464 |
+
// Ad Slot ID
|
465 |
+
GoogleAd.slotId = asyncGoogleAd.attr('data-ad-slot');
|
466 |
+
|
467 |
+
if ('undefined' != typeof (asyncGoogleAd.attr('data-ad-client'))) {
|
468 |
+
// Ad Publisher ID
|
469 |
+
GoogleAd.pubId = asyncGoogleAd.attr('data-ad-client').substr(3);
|
470 |
+
}
|
471 |
+
|
472 |
+
if (undefined !== GoogleAd.slotId && '' != GoogleAd.pubId) {
|
473 |
+
GoogleAd.display = asyncGoogleAd.css('display');
|
474 |
+
GoogleAd.format = asyncGoogleAd.attr('data-ad-format');
|
475 |
+
GoogleAd.style = asyncGoogleAd.attr('style');
|
476 |
+
|
477 |
+
if ('undefined' == typeof (GoogleAd.format) && -1 != GoogleAd.style.indexOf('width')) {
|
478 |
+
/* normal ad */
|
479 |
+
GoogleAd.type = 'normal';
|
480 |
+
GoogleAd.width = asyncGoogleAd.css('width').replace('px', '');
|
481 |
+
GoogleAd.height = asyncGoogleAd.css('height').replace('px', '');
|
482 |
+
return GoogleAd;
|
483 |
+
}
|
484 |
+
|
485 |
+
if ('undefined' != typeof (GoogleAd.format) && 'auto' == GoogleAd.format) {
|
486 |
+
/* Responsive ad, auto resize */
|
487 |
+
GoogleAd.type = 'responsive';
|
488 |
+
return GoogleAd;
|
489 |
+
}
|
490 |
+
return GoogleAd;
|
491 |
+
}
|
492 |
+
|
493 |
+
return false;
|
494 |
+
}
|
495 |
+
|
496 |
+
// Google syncronous ad
|
497 |
+
if (rawContent.search('google_ad_client') > 0) {
|
498 |
+
console.log('syncronous code');
|
499 |
+
|
500 |
+
// Ad Slot ID
|
501 |
+
GoogleAd.slotId = get_google_ad_slot(content);
|
502 |
+
|
503 |
+
console.log(get_google_ad_slot(content));
|
504 |
+
console.log(get_google_ad_client(content));
|
505 |
+
console.log(get_google_ad_height(content));
|
506 |
+
console.log(get_google_ad_width(content));
|
507 |
+
|
508 |
+
if (!quadsIsEmpty(get_google_ad_client(content))) {
|
509 |
+
// Ad Publisher ID
|
510 |
+
GoogleAd.pubId = 'ca-pub-' + get_google_ad_client(content);
|
511 |
+
}else{
|
512 |
+
return false;
|
513 |
+
}
|
514 |
+
|
515 |
+
if (!quadsIsEmpty(GoogleAd.slotId) && !quadsIsEmpty(GoogleAd.pubId)) {
|
516 |
+
|
517 |
+
if (!quadsIsEmpty(get_google_ad_width(content))) {
|
518 |
+
GoogleAd.type = 'normal';
|
519 |
+
GoogleAd.width = get_google_ad_width(content);
|
520 |
+
GoogleAd.height = get_google_ad_height(content);
|
521 |
+
return GoogleAd;
|
522 |
+
}
|
523 |
+
}
|
524 |
+
return false;
|
525 |
+
}
|
526 |
+
|
527 |
+
return false;
|
528 |
+
}
|
529 |
+
|
530 |
+
function get_google_ad_slot(content) {
|
531 |
+
const regex = /google_ad_slot\s*=\s*"(\d*)";/g;
|
532 |
+
const str = content;
|
533 |
+
var m;
|
534 |
+
var result = {};
|
535 |
+
|
536 |
+
while ((m = regex.exec(str)) !== null) {
|
537 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
538 |
+
if (m.index === regex.lastIndex) {
|
539 |
+
regex.lastIndex++;
|
540 |
+
}
|
541 |
+
|
542 |
+
// The result can be accessed through the `m`-variable.
|
543 |
+
m.forEach(function(match, index){
|
544 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
545 |
+
console.log(match);
|
546 |
+
result = match;
|
547 |
+
});
|
548 |
+
}
|
549 |
+
return result;
|
550 |
+
}
|
551 |
+
function get_google_ad_client(content) {
|
552 |
+
const regex = /google_ad_client\s*=\s*"ca-pub-(\d*)";/g;
|
553 |
+
const str = content;
|
554 |
+
var m;
|
555 |
+
var result = {};
|
556 |
+
|
557 |
+
while ((m = regex.exec(str)) !== null) {
|
558 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
559 |
+
if (m.index === regex.lastIndex) {
|
560 |
+
regex.lastIndex++;
|
561 |
+
}
|
562 |
+
|
563 |
+
// The result can be accessed through the `m`-variable.
|
564 |
+
m.forEach(function(match, index){
|
565 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
566 |
+
console.log(match);
|
567 |
+
result = match;
|
568 |
+
});
|
569 |
+
}
|
570 |
+
return result;
|
571 |
+
}
|
572 |
+
function get_google_ad_width(content) {
|
573 |
+
const regex = /google_ad_width\s*=\s*(\d*);/g;
|
574 |
+
const str = content;
|
575 |
+
var m;
|
576 |
+
var result = {};
|
577 |
+
|
578 |
+
while ((m = regex.exec(str)) !== null) {
|
579 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
580 |
+
if (m.index === regex.lastIndex) {
|
581 |
+
regex.lastIndex++;
|
582 |
+
}
|
583 |
+
|
584 |
+
// The result can be accessed through the `m`-variable.
|
585 |
+
m.forEach(function(match, index){
|
586 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
587 |
+
console.log(match);
|
588 |
+
result = match;
|
589 |
+
});
|
590 |
+
}
|
591 |
+
return result;
|
592 |
+
}
|
593 |
+
function get_google_ad_height(content) {
|
594 |
+
const regex = /google_ad_height\s*=\s*(\d*);/g;
|
595 |
+
const str = content;
|
596 |
+
var m;
|
597 |
+
var result = {};
|
598 |
+
|
599 |
+
while ((m = regex.exec(str)) !== null) {
|
600 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
601 |
+
if (m.index === regex.lastIndex) {
|
602 |
+
regex.lastIndex++;
|
603 |
+
}
|
604 |
+
|
605 |
+
// The result can be accessed through the `m`-variable.
|
606 |
+
m.forEach(function(match, index){
|
607 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
608 |
+
console.log(match);
|
609 |
+
result = match;
|
610 |
+
});
|
611 |
+
}
|
612 |
+
return result;
|
613 |
+
}
|
614 |
+
|
615 |
+
/**
|
616 |
+
* Check if return value is empty or not
|
617 |
+
* @param {type} str
|
618 |
+
* @returns {Boolean}
|
619 |
+
*/
|
620 |
+
function quadsIsEmpty(str) {
|
621 |
+
return (!str || 0 === str.length);
|
622 |
+
}
|
623 |
+
|
624 |
+
// AdSense Code Input Form
|
625 |
+
$(document).on('click', '.quads-add-adsense', function (e) {
|
626 |
+
e.preventDefault();
|
627 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
628 |
+
// Empty the ad plain text form
|
629 |
+
$('#quads-adsense-form').val('');
|
630 |
+
$('#quads-adsense-id').val(parentContainerID);
|
631 |
+
$('#quads-adsense-bg-div').show();
|
632 |
+
});
|
633 |
+
$(document).on('click', '#quads-close-button', function (e) {
|
634 |
+
e.preventDefault();
|
635 |
+
$('#quads-adsense-bg-div').hide();
|
636 |
+
});
|
637 |
+
|
638 |
+
|
639 |
+
// Toggle between AdSense or Plain Text option
|
640 |
+
$(document).on('click', '.quads_adsense_type', function () {
|
641 |
+
|
642 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
643 |
+
|
644 |
+
if ($(this).val() === 'adsense') {
|
645 |
+
$('#' + parentContainerID).children('textarea').hide();
|
646 |
+
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
647 |
+
$('#' + parentContainerID).find('.quads-sizes').show();
|
648 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
649 |
+
|
650 |
+
}
|
651 |
+
if ($(this).val() === 'plain_text') {
|
652 |
+
$('#' + parentContainerID).children('textarea').show();
|
653 |
+
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
654 |
+
$('#' + parentContainerID).find('.quads-sizes').hide();
|
655 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
656 |
+
}
|
657 |
+
});
|
658 |
+
|
659 |
+
|
660 |
+
// Hide or show AdSense elements on loading
|
661 |
+
$('.quads-ad-toggle-container').find('.quads_adsense_type').each(function (index, value) {
|
662 |
+
|
663 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
664 |
+
|
665 |
+
if ($(this).attr('checked') === 'checked' && $(this).val() === 'adsense') {
|
666 |
+
$('#' + parentContainerID).children('textarea').fadeOut();
|
667 |
+
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
668 |
+
}
|
669 |
+
if ($(this).attr('checked') === 'checked' && $(this).val() === 'plain_text') {
|
670 |
+
$('#' + parentContainerID).children('textarea').fadeIn();
|
671 |
+
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
672 |
+
}
|
673 |
+
});
|
674 |
+
|
675 |
+
|
676 |
+
// Hide or show AdSense width and height on loading
|
677 |
+
$('.quads-ad-toggle-container').find('.quads-select-Type').each(function (index, value) {
|
678 |
+
|
679 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
680 |
+
|
681 |
+
if ($(this).val() === 'responsive') {
|
682 |
+
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
683 |
+
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
684 |
+
$('#' + parentContainerID).find('.quads-sizes').show();
|
685 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
686 |
+
}
|
687 |
+
if ($(this).val() === 'normal') {
|
688 |
+
$('#' + parentContainerID).find('.quads-type-normal').show();
|
689 |
+
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
690 |
+
$('#' + parentContainerID).find('.quads-sizes').hide();
|
691 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
692 |
+
}
|
693 |
+
});
|
694 |
+
|
695 |
+
|
696 |
+
// Toggle between Fixed Size or Responsive ad type
|
697 |
+
$(document).on('change', '.quads-select-Type', function () {
|
698 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
699 |
+
|
700 |
+
if ($(this).val() === 'responsive') {
|
701 |
+
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
702 |
+
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
703 |
+
$('#' + parentContainerID).find('.quads-sizes').show();
|
704 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
705 |
+
}
|
706 |
+
if ($(this).val() === 'normal') {
|
707 |
+
$('#' + parentContainerID).find('.quads-type-normal').show();
|
708 |
+
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
709 |
+
$('#' + parentContainerID).find('.quads-sizes').hide();
|
710 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
711 |
+
}
|
712 |
+
});
|
713 |
+
|
714 |
+
//*[@id="quads-togglead1"]/div[2]
|
715 |
+
/**
|
716 |
+
* Toggle the adsense container
|
717 |
+
*/
|
718 |
+
//$('.quads-ad-toggle-header').click(function (e) {
|
719 |
+
$('.quads-form-table').on('click', '.quads-ad-toggle-header', function(e) {
|
720 |
+
e.preventDefault();
|
721 |
+
|
722 |
+
var container = $('#' + $(this).data('box-id'));
|
723 |
+
//console.log(container);
|
724 |
+
container.toggle(0, function () {
|
725 |
+
if (container.parents('.quads-ad-toggle-header').hasClass('quads-box-close')) {
|
726 |
+
// open the box
|
727 |
+
container.parents('.quads-ad-toggle-header').removeClass('quads-box-close');
|
728 |
+
} else {
|
729 |
+
container.parents('.quads-ad-toggle-header').addClass('quads-box-close');
|
730 |
+
}
|
731 |
+
});
|
732 |
+
});
|
733 |
+
|
734 |
+
/*
|
735 |
+
* Quick Adsense import process
|
736 |
+
*/
|
737 |
+
|
738 |
+
jQuery('.quads-import-settings').click(function (e) {
|
739 |
+
e.preventDefault();
|
740 |
+
|
741 |
+
if (!confirm('Importing settings from Quick AdSense will overwrite all your current settings. Are you sure?'))
|
742 |
+
return;
|
743 |
+
|
744 |
+
jQuery('#quads-import-settings').addClass('loading');
|
745 |
+
var data = {
|
746 |
+
action: 'quads_import_quick_adsense',
|
747 |
+
nonce: quads.nonce,
|
748 |
+
};
|
749 |
+
$.post(ajaxurl, data, function (resp, status, xhr) {
|
750 |
+
|
751 |
+
//console.log('success:' + resp + status + xhr);
|
752 |
+
quads_show_message(resp);
|
753 |
+
|
754 |
+
}).fail(function (xhr) { // Will be executed when $.post() fails
|
755 |
+
quads_show_message('Ajax Error: ' + xhr.status + ' ' + xhr.statusText);
|
756 |
+
//console.log('error: ' + xhr.statusText);
|
757 |
+
});
|
758 |
+
});
|
759 |
+
|
760 |
+
jQuery('#quads_insert_ads_action').click(function (e) {
|
761 |
+
e.preventDefault();
|
762 |
+
jQuery('#quads_insert_ads_box').toggle();
|
763 |
+
});
|
764 |
+
|
765 |
+
jQuery('#quads_disable_ads_action').click(function (e) {
|
766 |
+
e.preventDefault();
|
767 |
+
jQuery('#quads_disable_ads_box').toggle();
|
768 |
+
});
|
769 |
+
|
770 |
+
|
771 |
+
/**
|
772 |
+
* Show error message and die()
|
773 |
+
* Writes error message into log file
|
774 |
+
*
|
775 |
+
* @param {string} $error notice
|
776 |
+
* @returns void
|
777 |
+
*/
|
778 |
+
function quads_show_message(error) {
|
779 |
+
$('#quads-error-details').show();
|
780 |
+
$('#quads-error-details').html(error);
|
781 |
+
console.log(error);
|
782 |
+
}
|
783 |
+
|
784 |
+
|
785 |
+
/**
|
786 |
+
* Start easytabs()
|
787 |
+
*/
|
788 |
+
if ($(".quads-tabs").length) {
|
789 |
+
$('#quads_tab_container').easytabs({
|
790 |
+
animate: true,
|
791 |
+
updateHash: true,
|
792 |
+
animationSpeed: 'fast'
|
793 |
+
});
|
794 |
+
}
|
795 |
+
|
796 |
+
|
797 |
+
|
798 |
+
|
799 |
+
}); // document ready
|
800 |
+
|
801 |
+
/*
|
802 |
+
* jQuery hashchange event - v1.3 - 7/21/2010
|
803 |
+
* http://benalman.com/projects/jquery-hashchange-plugin/
|
804 |
+
*
|
805 |
+
* Copyright (c) 2010 "Cowboy" Ben Alman
|
806 |
+
* Dual licensed under the MIT and GPL licenses.
|
807 |
+
* http://benalman.com/about/license/
|
808 |
+
*/
|
809 |
+
(function ($, e, b) {
|
810 |
+
var c = "hashchange", h = document, f, g = $.event.special, i = h.documentMode, d = "on" + c in e && (i === b || i > 7);
|
811 |
+
function a(j) {
|
812 |
+
j = j || location.href;
|
813 |
+
return"#" + j.replace(/^[^#]*#?(.*)$/, "$1")
|
814 |
+
}
|
815 |
+
$.fn[c] = function (j) {
|
816 |
+
return j ? this.bind(c, j) : this.trigger(c)
|
817 |
+
};
|
818 |
+
$.fn[c].delay = 50;
|
819 |
+
g[c] = $.extend(g[c], {setup: function () {
|
820 |
+
if (d) {
|
821 |
+
return false
|
822 |
+
}
|
823 |
+
$(f.start)
|
824 |
+
}, teardown: function () {
|
825 |
+
if (d) {
|
826 |
+
return false
|
827 |
+
}
|
828 |
+
$(f.stop)
|
829 |
+
}});
|
830 |
+
f = (function () {
|
831 |
+
var j = {}, p, m = a(), k = function (q) {
|
832 |
+
return q
|
833 |
+
}, l = k, o = k;
|
834 |
+
j.start = function () {
|
835 |
+
p || n()
|
836 |
+
};
|
837 |
+
j.stop = function () {
|
838 |
+
p && clearTimeout(p);
|
839 |
+
p = b
|
840 |
+
};
|
841 |
+
function n() {
|
842 |
+
var r = a(), q = o(m);
|
843 |
+
if (r !== m) {
|
844 |
+
l(m = r, q);
|
845 |
+
$(e).trigger(c)
|
846 |
+
} else {
|
847 |
+
if (q !== m) {
|
848 |
+
location.href = location.href.replace(/#.*/, "") + q
|
849 |
+
}
|
850 |
+
}
|
851 |
+
p = setTimeout(n, $.fn[c].delay)
|
852 |
+
}
|
853 |
+
$.browser.msie && !d && (function () {
|
854 |
+
var q, r;
|
855 |
+
j.start = function () {
|
856 |
+
if (!q) {
|
857 |
+
r = $.fn[c].src;
|
858 |
+
r = r && r + a();
|
859 |
+
q = $('<iframe tabindex="-1" title="empty"/>').hide().one("load", function () {
|
860 |
+
r || l(a());
|
861 |
+
n()
|
862 |
+
}).attr("src", r || "javascript:0").insertAfter("body")[0].contentWindow;
|
863 |
+
h.onpropertychange = function () {
|
864 |
+
try {
|
865 |
+
if (event.propertyName === "title") {
|
866 |
+
q.document.title = h.title
|
867 |
+
}
|
868 |
+
} catch (s) {
|
869 |
+
}
|
870 |
+
}
|
871 |
+
}
|
872 |
+
};
|
873 |
+
j.stop = k;
|
874 |
+
o = function () {
|
875 |
+
return a(q.location.href)
|
876 |
+
};
|
877 |
+
l = function (v, s) {
|
878 |
+
var u = q.document, t = $.fn[c].domain;
|
879 |
+
if (v !== s) {
|
880 |
+
u.title = h.title;
|
881 |
+
u.open();
|
882 |
+
t && u.write('<script>document.domain="' + t + '"<\/script>');
|
883 |
+
u.close();
|
884 |
+
q.location.hash = v
|
885 |
+
}
|
886 |
+
}
|
887 |
+
})();
|
888 |
+
return j
|
889 |
+
})()
|
890 |
+
})(jQuery, this);
|
891 |
+
|
892 |
+
/*
|
893 |
+
* jQuery EasyTabs plugin 3.2.0
|
894 |
+
*
|
895 |
+
* Copyright (c) 2010-2011 Steve Schwartz (JangoSteve)
|
896 |
+
*
|
897 |
+
* Dual licensed under the MIT and GPL licenses:
|
898 |
+
* http://www.opensource.org/licenses/mit-license.php
|
899 |
+
* http://www.gnu.org/licenses/gpl.html
|
900 |
+
*
|
901 |
+
* Date: Thu May 09 17:30:00 2013 -0500
|
902 |
+
*/
|
903 |
+
(function (a) {
|
904 |
+
a.easytabs = function (j, e) {
|
905 |
+
var f = this, q = a(j), i = {animate: true, panelActiveClass: "active", tabActiveClass: "active", defaultTab: "li:first-child", animationSpeed: "fast", tabs: "> ul > li", updateHash: true, cycle: false, collapsible: false, collapsedClass: "collapsed", collapsedByDefault: true, uiTabs: false, transitionIn: "fadeIn", transitionOut: "fadeOut", transitionInEasing: "swing", transitionOutEasing: "swing", transitionCollapse: "slideUp", transitionUncollapse: "slideDown", transitionCollapseEasing: "swing", transitionUncollapseEasing: "swing", containerClass: "", tabsClass: "", tabClass: "", panelClass: "", cache: true, event: "click", panelContext: q}, h, l, v, m, d, t = {fast: 200, normal: 400, slow: 600}, r;
|
906 |
+
f.init = function () {
|
907 |
+
f.settings = r = a.extend({}, i, e);
|
908 |
+
r.bind_str = r.event + ".easytabs";
|
909 |
+
if (r.uiTabs) {
|
910 |
+
r.tabActiveClass = "ui-tabs-selected";
|
911 |
+
r.containerClass = "ui-tabs ui-widget ui-widget-content ui-corner-all";
|
912 |
+
r.tabsClass = "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all";
|
913 |
+
r.tabClass = "ui-state-default ui-corner-top";
|
914 |
+
r.panelClass = "ui-tabs-panel ui-widget-content ui-corner-bottom"
|
915 |
+
}
|
916 |
+
if (r.collapsible && e.defaultTab !== undefined && e.collpasedByDefault === undefined) {
|
917 |
+
r.collapsedByDefault = false
|
918 |
+
}
|
919 |
+
if (typeof (r.animationSpeed) === "string") {
|
920 |
+
r.animationSpeed = t[r.animationSpeed]
|
921 |
+
}
|
922 |
+
a("a.anchor").remove().prependTo("body");
|
923 |
+
q.data("easytabs", {});
|
924 |
+
f.setTransitions();
|
925 |
+
f.getTabs();
|
926 |
+
b();
|
927 |
+
g();
|
928 |
+
w();
|
929 |
+
n();
|
930 |
+
c();
|
931 |
+
q.attr("data-easytabs", true)
|
932 |
+
};
|
933 |
+
f.setTransitions = function () {
|
934 |
+
v = (r.animate) ? {show: r.transitionIn, hide: r.transitionOut, speed: r.animationSpeed, collapse: r.transitionCollapse, uncollapse: r.transitionUncollapse, halfSpeed: r.animationSpeed / 2} : {show: "show", hide: "hide", speed: 0, collapse: "hide", uncollapse: "show", halfSpeed: 0}
|
935 |
+
};
|
936 |
+
f.getTabs = function () {
|
937 |
+
var x;
|
938 |
+
f.tabs = q.find(r.tabs), f.panels = a(), f.tabs.each(function () {
|
939 |
+
var A = a(this), z = A.children("a"), y = A.children("a").data("target");
|
940 |
+
A.data("easytabs", {});
|
941 |
+
if (y !== undefined && y !== null) {
|
942 |
+
A.data("easytabs").ajax = z.attr("href")
|
943 |
+
} else {
|
944 |
+
y = z.attr("href")
|
945 |
+
}
|
946 |
+
y = y.match(/#([^\?]+)/)[1];
|
947 |
+
x = r.panelContext.find("#" + y);
|
948 |
+
if (x.length) {
|
949 |
+
x.data("easytabs", {position: x.css("position"), visibility: x.css("visibility")});
|
950 |
+
x.not(r.panelActiveClass).hide();
|
951 |
+
f.panels = f.panels.add(x);
|
952 |
+
A.data("easytabs").panel = x
|
953 |
+
} else {
|
954 |
+
f.tabs = f.tabs.not(A);
|
955 |
+
if ("console" in window) {
|
956 |
+
console.warn("Warning: tab without matching panel for selector '#" + y + "' removed from set")
|
957 |
+
}
|
958 |
+
}
|
959 |
+
})
|
960 |
+
};
|
961 |
+
f.selectTab = function (x, C) {
|
962 |
+
var y = window.location, B = y.hash.match(/^[^\?]*/)[0], z = x.parent().data("easytabs").panel, A = x.parent().data("easytabs").ajax;
|
963 |
+
if (r.collapsible && !d && (x.hasClass(r.tabActiveClass) || x.hasClass(r.collapsedClass))) {
|
964 |
+
f.toggleTabCollapse(x, z, A, C)
|
965 |
+
} else {
|
966 |
+
if (!x.hasClass(r.tabActiveClass) || !z.hasClass(r.panelActiveClass)) {
|
967 |
+
o(x, z, A, C)
|
968 |
+
} else {
|
969 |
+
if (!r.cache) {
|
970 |
+
o(x, z, A, C)
|
971 |
+
}
|
972 |
+
}
|
973 |
+
}
|
974 |
+
};
|
975 |
+
f.toggleTabCollapse = function (x, y, z, A) {
|
976 |
+
f.panels.stop(true, true);
|
977 |
+
if (u(q, "easytabs:before", [x, y, r])) {
|
978 |
+
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
979 |
+
if (x.hasClass(r.collapsedClass)) {
|
980 |
+
if (z && (!r.cache || !x.parent().data("easytabs").cached)) {
|
981 |
+
q.trigger("easytabs:ajax:beforeSend", [x, y]);
|
982 |
+
y.load(z, function (C, B, D) {
|
983 |
+
x.parent().data("easytabs").cached = true;
|
984 |
+
q.trigger("easytabs:ajax:complete", [x, y, C, B, D])
|
985 |
+
})
|
986 |
+
}
|
987 |
+
x.parent().removeClass(r.collapsedClass).addClass(r.tabActiveClass).children().removeClass(r.collapsedClass).addClass(r.tabActiveClass);
|
988 |
+
y.addClass(r.panelActiveClass)[v.uncollapse](v.speed, r.transitionUncollapseEasing, function () {
|
989 |
+
q.trigger("easytabs:midTransition", [x, y, r]);
|
990 |
+
if (typeof A == "function") {
|
991 |
+
A()
|
992 |
+
}
|
993 |
+
})
|
994 |
+
} else {
|
995 |
+
x.addClass(r.collapsedClass).parent().addClass(r.collapsedClass);
|
996 |
+
y.removeClass(r.panelActiveClass)[v.collapse](v.speed, r.transitionCollapseEasing, function () {
|
997 |
+
q.trigger("easytabs:midTransition", [x, y, r]);
|
998 |
+
if (typeof A == "function") {
|
999 |
+
A()
|
1000 |
+
}
|
1001 |
+
})
|
1002 |
+
}
|
1003 |
+
}
|
1004 |
+
};
|
1005 |
+
f.matchTab = function (x) {
|
1006 |
+
return f.tabs.find("[href='" + x + "'],[data-target='" + x + "']").first()
|
1007 |
+
};
|
1008 |
+
f.matchInPanel = function (x) {
|
1009 |
+
return(x && f.validId(x) ? f.panels.filter(":has(" + x + ")").first() : [])
|
1010 |
+
};
|
1011 |
+
f.validId = function (x) {
|
1012 |
+
return x.substr(1).match(/^[A-Za-z]+[A-Za-z0-9\-_:\.].$/)
|
1013 |
+
};
|
1014 |
+
f.selectTabFromHashChange = function () {
|
1015 |
+
var y = window.location.hash.match(/^[^\?]*/)[0], x = f.matchTab(y), z;
|
1016 |
+
if (r.updateHash) {
|
1017 |
+
if (x.length) {
|
1018 |
+
d = true;
|
1019 |
+
f.selectTab(x)
|
1020 |
+
} else {
|
1021 |
+
z = f.matchInPanel(y);
|
1022 |
+
if (z.length) {
|
1023 |
+
y = "#" + z.attr("id");
|
1024 |
+
x = f.matchTab(y);
|
1025 |
+
d = true;
|
1026 |
+
f.selectTab(x)
|
1027 |
+
} else {
|
1028 |
+
if (!h.hasClass(r.tabActiveClass) && !r.cycle) {
|
1029 |
+
if (y === "" || f.matchTab(m).length || q.closest(y).length) {
|
1030 |
+
d = true;
|
1031 |
+
f.selectTab(l)
|
1032 |
+
}
|
1033 |
+
}
|
1034 |
+
}
|
1035 |
+
}
|
1036 |
+
}
|
1037 |
+
};
|
1038 |
+
f.cycleTabs = function (x) {
|
1039 |
+
if (r.cycle) {
|
1040 |
+
x = x % f.tabs.length;
|
1041 |
+
$tab = a(f.tabs[x]).children("a").first();
|
1042 |
+
d = true;
|
1043 |
+
f.selectTab($tab, function () {
|
1044 |
+
setTimeout(function () {
|
1045 |
+
f.cycleTabs(x + 1)
|
1046 |
+
}, r.cycle)
|
1047 |
+
})
|
1048 |
+
}
|
1049 |
+
};
|
1050 |
+
f.publicMethods = {select: function (x) {
|
1051 |
+
var y;
|
1052 |
+
if ((y = f.tabs.filter(x)).length === 0) {
|
1053 |
+
if ((y = f.tabs.find("a[href='" + x + "']")).length === 0) {
|
1054 |
+
if ((y = f.tabs.find("a" + x)).length === 0) {
|
1055 |
+
if ((y = f.tabs.find("[data-target='" + x + "']")).length === 0) {
|
1056 |
+
if ((y = f.tabs.find("a[href$='" + x + "']")).length === 0) {
|
1057 |
+
a.error("Tab '" + x + "' does not exist in tab set")
|
1058 |
+
}
|
1059 |
+
}
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
} else {
|
1063 |
+
y = y.children("a").first()
|
1064 |
+
}
|
1065 |
+
f.selectTab(y)
|
1066 |
+
}};
|
1067 |
+
var u = function (A, x, z) {
|
1068 |
+
var y = a.Event(x);
|
1069 |
+
A.trigger(y, z);
|
1070 |
+
return y.result !== false
|
1071 |
+
};
|
1072 |
+
var b = function () {
|
1073 |
+
q.addClass(r.containerClass);
|
1074 |
+
f.tabs.parent().addClass(r.tabsClass);
|
1075 |
+
f.tabs.addClass(r.tabClass);
|
1076 |
+
f.panels.addClass(r.panelClass)
|
1077 |
+
};
|
1078 |
+
var g = function () {
|
1079 |
+
var y = window.location.hash.match(/^[^\?]*/)[0], x = f.matchTab(y).parent(), z;
|
1080 |
+
if (x.length === 1) {
|
1081 |
+
h = x;
|
1082 |
+
r.cycle = false
|
1083 |
+
} else {
|
1084 |
+
z = f.matchInPanel(y);
|
1085 |
+
if (z.length) {
|
1086 |
+
y = "#" + z.attr("id");
|
1087 |
+
h = f.matchTab(y).parent()
|
1088 |
+
} else {
|
1089 |
+
h = f.tabs.parent().find(r.defaultTab);
|
1090 |
+
if (h.length === 0) {
|
1091 |
+
a.error("The specified default tab ('" + r.defaultTab + "') could not be found in the tab set ('" + r.tabs + "') out of " + f.tabs.length + " tabs.")
|
1092 |
+
}
|
1093 |
+
}
|
1094 |
+
}
|
1095 |
+
l = h.children("a").first();
|
1096 |
+
p(x)
|
1097 |
+
};
|
1098 |
+
var p = function (z) {
|
1099 |
+
var y, x;
|
1100 |
+
if (r.collapsible && z.length === 0 && r.collapsedByDefault) {
|
1101 |
+
h.addClass(r.collapsedClass).children().addClass(r.collapsedClass)
|
1102 |
+
} else {
|
1103 |
+
y = a(h.data("easytabs").panel);
|
1104 |
+
x = h.data("easytabs").ajax;
|
1105 |
+
if (x && (!r.cache || !h.data("easytabs").cached)) {
|
1106 |
+
q.trigger("easytabs:ajax:beforeSend", [l, y]);
|
1107 |
+
y.load(x, function (B, A, C) {
|
1108 |
+
h.data("easytabs").cached = true;
|
1109 |
+
q.trigger("easytabs:ajax:complete", [l, y, B, A, C])
|
1110 |
+
})
|
1111 |
+
}
|
1112 |
+
h.data("easytabs").panel.show().addClass(r.panelActiveClass);
|
1113 |
+
h.addClass(r.tabActiveClass).children().addClass(r.tabActiveClass)
|
1114 |
+
}
|
1115 |
+
q.trigger("easytabs:initialised", [l, y])
|
1116 |
+
};
|
1117 |
+
var w = function () {
|
1118 |
+
f.tabs.children("a").bind(r.bind_str, function (x) {
|
1119 |
+
r.cycle = false;
|
1120 |
+
d = false;
|
1121 |
+
f.selectTab(a(this));
|
1122 |
+
x.preventDefault ? x.preventDefault() : x.returnValue = false
|
1123 |
+
})
|
1124 |
+
};
|
1125 |
+
var o = function (z, D, E, H) {
|
1126 |
+
f.panels.stop(true, true);
|
1127 |
+
if (u(q, "easytabs:before", [z, D, r])) {
|
1128 |
+
var A = f.panels.filter(":visible"), y = D.parent(), F, x, C, G, B = window.location.hash.match(/^[^\?]*/)[0];
|
1129 |
+
if (r.animate) {
|
1130 |
+
F = s(D);
|
1131 |
+
x = A.length ? k(A) : 0;
|
1132 |
+
C = F - x
|
1133 |
+
}
|
1134 |
+
m = B;
|
1135 |
+
G = function () {
|
1136 |
+
q.trigger("easytabs:midTransition", [z, D, r]);
|
1137 |
+
if (r.animate && r.transitionIn == "fadeIn") {
|
1138 |
+
if (C < 0) {
|
1139 |
+
y.animate({height: y.height() + C}, v.halfSpeed).css({"min-height": ""})
|
1140 |
+
}
|
1141 |
+
}
|
1142 |
+
if (r.updateHash && !d) {
|
1143 |
+
window.location.hash = "#" + D.attr("id")
|
1144 |
+
} else {
|
1145 |
+
d = false
|
1146 |
+
}
|
1147 |
+
D[v.show](v.speed, r.transitionInEasing, function () {
|
1148 |
+
y.css({height: "", "min-height": ""});
|
1149 |
+
q.trigger("easytabs:after", [z, D, r]);
|
1150 |
+
if (typeof H == "function") {
|
1151 |
+
H()
|
1152 |
+
}
|
1153 |
+
})
|
1154 |
+
};
|
1155 |
+
if (E && (!r.cache || !z.parent().data("easytabs").cached)) {
|
1156 |
+
q.trigger("easytabs:ajax:beforeSend", [z, D]);
|
1157 |
+
D.load(E, function (J, I, K) {
|
1158 |
+
z.parent().data("easytabs").cached = true;
|
1159 |
+
q.trigger("easytabs:ajax:complete", [z, D, J, I, K])
|
1160 |
+
})
|
1161 |
+
}
|
1162 |
+
if (r.animate && r.transitionOut == "fadeOut") {
|
1163 |
+
if (C > 0) {
|
1164 |
+
y.animate({height: (y.height() + C)}, v.halfSpeed)
|
1165 |
+
} else {
|
1166 |
+
y.css({"min-height": y.height()})
|
1167 |
+
}
|
1168 |
+
}
|
1169 |
+
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
1170 |
+
f.tabs.filter("." + r.collapsedClass).removeClass(r.collapsedClass).children().removeClass(r.collapsedClass);
|
1171 |
+
z.parent().addClass(r.tabActiveClass).children().addClass(r.tabActiveClass);
|
1172 |
+
f.panels.filter("." + r.panelActiveClass).removeClass(r.panelActiveClass);
|
1173 |
+
D.addClass(r.panelActiveClass);
|
1174 |
+
if (A.length) {
|
1175 |
+
A[v.hide](v.speed, r.transitionOutEasing, G)
|
1176 |
+
} else {
|
1177 |
+
D[v.uncollapse](v.speed, r.transitionUncollapseEasing, G)
|
1178 |
+
}
|
1179 |
+
}
|
1180 |
+
};
|
1181 |
+
var s = function (z) {
|
1182 |
+
if (z.data("easytabs") && z.data("easytabs").lastHeight) {
|
1183 |
+
return z.data("easytabs").lastHeight
|
1184 |
+
}
|
1185 |
+
var B = z.css("display"), y, x;
|
1186 |
+
try {
|
1187 |
+
y = a("<div></div>", {position: "absolute", visibility: "hidden", overflow: "hidden"})
|
1188 |
+
} catch (A) {
|
1189 |
+
y = a("<div></div>", {visibility: "hidden", overflow: "hidden"})
|
1190 |
+
}
|
1191 |
+
x = z.wrap(y).css({position: "relative", visibility: "hidden", display: "block"}).outerHeight();
|
1192 |
+
z.unwrap();
|
1193 |
+
z.css({position: z.data("easytabs").position, visibility: z.data("easytabs").visibility, display: B});
|
1194 |
+
z.data("easytabs").lastHeight = x;
|
1195 |
+
return x
|
1196 |
+
};
|
1197 |
+
var k = function (y) {
|
1198 |
+
var x = y.outerHeight();
|
1199 |
+
if (y.data("easytabs")) {
|
1200 |
+
y.data("easytabs").lastHeight = x
|
1201 |
+
} else {
|
1202 |
+
y.data("easytabs", {lastHeight: x})
|
1203 |
+
}
|
1204 |
+
return x
|
1205 |
+
};
|
1206 |
+
var n = function () {
|
1207 |
+
if (typeof a(window).hashchange === "function") {
|
1208 |
+
a(window).hashchange(function () {
|
1209 |
+
f.selectTabFromHashChange()
|
1210 |
+
})
|
1211 |
+
} else {
|
1212 |
+
if (a.address && typeof a.address.change === "function") {
|
1213 |
+
a.address.change(function () {
|
1214 |
+
f.selectTabFromHashChange()
|
1215 |
+
})
|
1216 |
+
}
|
1217 |
+
}
|
1218 |
+
};
|
1219 |
+
var c = function () {
|
1220 |
+
var x;
|
1221 |
+
if (r.cycle) {
|
1222 |
+
x = f.tabs.index(h);
|
1223 |
+
setTimeout(function () {
|
1224 |
+
f.cycleTabs(x + 1)
|
1225 |
+
}, r.cycle)
|
1226 |
+
}
|
1227 |
+
};
|
1228 |
+
f.init()
|
1229 |
+
};
|
1230 |
+
a.fn.easytabs = function (c) {
|
1231 |
+
var b = arguments;
|
1232 |
+
return this.each(function () {
|
1233 |
+
var e = a(this), d = e.data("easytabs");
|
1234 |
+
if (undefined === d) {
|
1235 |
+
d = new a.easytabs(this, c);
|
1236 |
+
e.data("easytabs", d)
|
1237 |
+
}
|
1238 |
+
if (d.publicMethods[c]) {
|
1239 |
+
return d.publicMethods[c](Array.prototype.slice.call(b, 1))
|
1240 |
+
}
|
1241 |
+
})
|
1242 |
+
}
|
1243 |
+
})(jQuery);
|
1244 |
+
|
1245 |
+
|
1246 |
+
/*
|
1247 |
+
colpick Color Picker
|
1248 |
+
Copyright 2013 Jose Vargas. Licensed under GPL license. Based on Stefan Petre's Color Picker www.eyecon.ro, dual licensed under the MIT and GPL licenses
|
1249 |
+
|
1250 |
+
For usage and examples: colpick.com/plugin
|
1251 |
+
*/
|
1252 |
+
|
1253 |
+
(function ($) {
|
1254 |
+
var colpick = function () {
|
1255 |
+
var
|
1256 |
+
tpl = '<div class="colpick"><div class="colpick_color"><div class="colpick_color_overlay1"><div class="colpick_color_overlay2"><div class="colpick_selector_outer"><div class="colpick_selector_inner"></div></div></div></div></div><div class="colpick_hue"><div class="colpick_hue_arrs"><div class="colpick_hue_larr"></div><div class="colpick_hue_rarr"></div></div></div><div class="colpick_new_color"></div><div class="colpick_current_color"></div><div class="colpick_hex_field"><div class="colpick_field_letter">#</div><input type="text" maxlength="6" size="6" /></div><div class="colpick_rgb_r colpick_field"><div class="colpick_field_letter">R</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_g colpick_field"><div class="colpick_field_letter">G</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_h colpick_field"><div class="colpick_field_letter">H</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_s colpick_field"><div class="colpick_field_letter">S</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_submit"></div></div>',
|
1257 |
+
defaults = {
|
1258 |
+
showEvent: 'click',
|
1259 |
+
onShow: function () {
|
1260 |
+
},
|
1261 |
+
onBeforeShow: function () {
|
1262 |
+
},
|
1263 |
+
onHide: function () {
|
1264 |
+
},
|
1265 |
+
onChange: function () {
|
1266 |
+
},
|
1267 |
+
onSubmit: function () {
|
1268 |
+
},
|
1269 |
+
colorScheme: 'light',
|
1270 |
+
color: '3289c7',
|
1271 |
+
livePreview: true,
|
1272 |
+
flat: false,
|
1273 |
+
layout: 'full',
|
1274 |
+
submit: 1,
|
1275 |
+
submitText: 'OK',
|
1276 |
+
height: 156
|
1277 |
+
},
|
1278 |
+
//Fill the inputs of the plugin
|
1279 |
+
fillRGBFields = function (hsb, cal) {
|
1280 |
+
var rgb = hsbToRgb(hsb);
|
1281 |
+
$(cal).data('colpick').fields
|
1282 |
+
.eq(1).val(rgb.r).end()
|
1283 |
+
.eq(2).val(rgb.g).end()
|
1284 |
+
.eq(3).val(rgb.b).end();
|
1285 |
+
},
|
1286 |
+
fillHSBFields = function (hsb, cal) {
|
1287 |
+
$(cal).data('colpick').fields
|
1288 |
+
.eq(4).val(Math.round(hsb.h)).end()
|
1289 |
+
.eq(5).val(Math.round(hsb.s)).end()
|
1290 |
+
.eq(6).val(Math.round(hsb.b)).end();
|
1291 |
+
},
|
1292 |
+
fillHexFields = function (hsb, cal) {
|
1293 |
+
$(cal).data('colpick').fields.eq(0).val(hsbToHex(hsb));
|
1294 |
+
},
|
1295 |
+
//Set the round selector position
|
1296 |
+
setSelector = function (hsb, cal) {
|
1297 |
+
$(cal).data('colpick').selector.css('backgroundColor', '#' + hsbToHex({h: hsb.h, s: 100, b: 100}));
|
1298 |
+
$(cal).data('colpick').selectorIndic.css({
|
1299 |
+
left: parseInt($(cal).data('colpick').height * hsb.s / 100, 10),
|
1300 |
+
top: parseInt($(cal).data('colpick').height * (100 - hsb.b) / 100, 10)
|
1301 |
+
});
|
1302 |
+
},
|
1303 |
+
//Set the hue selector position
|
1304 |
+
setHue = function (hsb, cal) {
|
1305 |
+
$(cal).data('colpick').hue.css('top', parseInt($(cal).data('colpick').height - $(cal).data('colpick').height * hsb.h / 360, 10));
|
1306 |
+
},
|
1307 |
+
//Set current and new colors
|
1308 |
+
setCurrentColor = function (hsb, cal) {
|
1309 |
+
$(cal).data('colpick').currentColor.css('backgroundColor', '#' + hsbToHex(hsb));
|
1310 |
+
},
|
1311 |
+
setNewColor = function (hsb, cal) {
|
1312 |
+
$(cal).data('colpick').newColor.css('backgroundColor', '#' + hsbToHex(hsb));
|
1313 |
+
},
|
1314 |
+
//Called when the new color is changed
|
1315 |
+
change = function (ev) {
|
1316 |
+
var cal = $(this).parent().parent(), col;
|
1317 |
+
if (this.parentNode.className.indexOf('_hex') > 0) {
|
1318 |
+
cal.data('colpick').color = col = hexToHsb(fixHex(this.value));
|
1319 |
+
fillRGBFields(col, cal.get(0));
|
1320 |
+
fillHSBFields(col, cal.get(0));
|
1321 |
+
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
1322 |
+
cal.data('colpick').color = col = fixHSB({
|
1323 |
+
h: parseInt(cal.data('colpick').fields.eq(4).val(), 10),
|
1324 |
+
s: parseInt(cal.data('colpick').fields.eq(5).val(), 10),
|
1325 |
+
b: parseInt(cal.data('colpick').fields.eq(6).val(), 10)
|
1326 |
+
});
|
1327 |
+
fillRGBFields(col, cal.get(0));
|
1328 |
+
fillHexFields(col, cal.get(0));
|
1329 |
+
} else {
|
1330 |
+
cal.data('colpick').color = col = rgbToHsb(fixRGB({
|
1331 |
+
r: parseInt(cal.data('colpick').fields.eq(1).val(), 10),
|
1332 |
+
g: parseInt(cal.data('colpick').fields.eq(2).val(), 10),
|
1333 |
+
b: parseInt(cal.data('colpick').fields.eq(3).val(), 10)
|
1334 |
+
}));
|
1335 |
+
fillHexFields(col, cal.get(0));
|
1336 |
+
fillHSBFields(col, cal.get(0));
|
1337 |
+
}
|
1338 |
+
setSelector(col, cal.get(0));
|
1339 |
+
setHue(col, cal.get(0));
|
1340 |
+
setNewColor(col, cal.get(0));
|
1341 |
+
cal.data('colpick').onChange.apply(cal.parent(), [col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el, 0]);
|
1342 |
+
},
|
1343 |
+
//Change style on blur and on focus of inputs
|
1344 |
+
blur = function (ev) {
|
1345 |
+
$(this).parent().removeClass('colpick_focus');
|
1346 |
+
},
|
1347 |
+
focus = function () {
|
1348 |
+
$(this).parent().parent().data('colpick').fields.parent().removeClass('colpick_focus');
|
1349 |
+
$(this).parent().addClass('colpick_focus');
|
1350 |
+
},
|
1351 |
+
//Increment/decrement arrows functions
|
1352 |
+
downIncrement = function (ev) {
|
1353 |
+
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1354 |
+
var field = $(this).parent().find('input').focus();
|
1355 |
+
var current = {
|
1356 |
+
el: $(this).parent().addClass('colpick_slider'),
|
1357 |
+
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
1358 |
+
y: ev.pageY,
|
1359 |
+
field: field,
|
1360 |
+
val: parseInt(field.val(), 10),
|
1361 |
+
preview: $(this).parent().parent().data('colpick').livePreview
|
1362 |
+
};
|
1363 |
+
$(document).mouseup(current, upIncrement);
|
1364 |
+
$(document).mousemove(current, moveIncrement);
|
1365 |
+
},
|
1366 |
+
moveIncrement = function (ev) {
|
1367 |
+
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val - ev.pageY + ev.data.y, 10))));
|
1368 |
+
if (ev.data.preview) {
|
1369 |
+
change.apply(ev.data.field.get(0), [true]);
|
1370 |
+
}
|
1371 |
+
return false;
|
1372 |
+
},
|
1373 |
+
upIncrement = function (ev) {
|
1374 |
+
change.apply(ev.data.field.get(0), [true]);
|
1375 |
+
ev.data.el.removeClass('colpick_slider').find('input').focus();
|
1376 |
+
$(document).off('mouseup', upIncrement);
|
1377 |
+
$(document).off('mousemove', moveIncrement);
|
1378 |
+
return false;
|
1379 |
+
},
|
1380 |
+
//Hue slider functions
|
1381 |
+
downHue = function (ev) {
|
1382 |
+
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1383 |
+
var current = {
|
1384 |
+
cal: $(this).parent(),
|
1385 |
+
y: $(this).offset().top
|
1386 |
+
};
|
1387 |
+
$(document).on('mouseup touchend', current, upHue);
|
1388 |
+
$(document).on('mousemove touchmove', current, moveHue);
|
1389 |
+
|
1390 |
+
var pageY = ((ev.type == 'touchstart') ? ev.originalEvent.changedTouches[0].pageY : ev.pageY);
|
1391 |
+
change.apply(
|
1392 |
+
current.cal.data('colpick')
|
1393 |
+
.fields.eq(4).val(parseInt(360 * (current.cal.data('colpick').height - (pageY - current.y)) / current.cal.data('colpick').height, 10))
|
1394 |
+
.get(0),
|
1395 |
+
[current.cal.data('colpick').livePreview]
|
1396 |
+
);
|
1397 |
+
return false;
|
1398 |
+
},
|
1399 |
+
moveHue = function (ev) {
|
1400 |
+
var pageY = ((ev.type == 'touchmove') ? ev.originalEvent.changedTouches[0].pageY : ev.pageY);
|
1401 |
+
change.apply(
|
1402 |
+
ev.data.cal.data('colpick')
|
1403 |
+
.fields.eq(4).val(parseInt(360 * (ev.data.cal.data('colpick').height - Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageY - ev.data.y)))) / ev.data.cal.data('colpick').height, 10))
|
1404 |
+
.get(0),
|
1405 |
+
[ev.data.preview]
|
1406 |
+
);
|
1407 |
+
return false;
|
1408 |
+
},
|
1409 |
+
upHue = function (ev) {
|
1410 |
+
fillRGBFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1411 |
+
fillHexFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1412 |
+
$(document).off('mouseup touchend', upHue);
|
1413 |
+
$(document).off('mousemove touchmove', moveHue);
|
1414 |
+
return false;
|
1415 |
+
},
|
1416 |
+
//Color selector functions
|
1417 |
+
downSelector = function (ev) {
|
1418 |
+
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1419 |
+
var current = {
|
1420 |
+
cal: $(this).parent(),
|
1421 |
+
pos: $(this).offset()
|
1422 |
+
};
|
1423 |
+
current.preview = current.cal.data('colpick').livePreview;
|
1424 |
+
|
1425 |
+
$(document).on('mouseup touchend', current, upSelector);
|
1426 |
+
$(document).on('mousemove touchmove', current, moveSelector);
|
1427 |
+
|
1428 |
+
var payeX, pageY;
|
1429 |
+
if (ev.type == 'touchstart') {
|
1430 |
+
pageX = ev.originalEvent.changedTouches[0].pageX,
|
1431 |
+
pageY = ev.originalEvent.changedTouches[0].pageY;
|
1432 |
+
} else {
|
1433 |
+
pageX = ev.pageX;
|
1434 |
+
pageY = ev.pageY;
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
change.apply(
|
1438 |
+
current.cal.data('colpick').fields
|
1439 |
+
.eq(6).val(parseInt(100 * (current.cal.data('colpick').height - (pageY - current.pos.top)) / current.cal.data('colpick').height, 10)).end()
|
1440 |
+
.eq(5).val(parseInt(100 * (pageX - current.pos.left) / current.cal.data('colpick').height, 10))
|
1441 |
+
.get(0),
|
1442 |
+
[current.preview]
|
1443 |
+
);
|
1444 |
+
return false;
|
1445 |
+
},
|
1446 |
+
moveSelector = function (ev) {
|
1447 |
+
var payeX, pageY;
|
1448 |
+
if (ev.type == 'touchmove') {
|
1449 |
+
pageX = ev.originalEvent.changedTouches[0].pageX,
|
1450 |
+
pageY = ev.originalEvent.changedTouches[0].pageY;
|
1451 |
+
} else {
|
1452 |
+
pageX = ev.pageX;
|
1453 |
+
pageY = ev.pageY;
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
change.apply(
|
1457 |
+
ev.data.cal.data('colpick').fields
|
1458 |
+
.eq(6).val(parseInt(100 * (ev.data.cal.data('colpick').height - Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageY - ev.data.pos.top)))) / ev.data.cal.data('colpick').height, 10)).end()
|
1459 |
+
.eq(5).val(parseInt(100 * (Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageX - ev.data.pos.left)))) / ev.data.cal.data('colpick').height, 10))
|
1460 |
+
.get(0),
|
1461 |
+
[ev.data.preview]
|
1462 |
+
);
|
1463 |
+
return false;
|
1464 |
+
},
|
1465 |
+
upSelector = function (ev) {
|
1466 |
+
fillRGBFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1467 |
+
fillHexFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1468 |
+
$(document).off('mouseup touchend', upSelector);
|
1469 |
+
$(document).off('mousemove touchmove', moveSelector);
|
1470 |
+
return false;
|
1471 |
+
},
|
1472 |
+
//Submit button
|
1473 |
+
clickSubmit = function (ev) {
|
1474 |
+
var cal = $(this).parent();
|
1475 |
+
var col = cal.data('colpick').color;
|
1476 |
+
cal.data('colpick').origColor = col;
|
1477 |
+
setCurrentColor(col, cal.get(0));
|
1478 |
+
cal.data('colpick').onSubmit(col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el);
|
1479 |
+
},
|
1480 |
+
//Show/hide the color picker
|
1481 |
+
show = function (ev) {
|
1482 |
+
// Prevent the trigger of any direct parent
|
1483 |
+
ev.stopPropagation();
|
1484 |
+
var cal = $('#' + $(this).data('colpickId'));
|
1485 |
+
cal.data('colpick').onBeforeShow.apply(this, [cal.get(0)]);
|
1486 |
+
var pos = $(this).offset();
|
1487 |
+
var top = pos.top + this.offsetHeight;
|
1488 |
+
var left = pos.left;
|
1489 |
+
var viewPort = getViewport();
|
1490 |
+
var calW = cal.width();
|
1491 |
+
if (left + calW > viewPort.l + viewPort.w) {
|
1492 |
+
left -= calW;
|
1493 |
+
}
|
1494 |
+
cal.css({left: left + 'px', top: top + 'px'});
|
1495 |
+
if (cal.data('colpick').onShow.apply(this, [cal.get(0)]) != false) {
|
1496 |
+
cal.show();
|
1497 |
+
}
|
1498 |
+
//Hide when user clicks outside
|
1499 |
+
$('html').mousedown({cal: cal}, hide);
|
1500 |
+
cal.mousedown(function (ev) {
|
1501 |
+
ev.stopPropagation();
|
1502 |
+
})
|
1503 |
+
},
|
1504 |
+
hide = function (ev) {
|
1505 |
+
if (ev.data.cal.data('colpick').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
1506 |
+
ev.data.cal.hide();
|
1507 |
+
}
|
1508 |
+
$('html').off('mousedown', hide);
|
1509 |
+
},
|
1510 |
+
getViewport = function () {
|
1511 |
+
var m = document.compatMode == 'CSS1Compat';
|
1512 |
+
return {
|
1513 |
+
l: window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
1514 |
+
w: window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth)
|
1515 |
+
};
|
1516 |
+
},
|
1517 |
+
//Fix the values if the user enters a negative or high value
|
1518 |
+
fixHSB = function (hsb) {
|
1519 |
+
return {
|
1520 |
+
h: Math.min(360, Math.max(0, hsb.h)),
|
1521 |
+
s: Math.min(100, Math.max(0, hsb.s)),
|
1522 |
+
b: Math.min(100, Math.max(0, hsb.b))
|
1523 |
+
};
|
1524 |
+
},
|
1525 |
+
fixRGB = function (rgb) {
|
1526 |
+
return {
|
1527 |
+
r: Math.min(255, Math.max(0, rgb.r)),
|
1528 |
+
g: Math.min(255, Math.max(0, rgb.g)),
|
1529 |
+
b: Math.min(255, Math.max(0, rgb.b))
|
1530 |
+
};
|
1531 |
+
},
|
1532 |
+
fixHex = function (hex) {
|
1533 |
+
var len = 6 - hex.length;
|
1534 |
+
if (len > 0) {
|
1535 |
+
var o = [];
|
1536 |
+
for (var i = 0; i < len; i++) {
|
1537 |
+
o.push('0');
|
1538 |
+
}
|
1539 |
+
o.push(hex);
|
1540 |
+
hex = o.join('');
|
1541 |
+
}
|
1542 |
+
return hex;
|
1543 |
+
},
|
1544 |
+
restoreOriginal = function () {
|
1545 |
+
var cal = $(this).parent();
|
1546 |
+
var col = cal.data('colpick').origColor;
|
1547 |
+
cal.data('colpick').color = col;
|
1548 |
+
fillRGBFields(col, cal.get(0));
|
1549 |
+
fillHexFields(col, cal.get(0));
|
1550 |
+
fillHSBFields(col, cal.get(0));
|
1551 |
+
setSelector(col, cal.get(0));
|
1552 |
+
setHue(col, cal.get(0));
|
1553 |
+
setNewColor(col, cal.get(0));
|
1554 |
+
};
|
1555 |
+
return {
|
1556 |
+
init: function (opt) {
|
1557 |
+
opt = $.extend({}, defaults, opt || {});
|
1558 |
+
//Set color
|
1559 |
+
if (typeof opt.color == 'string') {
|
1560 |
+
opt.color = hexToHsb(opt.color);
|
1561 |
+
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
1562 |
+
opt.color = rgbToHsb(opt.color);
|
1563 |
+
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
1564 |
+
opt.color = fixHSB(opt.color);
|
1565 |
+
} else {
|
1566 |
+
return this;
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
//For each selected DOM element
|
1570 |
+
return this.each(function () {
|
1571 |
+
//If the element does not have an ID
|
1572 |
+
if (!$(this).data('colpickId')) {
|
1573 |
+
var options = $.extend({}, opt);
|
1574 |
+
options.origColor = opt.color;
|
1575 |
+
//Generate and assign a random ID
|
1576 |
+
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
1577 |
+
$(this).data('colpickId', id);
|
1578 |
+
//Set the tpl's ID and get the HTML
|
1579 |
+
var cal = $(tpl).attr('id', id);
|
1580 |
+
//Add class according to layout
|
1581 |
+
cal.addClass('colpick_' + options.layout + (options.submit ? '' : ' colpick_' + options.layout + '_ns'));
|
1582 |
+
//Add class if the color scheme is not default
|
1583 |
+
if (options.colorScheme != 'light') {
|
1584 |
+
cal.addClass('colpick_' + options.colorScheme);
|
1585 |
+
}
|
1586 |
+
//Setup submit button
|
1587 |
+
cal.find('div.colpick_submit').html(options.submitText).click(clickSubmit);
|
1588 |
+
//Setup input fields
|
1589 |
+
options.fields = cal.find('input').change(change).blur(blur).focus(focus);
|
1590 |
+
cal.find('div.colpick_field_arrs').mousedown(downIncrement).end().find('div.colpick_current_color').click(restoreOriginal);
|
1591 |
+
//Setup hue selector
|
1592 |
+
options.selector = cal.find('div.colpick_color').on('mousedown touchstart', downSelector);
|
1593 |
+
options.selectorIndic = options.selector.find('div.colpick_selector_outer');
|
1594 |
+
//Store parts of the plugin
|
1595 |
+
options.el = this;
|
1596 |
+
options.hue = cal.find('div.colpick_hue_arrs');
|
1597 |
+
huebar = options.hue.parent();
|
1598 |
+
//Paint the hue bar
|
1599 |
+
var UA = navigator.userAgent.toLowerCase();
|
1600 |
+
var isIE = navigator.appName === 'Microsoft Internet Explorer';
|
1601 |
+
var IEver = isIE ? parseFloat(UA.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]) : 0;
|
1602 |
+
var ngIE = (isIE && IEver < 10);
|
1603 |
+
var stops = ['#ff0000', '#ff0080', '#ff00ff', '#8000ff', '#0000ff', '#0080ff', '#00ffff', '#00ff80', '#00ff00', '#80ff00', '#ffff00', '#ff8000', '#ff0000'];
|
1604 |
+
if (ngIE) {
|
1605 |
+
var i, div;
|
1606 |
+
for (i = 0; i <= 11; i++) {
|
1607 |
+
div = $('<div></div>').attr('style', 'height:8.333333%; filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=' + stops[i] + ', endColorstr=' + stops[i + 1] + '); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=' + stops[i] + ', endColorstr=' + stops[i + 1] + ')";');
|
1608 |
+
huebar.append(div);
|
1609 |
+
}
|
1610 |
+
} else {
|
1611 |
+
stopList = stops.join(',');
|
1612 |
+
huebar.attr('style', 'background:-webkit-linear-gradient(top,' + stopList + '); background: -o-linear-gradient(top,' + stopList + '); background: -ms-linear-gradient(top,' + stopList + '); background:-moz-linear-gradient(top,' + stopList + '); -webkit-linear-gradient(top,' + stopList + '); background:linear-gradient(to bottom,' + stopList + '); ');
|
1613 |
+
}
|
1614 |
+
cal.find('div.colpick_hue').on('mousedown touchstart', downHue);
|
1615 |
+
options.newColor = cal.find('div.colpick_new_color');
|
1616 |
+
options.currentColor = cal.find('div.colpick_current_color');
|
1617 |
+
//Store options and fill with default color
|
1618 |
+
cal.data('colpick', options);
|
1619 |
+
fillRGBFields(options.color, cal.get(0));
|
1620 |
+
fillHSBFields(options.color, cal.get(0));
|
1621 |
+
fillHexFields(options.color, cal.get(0));
|
1622 |
+
setHue(options.color, cal.get(0));
|
1623 |
+
setSelector(options.color, cal.get(0));
|
1624 |
+
setCurrentColor(options.color, cal.get(0));
|
1625 |
+
setNewColor(options.color, cal.get(0));
|
1626 |
+
//Append to body if flat=false, else show in place
|
1627 |
+
if (options.flat) {
|
1628 |
+
cal.appendTo(this).show();
|
1629 |
+
cal.css({
|
1630 |
+
position: 'relative',
|
1631 |
+
display: 'block'
|
1632 |
+
});
|
1633 |
+
} else {
|
1634 |
+
cal.appendTo(document.body);
|
1635 |
+
$(this).on(options.showEvent, show);
|
1636 |
+
cal.css({
|
1637 |
+
position: 'absolute'
|
1638 |
+
});
|
1639 |
+
}
|
1640 |
+
}
|
1641 |
+
});
|
1642 |
+
},
|
1643 |
+
//Shows the picker
|
1644 |
+
showPicker: function () {
|
1645 |
+
return this.each(function () {
|
1646 |
+
if ($(this).data('colpickId')) {
|
1647 |
+
show.apply(this);
|
1648 |
+
}
|
1649 |
+
});
|
1650 |
+
},
|
1651 |
+
//Hides the picker
|
1652 |
+
hidePicker: function () {
|
1653 |
+
return this.each(function () {
|
1654 |
+
if ($(this).data('colpickId')) {
|
1655 |
+
$('#' + $(this).data('colpickId')).hide();
|
1656 |
+
}
|
1657 |
+
});
|
1658 |
+
},
|
1659 |
+
//Sets a color as new and current (default)
|
1660 |
+
setColor: function (col, setCurrent) {
|
1661 |
+
setCurrent = (typeof setCurrent === "undefined") ? 1 : setCurrent;
|
1662 |
+
if (typeof col == 'string') {
|
1663 |
+
col = hexToHsb(col);
|
1664 |
+
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
1665 |
+
col = rgbToHsb(col);
|
1666 |
+
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
1667 |
+
col = fixHSB(col);
|
1668 |
+
} else {
|
1669 |
+
return this;
|
1670 |
+
}
|
1671 |
+
return this.each(function () {
|
1672 |
+
if ($(this).data('colpickId')) {
|
1673 |
+
var cal = $('#' + $(this).data('colpickId'));
|
1674 |
+
cal.data('colpick').color = col;
|
1675 |
+
cal.data('colpick').origColor = col;
|
1676 |
+
fillRGBFields(col, cal.get(0));
|
1677 |
+
fillHSBFields(col, cal.get(0));
|
1678 |
+
fillHexFields(col, cal.get(0));
|
1679 |
+
setHue(col, cal.get(0));
|
1680 |
+
setSelector(col, cal.get(0));
|
1681 |
+
|
1682 |
+
setNewColor(col, cal.get(0));
|
1683 |
+
cal.data('colpick').onChange.apply(cal.parent(), [col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el, 1]);
|
1684 |
+
if (setCurrent) {
|
1685 |
+
setCurrentColor(col, cal.get(0));
|
1686 |
+
}
|
1687 |
+
}
|
1688 |
+
});
|
1689 |
+
}
|
1690 |
+
};
|
1691 |
+
}();
|
1692 |
+
//Color space convertions
|
1693 |
+
var hexToRgb = function (hex) {
|
1694 |
+
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
1695 |
+
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
1696 |
+
};
|
1697 |
+
var hexToHsb = function (hex) {
|
1698 |
+
return rgbToHsb(hexToRgb(hex));
|
1699 |
+
};
|
1700 |
+
var rgbToHsb = function (rgb) {
|
1701 |
+
var hsb = {h: 0, s: 0, b: 0};
|
1702 |
+
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
1703 |
+
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
1704 |
+
var delta = max - min;
|
1705 |
+
hsb.b = max;
|
1706 |
+
hsb.s = max != 0 ? 255 * delta / max : 0;
|
1707 |
+
if (hsb.s != 0) {
|
1708 |
+
if (rgb.r == max)
|
1709 |
+
hsb.h = (rgb.g - rgb.b) / delta;
|
1710 |
+
else if (rgb.g == max)
|
1711 |
+
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
1712 |
+
else
|
1713 |
+
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
1714 |
+
} else
|
1715 |
+
hsb.h = -1;
|
1716 |
+
hsb.h *= 60;
|
1717 |
+
if (hsb.h < 0)
|
1718 |
+
hsb.h += 360;
|
1719 |
+
hsb.s *= 100 / 255;
|
1720 |
+
hsb.b *= 100 / 255;
|
1721 |
+
return hsb;
|
1722 |
+
};
|
1723 |
+
var hsbToRgb = function (hsb) {
|
1724 |
+
var rgb = {};
|
1725 |
+
var h = hsb.h;
|
1726 |
+
var s = hsb.s * 255 / 100;
|
1727 |
+
var v = hsb.b * 255 / 100;
|
1728 |
+
if (s == 0) {
|
1729 |
+
rgb.r = rgb.g = rgb.b = v;
|
1730 |
+
} else {
|
1731 |
+
var t1 = v;
|
1732 |
+
var t2 = (255 - s) * v / 255;
|
1733 |
+
var t3 = (t1 - t2) * (h % 60) / 60;
|
1734 |
+
if (h == 360)
|
1735 |
+
h = 0;
|
1736 |
+
if (h < 60) {
|
1737 |
+
rgb.r = t1;
|
1738 |
+
rgb.b = t2;
|
1739 |
+
rgb.g = t2 + t3
|
1740 |
+
} else if (h < 120) {
|
1741 |
+
rgb.g = t1;
|
1742 |
+
rgb.b = t2;
|
1743 |
+
rgb.r = t1 - t3
|
1744 |
+
} else if (h < 180) {
|
1745 |
+
rgb.g = t1;
|
1746 |
+
rgb.r = t2;
|
1747 |
+
rgb.b = t2 + t3
|
1748 |
+
} else if (h < 240) {
|
1749 |
+
rgb.b = t1;
|
1750 |
+
rgb.r = t2;
|
1751 |
+
rgb.g = t1 - t3
|
1752 |
+
} else if (h < 300) {
|
1753 |
+
rgb.b = t1;
|
1754 |
+
rgb.g = t2;
|
1755 |
+
rgb.r = t2 + t3
|
1756 |
+
} else if (h < 360) {
|
1757 |
+
rgb.r = t1;
|
1758 |
+
rgb.g = t2;
|
1759 |
+
rgb.b = t1 - t3
|
1760 |
+
} else {
|
1761 |
+
rgb.r = 0;
|
1762 |
+
rgb.g = 0;
|
1763 |
+
rgb.b = 0
|
1764 |
+
}
|
1765 |
+
}
|
1766 |
+
return {r: Math.round(rgb.r), g: Math.round(rgb.g), b: Math.round(rgb.b)};
|
1767 |
+
};
|
1768 |
+
var rgbToHex = function (rgb) {
|
1769 |
+
var hex = [
|
1770 |
+
rgb.r.toString(16),
|
1771 |
+
rgb.g.toString(16),
|
1772 |
+
rgb.b.toString(16)
|
1773 |
+
];
|
1774 |
+
$.each(hex, function (nr, val) {
|
1775 |
+
if (val.length == 1) {
|
1776 |
+
hex[nr] = '0' + val;
|
1777 |
+
}
|
1778 |
+
});
|
1779 |
+
return hex.join('');
|
1780 |
+
};
|
1781 |
+
var hsbToHex = function (hsb) {
|
1782 |
+
return rgbToHex(hsbToRgb(hsb));
|
1783 |
+
};
|
1784 |
+
$.fn.extend({
|
1785 |
+
colpick: colpick.init,
|
1786 |
+
colpickHide: colpick.hidePicker,
|
1787 |
+
colpickShow: colpick.showPicker,
|
1788 |
+
colpickSetColor: colpick.setColor
|
1789 |
+
});
|
1790 |
+
$.extend({
|
1791 |
+
colpick: {
|
1792 |
+
rgbToHex: rgbToHex,
|
1793 |
+
rgbToHsb: rgbToHsb,
|
1794 |
+
hsbToHex: hsbToHex,
|
1795 |
+
hsbToRgb: hsbToRgb,
|
1796 |
+
hexToHsb: hexToHsb,
|
1797 |
+
hexToRgb: hexToRgb
|
1798 |
+
}
|
1799 |
+
});
|
1800 |
Â
})(jQuery);
|
assets/js/quads-admin.min.js
CHANGED
@@ -1,1800 +1,1800 @@
|
|
1 |
-
var strict;
|
2 |
-
|
3 |
-
|
4 |
-
jQuery(document).ready(function ($) {
|
5 |
-
|
6 |
-
// show / hide helper description
|
7 |
-
$('.quads-tooltip').click(function (e) {
|
8 |
-
e.preventDefault();
|
9 |
-
var icon = $(this),
|
10 |
-
bubble = $(this).next();
|
11 |
-
|
12 |
-
// Close any that are already open
|
13 |
-
$('.quads-tooltip-message').not(bubble).hide();
|
14 |
-
|
15 |
-
var position = icon.position();
|
16 |
-
if (bubble.hasClass('bottom')) {
|
17 |
-
bubble.css({
|
18 |
-
'left': (position.left - bubble.width() / 2) + 'px',
|
19 |
-
'top': (position.top + icon.height() + 9) + 'px'
|
20 |
-
});
|
21 |
-
} else {
|
22 |
-
bubble.css({
|
23 |
-
'left': (position.left + icon.width() + 9) + 'px',
|
24 |
-
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
25 |
-
});
|
26 |
-
}
|
27 |
-
|
28 |
-
bubble.toggle();
|
29 |
-
e.stopPropagation();
|
30 |
-
});
|
31 |
-
|
32 |
-
$('body').click(function () {
|
33 |
-
$('.quads-tooltip-message').hide();
|
34 |
-
});
|
35 |
-
|
36 |
-
$('.quads-tooltip-message').click(function (e) {
|
37 |
-
e.stopPropagation();
|
38 |
-
});
|
39 |
-
|
40 |
-
|
41 |
-
// vi login process
|
42 |
-
$("#quads_vi_login_submit").click(function(e){
|
43 |
-
e.preventDefault();
|
44 |
-
username = $("#quads-vi-email").val();
|
45 |
-
password = $("#quads-vi-password").val();
|
46 |
-
|
47 |
-
var data = '{"email":"' + username + '", "password":"' + password + '"}';
|
48 |
-
|
49 |
-
$.ajax({
|
50 |
-
type: "POST",
|
51 |
-
//url: "https://dashboard-api-test.vidint.net/v1/api/authenticate",
|
52 |
-
url: quads.vi_login_url,
|
53 |
-
contentType: 'application/json',
|
54 |
-
data: data,
|
55 |
-
statusCode: {
|
56 |
-
502: function () {
|
57 |
-
$("#quads_add_err").html("502 Bad Gateway. Contact support[at]vi.ai");
|
58 |
-
console.log('502 Bad Gateway.');
|
59 |
-
return false;
|
60 |
-
},
|
61 |
-
500: function () {
|
62 |
-
$("#quads_add_err").html("500 Bad Gateway. Contact support[at]vi.ai");
|
63 |
-
console.log('500 Bad Gateway.');
|
64 |
-
return false;
|
65 |
-
}
|
66 |
-
},
|
67 |
-
success: function(response){
|
68 |
-
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
69 |
-
$("#quads_add_err").hide();
|
70 |
-
if (typeof response.data !== 'undefined') {
|
71 |
-
$("#quads_add_err").html("We are logging you in");
|
72 |
-
console.log('We are logging you in' + response);
|
73 |
-
saveViToken(response.data);
|
74 |
-
}
|
75 |
-
else {
|
76 |
-
$("#quads_add_err").html("No valid API response. Can not log you in. Contact support[at]vi.ai");
|
77 |
-
console.log('no valid api response' + response);
|
78 |
-
}
|
79 |
-
},
|
80 |
-
error: function(response){
|
81 |
-
// check if xhr.status is defined in $.ajax.statusCode
|
82 |
-
// if true, return false to stop this function
|
83 |
-
if (typeof this.statusCode[response.status] != 'undefined') {
|
84 |
-
return false;
|
85 |
-
}
|
86 |
-
|
87 |
-
var result = typeof response.responseText !== 'undefined' ? JSON.parse(response.responseText) : '';
|
88 |
-
$("#quads_add_err").html(result.error.message + ' ' + result.error.description);
|
89 |
-
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
90 |
-
$("#quads_add_err").show();
|
91 |
-
$("#quads_add_err").removeClass('quads-spinner');
|
92 |
-
console.log(result);
|
93 |
-
//exit;
|
94 |
-
},
|
95 |
-
beforeSend:function()
|
96 |
-
{
|
97 |
-
$("#quads_vi_loading").css('display', 'inline', 'important').css('visibility', 'visible');
|
98 |
-
$("#quads_add_err").show();
|
99 |
-
},
|
100 |
-
|
101 |
-
complete:function()
|
102 |
-
{
|
103 |
-
$("#quads_vi_loading").css('display', 'none', 'important').css('visibility', 'hidden');
|
104 |
-
}
|
105 |
-
|
106 |
-
});
|
107 |
-
return false;
|
108 |
-
});
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Save vi token
|
112 |
-
*/
|
113 |
-
function saveViToken(token){
|
114 |
-
var data = {
|
115 |
-
'action': 'quads_save_vi_token',
|
116 |
-
'token': token
|
117 |
-
};
|
118 |
-
$.ajax({
|
119 |
-
type: "POST",
|
120 |
-
url: ajaxurl,
|
121 |
-
dataType: "json",
|
122 |
-
data: data,
|
123 |
-
//contentType: 'application/json;charset=utf-8',
|
124 |
-
success: function(response){
|
125 |
-
//response = JSON.stringify(response);
|
126 |
-
console.log(response.status);
|
127 |
-
|
128 |
-
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
129 |
-
$("#quads_add_err").hide();
|
130 |
-
if (typeof response.status != 'undefined' && response.status == 'success') {
|
131 |
-
console.log('Success, login succesfull, token stored' + response);
|
132 |
-
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
133 |
-
return false;
|
134 |
-
}
|
135 |
-
else {
|
136 |
-
console.log("Can not store token");
|
137 |
-
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
138 |
-
return false;
|
139 |
-
}
|
140 |
-
},
|
141 |
-
beforeSend:function()
|
142 |
-
{
|
143 |
-
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
144 |
-
$("#quads_add_err").show();
|
145 |
-
},
|
146 |
-
complete:function()
|
147 |
-
{
|
148 |
-
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
149 |
-
$("#quads_add_err").hide();
|
150 |
-
}
|
151 |
-
|
152 |
-
});
|
153 |
-
}
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
// Remove several unused elements from vi page
|
159 |
-
if (document.location.href.indexOf('vi_header') > - 1) {
|
160 |
-
$('#quads-submit-button').hide();
|
161 |
-
$('#quads-validate').hide();
|
162 |
-
$('#quads-footer').hide();
|
163 |
-
} else {
|
164 |
-
$('#quads-submit-button').show();
|
165 |
-
$('#quads-validate').show();
|
166 |
-
$('#quads-footer').show();
|
167 |
-
}
|
168 |
-
$(window).bind('easytabs:after', function(){
|
169 |
-
if (document.location.href.indexOf('vi_header') > - 1) {
|
170 |
-
$('#quads-submit-button').hide();
|
171 |
-
$('#quads-validate').hide();
|
172 |
-
$('#quads-footer').hide();
|
173 |
-
} else {
|
174 |
-
|
175 |
-
$('#quads-submit-button').show();
|
176 |
-
$('#quads-validate').show();
|
177 |
-
$('#quads-footer').show();
|
178 |
-
}
|
179 |
-
});
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
// VI signup form
|
186 |
-
$('#quads-vi-signup').click(function(e){
|
187 |
-
e.preventDefault();
|
188 |
-
// scroll to top
|
189 |
-
$(window).scrollTop(0);
|
190 |
-
// hide save button
|
191 |
-
$('#quads-submit-button').hide();
|
192 |
-
$('#quads-vi-signup-fullscreen').fadeIn();
|
193 |
-
});
|
194 |
-
$('#quads-vi-close').click(function(e){
|
195 |
-
e.preventDefault();
|
196 |
-
$('#quads-vi-signup-fullscreen').fadeOut();
|
197 |
-
});
|
198 |
-
|
199 |
-
/**
|
200 |
-
* General Tab
|
201 |
-
*/
|
202 |
-
// Inactive select fields are greyed out
|
203 |
-
$('.quads-assign').each(function(e){
|
204 |
-
if (!$(this).prop('checked')){
|
205 |
-
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
206 |
-
}else {
|
207 |
-
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
208 |
-
}
|
209 |
-
});
|
210 |
-
|
211 |
-
$('.quads-assign').click(function(){
|
212 |
-
if (!$(this).prop('checked')){
|
213 |
-
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
214 |
-
} else {
|
215 |
-
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
216 |
-
}
|
217 |
-
});
|
218 |
-
|
219 |
-
/**
|
220 |
-
* AdSense Code Tab
|
221 |
-
*/
|
222 |
-
// Check if submit button is visible than stick it to the bottom of the page
|
223 |
-
$(window).scroll(function() {
|
224 |
-
|
225 |
-
var elem = '#quads_tab_container .submit';
|
226 |
-
|
227 |
-
if ($(elem).length < 1){
|
228 |
-
return;
|
229 |
-
}
|
230 |
-
|
231 |
-
var top_of_element = $(elem).offset().top;
|
232 |
-
var bottom_of_element = $(elem).offset().top + $(elem).outerHeight(false);
|
233 |
-
var bottom_of_screen = $(window).scrollTop() + $(window).height();
|
234 |
-
if (bottom_of_screen > top_of_element){
|
235 |
-
// The element is visible, do something
|
236 |
-
$('#quads-submit-button').css('position', 'relative').css('bottom', '20px');
|
237 |
-
} else {
|
238 |
-
// The element is NOT visible, do something else
|
239 |
-
$('#quads-submit-button').css('position', 'fixed').css('bottom', '20px');
|
240 |
-
}
|
241 |
-
});
|
242 |
-
|
243 |
-
// Activate chosen select boxes
|
244 |
-
// $(".quads-chosen-select").chosen({
|
245 |
-
// inherit_select_classes: true
|
246 |
-
// });
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
// Hid or show AMP code form on click on amp checkbox
|
251 |
-
$('.quads-activate-amp').click(function(){
|
252 |
-
var parent = $(this).parents('.quads-ad-toggle-container').attr('id');
|
253 |
-
if ($(this).attr('checked') === 'checked') {
|
254 |
-
$('#' + parent).find('.quads-amp-code').show();
|
255 |
-
} else {
|
256 |
-
$('#' + parent).find('.quads-amp-code').hide();
|
257 |
-
}
|
258 |
-
});
|
259 |
-
|
260 |
-
|
261 |
-
// Hide or show AMP code form on loading
|
262 |
-
$('.quads-ad-toggle-container').find('.quads-activate-amp').each(function (index, value) {
|
263 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
264 |
-
if ($(this).attr( 'checked') === 'checked' ) {
|
265 |
-
$('#' + parentContainerID).find('.quads-amp-code').show();
|
266 |
-
}else {
|
267 |
-
$('#' + parentContainerID).find('.quads-amp-code').hide();
|
268 |
-
}
|
269 |
-
});
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Toggle Button | Open All Ads
|
275 |
-
*/
|
276 |
-
$('#quads-open-toggle').click(function(){
|
277 |
-
if ($('#quads-open-toggle').text() === 'Open All Ads' ){
|
278 |
-
$('.quads-ad-toggle-container').show();
|
279 |
-
$('#quads-open-toggle').html('Close Ads');
|
280 |
-
}else{
|
281 |
-
$('.quads-ad-toggle-container').hide();
|
282 |
-
$('#quads-open-toggle').html('Open All Ads');
|
283 |
-
}
|
284 |
-
});
|
285 |
-
|
286 |
-
// show / hide helper description
|
287 |
-
$('.quads-helper').click(function (e) {
|
288 |
-
e.preventDefault();
|
289 |
-
var icon = $(this),
|
290 |
-
bubble = $(this).next();
|
291 |
-
|
292 |
-
// Close any that are already open
|
293 |
-
$('.quads-message').not(bubble).hide();
|
294 |
-
|
295 |
-
var position = icon.position();
|
296 |
-
if (bubble.hasClass('bottom')) {
|
297 |
-
bubble.css({
|
298 |
-
'left': (position.left - bubble.width() / 2) + 'px',
|
299 |
-
'top': (position.top + icon.height() + 9) + 'px'
|
300 |
-
});
|
301 |
-
} else {
|
302 |
-
bubble.css({
|
303 |
-
'left': (position.left + icon.width() + 9) + 'px',
|
304 |
-
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
305 |
-
});
|
306 |
-
}
|
307 |
-
|
308 |
-
bubble.toggle();
|
309 |
-
e.stopPropagation();
|
310 |
-
});
|
311 |
-
$('.quads-general-helper').click(function (e) {
|
312 |
-
e.preventDefault();
|
313 |
-
var icon = $(this),
|
314 |
-
bubble = $(this).next();
|
315 |
-
|
316 |
-
// Close any that are already open
|
317 |
-
$('.quads-message').not(bubble).hide();
|
318 |
-
|
319 |
-
var position = icon.position();
|
320 |
-
if (bubble.hasClass('bottom')) {
|
321 |
-
bubble.css({
|
322 |
-
'left': (position.left - bubble.width() / 2) + 'px',
|
323 |
-
'top': (position.top + icon.height() + 9) + 'px'
|
324 |
-
});
|
325 |
-
} else {
|
326 |
-
bubble.css({
|
327 |
-
'left': (position.left + icon.width() + 9) + 'px',
|
328 |
-
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
329 |
-
});
|
330 |
-
}
|
331 |
-
|
332 |
-
bubble.toggle();
|
333 |
-
e.stopPropagation();
|
334 |
-
});
|
335 |
-
|
336 |
-
$('body').click(function () {
|
337 |
-
$('.quads-message').hide();
|
338 |
-
});
|
339 |
-
|
340 |
-
$('.quads-message').click(function (e) {
|
341 |
-
e.stopPropagation();
|
342 |
-
});
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Save settings via ajax
|
346 |
-
*/
|
347 |
-
|
348 |
-
jQuery('#quads_settings').submit(function() {
|
349 |
-
|
350 |
-
// Check if ad name has been changed and prepare new data for saving
|
351 |
-
$('.quads-toogle-title').each(function(){
|
352 |
-
$(this).children('input').val($(this).text());
|
353 |
-
});
|
354 |
-
|
355 |
-
|
356 |
-
// Check current url / settings page
|
357 |
-
var url = window.location.search;
|
358 |
-
var tab_imexport = url.search("page=quads-settings&tab=imexport");
|
359 |
-
var tab_licenses = url.search("page=quads-settings&tab=licenses");
|
360 |
-
|
361 |
-
jQuery('#quads-save-result').html("<div id='quads-loader' class='quads-loader'></div>");
|
362 |
-
jQuery('#quads-loader').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/loader1.gif"></p>').show();
|
363 |
-
jQuery(this).ajaxSubmit({
|
364 |
-
|
365 |
-
success: function(){
|
366 |
-
jQuery('#quads-save-result').html("<div id='quads-save-message' class='quads-success-modal'></div>");
|
367 |
-
jQuery('#quads-save-message').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/saved.gif"></p>').show();
|
368 |
-
quads_hide_success_message();
|
369 |
-
},
|
370 |
-
//,timeout: 0,
|
371 |
-
|
372 |
-
error: function(){
|
373 |
-
//Do not show alert on import/export tab
|
374 |
-
if ( tab_imexport === -1 && tab_licenses === -1 ){
|
375 |
-
alert ('Error: Can not save settings. Try again');
|
376 |
-
}
|
377 |
-
jQuery('#quads-save-result').hide('fast');
|
378 |
-
}
|
379 |
-
});
|
380 |
-
// Do not use ajax saving on import/export and licenses tab
|
381 |
-
if ( tab_imexport === -1 && tab_licenses ===-1 ){
|
382 |
-
return false;
|
383 |
-
}
|
384 |
-
});
|
385 |
-
|
386 |
-
function quads_hide_success_message(){
|
387 |
-
setTimeout("jQuery('#quads-save-message').hide()", 1000);
|
388 |
-
}
|
389 |
-
|
390 |
-
|
391 |
-
/**
|
392 |
-
* Paste AdSense Code form
|
393 |
-
*/
|
394 |
-
$(document).on('click', '#quads-paste-button', function () {
|
395 |
-
|
396 |
-
var content = $('#quads-adsense-form').val();
|
397 |
-
var parseResult = quadsParseAdSenseCode(content);
|
398 |
-
if (false !== parseResult) {
|
399 |
-
console.log(parseResult);
|
400 |
-
setDetailsFromAdCode(parseResult);
|
401 |
-
}else{
|
402 |
-
$('#quads-msg').html('Can not parse AdSense Code. Is the code valid?');
|
403 |
-
$('#quads-msg').show();
|
404 |
-
}
|
405 |
-
});
|
406 |
-
|
407 |
-
|
408 |
-
/**
|
409 |
-
* Populate AdSense Date Fields
|
410 |
-
*
|
411 |
-
* @param object adsense
|
412 |
-
* @param2 string id of the parent container
|
413 |
-
* @returns false
|
414 |
-
*/
|
415 |
-
function setDetailsFromAdCode(GoogleAd) {
|
416 |
-
|
417 |
-
var containerID = $('#quads-adsense-id').val();
|
418 |
-
|
419 |
-
var id = containerID.replace("quads-toggle", "");
|
420 |
-
|
421 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_slot\\]').val(GoogleAd.slotId);
|
422 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_client\\]').val(GoogleAd.pubId);
|
423 |
-
if ('normal' == GoogleAd.type) {
|
424 |
-
console.log($('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]'));
|
425 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('normal');
|
426 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val(GoogleAd.width);
|
427 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val(GoogleAd.height);
|
428 |
-
}
|
429 |
-
if ('responsive' == GoogleAd.type) {
|
430 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('responsive');
|
431 |
-
//$('#ad-resize-type').val('auto');
|
432 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val('');
|
433 |
-
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val('');
|
434 |
-
}
|
435 |
-
// Trigger the ad type select
|
436 |
-
$('.quads-select-Type').trigger('change');
|
437 |
-
// Hide the overlay
|
438 |
-
$('#quads-adsense-bg-div').hide();
|
439 |
-
// Ad code input form must not be empty!
|
440 |
-
if ($('#' + containerID).children('textarea').val().length === 0){
|
441 |
-
$('#' + containerID).children('textarea').val('adsense');
|
442 |
-
}
|
443 |
-
|
444 |
-
|
445 |
-
}
|
446 |
-
|
447 |
-
/**
|
448 |
-
* Parse the adsense ad content
|
449 |
-
* @param {type} content
|
450 |
-
* @returns {quads-admin.min_L3.parseAdContent.GoogleAd|Boolean}
|
451 |
-
*/
|
452 |
-
function quadsParseAdSenseCode(content) {
|
453 |
-
|
454 |
-
var rawContent = ('undefined' != typeof (content)) ? content.trim() : '';
|
455 |
-
var GoogleAd = {};
|
456 |
-
var theContent = $('<div />').html(rawContent);
|
457 |
-
var asyncGoogleAd = theContent.find('ins');
|
458 |
-
//var syncGoogleAd = theContent.search('google_ad_client');
|
459 |
-
|
460 |
-
// Its a async adsense ad
|
461 |
-
if (asyncGoogleAd.length > 0) {
|
462 |
-
console.log('async ad');
|
463 |
-
|
464 |
-
// Ad Slot ID
|
465 |
-
GoogleAd.slotId = asyncGoogleAd.attr('data-ad-slot');
|
466 |
-
|
467 |
-
if ('undefined' != typeof (asyncGoogleAd.attr('data-ad-client'))) {
|
468 |
-
// Ad Publisher ID
|
469 |
-
GoogleAd.pubId = asyncGoogleAd.attr('data-ad-client').substr(3);
|
470 |
-
}
|
471 |
-
|
472 |
-
if (undefined !== GoogleAd.slotId && '' != GoogleAd.pubId) {
|
473 |
-
GoogleAd.display = asyncGoogleAd.css('display');
|
474 |
-
GoogleAd.format = asyncGoogleAd.attr('data-ad-format');
|
475 |
-
GoogleAd.style = asyncGoogleAd.attr('style');
|
476 |
-
|
477 |
-
if ('undefined' == typeof (GoogleAd.format) && -1 != GoogleAd.style.indexOf('width')) {
|
478 |
-
/* normal ad */
|
479 |
-
GoogleAd.type = 'normal';
|
480 |
-
GoogleAd.width = asyncGoogleAd.css('width').replace('px', '');
|
481 |
-
GoogleAd.height = asyncGoogleAd.css('height').replace('px', '');
|
482 |
-
return GoogleAd;
|
483 |
-
}
|
484 |
-
|
485 |
-
if ('undefined' != typeof (GoogleAd.format) && 'auto' == GoogleAd.format) {
|
486 |
-
/* Responsive ad, auto resize */
|
487 |
-
GoogleAd.type = 'responsive';
|
488 |
-
return GoogleAd;
|
489 |
-
}
|
490 |
-
return GoogleAd;
|
491 |
-
}
|
492 |
-
|
493 |
-
return false;
|
494 |
-
}
|
495 |
-
|
496 |
-
// Google syncronous ad
|
497 |
-
if (rawContent.search('google_ad_client') > 0) {
|
498 |
-
console.log('syncronous code');
|
499 |
-
|
500 |
-
// Ad Slot ID
|
501 |
-
GoogleAd.slotId = get_google_ad_slot(content);
|
502 |
-
|
503 |
-
console.log(get_google_ad_slot(content));
|
504 |
-
console.log(get_google_ad_client(content));
|
505 |
-
console.log(get_google_ad_height(content));
|
506 |
-
console.log(get_google_ad_width(content));
|
507 |
-
|
508 |
-
if (!quadsIsEmpty(get_google_ad_client(content))) {
|
509 |
-
// Ad Publisher ID
|
510 |
-
GoogleAd.pubId = 'ca-pub-' + get_google_ad_client(content);
|
511 |
-
}else{
|
512 |
-
return false;
|
513 |
-
}
|
514 |
-
|
515 |
-
if (!quadsIsEmpty(GoogleAd.slotId) && !quadsIsEmpty(GoogleAd.pubId)) {
|
516 |
-
|
517 |
-
if (!quadsIsEmpty(get_google_ad_width(content))) {
|
518 |
-
GoogleAd.type = 'normal';
|
519 |
-
GoogleAd.width = get_google_ad_width(content);
|
520 |
-
GoogleAd.height = get_google_ad_height(content);
|
521 |
-
return GoogleAd;
|
522 |
-
}
|
523 |
-
}
|
524 |
-
return false;
|
525 |
-
}
|
526 |
-
|
527 |
-
return false;
|
528 |
-
}
|
529 |
-
|
530 |
-
function get_google_ad_slot(content) {
|
531 |
-
const regex = /google_ad_slot\s*=\s*"(\d*)";/g;
|
532 |
-
const str = content;
|
533 |
-
var m;
|
534 |
-
var result = {};
|
535 |
-
|
536 |
-
while ((m = regex.exec(str)) !== null) {
|
537 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
538 |
-
if (m.index === regex.lastIndex) {
|
539 |
-
regex.lastIndex++;
|
540 |
-
}
|
541 |
-
|
542 |
-
// The result can be accessed through the `m`-variable.
|
543 |
-
m.forEach(function(match, index){
|
544 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
545 |
-
console.log(match);
|
546 |
-
result = match;
|
547 |
-
});
|
548 |
-
}
|
549 |
-
return result;
|
550 |
-
}
|
551 |
-
function get_google_ad_client(content) {
|
552 |
-
const regex = /google_ad_client\s*=\s*"ca-pub-(\d*)";/g;
|
553 |
-
const str = content;
|
554 |
-
var m;
|
555 |
-
var result = {};
|
556 |
-
|
557 |
-
while ((m = regex.exec(str)) !== null) {
|
558 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
559 |
-
if (m.index === regex.lastIndex) {
|
560 |
-
regex.lastIndex++;
|
561 |
-
}
|
562 |
-
|
563 |
-
// The result can be accessed through the `m`-variable.
|
564 |
-
m.forEach(function(match, index){
|
565 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
566 |
-
console.log(match);
|
567 |
-
result = match;
|
568 |
-
});
|
569 |
-
}
|
570 |
-
return result;
|
571 |
-
}
|
572 |
-
function get_google_ad_width(content) {
|
573 |
-
const regex = /google_ad_width\s*=\s*(\d*);/g;
|
574 |
-
const str = content;
|
575 |
-
var m;
|
576 |
-
var result = {};
|
577 |
-
|
578 |
-
while ((m = regex.exec(str)) !== null) {
|
579 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
580 |
-
if (m.index === regex.lastIndex) {
|
581 |
-
regex.lastIndex++;
|
582 |
-
}
|
583 |
-
|
584 |
-
// The result can be accessed through the `m`-variable.
|
585 |
-
m.forEach(function(match, index){
|
586 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
587 |
-
console.log(match);
|
588 |
-
result = match;
|
589 |
-
});
|
590 |
-
}
|
591 |
-
return result;
|
592 |
-
}
|
593 |
-
function get_google_ad_height(content) {
|
594 |
-
const regex = /google_ad_height\s*=\s*(\d*);/g;
|
595 |
-
const str = content;
|
596 |
-
var m;
|
597 |
-
var result = {};
|
598 |
-
|
599 |
-
while ((m = regex.exec(str)) !== null) {
|
600 |
-
// This is necessary to avoid infinite loops with zero-width matches
|
601 |
-
if (m.index === regex.lastIndex) {
|
602 |
-
regex.lastIndex++;
|
603 |
-
}
|
604 |
-
|
605 |
-
// The result can be accessed through the `m`-variable.
|
606 |
-
m.forEach(function(match, index){
|
607 |
-
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
608 |
-
console.log(match);
|
609 |
-
result = match;
|
610 |
-
});
|
611 |
-
}
|
612 |
-
return result;
|
613 |
-
}
|
614 |
-
|
615 |
-
/**
|
616 |
-
* Check if return value is empty or not
|
617 |
-
* @param {type} str
|
618 |
-
* @returns {Boolean}
|
619 |
-
*/
|
620 |
-
function quadsIsEmpty(str) {
|
621 |
-
return (!str || 0 === str.length);
|
622 |
-
}
|
623 |
-
|
624 |
-
// AdSense Code Input Form
|
625 |
-
$(document).on('click', '.quads-add-adsense', function (e) {
|
626 |
-
e.preventDefault();
|
627 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
628 |
-
// Empty the ad plain text form
|
629 |
-
$('#quads-adsense-form').val('');
|
630 |
-
$('#quads-adsense-id').val(parentContainerID);
|
631 |
-
$('#quads-adsense-bg-div').show();
|
632 |
-
});
|
633 |
-
$(document).on('click', '#quads-close-button', function (e) {
|
634 |
-
e.preventDefault();
|
635 |
-
$('#quads-adsense-bg-div').hide();
|
636 |
-
});
|
637 |
-
|
638 |
-
|
639 |
-
// Toggle between AdSense or Plain Text option
|
640 |
-
$(document).on('click', '.quads_adsense_type', function () {
|
641 |
-
|
642 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
643 |
-
|
644 |
-
if ($(this).val() === 'adsense') {
|
645 |
-
$('#' + parentContainerID).children('textarea').hide();
|
646 |
-
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
647 |
-
$('#' + parentContainerID).find('.quads-sizes').show();
|
648 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
649 |
-
|
650 |
-
}
|
651 |
-
if ($(this).val() === 'plain_text') {
|
652 |
-
$('#' + parentContainerID).children('textarea').show();
|
653 |
-
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
654 |
-
$('#' + parentContainerID).find('.quads-sizes').hide();
|
655 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
656 |
-
}
|
657 |
-
});
|
658 |
-
|
659 |
-
|
660 |
-
// Hide or show AdSense elements on loading
|
661 |
-
$('.quads-ad-toggle-container').find('.quads_adsense_type').each(function (index, value) {
|
662 |
-
|
663 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
664 |
-
|
665 |
-
if ($(this).attr('checked') === 'checked' && $(this).val() === 'adsense') {
|
666 |
-
$('#' + parentContainerID).children('textarea').fadeOut();
|
667 |
-
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
668 |
-
}
|
669 |
-
if ($(this).attr('checked') === 'checked' && $(this).val() === 'plain_text') {
|
670 |
-
$('#' + parentContainerID).children('textarea').fadeIn();
|
671 |
-
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
672 |
-
}
|
673 |
-
});
|
674 |
-
|
675 |
-
|
676 |
-
// Hide or show AdSense width and height on loading
|
677 |
-
$('.quads-ad-toggle-container').find('.quads-select-Type').each(function (index, value) {
|
678 |
-
|
679 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
680 |
-
|
681 |
-
if ($(this).val() === 'responsive') {
|
682 |
-
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
683 |
-
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
684 |
-
$('#' + parentContainerID).find('.quads-sizes').show();
|
685 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
686 |
-
}
|
687 |
-
if ($(this).val() === 'normal') {
|
688 |
-
$('#' + parentContainerID).find('.quads-type-normal').show();
|
689 |
-
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
690 |
-
$('#' + parentContainerID).find('.quads-sizes').hide();
|
691 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
692 |
-
}
|
693 |
-
});
|
694 |
-
|
695 |
-
|
696 |
-
// Toggle between Fixed Size or Responsive ad type
|
697 |
-
$(document).on('change', '.quads-select-Type', function () {
|
698 |
-
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
699 |
-
|
700 |
-
if ($(this).val() === 'responsive') {
|
701 |
-
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
702 |
-
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
703 |
-
$('#' + parentContainerID).find('.quads-sizes').show();
|
704 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
705 |
-
}
|
706 |
-
if ($(this).val() === 'normal') {
|
707 |
-
$('#' + parentContainerID).find('.quads-type-normal').show();
|
708 |
-
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
709 |
-
$('#' + parentContainerID).find('.quads-sizes').hide();
|
710 |
-
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
711 |
-
}
|
712 |
-
});
|
713 |
-
|
714 |
-
//*[@id="quads-togglead1"]/div[2]
|
715 |
-
/**
|
716 |
-
* Toggle the adsense container
|
717 |
-
*/
|
718 |
-
//$('.quads-ad-toggle-header').click(function (e) {
|
719 |
-
$('.quads-form-table').on('click', '.quads-ad-toggle-header', function(e) {
|
720 |
-
e.preventDefault();
|
721 |
-
|
722 |
-
var container = $('#' + $(this).data('box-id'));
|
723 |
-
//console.log(container);
|
724 |
-
container.toggle(0, function () {
|
725 |
-
if (container.parents('.quads-ad-toggle-header').hasClass('quads-box-close')) {
|
726 |
-
// open the box
|
727 |
-
container.parents('.quads-ad-toggle-header').removeClass('quads-box-close');
|
728 |
-
} else {
|
729 |
-
container.parents('.quads-ad-toggle-header').addClass('quads-box-close');
|
730 |
-
}
|
731 |
-
});
|
732 |
-
});
|
733 |
-
|
734 |
-
/*
|
735 |
-
* Quick Adsense import process
|
736 |
-
*/
|
737 |
-
|
738 |
-
jQuery('.quads-import-settings').click(function (e) {
|
739 |
-
e.preventDefault();
|
740 |
-
|
741 |
-
if (!confirm('Importing settings from Quick AdSense will overwrite all your current settings. Are you sure?'))
|
742 |
-
return;
|
743 |
-
|
744 |
-
jQuery('#quads-import-settings').addClass('loading');
|
745 |
-
var data = {
|
746 |
-
action: 'quads_import_quick_adsense',
|
747 |
-
nonce: quads.nonce,
|
748 |
-
};
|
749 |
-
$.post(ajaxurl, data, function (resp, status, xhr) {
|
750 |
-
|
751 |
-
//console.log('success:' + resp + status + xhr);
|
752 |
-
quads_show_message(resp);
|
753 |
-
|
754 |
-
}).fail(function (xhr) { // Will be executed when $.post() fails
|
755 |
-
quads_show_message('Ajax Error: ' + xhr.status + ' ' + xhr.statusText);
|
756 |
-
//console.log('error: ' + xhr.statusText);
|
757 |
-
});
|
758 |
-
});
|
759 |
-
|
760 |
-
jQuery('#quads_insert_ads_action').click(function (e) {
|
761 |
-
e.preventDefault();
|
762 |
-
jQuery('#quads_insert_ads_box').toggle();
|
763 |
-
});
|
764 |
-
|
765 |
-
jQuery('#quads_disable_ads_action').click(function (e) {
|
766 |
-
e.preventDefault();
|
767 |
-
jQuery('#quads_disable_ads_box').toggle();
|
768 |
-
});
|
769 |
-
|
770 |
-
|
771 |
-
/**
|
772 |
-
* Show error message and die()
|
773 |
-
* Writes error message into log file
|
774 |
-
*
|
775 |
-
* @param {string} $error notice
|
776 |
-
* @returns void
|
777 |
-
*/
|
778 |
-
function quads_show_message(error) {
|
779 |
-
$('#quads-error-details').show();
|
780 |
-
$('#quads-error-details').html(error);
|
781 |
-
console.log(error);
|
782 |
-
}
|
783 |
-
|
784 |
-
|
785 |
-
/**
|
786 |
-
* Start easytabs()
|
787 |
-
*/
|
788 |
-
if ($(".quads-tabs").length) {
|
789 |
-
$('#quads_tab_container').easytabs({
|
790 |
-
animate: true,
|
791 |
-
updateHash: true,
|
792 |
-
animationSpeed: 'fast'
|
793 |
-
});
|
794 |
-
}
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
}); // document ready
|
800 |
-
|
801 |
-
/*
|
802 |
-
* jQuery hashchange event - v1.3 - 7/21/2010
|
803 |
-
* http://benalman.com/projects/jquery-hashchange-plugin/
|
804 |
-
*
|
805 |
-
* Copyright (c) 2010 "Cowboy" Ben Alman
|
806 |
-
* Dual licensed under the MIT and GPL licenses.
|
807 |
-
* http://benalman.com/about/license/
|
808 |
-
*/
|
809 |
-
(function ($, e, b) {
|
810 |
-
var c = "hashchange", h = document, f, g = $.event.special, i = h.documentMode, d = "on" + c in e && (i === b || i > 7);
|
811 |
-
function a(j) {
|
812 |
-
j = j || location.href;
|
813 |
-
return"#" + j.replace(/^[^#]*#?(.*)$/, "$1")
|
814 |
-
}
|
815 |
-
$.fn[c] = function (j) {
|
816 |
-
return j ? this.bind(c, j) : this.trigger(c)
|
817 |
-
};
|
818 |
-
$.fn[c].delay = 50;
|
819 |
-
g[c] = $.extend(g[c], {setup: function () {
|
820 |
-
if (d) {
|
821 |
-
return false
|
822 |
-
}
|
823 |
-
$(f.start)
|
824 |
-
}, teardown: function () {
|
825 |
-
if (d) {
|
826 |
-
return false
|
827 |
-
}
|
828 |
-
$(f.stop)
|
829 |
-
}});
|
830 |
-
f = (function () {
|
831 |
-
var j = {}, p, m = a(), k = function (q) {
|
832 |
-
return q
|
833 |
-
}, l = k, o = k;
|
834 |
-
j.start = function () {
|
835 |
-
p || n()
|
836 |
-
};
|
837 |
-
j.stop = function () {
|
838 |
-
p && clearTimeout(p);
|
839 |
-
p = b
|
840 |
-
};
|
841 |
-
function n() {
|
842 |
-
var r = a(), q = o(m);
|
843 |
-
if (r !== m) {
|
844 |
-
l(m = r, q);
|
845 |
-
$(e).trigger(c)
|
846 |
-
} else {
|
847 |
-
if (q !== m) {
|
848 |
-
location.href = location.href.replace(/#.*/, "") + q
|
849 |
-
}
|
850 |
-
}
|
851 |
-
p = setTimeout(n, $.fn[c].delay)
|
852 |
-
}
|
853 |
-
$.browser.msie && !d && (function () {
|
854 |
-
var q, r;
|
855 |
-
j.start = function () {
|
856 |
-
if (!q) {
|
857 |
-
r = $.fn[c].src;
|
858 |
-
r = r && r + a();
|
859 |
-
q = $('<iframe tabindex="-1" title="empty"/>').hide().one("load", function () {
|
860 |
-
r || l(a());
|
861 |
-
n()
|
862 |
-
}).attr("src", r || "javascript:0").insertAfter("body")[0].contentWindow;
|
863 |
-
h.onpropertychange = function () {
|
864 |
-
try {
|
865 |
-
if (event.propertyName === "title") {
|
866 |
-
q.document.title = h.title
|
867 |
-
}
|
868 |
-
} catch (s) {
|
869 |
-
}
|
870 |
-
}
|
871 |
-
}
|
872 |
-
};
|
873 |
-
j.stop = k;
|
874 |
-
o = function () {
|
875 |
-
return a(q.location.href)
|
876 |
-
};
|
877 |
-
l = function (v, s) {
|
878 |
-
var u = q.document, t = $.fn[c].domain;
|
879 |
-
if (v !== s) {
|
880 |
-
u.title = h.title;
|
881 |
-
u.open();
|
882 |
-
t && u.write('<script>document.domain="' + t + '"<\/script>');
|
883 |
-
u.close();
|
884 |
-
q.location.hash = v
|
885 |
-
}
|
886 |
-
}
|
887 |
-
})();
|
888 |
-
return j
|
889 |
-
})()
|
890 |
-
})(jQuery, this);
|
891 |
-
|
892 |
-
/*
|
893 |
-
* jQuery EasyTabs plugin 3.2.0
|
894 |
-
*
|
895 |
-
* Copyright (c) 2010-2011 Steve Schwartz (JangoSteve)
|
896 |
-
*
|
897 |
-
* Dual licensed under the MIT and GPL licenses:
|
898 |
-
* http://www.opensource.org/licenses/mit-license.php
|
899 |
-
* http://www.gnu.org/licenses/gpl.html
|
900 |
-
*
|
901 |
-
* Date: Thu May 09 17:30:00 2013 -0500
|
902 |
-
*/
|
903 |
-
(function (a) {
|
904 |
-
a.easytabs = function (j, e) {
|
905 |
-
var f = this, q = a(j), i = {animate: true, panelActiveClass: "active", tabActiveClass: "active", defaultTab: "li:first-child", animationSpeed: "fast", tabs: "> ul > li", updateHash: true, cycle: false, collapsible: false, collapsedClass: "collapsed", collapsedByDefault: true, uiTabs: false, transitionIn: "fadeIn", transitionOut: "fadeOut", transitionInEasing: "swing", transitionOutEasing: "swing", transitionCollapse: "slideUp", transitionUncollapse: "slideDown", transitionCollapseEasing: "swing", transitionUncollapseEasing: "swing", containerClass: "", tabsClass: "", tabClass: "", panelClass: "", cache: true, event: "click", panelContext: q}, h, l, v, m, d, t = {fast: 200, normal: 400, slow: 600}, r;
|
906 |
-
f.init = function () {
|
907 |
-
f.settings = r = a.extend({}, i, e);
|
908 |
-
r.bind_str = r.event + ".easytabs";
|
909 |
-
if (r.uiTabs) {
|
910 |
-
r.tabActiveClass = "ui-tabs-selected";
|
911 |
-
r.containerClass = "ui-tabs ui-widget ui-widget-content ui-corner-all";
|
912 |
-
r.tabsClass = "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all";
|
913 |
-
r.tabClass = "ui-state-default ui-corner-top";
|
914 |
-
r.panelClass = "ui-tabs-panel ui-widget-content ui-corner-bottom"
|
915 |
-
}
|
916 |
-
if (r.collapsible && e.defaultTab !== undefined && e.collpasedByDefault === undefined) {
|
917 |
-
r.collapsedByDefault = false
|
918 |
-
}
|
919 |
-
if (typeof (r.animationSpeed) === "string") {
|
920 |
-
r.animationSpeed = t[r.animationSpeed]
|
921 |
-
}
|
922 |
-
a("a.anchor").remove().prependTo("body");
|
923 |
-
q.data("easytabs", {});
|
924 |
-
f.setTransitions();
|
925 |
-
f.getTabs();
|
926 |
-
b();
|
927 |
-
g();
|
928 |
-
w();
|
929 |
-
n();
|
930 |
-
c();
|
931 |
-
q.attr("data-easytabs", true)
|
932 |
-
};
|
933 |
-
f.setTransitions = function () {
|
934 |
-
v = (r.animate) ? {show: r.transitionIn, hide: r.transitionOut, speed: r.animationSpeed, collapse: r.transitionCollapse, uncollapse: r.transitionUncollapse, halfSpeed: r.animationSpeed / 2} : {show: "show", hide: "hide", speed: 0, collapse: "hide", uncollapse: "show", halfSpeed: 0}
|
935 |
-
};
|
936 |
-
f.getTabs = function () {
|
937 |
-
var x;
|
938 |
-
f.tabs = q.find(r.tabs), f.panels = a(), f.tabs.each(function () {
|
939 |
-
var A = a(this), z = A.children("a"), y = A.children("a").data("target");
|
940 |
-
A.data("easytabs", {});
|
941 |
-
if (y !== undefined && y !== null) {
|
942 |
-
A.data("easytabs").ajax = z.attr("href")
|
943 |
-
} else {
|
944 |
-
y = z.attr("href")
|
945 |
-
}
|
946 |
-
y = y.match(/#([^\?]+)/)[1];
|
947 |
-
x = r.panelContext.find("#" + y);
|
948 |
-
if (x.length) {
|
949 |
-
x.data("easytabs", {position: x.css("position"), visibility: x.css("visibility")});
|
950 |
-
x.not(r.panelActiveClass).hide();
|
951 |
-
f.panels = f.panels.add(x);
|
952 |
-
A.data("easytabs").panel = x
|
953 |
-
} else {
|
954 |
-
f.tabs = f.tabs.not(A);
|
955 |
-
if ("console" in window) {
|
956 |
-
console.warn("Warning: tab without matching panel for selector '#" + y + "' removed from set")
|
957 |
-
}
|
958 |
-
}
|
959 |
-
})
|
960 |
-
};
|
961 |
-
f.selectTab = function (x, C) {
|
962 |
-
var y = window.location, B = y.hash.match(/^[^\?]*/)[0], z = x.parent().data("easytabs").panel, A = x.parent().data("easytabs").ajax;
|
963 |
-
if (r.collapsible && !d && (x.hasClass(r.tabActiveClass) || x.hasClass(r.collapsedClass))) {
|
964 |
-
f.toggleTabCollapse(x, z, A, C)
|
965 |
-
} else {
|
966 |
-
if (!x.hasClass(r.tabActiveClass) || !z.hasClass(r.panelActiveClass)) {
|
967 |
-
o(x, z, A, C)
|
968 |
-
} else {
|
969 |
-
if (!r.cache) {
|
970 |
-
o(x, z, A, C)
|
971 |
-
}
|
972 |
-
}
|
973 |
-
}
|
974 |
-
};
|
975 |
-
f.toggleTabCollapse = function (x, y, z, A) {
|
976 |
-
f.panels.stop(true, true);
|
977 |
-
if (u(q, "easytabs:before", [x, y, r])) {
|
978 |
-
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
979 |
-
if (x.hasClass(r.collapsedClass)) {
|
980 |
-
if (z && (!r.cache || !x.parent().data("easytabs").cached)) {
|
981 |
-
q.trigger("easytabs:ajax:beforeSend", [x, y]);
|
982 |
-
y.load(z, function (C, B, D) {
|
983 |
-
x.parent().data("easytabs").cached = true;
|
984 |
-
q.trigger("easytabs:ajax:complete", [x, y, C, B, D])
|
985 |
-
})
|
986 |
-
}
|
987 |
-
x.parent().removeClass(r.collapsedClass).addClass(r.tabActiveClass).children().removeClass(r.collapsedClass).addClass(r.tabActiveClass);
|
988 |
-
y.addClass(r.panelActiveClass)[v.uncollapse](v.speed, r.transitionUncollapseEasing, function () {
|
989 |
-
q.trigger("easytabs:midTransition", [x, y, r]);
|
990 |
-
if (typeof A == "function") {
|
991 |
-
A()
|
992 |
-
}
|
993 |
-
})
|
994 |
-
} else {
|
995 |
-
x.addClass(r.collapsedClass).parent().addClass(r.collapsedClass);
|
996 |
-
y.removeClass(r.panelActiveClass)[v.collapse](v.speed, r.transitionCollapseEasing, function () {
|
997 |
-
q.trigger("easytabs:midTransition", [x, y, r]);
|
998 |
-
if (typeof A == "function") {
|
999 |
-
A()
|
1000 |
-
}
|
1001 |
-
})
|
1002 |
-
}
|
1003 |
-
}
|
1004 |
-
};
|
1005 |
-
f.matchTab = function (x) {
|
1006 |
-
return f.tabs.find("[href='" + x + "'],[data-target='" + x + "']").first()
|
1007 |
-
};
|
1008 |
-
f.matchInPanel = function (x) {
|
1009 |
-
return(x && f.validId(x) ? f.panels.filter(":has(" + x + ")").first() : [])
|
1010 |
-
};
|
1011 |
-
f.validId = function (x) {
|
1012 |
-
return x.substr(1).match(/^[A-Za-z]+[A-Za-z0-9\-_:\.].$/)
|
1013 |
-
};
|
1014 |
-
f.selectTabFromHashChange = function () {
|
1015 |
-
var y = window.location.hash.match(/^[^\?]*/)[0], x = f.matchTab(y), z;
|
1016 |
-
if (r.updateHash) {
|
1017 |
-
if (x.length) {
|
1018 |
-
d = true;
|
1019 |
-
f.selectTab(x)
|
1020 |
-
} else {
|
1021 |
-
z = f.matchInPanel(y);
|
1022 |
-
if (z.length) {
|
1023 |
-
y = "#" + z.attr("id");
|
1024 |
-
x = f.matchTab(y);
|
1025 |
-
d = true;
|
1026 |
-
f.selectTab(x)
|
1027 |
-
} else {
|
1028 |
-
if (!h.hasClass(r.tabActiveClass) && !r.cycle) {
|
1029 |
-
if (y === "" || f.matchTab(m).length || q.closest(y).length) {
|
1030 |
-
d = true;
|
1031 |
-
f.selectTab(l)
|
1032 |
-
}
|
1033 |
-
}
|
1034 |
-
}
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
};
|
1038 |
-
f.cycleTabs = function (x) {
|
1039 |
-
if (r.cycle) {
|
1040 |
-
x = x % f.tabs.length;
|
1041 |
-
$tab = a(f.tabs[x]).children("a").first();
|
1042 |
-
d = true;
|
1043 |
-
f.selectTab($tab, function () {
|
1044 |
-
setTimeout(function () {
|
1045 |
-
f.cycleTabs(x + 1)
|
1046 |
-
}, r.cycle)
|
1047 |
-
})
|
1048 |
-
}
|
1049 |
-
};
|
1050 |
-
f.publicMethods = {select: function (x) {
|
1051 |
-
var y;
|
1052 |
-
if ((y = f.tabs.filter(x)).length === 0) {
|
1053 |
-
if ((y = f.tabs.find("a[href='" + x + "']")).length === 0) {
|
1054 |
-
if ((y = f.tabs.find("a" + x)).length === 0) {
|
1055 |
-
if ((y = f.tabs.find("[data-target='" + x + "']")).length === 0) {
|
1056 |
-
if ((y = f.tabs.find("a[href$='" + x + "']")).length === 0) {
|
1057 |
-
a.error("Tab '" + x + "' does not exist in tab set")
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
}
|
1061 |
-
}
|
1062 |
-
} else {
|
1063 |
-
y = y.children("a").first()
|
1064 |
-
}
|
1065 |
-
f.selectTab(y)
|
1066 |
-
}};
|
1067 |
-
var u = function (A, x, z) {
|
1068 |
-
var y = a.Event(x);
|
1069 |
-
A.trigger(y, z);
|
1070 |
-
return y.result !== false
|
1071 |
-
};
|
1072 |
-
var b = function () {
|
1073 |
-
q.addClass(r.containerClass);
|
1074 |
-
f.tabs.parent().addClass(r.tabsClass);
|
1075 |
-
f.tabs.addClass(r.tabClass);
|
1076 |
-
f.panels.addClass(r.panelClass)
|
1077 |
-
};
|
1078 |
-
var g = function () {
|
1079 |
-
var y = window.location.hash.match(/^[^\?]*/)[0], x = f.matchTab(y).parent(), z;
|
1080 |
-
if (x.length === 1) {
|
1081 |
-
h = x;
|
1082 |
-
r.cycle = false
|
1083 |
-
} else {
|
1084 |
-
z = f.matchInPanel(y);
|
1085 |
-
if (z.length) {
|
1086 |
-
y = "#" + z.attr("id");
|
1087 |
-
h = f.matchTab(y).parent()
|
1088 |
-
} else {
|
1089 |
-
h = f.tabs.parent().find(r.defaultTab);
|
1090 |
-
if (h.length === 0) {
|
1091 |
-
a.error("The specified default tab ('" + r.defaultTab + "') could not be found in the tab set ('" + r.tabs + "') out of " + f.tabs.length + " tabs.")
|
1092 |
-
}
|
1093 |
-
}
|
1094 |
-
}
|
1095 |
-
l = h.children("a").first();
|
1096 |
-
p(x)
|
1097 |
-
};
|
1098 |
-
var p = function (z) {
|
1099 |
-
var y, x;
|
1100 |
-
if (r.collapsible && z.length === 0 && r.collapsedByDefault) {
|
1101 |
-
h.addClass(r.collapsedClass).children().addClass(r.collapsedClass)
|
1102 |
-
} else {
|
1103 |
-
y = a(h.data("easytabs").panel);
|
1104 |
-
x = h.data("easytabs").ajax;
|
1105 |
-
if (x && (!r.cache || !h.data("easytabs").cached)) {
|
1106 |
-
q.trigger("easytabs:ajax:beforeSend", [l, y]);
|
1107 |
-
y.load(x, function (B, A, C) {
|
1108 |
-
h.data("easytabs").cached = true;
|
1109 |
-
q.trigger("easytabs:ajax:complete", [l, y, B, A, C])
|
1110 |
-
})
|
1111 |
-
}
|
1112 |
-
h.data("easytabs").panel.show().addClass(r.panelActiveClass);
|
1113 |
-
h.addClass(r.tabActiveClass).children().addClass(r.tabActiveClass)
|
1114 |
-
}
|
1115 |
-
q.trigger("easytabs:initialised", [l, y])
|
1116 |
-
};
|
1117 |
-
var w = function () {
|
1118 |
-
f.tabs.children("a").bind(r.bind_str, function (x) {
|
1119 |
-
r.cycle = false;
|
1120 |
-
d = false;
|
1121 |
-
f.selectTab(a(this));
|
1122 |
-
x.preventDefault ? x.preventDefault() : x.returnValue = false
|
1123 |
-
})
|
1124 |
-
};
|
1125 |
-
var o = function (z, D, E, H) {
|
1126 |
-
f.panels.stop(true, true);
|
1127 |
-
if (u(q, "easytabs:before", [z, D, r])) {
|
1128 |
-
var A = f.panels.filter(":visible"), y = D.parent(), F, x, C, G, B = window.location.hash.match(/^[^\?]*/)[0];
|
1129 |
-
if (r.animate) {
|
1130 |
-
F = s(D);
|
1131 |
-
x = A.length ? k(A) : 0;
|
1132 |
-
C = F - x
|
1133 |
-
}
|
1134 |
-
m = B;
|
1135 |
-
G = function () {
|
1136 |
-
q.trigger("easytabs:midTransition", [z, D, r]);
|
1137 |
-
if (r.animate && r.transitionIn == "fadeIn") {
|
1138 |
-
if (C < 0) {
|
1139 |
-
y.animate({height: y.height() + C}, v.halfSpeed).css({"min-height": ""})
|
1140 |
-
}
|
1141 |
-
}
|
1142 |
-
if (r.updateHash && !d) {
|
1143 |
-
window.location.hash = "#" + D.attr("id")
|
1144 |
-
} else {
|
1145 |
-
d = false
|
1146 |
-
}
|
1147 |
-
D[v.show](v.speed, r.transitionInEasing, function () {
|
1148 |
-
y.css({height: "", "min-height": ""});
|
1149 |
-
q.trigger("easytabs:after", [z, D, r]);
|
1150 |
-
if (typeof H == "function") {
|
1151 |
-
H()
|
1152 |
-
}
|
1153 |
-
})
|
1154 |
-
};
|
1155 |
-
if (E && (!r.cache || !z.parent().data("easytabs").cached)) {
|
1156 |
-
q.trigger("easytabs:ajax:beforeSend", [z, D]);
|
1157 |
-
D.load(E, function (J, I, K) {
|
1158 |
-
z.parent().data("easytabs").cached = true;
|
1159 |
-
q.trigger("easytabs:ajax:complete", [z, D, J, I, K])
|
1160 |
-
})
|
1161 |
-
}
|
1162 |
-
if (r.animate && r.transitionOut == "fadeOut") {
|
1163 |
-
if (C > 0) {
|
1164 |
-
y.animate({height: (y.height() + C)}, v.halfSpeed)
|
1165 |
-
} else {
|
1166 |
-
y.css({"min-height": y.height()})
|
1167 |
-
}
|
1168 |
-
}
|
1169 |
-
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
1170 |
-
f.tabs.filter("." + r.collapsedClass).removeClass(r.collapsedClass).children().removeClass(r.collapsedClass);
|
1171 |
-
z.parent().addClass(r.tabActiveClass).children().addClass(r.tabActiveClass);
|
1172 |
-
f.panels.filter("." + r.panelActiveClass).removeClass(r.panelActiveClass);
|
1173 |
-
D.addClass(r.panelActiveClass);
|
1174 |
-
if (A.length) {
|
1175 |
-
A[v.hide](v.speed, r.transitionOutEasing, G)
|
1176 |
-
} else {
|
1177 |
-
D[v.uncollapse](v.speed, r.transitionUncollapseEasing, G)
|
1178 |
-
}
|
1179 |
-
}
|
1180 |
-
};
|
1181 |
-
var s = function (z) {
|
1182 |
-
if (z.data("easytabs") && z.data("easytabs").lastHeight) {
|
1183 |
-
return z.data("easytabs").lastHeight
|
1184 |
-
}
|
1185 |
-
var B = z.css("display"), y, x;
|
1186 |
-
try {
|
1187 |
-
y = a("<div></div>", {position: "absolute", visibility: "hidden", overflow: "hidden"})
|
1188 |
-
} catch (A) {
|
1189 |
-
y = a("<div></div>", {visibility: "hidden", overflow: "hidden"})
|
1190 |
-
}
|
1191 |
-
x = z.wrap(y).css({position: "relative", visibility: "hidden", display: "block"}).outerHeight();
|
1192 |
-
z.unwrap();
|
1193 |
-
z.css({position: z.data("easytabs").position, visibility: z.data("easytabs").visibility, display: B});
|
1194 |
-
z.data("easytabs").lastHeight = x;
|
1195 |
-
return x
|
1196 |
-
};
|
1197 |
-
var k = function (y) {
|
1198 |
-
var x = y.outerHeight();
|
1199 |
-
if (y.data("easytabs")) {
|
1200 |
-
y.data("easytabs").lastHeight = x
|
1201 |
-
} else {
|
1202 |
-
y.data("easytabs", {lastHeight: x})
|
1203 |
-
}
|
1204 |
-
return x
|
1205 |
-
};
|
1206 |
-
var n = function () {
|
1207 |
-
if (typeof a(window).hashchange === "function") {
|
1208 |
-
a(window).hashchange(function () {
|
1209 |
-
f.selectTabFromHashChange()
|
1210 |
-
})
|
1211 |
-
} else {
|
1212 |
-
if (a.address && typeof a.address.change === "function") {
|
1213 |
-
a.address.change(function () {
|
1214 |
-
f.selectTabFromHashChange()
|
1215 |
-
})
|
1216 |
-
}
|
1217 |
-
}
|
1218 |
-
};
|
1219 |
-
var c = function () {
|
1220 |
-
var x;
|
1221 |
-
if (r.cycle) {
|
1222 |
-
x = f.tabs.index(h);
|
1223 |
-
setTimeout(function () {
|
1224 |
-
f.cycleTabs(x + 1)
|
1225 |
-
}, r.cycle)
|
1226 |
-
}
|
1227 |
-
};
|
1228 |
-
f.init()
|
1229 |
-
};
|
1230 |
-
a.fn.easytabs = function (c) {
|
1231 |
-
var b = arguments;
|
1232 |
-
return this.each(function () {
|
1233 |
-
var e = a(this), d = e.data("easytabs");
|
1234 |
-
if (undefined === d) {
|
1235 |
-
d = new a.easytabs(this, c);
|
1236 |
-
e.data("easytabs", d)
|
1237 |
-
}
|
1238 |
-
if (d.publicMethods[c]) {
|
1239 |
-
return d.publicMethods[c](Array.prototype.slice.call(b, 1))
|
1240 |
-
}
|
1241 |
-
})
|
1242 |
-
}
|
1243 |
-
})(jQuery);
|
1244 |
-
|
1245 |
-
|
1246 |
-
/*
|
1247 |
-
colpick Color Picker
|
1248 |
-
Copyright 2013 Jose Vargas. Licensed under GPL license. Based on Stefan Petre's Color Picker www.eyecon.ro, dual licensed under the MIT and GPL licenses
|
1249 |
-
|
1250 |
-
For usage and examples: colpick.com/plugin
|
1251 |
-
*/
|
1252 |
-
|
1253 |
-
(function ($) {
|
1254 |
-
var colpick = function () {
|
1255 |
-
var
|
1256 |
-
tpl = '<div class="colpick"><div class="colpick_color"><div class="colpick_color_overlay1"><div class="colpick_color_overlay2"><div class="colpick_selector_outer"><div class="colpick_selector_inner"></div></div></div></div></div><div class="colpick_hue"><div class="colpick_hue_arrs"><div class="colpick_hue_larr"></div><div class="colpick_hue_rarr"></div></div></div><div class="colpick_new_color"></div><div class="colpick_current_color"></div><div class="colpick_hex_field"><div class="colpick_field_letter">#</div><input type="text" maxlength="6" size="6" /></div><div class="colpick_rgb_r colpick_field"><div class="colpick_field_letter">R</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_g colpick_field"><div class="colpick_field_letter">G</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_h colpick_field"><div class="colpick_field_letter">H</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_s colpick_field"><div class="colpick_field_letter">S</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_submit"></div></div>',
|
1257 |
-
defaults = {
|
1258 |
-
showEvent: 'click',
|
1259 |
-
onShow: function () {
|
1260 |
-
},
|
1261 |
-
onBeforeShow: function () {
|
1262 |
-
},
|
1263 |
-
onHide: function () {
|
1264 |
-
},
|
1265 |
-
onChange: function () {
|
1266 |
-
},
|
1267 |
-
onSubmit: function () {
|
1268 |
-
},
|
1269 |
-
colorScheme: 'light',
|
1270 |
-
color: '3289c7',
|
1271 |
-
livePreview: true,
|
1272 |
-
flat: false,
|
1273 |
-
layout: 'full',
|
1274 |
-
submit: 1,
|
1275 |
-
submitText: 'OK',
|
1276 |
-
height: 156
|
1277 |
-
},
|
1278 |
-
//Fill the inputs of the plugin
|
1279 |
-
fillRGBFields = function (hsb, cal) {
|
1280 |
-
var rgb = hsbToRgb(hsb);
|
1281 |
-
$(cal).data('colpick').fields
|
1282 |
-
.eq(1).val(rgb.r).end()
|
1283 |
-
.eq(2).val(rgb.g).end()
|
1284 |
-
.eq(3).val(rgb.b).end();
|
1285 |
-
},
|
1286 |
-
fillHSBFields = function (hsb, cal) {
|
1287 |
-
$(cal).data('colpick').fields
|
1288 |
-
.eq(4).val(Math.round(hsb.h)).end()
|
1289 |
-
.eq(5).val(Math.round(hsb.s)).end()
|
1290 |
-
.eq(6).val(Math.round(hsb.b)).end();
|
1291 |
-
},
|
1292 |
-
fillHexFields = function (hsb, cal) {
|
1293 |
-
$(cal).data('colpick').fields.eq(0).val(hsbToHex(hsb));
|
1294 |
-
},
|
1295 |
-
//Set the round selector position
|
1296 |
-
setSelector = function (hsb, cal) {
|
1297 |
-
$(cal).data('colpick').selector.css('backgroundColor', '#' + hsbToHex({h: hsb.h, s: 100, b: 100}));
|
1298 |
-
$(cal).data('colpick').selectorIndic.css({
|
1299 |
-
left: parseInt($(cal).data('colpick').height * hsb.s / 100, 10),
|
1300 |
-
top: parseInt($(cal).data('colpick').height * (100 - hsb.b) / 100, 10)
|
1301 |
-
});
|
1302 |
-
},
|
1303 |
-
//Set the hue selector position
|
1304 |
-
setHue = function (hsb, cal) {
|
1305 |
-
$(cal).data('colpick').hue.css('top', parseInt($(cal).data('colpick').height - $(cal).data('colpick').height * hsb.h / 360, 10));
|
1306 |
-
},
|
1307 |
-
//Set current and new colors
|
1308 |
-
setCurrentColor = function (hsb, cal) {
|
1309 |
-
$(cal).data('colpick').currentColor.css('backgroundColor', '#' + hsbToHex(hsb));
|
1310 |
-
},
|
1311 |
-
setNewColor = function (hsb, cal) {
|
1312 |
-
$(cal).data('colpick').newColor.css('backgroundColor', '#' + hsbToHex(hsb));
|
1313 |
-
},
|
1314 |
-
//Called when the new color is changed
|
1315 |
-
change = function (ev) {
|
1316 |
-
var cal = $(this).parent().parent(), col;
|
1317 |
-
if (this.parentNode.className.indexOf('_hex') > 0) {
|
1318 |
-
cal.data('colpick').color = col = hexToHsb(fixHex(this.value));
|
1319 |
-
fillRGBFields(col, cal.get(0));
|
1320 |
-
fillHSBFields(col, cal.get(0));
|
1321 |
-
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
1322 |
-
cal.data('colpick').color = col = fixHSB({
|
1323 |
-
h: parseInt(cal.data('colpick').fields.eq(4).val(), 10),
|
1324 |
-
s: parseInt(cal.data('colpick').fields.eq(5).val(), 10),
|
1325 |
-
b: parseInt(cal.data('colpick').fields.eq(6).val(), 10)
|
1326 |
-
});
|
1327 |
-
fillRGBFields(col, cal.get(0));
|
1328 |
-
fillHexFields(col, cal.get(0));
|
1329 |
-
} else {
|
1330 |
-
cal.data('colpick').color = col = rgbToHsb(fixRGB({
|
1331 |
-
r: parseInt(cal.data('colpick').fields.eq(1).val(), 10),
|
1332 |
-
g: parseInt(cal.data('colpick').fields.eq(2).val(), 10),
|
1333 |
-
b: parseInt(cal.data('colpick').fields.eq(3).val(), 10)
|
1334 |
-
}));
|
1335 |
-
fillHexFields(col, cal.get(0));
|
1336 |
-
fillHSBFields(col, cal.get(0));
|
1337 |
-
}
|
1338 |
-
setSelector(col, cal.get(0));
|
1339 |
-
setHue(col, cal.get(0));
|
1340 |
-
setNewColor(col, cal.get(0));
|
1341 |
-
cal.data('colpick').onChange.apply(cal.parent(), [col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el, 0]);
|
1342 |
-
},
|
1343 |
-
//Change style on blur and on focus of inputs
|
1344 |
-
blur = function (ev) {
|
1345 |
-
$(this).parent().removeClass('colpick_focus');
|
1346 |
-
},
|
1347 |
-
focus = function () {
|
1348 |
-
$(this).parent().parent().data('colpick').fields.parent().removeClass('colpick_focus');
|
1349 |
-
$(this).parent().addClass('colpick_focus');
|
1350 |
-
},
|
1351 |
-
//Increment/decrement arrows functions
|
1352 |
-
downIncrement = function (ev) {
|
1353 |
-
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1354 |
-
var field = $(this).parent().find('input').focus();
|
1355 |
-
var current = {
|
1356 |
-
el: $(this).parent().addClass('colpick_slider'),
|
1357 |
-
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
1358 |
-
y: ev.pageY,
|
1359 |
-
field: field,
|
1360 |
-
val: parseInt(field.val(), 10),
|
1361 |
-
preview: $(this).parent().parent().data('colpick').livePreview
|
1362 |
-
};
|
1363 |
-
$(document).mouseup(current, upIncrement);
|
1364 |
-
$(document).mousemove(current, moveIncrement);
|
1365 |
-
},
|
1366 |
-
moveIncrement = function (ev) {
|
1367 |
-
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val - ev.pageY + ev.data.y, 10))));
|
1368 |
-
if (ev.data.preview) {
|
1369 |
-
change.apply(ev.data.field.get(0), [true]);
|
1370 |
-
}
|
1371 |
-
return false;
|
1372 |
-
},
|
1373 |
-
upIncrement = function (ev) {
|
1374 |
-
change.apply(ev.data.field.get(0), [true]);
|
1375 |
-
ev.data.el.removeClass('colpick_slider').find('input').focus();
|
1376 |
-
$(document).off('mouseup', upIncrement);
|
1377 |
-
$(document).off('mousemove', moveIncrement);
|
1378 |
-
return false;
|
1379 |
-
},
|
1380 |
-
//Hue slider functions
|
1381 |
-
downHue = function (ev) {
|
1382 |
-
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1383 |
-
var current = {
|
1384 |
-
cal: $(this).parent(),
|
1385 |
-
y: $(this).offset().top
|
1386 |
-
};
|
1387 |
-
$(document).on('mouseup touchend', current, upHue);
|
1388 |
-
$(document).on('mousemove touchmove', current, moveHue);
|
1389 |
-
|
1390 |
-
var pageY = ((ev.type == 'touchstart') ? ev.originalEvent.changedTouches[0].pageY : ev.pageY);
|
1391 |
-
change.apply(
|
1392 |
-
current.cal.data('colpick')
|
1393 |
-
.fields.eq(4).val(parseInt(360 * (current.cal.data('colpick').height - (pageY - current.y)) / current.cal.data('colpick').height, 10))
|
1394 |
-
.get(0),
|
1395 |
-
[current.cal.data('colpick').livePreview]
|
1396 |
-
);
|
1397 |
-
return false;
|
1398 |
-
},
|
1399 |
-
moveHue = function (ev) {
|
1400 |
-
var pageY = ((ev.type == 'touchmove') ? ev.originalEvent.changedTouches[0].pageY : ev.pageY);
|
1401 |
-
change.apply(
|
1402 |
-
ev.data.cal.data('colpick')
|
1403 |
-
.fields.eq(4).val(parseInt(360 * (ev.data.cal.data('colpick').height - Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageY - ev.data.y)))) / ev.data.cal.data('colpick').height, 10))
|
1404 |
-
.get(0),
|
1405 |
-
[ev.data.preview]
|
1406 |
-
);
|
1407 |
-
return false;
|
1408 |
-
},
|
1409 |
-
upHue = function (ev) {
|
1410 |
-
fillRGBFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1411 |
-
fillHexFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1412 |
-
$(document).off('mouseup touchend', upHue);
|
1413 |
-
$(document).off('mousemove touchmove', moveHue);
|
1414 |
-
return false;
|
1415 |
-
},
|
1416 |
-
//Color selector functions
|
1417 |
-
downSelector = function (ev) {
|
1418 |
-
ev.preventDefault ? ev.preventDefault() : ev.returnValue = false;
|
1419 |
-
var current = {
|
1420 |
-
cal: $(this).parent(),
|
1421 |
-
pos: $(this).offset()
|
1422 |
-
};
|
1423 |
-
current.preview = current.cal.data('colpick').livePreview;
|
1424 |
-
|
1425 |
-
$(document).on('mouseup touchend', current, upSelector);
|
1426 |
-
$(document).on('mousemove touchmove', current, moveSelector);
|
1427 |
-
|
1428 |
-
var payeX, pageY;
|
1429 |
-
if (ev.type == 'touchstart') {
|
1430 |
-
pageX = ev.originalEvent.changedTouches[0].pageX,
|
1431 |
-
pageY = ev.originalEvent.changedTouches[0].pageY;
|
1432 |
-
} else {
|
1433 |
-
pageX = ev.pageX;
|
1434 |
-
pageY = ev.pageY;
|
1435 |
-
}
|
1436 |
-
|
1437 |
-
change.apply(
|
1438 |
-
current.cal.data('colpick').fields
|
1439 |
-
.eq(6).val(parseInt(100 * (current.cal.data('colpick').height - (pageY - current.pos.top)) / current.cal.data('colpick').height, 10)).end()
|
1440 |
-
.eq(5).val(parseInt(100 * (pageX - current.pos.left) / current.cal.data('colpick').height, 10))
|
1441 |
-
.get(0),
|
1442 |
-
[current.preview]
|
1443 |
-
);
|
1444 |
-
return false;
|
1445 |
-
},
|
1446 |
-
moveSelector = function (ev) {
|
1447 |
-
var payeX, pageY;
|
1448 |
-
if (ev.type == 'touchmove') {
|
1449 |
-
pageX = ev.originalEvent.changedTouches[0].pageX,
|
1450 |
-
pageY = ev.originalEvent.changedTouches[0].pageY;
|
1451 |
-
} else {
|
1452 |
-
pageX = ev.pageX;
|
1453 |
-
pageY = ev.pageY;
|
1454 |
-
}
|
1455 |
-
|
1456 |
-
change.apply(
|
1457 |
-
ev.data.cal.data('colpick').fields
|
1458 |
-
.eq(6).val(parseInt(100 * (ev.data.cal.data('colpick').height - Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageY - ev.data.pos.top)))) / ev.data.cal.data('colpick').height, 10)).end()
|
1459 |
-
.eq(5).val(parseInt(100 * (Math.max(0, Math.min(ev.data.cal.data('colpick').height, (pageX - ev.data.pos.left)))) / ev.data.cal.data('colpick').height, 10))
|
1460 |
-
.get(0),
|
1461 |
-
[ev.data.preview]
|
1462 |
-
);
|
1463 |
-
return false;
|
1464 |
-
},
|
1465 |
-
upSelector = function (ev) {
|
1466 |
-
fillRGBFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1467 |
-
fillHexFields(ev.data.cal.data('colpick').color, ev.data.cal.get(0));
|
1468 |
-
$(document).off('mouseup touchend', upSelector);
|
1469 |
-
$(document).off('mousemove touchmove', moveSelector);
|
1470 |
-
return false;
|
1471 |
-
},
|
1472 |
-
//Submit button
|
1473 |
-
clickSubmit = function (ev) {
|
1474 |
-
var cal = $(this).parent();
|
1475 |
-
var col = cal.data('colpick').color;
|
1476 |
-
cal.data('colpick').origColor = col;
|
1477 |
-
setCurrentColor(col, cal.get(0));
|
1478 |
-
cal.data('colpick').onSubmit(col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el);
|
1479 |
-
},
|
1480 |
-
//Show/hide the color picker
|
1481 |
-
show = function (ev) {
|
1482 |
-
// Prevent the trigger of any direct parent
|
1483 |
-
ev.stopPropagation();
|
1484 |
-
var cal = $('#' + $(this).data('colpickId'));
|
1485 |
-
cal.data('colpick').onBeforeShow.apply(this, [cal.get(0)]);
|
1486 |
-
var pos = $(this).offset();
|
1487 |
-
var top = pos.top + this.offsetHeight;
|
1488 |
-
var left = pos.left;
|
1489 |
-
var viewPort = getViewport();
|
1490 |
-
var calW = cal.width();
|
1491 |
-
if (left + calW > viewPort.l + viewPort.w) {
|
1492 |
-
left -= calW;
|
1493 |
-
}
|
1494 |
-
cal.css({left: left + 'px', top: top + 'px'});
|
1495 |
-
if (cal.data('colpick').onShow.apply(this, [cal.get(0)]) != false) {
|
1496 |
-
cal.show();
|
1497 |
-
}
|
1498 |
-
//Hide when user clicks outside
|
1499 |
-
$('html').mousedown({cal: cal}, hide);
|
1500 |
-
cal.mousedown(function (ev) {
|
1501 |
-
ev.stopPropagation();
|
1502 |
-
})
|
1503 |
-
},
|
1504 |
-
hide = function (ev) {
|
1505 |
-
if (ev.data.cal.data('colpick').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
1506 |
-
ev.data.cal.hide();
|
1507 |
-
}
|
1508 |
-
$('html').off('mousedown', hide);
|
1509 |
-
},
|
1510 |
-
getViewport = function () {
|
1511 |
-
var m = document.compatMode == 'CSS1Compat';
|
1512 |
-
return {
|
1513 |
-
l: window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
1514 |
-
w: window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth)
|
1515 |
-
};
|
1516 |
-
},
|
1517 |
-
//Fix the values if the user enters a negative or high value
|
1518 |
-
fixHSB = function (hsb) {
|
1519 |
-
return {
|
1520 |
-
h: Math.min(360, Math.max(0, hsb.h)),
|
1521 |
-
s: Math.min(100, Math.max(0, hsb.s)),
|
1522 |
-
b: Math.min(100, Math.max(0, hsb.b))
|
1523 |
-
};
|
1524 |
-
},
|
1525 |
-
fixRGB = function (rgb) {
|
1526 |
-
return {
|
1527 |
-
r: Math.min(255, Math.max(0, rgb.r)),
|
1528 |
-
g: Math.min(255, Math.max(0, rgb.g)),
|
1529 |
-
b: Math.min(255, Math.max(0, rgb.b))
|
1530 |
-
};
|
1531 |
-
},
|
1532 |
-
fixHex = function (hex) {
|
1533 |
-
var len = 6 - hex.length;
|
1534 |
-
if (len > 0) {
|
1535 |
-
var o = [];
|
1536 |
-
for (var i = 0; i < len; i++) {
|
1537 |
-
o.push('0');
|
1538 |
-
}
|
1539 |
-
o.push(hex);
|
1540 |
-
hex = o.join('');
|
1541 |
-
}
|
1542 |
-
return hex;
|
1543 |
-
},
|
1544 |
-
restoreOriginal = function () {
|
1545 |
-
var cal = $(this).parent();
|
1546 |
-
var col = cal.data('colpick').origColor;
|
1547 |
-
cal.data('colpick').color = col;
|
1548 |
-
fillRGBFields(col, cal.get(0));
|
1549 |
-
fillHexFields(col, cal.get(0));
|
1550 |
-
fillHSBFields(col, cal.get(0));
|
1551 |
-
setSelector(col, cal.get(0));
|
1552 |
-
setHue(col, cal.get(0));
|
1553 |
-
setNewColor(col, cal.get(0));
|
1554 |
-
};
|
1555 |
-
return {
|
1556 |
-
init: function (opt) {
|
1557 |
-
opt = $.extend({}, defaults, opt || {});
|
1558 |
-
//Set color
|
1559 |
-
if (typeof opt.color == 'string') {
|
1560 |
-
opt.color = hexToHsb(opt.color);
|
1561 |
-
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
1562 |
-
opt.color = rgbToHsb(opt.color);
|
1563 |
-
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
1564 |
-
opt.color = fixHSB(opt.color);
|
1565 |
-
} else {
|
1566 |
-
return this;
|
1567 |
-
}
|
1568 |
-
|
1569 |
-
//For each selected DOM element
|
1570 |
-
return this.each(function () {
|
1571 |
-
//If the element does not have an ID
|
1572 |
-
if (!$(this).data('colpickId')) {
|
1573 |
-
var options = $.extend({}, opt);
|
1574 |
-
options.origColor = opt.color;
|
1575 |
-
//Generate and assign a random ID
|
1576 |
-
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
1577 |
-
$(this).data('colpickId', id);
|
1578 |
-
//Set the tpl's ID and get the HTML
|
1579 |
-
var cal = $(tpl).attr('id', id);
|
1580 |
-
//Add class according to layout
|
1581 |
-
cal.addClass('colpick_' + options.layout + (options.submit ? '' : ' colpick_' + options.layout + '_ns'));
|
1582 |
-
//Add class if the color scheme is not default
|
1583 |
-
if (options.colorScheme != 'light') {
|
1584 |
-
cal.addClass('colpick_' + options.colorScheme);
|
1585 |
-
}
|
1586 |
-
//Setup submit button
|
1587 |
-
cal.find('div.colpick_submit').html(options.submitText).click(clickSubmit);
|
1588 |
-
//Setup input fields
|
1589 |
-
options.fields = cal.find('input').change(change).blur(blur).focus(focus);
|
1590 |
-
cal.find('div.colpick_field_arrs').mousedown(downIncrement).end().find('div.colpick_current_color').click(restoreOriginal);
|
1591 |
-
//Setup hue selector
|
1592 |
-
options.selector = cal.find('div.colpick_color').on('mousedown touchstart', downSelector);
|
1593 |
-
options.selectorIndic = options.selector.find('div.colpick_selector_outer');
|
1594 |
-
//Store parts of the plugin
|
1595 |
-
options.el = this;
|
1596 |
-
options.hue = cal.find('div.colpick_hue_arrs');
|
1597 |
-
huebar = options.hue.parent();
|
1598 |
-
//Paint the hue bar
|
1599 |
-
var UA = navigator.userAgent.toLowerCase();
|
1600 |
-
var isIE = navigator.appName === 'Microsoft Internet Explorer';
|
1601 |
-
var IEver = isIE ? parseFloat(UA.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]) : 0;
|
1602 |
-
var ngIE = (isIE && IEver < 10);
|
1603 |
-
var stops = ['#ff0000', '#ff0080', '#ff00ff', '#8000ff', '#0000ff', '#0080ff', '#00ffff', '#00ff80', '#00ff00', '#80ff00', '#ffff00', '#ff8000', '#ff0000'];
|
1604 |
-
if (ngIE) {
|
1605 |
-
var i, div;
|
1606 |
-
for (i = 0; i <= 11; i++) {
|
1607 |
-
div = $('<div></div>').attr('style', 'height:8.333333%; filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=' + stops[i] + ', endColorstr=' + stops[i + 1] + '); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=' + stops[i] + ', endColorstr=' + stops[i + 1] + ')";');
|
1608 |
-
huebar.append(div);
|
1609 |
-
}
|
1610 |
-
} else {
|
1611 |
-
stopList = stops.join(',');
|
1612 |
-
huebar.attr('style', 'background:-webkit-linear-gradient(top,' + stopList + '); background: -o-linear-gradient(top,' + stopList + '); background: -ms-linear-gradient(top,' + stopList + '); background:-moz-linear-gradient(top,' + stopList + '); -webkit-linear-gradient(top,' + stopList + '); background:linear-gradient(to bottom,' + stopList + '); ');
|
1613 |
-
}
|
1614 |
-
cal.find('div.colpick_hue').on('mousedown touchstart', downHue);
|
1615 |
-
options.newColor = cal.find('div.colpick_new_color');
|
1616 |
-
options.currentColor = cal.find('div.colpick_current_color');
|
1617 |
-
//Store options and fill with default color
|
1618 |
-
cal.data('colpick', options);
|
1619 |
-
fillRGBFields(options.color, cal.get(0));
|
1620 |
-
fillHSBFields(options.color, cal.get(0));
|
1621 |
-
fillHexFields(options.color, cal.get(0));
|
1622 |
-
setHue(options.color, cal.get(0));
|
1623 |
-
setSelector(options.color, cal.get(0));
|
1624 |
-
setCurrentColor(options.color, cal.get(0));
|
1625 |
-
setNewColor(options.color, cal.get(0));
|
1626 |
-
//Append to body if flat=false, else show in place
|
1627 |
-
if (options.flat) {
|
1628 |
-
cal.appendTo(this).show();
|
1629 |
-
cal.css({
|
1630 |
-
position: 'relative',
|
1631 |
-
display: 'block'
|
1632 |
-
});
|
1633 |
-
} else {
|
1634 |
-
cal.appendTo(document.body);
|
1635 |
-
$(this).on(options.showEvent, show);
|
1636 |
-
cal.css({
|
1637 |
-
position: 'absolute'
|
1638 |
-
});
|
1639 |
-
}
|
1640 |
-
}
|
1641 |
-
});
|
1642 |
-
},
|
1643 |
-
//Shows the picker
|
1644 |
-
showPicker: function () {
|
1645 |
-
return this.each(function () {
|
1646 |
-
if ($(this).data('colpickId')) {
|
1647 |
-
show.apply(this);
|
1648 |
-
}
|
1649 |
-
});
|
1650 |
-
},
|
1651 |
-
//Hides the picker
|
1652 |
-
hidePicker: function () {
|
1653 |
-
return this.each(function () {
|
1654 |
-
if ($(this).data('colpickId')) {
|
1655 |
-
$('#' + $(this).data('colpickId')).hide();
|
1656 |
-
}
|
1657 |
-
});
|
1658 |
-
},
|
1659 |
-
//Sets a color as new and current (default)
|
1660 |
-
setColor: function (col, setCurrent) {
|
1661 |
-
setCurrent = (typeof setCurrent === "undefined") ? 1 : setCurrent;
|
1662 |
-
if (typeof col == 'string') {
|
1663 |
-
col = hexToHsb(col);
|
1664 |
-
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
1665 |
-
col = rgbToHsb(col);
|
1666 |
-
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
1667 |
-
col = fixHSB(col);
|
1668 |
-
} else {
|
1669 |
-
return this;
|
1670 |
-
}
|
1671 |
-
return this.each(function () {
|
1672 |
-
if ($(this).data('colpickId')) {
|
1673 |
-
var cal = $('#' + $(this).data('colpickId'));
|
1674 |
-
cal.data('colpick').color = col;
|
1675 |
-
cal.data('colpick').origColor = col;
|
1676 |
-
fillRGBFields(col, cal.get(0));
|
1677 |
-
fillHSBFields(col, cal.get(0));
|
1678 |
-
fillHexFields(col, cal.get(0));
|
1679 |
-
setHue(col, cal.get(0));
|
1680 |
-
setSelector(col, cal.get(0));
|
1681 |
-
|
1682 |
-
setNewColor(col, cal.get(0));
|
1683 |
-
cal.data('colpick').onChange.apply(cal.parent(), [col, hsbToHex(col), hsbToRgb(col), cal.data('colpick').el, 1]);
|
1684 |
-
if (setCurrent) {
|
1685 |
-
setCurrentColor(col, cal.get(0));
|
1686 |
-
}
|
1687 |
-
}
|
1688 |
-
});
|
1689 |
-
}
|
1690 |
-
};
|
1691 |
-
}();
|
1692 |
-
//Color space convertions
|
1693 |
-
var hexToRgb = function (hex) {
|
1694 |
-
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
1695 |
-
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
1696 |
-
};
|
1697 |
-
var hexToHsb = function (hex) {
|
1698 |
-
return rgbToHsb(hexToRgb(hex));
|
1699 |
-
};
|
1700 |
-
var rgbToHsb = function (rgb) {
|
1701 |
-
var hsb = {h: 0, s: 0, b: 0};
|
1702 |
-
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
1703 |
-
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
1704 |
-
var delta = max - min;
|
1705 |
-
hsb.b = max;
|
1706 |
-
hsb.s = max != 0 ? 255 * delta / max : 0;
|
1707 |
-
if (hsb.s != 0) {
|
1708 |
-
if (rgb.r == max)
|
1709 |
-
hsb.h = (rgb.g - rgb.b) / delta;
|
1710 |
-
else if (rgb.g == max)
|
1711 |
-
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
1712 |
-
else
|
1713 |
-
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
1714 |
-
} else
|
1715 |
-
hsb.h = -1;
|
1716 |
-
hsb.h *= 60;
|
1717 |
-
if (hsb.h < 0)
|
1718 |
-
hsb.h += 360;
|
1719 |
-
hsb.s *= 100 / 255;
|
1720 |
-
hsb.b *= 100 / 255;
|
1721 |
-
return hsb;
|
1722 |
-
};
|
1723 |
-
var hsbToRgb = function (hsb) {
|
1724 |
-
var rgb = {};
|
1725 |
-
var h = hsb.h;
|
1726 |
-
var s = hsb.s * 255 / 100;
|
1727 |
-
var v = hsb.b * 255 / 100;
|
1728 |
-
if (s == 0) {
|
1729 |
-
rgb.r = rgb.g = rgb.b = v;
|
1730 |
-
} else {
|
1731 |
-
var t1 = v;
|
1732 |
-
var t2 = (255 - s) * v / 255;
|
1733 |
-
var t3 = (t1 - t2) * (h % 60) / 60;
|
1734 |
-
if (h == 360)
|
1735 |
-
h = 0;
|
1736 |
-
if (h < 60) {
|
1737 |
-
rgb.r = t1;
|
1738 |
-
rgb.b = t2;
|
1739 |
-
rgb.g = t2 + t3
|
1740 |
-
} else if (h < 120) {
|
1741 |
-
rgb.g = t1;
|
1742 |
-
rgb.b = t2;
|
1743 |
-
rgb.r = t1 - t3
|
1744 |
-
} else if (h < 180) {
|
1745 |
-
rgb.g = t1;
|
1746 |
-
rgb.r = t2;
|
1747 |
-
rgb.b = t2 + t3
|
1748 |
-
} else if (h < 240) {
|
1749 |
-
rgb.b = t1;
|
1750 |
-
rgb.r = t2;
|
1751 |
-
rgb.g = t1 - t3
|
1752 |
-
} else if (h < 300) {
|
1753 |
-
rgb.b = t1;
|
1754 |
-
rgb.g = t2;
|
1755 |
-
rgb.r = t2 + t3
|
1756 |
-
} else if (h < 360) {
|
1757 |
-
rgb.r = t1;
|
1758 |
-
rgb.g = t2;
|
1759 |
-
rgb.b = t1 - t3
|
1760 |
-
} else {
|
1761 |
-
rgb.r = 0;
|
1762 |
-
rgb.g = 0;
|
1763 |
-
rgb.b = 0
|
1764 |
-
}
|
1765 |
-
}
|
1766 |
-
return {r: Math.round(rgb.r), g: Math.round(rgb.g), b: Math.round(rgb.b)};
|
1767 |
-
};
|
1768 |
-
var rgbToHex = function (rgb) {
|
1769 |
-
var hex = [
|
1770 |
-
rgb.r.toString(16),
|
1771 |
-
rgb.g.toString(16),
|
1772 |
-
rgb.b.toString(16)
|
1773 |
-
];
|
1774 |
-
$.each(hex, function (nr, val) {
|
1775 |
-
if (val.length == 1) {
|
1776 |
-
hex[nr] = '0' + val;
|
1777 |
-
}
|
1778 |
-
});
|
1779 |
-
return hex.join('');
|
1780 |
-
};
|
1781 |
-
var hsbToHex = function (hsb) {
|
1782 |
-
return rgbToHex(hsbToRgb(hsb));
|
1783 |
-
};
|
1784 |
-
$.fn.extend({
|
1785 |
-
colpick: colpick.init,
|
1786 |
-
colpickHide: colpick.hidePicker,
|
1787 |
-
colpickShow: colpick.showPicker,
|
1788 |
-
colpickSetColor: colpick.setColor
|
1789 |
-
});
|
1790 |
-
$.extend({
|
1791 |
-
colpick: {
|
1792 |
-
rgbToHex: rgbToHex,
|
1793 |
-
rgbToHsb: rgbToHsb,
|
1794 |
-
hsbToHex: hsbToHex,
|
1795 |
-
hsbToRgb: hsbToRgb,
|
1796 |
-
hexToHsb: hexToHsb,
|
1797 |
-
hexToRgb: hexToRgb
|
1798 |
-
}
|
1799 |
-
});
|
1800 |
Â
})(jQuery);
|
1 |
+
var strict;
|
2 |
+
|
3 |
+
|
4 |
+
jQuery(document).ready(function ($) {
|
5 |
+
|
6 |
+
// show / hide helper description
|
7 |
+
$('.quads-tooltip').click(function (e) {
|
8 |
+
e.preventDefault();
|
9 |
+
var icon = $(this),
|
10 |
+
bubble = $(this).next();
|
11 |
+
|
12 |
+
// Close any that are already open
|
13 |
+
$('.quads-tooltip-message').not(bubble).hide();
|
14 |
+
|
15 |
+
var position = icon.position();
|
16 |
+
if (bubble.hasClass('bottom')) {
|
17 |
+
bubble.css({
|
18 |
+
'left': (position.left - bubble.width() / 2) + 'px',
|
19 |
+
'top': (position.top + icon.height() + 9) + 'px'
|
20 |
+
});
|
21 |
+
} else {
|
22 |
+
bubble.css({
|
23 |
+
'left': (position.left + icon.width() + 9) + 'px',
|
24 |
+
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
25 |
+
});
|
26 |
+
}
|
27 |
+
|
28 |
+
bubble.toggle();
|
29 |
+
e.stopPropagation();
|
30 |
+
});
|
31 |
+
|
32 |
+
$('body').click(function () {
|
33 |
+
$('.quads-tooltip-message').hide();
|
34 |
+
});
|
35 |
+
|
36 |
+
$('.quads-tooltip-message').click(function (e) {
|
37 |
+
e.stopPropagation();
|
38 |
+
});
|
39 |
+
|
40 |
+
|
41 |
+
// vi login process
|
42 |
+
$("#quads_vi_login_submit").click(function(e){
|
43 |
+
e.preventDefault();
|
44 |
+
username = $("#quads-vi-email").val();
|
45 |
+
password = $("#quads-vi-password").val();
|
46 |
+
|
47 |
+
var data = '{"email":"' + username + '", "password":"' + password + '"}';
|
48 |
+
|
49 |
+
$.ajax({
|
50 |
+
type: "POST",
|
51 |
+
//url: "https://dashboard-api-test.vidint.net/v1/api/authenticate",
|
52 |
+
url: quads.vi_login_url,
|
53 |
+
contentType: 'application/json',
|
54 |
+
data: data,
|
55 |
+
statusCode: {
|
56 |
+
502: function () {
|
57 |
+
$("#quads_add_err").html("502 Bad Gateway. Contact support[at]vi.ai");
|
58 |
+
console.log('502 Bad Gateway.');
|
59 |
+
return false;
|
60 |
+
},
|
61 |
+
500: function () {
|
62 |
+
$("#quads_add_err").html("500 Bad Gateway. Contact support[at]vi.ai");
|
63 |
+
console.log('500 Bad Gateway.');
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
},
|
67 |
+
success: function(response){
|
68 |
+
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
69 |
+
$("#quads_add_err").hide();
|
70 |
+
if (typeof response.data !== 'undefined') {
|
71 |
+
$("#quads_add_err").html("We are logging you in");
|
72 |
+
console.log('We are logging you in' + response);
|
73 |
+
saveViToken(response.data);
|
74 |
+
}
|
75 |
+
else {
|
76 |
+
$("#quads_add_err").html("No valid API response. Can not log you in. Contact support[at]vi.ai");
|
77 |
+
console.log('no valid api response' + response);
|
78 |
+
}
|
79 |
+
},
|
80 |
+
error: function(response){
|
81 |
+
// check if xhr.status is defined in $.ajax.statusCode
|
82 |
+
// if true, return false to stop this function
|
83 |
+
if (typeof this.statusCode[response.status] != 'undefined') {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
var result = typeof response.responseText !== 'undefined' ? JSON.parse(response.responseText) : '';
|
88 |
+
$("#quads_add_err").html(result.error.message + ' ' + result.error.description);
|
89 |
+
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
90 |
+
$("#quads_add_err").show();
|
91 |
+
$("#quads_add_err").removeClass('quads-spinner');
|
92 |
+
console.log(result);
|
93 |
+
//exit;
|
94 |
+
},
|
95 |
+
beforeSend:function()
|
96 |
+
{
|
97 |
+
$("#quads_vi_loading").css('display', 'inline', 'important').css('visibility', 'visible');
|
98 |
+
$("#quads_add_err").show();
|
99 |
+
},
|
100 |
+
|
101 |
+
complete:function()
|
102 |
+
{
|
103 |
+
$("#quads_vi_loading").css('display', 'none', 'important').css('visibility', 'hidden');
|
104 |
+
}
|
105 |
+
|
106 |
+
});
|
107 |
+
return false;
|
108 |
+
});
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Save vi token
|
112 |
+
*/
|
113 |
+
function saveViToken(token){
|
114 |
+
var data = {
|
115 |
+
'action': 'quads_save_vi_token',
|
116 |
+
'token': token
|
117 |
+
};
|
118 |
+
$.ajax({
|
119 |
+
type: "POST",
|
120 |
+
url: ajaxurl,
|
121 |
+
dataType: "json",
|
122 |
+
data: data,
|
123 |
+
//contentType: 'application/json;charset=utf-8',
|
124 |
+
success: function(response){
|
125 |
+
//response = JSON.stringify(response);
|
126 |
+
console.log(response.status);
|
127 |
+
|
128 |
+
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
129 |
+
$("#quads_add_err").hide();
|
130 |
+
if (typeof response.status != 'undefined' && response.status == 'success') {
|
131 |
+
console.log('Success, login succesfull, token stored' + response);
|
132 |
+
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
133 |
+
return false;
|
134 |
+
}
|
135 |
+
else {
|
136 |
+
console.log("Can not store token");
|
137 |
+
window.location.href = quads.path + '/wp-admin/?page=quads-settings&tab=general#quads_settingsvi_header';
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
},
|
141 |
+
beforeSend:function()
|
142 |
+
{
|
143 |
+
$("#quads_add_err").css('display', 'inline', 'important').css('visibility', 'visible');
|
144 |
+
$("#quads_add_err").show();
|
145 |
+
},
|
146 |
+
complete:function()
|
147 |
+
{
|
148 |
+
$("#quads_add_err").css('display', 'none', 'important').css('visibility', 'hidden');
|
149 |
+
$("#quads_add_err").hide();
|
150 |
+
}
|
151 |
+
|
152 |
+
});
|
153 |
+
}
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
// Remove several unused elements from vi page
|
159 |
+
if (document.location.href.indexOf('vi_header') > - 1) {
|
160 |
+
$('#quads-submit-button').hide();
|
161 |
+
$('#quads-validate').hide();
|
162 |
+
$('#quads-footer').hide();
|
163 |
+
} else {
|
164 |
+
$('#quads-submit-button').show();
|
165 |
+
$('#quads-validate').show();
|
166 |
+
$('#quads-footer').show();
|
167 |
+
}
|
168 |
+
$(window).bind('easytabs:after', function(){
|
169 |
+
if (document.location.href.indexOf('vi_header') > - 1) {
|
170 |
+
$('#quads-submit-button').hide();
|
171 |
+
$('#quads-validate').hide();
|
172 |
+
$('#quads-footer').hide();
|
173 |
+
} else {
|
174 |
+
|
175 |
+
$('#quads-submit-button').show();
|
176 |
+
$('#quads-validate').show();
|
177 |
+
$('#quads-footer').show();
|
178 |
+
}
|
179 |
+
});
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
// VI signup form
|
186 |
+
$('#quads-vi-signup').click(function(e){
|
187 |
+
e.preventDefault();
|
188 |
+
// scroll to top
|
189 |
+
$(window).scrollTop(0);
|
190 |
+
// hide save button
|
191 |
+
$('#quads-submit-button').hide();
|
192 |
+
$('#quads-vi-signup-fullscreen').fadeIn();
|
193 |
+
});
|
194 |
+
$('#quads-vi-close').click(function(e){
|
195 |
+
e.preventDefault();
|
196 |
+
$('#quads-vi-signup-fullscreen').fadeOut();
|
197 |
+
});
|
198 |
+
|
199 |
+
/**
|
200 |
+
* General Tab
|
201 |
+
*/
|
202 |
+
// Inactive select fields are greyed out
|
203 |
+
$('.quads-assign').each(function(e){
|
204 |
+
if (!$(this).prop('checked')){
|
205 |
+
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
206 |
+
}else {
|
207 |
+
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
208 |
+
}
|
209 |
+
});
|
210 |
+
|
211 |
+
$('.quads-assign').click(function(){
|
212 |
+
if (!$(this).prop('checked')){
|
213 |
+
$(this).next('select').css('background-color', 'whitesmoke').css('color', '#939393');
|
214 |
+
} else {
|
215 |
+
$(this).next('select').css('background-color', 'white').css('color', 'black');
|
216 |
+
}
|
217 |
+
});
|
218 |
+
|
219 |
+
/**
|
220 |
+
* AdSense Code Tab
|
221 |
+
*/
|
222 |
+
// Check if submit button is visible than stick it to the bottom of the page
|
223 |
+
$(window).scroll(function() {
|
224 |
+
|
225 |
+
var elem = '#quads_tab_container .submit';
|
226 |
+
|
227 |
+
if ($(elem).length < 1){
|
228 |
+
return;
|
229 |
+
}
|
230 |
+
|
231 |
+
var top_of_element = $(elem).offset().top;
|
232 |
+
var bottom_of_element = $(elem).offset().top + $(elem).outerHeight(false);
|
233 |
+
var bottom_of_screen = $(window).scrollTop() + $(window).height();
|
234 |
+
if (bottom_of_screen > top_of_element){
|
235 |
+
// The element is visible, do something
|
236 |
+
$('#quads-submit-button').css('position', 'relative').css('bottom', '20px');
|
237 |
+
} else {
|
238 |
+
// The element is NOT visible, do something else
|
239 |
+
$('#quads-submit-button').css('position', 'fixed').css('bottom', '20px');
|
240 |
+
}
|
241 |
+
});
|
242 |
+
|
243 |
+
// Activate chosen select boxes
|
244 |
+
// $(".quads-chosen-select").chosen({
|
245 |
+
// inherit_select_classes: true
|
246 |
+
// });
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
// Hid or show AMP code form on click on amp checkbox
|
251 |
+
$('.quads-activate-amp').click(function(){
|
252 |
+
var parent = $(this).parents('.quads-ad-toggle-container').attr('id');
|
253 |
+
if ($(this).attr('checked') === 'checked') {
|
254 |
+
$('#' + parent).find('.quads-amp-code').show();
|
255 |
+
} else {
|
256 |
+
$('#' + parent).find('.quads-amp-code').hide();
|
257 |
+
}
|
258 |
+
});
|
259 |
+
|
260 |
+
|
261 |
+
// Hide or show AMP code form on loading
|
262 |
+
$('.quads-ad-toggle-container').find('.quads-activate-amp').each(function (index, value) {
|
263 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
264 |
+
if ($(this).attr( 'checked') === 'checked' ) {
|
265 |
+
$('#' + parentContainerID).find('.quads-amp-code').show();
|
266 |
+
}else {
|
267 |
+
$('#' + parentContainerID).find('.quads-amp-code').hide();
|
268 |
+
}
|
269 |
+
});
|
270 |
+
|
271 |
+
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Toggle Button | Open All Ads
|
275 |
+
*/
|
276 |
+
$('#quads-open-toggle').click(function(){
|
277 |
+
if ($('#quads-open-toggle').text() === 'Open All Ads' ){
|
278 |
+
$('.quads-ad-toggle-container').show();
|
279 |
+
$('#quads-open-toggle').html('Close Ads');
|
280 |
+
}else{
|
281 |
+
$('.quads-ad-toggle-container').hide();
|
282 |
+
$('#quads-open-toggle').html('Open All Ads');
|
283 |
+
}
|
284 |
+
});
|
285 |
+
|
286 |
+
// show / hide helper description
|
287 |
+
$('.quads-helper').click(function (e) {
|
288 |
+
e.preventDefault();
|
289 |
+
var icon = $(this),
|
290 |
+
bubble = $(this).next();
|
291 |
+
|
292 |
+
// Close any that are already open
|
293 |
+
$('.quads-message').not(bubble).hide();
|
294 |
+
|
295 |
+
var position = icon.position();
|
296 |
+
if (bubble.hasClass('bottom')) {
|
297 |
+
bubble.css({
|
298 |
+
'left': (position.left - bubble.width() / 2) + 'px',
|
299 |
+
'top': (position.top + icon.height() + 9) + 'px'
|
300 |
+
});
|
301 |
+
} else {
|
302 |
+
bubble.css({
|
303 |
+
'left': (position.left + icon.width() + 9) + 'px',
|
304 |
+
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
305 |
+
});
|
306 |
+
}
|
307 |
+
|
308 |
+
bubble.toggle();
|
309 |
+
e.stopPropagation();
|
310 |
+
});
|
311 |
+
$('.quads-general-helper').click(function (e) {
|
312 |
+
e.preventDefault();
|
313 |
+
var icon = $(this),
|
314 |
+
bubble = $(this).next();
|
315 |
+
|
316 |
+
// Close any that are already open
|
317 |
+
$('.quads-message').not(bubble).hide();
|
318 |
+
|
319 |
+
var position = icon.position();
|
320 |
+
if (bubble.hasClass('bottom')) {
|
321 |
+
bubble.css({
|
322 |
+
'left': (position.left - bubble.width() / 2) + 'px',
|
323 |
+
'top': (position.top + icon.height() + 9) + 'px'
|
324 |
+
});
|
325 |
+
} else {
|
326 |
+
bubble.css({
|
327 |
+
'left': (position.left + icon.width() + 9) + 'px',
|
328 |
+
'top': (position.top + icon.height() / 2 - 18) + 'px'
|
329 |
+
});
|
330 |
+
}
|
331 |
+
|
332 |
+
bubble.toggle();
|
333 |
+
e.stopPropagation();
|
334 |
+
});
|
335 |
+
|
336 |
+
$('body').click(function () {
|
337 |
+
$('.quads-message').hide();
|
338 |
+
});
|
339 |
+
|
340 |
+
$('.quads-message').click(function (e) {
|
341 |
+
e.stopPropagation();
|
342 |
+
});
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Save settings via ajax
|
346 |
+
*/
|
347 |
+
|
348 |
+
jQuery('#quads_settings').submit(function() {
|
349 |
+
|
350 |
+
// Check if ad name has been changed and prepare new data for saving
|
351 |
+
$('.quads-toogle-title').each(function(){
|
352 |
+
$(this).children('input').val($(this).text());
|
353 |
+
});
|
354 |
+
|
355 |
+
|
356 |
+
// Check current url / settings page
|
357 |
+
var url = window.location.search;
|
358 |
+
var tab_imexport = url.search("page=quads-settings&tab=imexport");
|
359 |
+
var tab_licenses = url.search("page=quads-settings&tab=licenses");
|
360 |
+
|
361 |
+
jQuery('#quads-save-result').html("<div id='quads-loader' class='quads-loader'></div>");
|
362 |
+
jQuery('#quads-loader').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/loader1.gif"></p>').show();
|
363 |
+
jQuery(this).ajaxSubmit({
|
364 |
+
|
365 |
+
success: function(){
|
366 |
+
jQuery('#quads-save-result').html("<div id='quads-save-message' class='quads-success-modal'></div>");
|
367 |
+
jQuery('#quads-save-message').append('<p><img src="'+quads.path+'/wp-content/plugins/quick-adsense-reloaded/assets/images/saved.gif"></p>').show();
|
368 |
+
quads_hide_success_message();
|
369 |
+
},
|
370 |
+
//,timeout: 0,
|
371 |
+
|
372 |
+
error: function(){
|
373 |
+
//Do not show alert on import/export tab
|
374 |
+
if ( tab_imexport === -1 && tab_licenses === -1 ){
|
375 |
+
alert ('Error: Can not save settings. Try again');
|
376 |
+
}
|
377 |
+
jQuery('#quads-save-result').hide('fast');
|
378 |
+
}
|
379 |
+
});
|
380 |
+
// Do not use ajax saving on import/export and licenses tab
|
381 |
+
if ( tab_imexport === -1 && tab_licenses ===-1 ){
|
382 |
+
return false;
|
383 |
+
}
|
384 |
+
});
|
385 |
+
|
386 |
+
function quads_hide_success_message(){
|
387 |
+
setTimeout("jQuery('#quads-save-message').hide()", 1000);
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Paste AdSense Code form
|
393 |
+
*/
|
394 |
+
$(document).on('click', '#quads-paste-button', function () {
|
395 |
+
|
396 |
+
var content = $('#quads-adsense-form').val();
|
397 |
+
var parseResult = quadsParseAdSenseCode(content);
|
398 |
+
if (false !== parseResult) {
|
399 |
+
console.log(parseResult);
|
400 |
+
setDetailsFromAdCode(parseResult);
|
401 |
+
}else{
|
402 |
+
$('#quads-msg').html('Can not parse AdSense Code. Is the code valid?');
|
403 |
+
$('#quads-msg').show();
|
404 |
+
}
|
405 |
+
});
|
406 |
+
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Populate AdSense Date Fields
|
410 |
+
*
|
411 |
+
* @param object adsense
|
412 |
+
* @param2 string id of the parent container
|
413 |
+
* @returns false
|
414 |
+
*/
|
415 |
+
function setDetailsFromAdCode(GoogleAd) {
|
416 |
+
|
417 |
+
var containerID = $('#quads-adsense-id').val();
|
418 |
+
|
419 |
+
var id = containerID.replace("quads-toggle", "");
|
420 |
+
|
421 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_slot\\]').val(GoogleAd.slotId);
|
422 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_client\\]').val(GoogleAd.pubId);
|
423 |
+
if ('normal' == GoogleAd.type) {
|
424 |
+
console.log($('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]'));
|
425 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('normal');
|
426 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val(GoogleAd.width);
|
427 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val(GoogleAd.height);
|
428 |
+
}
|
429 |
+
if ('responsive' == GoogleAd.type) {
|
430 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[adsense_type\\]').val('responsive');
|
431 |
+
//$('#ad-resize-type').val('auto');
|
432 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_width\\]').val('');
|
433 |
+
$('#quads_settings\\[ads\\]\\[' + id + '\\]\\[g_data_ad_height\\]').val('');
|
434 |
+
}
|
435 |
+
// Trigger the ad type select
|
436 |
+
$('.quads-select-Type').trigger('change');
|
437 |
+
// Hide the overlay
|
438 |
+
$('#quads-adsense-bg-div').hide();
|
439 |
+
// Ad code input form must not be empty!
|
440 |
+
if ($('#' + containerID).children('textarea').val().length === 0){
|
441 |
+
$('#' + containerID).children('textarea').val('adsense');
|
442 |
+
}
|
443 |
+
|
444 |
+
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Parse the adsense ad content
|
449 |
+
* @param {type} content
|
450 |
+
* @returns {quads-admin.min_L3.parseAdContent.GoogleAd|Boolean}
|
451 |
+
*/
|
452 |
+
function quadsParseAdSenseCode(content) {
|
453 |
+
|
454 |
+
var rawContent = ('undefined' != typeof (content)) ? content.trim() : '';
|
455 |
+
var GoogleAd = {};
|
456 |
+
var theContent = $('<div />').html(rawContent);
|
457 |
+
var asyncGoogleAd = theContent.find('ins');
|
458 |
+
//var syncGoogleAd = theContent.search('google_ad_client');
|
459 |
+
|
460 |
+
// Its a async adsense ad
|
461 |
+
if (asyncGoogleAd.length > 0) {
|
462 |
+
console.log('async ad');
|
463 |
+
|
464 |
+
// Ad Slot ID
|
465 |
+
GoogleAd.slotId = asyncGoogleAd.attr('data-ad-slot');
|
466 |
+
|
467 |
+
if ('undefined' != typeof (asyncGoogleAd.attr('data-ad-client'))) {
|
468 |
+
// Ad Publisher ID
|
469 |
+
GoogleAd.pubId = asyncGoogleAd.attr('data-ad-client').substr(3);
|
470 |
+
}
|
471 |
+
|
472 |
+
if (undefined !== GoogleAd.slotId && '' != GoogleAd.pubId) {
|
473 |
+
GoogleAd.display = asyncGoogleAd.css('display');
|
474 |
+
GoogleAd.format = asyncGoogleAd.attr('data-ad-format');
|
475 |
+
GoogleAd.style = asyncGoogleAd.attr('style');
|
476 |
+
|
477 |
+
if ('undefined' == typeof (GoogleAd.format) && -1 != GoogleAd.style.indexOf('width')) {
|
478 |
+
/* normal ad */
|
479 |
+
GoogleAd.type = 'normal';
|
480 |
+
GoogleAd.width = asyncGoogleAd.css('width').replace('px', '');
|
481 |
+
GoogleAd.height = asyncGoogleAd.css('height').replace('px', '');
|
482 |
+
return GoogleAd;
|
483 |
+
}
|
484 |
+
|
485 |
+
if ('undefined' != typeof (GoogleAd.format) && 'auto' == GoogleAd.format) {
|
486 |
+
/* Responsive ad, auto resize */
|
487 |
+
GoogleAd.type = 'responsive';
|
488 |
+
return GoogleAd;
|
489 |
+
}
|
490 |
+
return GoogleAd;
|
491 |
+
}
|
492 |
+
|
493 |
+
return false;
|
494 |
+
}
|
495 |
+
|
496 |
+
// Google syncronous ad
|
497 |
+
if (rawContent.search('google_ad_client') > 0) {
|
498 |
+
console.log('syncronous code');
|
499 |
+
|
500 |
+
// Ad Slot ID
|
501 |
+
GoogleAd.slotId = get_google_ad_slot(content);
|
502 |
+
|
503 |
+
console.log(get_google_ad_slot(content));
|
504 |
+
console.log(get_google_ad_client(content));
|
505 |
+
console.log(get_google_ad_height(content));
|
506 |
+
console.log(get_google_ad_width(content));
|
507 |
+
|
508 |
+
if (!quadsIsEmpty(get_google_ad_client(content))) {
|
509 |
+
// Ad Publisher ID
|
510 |
+
GoogleAd.pubId = 'ca-pub-' + get_google_ad_client(content);
|
511 |
+
}else{
|
512 |
+
return false;
|
513 |
+
}
|
514 |
+
|
515 |
+
if (!quadsIsEmpty(GoogleAd.slotId) && !quadsIsEmpty(GoogleAd.pubId)) {
|
516 |
+
|
517 |
+
if (!quadsIsEmpty(get_google_ad_width(content))) {
|
518 |
+
GoogleAd.type = 'normal';
|
519 |
+
GoogleAd.width = get_google_ad_width(content);
|
520 |
+
GoogleAd.height = get_google_ad_height(content);
|
521 |
+
return GoogleAd;
|
522 |
+
}
|
523 |
+
}
|
524 |
+
return false;
|
525 |
+
}
|
526 |
+
|
527 |
+
return false;
|
528 |
+
}
|
529 |
+
|
530 |
+
function get_google_ad_slot(content) {
|
531 |
+
const regex = /google_ad_slot\s*=\s*"(\d*)";/g;
|
532 |
+
const str = content;
|
533 |
+
var m;
|
534 |
+
var result = {};
|
535 |
+
|
536 |
+
while ((m = regex.exec(str)) !== null) {
|
537 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
538 |
+
if (m.index === regex.lastIndex) {
|
539 |
+
regex.lastIndex++;
|
540 |
+
}
|
541 |
+
|
542 |
+
// The result can be accessed through the `m`-variable.
|
543 |
+
m.forEach(function(match, index){
|
544 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
545 |
+
console.log(match);
|
546 |
+
result = match;
|
547 |
+
});
|
548 |
+
}
|
549 |
+
return result;
|
550 |
+
}
|
551 |
+
function get_google_ad_client(content) {
|
552 |
+
const regex = /google_ad_client\s*=\s*"ca-pub-(\d*)";/g;
|
553 |
+
const str = content;
|
554 |
+
var m;
|
555 |
+
var result = {};
|
556 |
+
|
557 |
+
while ((m = regex.exec(str)) !== null) {
|
558 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
559 |
+
if (m.index === regex.lastIndex) {
|
560 |
+
regex.lastIndex++;
|
561 |
+
}
|
562 |
+
|
563 |
+
// The result can be accessed through the `m`-variable.
|
564 |
+
m.forEach(function(match, index){
|
565 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
566 |
+
console.log(match);
|
567 |
+
result = match;
|
568 |
+
});
|
569 |
+
}
|
570 |
+
return result;
|
571 |
+
}
|
572 |
+
function get_google_ad_width(content) {
|
573 |
+
const regex = /google_ad_width\s*=\s*(\d*);/g;
|
574 |
+
const str = content;
|
575 |
+
var m;
|
576 |
+
var result = {};
|
577 |
+
|
578 |
+
while ((m = regex.exec(str)) !== null) {
|
579 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
580 |
+
if (m.index === regex.lastIndex) {
|
581 |
+
regex.lastIndex++;
|
582 |
+
}
|
583 |
+
|
584 |
+
// The result can be accessed through the `m`-variable.
|
585 |
+
m.forEach(function(match, index){
|
586 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
587 |
+
console.log(match);
|
588 |
+
result = match;
|
589 |
+
});
|
590 |
+
}
|
591 |
+
return result;
|
592 |
+
}
|
593 |
+
function get_google_ad_height(content) {
|
594 |
+
const regex = /google_ad_height\s*=\s*(\d*);/g;
|
595 |
+
const str = content;
|
596 |
+
var m;
|
597 |
+
var result = {};
|
598 |
+
|
599 |
+
while ((m = regex.exec(str)) !== null) {
|
600 |
+
// This is necessary to avoid infinite loops with zero-width matches
|
601 |
+
if (m.index === regex.lastIndex) {
|
602 |
+
regex.lastIndex++;
|
603 |
+
}
|
604 |
+
|
605 |
+
// The result can be accessed through the `m`-variable.
|
606 |
+
m.forEach(function(match, index){
|
607 |
+
//console.log(`Found match, group ${groupIndex}: ${match}`);
|
608 |
+
console.log(match);
|
609 |
+
result = match;
|
610 |
+
});
|
611 |
+
}
|
612 |
+
return result;
|
613 |
+
}
|
614 |
+
|
615 |
+
/**
|
616 |
+
* Check if return value is empty or not
|
617 |
+
* @param {type} str
|
618 |
+
* @returns {Boolean}
|
619 |
+
*/
|
620 |
+
function quadsIsEmpty(str) {
|
621 |
+
return (!str || 0 === str.length);
|
622 |
+
}
|
623 |
+
|
624 |
+
// AdSense Code Input Form
|
625 |
+
$(document).on('click', '.quads-add-adsense', function (e) {
|
626 |
+
e.preventDefault();
|
627 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
628 |
+
// Empty the ad plain text form
|
629 |
+
$('#quads-adsense-form').val('');
|
630 |
+
$('#quads-adsense-id').val(parentContainerID);
|
631 |
+
$('#quads-adsense-bg-div').show();
|
632 |
+
});
|
633 |
+
$(document).on('click', '#quads-close-button', function (e) {
|
634 |
+
e.preventDefault();
|
635 |
+
$('#quads-adsense-bg-div').hide();
|
636 |
+
});
|
637 |
+
|
638 |
+
|
639 |
+
// Toggle between AdSense or Plain Text option
|
640 |
+
$(document).on('click', '.quads_adsense_type', function () {
|
641 |
+
|
642 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
643 |
+
|
644 |
+
if ($(this).val() === 'adsense') {
|
645 |
+
$('#' + parentContainerID).children('textarea').hide();
|
646 |
+
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
647 |
+
$('#' + parentContainerID).find('.quads-sizes').show();
|
648 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
649 |
+
|
650 |
+
}
|
651 |
+
if ($(this).val() === 'plain_text') {
|
652 |
+
$('#' + parentContainerID).children('textarea').show();
|
653 |
+
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
654 |
+
$('#' + parentContainerID).find('.quads-sizes').hide();
|
655 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
656 |
+
}
|
657 |
+
});
|
658 |
+
|
659 |
+
|
660 |
+
// Hide or show AdSense elements on loading
|
661 |
+
$('.quads-ad-toggle-container').find('.quads_adsense_type').each(function (index, value) {
|
662 |
+
|
663 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
664 |
+
|
665 |
+
if ($(this).attr('checked') === 'checked' && $(this).val() === 'adsense') {
|
666 |
+
$('#' + parentContainerID).children('textarea').fadeOut();
|
667 |
+
$('#' + parentContainerID).find('div.quads_adsense_code').show();
|
668 |
+
}
|
669 |
+
if ($(this).attr('checked') === 'checked' && $(this).val() === 'plain_text') {
|
670 |
+
$('#' + parentContainerID).children('textarea').fadeIn();
|
671 |
+
$('#' + parentContainerID).children('div.quads_adsense_code').hide();
|
672 |
+
}
|
673 |
+
});
|
674 |
+
|
675 |
+
|
676 |
+
// Hide or show AdSense width and height on loading
|
677 |
+
$('.quads-ad-toggle-container').find('.quads-select-Type').each(function (index, value) {
|
678 |
+
|
679 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
680 |
+
|
681 |
+
if ($(this).val() === 'responsive') {
|
682 |
+
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
683 |
+
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
684 |
+
$('#' + parentContainerID).find('.quads-sizes').show();
|
685 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
686 |
+
}
|
687 |
+
if ($(this).val() === 'normal') {
|
688 |
+
$('#' + parentContainerID).find('.quads-type-normal').show();
|
689 |
+
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
690 |
+
$('#' + parentContainerID).find('.quads-sizes').hide();
|
691 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
692 |
+
}
|
693 |
+
});
|
694 |
+
|
695 |
+
|
696 |
+
// Toggle between Fixed Size or Responsive ad type
|
697 |
+
$(document).on('change', '.quads-select-Type', function () {
|
698 |
+
var parentContainerID = $(this).parents('.quads-ad-toggle-container').attr('id');
|
699 |
+
|
700 |
+
if ($(this).val() === 'responsive') {
|
701 |
+
$('#' + parentContainerID).find('.quads-type-normal').hide();
|
702 |
+
$('#' + parentContainerID).find('.quads-pro-notice').show();
|
703 |
+
$('#' + parentContainerID).find('.quads-sizes').show();
|
704 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','');
|
705 |
+
}
|
706 |
+
if ($(this).val() === 'normal') {
|
707 |
+
$('#' + parentContainerID).find('.quads-type-normal').show();
|
708 |
+
$('#' + parentContainerID).find('.quads-pro-notice').hide();
|
709 |
+
$('#' + parentContainerID).find('.quads-sizes').hide();
|
710 |
+
$('#' + parentContainerID).find('.quads-sizes-container').css('clear','both');
|
711 |
+
}
|
712 |
+
});
|
713 |
+
|
714 |
+
//*[@id="quads-togglead1"]/div[2]
|
715 |
+
/**
|
716 |
+
* Toggle the adsense container
|
717 |
+
*/
|
718 |
+
//$('.quads-ad-toggle-header').click(function (e) {
|
719 |
+
$('.quads-form-table').on('click', '.quads-ad-toggle-header', function(e) {
|
720 |
+
e.preventDefault();
|
721 |
+
|
722 |
+
var container = $('#' + $(this).data('box-id'));
|
723 |
+
//console.log(container);
|
724 |
+
container.toggle(0, function () {
|
725 |
+
if (container.parents('.quads-ad-toggle-header').hasClass('quads-box-close')) {
|
726 |
+
// open the box
|
727 |
+
container.parents('.quads-ad-toggle-header').removeClass('quads-box-close');
|
728 |
+
} else {
|
729 |
+
container.parents('.quads-ad-toggle-header').addClass('quads-box-close');
|
730 |
+
}
|
731 |
+
});
|
732 |
+
});
|
733 |
+
|
734 |
+
/*
|
735 |
+
* Quick Adsense import process
|
736 |
+
*/
|
737 |
+
|
738 |
+
jQuery('.quads-import-settings').click(function (e) {
|
739 |
+
e.preventDefault();
|
740 |
+
|
741 |
+
if (!confirm('Importing settings from Quick AdSense will overwrite all your current settings. Are you sure?'))
|
742 |
+
return;
|
743 |
+
|
744 |
+
jQuery('#quads-import-settings').addClass('loading');
|
745 |
+
var data = {
|
746 |
+
action: 'quads_import_quick_adsense',
|
747 |
+
nonce: quads.nonce,
|
748 |
+
};
|
749 |
+
$.post(ajaxurl, data, function (resp, status, xhr) {
|
750 |
+
|
751 |
+
//console.log('success:' + resp + status + xhr);
|
752 |
+
quads_show_message(resp);
|
753 |
+
|
754 |
+
}).fail(function (xhr) { // Will be executed when $.post() fails
|
755 |
+
quads_show_message('Ajax Error: ' + xhr.status + ' ' + xhr.statusText);
|
756 |
+
//console.log('error: ' + xhr.statusText);
|
757 |
+
});
|
758 |
+
});
|
759 |
+
|
760 |
+
jQuery('#quads_insert_ads_action').click(function (e) {
|
761 |
+
e.preventDefault();
|
762 |
+
jQuery('#quads_insert_ads_box').toggle();
|
763 |
+
});
|
764 |
+
|
765 |
+
jQuery('#quads_disable_ads_action').click(function (e) {
|
766 |
+
e.preventDefault();
|
767 |
+
jQuery('#quads_disable_ads_box').toggle();
|
768 |
+
});
|
769 |
+
|
770 |
+
|
771 |
+
/**
|
772 |
+
* Show error message and die()
|
773 |
+
* Writes error message into log file
|
774 |
+
*
|
775 |
+
* @param {string} $error notice
|
776 |
+
* @returns void
|
777 |
+
*/
|
778 |
+
function quads_show_message(error) {
|
779 |
+
$('#quads-error-details').show();
|
780 |
+
$('#quads-error-details').html(error);
|
781 |
+
console.log(error);
|
782 |
+
}
|
783 |
+
|
784 |
+
|
785 |
+
/**
|
786 |
+
* Start easytabs()
|
787 |
+
*/
|
788 |
+
if ($(".quads-tabs").length) {
|
789 |
+
$('#quads_tab_container').easytabs({
|
790 |
+
animate: true,
|
791 |
+
updateHash: true,
|
792 |
+
animationSpeed: 'fast'
|
793 |
+
});
|
794 |
+
}
|
795 |
+
|
796 |
+
|
797 |
+
|
798 |
+
|
799 |
+
}); // document ready
|
800 |
+
|
801 |
+
/*
|
802 |
+
* jQuery hashchange event - v1.3 - 7/21/2010
|
803 |
+
* http://benalman.com/projects/jquery-hashchange-plugin/
|
804 |
+
*
|
805 |
+
* Copyright (c) 2010 "Cowboy" Ben Alman
|
806 |
+
* Dual licensed under the MIT and GPL licenses.
|
807 |
+
* http://benalman.com/about/license/
|
808 |
+
*/
|
809 |
+
(function ($, e, b) {
|
810 |
+
var c = "hashchange", h = document, f, g = $.event.special, i = h.documentMode, d = "on" + c in e && (i === b || i > 7);
|
811 |
+
function a(j) {
|
812 |
+
j = j || location.href;
|
813 |
+
return"#" + j.replace(/^[^#]*#?(.*)$/, "$1")
|
814 |
+
}
|
815 |
+
$.fn[c] = function (j) {
|
816 |
+
return j ? this.bind(c, j) : this.trigger(c)
|
817 |
+
};
|
818 |
+
$.fn[c].delay = 50;
|
819 |
+
g[c] = $.extend(g[c], {setup: function () {
|
820 |
+
if (d) {
|
821 |
+
return false
|
822 |
+
}
|
823 |
+
$(f.start)
|
824 |
+
}, teardown: function () {
|
825 |
+
if (d) {
|
826 |
+
return false
|
827 |
+
}
|
828 |
+
$(f.stop)
|
829 |
+
}});
|
830 |
+
f = (function () {
|
831 |
+
var j = {}, p, m = a(), k = function (q) {
|
832 |
+
return q
|
833 |
+
}, l = k, o = k;
|
834 |
+
j.start = function () {
|
835 |
+
p || n()
|
836 |
+
};
|
837 |
+
j.stop = function () {
|
838 |
+
p && clearTimeout(p);
|
839 |
+
p = b
|
840 |
+
};
|
841 |
+
function n() {
|
842 |
+
var r = a(), q = o(m);
|
843 |
+
if (r !== m) {
|
844 |
+
l(m = r, q);
|
845 |
+
$(e).trigger(c)
|
846 |
+
} else {
|
847 |
+
if (q !== m) {
|
848 |
+
location.href = location.href.replace(/#.*/, "") + q
|
849 |
+
}
|
850 |
+
}
|
851 |
+
p = setTimeout(n, $.fn[c].delay)
|
852 |
+
}
|
853 |
+
$.browser.msie && !d && (function () {
|
854 |
+
var q, r;
|
855 |
+
j.start = function () {
|
856 |
+
if (!q) {
|
857 |
+
r = $.fn[c].src;
|
858 |
+
r = r && r + a();
|
859 |
+
q = $('<iframe tabindex="-1" title="empty"/>').hide().one("load", function () {
|
860 |
+
r || l(a());
|
861 |
+
n()
|
862 |
+
}).attr("src", r || "javascript:0").insertAfter("body")[0].contentWindow;
|
863 |
+
h.onpropertychange = function () {
|
864 |
+
try {
|
865 |
+
if (event.propertyName === "title") {
|
866 |
+
q.document.title = h.title
|
867 |
+
}
|
868 |
+
} catch (s) {
|
869 |
+
}
|
870 |
+
}
|
871 |
+
}
|
872 |
+
};
|
873 |
+
j.stop = k;
|
874 |
+
o = function () {
|
875 |
+
return a(q.location.href)
|
876 |
+
};
|
877 |
+
l = function (v, s) {
|
878 |
+
var u = q.document, t = $.fn[c].domain;
|
879 |
+
if (v !== s) {
|
880 |
+
u.title = h.title;
|
881 |
+
u.open();
|
882 |
+
t && u.write('<script>document.domain="' + t + '"<\/script>');
|
883 |
+
u.close();
|
884 |
+
q.location.hash = v
|
885 |
+
}
|
886 |
+
}
|
887 |
+
})();
|
888 |
+
return j
|
889 |
+
})()
|
890 |
+
})(jQuery, this);
|
891 |
+
|
892 |
+
/*
|
893 |
+
* jQuery EasyTabs plugin 3.2.0
|
894 |
+
*
|
895 |
+
* Copyright (c) 2010-2011 Steve Schwartz (JangoSteve)
|
896 |
+
*
|
897 |
+
* Dual licensed under the MIT and GPL licenses:
|
898 |
+
* http://www.opensource.org/licenses/mit-license.php
|
899 |
+
* http://www.gnu.org/licenses/gpl.html
|
900 |
+
*
|
901 |
+
* Date: Thu May 09 17:30:00 2013 -0500
|
902 |
+
*/
|
903 |
+
(function (a) {
|
904 |
+
a.easytabs = function (j, e) {
|
905 |
+
var f = this, q = a(j), i = {animate: true, panelActiveClass: "active", tabActiveClass: "active", defaultTab: "li:first-child", animationSpeed: "fast", tabs: "> ul > li", updateHash: true, cycle: false, collapsible: false, collapsedClass: "collapsed", collapsedByDefault: true, uiTabs: false, transitionIn: "fadeIn", transitionOut: "fadeOut", transitionInEasing: "swing", transitionOutEasing: "swing", transitionCollapse: "slideUp", transitionUncollapse: "slideDown", transitionCollapseEasing: "swing", transitionUncollapseEasing: "swing", containerClass: "", tabsClass: "", tabClass: "", panelClass: "", cache: true, event: "click", panelContext: q}, h, l, v, m, d, t = {fast: 200, normal: 400, slow: 600}, r;
|
906 |
+
f.init = function () {
|
907 |
+
f.settings = r = a.extend({}, i, e);
|
908 |
+
r.bind_str = r.event + ".easytabs";
|
909 |
+
if (r.uiTabs) {
|
910 |
+
r.tabActiveClass = "ui-tabs-selected";
|
911 |
+
r.containerClass = "ui-tabs ui-widget ui-widget-content ui-corner-all";
|
912 |
+
r.tabsClass = "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all";
|
913 |
+
r.tabClass = "ui-state-default ui-corner-top";
|
914 |
+
r.panelClass = "ui-tabs-panel ui-widget-content ui-corner-bottom"
|
915 |
+
}
|
916 |
+
if (r.collapsible && e.defaultTab !== undefined && e.collpasedByDefault === undefined) {
|
917 |
+
r.collapsedByDefault = false
|
918 |
+
}
|
919 |
+
if (typeof (r.animationSpeed) === "string") {
|
920 |
+
r.animationSpeed = t[r.animationSpeed]
|
921 |
+
}
|
922 |
+
a("a.anchor").remove().prependTo("body");
|
923 |
+
q.data("easytabs", {});
|
924 |
+
f.setTransitions();
|
925 |
+
f.getTabs();
|
926 |
+
b();
|
927 |
+
g();
|
928 |
+
w();
|
929 |
+
n();
|
930 |
+
c();
|
931 |
+
q.attr("data-easytabs", true)
|
932 |
+
};
|
933 |
+
f.setTransitions = function () {
|
934 |
+
v = (r.animate) ? {show: r.transitionIn, hide: r.transitionOut, speed: r.animationSpeed, collapse: r.transitionCollapse, uncollapse: r.transitionUncollapse, halfSpeed: r.animationSpeed / 2} : {show: "show", hide: "hide", speed: 0, collapse: "hide", uncollapse: "show", halfSpeed: 0}
|
935 |
+
};
|
936 |
+
f.getTabs = function () {
|
937 |
+
var x;
|
938 |
+
f.tabs = q.find(r.tabs), f.panels = a(), f.tabs.each(function () {
|
939 |
+
var A = a(this), z = A.children("a"), y = A.children("a").data("target");
|
940 |
+
A.data("easytabs", {});
|
941 |
+
if (y !== undefined && y !== null) {
|
942 |
+
A.data("easytabs").ajax = z.attr("href")
|
943 |
+
} else {
|
944 |
+
y = z.attr("href")
|
945 |
+
}
|
946 |
+
y = y.match(/#([^\?]+)/)[1];
|
947 |
+
x = r.panelContext.find("#" + y);
|
948 |
+
if (x.length) {
|
949 |
+
x.data("easytabs", {position: x.css("position"), visibility: x.css("visibility")});
|
950 |
+
x.not(r.panelActiveClass).hide();
|
951 |
+
f.panels = f.panels.add(x);
|
952 |
+
A.data("easytabs").panel = x
|
953 |
+
} else {
|
954 |
+
f.tabs = f.tabs.not(A);
|
955 |
+
if ("console" in window) {
|
956 |
+
console.warn("Warning: tab without matching panel for selector '#" + y + "' removed from set")
|
957 |
+
}
|
958 |
+
}
|
959 |
+
})
|
960 |
+
};
|
961 |
+
f.selectTab = function (x, C) {
|
962 |
+
var y = window.location, B = y.hash.match(/^[^\?]*/)[0], z = x.parent().data("easytabs").panel, A = x.parent().data("easytabs").ajax;
|
963 |
+
if (r.collapsible && !d && (x.hasClass(r.tabActiveClass) || x.hasClass(r.collapsedClass))) {
|
964 |
+
f.toggleTabCollapse(x, z, A, C)
|
965 |
+
} else {
|
966 |
+
if (!x.hasClass(r.tabActiveClass) || !z.hasClass(r.panelActiveClass)) {
|
967 |
+
o(x, z, A, C)
|
968 |
+
} else {
|
969 |
+
if (!r.cache) {
|
970 |
+
o(x, z, A, C)
|
971 |
+
}
|
972 |
+
}
|
973 |
+
}
|
974 |
+
};
|
975 |
+
f.toggleTabCollapse = function (x, y, z, A) {
|
976 |
+
f.panels.stop(true, true);
|
977 |
+
if (u(q, "easytabs:before", [x, y, r])) {
|
978 |
+
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
979 |
+
if (x.hasClass(r.collapsedClass)) {
|
980 |
+
if (z && (!r.cache || !x.parent().data("easytabs").cached)) {
|
981 |
+
q.trigger("easytabs:ajax:beforeSend", [x, y]);
|
982 |
+
y.load(z, function (C, B, D) {
|
983 |
+
x.parent().data("easytabs").cached = true;
|
984 |
+
q.trigger("easytabs:ajax:complete", [x, y, C, B, D])
|
985 |
+
})
|
986 |
+
}
|
987 |
+
x.parent().removeClass(r.collapsedClass).addClass(r.tabActiveClass).children().removeClass(r.collapsedClass).addClass(r.tabActiveClass);
|
988 |
+
y.addClass(r.panelActiveClass)[v.uncollapse](v.speed, r.transitionUncollapseEasing, function () {
|
989 |
+
q.trigger("easytabs:midTransition", [x, y, r]);
|
990 |
+
if (typeof A == "function") {
|
991 |
+
A()
|
992 |
+
}
|
993 |
+
})
|
994 |
+
} else {
|
995 |
+
x.addClass(r.collapsedClass).parent().addClass(r.collapsedClass);
|
996 |
+
y.removeClass(r.panelActiveClass)[v.collapse](v.speed, r.transitionCollapseEasing, function () {
|
997 |
+
q.trigger("easytabs:midTransition", [x, y, r]);
|
998 |
+
if (typeof A == "function") {
|
999 |
+
A()
|
1000 |
+
}
|
1001 |
+
})
|
1002 |
+
}
|
1003 |
+
}
|
1004 |
+
};
|
1005 |
+
f.matchTab = function (x) {
|
1006 |
+
return f.tabs.find("[href='" + x + "'],[data-target='" + x + "']").first()
|
1007 |
+
};
|
1008 |
+
f.matchInPanel = function (x) {
|
1009 |
+
return(x && f.validId(x) ? f.panels.filter(":has(" + x + ")").first() : [])
|
1010 |
+
};
|
1011 |
+
f.validId = function (x) {
|
1012 |
+
return x.substr(1).match(/^[A-Za-z]+[A-Za-z0-9\-_:\.].$/)
|
1013 |
+
};
|
1014 |
+
f.selectTabFromHashChange = function () {
|
1015 |
+
var y = window.location.hash.match(/^[^\?]*/)[0], x = f.matchTab(y), z;
|
1016 |
+
if (r.updateHash) {
|
1017 |
+
if (x.length) {
|
1018 |
+
d = true;
|
1019 |
+
f.selectTab(x)
|
1020 |
+
} else {
|
1021 |
+
z = f.matchInPanel(y);
|
1022 |
+
if (z.length) {
|
1023 |
+
y = "#" + z.attr("id");
|
1024 |
+
x = f.matchTab(y);
|
1025 |
+
d = true;
|
1026 |
+
f.selectTab(x)
|
1027 |
+
} else {
|
1028 |
+
if (!h.hasClass(r.tabActiveClass) && !r.cycle) {
|
1029 |
+
if (y === "" || f.matchTab(m).length || q.closest(y).length) {
|
1030 |
+
d = true;
|
1031 |
+
f.selectTab(l)
|
1032 |
+
}
|
1033 |
+
}
|
1034 |
+
}
|
1035 |
+
}
|
1036 |
+
}
|
1037 |
+
};
|
1038 |
+
f.cycleTabs = function (x) {
|
1039 |
+
if (r.cycle) {
|
1040 |
+
x = x % f.tabs.length;
|
1041 |
+
$tab = a(f.tabs[x]).children("a").first();
|
1042 |
+
d = true;
|
1043 |
+
f.selectTab($tab, function () {
|
1044 |
+
setTimeout(function () {
|
1045 |
+
f.cycleTabs(x + 1)
|
1046 |
+
}, r.cycle)
|
1047 |
+
})
|
1048 |
+
}
|
1049 |
+
};
|
1050 |
+
f.publicMethods = {select: function (x) {
|
1051 |
+
var y;
|
1052 |
+
if ((y = f.tabs.filter(x)).length === 0) {
|
1053 |
+
if ((y = f.tabs.find("a[href='" + x + "']")).length === 0) {
|
1054 |
+
if ((y = f.tabs.find("a" + x)).length === 0) {
|
1055 |
+
if ((y = f.tabs.find("[data-target='" + x + "']")).length === 0) {
|
1056 |
+
if ((y = f.tabs.find("a[href$='" + x + "']")).length === 0) {
|
1057 |
+
a.error("Tab '" + x + "' does not exist in tab set")
|
1058 |
+
}
|
1059 |
+
}
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
} else {
|
1063 |
+
y = y.children("a").first()
|
1064 |
+
}
|
1065 |
+
f.selectTab(y)
|
1066 |
+
}};
|
1067 |
+
var u = function (A, x, z) {
|
1068 |
+
var y = a.Event(x);
|
1069 |
+
A.trigger(y, z);
|
1070 |
+
return y.result !== false
|
1071 |
+
};
|