Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram - Version 1.3

Version Description

7 premium addons available now. Plus lot of improvements. Recommended upgrade.

Download this release

Release Info

Developer niravmehta
Plugin Icon 128x128 Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

about-icegram.php CHANGED
@@ -219,7 +219,7 @@ if ( !wp_script_is( 'thickbox' ) ) {
219
  <h4><?php _e("Toast Notification", "icegram"); ?></h4>
220
  <img src="<?php echo $assets_base; ?>/sketch-toast-notification.png" width="180" height="145">
221
  <p><?php _e("Want to alert your visitor about some news, an update from your blog, a social proof or an offer? Use Icegram’s unique toast notification, it will catch their attention, let them click on the message, and disappear after a while.", "icegram"); ?></p>
222
- <h4><?php _e("Popup", "icegram"); ?></h4>
223
  <img src="<?php echo $assets_base; ?>/sketch-popup.png" width="180" height="145">
224
  <p><?php _e("Lightbox popup windows are most widely used for lead capture, promotions and additional content display. Ask visitors to sign up to your newsletter, or like you on social networks, or tell them about a special offer...", "icegram"); ?></p>
225
  <?php do_action('icegram_about_after_core_message_types_col3'); ?>
@@ -270,6 +270,9 @@ if ( !wp_script_is( 'thickbox' ) ) {
270
  <h4><?php _e("Optin Forms / Mailing service integration...", "icegram"); ?></h4>
271
  <p><?php _e("You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.", "icegram"); ?></p>
272
 
 
 
 
273
  <?php do_action('icegram_about_after_faq_col1'); ?>
274
 
275
  </div>
@@ -280,6 +283,10 @@ if ( !wp_script_is( 'thickbox' ) ) {
280
  <h4><?php _e("Can I use shortcodes in a message?", "icegram"); ?></h4>
281
  <p><?php _e("Yes! Messages support shortcodes. You may need to adjust CSS so the shortcode output looks good in your message.", "icegram"); ?></p>
282
 
 
 
 
 
283
 
284
  <h4><?php _e("I can't find a way to do X...", "icegram"); ?></h4>
285
  <p><?php _e("Icegram is actively developed. If you can't find your favorite feature (or have a suggestion) contact us. We'd love to hear from you.", "icegram"); ?></p>
@@ -287,7 +294,6 @@ if ( !wp_script_is( 'thickbox' ) ) {
287
  <h4><?php _e("I'm facing a problem and can't find a way out...", "icegram"); ?></h4>
288
  <p><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=ig_campaign" ?>"><?php _e("Contact Us", "icegram"); ?></a><?php _e(", provide as much detail of the problem as you can. We will try to solve the problem ASAP.", "icegram"); ?></p>
289
 
290
- <?php do_action('icegram_about_after_faq_col2'); ?>
291
  </div>
292
  </div>
293
 
219
  <h4><?php _e("Toast Notification", "icegram"); ?></h4>
220
  <img src="<?php echo $assets_base; ?>/sketch-toast-notification.png" width="180" height="145">
221
  <p><?php _e("Want to alert your visitor about some news, an update from your blog, a social proof or an offer? Use Icegram’s unique toast notification, it will catch their attention, let them click on the message, and disappear after a while.", "icegram"); ?></p>
222
+ <h4><?php _e("Popup", "icegram"); ?></h4>
223
  <img src="<?php echo $assets_base; ?>/sketch-popup.png" width="180" height="145">
224
  <p><?php _e("Lightbox popup windows are most widely used for lead capture, promotions and additional content display. Ask visitors to sign up to your newsletter, or like you on social networks, or tell them about a special offer...", "icegram"); ?></p>
225
  <?php do_action('icegram_about_after_core_message_types_col3'); ?>
270
  <h4><?php _e("Optin Forms / Mailing service integration...", "icegram"); ?></h4>
271
  <p><?php _e("You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.", "icegram"); ?></p>
272
 
273
+ <h4><?php _e("How many messages should I show on a page?", "icegram"); ?></h4>
274
+ <p><?php _e("While Icegram provides you lots of different message types and ability to add multiple messages to a campaign, we discourage you to go overboard. We've observed two messages on a page work well, but YMMV!", "icegram"); ?></p>
275
+
276
  <?php do_action('icegram_about_after_faq_col1'); ?>
277
 
278
  </div>
283
  <h4><?php _e("Can I use shortcodes in a message?", "icegram"); ?></h4>
284
  <p><?php _e("Yes! Messages support shortcodes. You may need to adjust CSS so the shortcode output looks good in your message.", "icegram"); ?></p>
285
 
286
+ <h4><?php _e("WPML / Multilingual usage...", "icegram"); ?></h4>
287
+ <p><?php _e("Go to <code>Messages</code> from Icegram menu. Edit a message and translate it like any other post. Icegram will show translated message where possible. Choose <code>All posts</code> under WPML Language setting - Blog Posts to display, to fall back to default language messages.", "icegram"); ?></p>
288
+
289
+ <?php do_action('icegram_about_after_faq_col2'); ?>
290
 
291
  <h4><?php _e("I can't find a way to do X...", "icegram"); ?></h4>
292
  <p><?php _e("Icegram is actively developed. If you can't find your favorite feature (or have a suggestion) contact us. We'd love to hear from you.", "icegram"); ?></p>
294
  <h4><?php _e("I'm facing a problem and can't find a way out...", "icegram"); ?></h4>
295
  <p><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=ig_campaign" ?>"><?php _e("Contact Us", "icegram"); ?></a><?php _e(", provide as much detail of the problem as you can. We will try to solve the problem ASAP.", "icegram"); ?></p>
296
 
 
297
  </div>
298
  </div>
299
 
addons.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( empty($ig_addons) ) {
4
+ $ig_addons = get_transient( 'icegram_addons_data' );
5
+ }
6
+ if ( empty($ig_addons) ) {
7
+ $ig_addons = array();
8
+ }
9
+
10
+ ?>
11
+ <div class="wrap ig_addons_wrap">
12
+ <h2>
13
+ <?php _e( 'Icegram Add-ons', 'icegram' ); ?>
14
+ <?php if (time() < strtotime("31 August 2014")) { ?>
15
+ <span class="ig_addons_special_message">25% Discount on All Items till August 30, 2014. Use Coopon <code><a href="http://www.icegram.com/addons/?coupon-code=launch25&utm_source=inapp&utm_campaign=launch&utm_medium=store" target="_blank">LAUNCH25</a></code></span>
16
+ <?php } ?>
17
+ </h2>
18
+ <ul class="addons">
19
+ <?php
20
+ if (count($ig_addons) > 0) {
21
+ foreach ($ig_addons as $addon) {
22
+ ?>
23
+ <li class="addon">
24
+ <a href="<?php echo $addon->link;?>?utm_source=inapp&utm_campaign=addons&utm_medium=store" target="_blank">
25
+ <h3><?php echo $addon->name; ?></h3>
26
+ <p>
27
+ <?php
28
+ if( !empty( $addon->image ) ) {
29
+ echo "<img src=".$addon->image.">";
30
+ }
31
+ echo $addon->descripttion; ?>
32
+ </p>
33
+ </a>
34
+ </li>
35
+ <?php
36
+ }
37
+ } else {
38
+ echo "<p>". __( 'Sorry! No Add-ons available currently.', 'icegram') . "</p>";
39
+ }
40
+ ?>
41
+ </ul>
42
+ </div>
assets/css/admin.css CHANGED
@@ -245,6 +245,13 @@ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer
245
  content: "\f128";
246
  }
247
 
 
 
 
 
 
 
 
248
  .message_headline_button .headline-buttons-icon:before {
249
  content: "\f130";
250
  }
@@ -536,3 +543,54 @@ CSS for landing page and Help and Support
536
  .icegram-contact-us a{
537
  color: #3754a8;
538
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  content: "\f128";
246
  }
247
 
248
+ .message_headline_button {
249
+ vertical-align: top !important;
250
+ }
251
+ .headline-buttons-icon {
252
+ margin: 5px 0;
253
+ }
254
+
255
  .message_headline_button .headline-buttons-icon:before {
256
  content: "\f130";
257
  }
543
  .icegram-contact-us a{
544
  color: #3754a8;
545
  }
546
+
547
+ /* Addons Page*/
548
+ .ig_addons_wrap .addons {
549
+ overflow: hidden;
550
+ }
551
+ .ig_addons_wrap .addons li {
552
+ float: left;
553
+ margin: 0 1em 1em 0!important;
554
+ padding: 0;
555
+ vertical-align: top;
556
+ width: 300px;
557
+ }
558
+ .ig_addons_wrap .addons li a {
559
+ text-decoration: none;
560
+ color: inherit;
561
+ border: 1px solid #ddd;
562
+ display: block;
563
+ min-height: 220px;
564
+ overflow: hidden;
565
+ background: #f5f5f5;
566
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(0, 0, 0, .1);
567
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(0, 0, 0, .1);
568
+ }
569
+ .ig_addons_wrap .addons li a img {
570
+ max-width: 100px;
571
+ max-height: 100px;
572
+ margin-right: -15px;
573
+ padding: 0 0 5px 5px;
574
+ float: right;
575
+ }
576
+ .ig_addons_wrap .addons li a h3 {
577
+ margin: 0!important;
578
+ padding: 20px!important;
579
+ background: #fff;
580
+ }
581
+ .ig_addons_wrap .addons li a p {
582
+ padding: 20px!important;
583
+ margin: 0!important;
584
+ border-top: 1px solid #f1f1f1;
585
+ }
586
+ .ig_addons_wrap .addons li a:focus, .ig_addons_wrap .addons li a:hover {
587
+ background-color: #fff;
588
+ }
589
+ .ig_addons_special_message {
590
+ font-size: 60%;
591
+ line-height: 60%;
592
+ margin-left: 3em;
593
+ padding: 3px 10px;
594
+ background-color: #FCF0AD;
595
+ border: 1px solid #CCC;
596
+ }
assets/css/chosen.css DELETED
@@ -1,435 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.1.0
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011 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
- /* @group Base */
14
- .chosen-container {
15
- position: relative;
16
- display: inline-block;
17
- vertical-align: middle;
18
- font-size: 13px;
19
- zoom: 1;
20
- *display: inline;
21
- -webkit-user-select: none;
22
- -moz-user-select: none;
23
- user-select: none;
24
- }
25
- .chosen-container .chosen-drop {
26
- position: absolute;
27
- top: 100%;
28
- left: -9999px;
29
- z-index: 1010;
30
- -webkit-box-sizing: border-box;
31
- -moz-box-sizing: border-box;
32
- box-sizing: border-box;
33
- width: 100%;
34
- border: 1px solid #aaa;
35
- border-top: 0;
36
- background: #fff;
37
- box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
38
- }
39
- .chosen-container.chosen-with-drop .chosen-drop {
40
- left: 0;
41
- }
42
- .chosen-container a {
43
- cursor: pointer;
44
- }
45
-
46
- /* @end */
47
- /* @group Single Chosen */
48
- .chosen-container-single .chosen-single {
49
- position: relative;
50
- display: block;
51
- overflow: hidden;
52
- padding: 0 0 0 8px;
53
- height: 23px;
54
- border: 1px solid #aaa;
55
- border-radius: 5px;
56
- background-color: #fff;
57
- background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
58
- background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
59
- background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
60
- background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
61
- background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
62
- background-clip: padding-box;
63
- box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
64
- color: #444;
65
- text-decoration: none;
66
- white-space: nowrap;
67
- line-height: 24px;
68
- }
69
- .chosen-container-single .chosen-default {
70
- color: #999;
71
- }
72
- .chosen-container-single .chosen-single span {
73
- display: block;
74
- overflow: hidden;
75
- margin-right: 26px;
76
- text-overflow: ellipsis;
77
- white-space: nowrap;
78
- }
79
- .chosen-container-single .chosen-single-with-deselect span {
80
- margin-right: 38px;
81
- }
82
- .chosen-container-single .chosen-single abbr {
83
- position: absolute;
84
- top: 6px;
85
- right: 26px;
86
- display: block;
87
- width: 12px;
88
- height: 12px;
89
- background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
90
- font-size: 1px;
91
- }
92
- .chosen-container-single .chosen-single abbr:hover {
93
- background-position: -42px -10px;
94
- }
95
- .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
96
- background-position: -42px -10px;
97
- }
98
- .chosen-container-single .chosen-single div {
99
- position: absolute;
100
- top: 0;
101
- right: 0;
102
- display: block;
103
- width: 18px;
104
- height: 100%;
105
- }
106
- .chosen-container-single .chosen-single div b {
107
- display: block;
108
- width: 100%;
109
- height: 100%;
110
- background: url('../images/chosen-sprite.png') no-repeat 0px 2px;
111
- }
112
- .chosen-container-single .chosen-search {
113
- position: relative;
114
- z-index: 1010;
115
- margin: 0;
116
- padding: 3px 4px;
117
- white-space: nowrap;
118
- }
119
- .chosen-container-single .chosen-search input[type="text"] {
120
- -webkit-box-sizing: border-box;
121
- -moz-box-sizing: border-box;
122
- box-sizing: border-box;
123
- margin: 1px 0;
124
- padding: 4px 20px 4px 5px;
125
- width: 100%;
126
- height: auto;
127
- outline: 0;
128
- border: 1px solid #aaa;
129
- background: white url('../images/chosen-sprite.png') no-repeat 100% -20px;
130
- background: url('../images/chosen-sprite.png') no-repeat 100% -20px;
131
- font-size: 1em;
132
- font-family: sans-serif;
133
- line-height: normal;
134
- border-radius: 0;
135
- }
136
- .chosen-container-single .chosen-drop {
137
- margin-top: -1px;
138
- border-radius: 0 0 4px 4px;
139
- background-clip: padding-box;
140
- }
141
- .chosen-container-single.chosen-container-single-nosearch .chosen-search {
142
- position: absolute;
143
- left: -9999px;
144
- }
145
-
146
- /* @end */
147
- /* @group Results */
148
- .chosen-container .chosen-results {
149
- position: relative;
150
- overflow-x: hidden;
151
- overflow-y: auto;
152
- margin: 0 4px 4px 0;
153
- padding: 0 0 0 4px;
154
- max-height: 240px;
155
- -webkit-overflow-scrolling: touch;
156
- }
157
- .chosen-container .chosen-results li {
158
- display: none;
159
- margin: 0;
160
- padding: 5px 6px;
161
- list-style: none;
162
- line-height: 15px;
163
- -webkit-touch-callout: none;
164
- }
165
- .chosen-container .chosen-results li.active-result {
166
- display: list-item;
167
- cursor: pointer;
168
- }
169
- .chosen-container .chosen-results li.disabled-result {
170
- display: list-item;
171
- color: #ccc;
172
- cursor: default;
173
- }
174
- .chosen-container .chosen-results li.highlighted {
175
- background-color: #3875d7;
176
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
177
- background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
178
- background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
179
- background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
180
- background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
181
- color: #fff;
182
- }
183
- .chosen-container .chosen-results li.no-results {
184
- display: list-item;
185
- background: #f4f4f4;
186
- }
187
- .chosen-container .chosen-results li.group-result {
188
- display: list-item;
189
- font-weight: bold;
190
- cursor: default;
191
- }
192
- .chosen-container .chosen-results li.group-option {
193
- padding-left: 15px;
194
- }
195
- .chosen-container .chosen-results li em {
196
- font-style: normal;
197
- text-decoration: underline;
198
- }
199
-
200
- /* @end */
201
- /* @group Multi Chosen */
202
- .chosen-container-multi .chosen-choices {
203
- position: relative;
204
- overflow: hidden;
205
- -webkit-box-sizing: border-box;
206
- -moz-box-sizing: border-box;
207
- box-sizing: border-box;
208
- margin: 0;
209
- padding: 0;
210
- width: 100%;
211
- height: auto !important;
212
- height: 1%;
213
- border: 1px solid #aaa;
214
- background-color: #fff;
215
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
216
- background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
217
- background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
218
- background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
219
- background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
220
- cursor: text;
221
- }
222
- .chosen-container-multi .chosen-choices li {
223
- float: left;
224
- list-style: none;
225
- }
226
- .chosen-container-multi .chosen-choices li.search-field {
227
- margin: 0;
228
- padding: 0;
229
- white-space: nowrap;
230
- }
231
- .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
232
- margin: 1px 0;
233
- padding: 5px;
234
- height: 15px;
235
- outline: 0;
236
- border: 0 !important;
237
- background: transparent !important;
238
- box-shadow: none;
239
- color: #666;
240
- font-size: 100%;
241
- font-family: sans-serif;
242
- line-height: normal;
243
- border-radius: 0;
244
- }
245
- .chosen-container-multi .chosen-choices li.search-field .default {
246
- color: #999;
247
- }
248
- .chosen-container-multi .chosen-choices li.search-choice {
249
- position: relative;
250
- margin: 3px 0 3px 5px;
251
- padding: 3px 20px 3px 5px;
252
- border: 1px solid #aaa;
253
- border-radius: 3px;
254
- background-color: #e4e4e4;
255
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
256
- background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
257
- background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
258
- background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
259
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
260
- background-clip: padding-box;
261
- box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
262
- color: #333;
263
- line-height: 13px;
264
- cursor: default;
265
- }
266
- .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
267
- position: absolute;
268
- top: 4px;
269
- right: 3px;
270
- display: block;
271
- width: 12px;
272
- height: 12px;
273
- background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
274
- font-size: 1px;
275
- }
276
- .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
277
- background-position: -42px -10px;
278
- }
279
- .chosen-container-multi .chosen-choices li.search-choice-disabled {
280
- padding-right: 5px;
281
- border: 1px solid #ccc;
282
- background-color: #e4e4e4;
283
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
284
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
285
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
286
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
287
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
288
- color: #666;
289
- }
290
- .chosen-container-multi .chosen-choices li.search-choice-focus {
291
- background: #d4d4d4;
292
- }
293
- .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
294
- background-position: -42px -10px;
295
- }
296
- .chosen-container-multi .chosen-results {
297
- margin: 0;
298
- padding: 0;
299
- }
300
- .chosen-container-multi .chosen-drop .result-selected {
301
- display: list-item;
302
- color: #ccc;
303
- cursor: default;
304
- }
305
-
306
- /* @end */
307
- /* @group Active */
308
- .chosen-container-active .chosen-single {
309
- border: 1px solid #5897fb;
310
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
311
- }
312
- .chosen-container-active.chosen-with-drop .chosen-single {
313
- border: 1px solid #aaa;
314
- -moz-border-radius-bottomright: 0;
315
- border-bottom-right-radius: 0;
316
- -moz-border-radius-bottomleft: 0;
317
- border-bottom-left-radius: 0;
318
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
319
- background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
320
- background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
321
- background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
322
- background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
323
- box-shadow: 0 1px 0 #fff inset;
324
- }
325
- .chosen-container-active.chosen-with-drop .chosen-single div {
326
- border-left: none;
327
- background: transparent;
328
- }
329
- .chosen-container-active.chosen-with-drop .chosen-single div b {
330
- background-position: -18px 2px;
331
- }
332
- .chosen-container-active .chosen-choices {
333
- border: 1px solid #5897fb;
334
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
335
- }
336
- .chosen-container-active .chosen-choices li.search-field input[type="text"] {
337
- color: #111 !important;
338
- }
339
-
340
- /* @end */
341
- /* @group Disabled Support */
342
- .chosen-disabled {
343
- opacity: 0.5 !important;
344
- cursor: default;
345
- }
346
- .chosen-disabled .chosen-single {
347
- cursor: default;
348
- }
349
- .chosen-disabled .chosen-choices .search-choice .search-choice-close {
350
- cursor: default;
351
- }
352
-
353
- /* @end */
354
- /* @group Right to Left */
355
- .chosen-rtl {
356
- text-align: right;
357
- }
358
- .chosen-rtl .chosen-single {
359
- overflow: visible;
360
- padding: 0 8px 0 0;
361
- }
362
- .chosen-rtl .chosen-single span {
363
- margin-right: 0;
364
- margin-left: 26px;
365
- direction: rtl;
366
- }
367
- .chosen-rtl .chosen-single-with-deselect span {
368
- margin-left: 38px;
369
- }
370
- .chosen-rtl .chosen-single div {
371
- right: auto;
372
- left: 3px;
373
- }
374
- .chosen-rtl .chosen-single abbr {
375
- right: auto;
376
- left: 26px;
377
- }
378
- .chosen-rtl .chosen-choices li {
379
- float: right;
380
- }
381
- .chosen-rtl .chosen-choices li.search-field input[type="text"] {
382
- direction: rtl;
383
- }
384
- .chosen-rtl .chosen-choices li.search-choice {
385
- margin: 3px 5px 3px 0;
386
- padding: 3px 5px 3px 19px;
387
- }
388
- .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
389
- right: auto;
390
- left: 4px;
391
- }
392
- .chosen-rtl.chosen-container-single-nosearch .chosen-search,
393
- .chosen-rtl .chosen-drop {
394
- left: 9999px;
395
- }
396
- .chosen-rtl.chosen-container-single .chosen-results {
397
- margin: 0 0 4px 4px;
398
- padding: 0 4px 0 0;
399
- }
400
- .chosen-rtl .chosen-results li.group-option {
401
- padding-right: 15px;
402
- padding-left: 0;
403
- }
404
- .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
405
- border-right: none;
406
- }
407
- .chosen-rtl .chosen-search input[type="text"] {
408
- padding: 4px 5px 4px 20px;
409
- background: white url('../images/chosen-sprite.png') no-repeat -30px -20px;
410
- background: url('../images/chosen-sprite.png') no-repeat -30px -20px;
411
- direction: rtl;
412
- }
413
- .chosen-rtl.chosen-container-single .chosen-single div b {
414
- background-position: 6px 2px;
415
- }
416
- .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
417
- background-position: -12px 2px;
418
- }
419
-
420
- /* @end */
421
- /* @group Retina compatibility */
422
- @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
423
- .chosen-rtl .chosen-search input[type="text"],
424
- .chosen-container-single .chosen-single abbr,
425
- .chosen-container-single .chosen-single div b,
426
- .chosen-container-single .chosen-search input[type="text"],
427
- .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
428
- .chosen-container .chosen-results-scroll-down span,
429
- .chosen-container .chosen-results-scroll-up span {
430
- background-image: url('chosen-sprite@2x.png') !important;
431
- background-size: 52px 37px !important;
432
- background-repeat: no-repeat !important;
433
- }
434
- }
435
- /* @end */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/jquery-ui.css DELETED
@@ -1,1178 +0,0 @@
1
- /*! jQuery UI - v1.10.4 - 2014-01-17
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
- * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
6
-
7
- /* Layout helpers
8
- ----------------------------------*/
9
- .ui-helper-hidden {
10
- display: none;
11
- }
12
- .ui-helper-hidden-accessible {
13
- border: 0;
14
- clip: rect(0 0 0 0);
15
- height: 1px;
16
- margin: -1px;
17
- overflow: hidden;
18
- padding: 0;
19
- position: absolute;
20
- width: 1px;
21
- }
22
- .ui-helper-reset {
23
- margin: 0;
24
- padding: 0;
25
- border: 0;
26
- outline: 0;
27
- line-height: 1.3;
28
- text-decoration: none;
29
- font-size: 100%;
30
- list-style: none;
31
- }
32
- .ui-helper-clearfix:before,
33
- .ui-helper-clearfix:after {
34
- content: "";
35
- display: table;
36
- border-collapse: collapse;
37
- }
38
- .ui-helper-clearfix:after {
39
- clear: both;
40
- }
41
- .ui-helper-clearfix {
42
- min-height: 0; /* support: IE7 */
43
- }
44
- .ui-helper-zfix {
45
- width: 100%;
46
- height: 100%;
47
- top: 0;
48
- left: 0;
49
- position: absolute;
50
- opacity: 0;
51
- filter:Alpha(Opacity=0);
52
- }
53
-
54
- .ui-front {
55
- z-index: 100;
56
- }
57
-
58
-
59
- /* Interaction Cues
60
- ----------------------------------*/
61
- .ui-state-disabled {
62
- cursor: default !important;
63
- }
64
-
65
-
66
- /* Icons
67
- ----------------------------------*/
68
-
69
- /* states and images */
70
- .ui-icon {
71
- display: block;
72
- text-indent: -99999px;
73
- overflow: hidden;
74
- background-repeat: no-repeat;
75
- }
76
-
77
-
78
- /* Misc visuals
79
- ----------------------------------*/
80
-
81
- /* Overlays */
82
- .ui-widget-overlay {
83
- position: fixed;
84
- top: 0;
85
- left: 0;
86
- width: 100%;
87
- height: 100%;
88
- }
89
- .ui-accordion .ui-accordion-header {
90
- display: block;
91
- cursor: pointer;
92
- position: relative;
93
- margin-top: 2px;
94
- padding: .5em .5em .5em .7em;
95
- min-height: 0; /* support: IE7 */
96
- }
97
- .ui-accordion .ui-accordion-icons {
98
- padding-left: 2.2em;
99
- }
100
- .ui-accordion .ui-accordion-noicons {
101
- padding-left: .7em;
102
- }
103
- .ui-accordion .ui-accordion-icons .ui-accordion-icons {
104
- padding-left: 2.2em;
105
- }
106
- .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
107
- position: absolute;
108
- left: .5em;
109
- top: 50%;
110
- margin-top: -8px;
111
- }
112
- .ui-accordion .ui-accordion-content {
113
- padding: 1em 2.2em;
114
- border-top: 0;
115
- overflow: auto;
116
- }
117
- .ui-autocomplete {
118
- position: absolute;
119
- top: 0;
120
- left: 0;
121
- cursor: default;
122
- }
123
- .ui-button {
124
- display: inline-block;
125
- position: relative;
126
- padding: 0;
127
- line-height: normal;
128
- margin-right: .1em;
129
- cursor: pointer;
130
- vertical-align: middle;
131
- text-align: center;
132
- overflow: visible; /* removes extra width in IE */
133
- }
134
- .ui-button,
135
- .ui-button:link,
136
- .ui-button:visited,
137
- .ui-button:hover,
138
- .ui-button:active {
139
- text-decoration: none;
140
- }
141
- /* to make room for the icon, a width needs to be set here */
142
- .ui-button-icon-only {
143
- width: 2.2em;
144
- }
145
- /* button elements seem to need a little more width */
146
- button.ui-button-icon-only {
147
- width: 2.4em;
148
- }
149
- .ui-button-icons-only {
150
- width: 3.4em;
151
- }
152
- button.ui-button-icons-only {
153
- width: 3.7em;
154
- }
155
-
156
- /* button text element */
157
- .ui-button .ui-button-text {
158
- display: block;
159
- line-height: normal;
160
- }
161
- .ui-button-text-only .ui-button-text {
162
- padding: .4em 1em;
163
- }
164
- .ui-button-icon-only .ui-button-text,
165
- .ui-button-icons-only .ui-button-text {
166
- padding: .4em;
167
- text-indent: -9999999px;
168
- }
169
- .ui-button-text-icon-primary .ui-button-text,
170
- .ui-button-text-icons .ui-button-text {
171
- padding: .4em 1em .4em 2.1em;
172
- }
173
- .ui-button-text-icon-secondary .ui-button-text,
174
- .ui-button-text-icons .ui-button-text {
175
- padding: .4em 2.1em .4em 1em;
176
- }
177
- .ui-button-text-icons .ui-button-text {
178
- padding-left: 2.1em;
179
- padding-right: 2.1em;
180
- }
181
- /* no icon support for input elements, provide padding by default */
182
- input.ui-button {
183
- padding: .4em 1em;
184
- }
185
-
186
- /* button icon element(s) */
187
- .ui-button-icon-only .ui-icon,
188
- .ui-button-text-icon-primary .ui-icon,
189
- .ui-button-text-icon-secondary .ui-icon,
190
- .ui-button-text-icons .ui-icon,
191
- .ui-button-icons-only .ui-icon {
192
- position: absolute;
193
- top: 50%;
194
- margin-top: -8px;
195
- }
196
- .ui-button-icon-only .ui-icon {
197
- left: 50%;
198
- margin-left: -8px;
199
- }
200
- .ui-button-text-icon-primary .ui-button-icon-primary,
201
- .ui-button-text-icons .ui-button-icon-primary,
202
- .ui-button-icons-only .ui-button-icon-primary {
203
- left: .5em;
204
- }
205
- .ui-button-text-icon-secondary .ui-button-icon-secondary,
206
- .ui-button-text-icons .ui-button-icon-secondary,
207
- .ui-button-icons-only .ui-button-icon-secondary {
208
- right: .5em;
209
- }
210
-
211
- /* button sets */
212
- .ui-buttonset {
213
- margin-right: 7px;
214
- }
215
- .ui-buttonset .ui-button {
216
- margin-left: 0;
217
- margin-right: -.3em;
218
- }
219
-
220
- /* workarounds */
221
- /* reset extra padding in Firefox, see h5bp.com/l */
222
- input.ui-button::-moz-focus-inner,
223
- button.ui-button::-moz-focus-inner {
224
- border: 0;
225
- padding: 0;
226
- }
227
- .ui-datepicker {
228
- width: 17em;
229
- padding: .2em .2em 0;
230
- display: none;
231
- }
232
- .ui-datepicker .ui-datepicker-header {
233
- position: relative;
234
- padding: .2em 0;
235
- }
236
- .ui-datepicker .ui-datepicker-prev,
237
- .ui-datepicker .ui-datepicker-next {
238
- position: absolute;
239
- top: 2px;
240
- width: 1.8em;
241
- height: 1.8em;
242
- }
243
- .ui-datepicker .ui-datepicker-prev-hover,
244
- .ui-datepicker .ui-datepicker-next-hover {
245
- top: 1px;
246
- }
247
- .ui-datepicker .ui-datepicker-prev {
248
- left: 2px;
249
- }
250
- .ui-datepicker .ui-datepicker-next {
251
- right: 2px;
252
- }
253
- .ui-datepicker .ui-datepicker-prev-hover {
254
- left: 1px;
255
- }
256
- .ui-datepicker .ui-datepicker-next-hover {
257
- right: 1px;
258
- }
259
- .ui-datepicker .ui-datepicker-prev span,
260
- .ui-datepicker .ui-datepicker-next span {
261
- display: block;
262
- position: absolute;
263
- left: 50%;
264
- margin-left: -8px;
265
- top: 50%;
266
- margin-top: -8px;
267
- }
268
- .ui-datepicker .ui-datepicker-title {
269
- margin: 0 2.3em;
270
- line-height: 1.8em;
271
- text-align: center;
272
- }
273
- .ui-datepicker .ui-datepicker-title select {
274
- font-size: 1em;
275
- margin: 1px 0;
276
- }
277
- .ui-datepicker select.ui-datepicker-month,
278
- .ui-datepicker select.ui-datepicker-year {
279
- width: 49%;
280
- }
281
- .ui-datepicker table {
282
- width: 100%;
283
- font-size: .9em;
284
- border-collapse: collapse;
285
- margin: 0 0 .4em;
286
- }
287
- .ui-datepicker th {
288
- padding: .7em .3em;
289
- text-align: center;
290
- font-weight: bold;
291
- border: 0;
292
- }
293
- .ui-datepicker td {
294
- border: 0;
295
- padding: 1px;
296
- }
297
- .ui-datepicker td span,
298
- .ui-datepicker td a {
299
- display: block;
300
- padding: .2em;
301
- text-align: right;
302
- text-decoration: none;
303
- }
304
- .ui-datepicker .ui-datepicker-buttonpane {
305
- background-image: none;
306
- margin: .7em 0 0 0;
307
- padding: 0 .2em;
308
- border-left: 0;
309
- border-right: 0;
310
- border-bottom: 0;
311
- }
312
- .ui-datepicker .ui-datepicker-buttonpane button {
313
- float: right;
314
- margin: .5em .2em .4em;
315
- cursor: pointer;
316
- padding: .2em .6em .3em .6em;
317
- width: auto;
318
- overflow: visible;
319
- }
320
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
321
- float: left;
322
- }
323
-
324
- /* with multiple calendars */
325
- .ui-datepicker.ui-datepicker-multi {
326
- width: auto;
327
- }
328
- .ui-datepicker-multi .ui-datepicker-group {
329
- float: left;
330
- }
331
- .ui-datepicker-multi .ui-datepicker-group table {
332
- width: 95%;
333
- margin: 0 auto .4em;
334
- }
335
- .ui-datepicker-multi-2 .ui-datepicker-group {
336
- width: 50%;
337
- }
338
- .ui-datepicker-multi-3 .ui-datepicker-group {
339
- width: 33.3%;
340
- }
341
- .ui-datepicker-multi-4 .ui-datepicker-group {
342
- width: 25%;
343
- }
344
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
345
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
346
- border-left-width: 0;
347
- }
348
- .ui-datepicker-multi .ui-datepicker-buttonpane {
349
- clear: left;
350
- }
351
- .ui-datepicker-row-break {
352
- clear: both;
353
- width: 100%;
354
- font-size: 0;
355
- }
356
-
357
- /* RTL support */
358
- .ui-datepicker-rtl {
359
- direction: rtl;
360
- }
361
- .ui-datepicker-rtl .ui-datepicker-prev {
362
- right: 2px;
363
- left: auto;
364
- }
365
- .ui-datepicker-rtl .ui-datepicker-next {
366
- left: 2px;
367
- right: auto;
368
- }
369
- .ui-datepicker-rtl .ui-datepicker-prev:hover {
370
- right: 1px;
371
- left: auto;
372
- }
373
- .ui-datepicker-rtl .ui-datepicker-next:hover {
374
- left: 1px;
375
- right: auto;
376
- }
377
- .ui-datepicker-rtl .ui-datepicker-buttonpane {
378
- clear: right;
379
- }
380
- .ui-datepicker-rtl .ui-datepicker-buttonpane button {
381
- float: left;
382
- }
383
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
384
- .ui-datepicker-rtl .ui-datepicker-group {
385
- float: right;
386
- }
387
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
388
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
389
- border-right-width: 0;
390
- border-left-width: 1px;
391
- }
392
- .ui-dialog {
393
- overflow: hidden;
394
- position: absolute;
395
- top: 0;
396
- left: 0;
397
- padding: .2em;
398
- outline: 0;
399
- }
400
- .ui-dialog .ui-dialog-titlebar {
401
- padding: .4em 1em;
402
- position: relative;
403
- }
404
- .ui-dialog .ui-dialog-title {
405
- float: left;
406
- margin: .1em 0;
407
- white-space: nowrap;
408
- width: 90%;
409
- overflow: hidden;
410
- text-overflow: ellipsis;
411
- }
412
- .ui-dialog .ui-dialog-titlebar-close {
413
- position: absolute;
414
- right: .3em;
415
- top: 50%;
416
- width: 20px;
417
- margin: -10px 0 0 0;
418
- padding: 1px;
419
- height: 20px;
420
- }
421
- .ui-dialog .ui-dialog-content {
422
- position: relative;
423
- border: 0;
424
- padding: .5em 1em;
425
- background: none;
426
- overflow: auto;
427
- }
428
- .ui-dialog .ui-dialog-buttonpane {
429
- text-align: left;
430
- border-width: 1px 0 0 0;
431
- background-image: none;
432
- margin-top: .5em;
433
- padding: .3em 1em .5em .4em;
434
- }
435
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
436
- float: right;
437
- }
438
- .ui-dialog .ui-dialog-buttonpane button {
439
- margin: .5em .4em .5em 0;
440
- cursor: pointer;
441
- }
442
- .ui-dialog .ui-resizable-se {
443
- width: 12px;
444
- height: 12px;
445
- right: -5px;
446
- bottom: -5px;
447
- background-position: 16px 16px;
448
- }
449
- .ui-draggable .ui-dialog-titlebar {
450
- cursor: move;
451
- }
452
- .ui-menu {
453
- list-style: none;
454
- padding: 2px;
455
- margin: 0;
456
- display: block;
457
- outline: none;
458
- }
459
- .ui-menu .ui-menu {
460
- margin-top: -3px;
461
- position: absolute;
462
- }
463
- .ui-menu .ui-menu-item {
464
- margin: 0;
465
- padding: 0;
466
- width: 100%;
467
- /* support: IE10, see #8844 */
468
- list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
469
- }
470
- .ui-menu .ui-menu-divider {
471
- margin: 5px -2px 5px -2px;
472
- height: 0;
473
- font-size: 0;
474
- line-height: 0;
475
- border-width: 1px 0 0 0;
476
- }
477
- .ui-menu .ui-menu-item a {
478
- text-decoration: none;
479
- display: block;
480
- padding: 2px .4em;
481
- line-height: 1.5;
482
- min-height: 0; /* support: IE7 */
483
- font-weight: normal;
484
- }
485
- .ui-menu .ui-menu-item a.ui-state-focus,
486
- .ui-menu .ui-menu-item a.ui-state-active {
487
- font-weight: normal;
488
- margin: -1px;
489
- }
490
-
491
- .ui-menu .ui-state-disabled {
492
- font-weight: normal;
493
- margin: .4em 0 .2em;
494
- line-height: 1.5;
495
- }
496
- .ui-menu .ui-state-disabled a {
497
- cursor: default;
498
- }
499
-
500
- /* icon support */
501
- .ui-menu-icons {
502
- position: relative;
503
- }
504
- .ui-menu-icons .ui-menu-item a {
505
- position: relative;
506
- padding-left: 2em;
507
- }
508
-
509
- /* left-aligned */
510
- .ui-menu .ui-icon {
511
- position: absolute;
512
- top: .2em;
513
- left: .2em;
514
- }
515
-
516
- /* right-aligned */
517
- .ui-menu .ui-menu-icon {
518
- position: static;
519
- float: right;
520
- }
521
- .ui-progressbar {
522
- height: 2em;
523
- text-align: left;
524
- overflow: hidden;
525
- }
526
- .ui-progressbar .ui-progressbar-value {
527
- margin: -1px;
528
- height: 100%;
529
- }
530
- .ui-progressbar .ui-progressbar-overlay {
531
- background: url("images/animated-overlay.gif");
532
- height: 100%;
533
- filter: alpha(opacity=25);
534
- opacity: 0.25;
535
- }
536
- .ui-progressbar-indeterminate .ui-progressbar-value {
537
- background-image: none;
538
- }
539
- .ui-resizable {
540
- position: relative;
541
- }
542
- .ui-resizable-handle {
543
- position: absolute;
544
- font-size: 0.1px;
545
- display: block;
546
- }
547
- .ui-resizable-disabled .ui-resizable-handle,
548
- .ui-resizable-autohide .ui-resizable-handle {
549
- display: none;
550
- }
551
- .ui-resizable-n {
552
- cursor: n-resize;
553
- height: 7px;
554
- width: 100%;
555
- top: -5px;
556
- left: 0;
557
- }
558
- .ui-resizable-s {
559
- cursor: s-resize;
560
- height: 7px;
561
- width: 100%;
562
- bottom: -5px;
563
- left: 0;
564
- }
565
- .ui-resizable-e {
566
- cursor: e-resize;
567
- width: 7px;
568
- right: -5px;
569
- top: 0;
570
- height: 100%;
571
- }
572
- .ui-resizable-w {
573
- cursor: w-resize;
574
- width: 7px;
575
- left: -5px;
576
- top: 0;
577
- height: 100%;
578
- }
579
- .ui-resizable-se {
580
- cursor: se-resize;
581
- width: 12px;
582
- height: 12px;
583
- right: 1px;
584
- bottom: 1px;
585
- }
586
- .ui-resizable-sw {
587
- cursor: sw-resize;
588
- width: 9px;
589
- height: 9px;
590
- left: -5px;
591
- bottom: -5px;
592
- }
593
- .ui-resizable-nw {
594
- cursor: nw-resize;
595
- width: 9px;
596
- height: 9px;
597
- left: -5px;
598
- top: -5px;
599
- }
600
- .ui-resizable-ne {
601
- cursor: ne-resize;
602
- width: 9px;
603
- height: 9px;
604
- right: -5px;
605
- top: -5px;
606
- }
607
- .ui-selectable-helper {
608
- position: absolute;
609
- z-index: 100;
610
- border: 1px dotted black;
611
- }
612
- .ui-slider {
613
- position: relative;
614
- text-align: left;
615
- }
616
- .ui-slider .ui-slider-handle {
617
- position: absolute;
618
- z-index: 2;
619
- width: 1.2em;
620
- height: 1.2em;
621
- cursor: default;
622
- }
623
- .ui-slider .ui-slider-range {
624
- position: absolute;
625
- z-index: 1;
626
- font-size: .7em;
627
- display: block;
628
- border: 0;
629
- background-position: 0 0;
630
- }
631
-
632
- /* For IE8 - See #6727 */
633
- .ui-slider.ui-state-disabled .ui-slider-handle,
634
- .ui-slider.ui-state-disabled .ui-slider-range {
635
- filter: inherit;
636
- }
637
-
638
- .ui-slider-horizontal {
639
- height: .8em;
640
- }
641
- .ui-slider-horizontal .ui-slider-handle {
642
- top: -.3em;
643
- margin-left: -.6em;
644
- }
645
- .ui-slider-horizontal .ui-slider-range {
646
- top: 0;
647
- height: 100%;
648
- }
649
- .ui-slider-horizontal .ui-slider-range-min {
650
- left: 0;
651
- }
652
- .ui-slider-horizontal .ui-slider-range-max {
653
- right: 0;
654
- }
655
-
656
- .ui-slider-vertical {
657
- width: .8em;
658
- height: 100px;
659
- }
660
- .ui-slider-vertical .ui-slider-handle {
661
- left: -.3em;
662
- margin-left: 0;
663
- margin-bottom: -.6em;
664
- }
665
- .ui-slider-vertical .ui-slider-range {
666
- left: 0;
667
- width: 100%;
668
- }
669
- .ui-slider-vertical .ui-slider-range-min {
670
- bottom: 0;
671
- }
672
- .ui-slider-vertical .ui-slider-range-max {
673
- top: 0;
674
- }
675
- .ui-spinner {
676
- position: relative;
677
- display: inline-block;
678
- overflow: hidden;
679
- padding: 0;
680
- vertical-align: middle;
681
- }
682
- .ui-spinner-input {
683
- border: none;
684
- background: none;
685
- color: inherit;
686
- padding: 0;
687
- margin: .2em 0;
688
- vertical-align: middle;
689
- margin-left: .4em;
690
- margin-right: 22px;
691
- }
692
- .ui-spinner-button {
693
- width: 16px;
694
- height: 50%;
695
- font-size: .5em;
696
- padding: 0;
697
- margin: 0;
698
- text-align: center;
699
- position: absolute;
700
- cursor: default;
701
- display: block;
702
- overflow: hidden;
703
- right: 0;
704
- }
705
- /* more specificity required here to override default borders */
706
- .ui-spinner a.ui-spinner-button {
707
- border-top: none;
708
- border-bottom: none;
709
- border-right: none;
710
- }
711
- /* vertically center icon */
712
- .ui-spinner .ui-icon {
713
- position: absolute;
714
- margin-top: -8px;
715
- top: 50%;
716
- left: 0;
717
- }
718
- .ui-spinner-up {
719
- top: 0;
720
- }
721
- .ui-spinner-down {
722
- bottom: 0;
723
- }
724
-
725
- /* TR overrides */
726
- .ui-spinner .ui-icon-triangle-1-s {
727
- /* need to fix icons sprite */
728
- background-position: -65px -16px;
729
- }
730
- .ui-tabs {
731
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
732
- padding: .2em;
733
- }
734
- .ui-tabs .ui-tabs-nav {
735
- margin: 0;
736
- padding: .2em .2em 0;
737
- }
738
- .ui-tabs .ui-tabs-nav li {
739
- list-style: none;
740
- float: left;
741
- position: relative;
742
- top: 0;
743
- margin: 1px .2em 0 0;
744
- border-bottom-width: 0;
745
- padding: 0;
746
- white-space: nowrap;
747
- }
748
- .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
749
- float: left;
750
- padding: .5em 1em;
751
- text-decoration: none;
752
- }
753
- .ui-tabs .ui-tabs-nav li.ui-tabs-active {
754
- margin-bottom: -1px;
755
- padding-bottom: 1px;
756
- }
757
- .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
758
- .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
759
- .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
760
- cursor: text;
761
- }
762
- .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
763
- cursor: pointer;
764
- }
765
- .ui-tabs .ui-tabs-panel {
766
- display: block;
767
- border-width: 0;
768
- padding: 1em 1.4em;
769
- background: none;
770
- }
771
- .ui-tooltip {
772
- padding: 8px;
773
- position: absolute;
774
- z-index: 9999;
775
- max-width: 300px;
776
- -webkit-box-shadow: 0 0 5px #aaa;
777
- box-shadow: 0 0 5px #aaa;
778
- }
779
- body .ui-tooltip {
780
- border-width: 2px;
781
- }
782
-
783
- /* Component containers
784
- ----------------------------------*/
785
- .ui-widget {
786
- font-family: Verdana,Arial,sans-serif;
787
- font-size: 1.1em;
788
- }
789
- .ui-widget .ui-widget {
790
- font-size: 1em;
791
- }
792
- .ui-widget input,
793
- .ui-widget select,
794
- .ui-widget textarea,
795
- .ui-widget button {
796
- font-family: Verdana,Arial,sans-serif;
797
- font-size: 1em;
798
- }
799
- .ui-widget-content {
800
- border: 1px solid #aaaaaa;
801
- background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
802
- color: #222222;
803
- }
804
- .ui-widget-content a {
805
- color: #222222;
806
- }
807
- .ui-widget-header {
808
- border: 1px solid #aaaaaa;
809
- background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
810
- color: #222222;
811
- font-weight: bold;
812
- }
813
- .ui-widget-header a {
814
- color: #222222;
815
- }
816
-
817
- /* Interaction states
818
- ----------------------------------*/
819
- .ui-state-default,
820
- .ui-widget-content .ui-state-default,
821
- .ui-widget-header .ui-state-default {
822
- border: 1px solid #d3d3d3;
823
- background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
824
- font-weight: normal;
825
- color: #555555;
826
- }
827
- .ui-state-default a,
828
- .ui-state-default a:link,
829
- .ui-state-default a:visited {
830
- color: #555555;
831
- text-decoration: none;
832
- }
833
- .ui-state-hover,
834
- .ui-widget-content .ui-state-hover,
835
- .ui-widget-header .ui-state-hover,
836
- .ui-state-focus,
837
- .ui-widget-content .ui-state-focus,
838
- .ui-widget-header .ui-state-focus {
839
- border: 1px solid #999999;
840
- background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;
841
- font-weight: normal;
842
- color: #212121;
843
- }
844
- .ui-state-hover a,
845
- .ui-state-hover a:hover,
846
- .ui-state-hover a:link,
847
- .ui-state-hover a:visited,
848
- .ui-state-focus a,
849
- .ui-state-focus a:hover,
850
- .ui-state-focus a:link,
851
- .ui-state-focus a:visited {
852
- color: #212121;
853
- text-decoration: none;
854
- }
855
- .ui-state-active,
856
- .ui-widget-content .ui-state-active,
857
- .ui-widget-header .ui-state-active {
858
- border: 1px solid #aaaaaa;
859
- background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
860
- font-weight: normal;
861
- color: #212121;
862
- }
863
- .ui-state-active a,
864
- .ui-state-active a:link,
865
- .ui-state-active a:visited {
866
- color: #212121;
867
- text-decoration: none;
868
- }
869
-
870
- /* Interaction Cues
871
- ----------------------------------*/
872
- .ui-state-highlight,
873
- .ui-widget-content .ui-state-highlight,
874
- .ui-widget-header .ui-state-highlight {
875
- border: 1px solid #fcefa1;
876
- background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;
877
- color: #363636;
878
- }
879
- .ui-state-highlight a,
880
- .ui-widget-content .ui-state-highlight a,
881
- .ui-widget-header .ui-state-highlight a {
882
- color: #363636;
883
- }
884
- .ui-state-error,
885
- .ui-widget-content .ui-state-error,
886
- .ui-widget-header .ui-state-error {
887
- border: 1px solid #cd0a0a;
888
- background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
889
- color: #cd0a0a;
890
- }
891
- .ui-state-error a,
892
- .ui-widget-content .ui-state-error a,
893
- .ui-widget-header .ui-state-error a {
894
- color: #cd0a0a;
895
- }
896
- .ui-state-error-text,
897
- .ui-widget-content .ui-state-error-text,
898
- .ui-widget-header .ui-state-error-text {
899
- color: #cd0a0a;
900
- }
901
- .ui-priority-primary,
902
- .ui-widget-content .ui-priority-primary,
903
- .ui-widget-header .ui-priority-primary {
904
- font-weight: bold;
905
- }
906
- .ui-priority-secondary,
907
- .ui-widget-content .ui-priority-secondary,
908
- .ui-widget-header .ui-priority-secondary {
909
- opacity: .7;
910
- filter:Alpha(Opacity=70);
911
- font-weight: normal;
912
- }
913
- .ui-state-disabled,
914
- .ui-widget-content .ui-state-disabled,
915
- .ui-widget-header .ui-state-disabled {
916
- opacity: .35;
917
- filter:Alpha(Opacity=35);
918
- background-image: none;
919
- }
920
- .ui-state-disabled .ui-icon {
921
- filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
922
- }
923
-
924
- /* Icons
925
- ----------------------------------*/
926
-
927
- /* states and images */
928
- .ui-icon {
929
- width: 16px;
930
- height: 16px;
931
- }
932
- .ui-icon,
933
- .ui-widget-content .ui-icon {
934
- background-image: url(images/ui-icons_222222_256x240.png);
935
- }
936
- .ui-widget-header .ui-icon {
937
- background-image: url(images/ui-icons_222222_256x240.png);
938
- }
939
- .ui-state-default .ui-icon {
940
- background-image: url(images/ui-icons_888888_256x240.png);
941
- }
942
- .ui-state-hover .ui-icon,
943
- .ui-state-focus .ui-icon {
944
- background-image: url(images/ui-icons_454545_256x240.png);
945
- }
946
- .ui-state-active .ui-icon {
947
- background-image: url(images/ui-icons_454545_256x240.png);
948
- }
949
- .ui-state-highlight .ui-icon {
950
- background-image: url(images/ui-icons_2e83ff_256x240.png);
951
- }
952
- .ui-state-error .ui-icon,
953
- .ui-state-error-text .ui-icon {
954
- background-image: url(images/ui-icons_cd0a0a_256x240.png);
955
- }
956
-
957
- /* positioning */
958
- .ui-icon-blank { background-position: 16px 16px; }
959
- .ui-icon-carat-1-n { background-position: 0 0; }
960
- .ui-icon-carat-1-ne { background-position: -16px 0; }
961
- .ui-icon-carat-1-e { background-position: -32px 0; }
962
- .ui-icon-carat-1-se { background-position: -48px 0; }
963
- .ui-icon-carat-1-s { background-position: -64px 0; }
964
- .ui-icon-carat-1-sw { background-position: -80px 0; }
965
- .ui-icon-carat-1-w { background-position: -96px 0; }
966
- .ui-icon-carat-1-nw { background-position: -112px 0; }
967
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
968
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
969
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
970
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
971
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
972
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
973
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
974
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
975
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
976
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
977
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
978
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
979
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
980
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
981
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
982
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
983
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
984
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
985
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
986
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
987
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
988
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
989
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
990
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
991
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
992
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
993
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
994
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
995
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
996
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
997
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
998
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
999
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
1000
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1001
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1002
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1003
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1004
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1005
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1006
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1007
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1008
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1009
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1010
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1011
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1012
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1013
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1014
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1015
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1016
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1017
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1018
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1019
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1020
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1021
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1022
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1023
- .ui-icon-arrow-4 { background-position: 0 -80px; }
1024
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1025
- .ui-icon-extlink { background-position: -32px -80px; }
1026
- .ui-icon-newwin { background-position: -48px -80px; }
1027
- .ui-icon-refresh { background-position: -64px -80px; }
1028
- .ui-icon-shuffle { background-position: -80px -80px; }
1029
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
1030
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1031
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
1032
- .ui-icon-folder-open { background-position: -16px -96px; }
1033
- .ui-icon-document { background-position: -32px -96px; }
1034
- .ui-icon-document-b { background-position: -48px -96px; }
1035
- .ui-icon-note { background-position: -64px -96px; }
1036
- .ui-icon-mail-closed { background-position: -80px -96px; }
1037
- .ui-icon-mail-open { background-position: -96px -96px; }
1038
- .ui-icon-suitcase { background-position: -112px -96px; }
1039
- .ui-icon-comment { background-position: -128px -96px; }
1040
- .ui-icon-person { background-position: -144px -96px; }
1041
- .ui-icon-print { background-position: -160px -96px; }
1042
- .ui-icon-trash { background-position: -176px -96px; }
1043
- .ui-icon-locked { background-position: -192px -96px; }
1044
- .ui-icon-unlocked { background-position: -208px -96px; }
1045
- .ui-icon-bookmark { background-position: -224px -96px; }
1046
- .ui-icon-tag { background-position: -240px -96px; }
1047
- .ui-icon-home { background-position: 0 -112px; }
1048
- .ui-icon-flag { background-position: -16px -112px; }
1049
- .ui-icon-calendar { background-position: -32px -112px; }
1050
- .ui-icon-cart { background-position: -48px -112px; }
1051
- .ui-icon-pencil { background-position: -64px -112px; }
1052
- .ui-icon-clock { background-position: -80px -112px; }
1053
- .ui-icon-disk { background-position: -96px -112px; }
1054
- .ui-icon-calculator { background-position: -112px -112px; }
1055
- .ui-icon-zoomin { background-position: -128px -112px; }
1056
- .ui-icon-zoomout { background-position: -144px -112px; }
1057
- .ui-icon-search { background-position: -160px -112px; }
1058
- .ui-icon-wrench { background-position: -176px -112px; }
1059
- .ui-icon-gear { background-position: -192px -112px; }
1060
- .ui-icon-heart { background-position: -208px -112px; }
1061
- .ui-icon-star { background-position: -224px -112px; }
1062
- .ui-icon-link { background-position: -240px -112px; }
1063
- .ui-icon-cancel { background-position: 0 -128px; }
1064
- .ui-icon-plus { background-position: -16px -128px; }
1065
- .ui-icon-plusthick { background-position: -32px -128px; }
1066
- .ui-icon-minus { background-position: -48px -128px; }
1067
- .ui-icon-minusthick { background-position: -64px -128px; }
1068
- .ui-icon-close { background-position: -80px -128px; }
1069
- .ui-icon-closethick { background-position: -96px -128px; }
1070
- .ui-icon-key { background-position: -112px -128px; }
1071
- .ui-icon-lightbulb { background-position: -128px -128px; }
1072
- .ui-icon-scissors { background-position: -144px -128px; }
1073
- .ui-icon-clipboard { background-position: -160px -128px; }
1074
- .ui-icon-copy { background-position: -176px -128px; }
1075
- .ui-icon-contact { background-position: -192px -128px; }
1076
- .ui-icon-image { background-position: -208px -128px; }
1077
- .ui-icon-video { background-position: -224px -128px; }
1078
- .ui-icon-script { background-position: -240px -128px; }
1079
- .ui-icon-alert { background-position: 0 -144px; }
1080
- .ui-icon-info { background-position: -16px -144px; }
1081
- .ui-icon-notice { background-position: -32px -144px; }
1082
- .ui-icon-help { background-position: -48px -144px; }
1083
- .ui-icon-check { background-position: -64px -144px; }
1084
- .ui-icon-bullet { background-position: -80px -144px; }
1085
- .ui-icon-radio-on { background-position: -96px -144px; }
1086
- .ui-icon-radio-off { background-position: -112px -144px; }
1087
- .ui-icon-pin-w { background-position: -128px -144px; }
1088
- .ui-icon-pin-s { background-position: -144px -144px; }
1089
- .ui-icon-play { background-position: 0 -160px; }
1090
- .ui-icon-pause { background-position: -16px -160px; }
1091
- .ui-icon-seek-next { background-position: -32px -160px; }
1092
- .ui-icon-seek-prev { background-position: -48px -160px; }
1093
- .ui-icon-seek-end { background-position: -64px -160px; }
1094
- .ui-icon-seek-start { background-position: -80px -160px; }
1095
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1096
- .ui-icon-seek-first { background-position: -80px -160px; }
1097
- .ui-icon-stop { background-position: -96px -160px; }
1098
- .ui-icon-eject { background-position: -112px -160px; }
1099
- .ui-icon-volume-off { background-position: -128px -160px; }
1100
- .ui-icon-volume-on { background-position: -144px -160px; }
1101
- .ui-icon-power { background-position: 0 -176px; }
1102
- .ui-icon-signal-diag { background-position: -16px -176px; }
1103
- .ui-icon-signal { background-position: -32px -176px; }
1104
- .ui-icon-battery-0 { background-position: -48px -176px; }
1105
- .ui-icon-battery-1 { background-position: -64px -176px; }
1106
- .ui-icon-battery-2 { background-position: -80px -176px; }
1107
- .ui-icon-battery-3 { background-position: -96px -176px; }
1108
- .ui-icon-circle-plus { background-position: 0 -192px; }
1109
- .ui-icon-circle-minus { background-position: -16px -192px; }
1110
- .ui-icon-circle-close { background-position: -32px -192px; }
1111
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1112
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1113
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1114
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1115
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1116
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1117
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1118
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1119
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
1120
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
1121
- .ui-icon-circle-check { background-position: -208px -192px; }
1122
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1123
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1124
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
1125
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1126
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1127
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
1128
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1129
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1130
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1131
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1132
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1133
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1134
-
1135
-
1136
- /* Misc visuals
1137
- ----------------------------------*/
1138
-
1139
- /* Corner radius */
1140
- .ui-corner-all,
1141
- .ui-corner-top,
1142
- .ui-corner-left,
1143
- .ui-corner-tl {
1144
- border-top-left-radius: 4px;
1145
- }
1146
- .ui-corner-all,
1147
- .ui-corner-top,
1148
- .ui-corner-right,
1149
- .ui-corner-tr {
1150
- border-top-right-radius: 4px;
1151
- }
1152
- .ui-corner-all,
1153
- .ui-corner-bottom,
1154
- .ui-corner-left,
1155
- .ui-corner-bl {
1156
- border-bottom-left-radius: 4px;
1157
- }
1158
- .ui-corner-all,
1159
- .ui-corner-bottom,
1160
- .ui-corner-right,
1161
- .ui-corner-br {
1162
- border-bottom-right-radius: 4px;
1163
- }
1164
-
1165
- /* Overlays */
1166
- .ui-widget-overlay {
1167
- background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
1168
- opacity: .3;
1169
- filter: Alpha(Opacity=30);
1170
- }
1171
- .ui-widget-shadow {
1172
- margin: -8px 0 0 -8px;
1173
- padding: 8px;
1174
- background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
1175
- opacity: .3;
1176
- filter: Alpha(Opacity=30);
1177
- border-radius: 8px;
1178
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/images/popup-close.png DELETED
Binary file
assets/js/chosen.jquery.js DELETED
@@ -1,1211 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.1.0
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011 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
- children: 0,
40
- disabled: group.disabled
41
- });
42
- _ref = group.childNodes;
43
- _results = [];
44
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
45
- option = _ref[_i];
46
- _results.push(this.add_option(option, group_position, group.disabled));
47
- }
48
- return _results;
49
- };
50
-
51
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
52
- if (option.nodeName.toUpperCase() === "OPTION") {
53
- if (option.text !== "") {
54
- if (group_position != null) {
55
- this.parsed[group_position].children += 1;
56
- }
57
- this.parsed.push({
58
- array_index: this.parsed.length,
59
- options_index: this.options_index,
60
- value: option.value,
61
- text: option.text,
62
- html: option.innerHTML,
63
- selected: option.selected,
64
- disabled: group_disabled === true ? group_disabled : option.disabled,
65
- group_array_index: group_position,
66
- classes: option.className,
67
- style: option.style.cssText
68
- });
69
- } else {
70
- this.parsed.push({
71
- array_index: this.parsed.length,
72
- options_index: this.options_index,
73
- empty: true
74
- });
75
- }
76
- return this.options_index += 1;
77
- }
78
- };
79
-
80
- SelectParser.prototype.escapeExpression = function(text) {
81
- var map, unsafe_chars;
82
- if ((text == null) || text === false) {
83
- return "";
84
- }
85
- if (!/[\&\<\>\"\'\`]/.test(text)) {
86
- return text;
87
- }
88
- map = {
89
- "<": "&lt;",
90
- ">": "&gt;",
91
- '"': "&quot;",
92
- "'": "&#x27;",
93
- "`": "&#x60;"
94
- };
95
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
96
- return text.replace(unsafe_chars, function(chr) {
97
- return map[chr] || "&amp;";
98
- });
99
- };
100
-
101
- return SelectParser;
102
-
103
- })();
104
-
105
- SelectParser.select_to_array = function(select) {
106
- var child, parser, _i, _len, _ref;
107
- parser = new SelectParser();
108
- _ref = select.childNodes;
109
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
110
- child = _ref[_i];
111
- parser.add_node(child);
112
- }
113
- return parser.parsed;
114
- };
115
-
116
- AbstractChosen = (function() {
117
- function AbstractChosen(form_field, options) {
118
- this.form_field = form_field;
119
- this.options = options != null ? options : {};
120
- if (!AbstractChosen.browser_is_supported()) {
121
- return;
122
- }
123
- this.is_multiple = this.form_field.multiple;
124
- this.set_default_text();
125
- this.set_default_values();
126
- this.setup();
127
- this.set_up_html();
128
- this.register_observers();
129
- }
130
-
131
- AbstractChosen.prototype.set_default_values = function() {
132
- var _this = this;
133
- this.click_test_action = function(evt) {
134
- return _this.test_active_click(evt);
135
- };
136
- this.activate_action = function(evt) {
137
- return _this.activate_field(evt);
138
- };
139
- this.active_field = false;
140
- this.mouse_on_container = false;
141
- this.results_showing = false;
142
- this.result_highlighted = null;
143
- 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;
144
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
145
- this.disable_search = this.options.disable_search || false;
146
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
147
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
148
- this.search_contains = this.options.search_contains || false;
149
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
150
- this.max_selected_options = this.options.max_selected_options || Infinity;
151
- this.inherit_select_classes = this.options.inherit_select_classes || false;
152
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
153
- return this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
154
- };
155
-
156
- AbstractChosen.prototype.set_default_text = function() {
157
- if (this.form_field.getAttribute("data-placeholder")) {
158
- this.default_text = this.form_field.getAttribute("data-placeholder");
159
- } else if (this.is_multiple) {
160
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
161
- } else {
162
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
163
- }
164
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
165
- };
166
-
167
- AbstractChosen.prototype.mouse_enter = function() {
168
- return this.mouse_on_container = true;
169
- };
170
-
171
- AbstractChosen.prototype.mouse_leave = function() {
172
- return this.mouse_on_container = false;
173
- };
174
-
175
- AbstractChosen.prototype.input_focus = function(evt) {
176
- var _this = this;
177
- if (this.is_multiple) {
178
- if (!this.active_field) {
179
- return setTimeout((function() {
180
- return _this.container_mousedown();
181
- }), 50);
182
- }
183
- } else {
184
- if (!this.active_field) {
185
- return this.activate_field();
186
- }
187
- }
188
- };
189
-
190
- AbstractChosen.prototype.input_blur = function(evt) {
191
- var _this = this;
192
- if (!this.mouse_on_container) {
193
- this.active_field = false;
194
- return setTimeout((function() {
195
- return _this.blur_test();
196
- }), 100);
197
- }
198
- };
199
-
200
- AbstractChosen.prototype.results_option_build = function(options) {
201
- var content, data, _i, _len, _ref;
202
- content = '';
203
- _ref = this.results_data;
204
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
205
- data = _ref[_i];
206
- if (data.group) {
207
- content += this.result_add_group(data);
208
- } else {
209
- content += this.result_add_option(data);
210
- }
211
- if (options != null ? options.first : void 0) {
212
- if (data.selected && this.is_multiple) {
213
- this.choice_build(data);
214
- } else if (data.selected && !this.is_multiple) {
215
- this.single_set_selected_text(data.text);
216
- }
217
- }
218
- }
219
- return content;
220
- };
221
-
222
- AbstractChosen.prototype.result_add_option = function(option) {
223
- var classes, option_el;
224
- if (!option.search_match) {
225
- return '';
226
- }
227
- if (!this.include_option_in_results(option)) {
228
- return '';
229
- }
230
- classes = [];
231
- if (!option.disabled && !(option.selected && this.is_multiple)) {
232
- classes.push("active-result");
233
- }
234
- if (option.disabled && !(option.selected && this.is_multiple)) {
235
- classes.push("disabled-result");
236
- }
237
- if (option.selected) {
238
- classes.push("result-selected");
239
- }
240
- if (option.group_array_index != null) {
241
- classes.push("group-option");
242
- }
243
- if (option.classes !== "") {
244
- classes.push(option.classes);
245
- }
246
- option_el = document.createElement("li");
247
- option_el.className = classes.join(" ");
248
- option_el.style.cssText = option.style;
249
- option_el.setAttribute("data-option-array-index", option.array_index);
250
- option_el.innerHTML = option.search_text;
251
- return this.outerHTML(option_el);
252
- };
253
-
254
- AbstractChosen.prototype.result_add_group = function(group) {
255
- var group_el;
256
- if (!(group.search_match || group.group_match)) {
257
- return '';
258
- }
259
- if (!(group.active_options > 0)) {
260
- return '';
261
- }
262
- group_el = document.createElement("li");
263
- group_el.className = "group-result";
264
- group_el.innerHTML = group.search_text;
265
- return this.outerHTML(group_el);
266
- };
267
-
268
- AbstractChosen.prototype.results_update_field = function() {
269
- this.set_default_text();
270
- if (!this.is_multiple) {
271
- this.results_reset_cleanup();
272
- }
273
- this.result_clear_highlight();
274
- this.results_build();
275
- if (this.results_showing) {
276
- return this.winnow_results();
277
- }
278
- };
279
-
280
- AbstractChosen.prototype.reset_single_select_options = function() {
281
- var result, _i, _len, _ref, _results;
282
- _ref = this.results_data;
283
- _results = [];
284
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
285
- result = _ref[_i];
286
- if (result.selected) {
287
- _results.push(result.selected = false);
288
- } else {
289
- _results.push(void 0);
290
- }
291
- }
292
- return _results;
293
- };
294
-
295
- AbstractChosen.prototype.results_toggle = function() {
296
- if (this.results_showing) {
297
- return this.results_hide();
298
- } else {
299
- return this.results_show();
300
- }
301
- };
302
-
303
- AbstractChosen.prototype.results_search = function(evt) {
304
- if (this.results_showing) {
305
- return this.winnow_results();
306
- } else {
307
- return this.results_show();
308
- }
309
- };
310
-
311
- AbstractChosen.prototype.winnow_results = function() {
312
- var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
313
- this.no_results_clear();
314
- results = 0;
315
- searchText = this.get_search_text();
316
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
317
- regexAnchor = this.search_contains ? "" : "^";
318
- regex = new RegExp(regexAnchor + escapedSearchText, 'i');
319
- zregex = new RegExp(escapedSearchText, 'i');
320
- _ref = this.results_data;
321
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
322
- option = _ref[_i];
323
- option.search_match = false;
324
- results_group = null;
325
- if (this.include_option_in_results(option)) {
326
- if (option.group) {
327
- option.group_match = false;
328
- option.active_options = 0;
329
- }
330
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
331
- results_group = this.results_data[option.group_array_index];
332
- if (results_group.active_options === 0 && results_group.search_match) {
333
- results += 1;
334
- }
335
- results_group.active_options += 1;
336
- }
337
- if (!(option.group && !this.group_search)) {
338
- option.search_text = option.group ? option.label : option.html;
339
- option.search_match = this.search_string_match(option.search_text, regex);
340
- if (option.search_match && !option.group) {
341
- results += 1;
342
- }
343
- if (option.search_match) {
344
- if (searchText.length) {
345
- startpos = option.search_text.search(zregex);
346
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
347
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
348
- }
349
- if (results_group != null) {
350
- results_group.group_match = true;
351
- }
352
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
353
- option.search_match = true;
354
- }
355
- }
356
- }
357
- }
358
- this.result_clear_highlight();
359
- if (results < 1 && searchText.length) {
360
- this.update_results_content("");
361
- return this.no_results(searchText);
362
- } else {
363
- this.update_results_content(this.results_option_build());
364
- return this.winnow_results_set_highlight();
365
- }
366
- };
367
-
368
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
369
- var part, parts, _i, _len;
370
- if (regex.test(search_string)) {
371
- return true;
372
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
373
- parts = search_string.replace(/\[|\]/g, "").split(" ");
374
- if (parts.length) {
375
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
376
- part = parts[_i];
377
- if (regex.test(part)) {
378
- return true;
379
- }
380
- }
381
- }
382
- }
383
- };
384
-
385
- AbstractChosen.prototype.choices_count = function() {
386
- var option, _i, _len, _ref;
387
- if (this.selected_option_count != null) {
388
- return this.selected_option_count;
389
- }
390
- this.selected_option_count = 0;
391
- _ref = this.form_field.options;
392
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
393
- option = _ref[_i];
394
- if (option.selected) {
395
- this.selected_option_count += 1;
396
- }
397
- }
398
- return this.selected_option_count;
399
- };
400
-
401
- AbstractChosen.prototype.choices_click = function(evt) {
402
- evt.preventDefault();
403
- if (!(this.results_showing || this.is_disabled)) {
404
- return this.results_show();
405
- }
406
- };
407
-
408
- AbstractChosen.prototype.keyup_checker = function(evt) {
409
- var stroke, _ref;
410
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
411
- this.search_field_scale();
412
- switch (stroke) {
413
- case 8:
414
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
415
- return this.keydown_backstroke();
416
- } else if (!this.pending_backstroke) {
417
- this.result_clear_highlight();
418
- return this.results_search();
419
- }
420
- break;
421
- case 13:
422
- evt.preventDefault();
423
- if (this.results_showing) {
424
- return this.result_select(evt);
425
- }
426
- break;
427
- case 27:
428
- if (this.results_showing) {
429
- this.results_hide();
430
- }
431
- return true;
432
- case 9:
433
- case 38:
434
- case 40:
435
- case 16:
436
- case 91:
437
- case 17:
438
- break;
439
- default:
440
- return this.results_search();
441
- }
442
- };
443
-
444
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
445
- var _this = this;
446
- return setTimeout((function() {
447
- return _this.results_search();
448
- }), 50);
449
- };
450
-
451
- AbstractChosen.prototype.container_width = function() {
452
- if (this.options.width != null) {
453
- return this.options.width;
454
- } else {
455
- return "" + this.form_field.offsetWidth + "px";
456
- }
457
- };
458
-
459
- AbstractChosen.prototype.include_option_in_results = function(option) {
460
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
461
- return false;
462
- }
463
- if (!this.display_disabled_options && option.disabled) {
464
- return false;
465
- }
466
- if (option.empty) {
467
- return false;
468
- }
469
- return true;
470
- };
471
-
472
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
473
- this.touch_started = true;
474
- return this.search_results_mouseover(evt);
475
- };
476
-
477
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
478
- this.touch_started = false;
479
- return this.search_results_mouseout(evt);
480
- };
481
-
482
- AbstractChosen.prototype.search_results_touchend = function(evt) {
483
- if (this.touch_started) {
484
- return this.search_results_mouseup(evt);
485
- }
486
- };
487
-
488
- AbstractChosen.prototype.outerHTML = function(element) {
489
- var tmp;
490
- if (element.outerHTML) {
491
- return element.outerHTML;
492
- }
493
- tmp = document.createElement("div");
494
- tmp.appendChild(element);
495
- return tmp.innerHTML;
496
- };
497
-
498
- AbstractChosen.browser_is_supported = function() {
499
- if (window.navigator.appName === "Microsoft Internet Explorer") {
500
- return document.documentMode >= 8;
501
- }
502
- if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
503
- return false;
504
- }
505
- if (/Android/i.test(window.navigator.userAgent)) {
506
- if (/Mobile/i.test(window.navigator.userAgent)) {
507
- return false;
508
- }
509
- }
510
- return true;
511
- };
512
-
513
- AbstractChosen.default_multiple_text = "Select Some Options";
514
-
515
- AbstractChosen.default_single_text = "Select an Option";
516
-
517
- AbstractChosen.default_no_result_text = "No results match";
518
-
519
- return AbstractChosen;
520
-
521
- })();
522
-
523
- $ = jQuery;
524
-
525
- $.fn.extend({
526
- chosen: function(options) {
527
- if (!AbstractChosen.browser_is_supported()) {
528
- return this;
529
- }
530
- return this.each(function(input_field) {
531
- var $this, chosen;
532
- $this = $(this);
533
- chosen = $this.data('chosen');
534
- if (options === 'destroy' && chosen) {
535
- chosen.destroy();
536
- } else if (!chosen) {
537
- $this.data('chosen', new Chosen(this, options));
538
- }
539
- });
540
- }
541
- });
542
-
543
- Chosen = (function(_super) {
544
- __extends(Chosen, _super);
545
-
546
- function Chosen() {
547
- _ref = Chosen.__super__.constructor.apply(this, arguments);
548
- return _ref;
549
- }
550
-
551
- Chosen.prototype.setup = function() {
552
- this.form_field_jq = $(this.form_field);
553
- this.current_selectedIndex = this.form_field.selectedIndex;
554
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
555
- };
556
-
557
- Chosen.prototype.set_up_html = function() {
558
- var container_classes, container_props;
559
- container_classes = ["chosen-container"];
560
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
561
- if (this.inherit_select_classes && this.form_field.className) {
562
- container_classes.push(this.form_field.className);
563
- }
564
- if (this.is_rtl) {
565
- container_classes.push("chosen-rtl");
566
- }
567
- container_props = {
568
- 'class': container_classes.join(' '),
569
- 'style': "width: " + (this.container_width()) + ";",
570
- 'title': this.form_field.title
571
- };
572
- if (this.form_field.id.length) {
573
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
574
- }
575
- this.container = $("<div />", container_props);
576
- if (this.is_multiple) {
577
- 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>');
578
- } else {
579
- this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><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>');
580
- }
581
- this.form_field_jq.hide().after(this.container);
582
- this.dropdown = this.container.find('div.chosen-drop').first();
583
- this.search_field = this.container.find('input').first();
584
- this.search_results = this.container.find('ul.chosen-results').first();
585
- this.search_field_scale();
586
- this.search_no_results = this.container.find('li.no-results').first();
587
- if (this.is_multiple) {
588
- this.search_choices = this.container.find('ul.chosen-choices').first();
589
- this.search_container = this.container.find('li.search-field').first();
590
- } else {
591
- this.search_container = this.container.find('div.chosen-search').first();
592
- this.selected_item = this.container.find('.chosen-single').first();
593
- }
594
- this.results_build();
595
- this.set_tab_index();
596
- this.set_label_behavior();
597
- return this.form_field_jq.trigger("chosen:ready", {
598
- chosen: this
599
- });
600
- };
601
-
602
- Chosen.prototype.register_observers = function() {
603
- var _this = this;
604
- this.container.bind('mousedown.chosen', function(evt) {
605
- _this.container_mousedown(evt);
606
- });
607
- this.container.bind('mouseup.chosen', function(evt) {
608
- _this.container_mouseup(evt);
609
- });
610
- this.container.bind('mouseenter.chosen', function(evt) {
611
- _this.mouse_enter(evt);
612
- });
613
- this.container.bind('mouseleave.chosen', function(evt) {
614
- _this.mouse_leave(evt);
615
- });
616
- this.search_results.bind('mouseup.chosen', function(evt) {
617
- _this.search_results_mouseup(evt);
618
- });
619
- this.search_results.bind('mouseover.chosen', function(evt) {
620
- _this.search_results_mouseover(evt);
621
- });
622
- this.search_results.bind('mouseout.chosen', function(evt) {
623
- _this.search_results_mouseout(evt);
624
- });
625
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
626
- _this.search_results_mousewheel(evt);
627
- });
628
- this.search_results.bind('touchstart.chosen', function(evt) {
629
- _this.search_results_touchstart(evt);
630
- });
631
- this.search_results.bind('touchmove.chosen', function(evt) {
632
- _this.search_results_touchmove(evt);
633
- });
634
- this.search_results.bind('touchend.chosen', function(evt) {
635
- _this.search_results_touchend(evt);
636
- });
637
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
638
- _this.results_update_field(evt);
639
- });
640
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
641
- _this.activate_field(evt);
642
- });
643
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
644
- _this.container_mousedown(evt);
645
- });
646
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
647
- _this.input_blur(evt);
648
- });
649
- this.search_field.bind('blur.chosen', function(evt) {
650
- _this.input_blur(evt);
651
- });
652
- this.search_field.bind('keyup.chosen', function(evt) {
653
- _this.keyup_checker(evt);
654
- });
655
- this.search_field.bind('keydown.chosen', function(evt) {
656
- _this.keydown_checker(evt);
657
- });
658
- this.search_field.bind('focus.chosen', function(evt) {
659
- _this.input_focus(evt);
660
- });
661
- this.search_field.bind('cut.chosen', function(evt) {
662
- _this.clipboard_event_checker(evt);
663
- });
664
- this.search_field.bind('paste.chosen', function(evt) {
665
- _this.clipboard_event_checker(evt);
666
- });
667
- if (this.is_multiple) {
668
- return this.search_choices.bind('click.chosen', function(evt) {
669
- _this.choices_click(evt);
670
- });
671
- } else {
672
- return this.container.bind('click.chosen', function(evt) {
673
- evt.preventDefault();
674
- });
675
- }
676
- };
677
-
678
- Chosen.prototype.destroy = function() {
679
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
680
- if (this.search_field[0].tabIndex) {
681
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
682
- }
683
- this.container.remove();
684
- this.form_field_jq.removeData('chosen');
685
- return this.form_field_jq.show();
686
- };
687
-
688
- Chosen.prototype.search_field_disabled = function() {
689
- this.is_disabled = this.form_field_jq[0].disabled;
690
- if (this.is_disabled) {
691
- this.container.addClass('chosen-disabled');
692
- this.search_field[0].disabled = true;
693
- if (!this.is_multiple) {
694
- this.selected_item.unbind("focus.chosen", this.activate_action);
695
- }
696
- return this.close_field();
697
- } else {
698
- this.container.removeClass('chosen-disabled');
699
- this.search_field[0].disabled = false;
700
- if (!this.is_multiple) {
701
- return this.selected_item.bind("focus.chosen", this.activate_action);
702
- }
703
- }
704
- };
705
-
706
- Chosen.prototype.container_mousedown = function(evt) {
707
- if (!this.is_disabled) {
708
- if (evt && evt.type === "mousedown" && !this.results_showing) {
709
- evt.preventDefault();
710
- }
711
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
712
- if (!this.active_field) {
713
- if (this.is_multiple) {
714
- this.search_field.val("");
715
- }
716
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
717
- this.results_show();
718
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
719
- evt.preventDefault();
720
- this.results_toggle();
721
- }
722
- return this.activate_field();
723
- }
724
- }
725
- };
726
-
727
- Chosen.prototype.container_mouseup = function(evt) {
728
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
729
- return this.results_reset(evt);
730
- }
731
- };
732
-
733
- Chosen.prototype.search_results_mousewheel = function(evt) {
734
- var delta;
735
- if (evt.originalEvent) {
736
- delta = -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
737
- }
738
- if (delta != null) {
739
- evt.preventDefault();
740
- if (evt.type === 'DOMMouseScroll') {
741
- delta = delta * 40;
742
- }
743
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
744
- }
745
- };
746
-
747
- Chosen.prototype.blur_test = function(evt) {
748
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
749
- return this.close_field();
750
- }
751
- };
752
-
753
- Chosen.prototype.close_field = function() {
754
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
755
- this.active_field = false;
756
- this.results_hide();
757
- this.container.removeClass("chosen-container-active");
758
- this.clear_backstroke();
759
- this.show_search_field_default();
760
- return this.search_field_scale();
761
- };
762
-
763
- Chosen.prototype.activate_field = function() {
764
- this.container.addClass("chosen-container-active");
765
- this.active_field = true;
766
- this.search_field.val(this.search_field.val());
767
- return this.search_field.focus();
768
- };
769
-
770
- Chosen.prototype.test_active_click = function(evt) {
771
- var active_container;
772
- active_container = $(evt.target).closest('.chosen-container');
773
- if (active_container.length && this.container[0] === active_container[0]) {
774
- return this.active_field = true;
775
- } else {
776
- return this.close_field();
777
- }
778
- };
779
-
780
- Chosen.prototype.results_build = function() {
781
- this.parsing = true;
782
- this.selected_option_count = null;
783
- this.results_data = SelectParser.select_to_array(this.form_field);
784
- if (this.is_multiple) {
785
- this.search_choices.find("li.search-choice").remove();
786
- } else if (!this.is_multiple) {
787
- this.single_set_selected_text();
788
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
789
- this.search_field[0].readOnly = true;
790
- this.container.addClass("chosen-container-single-nosearch");
791
- } else {
792
- this.search_field[0].readOnly = false;
793
- this.container.removeClass("chosen-container-single-nosearch");
794
- }
795
- }
796
- this.update_results_content(this.results_option_build({
797
- first: true
798
- }));
799
- this.search_field_disabled();
800
- this.show_search_field_default();
801
- this.search_field_scale();
802
- return this.parsing = false;
803
- };
804
-
805
- Chosen.prototype.result_do_highlight = function(el) {
806
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
807
- if (el.length) {
808
- this.result_clear_highlight();
809
- this.result_highlight = el;
810
- this.result_highlight.addClass("highlighted");
811
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
812
- visible_top = this.search_results.scrollTop();
813
- visible_bottom = maxHeight + visible_top;
814
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
815
- high_bottom = high_top + this.result_highlight.outerHeight();
816
- if (high_bottom >= visible_bottom) {
817
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
818
- } else if (high_top < visible_top) {
819
- return this.search_results.scrollTop(high_top);
820
- }
821
- }
822
- };
823
-
824
- Chosen.prototype.result_clear_highlight = function() {
825
- if (this.result_highlight) {
826
- this.result_highlight.removeClass("highlighted");
827
- }
828
- return this.result_highlight = null;
829
- };
830
-
831
- Chosen.prototype.results_show = function() {
832
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
833
- this.form_field_jq.trigger("chosen:maxselected", {
834
- chosen: this
835
- });
836
- return false;
837
- }
838
- this.container.addClass("chosen-with-drop");
839
- this.results_showing = true;
840
- this.search_field.focus();
841
- this.search_field.val(this.search_field.val());
842
- this.winnow_results();
843
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
844
- chosen: this
845
- });
846
- };
847
-
848
- Chosen.prototype.update_results_content = function(content) {
849
- return this.search_results.html(content);
850
- };
851
-
852
- Chosen.prototype.results_hide = function() {
853
- if (this.results_showing) {
854
- this.result_clear_highlight();
855
- this.container.removeClass("chosen-with-drop");
856
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
857
- chosen: this
858
- });
859
- }
860
- return this.results_showing = false;
861
- };
862
-
863
- Chosen.prototype.set_tab_index = function(el) {
864
- var ti;
865
- if (this.form_field.tabIndex) {
866
- ti = this.form_field.tabIndex;
867
- this.form_field.tabIndex = -1;
868
- return this.search_field[0].tabIndex = ti;
869
- }
870
- };
871
-
872
- Chosen.prototype.set_label_behavior = function() {
873
- var _this = this;
874
- this.form_field_label = this.form_field_jq.parents("label");
875
- if (!this.form_field_label.length && this.form_field.id.length) {
876
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
877
- }
878
- if (this.form_field_label.length > 0) {
879
- return this.form_field_label.bind('click.chosen', function(evt) {
880
- if (_this.is_multiple) {
881
- return _this.container_mousedown(evt);
882
- } else {
883
- return _this.activate_field();
884
- }
885
- });
886
- }
887
- };
888
-
889
- Chosen.prototype.show_search_field_default = function() {
890
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
891
- this.search_field.val(this.default_text);
892
- return this.search_field.addClass("default");
893
- } else {
894
- this.search_field.val("");
895
- return this.search_field.removeClass("default");
896
- }
897
- };
898
-
899
- Chosen.prototype.search_results_mouseup = function(evt) {
900
- var target;
901
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
902
- if (target.length) {
903
- this.result_highlight = target;
904
- this.result_select(evt);
905
- return this.search_field.focus();
906
- }
907
- };
908
-
909
- Chosen.prototype.search_results_mouseover = function(evt) {
910
- var target;
911
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
912
- if (target) {
913
- return this.result_do_highlight(target);
914
- }
915
- };
916
-
917
- Chosen.prototype.search_results_mouseout = function(evt) {
918
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
919
- return this.result_clear_highlight();
920
- }
921
- };
922
-
923
- Chosen.prototype.choice_build = function(item) {
924
- var choice, close_link,
925
- _this = this;
926
- choice = $('<li />', {
927
- "class": "search-choice"
928
- }).html("<span>" + item.html + "</span>");
929
- if (item.disabled) {
930
- choice.addClass('search-choice-disabled');
931
- } else {
932
- close_link = $('<a />', {
933
- "class": 'search-choice-close',
934
- 'data-option-array-index': item.array_index
935
- });
936
- close_link.bind('click.chosen', function(evt) {
937
- return _this.choice_destroy_link_click(evt);
938
- });
939
- choice.append(close_link);
940
- }
941
- return this.search_container.before(choice);
942
- };
943
-
944
- Chosen.prototype.choice_destroy_link_click = function(evt) {
945
- evt.preventDefault();
946
- evt.stopPropagation();
947
- if (!this.is_disabled) {
948
- return this.choice_destroy($(evt.target));
949
- }
950
- };
951
-
952
- Chosen.prototype.choice_destroy = function(link) {
953
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
954
- this.show_search_field_default();
955
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
956
- this.results_hide();
957
- }
958
- link.parents('li').first().remove();
959
- return this.search_field_scale();
960
- }
961
- };
962
-
963
- Chosen.prototype.results_reset = function() {
964
- this.reset_single_select_options();
965
- this.form_field.options[0].selected = true;
966
- this.single_set_selected_text();
967
- this.show_search_field_default();
968
- this.results_reset_cleanup();
969
- this.form_field_jq.trigger("change");
970
- if (this.active_field) {
971
- return this.results_hide();
972
- }
973
- };
974
-
975
- Chosen.prototype.results_reset_cleanup = function() {
976
- this.current_selectedIndex = this.form_field.selectedIndex;
977
- return this.selected_item.find("abbr").remove();
978
- };
979
-
980
- Chosen.prototype.result_select = function(evt) {
981
- var high, item;
982
- if (this.result_highlight) {
983
- high = this.result_highlight;
984
- this.result_clear_highlight();
985
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
986
- this.form_field_jq.trigger("chosen:maxselected", {
987
- chosen: this
988
- });
989
- return false;
990
- }
991
- if (this.is_multiple) {
992
- high.removeClass("active-result");
993
- } else {
994
- this.reset_single_select_options();
995
- }
996
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
997
- item.selected = true;
998
- this.form_field.options[item.options_index].selected = true;
999
- this.selected_option_count = null;
1000
- if (this.is_multiple) {
1001
- this.choice_build(item);
1002
- } else {
1003
- this.single_set_selected_text(item.text);
1004
- }
1005
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1006
- this.results_hide();
1007
- }
1008
- this.search_field.val("");
1009
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1010
- this.form_field_jq.trigger("change", {
1011
- 'selected': this.form_field.options[item.options_index].value
1012
- });
1013
- }
1014
- this.current_selectedIndex = this.form_field.selectedIndex;
1015
- return this.search_field_scale();
1016
- }
1017
- };
1018
-
1019
- Chosen.prototype.single_set_selected_text = function(text) {
1020
- if (text == null) {
1021
- text = this.default_text;
1022
- }
1023
- if (text === this.default_text) {
1024
- this.selected_item.addClass("chosen-default");
1025
- } else {
1026
- this.single_deselect_control_build();
1027
- this.selected_item.removeClass("chosen-default");
1028
- }
1029
- return this.selected_item.find("span").text(text);
1030
- };
1031
-
1032
- Chosen.prototype.result_deselect = function(pos) {
1033
- var result_data;
1034
- result_data = this.results_data[pos];
1035
- if (!this.form_field.options[result_data.options_index].disabled) {
1036
- result_data.selected = false;
1037
- this.form_field.options[result_data.options_index].selected = false;
1038
- this.selected_option_count = null;
1039
- this.result_clear_highlight();
1040
- if (this.results_showing) {
1041
- this.winnow_results();
1042
- }
1043
- this.form_field_jq.trigger("change", {
1044
- deselected: this.form_field.options[result_data.options_index].value
1045
- });
1046
- this.search_field_scale();
1047
- return true;
1048
- } else {
1049
- return false;
1050
- }
1051
- };
1052
-
1053
- Chosen.prototype.single_deselect_control_build = function() {
1054
- if (!this.allow_single_deselect) {
1055
- return;
1056
- }
1057
- if (!this.selected_item.find("abbr").length) {
1058
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1059
- }
1060
- return this.selected_item.addClass("chosen-single-with-deselect");
1061
- };
1062
-
1063
- Chosen.prototype.get_search_text = function() {
1064
- if (this.search_field.val() === this.default_text) {
1065
- return "";
1066
- } else {
1067
- return $('<div/>').text($.trim(this.search_field.val())).html();
1068
- }
1069
- };
1070
-
1071
- Chosen.prototype.winnow_results_set_highlight = function() {
1072
- var do_high, selected_results;
1073
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1074
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1075
- if (do_high != null) {
1076
- return this.result_do_highlight(do_high);
1077
- }
1078
- };
1079
-
1080
- Chosen.prototype.no_results = function(terms) {
1081
- var no_results_html;
1082
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1083
- no_results_html.find("span").first().html(terms);
1084
- this.search_results.append(no_results_html);
1085
- return this.form_field_jq.trigger("chosen:no_results", {
1086
- chosen: this
1087
- });
1088
- };
1089
-
1090
- Chosen.prototype.no_results_clear = function() {
1091
- return this.search_results.find(".no-results").remove();
1092
- };
1093
-
1094
- Chosen.prototype.keydown_arrow = function() {
1095
- var next_sib;
1096
- if (this.results_showing && this.result_highlight) {
1097
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1098
- if (next_sib) {
1099
- return this.result_do_highlight(next_sib);
1100
- }
1101
- } else {
1102
- return this.results_show();
1103
- }
1104
- };
1105
-
1106
- Chosen.prototype.keyup_arrow = function() {
1107
- var prev_sibs;
1108
- if (!this.results_showing && !this.is_multiple) {
1109
- return this.results_show();
1110
- } else if (this.result_highlight) {
1111
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1112
- if (prev_sibs.length) {
1113
- return this.result_do_highlight(prev_sibs.first());
1114
- } else {
1115
- if (this.choices_count() > 0) {
1116
- this.results_hide();
1117
- }
1118
- return this.result_clear_highlight();
1119
- }
1120
- }
1121
- };
1122
-
1123
- Chosen.prototype.keydown_backstroke = function() {
1124
- var next_available_destroy;
1125
- if (this.pending_backstroke) {
1126
- this.choice_destroy(this.pending_backstroke.find("a").first());
1127
- return this.clear_backstroke();
1128
- } else {
1129
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1130
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1131
- this.pending_backstroke = next_available_destroy;
1132
- if (this.single_backstroke_delete) {
1133
- return this.keydown_backstroke();
1134
- } else {
1135
- return this.pending_backstroke.addClass("search-choice-focus");
1136
- }
1137
- }
1138
- }
1139
- };
1140
-
1141
- Chosen.prototype.clear_backstroke = function() {
1142
- if (this.pending_backstroke) {
1143
- this.pending_backstroke.removeClass("search-choice-focus");
1144
- }
1145
- return this.pending_backstroke = null;
1146
- };
1147
-
1148
- Chosen.prototype.keydown_checker = function(evt) {
1149
- var stroke, _ref1;
1150
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1151
- this.search_field_scale();
1152
- if (stroke !== 8 && this.pending_backstroke) {
1153
- this.clear_backstroke();
1154
- }
1155
- switch (stroke) {
1156
- case 8:
1157
- this.backstroke_length = this.search_field.val().length;
1158
- break;
1159
- case 9:
1160
- if (this.results_showing && !this.is_multiple) {
1161
- this.result_select(evt);
1162
- }
1163
- this.mouse_on_container = false;
1164
- break;
1165
- case 13:
1166
- evt.preventDefault();
1167
- break;
1168
- case 38:
1169
- evt.preventDefault();
1170
- this.keyup_arrow();
1171
- break;
1172
- case 40:
1173
- evt.preventDefault();
1174
- this.keydown_arrow();
1175
- break;
1176
- }
1177
- };
1178
-
1179
- Chosen.prototype.search_field_scale = function() {
1180
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1181
- if (this.is_multiple) {
1182
- h = 0;
1183
- w = 0;
1184
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1185
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1186
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1187
- style = styles[_i];
1188
- style_block += style + ":" + this.search_field.css(style) + ";";
1189
- }
1190
- div = $('<div />', {
1191
- 'style': style_block
1192
- });
1193
- div.text(this.search_field.val());
1194
- $('body').append(div);
1195
- w = div.width() + 25;
1196
- div.remove();
1197
- f_width = this.container.outerWidth();
1198
- if (w > f_width - 10) {
1199
- w = f_width - 10;
1200
- }
1201
- return this.search_field.css({
1202
- 'width': w + 'px'
1203
- });
1204
- }
1205
- };
1206
-
1207
- return Chosen;
1208
-
1209
- })(AbstractChosen);
1210
-
1211
- }).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/icegram.js CHANGED
@@ -10,6 +10,9 @@
10
  }
11
 
12
  Icegram.prototype.init = function ( data ) {
 
 
 
13
  this.data = data;
14
  this.defaults = jQuery.extend( {}, data.defaults );
15
  this.message_data = data.messages;
@@ -51,6 +54,9 @@
51
  window.icegram.submit_tracking_data();
52
  }
53
  } );
 
 
 
54
  };
55
 
56
 
@@ -108,6 +114,7 @@
108
  //Event tracking
109
  Icegram.prototype.track = function ( ev, params ) {
110
  if (typeof(params) === 'object' && params.hasOwnProperty('message_id') && params.hasOwnProperty('campaign_id')) {
 
111
  this.tracking_data.push( { 'type': ev, 'params': params} );
112
  }
113
  }
@@ -174,19 +181,35 @@
174
  }
175
 
176
  // Hide elements if insufficient data...
177
- if(this.data.headline == '') {
178
  this.el.find('.ig_headline').hide();
179
  }
180
- if(this.data.icon == '') {
181
  this.el.find('.ig_icon').hide();
182
  }
183
- if(this.data.message == '') {
184
  this.el.find('.ig_message').hide();
185
  }
186
- if(this.data.label == '') {
187
  this.el.find('.ig_button').hide();
188
  }
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  this.post_render();
191
 
192
  // Hide the message by default
@@ -276,7 +299,6 @@
276
  }
277
  };
278
 
279
-
280
  Icegram_Message_Type.prototype.is_visible = function ( ) {
281
  return this.el.is(':visible');
282
  };
@@ -298,8 +320,11 @@
298
  e.data.self.hide();
299
  return;
300
  }
301
- // Any other click is considered as CTA click
302
- e.data.self.on_cta_click( e );
 
 
 
303
  };
304
  Icegram_Message_Type.prototype.on_resize = function ( e ) {
305
 
@@ -311,6 +336,13 @@
311
  typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
312
  };
313
 
 
 
 
 
 
 
 
314
 
315
 
316
  /**
10
  }
11
 
12
  Icegram.prototype.init = function ( data ) {
13
+ // Pre-init - can allow others to modify message data
14
+ jQuery( window ).trigger( 'preinit.icegram', [ data ] );
15
+
16
  this.data = data;
17
  this.defaults = jQuery.extend( {}, data.defaults );
18
  this.message_data = data.messages;
54
  window.icegram.submit_tracking_data();
55
  }
56
  } );
57
+
58
+ // Trigger event for others!
59
+ jQuery( window ).trigger( 'init.icegram', [ this ] );
60
  };
61
 
62
 
114
  //Event tracking
115
  Icegram.prototype.track = function ( ev, params ) {
116
  if (typeof(params) === 'object' && params.hasOwnProperty('message_id') && params.hasOwnProperty('campaign_id')) {
117
+ jQuery( window ).trigger( 'track.icegram', [ ev, params ] );
118
  this.tracking_data.push( { 'type': ev, 'params': params} );
119
  }
120
  }
181
  }
182
 
183
  // Hide elements if insufficient data...
184
+ if(this.data.headline == undefined || this.data.headline == '') {
185
  this.el.find('.ig_headline').hide();
186
  }
187
+ if(this.data.icon == undefined || this.data.icon == '') {
188
  this.el.find('.ig_icon').hide();
189
  }
190
+ if(this.data.message == undefined || this.data.message == '') {
191
  this.el.find('.ig_message').hide();
192
  }
193
+ if(this.data.label == undefined || this.data.label == '') {
194
  this.el.find('.ig_button').hide();
195
  }
196
 
197
+ // Apply colors if available
198
+ if (this.data.text_color != undefined && this.data.text_color != '') {
199
+ this.el.css('color', this.data.text_color);
200
+ this.el.find('.ig_content').css('color', this.data.text_color);
201
+ }
202
+
203
+ if (this.data.bg_color != undefined && this.data.bg_color != '') {
204
+ this.el.css('background-color', this.data.bg_color);
205
+ this.el.find('.ig_content').css('background-color', this.data.bg_color);
206
+ }
207
+
208
+ // Hint clickability for buttons / ctas
209
+ if (typeof(this.data.link) === 'string' && this.data.link != '') {
210
+ this.el.parent().find('.ig_cta, .ig_button').css('cursor', 'pointer');
211
+ }
212
+
213
  this.post_render();
214
 
215
  // Hide the message by default
299
  }
300
  };
301
 
 
302
  Icegram_Message_Type.prototype.is_visible = function ( ) {
303
  return this.el.is(':visible');
304
  };
320
  e.data.self.hide();
321
  return;
322
  }
323
+ // Clicking on ig_button or any other link with a class ig_cta will trigger cta click
324
+ if(jQuery(e.target).filter('.ig_button, .ig_cta').length || jQuery(e.target).parents('.ig_button, .ig_cta').length){
325
+ e.data.self.on_cta_click( e );
326
+ }
327
+
328
  };
329
  Icegram_Message_Type.prototype.on_resize = function ( e ) {
330
 
336
  typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
337
  };
338
 
339
+ Icegram_Message_Type.prototype.on_cta_click_no_hide = function ( e ) {
340
+ e.data = e.data || { self: this };
341
+ e.data.self.track( 'clicked' );
342
+ if (typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '') {
343
+ window.location.href = e.data.self.data.link;
344
+ }
345
+ };
346
 
347
 
348
  /**
assets/js/jquery.tipTip.js DELETED
@@ -1,191 +0,0 @@
1
- /*
2
- * TipTip
3
- * Copyright 2010 Drew Wilson
4
- * www.drewwilson.com
5
- * code.drewwilson.com/entry/tiptip-jquery-plugin
6
- *
7
- * Version 1.3 - Updated: Mar. 23, 2010
8
- *
9
- * This Plug-In will create a custom tooltip to replace the default
10
- * browser tooltip. It is extremely lightweight and very smart in
11
- * that it detects the edges of the browser window and will make sure
12
- * the tooltip stays within the current window size. As a result the
13
- * tooltip will adjust itself to be displayed above, below, to the left
14
- * or to the right depending on what is necessary to stay within the
15
- * browser window. It is completely customizable as well via CSS.
16
- *
17
- * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
18
- * http://www.opensource.org/licenses/mit-license.php
19
- * http://www.gnu.org/licenses/gpl.html
20
- */
21
-
22
- (function($){
23
- $.fn.tipTip = function(options) {
24
- var defaults = {
25
- activation: "hover",
26
- keepAlive: false,
27
- maxWidth: "200px",
28
- edgeOffset: 3,
29
- defaultPosition: "bottom",
30
- delay: 400,
31
- fadeIn: 200,
32
- fadeOut: 200,
33
- attribute: "title",
34
- content: false, // HTML or String to fill TipTIp with
35
- enter: function(){},
36
- exit: function(){}
37
- };
38
- var opts = $.extend(defaults, options);
39
-
40
- // Setup tip tip elements and render them to the DOM
41
- if($("#tiptip_holder").length <= 0){
42
- var tiptip_holder = $('<div id="tiptip_holder" style="max-width:'+ opts.maxWidth +';"></div>');
43
- var tiptip_content = $('<div id="tiptip_content"></div>');
44
- var tiptip_arrow = $('<div id="tiptip_arrow"></div>');
45
- $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));
46
- } else {
47
- var tiptip_holder = $("#tiptip_holder");
48
- var tiptip_content = $("#tiptip_content");
49
- var tiptip_arrow = $("#tiptip_arrow");
50
- }
51
-
52
- return this.each(function(){
53
- var org_elem = $(this);
54
- if(opts.content){
55
- var org_title = opts.content;
56
- } else {
57
- var org_title = org_elem.attr(opts.attribute);
58
- }
59
- if(org_title != ""){
60
- if(!opts.content){
61
- org_elem.removeAttr(opts.attribute); //remove original Attribute
62
- }
63
- var timeout = false;
64
-
65
- if(opts.activation == "hover"){
66
- org_elem.hover(function(){
67
- active_tiptip();
68
- }, function(){
69
- if(!opts.keepAlive){
70
- deactive_tiptip();
71
- }
72
- });
73
- if(opts.keepAlive){
74
- tiptip_holder.hover(function(){}, function(){
75
- deactive_tiptip();
76
- });
77
- }
78
- } else if(opts.activation == "focus"){
79
- org_elem.focus(function(){
80
- active_tiptip();
81
- }).blur(function(){
82
- deactive_tiptip();
83
- });
84
- } else if(opts.activation == "click"){
85
- org_elem.click(function(){
86
- active_tiptip();
87
- return false;
88
- }).hover(function(){},function(){
89
- if(!opts.keepAlive){
90
- deactive_tiptip();
91
- }
92
- });
93
- if(opts.keepAlive){
94
- tiptip_holder.hover(function(){}, function(){
95
- deactive_tiptip();
96
- });
97
- }
98
- }
99
-
100
- function active_tiptip(){
101
- opts.enter.call(this);
102
- tiptip_content.html(org_title);
103
- tiptip_holder.hide().removeAttr("class").css("margin","0");
104
- tiptip_arrow.removeAttr("style");
105
-
106
- var top = parseInt(org_elem.offset()['top']);
107
- var left = parseInt(org_elem.offset()['left']);
108
- var org_width = parseInt(org_elem.outerWidth());
109
- var org_height = parseInt(org_elem.outerHeight());
110
- var tip_w = tiptip_holder.outerWidth();
111
- var tip_h = tiptip_holder.outerHeight();
112
- var w_compare = Math.round((org_width - tip_w) / 2);
113
- var h_compare = Math.round((org_height - tip_h) / 2);
114
- var marg_left = Math.round(left + w_compare);
115
- var marg_top = Math.round(top + org_height + opts.edgeOffset);
116
- var t_class = "";
117
- var arrow_top = "";
118
- var arrow_left = Math.round(tip_w - 12) / 2;
119
-
120
- if(opts.defaultPosition == "bottom"){
121
- t_class = "_bottom";
122
- } else if(opts.defaultPosition == "top"){
123
- t_class = "_top";
124
- } else if(opts.defaultPosition == "left"){
125
- t_class = "_left";
126
- } else if(opts.defaultPosition == "right"){
127
- t_class = "_right";
128
- }
129
-
130
- var right_compare = (w_compare + left) < parseInt($(window).scrollLeft());
131
- var left_compare = (tip_w + left) > parseInt($(window).width());
132
-
133
- if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){
134
- t_class = "_right";
135
- arrow_top = Math.round(tip_h - 13) / 2;
136
- arrow_left = -12;
137
- marg_left = Math.round(left + org_width + opts.edgeOffset);
138
- marg_top = Math.round(top + h_compare);
139
- } else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){
140
- t_class = "_left";
141
- arrow_top = Math.round(tip_h - 13) / 2;
142
- arrow_left = Math.round(tip_w);
143
- marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5));
144
- marg_top = Math.round(top + h_compare);
145
- }
146
-
147
- var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop());
148
- var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0;
149
-
150
- if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){
151
- if(t_class == "_top" || t_class == "_bottom"){
152
- t_class = "_top";
153
- } else {
154
- t_class = t_class+"_top";
155
- }
156
- arrow_top = tip_h;
157
- marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset));
158
- } else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){
159
- if(t_class == "_top" || t_class == "_bottom"){
160
- t_class = "_bottom";
161
- } else {
162
- t_class = t_class+"_bottom";
163
- }
164
- arrow_top = -12;
165
- marg_top = Math.round(top + org_height + opts.edgeOffset);
166
- }
167
-
168
- if(t_class == "_right_top" || t_class == "_left_top"){
169
- marg_top = marg_top + 5;
170
- } else if(t_class == "_right_bottom" || t_class == "_left_bottom"){
171
- marg_top = marg_top - 5;
172
- }
173
- if(t_class == "_left_top" || t_class == "_left_bottom"){
174
- marg_left = marg_left + 5;
175
- }
176
- tiptip_arrow.css({"margin-left": arrow_left+"px", "margin-top": arrow_top+"px"});
177
- tiptip_holder.css({"margin-left": marg_left+"px", "margin-top": marg_top+"px"}).attr("class","tip"+t_class);
178
-
179
- if (timeout){ clearTimeout(timeout); }
180
- timeout = setTimeout(function(){ tiptip_holder.stop(true,true).fadeIn(opts.fadeIn); }, opts.delay);
181
- }
182
-
183
- function deactive_tiptip(){
184
- opts.exit.call(this);
185
- if (timeout){ clearTimeout(timeout); }
186
- tiptip_holder.fadeOut(opts.fadeOut);
187
- }
188
- }
189
- });
190
- }
191
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class-icegram-campaign-admin.php CHANGED
@@ -32,7 +32,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
32
 
33
  // Initialize campaign metabox
34
  function add_campaigns_metaboxes() {
35
- $meta_box_title = '<label class="options_header" for="icegram_messages">' . __( 'Message', 'icegram' ) . '</label>';
36
  add_meta_box( 'campaign_data', $meta_box_title, array( &$this, 'campaign_data_content' ), 'ig_campaign', 'normal', 'high' );
37
  add_meta_box( 'campaign_target_rules', __( 'Targeting Rules', 'icegram' ), array( &$this, 'campaign_target_rules_content' ), 'ig_campaign', 'normal' );
38
  }
@@ -71,8 +71,8 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
71
  foreach ( $messages as $row => $message ) {
72
  $message_title = get_the_title( $message['id'] );
73
  $message_data = get_post_meta( $message['id'], 'icegram_message_data', true );
74
- $messsage_type = ( !empty( $message_data['type'] ) ) ? $message_data['type'] : '';
75
- if ( empty( $icegram->message_types[ $messsage_type ] ) ) continue;
76
  ?>
77
  <tr class="form-field message-row" value="<?php echo $message['id']; ?>">
78
  <td class="message_header">
@@ -84,7 +84,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
84
  </td>
85
  <td class="message_seconds">
86
  <input type="hidden" name="messages[<?php echo $row; ?>][id]" value="<?php echo $message['id']; ?>" />
87
- <input type="number" class="seconds-text" name="messages[<?php echo $row; ?>][time]" min="0" value="<?php echo ( !empty( $message['time'] ) ) ? $message['time'] : 0; ?>" size="3" />
88
  <?php _e( ' sec', 'icegram' )?>
89
  </td>
90
  <td class="action_links">
@@ -197,10 +197,10 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
197
  <?php _e( 'Schedule', 'icegram' ); ?>
198
  <span class="form-field" id="date_picker" <?php echo ( !empty( $campaign_target_rules['when'] ) && $campaign_target_rules['when'] == 'schedule' ) ? '' : 'style="display: none;"'; ?>>
199
  <label class="date_picker">
200
- <input type="text" class="date-picker" name="campaign_target_rules[from]" value="<?php echo ( !empty( $campaign_target_rules['from'] ) ) ? $campaign_target_rules['from'] : ''; ?>" placeholder="<?php _e( 'From&hellip;', 'icegram' );?>" />
201
  </label>
202
  <label class="date_picker">
203
- <input type="text" class="date-picker" name="campaign_target_rules[to]" value="<?php echo ( !empty( $campaign_target_rules['to'] ) ) ? $campaign_target_rules['to'] : ''; ?>" placeholder="<?php _e( 'To&hellip;', 'icegram' );?>" />
204
  </label>
205
  </span>
206
  </label>
@@ -323,8 +323,8 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
323
 
324
  $message_title = get_the_title( $post );
325
  $message_data = get_post_meta( $post, 'icegram_message_data', true );
326
- $messsage_type = ( !empty( $icegram->message_types[ $message_data['type'] ]['type'] ) ) ? $icegram->message_types[ $message_data['type'] ]['type'] : '';
327
- $found_messages[ $post ] = $messsage_type . ' &mdash; ' . $message_title;
328
 
329
  }
330
  $found_messages[''] = __( '- - - - - - - - - - - - - - - - - - - - - - - - - -', 'icegram' );
@@ -399,7 +399,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
399
  <tr id="message_row_<?php echo $message_id; ?>" class="message-edit-row">
400
  <td colspan="4">
401
  <?php
402
- $ig_message_admin->message_form_fields( '', array( 'messsage_type' => $message_type, 'message_id' => $message_id, 'new_message_row' => true ) );
403
  ?>
404
  </td>
405
  </tr>
@@ -439,7 +439,12 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
439
  update_post_meta( $post_id, 'messages', array_values( $_POST['messages'] ) );
440
  update_post_meta( $post_id, 'campaign_preview', array_values( $_POST['messages'] ) );
441
 
442
- foreach ( $_POST['message_data'] as $message_id => $message_data ) {
 
 
 
 
 
443
 
444
  $type = $message_data['type'];
445
  if( isset( $message_data['theme'][$type] ) ) {
@@ -457,6 +462,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
457
  } elseif( isset( $message_data['position']['ig_default'] ) ) {
458
  $message_data['position'] = $message_data['position']['ig_default'];
459
  }
 
460
  update_post_meta( $message_id, 'icegram_message_data', $message_data );
461
  update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
462
  wp_update_post( array ( 'ID' => $message_id,
@@ -465,9 +471,8 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
465
  'post_title' => empty( $message_data['post_title'] ) ? $message_data['headline']: $message_data['post_title']
466
  ) );
467
  }
468
-
469
  }
470
-
471
  }
472
 
473
  // On preview button click save campaign messages list
32
 
33
  // Initialize campaign metabox
34
  function add_campaigns_metaboxes() {
35
+ $meta_box_title = __( 'Message', 'icegram' );
36
  add_meta_box( 'campaign_data', $meta_box_title, array( &$this, 'campaign_data_content' ), 'ig_campaign', 'normal', 'high' );
37
  add_meta_box( 'campaign_target_rules', __( 'Targeting Rules', 'icegram' ), array( &$this, 'campaign_target_rules_content' ), 'ig_campaign', 'normal' );
38
  }
71
  foreach ( $messages as $row => $message ) {
72
  $message_title = get_the_title( $message['id'] );
73
  $message_data = get_post_meta( $message['id'], 'icegram_message_data', true );
74
+ $message_type = ( !empty( $message_data['type'] ) ) ? $message_data['type'] : '';
75
+ if ( empty( $icegram->message_types[ $message_type ] ) ) continue;
76
  ?>
77
  <tr class="form-field message-row" value="<?php echo $message['id']; ?>">
78
  <td class="message_header">
84
  </td>
85
  <td class="message_seconds">
86
  <input type="hidden" name="messages[<?php echo $row; ?>][id]" value="<?php echo $message['id']; ?>" />
87
+ <input type="number" class="seconds-text" name="messages[<?php echo $row; ?>][time]" min="-1" value="<?php echo ( !empty( $message['time'] ) ) ? $message['time'] : 0; ?>" size="3" />
88
  <?php _e( ' sec', 'icegram' )?>
89
  </td>
90
  <td class="action_links">
197
  <?php _e( 'Schedule', 'icegram' ); ?>
198
  <span class="form-field" id="date_picker" <?php echo ( !empty( $campaign_target_rules['when'] ) && $campaign_target_rules['when'] == 'schedule' ) ? '' : 'style="display: none;"'; ?>>
199
  <label class="date_picker">
200
+ <input type="text" class="date-picker" name="campaign_target_rules[from]" value="<?php echo ( !empty( $campaign_target_rules['from'] ) ) ? esc_attr( $campaign_target_rules['from'] ) : ''; ?>" placeholder="<?php _e( 'From&hellip;', 'icegram' );?>" />
201
  </label>
202
  <label class="date_picker">
203
+ <input type="text" class="date-picker" name="campaign_target_rules[to]" value="<?php echo ( !empty( $campaign_target_rules['to'] ) ) ? esc_attr( $campaign_target_rules['to'] ) : ''; ?>" placeholder="<?php _e( 'To&hellip;', 'icegram' );?>" />
204
  </label>
205
  </span>
206
  </label>
323
 
324
  $message_title = get_the_title( $post );
325
  $message_data = get_post_meta( $post, 'icegram_message_data', true );
326
+ $message_type = ( !empty( $icegram->message_types[ $message_data['type'] ]['type'] ) ) ? $icegram->message_types[ $message_data['type'] ]['type'] : '';
327
+ $found_messages[ $post ] = $message_type . ' &mdash; ' . $message_title;
328
 
329
  }
330
  $found_messages[''] = __( '- - - - - - - - - - - - - - - - - - - - - - - - - -', 'icegram' );
399
  <tr id="message_row_<?php echo $message_id; ?>" class="message-edit-row">
400
  <td colspan="4">
401
  <?php
402
+ $ig_message_admin->message_form_fields( '', array( 'message_type' => $message_type, 'message_id' => $message_id, 'new_message_row' => true ) );
403
  ?>
404
  </td>
405
  </tr>
439
  update_post_meta( $post_id, 'messages', array_values( $_POST['messages'] ) );
440
  update_post_meta( $post_id, 'campaign_preview', array_values( $_POST['messages'] ) );
441
 
442
+ // Saving $_POST to temp var before updating messages
443
+ // to avoid problems with action handlers that rely on
444
+ // $_POST vars - e.g. WPML!!
445
+ $old_post = $_POST;
446
+ $_POST = array();
447
+ foreach ( $old_post['message_data'] as $message_id => $message_data ) {
448
 
449
  $type = $message_data['type'];
450
  if( isset( $message_data['theme'][$type] ) ) {
462
  } elseif( isset( $message_data['position']['ig_default'] ) ) {
463
  $message_data['position'] = $message_data['position']['ig_default'];
464
  }
465
+
466
  update_post_meta( $message_id, 'icegram_message_data', $message_data );
467
  update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
468
  wp_update_post( array ( 'ID' => $message_id,
471
  'post_title' => empty( $message_data['post_title'] ) ? $message_data['headline']: $message_data['post_title']
472
  ) );
473
  }
474
+ $_POST = $old_post;
475
  }
 
476
  }
477
 
478
  // On preview button click save campaign messages list
classes/class-icegram-message-admin.php CHANGED
@@ -142,7 +142,10 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
142
  <strong><?php _e( 'Headline', 'icegram' ); ?></strong>
143
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Shown with highest prominence. Click on idea button on right to get a new headline.', 'icegram' ); ?>"></span>
144
  </label>
145
- <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][headline]" id="message_title" value="<?php echo ( isset( $message_data['headline'] ) ) ? $message_data['headline'] : $default_message_title; ?>" data-headline="<?php echo $message_title_key; ?>" />
 
 
 
146
  <a class="button message_headline_button tips" data-tip="<?php _e( 'Give Me Another Headline', 'icegram' ); ?>">
147
  <span class="headline-buttons-icon admin_field_icon"></span>
148
  </a>
@@ -152,21 +155,21 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
152
  <strong><?php _e( 'Button Label', 'icegram' ); ?></strong>
153
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Your call to action text. Something unusual will increase conversions.', 'icegram' ); ?>"></span>
154
  </label>
155
- <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][label]" id="message_label" value="<?php if( isset( $message_data['label'] ) ) echo $message_data['label']; ?>" />
156
  </p>
157
  <p class="message_row <?php echo implode( ' ', $settings['link'] )?>">
158
  <label for="message_link" class="message_label">
159
  <strong><?php _e( 'Target Link', 'icegram' ); ?></strong>
160
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Enter destination URL here. Clicking will redirect to this link.', 'icegram' ); ?>"></span>
161
  </label>
162
- <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][link]" id="message_link" value="<?php if( isset( $message_data['link'] ) ) echo $message_data['link']; ?>" />
163
  </p>
164
  <p class="message_row <?php echo implode( ' ', $settings['icon'] )?>">
165
  <label for="upload_image" class="message_label">
166
  <strong><?php _e( 'Icon / Avatar Image', 'icegram' ); ?></strong>
167
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'This image will appear in message content.', 'icegram' ); ?>"></span>
168
  </label>
169
- <input id="upload_image" type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][icon]" value="<?php if( isset( $message_data['icon'] ) ) echo $message_data['icon']; ?>"/>
170
  <a class="button message_image_button tips" data-tip="<?php _e( 'Upload / Select an image', 'icegram' ); ?>" onclick="tb_show('<?php _e( 'Upload / Select Image' ); ?>', 'media-upload.php?type=image&TB_iframe=true', false);" >
171
  <span class="image-buttons-icon admin_field_icon"></span>
172
  </a>
@@ -261,10 +264,15 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
261
  } else {
262
 
263
  ?>
 
 
 
264
  <span class="shortcode_description admin_field_icon"></span>
265
  <?php
266
- echo sprintf(__( 'You can insert <code>[%s]</code> wherever you want to show this message. We recommend running a campaign though.', 'icegram' ), 'icegram messages="' .$post->ID . '"' );
267
-
 
 
268
  }
269
 
270
  }
@@ -357,7 +365,7 @@ if ( !class_exists( 'Icegram_Message_Admin' ) ) {
357
  }
358
  $type = ucwords( str_replace( "-", ' ', $message_data['type'] ) );
359
  $theme = ucwords( str_replace( "-", ' ', $message_data['theme'] ) );
360
- $bg_img = $icegram->message_types[$message_data['type']]['baseurl'] . "/themes/" . $message_data['theme'] . ".png";
361
 
362
  switch ($column) {
363
  case 'message_type':
142
  <strong><?php _e( 'Headline', 'icegram' ); ?></strong>
143
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Shown with highest prominence. Click on idea button on right to get a new headline.', 'icegram' ); ?>"></span>
144
  </label>
145
+ <?php
146
+ $message_headline = ( isset( $message_data['headline'] ) ) ? $message_data['headline'] : $default_message_title;
147
+ ?>
148
+ <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][headline]" id="message_title" value="<?php echo esc_attr( $message_headline ); ?>" data-headline="<?php echo $message_title_key; ?>" />
149
  <a class="button message_headline_button tips" data-tip="<?php _e( 'Give Me Another Headline', 'icegram' ); ?>">
150
  <span class="headline-buttons-icon admin_field_icon"></span>
151
  </a>
155
  <strong><?php _e( 'Button Label', 'icegram' ); ?></strong>
156
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Your call to action text. Something unusual will increase conversions.', 'icegram' ); ?>"></span>
157
  </label>
158
+ <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][label]" id="message_label" value="<?php if( isset( $message_data['label'] ) ) echo esc_attr( $message_data['label'] ); ?>" />
159
  </p>
160
  <p class="message_row <?php echo implode( ' ', $settings['link'] )?>">
161
  <label for="message_link" class="message_label">
162
  <strong><?php _e( 'Target Link', 'icegram' ); ?></strong>
163
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Enter destination URL here. Clicking will redirect to this link.', 'icegram' ); ?>"></span>
164
  </label>
165
+ <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][link]" id="message_link" value="<?php if( isset( $message_data['link'] ) ) echo esc_attr( $message_data['link'] ); ?>" />
166
  </p>
167
  <p class="message_row <?php echo implode( ' ', $settings['icon'] )?>">
168
  <label for="upload_image" class="message_label">
169
  <strong><?php _e( 'Icon / Avatar Image', 'icegram' ); ?></strong>
170
  <span class="help_tip admin_field_icon" data-tip="<?php _e( 'This image will appear in message content.', 'icegram' ); ?>"></span>
171
  </label>
172
+ <input id="upload_image" type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][icon]" value="<?php if( isset( $message_data['icon'] ) ) echo esc_attr( $message_data['icon'] ); ?>"/>
173
  <a class="button message_image_button tips" data-tip="<?php _e( 'Upload / Select an image', 'icegram' ); ?>" onclick="tb_show('<?php _e( 'Upload / Select Image' ); ?>', 'media-upload.php?type=image&TB_iframe=true', false);" >
174
  <span class="image-buttons-icon admin_field_icon"></span>
175
  </a>
264
  } else {
265
 
266
  ?>
267
+ <p class="message_row">
268
+ <label class="message_label">&nbsp;</label>
269
+ <span>
270
  <span class="shortcode_description admin_field_icon"></span>
271
  <?php
272
+ echo sprintf(__( 'You may add <code>[%s]</code> where you want to show this message.', 'icegram' ), 'icegram messages="' .$post->ID . '"' );
273
+ ?>
274
+ </span></p>
275
+ <?php
276
  }
277
 
278
  }
365
  }
366
  $type = ucwords( str_replace( "-", ' ', $message_data['type'] ) );
367
  $theme = ucwords( str_replace( "-", ' ', $message_data['theme'] ) );
368
+ $bg_img = $icegram->message_types[$message_data['type']]['baseurl'] . "themes/" . $message_data['theme'] . ".png";
369
 
370
  switch ($column) {
371
  case 'message_type':
icegram.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Icegram
4
  * Plugin URI: http://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
- * Version: 1.2
7
  * Author: Icegram
8
  * Author URI: http://www.icegram.com/
9
  *
@@ -33,7 +33,7 @@ class Icegram {
33
 
34
  function __construct() {
35
 
36
- $this->version = "1.2";
37
  $this->shortcode_instances = array();
38
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
39
  $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
@@ -53,6 +53,7 @@ class Icegram {
53
  add_action( 'icegram_about_changelog', array( &$this, 'klawoo_subscribe_form' ) );
54
  } else {
55
  add_action( 'wp_footer', array( &$this, 'display_messages' ) );
 
56
  add_action( 'wp_print_scripts', array( &$this, 'identify_current_page' ) );
57
  add_shortcode( 'icegram', array( &$this, 'execute_shortcode' ) );
58
  add_filter( 'icegram_branding_data', array( &$this , 'branding_data_remove' ), 10 );
@@ -227,12 +228,27 @@ class Icegram {
227
 
228
  $welcome_page_title = __( 'Welcome to Icegram', 'icegram' );
229
  $settings_page_title = __( 'Settings', 'icegram' );
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  $menu_title = __( 'Docs & Support', 'icegram' );
231
  $about = add_submenu_page( 'edit.php?post_type=ig_campaign', $welcome_page_title, $menu_title, 'manage_options', 'icegram-support', array( $this, 'about_screen' ) );
232
  $settings = add_submenu_page( 'edit.php?post_type=ig_campaign', $settings_page_title, $settings_page_title, 'manage_options', 'icegram-settings', array( $this, 'settings_screen' ) );
 
233
 
234
  add_action( 'admin_print_styles-'. $about, array( $this, 'admin_css' ) );
235
  add_action( 'admin_print_styles-'. $settings, array( $this, 'admin_css' ) );
 
236
 
237
  }
238
 
@@ -254,6 +270,28 @@ class Icegram {
254
  include ( 'settings.php' );
255
  }
256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  public function branding_data_remove( $icegram_branding_data ) {
258
  if( !empty( $icegram_branding_data ) && 'yes' != get_option('icegram_share_love', 'no') ) {
259
  $icegram_branding_data['powered_by_logo'] = '';
@@ -267,7 +305,6 @@ class Icegram {
267
  // And add a placeholder div
268
  // Display will happen in footer via display_messages()
269
  $i = count($this->shortcode_instances);
270
- //echo "Shortcode counter - {$i} - ";
271
  $this->shortcode_instances[ $i ] = shortcode_atts( array(
272
  'campaigns' => '',
273
  'messages' => '',
@@ -275,12 +312,23 @@ class Icegram {
275
  ), $atts );
276
  $html[] = "<div class='ig_shortcode_container' id='icegram_shortcode_{$i}'";
277
  foreach ($atts as $key => $value) {
 
278
  $html[] = " data-{$key}=\"".htmlentities($value)."\" ";
279
  }
280
  $html[] = " >"."</div>";
281
  return implode(" ", $html);
282
  }
283
 
 
 
 
 
 
 
 
 
 
 
284
  function display_messages() {
285
 
286
  $skip_others = $preview_mode = false;
@@ -300,7 +348,7 @@ class Icegram {
300
  }
301
 
302
  if( !empty( $_GET['campaign_preview_id'] ) && current_user_can( 'manage_options' ) ) {
303
- $campaign_ids[] = $_GET['campaign_preview_id'];
304
  $preview_mode = true;
305
  }
306
 
@@ -340,12 +388,24 @@ class Icegram {
340
 
341
  $types_shown[] = $message_data['type'];
342
 
 
343
  // Our own implementation so WP does not mess with script, style and pre tags
344
  add_filter('the_content', array( $this, 'before_wpautop' ) , 9);
345
  add_filter('the_content', array( $this, 'after_wpautop' ) , 11);
346
  $messages[$key]['message'] = apply_filters( 'the_content', $message_data['message'] );
347
  remove_filter('the_content', array( $this, 'before_wpautop' ) , 9);
348
  remove_filter('the_content', array( $this, 'after_wpautop' ) , 11);
 
 
 
 
 
 
 
 
 
 
 
349
  }
350
 
351
  if( empty( $messages ) )
@@ -494,17 +554,20 @@ class Icegram {
494
  if ( !empty( $message_ids ) && is_array( $message_ids ) ) {
495
  // For WPML compatibility
496
  if ( function_exists('icl_object_id') ) {
 
 
497
  foreach ($message_ids as $i=>$id ) {
498
- $message_ids[ $i ] = icl_object_id( $id, 'ig_message', true );
499
- }
500
  }
501
- $message_data_query .= " AND post_id IN ( " . implode( ',', $message_ids ) . " )";
502
- }
503
-
504
- $message_data_results = $wpdb->get_results( $message_data_query, 'ARRAY_A' );
505
- $message_data = array();
506
- foreach ( $message_data_results as $message_data_result ) {
507
- $message_data[$message_data_result['post_id']] = maybe_unserialize( $message_data_result['meta_value'] );
 
508
  }
509
  return $message_data;
510
  }
@@ -513,11 +576,14 @@ class Icegram {
513
 
514
  $valid_messages = $valid_campaigns = $message_campaign_map = array();
515
 
 
 
 
516
  if ( !empty( $campaign_ids ) ) {
517
  $valid_campaigns = $this->get_valid_campaigns( $campaign_ids, true );
518
  }
519
  // When skip_others is true, we won't load campaigns / messages from db
520
- if (!$skip_others) {
521
  $campaigns = $this->get_valid_campaigns();
522
  if (!empty($campaigns)) {
523
  foreach ($campaigns as $id => $campaign) {
@@ -527,7 +593,6 @@ class Icegram {
527
  }
528
  }
529
  }
530
-
531
  // Create a map to look up campaign id for a given message
532
  if( !empty( $valid_campaigns ) ) {
533
  foreach ($valid_campaigns as $id => $campaign) {
@@ -541,7 +606,7 @@ class Icegram {
541
  $message_campaign_map[ $msg['id'] ] = $id;
542
  }
543
  }
544
- }
545
  }
546
 
547
  // We don't display same message twice...
@@ -620,7 +685,7 @@ class Icegram {
620
  ";
621
  $sql_params[] = 's:8:"sitewide";s:3:"yes";';
622
  $sql_params[] = 's:10:"other_page";s:3:"yes";';
623
- $sql_params[] = 's:7:"page_id";a:1:{';
624
  $sql_params[] = serialize( (string) $pid );
625
 
626
  if (is_home() || is_front_page()) {
@@ -688,14 +753,14 @@ class Icegram {
688
  $args = array(
689
  'labels' => $labels,
690
  'menu_icon' => 'dashicons-info',
691
- 'public' => true,
692
- 'publicly_queryable' => true,
693
  'show_ui' => true,
694
  'show_in_menu' => true,
695
  'query_var' => true,
696
  'rewrite' => array( 'slug' => 'ig_campaign' ),
697
  'capability_type' => 'post',
698
- 'has_archive' => true,
699
  'hierarchical' => false,
700
  'menu_position' => null,
701
  'supports' => array( 'title', 'editor' )
@@ -724,14 +789,14 @@ class Icegram {
724
 
725
  $args = array(
726
  'labels' => $labels,
727
- 'public' => true,
728
- 'publicly_queryable' => true,
729
  'show_ui' => true,
730
  'show_in_menu' => 'edit.php?post_type=ig_campaign',
731
  'query_var' => true,
732
  'rewrite' => array( 'slug' => 'ig_message' ),
733
  'capability_type' => 'post',
734
- 'has_archive' => true,
735
  'hierarchical' => false,
736
  'menu_position' => null,
737
  'supports' => array( 'title' )
@@ -976,12 +1041,16 @@ class Icegram {
976
  }
977
 
978
  function identify_current_page() {
979
- global $post;
980
- if( is_object( $post ) && isset( $post->ID ) ) {
 
 
 
 
981
  $id = $post->ID;
982
- $id = apply_filters('icegram_identify_current_page', $id );
983
- self::$current_page_id = $id;
984
- }
985
  }
986
 
987
  static function get_current_page_id() {
3
  * Plugin Name: Icegram
4
  * Plugin URI: http://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 1.3
7
  * Author: Icegram
8
  * Author URI: http://www.icegram.com/
9
  *
33
 
34
  function __construct() {
35
 
36
+ $this->version = "1.3";
37
  $this->shortcode_instances = array();
38
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
39
  $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
53
  add_action( 'icegram_about_changelog', array( &$this, 'klawoo_subscribe_form' ) );
54
  } else {
55
  add_action( 'wp_footer', array( &$this, 'display_messages' ) );
56
+ //add_action( 'wp_head', array( &$this, 'nofollow_noindex' ) );
57
  add_action( 'wp_print_scripts', array( &$this, 'identify_current_page' ) );
58
  add_shortcode( 'icegram', array( &$this, 'execute_shortcode' ) );
59
  add_filter( 'icegram_branding_data', array( &$this , 'branding_data_remove' ), 10 );
228
 
229
  $welcome_page_title = __( 'Welcome to Icegram', 'icegram' );
230
  $settings_page_title = __( 'Settings', 'icegram' );
231
+ $addons_page_title = __( 'Add-ons', 'icegram' );
232
+
233
+ /*
234
+ if ( false === ( $ig_addons = get_transient( 'icegram_addons_data' ) ) ) {
235
+ $this->check_for_addons();
236
+ }
237
+ $addon_count = get_option( 'icegram_no_of_addons' );
238
+
239
+ if ($addon_count > 0) {
240
+ $addons_page_title .= " <span class='awaiting-mod update-plugins count-$addon_count'><span class='addon-count'>" . number_format_i18n( $addon_count ) . "</span></span>" ;
241
+ }
242
+ */
243
+
244
  $menu_title = __( 'Docs & Support', 'icegram' );
245
  $about = add_submenu_page( 'edit.php?post_type=ig_campaign', $welcome_page_title, $menu_title, 'manage_options', 'icegram-support', array( $this, 'about_screen' ) );
246
  $settings = add_submenu_page( 'edit.php?post_type=ig_campaign', $settings_page_title, $settings_page_title, 'manage_options', 'icegram-settings', array( $this, 'settings_screen' ) );
247
+ $addons = add_submenu_page( 'edit.php?post_type=ig_campaign', $addons_page_title, $addons_page_title, 'manage_options', 'icegram-addons', array( $this, 'addons_screen' ) );
248
 
249
  add_action( 'admin_print_styles-'. $about, array( $this, 'admin_css' ) );
250
  add_action( 'admin_print_styles-'. $settings, array( $this, 'admin_css' ) );
251
+ add_action( 'admin_print_styles-'. $addons, array( $this, 'admin_css' ) );
252
 
253
  }
254
 
270
  include ( 'settings.php' );
271
  }
272
 
273
+ public function addons_screen() {
274
+ $ig_addons = $this->check_for_addons( true );
275
+ include ( 'addons.php' );
276
+ }
277
+
278
+ public function check_for_addons( $force_update = false ) {
279
+
280
+ if ( $force_update === true || false === ( $ig_addons = get_transient( 'icegram_addons_data' ) ) ) {
281
+ $ig_addons_json = wp_remote_get( 'http://icegram.com/addons.json', array( 'user-agent' => 'Icegram Addons' ) );
282
+
283
+ if ( ! is_wp_error( $ig_addons_json ) ) {
284
+ $ig_addons = json_decode( wp_remote_retrieve_body( $ig_addons_json ) );
285
+ $addon_count = get_option( 'icegram_no_of_addons', 0 );
286
+ if ( !empty($ig_addons) && is_array($ig_addons) ) {
287
+ set_transient( 'icegram_addons_data', $ig_addons, 24 * HOUR_IN_SECONDS ); // 1 day
288
+ update_option( 'icegram_no_of_addons', count( $ig_addons ) - $addon_count ); // display count of newly added addons
289
+ }
290
+ }
291
+ }
292
+ return $ig_addons;
293
+ }
294
+
295
  public function branding_data_remove( $icegram_branding_data ) {
296
  if( !empty( $icegram_branding_data ) && 'yes' != get_option('icegram_share_love', 'no') ) {
297
  $icegram_branding_data['powered_by_logo'] = '';
305
  // And add a placeholder div
306
  // Display will happen in footer via display_messages()
307
  $i = count($this->shortcode_instances);
 
308
  $this->shortcode_instances[ $i ] = shortcode_atts( array(
309
  'campaigns' => '',
310
  'messages' => '',
312
  ), $atts );
313
  $html[] = "<div class='ig_shortcode_container' id='icegram_shortcode_{$i}'";
314
  foreach ($atts as $key => $value) {
315
+ $value = str_replace(",", " ", $value);
316
  $html[] = " data-{$key}=\"".htmlentities($value)."\" ";
317
  }
318
  $html[] = " >"."</div>";
319
  return implode(" ", $html);
320
  }
321
 
322
+ // Do not index Icegram campaigns / messages...
323
+ // Not using currently - made custom post types non public...
324
+ function nofollow_noindex() {
325
+ $post = get_queried_object();
326
+ if ( (!empty($post) && !empty( $post->post_type ) && ( $post->post_type == 'ig_campaign' || $post->post_type == 'ig_message' ))
327
+ || is_post_type_archive( array('ig_message', 'ig_campaign') ) ) {
328
+ echo PHP_EOL . '<meta name="robots" content="NOINDEX,NOFOLLOW" />' . PHP_EOL;
329
+ }
330
+ }
331
+
332
  function display_messages() {
333
 
334
  $skip_others = $preview_mode = false;
348
  }
349
 
350
  if( !empty( $_GET['campaign_preview_id'] ) && current_user_can( 'manage_options' ) ) {
351
+ $campaign_ids = array( $_GET['campaign_preview_id'] );
352
  $preview_mode = true;
353
  }
354
 
388
 
389
  $types_shown[] = $message_data['type'];
390
 
391
+ /*
392
  // Our own implementation so WP does not mess with script, style and pre tags
393
  add_filter('the_content', array( $this, 'before_wpautop' ) , 9);
394
  add_filter('the_content', array( $this, 'after_wpautop' ) , 11);
395
  $messages[$key]['message'] = apply_filters( 'the_content', $message_data['message'] );
396
  remove_filter('the_content', array( $this, 'before_wpautop' ) , 9);
397
  remove_filter('the_content', array( $this, 'after_wpautop' ) , 11);
398
+ */
399
+ // Redo the_content functionality to avoid other plugins adding extraneous code to messages
400
+ $content = $message_data['message'];
401
+ $content = convert_chars( convert_smilies( wptexturize( $content ) ) );
402
+ if(isset($GLOBALS['wp_embed'])) {
403
+ $content = $GLOBALS['wp_embed']->autoembed($content);
404
+ }
405
+ $content = $this->after_wpautop( wpautop( $this->before_wpautop( $content ) ) );
406
+ $content = do_shortcode( shortcode_unautop( $content ) );
407
+ $messages[$key]['message'] = $content;
408
+
409
  }
410
 
411
  if( empty( $messages ) )
554
  if ( !empty( $message_ids ) && is_array( $message_ids ) ) {
555
  // For WPML compatibility
556
  if ( function_exists('icl_object_id') ) {
557
+ $wpml_settings = get_option('icl_sitepress_settings');
558
+ $original_if_missing = (is_array($wpml_settings) && array_key_exists('show_untranslated_blog_posts', $wpml_settings) && !empty($wpml_settings['show_untranslated_blog_posts']) ) ? true : false;
559
  foreach ($message_ids as $i=>$id ) {
560
+ $message_ids[ $i ] = icl_object_id( $id, 'ig_message', $original_if_missing );
561
+ }
562
  }
563
+ $message_ids = array_filter(array_unique($message_ids));
564
+ if ( !empty( $message_ids ) ) {
565
+ $message_data_query .= " AND post_id IN ( " . implode( ',', $message_ids ) . " )";
566
+ $message_data_results = $wpdb->get_results( $message_data_query, 'ARRAY_A' );
567
+ foreach ( $message_data_results as $message_data_result ) {
568
+ $message_data[$message_data_result['post_id']] = maybe_unserialize( $message_data_result['meta_value'] );
569
+ }
570
+ }
571
  }
572
  return $message_data;
573
  }
576
 
577
  $valid_messages = $valid_campaigns = $message_campaign_map = array();
578
 
579
+ $campaign_ids = array_filter(array_unique($campaign_ids));
580
+ $message_ids = array_filter(array_unique($message_ids));
581
+
582
  if ( !empty( $campaign_ids ) ) {
583
  $valid_campaigns = $this->get_valid_campaigns( $campaign_ids, true );
584
  }
585
  // When skip_others is true, we won't load campaigns / messages from db
586
+ if (!$skip_others && !$preview_mode) {
587
  $campaigns = $this->get_valid_campaigns();
588
  if (!empty($campaigns)) {
589
  foreach ($campaigns as $id => $campaign) {
593
  }
594
  }
595
  }
 
596
  // Create a map to look up campaign id for a given message
597
  if( !empty( $valid_campaigns ) ) {
598
  foreach ($valid_campaigns as $id => $campaign) {
606
  $message_campaign_map[ $msg['id'] ] = $id;
607
  }
608
  }
609
+ }
610
  }
611
 
612
  // We don't display same message twice...
685
  ";
686
  $sql_params[] = 's:8:"sitewide";s:3:"yes";';
687
  $sql_params[] = 's:10:"other_page";s:3:"yes";';
688
+ $sql_params[] = 's:7:"page_id";a:';
689
  $sql_params[] = serialize( (string) $pid );
690
 
691
  if (is_home() || is_front_page()) {
753
  $args = array(
754
  'labels' => $labels,
755
  'menu_icon' => 'dashicons-info',
756
+ 'public' => false,
757
+ 'publicly_queryable' => false,
758
  'show_ui' => true,
759
  'show_in_menu' => true,
760
  'query_var' => true,
761
  'rewrite' => array( 'slug' => 'ig_campaign' ),
762
  'capability_type' => 'post',
763
+ 'has_archive' => false,
764
  'hierarchical' => false,
765
  'menu_position' => null,
766
  'supports' => array( 'title', 'editor' )
789
 
790
  $args = array(
791
  'labels' => $labels,
792
+ 'public' => false,
793
+ 'publicly_queryable' => false,
794
  'show_ui' => true,
795
  'show_in_menu' => 'edit.php?post_type=ig_campaign',
796
  'query_var' => true,
797
  'rewrite' => array( 'slug' => 'ig_message' ),
798
  'capability_type' => 'post',
799
+ 'has_archive' => false,
800
  'hierarchical' => false,
801
  'menu_position' => null,
802
  'supports' => array( 'title' )
1041
  }
1042
 
1043
  function identify_current_page() {
1044
+ global $post, $wpdb;
1045
+
1046
+ $obj = get_queried_object();
1047
+ if( !empty( $obj->has_archive ) ) {
1048
+ $id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_type='page'", $obj->has_archive ) );
1049
+ } elseif( is_object( $post ) && isset( $post->ID ) ) {
1050
  $id = $post->ID;
1051
+ }
1052
+ $id = apply_filters('icegram_identify_current_page', $id );
1053
+ self::$current_page_id = $id;
1054
  }
1055
 
1056
  static function get_current_page_id() {
message-types/action-bar/main.js CHANGED
@@ -2,7 +2,7 @@
2
  * Icegram Message Type - Action_Bar
3
  **/
4
  function Icegram_Message_Type_Action_Bar( data ) {
5
- Icegram_Message_Type.call(this, data);
6
  }
7
 
8
  Icegram_Message_Type_Action_Bar.prototype = Object.create(Icegram_Message_Type.prototype);
@@ -30,8 +30,6 @@ Icegram_Message_Type_Action_Bar.prototype.get_template_default = function () {
30
 
31
  Icegram_Message_Type_Action_Bar.prototype.post_render = function ( ) {
32
  this.el.find('.ig_arrow_block').css('background-color', this.data.bg_color);
33
- this.el.find('.ig_content').css('color', this.data.text_color);
34
- this.el.css('background-color', this.data.bg_color);
35
  if( this.data.theme == 'hello' ) {
36
  var message_button = this.el.find('.ig_button');
37
  this.el.find('.ig_data').append(message_button);
@@ -55,6 +53,10 @@ Icegram_Message_Type_Action_Bar.prototype.set_position = function ( ) {
55
 
56
  };
57
 
 
 
 
 
58
  Icegram_Message_Type_Action_Bar.prototype.show = function ( options, silent ) {
59
  //if ( this.is_visible() ) return; TODO:: we are not hiding action bar we are sliding up with css need to check
60
  var anim_delay = silent !== true ? 1000 : 0;
@@ -155,14 +157,6 @@ Icegram_Message_Type_Action_Bar.prototype.on_click = function ( e ) {
155
  e.data.self.show();
156
  return;
157
  }
158
- // Any other click is considered as CTA click
159
- e.data.self.on_cta_click( e );
160
- };
161
-
162
- Icegram_Message_Type_Action_Bar.prototype.on_cta_click = function ( e ) {
163
- e.data = e.data || { self: this };
164
- e.data.self.track( 'clicked' );
165
- if(jQuery(e.target).filter('.action_bar .ig_button').length){
166
- typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
167
- }
168
  };
2
  * Icegram Message Type - Action_Bar
3
  **/
4
  function Icegram_Message_Type_Action_Bar( data ) {
5
+ Icegram_Message_Type.apply(this, arguments);
6
  }
7
 
8
  Icegram_Message_Type_Action_Bar.prototype = Object.create(Icegram_Message_Type.prototype);
30
 
31
  Icegram_Message_Type_Action_Bar.prototype.post_render = function ( ) {
32
  this.el.find('.ig_arrow_block').css('background-color', this.data.bg_color);
 
 
33
  if( this.data.theme == 'hello' ) {
34
  var message_button = this.el.find('.ig_button');
35
  this.el.find('.ig_data').append(message_button);
53
 
54
  };
55
 
56
+ Icegram_Message_Type_Action_Bar.prototype.is_visible = function ( ) {
57
+ return this.el.find('.ig_arrow_block').hasClass('open');
58
+ };
59
+
60
  Icegram_Message_Type_Action_Bar.prototype.show = function ( options, silent ) {
61
  //if ( this.is_visible() ) return; TODO:: we are not hiding action bar we are sliding up with css need to check
62
  var anim_delay = silent !== true ? 1000 : 0;
157
  e.data.self.show();
158
  return;
159
  }
160
+ // Now let the parent handle the rest...
161
+ Icegram_Message_Type.prototype.on_click.apply(this, arguments);
 
 
 
 
 
 
 
 
162
  };
message-types/action-bar/themes/solid.css CHANGED
@@ -8,7 +8,7 @@
8
  }
9
 
10
  .action_bar.solid .ig_content {
11
- padding: 1em 0 0 1em;
12
  }
13
 
14
  .action_bar.solid .ig_headline {
8
  }
9
 
10
  .action_bar.solid .ig_content {
11
+ padding: 1em 0 1em 1em;
12
  }
13
 
14
  .action_bar.solid .ig_headline {
message-types/messenger/default.css CHANGED
@@ -6,13 +6,18 @@
6
  margin: 0;
7
  padding: 0;
8
  font-family: "Lucida Grande", Arial, sans-serif;
9
- background: transparent !important;
10
  overflow: hidden;
11
  text-align: left;
12
  }
 
 
 
 
 
13
  .messenger .ig_content {
14
 
15
  }
 
16
  .messenger .ig_header {
17
  position: relative;
18
  overflow: hidden;
6
  margin: 0;
7
  padding: 0;
8
  font-family: "Lucida Grande", Arial, sans-serif;
 
9
  overflow: hidden;
10
  text-align: left;
11
  }
12
+
13
+ .messenger.ig_container, .messenger.ig_container .ig_content {
14
+ background-color: transparent !important;
15
+ }
16
+
17
  .messenger .ig_content {
18
 
19
  }
20
+
21
  .messenger .ig_header {
22
  position: relative;
23
  overflow: hidden;
message-types/messenger/images/talk-footer-1.png CHANGED
Binary file
message-types/messenger/main.js CHANGED
@@ -3,14 +3,13 @@
3
  * Icegram Message Type - Messenger
4
  **/
5
  function Icegram_Message_Type_Messenger( data ) {
6
-
7
- Icegram_Message_Type.call(this, data);
8
  }
9
  Icegram_Message_Type_Messenger.prototype = Object.create(Icegram_Message_Type.prototype);
10
  Icegram_Message_Type_Messenger.prototype.constructor = Icegram_Message_Type_Messenger;
11
 
12
  Icegram_Message_Type_Messenger.prototype.get_template_default = function () {
13
- return '<div class="icegram messenger {{=theme}} {{=animation}} ig_container" data="{{=id}}" id="icegram_message_{{=id}}">' +
14
  '<div class="ig_content">' +
15
  '<div class="ig_header">' +
16
  '<div class="ig_header_image"></div>' +
3
  * Icegram Message Type - Messenger
4
  **/
5
  function Icegram_Message_Type_Messenger( data ) {
6
+ Icegram_Message_Type.apply(this, arguments);
 
7
  }
8
  Icegram_Message_Type_Messenger.prototype = Object.create(Icegram_Message_Type.prototype);
9
  Icegram_Message_Type_Messenger.prototype.constructor = Icegram_Message_Type_Messenger;
10
 
11
  Icegram_Message_Type_Messenger.prototype.get_template_default = function () {
12
+ return '<div class="icegram messenger {{=theme}} {{=animation}} ig_container ig_cta" data="{{=id}}" id="icegram_message_{{=id}}">' +
13
  '<div class="ig_content">' +
14
  '<div class="ig_header">' +
15
  '<div class="ig_header_image"></div>' +
message-types/messenger/themes/canvas.css CHANGED
@@ -11,7 +11,7 @@
11
  overflow: hidden;
12
  -webkit-box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.135);
13
  box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.13);
14
- background: #FFF;
15
  }
16
 
17
  .messenger.canvas .ig_header {
11
  overflow: hidden;
12
  -webkit-box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.135);
13
  box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.13);
14
+ background-color: #FFF !important;
15
  }
16
 
17
  .messenger.canvas .ig_header {
message-types/messenger/themes/talk.png CHANGED
Binary file
message-types/popup/default.css CHANGED
@@ -4,12 +4,20 @@
4
  z-index: 100000;
5
  }
6
 
 
 
 
 
7
  .popup .ig_headline {
8
  text-decoration: none;
9
  font-weight: 800;
10
  line-height: 1em;
11
  }
12
 
 
 
 
 
13
  .popup .ig_image {
14
  margin: 0 1em;
15
  }
4
  z-index: 100000;
5
  }
6
 
7
+ .popup.ig_container, .popup.ig_container .ig_content {
8
+ background-color: transparent !important;
9
+ }
10
+
11
  .popup .ig_headline {
12
  text-decoration: none;
13
  font-weight: 800;
14
  line-height: 1em;
15
  }
16
 
17
+ .popup .ig_data {
18
+ overflow-y: auto;
19
+ }
20
+
21
  .popup .ig_image {
22
  margin: 0 1em;
23
  }
message-types/popup/images/close_big.png CHANGED
Binary file
message-types/popup/main.js CHANGED
@@ -2,22 +2,23 @@
2
  * Icegram Message Type - Popup
3
  **/
4
  function Icegram_Message_Type_Popup( data ) {
5
-
6
- Icegram_Message_Type.call(this, data);
7
  }
8
  Icegram_Message_Type_Popup.prototype = Object.create(Icegram_Message_Type.prototype);
9
  Icegram_Message_Type_Popup.prototype.constructor = Icegram_Message_Type_Popup;
10
 
11
  Icegram_Message_Type_Popup.prototype.get_template_default = function () {
12
  return '<div id="popup_main_{{=id}}" data={{=id}}>'+
13
- '<div class="icegram popup ig_container {{=theme}}" id="icegram_message_{{=id}}">'+
14
  '<div class="ig_close" id="popup_box_close_{{=id}}"></div>'+
15
- '<div class="ig_headline">{{=headline}}</div>'+
16
- '<div class="ig_content">'+
17
- '<div class="ig_image">'+
18
- '<img class="ig_icon" src="{{=icon}}"/>'+
 
 
 
19
  '</div>'+
20
- '<div class="ig_message">{{=message}}</div>'+
21
  '</div>'+
22
  '<div class="ig_button" >{{=label}}</div>'+
23
  '</div>'+
@@ -27,17 +28,24 @@
27
  if ( this.is_visible() ) return;
28
  var self = this;
29
  var popup_delay = 0;
30
- if( jQuery('body').find('#TB_window').length ) {
 
 
 
 
 
 
 
31
  popup_delay = 800;
32
- tb_remove();
33
  }
34
  setTimeout( function() {
35
  var popup_width = (jQuery(window).width() * 60) / 100;
36
  self.el.show();
37
  tb_show('Popup', "#TB_inline?width="+popup_width+"&modal=true&inlineId=popup_main_" + self.data.id, true);
38
- jQuery('#popup_main_' + self.data.id).remove();
39
  self.el = jQuery('#TB_window .popup');
40
  self.el.on('click', {self: self}, self.on_click);
 
 
41
  jQuery('#TB_window').addClass(self.data.theme).addClass(self.data.type);
42
  silent !== true && self.track( 'shown' );
43
  }, popup_delay);
@@ -53,9 +61,8 @@
53
  if ( !this.is_visible() ) return;
54
  var self = this;
55
  tb_remove();
56
- setTimeout( function() {
57
- self.el.hide();
58
- },0);
59
  silent !== true && this.track( 'closed' );
60
  };
61
  Icegram_Message_Type_Popup.prototype.on_resize = function(){
@@ -84,11 +91,4 @@
84
  'transform': 'scale(1)'});
85
  }
86
 
87
- }
88
- Icegram_Message_Type_Popup.prototype.on_cta_click = function ( e ) {
89
- e.data = e.data || { self: this };
90
- e.data.self.track( 'clicked' );
91
- if(jQuery(e.target).filter('.popup .ig_button').length){
92
- typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
93
- }
94
- };
2
  * Icegram Message Type - Popup
3
  **/
4
  function Icegram_Message_Type_Popup( data ) {
5
+ Icegram_Message_Type.apply(this, arguments);
 
6
  }
7
  Icegram_Message_Type_Popup.prototype = Object.create(Icegram_Message_Type.prototype);
8
  Icegram_Message_Type_Popup.prototype.constructor = Icegram_Message_Type_Popup;
9
 
10
  Icegram_Message_Type_Popup.prototype.get_template_default = function () {
11
  return '<div id="popup_main_{{=id}}" data={{=id}}>'+
12
+ '<div class="icegram popup ig_container {{=theme}}" id="icegram_message_{{=id}}" data={{=id}}>'+
13
  '<div class="ig_close" id="popup_box_close_{{=id}}"></div>'+
14
+ '<div class="ig_data">'+
15
+ '<div class="ig_headline">{{=headline}}</div>'+
16
+ '<div class="ig_content">'+
17
+ '<div class="ig_image">'+
18
+ '<img class="ig_icon" src="{{=icon}}"/>'+
19
+ '</div>'+
20
+ '<div class="ig_message">{{=message}}</div>'+
21
  '</div>'+
 
22
  '</div>'+
23
  '<div class="ig_button" >{{=label}}</div>'+
24
  '</div>'+
28
  if ( this.is_visible() ) return;
29
  var self = this;
30
  var popup_delay = 0;
31
+ if( jQuery('body').find('#TB_window').length ) {
32
+ var current_popup_id = jQuery('#TB_window').find('.popup').attr('data');
33
+ if (typeof(current_popup_id) != 'undefined') {
34
+ var current_popup = window.icegram.get_message_by_id(current_popup_id);
35
+ if (typeof('current_popup') != 'Icegram_Message_Type_Popup') {
36
+ current_popup.hide();
37
+ }
38
+ }
39
  popup_delay = 800;
 
40
  }
41
  setTimeout( function() {
42
  var popup_width = (jQuery(window).width() * 60) / 100;
43
  self.el.show();
44
  tb_show('Popup', "#TB_inline?width="+popup_width+"&modal=true&inlineId=popup_main_" + self.data.id, true);
 
45
  self.el = jQuery('#TB_window .popup');
46
  self.el.on('click', {self: self}, self.on_click);
47
+ var max_height = jQuery(window).height()-jQuery('#TB_window').height() + 150;
48
+ self.el.find('.ig_data').css('max-height', max_height);
49
  jQuery('#TB_window').addClass(self.data.theme).addClass(self.data.type);
50
  silent !== true && self.track( 'shown' );
51
  }, popup_delay);
61
  if ( !this.is_visible() ) return;
62
  var self = this;
63
  tb_remove();
64
+ self.el = jQuery('#popup_main_' + self.data.id);
65
+ self.el.hide();
 
66
  silent !== true && this.track( 'closed' );
67
  };
68
  Icegram_Message_Type_Popup.prototype.on_resize = function(){
91
  'transform': 'scale(1)'});
92
  }
93
 
94
+ }
 
 
 
 
 
 
 
message-types/popup/themes/air-mail.css CHANGED
@@ -3,11 +3,11 @@
3
  color: hsl(0, 100%, 100%);
4
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
5
  filter: alpha(opacity=100);
6
- padding: 1em 0;
7
  }
8
 
9
  .popup.air-mail .ig_headline {
10
- margin-bottom: 1em;
11
  font-size: 2.5em;
12
  text-align: center;
13
  color: hsl(206, 69%, 47%);
3
  color: hsl(0, 100%, 100%);
4
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
5
  filter: alpha(opacity=100);
6
+ padding: 1em 0 0;
7
  }
8
 
9
  .popup.air-mail .ig_headline {
10
+ margin-bottom: .5em;
11
  font-size: 2.5em;
12
  text-align: center;
13
  color: hsl(206, 69%, 47%);
message-types/popup/themes/amaze.png CHANGED
Binary file
message-types/popup/themes/inspire.css CHANGED
@@ -9,6 +9,10 @@
9
  font-size: 2.5em;
10
  }
11
 
 
 
 
 
12
  .popup.inspire .ig_image {
13
  float: left;
14
  }
9
  font-size: 2.5em;
10
  }
11
 
12
+ .popup.inspire .ig_content {
13
+ background-color: transparent !important;
14
+ }
15
+
16
  .popup.inspire .ig_image {
17
  float: left;
18
  }
message-types/popup/themes/persuade.css CHANGED
@@ -1,5 +1,4 @@
1
- .popup.persuade.ig_container {
2
- }
3
  .popup.persuade .ig_headline {
4
  letter-spacing: 0;
5
  color: hsl(0, 100%, 100%);
1
+
 
2
  .popup.persuade .ig_headline {
3
  letter-spacing: 0;
4
  color: hsl(0, 100%, 100%);
message-types/toast/main.js CHANGED
@@ -5,14 +5,14 @@
5
  function Icegram_Message_Type_Toast( data ) {
6
  var width;
7
  this.width = 300;
8
- Icegram_Message_Type.call(this, data);
9
  }
10
  Icegram_Message_Type_Toast.prototype = Object.create(Icegram_Message_Type.prototype);
11
  Icegram_Message_Type_Toast.prototype.constructor = Icegram_Message_Type_Toast;
12
 
13
  Icegram_Message_Type_Toast.prototype.get_template_default = function () {
14
  //'<div id="icegram_message_{{=id}}">'+
15
- return '<li class="icegram toast ig_container {{=animation}} {{=theme}}" id="icegram_message_{{=id}}">'+
16
  '<div class="ig_wrapper">'+
17
  '<div class="ig_content">'+
18
  '<div class="ig_base"></div>'+
@@ -80,7 +80,7 @@
80
 
81
  Icegram_Message_Type_Toast.prototype.hide = function ( options, silent ) {
82
  if ( !this.is_visible() ) return;
83
- this.el.remove();
84
  silent !== true && this.track( 'closed' );
85
  };
86
 
5
  function Icegram_Message_Type_Toast( data ) {
6
  var width;
7
  this.width = 300;
8
+ Icegram_Message_Type.apply(this, arguments);
9
  }
10
  Icegram_Message_Type_Toast.prototype = Object.create(Icegram_Message_Type.prototype);
11
  Icegram_Message_Type_Toast.prototype.constructor = Icegram_Message_Type_Toast;
12
 
13
  Icegram_Message_Type_Toast.prototype.get_template_default = function () {
14
  //'<div id="icegram_message_{{=id}}">'+
15
+ return '<li class="icegram toast ig_container {{=animation}} {{=theme}} ig_cta" id="icegram_message_{{=id}}">'+
16
  '<div class="ig_wrapper">'+
17
  '<div class="ig_content">'+
18
  '<div class="ig_base"></div>'+
80
 
81
  Icegram_Message_Type_Toast.prototype.hide = function ( options, silent ) {
82
  if ( !this.is_visible() ) return;
83
+ this.el.hide();
84
  silent !== true && this.track( 'closed' );
85
  };
86
 
message-types/toast/themes/announce.css CHANGED
@@ -1,5 +1,5 @@
1
- .announce.ig_container {
2
- background-color: rgba(255, 255, 105, 0.95);
3
  -moz-border-radius: 4px;
4
  -webkit-border-radius: 4px;
5
  border-radius: 4px;
@@ -11,34 +11,31 @@
11
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
12
  }
13
 
14
- .announce.ig_container:hover {
15
  border-color: rgba(0, 0, 0, 1);
16
  }
17
 
18
- .announce .ig_wrapper {
19
  border: none;
20
- background-color: rgba(255, 255, 255, 0.15);
21
  -moz-border-radius: 4px;
22
  -webkit-border-radius: 4px;
23
  border-radius: 4px;
24
  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
25
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
26
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
27
- background: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
28
  }
29
 
30
- .announce .ig_content {
31
  border: none;
32
- background-color: rgba(255, 255, 255, 0.15);
33
  -moz-border-radius: 4px;
34
  -webkit-border-radius: 4px;
35
  border-radius: 4px;
36
  -moz-box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
37
  -webkit-box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
38
  box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
39
- background-image: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 49.75%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.06) 100%);
40
  }
41
 
42
- .announce .ig_headline {
43
  color: rgba(67, 76, 89, 0.9);
44
  }
1
+ .toast.announce.ig_container {
2
+ background-color: rgba(255, 255, 105, 0.95) !important;
3
  -moz-border-radius: 4px;
4
  -webkit-border-radius: 4px;
5
  border-radius: 4px;
11
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
12
  }
13
 
14
+ .toast.announce.ig_container:hover {
15
  border-color: rgba(0, 0, 0, 1);
16
  }
17
 
18
+ .toast.announce .ig_wrapper {
19
  border: none;
 
20
  -moz-border-radius: 4px;
21
  -webkit-border-radius: 4px;
22
  border-radius: 4px;
23
  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
24
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
25
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
 
26
  }
27
 
28
+ .toast.announce .ig_content {
29
  border: none;
30
+ background-color: transparent !important;
31
  -moz-border-radius: 4px;
32
  -webkit-border-radius: 4px;
33
  border-radius: 4px;
34
  -moz-box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
35
  -webkit-box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
36
  box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
 
37
  }
38
 
39
+ .toast.announce .ig_headline {
40
  color: rgba(67, 76, 89, 0.9);
41
  }
message-types/toast/themes/balance.css CHANGED
@@ -2,10 +2,13 @@
2
  border: 1px solid #777;
3
  color: rgba(20, 20, 20, 1);
4
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
5
- background-color: rgba(204, 204, 204, 0.75);
6
- background: -webkit-gradient(linear, left top, left bottom, from(rgba(204, 204, 204, 0.75)), to(rgba(240, 240, 240, 1)), color-stop(0.4, rgba(139, 139, 139, 0.5)));
7
  -webkit-font-smoothing: antialiased;
8
  }
 
 
 
9
 
10
  .balance .ig_headline {
11
  color: hsla(0, 0%, 8%, 1);
2
  border: 1px solid #777;
3
  color: rgba(20, 20, 20, 1);
4
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
5
+ background-color: rgba(204, 204, 204, 0.75) !important;
6
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(204, 204, 204, 0.75)), to(rgba(240, 240, 240, 1)), color-stop(0.4, rgba(139, 139, 139, 0.5))) !important;
7
  -webkit-font-smoothing: antialiased;
8
  }
9
+ .balance .ig_content {
10
+ background: transparent !important;
11
+ }
12
 
13
  .balance .ig_headline {
14
  color: hsla(0, 0%, 8%, 1);
message-types/toast/themes/burnt.css CHANGED
@@ -3,6 +3,11 @@
3
  position: relative;
4
  -moz-box-sizing: border-box;
5
  box-sizing: border-box;
 
 
 
 
 
6
  }
7
 
8
  .burnt .ig_wrapper {
3
  position: relative;
4
  -moz-box-sizing: border-box;
5
  box-sizing: border-box;
6
+ background-color: transparent !important;
7
+ }
8
+
9
+ .burnt .ig_content {
10
+ background-color: transparent !important;
11
  }
12
 
13
  .burnt .ig_wrapper {
message-types/toast/themes/clear.css CHANGED
@@ -1,23 +1,27 @@
1
- .clear.ig_container {
2
  border: 3px solid rgba(0, 0, 0, 0.4);
3
  -moz-border-radius: .5em;
4
  -webkit-border-radius: .5em;
5
  border-radius: .5em;
6
- background: #fff;
7
  }
8
 
9
- .clear .ig_headline {
 
 
 
 
10
  color: #222;
11
  letter-spacing: 0.7pt;
12
  line-height: 16px;
13
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
14
  }
15
 
16
- .clear .ig_icon {
17
 
18
  }
19
 
20
- .clear .ig_message {
21
  text-align: left;
22
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
23
  color: #444;
1
+ .toast.clear.ig_container {
2
  border: 3px solid rgba(0, 0, 0, 0.4);
3
  -moz-border-radius: .5em;
4
  -webkit-border-radius: .5em;
5
  border-radius: .5em;
6
+ background: #fff !important;
7
  }
8
 
9
+ .toast.clear .ig_content {
10
+ background-color: transparent !important;
11
+ }
12
+
13
+ .toast.clear .ig_headline {
14
  color: #222;
15
  letter-spacing: 0.7pt;
16
  line-height: 16px;
17
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
18
  }
19
 
20
+ .toast.clear .ig_icon {
21
 
22
  }
23
 
24
+ .toast.clear .ig_message {
25
  text-align: left;
26
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
27
  color: #444;
message-types/toast/themes/night-glow.css CHANGED
@@ -9,7 +9,8 @@
9
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
10
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
11
  -webkit-font-smoothing: antialiased;
12
- background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.83)), to(rgba(51, 51, 51, 0.73)), color-stop(0.5, rgba(0, 0, 0, 0.83)));
 
13
  border: 1px solid rgba(0, 0, 0, 0.6);
14
  color: rgba(150, 150, 150, 1);
15
  text-shadow: 0 -1px 0 #000;
@@ -36,6 +37,7 @@
36
  -webkit-border-radius: 3px;
37
  border-radius: 3px;
38
  border-left: 1px solid rgba(255, 255, 255, 0.1);
 
39
  }
40
 
41
  .night-glow .ig_headline {
9
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
10
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
11
  -webkit-font-smoothing: antialiased;
12
+ background-color: transparent !important;
13
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.83)), to(rgba(51, 51, 51, 0.73)), color-stop(0.5, rgba(0, 0, 0, 0.83))) !important;
14
  border: 1px solid rgba(0, 0, 0, 0.6);
15
  color: rgba(150, 150, 150, 1);
16
  text-shadow: 0 -1px 0 #000;
37
  -webkit-border-radius: 3px;
38
  border-radius: 3px;
39
  border-left: 1px solid rgba(255, 255, 255, 0.1);
40
+ background-color: transparent !important;
41
  }
42
 
43
  .night-glow .ig_headline {
message-types/toast/themes/stand-out.css CHANGED
@@ -3,8 +3,8 @@
3
  }
4
 
5
  .stand-out.ig_container {
6
- background-color: hsl(0, 0%, 12%);
7
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, 0.1)), color-stop(1, rgba(255, 255, 255, 0.1))), url(../images/stand-out.png);
8
  -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
9
  -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
10
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
@@ -16,6 +16,10 @@
16
  border: 1px solid #111;
17
  }
18
 
 
 
 
 
19
  .stand-out .ig_icon {
20
  right: 10px;
21
  left: auto;
@@ -24,7 +28,7 @@
24
  border-radius: 3px;
25
  }
26
 
27
- .stand-out .ig_message {
28
  color: rgba(255, 255, 255, 0.7);
29
  line-height: 15px;
30
  }
3
  }
4
 
5
  .stand-out.ig_container {
6
+ background-color: hsl(0, 0%, 12%) !important;
7
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, 0.1)), color-stop(1, rgba(255, 255, 255, 0.1))), url(../images/stand-out.png) !important;
8
  -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
9
  -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
10
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
16
  border: 1px solid #111;
17
  }
18
 
19
+ .stand-out .ig_content {
20
+ background-color: transparent !important;
21
+ }
22
+
23
  .stand-out .ig_icon {
24
  right: 10px;
25
  left: auto;
28
  border-radius: 3px;
29
  }
30
 
31
+ .stand-out .ig_message, .stand-out .ig_headline {
32
  color: rgba(255, 255, 255, 0.7);
33
  line-height: 15px;
34
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:http://www.icegram.com/
4
  Tags: popup, window, hellobar, action bar, header bar, footer bar, notification, messenger, targeting, rules, auto responder, icegram, responsive, slide
5
  Requires at least: 3.9
6
  Tested up to: 3.9.1
7
- Stable tag: 1.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -86,6 +86,9 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
86
 
87
  == Upgrade Notice ==
88
 
 
 
 
89
  = 1.2 =
90
  Lots of enhancements... [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support, pluggable architecture, many internal changes. Do upgrade.
91
 
@@ -101,6 +104,22 @@ Initial Release
101
 
102
  == Changelog ==
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  = 1.2 =
105
  * NEW: Icegram is now fully pluggable. External plugins can add message types and themes.
106
  * NEW: [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support
@@ -117,6 +136,7 @@ Initial Release
117
  * Fix: For displaying messages via shortcode
118
  * Update: And many more!!!
119
 
 
120
  = 1.1.1 =
121
  * Fix for crash on activation with W3 Total Cache
122
  * Added localization / translation ability
4
  Tags: popup, window, hellobar, action bar, header bar, footer bar, notification, messenger, targeting, rules, auto responder, icegram, responsive, slide
5
  Requires at least: 3.9
6
  Tested up to: 3.9.1
7
+ Stable tag: 1.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
86
 
87
  == Upgrade Notice ==
88
 
89
+ = 1.3 =
90
+ 7 premium addons available now. Plus lot of improvements. Recommended upgrade.
91
+
92
  = 1.2 =
93
  Lots of enhancements... [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support, pluggable architecture, many internal changes. Do upgrade.
94
 
104
 
105
  == Changelog ==
106
 
107
+ = 1.3 =
108
+ * NEW: 7 Premium add-ons available
109
+ * Fix: [icegram] shortcode not working for campaigns
110
+ * Update: Improved CTA click handling
111
+ * Update: Internal changes for better performance
112
+ * NEW: Setting display time to -1 will hide the message
113
+ * Fix: Can use quotes and other special characters in headline now
114
+ * Update: #WPML Show default language message only if "Blog posts to display" is set to "All posts"
115
+ * Fix: Hide campaign and messages from public pages / search / search engines
116
+ * Fix: Other plugins adding content to messages (social media links etc)
117
+ * NEW: Clicking on any item with class "ig_cta" will trigger cta click action
118
+ * Fix: Campaigns not working on archive pages (like Shop / Categories...)
119
+ * Fix: Campaigns with multiple target pages not working
120
+ * Fix: #WPML Messages added from Campaigns page not showing on Messages page
121
+ * Update: And then some changes we are forgetting for now...
122
+
123
  = 1.2 =
124
  * NEW: Icegram is now fully pluggable. External plugins can add message types and themes.
125
  * NEW: [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support
136
  * Fix: For displaying messages via shortcode
137
  * Update: And many more!!!
138
 
139
+
140
  = 1.1.1 =
141
  * Fix for crash on activation with W3 Total Cache
142
  * Added localization / translation ability