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

Version Description

First release on WordPress.org

=

Download this release

Release Info

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

Version 1.1

Files changed (86) hide show
  1. about-icegram.php +331 -0
  2. assets/css/action-bar/air-mail.css +137 -0
  3. assets/css/action-bar/bold.css +106 -0
  4. assets/css/action-bar/hello.css +135 -0
  5. assets/css/action-bar/solid.css +65 -0
  6. assets/css/admin.css +608 -0
  7. assets/css/chosen.css +435 -0
  8. assets/css/chosen.min.css +3 -0
  9. assets/css/frontend.css +421 -0
  10. assets/css/jquery-ui.css +1178 -0
  11. assets/css/messenger/canvas.css +73 -0
  12. assets/css/messenger/clear.css +193 -0
  13. assets/css/messenger/social.css +221 -0
  14. assets/css/messenger/talk.css +188 -0
  15. assets/css/popup/air-mail.css +116 -0
  16. assets/css/popup/amaze.css +106 -0
  17. assets/css/popup/compel.css +88 -0
  18. assets/css/popup/convert.css +89 -0
  19. assets/css/popup/inspire.css +82 -0
  20. assets/css/popup/persuade.css +105 -0
  21. assets/css/toast/announce.css +70 -0
  22. assets/css/toast/balance.css +50 -0
  23. assets/css/toast/burnt.css +91 -0
  24. assets/css/toast/clear.css +67 -0
  25. assets/css/toast/night-glow.css +68 -0
  26. assets/css/toast/stand-out.css +44 -0
  27. assets/images/chosen-sprite.png +0 -0
  28. assets/images/clear-footer.png +0 -0
  29. assets/images/clear-header.png +0 -0
  30. assets/images/clear-option.png +0 -0
  31. assets/images/close_big.png +0 -0
  32. assets/images/desktop.png +0 -0
  33. assets/images/icegram-logo-branding-64-grey.png +0 -0
  34. assets/images/icegram-logo-branding-64-white.png +0 -0
  35. assets/images/icegram-logo-branding-64.png +0 -0
  36. assets/images/popup-amaze-bg.jpg +0 -0
  37. assets/images/popup-close.png +0 -0
  38. assets/images/sketch-action-bar.png +0 -0
  39. assets/images/sketch-messenger.png +0 -0
  40. assets/images/sketch-multiple-sequence.png +0 -0
  41. assets/images/sketch-popup.png +0 -0
  42. assets/images/sketch-rules.png +0 -0
  43. assets/images/sketch-toast-notification.png +0 -0
  44. assets/images/social-img.png +0 -0
  45. assets/images/stand-out.png +0 -0
  46. assets/images/talk-close.png +0 -0
  47. assets/images/talk-footer-1.png +0 -0
  48. assets/images/talk-header-1.png +0 -0
  49. assets/images/talk-header-2.png +0 -0
  50. assets/images/themes/action-bar/air-mail.png +0 -0
  51. assets/images/themes/action-bar/bold.png +0 -0
  52. assets/images/themes/action-bar/hello.png +0 -0
  53. assets/images/themes/action-bar/solid.png +0 -0
  54. assets/images/themes/messenger/canvas.png +0 -0
  55. assets/images/themes/messenger/clear.png +0 -0
  56. assets/images/themes/messenger/social.png +0 -0
  57. assets/images/themes/messenger/talk.png +0 -0
  58. assets/images/themes/popup/air-mail.png +0 -0
  59. assets/images/themes/popup/amaze.png +0 -0
  60. assets/images/themes/popup/compel.png +0 -0
  61. assets/images/themes/popup/convert.png +0 -0
  62. assets/images/themes/popup/inspire.png +0 -0
  63. assets/images/themes/popup/persuade.png +0 -0
  64. assets/images/themes/toast/announce.png +0 -0
  65. assets/images/themes/toast/balance.png +0 -0
  66. assets/images/themes/toast/burnt.png +0 -0
  67. assets/images/themes/toast/clear.png +0 -0
  68. assets/images/themes/toast/night-glow.png +0 -0
  69. assets/images/themes/toast/stand-out.png +0 -0
  70. assets/images/toast-glow.png +0 -0
  71. assets/js/admin.js +245 -0
  72. assets/js/ajax-chosen.jquery.min.js +2 -0
  73. assets/js/chosen.jquery.js +1211 -0
  74. assets/js/chosen.jquery.min.js +2 -0
  75. assets/js/frontend.js +504 -0
  76. assets/js/jquery.tipTip.js +191 -0
  77. assets/js/jquery.tipTip.min.js +20 -0
  78. classes/class-wp-campaign.php +558 -0
  79. classes/class-wp-message.php +476 -0
  80. icegram-includes/class-icegram-upgrade.php +394 -0
  81. icegram.php +843 -0
  82. readme.txt +105 -0
  83. templates/action-bar.php +22 -0
  84. templates/messenger.php +22 -0
  85. templates/popup.php +16 -0
  86. templates/toast.php +16 -0
about-icegram.php ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * About Icegram
4
+ */
5
+
6
+ // Actions for License Validation & Upgrade process
7
+ add_action( 'admin_footer', 'icegram_support_ticket_content' );
8
+
9
+ function icegram_support_ticket_content() {
10
+ global $current_user, $pagenow, $typenow, $icegram_upgrader;
11
+
12
+ if ( $pagenow != 'edit.php' ) return;
13
+
14
+ if ( $typenow != 'campaign') return;
15
+
16
+ if ( !( $current_user instanceof WP_User ) ) return;
17
+
18
+ if( isset( $_POST['submit_query'] ) && $_POST['submit_query'] == "Send" ){
19
+
20
+
21
+ $additional_info = ( isset( $_POST['additional_information'] ) && !empty( $_POST['additional_information'] ) ) ? sanitize_text_field( $_POST['additional_information'] ) : '';
22
+ $additional_info = str_replace( '###', '<br />', $additional_info );
23
+ $additional_info = str_replace( array( '[', ']' ), '', $additional_info );
24
+
25
+ $headers = 'From: ';
26
+ $headers .= ( isset( $_POST['client_name'] ) && !empty( $_POST['client_name'] ) ) ? sanitize_text_field( $_POST['client_name'] ) : '';
27
+ $headers .= ' <' . sanitize_text_field( $_POST['client_email'] ) . '>' . "\r\n";
28
+ $headers .= 'MIME-Version: 1.0' . "\r\n";
29
+ $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
30
+
31
+ ob_start();
32
+ echo $additional_info . '<br /><br />';
33
+ echo nl2br($_POST['message']) ;
34
+ $message = ob_get_clean();
35
+ wp_mail( 'hello@icegram.com', $_POST['subject'], $message, $headers );
36
+ header('Location: ' . $_SERVER['HTTP_REFERER'] );
37
+
38
+ }
39
+ ?>
40
+ <div id="icegram_post_query_form" style="display: none;">
41
+ <?php
42
+
43
+ if ( !wp_script_is('jquery') ) {
44
+ wp_enqueue_script('jquery');
45
+ wp_enqueue_style('jquery');
46
+ }
47
+
48
+ $first_name = get_user_meta($current_user->ID, 'first_name', true);
49
+ $last_name = get_user_meta($current_user->ID, 'last_name', true);
50
+ $name = $first_name . ' ' . $last_name;
51
+ $customer_name = ( !empty( $name ) ) ? $name : $current_user->data->display_name;
52
+ $customer_email = $current_user->data->user_email;
53
+ $license_key = $icegram_upgrader->license_key;
54
+ $wp_version = ( is_multisite() ) ? 'WPMU ' . get_bloginfo('version') : 'WP ' . get_bloginfo('version');
55
+ $admin_url = admin_url();
56
+ $php_version = ( function_exists( 'phpversion' ) ) ? phpversion() : '';
57
+ $wp_max_upload_size = size_format( wp_max_upload_size() );
58
+ $server_max_upload_size = ini_get('upload_max_filesize');
59
+ $server_post_max_size = ini_get('post_max_size');
60
+ $wp_memory_limit = WP_MEMORY_LIMIT;
61
+ $wp_debug = ( defined( 'WP_DEBUG' ) && WP_DEBUG === true ) ? 'On' : 'Off';
62
+ $this_plugins_version = $icegram_upgrader->plugin_data['Name'] . ' ' . $icegram_upgrader->plugin_data['Version'];
63
+ $ip_address = $_SERVER['REMOTE_ADDR'];
64
+ $additional_information = "Additional Information =>
65
+ (WP Version: $wp_version) ###
66
+ (Admin URL: $admin_url) ###
67
+ (PHP Version: $php_version) ###
68
+ (WP Max Upload Size: $wp_max_upload_size) ###
69
+ (Server Max Upload Size: $server_max_upload_size) ###
70
+ (Server Post Max Size: $server_post_max_size) ###
71
+ (WP Memory Limit: $wp_memory_limit) ###
72
+ (WP Debug: $wp_debug) ###
73
+ (" . $icegram_upgrader->plugin_data['Name'] . " Version: $this_plugins_version) ###
74
+ (License Key: $license_key)###
75
+ (IP Address: $ip_address)
76
+ ";
77
+
78
+ ?>
79
+ <form id="icegram_form_post_query" method="POST" action="" enctype="multipart/form-data">
80
+ <script type="text/javascript">
81
+ jQuery(function(){
82
+ jQuery('input#icegram_submit_query').click(function(e){
83
+ var error = false;
84
+
85
+ var client_name = jQuery('input#client_name').val();
86
+ if ( client_name == '' ) {
87
+ jQuery('input#client_name').css('border-color', 'red');
88
+ error = true;
89
+ } else {
90
+ jQuery('input#client_name').css('border-color', '');
91
+ }
92
+
93
+ var client_email = jQuery('input#client_email').val();
94
+ if ( client_email == '' ) {
95
+ jQuery('input#client_email').css('border-color', 'red');
96
+ error = true;
97
+ } else {
98
+ jQuery('input#client_email').css('border-color', '');
99
+ }
100
+
101
+ var subject = jQuery('table#icegram_post_query_table input#subject').val();
102
+ if ( subject == '' ) {
103
+ jQuery('input#subject').css('border-color', 'red');
104
+ error = true;
105
+ } else {
106
+ jQuery('input#subject').css('border-color', '');
107
+ }
108
+
109
+ var message = jQuery('table#icegram_post_query_table textarea#message').val();
110
+ if ( message == '' ) {
111
+ jQuery('textarea#message').css('border-color', 'red');
112
+ error = true;
113
+ } else {
114
+ jQuery('textarea#message').css('border-color', '');
115
+ }
116
+
117
+ if ( error == true ) {
118
+ jQuery('label#error_message').text('* All fields are compulsory.');
119
+ e.preventDefault();
120
+ } else {
121
+ jQuery('label#error_message').text('');
122
+ }
123
+
124
+ });
125
+
126
+ jQuery(".icegram-contact-us a.thickbox").click( function(){
127
+ setTimeout(function() {
128
+ jQuery('#TB_ajaxWindowTitle').text('Send your query');
129
+ }, 0 );
130
+ });
131
+
132
+ jQuery('div#TB_ajaxWindowTitle').each(function(){
133
+ var window_title = jQuery(this).text();
134
+ if ( window_title.indexOf('Send your query') != -1 ) {
135
+ jQuery(this).remove();
136
+ }
137
+ });
138
+
139
+ jQuery('input,textarea').keyup(function(){
140
+ var value = jQuery(this).val();
141
+ if ( value.length > 0 ) {
142
+ jQuery(this).css('border-color', '');
143
+ jQuery('label#error_message').text('');
144
+ }
145
+ });
146
+
147
+ });
148
+ </script>
149
+ <table id="icegram_post_query_table">
150
+ <tr>
151
+ <td><label for="client_name"><?php _e('Name', 'translate_icegram'); ?>*</label></td>
152
+ <td><input type="text" class="regular-text sm_text_field" id="client_name" name="client_name" value="<?php echo $customer_name; ?>" /></td>
153
+ </tr>
154
+ <tr>
155
+ <td><label for="client_email"><?php _e('E-mail', 'translate_icegram'); ?>*</label></td>
156
+ <td><input type="email" class="regular-text sm_text_field" id="client_email" name="client_email" value="<?php echo $customer_email; ?>" /></td>
157
+ </tr>
158
+ <!--
159
+ <tr>
160
+ <td><label for="current_plugin"><?php _e('Product', 'translate_icegram'); ?></label></td>
161
+ <td><input type="text" class="regular-text sm_text_field" id="current_plugin" name="current_plugin" value="<?php echo $this_plugins_version; ?>" readonly /></td>
162
+ </tr>
163
+ -->
164
+ <input type="hidden" id="current_plugin" name="current_plugin" value="<?php echo $this_plugins_version; ?>" />
165
+ <tr>
166
+ <td><label for="subject"><?php _e('Subject', 'translate_icegram'); ?>*</label></td>
167
+ <td><input type="text" class="regular-text sm_text_field" id="subject" name="subject" value="<?php echo ( !empty( $subject ) ) ? $subject : ''; ?>" /></td>
168
+ </tr>
169
+ <tr>
170
+ <td style="vertical-align: top; padding-top: 12px;"><label for="message"><?php _e('Message', 'translate_icegram'); ?>*</label></td>
171
+ <td><textarea id="message" name="message" rows="10" cols="60"><?php echo ( !empty( $message ) ) ? $message : ''; ?></textarea></td>
172
+ </tr>
173
+ <tr>
174
+ <td></td>
175
+ <td><label id="error_message" style="color: red;"></label></td>
176
+ </tr>
177
+ <tr>
178
+ <td></td>
179
+ <td><input type="submit" class="button" id="icegram_submit_query" name="submit_query" value="Send" /></td>
180
+ </tr>
181
+ </table>
182
+ <input type="hidden" name="license_key" value="<?php echo $license_key; ?>" />
183
+ <input type="hidden" name="sku" value="<?php echo $icegram_upgrader->sku; ?>" />
184
+ <input type="hidden" class="hidden_field" name="wp_version" value="<?php echo $wp_version; ?>" />
185
+ <input type="hidden" class="hidden_field" name="admin_url" value="<?php echo $admin_url; ?>" />
186
+ <input type="hidden" class="hidden_field" name="php_version" value="<?php echo $php_version; ?>" />
187
+ <input type="hidden" class="hidden_field" name="wp_max_upload_size" value="<?php echo $wp_max_upload_size; ?>" />
188
+ <input type="hidden" class="hidden_field" name="server_max_upload_size" value="<?php echo $server_max_upload_size; ?>" />
189
+ <input type="hidden" class="hidden_field" name="server_post_max_size" value="<?php echo $server_post_max_size; ?>" />
190
+ <input type="hidden" class="hidden_field" name="wp_memory_limit" value="<?php echo $wp_memory_limit; ?>" />
191
+ <input type="hidden" class="hidden_field" name="wp_debug" value="<?php echo $wp_debug; ?>" />
192
+ <input type="hidden" class="hidden_field" name="current_plugin" value="<?php echo $this_plugins_version; ?>" />
193
+ <input type="hidden" class="hidden_field" name="ip_address" value="<?php echo $ip_address; ?>" />
194
+ <input type="hidden" class="hidden_field" name="additional_information" value='<?php echo $additional_information; ?>' />
195
+ </form>
196
+ </div>
197
+ <?php
198
+ }
199
+
200
+ if ( !wp_script_is( 'thickbox' ) ) {
201
+ if ( !function_exists( 'add_thickbox' ) ) {
202
+ require_once ABSPATH . 'wp-includes/general-template.php';
203
+ }
204
+ add_thickbox();
205
+ }
206
+
207
+ ?>
208
+ <div class="wrap about-wrap icegram">
209
+
210
+ <h1><?php _e( "Welcome to Icegram", "translate_icegram" ); ?></h1>
211
+ <div class="about-text icegram-about-text">
212
+ <?php _e( "Your sample campaign is ready. We've added a few messages for you to test.", "translate_icegram" )?>
213
+ <?php
214
+ $sample_id = get_option('icegram_sample_data_imported');
215
+ $view_campaign = admin_url( 'post.php?post='.$sample_id[0].'&action=edit' );
216
+ $preview_url = home_url('?campaign_preview_id='.$sample_id[0]);
217
+ $assets_base = $icegram->plugin_url . '/assets/images/';
218
+ ?>
219
+ <p class="icegram-actions">
220
+ <a class="button button-primary button-large" href="<?php echo $view_campaign ; ?>"><?php _e( 'Edit & Publish it', 'translate_icegram' ); ?></a>
221
+ <?php _e( "OR", "translate_icegram")?>
222
+ <b><a href="<?php echo $preview_url; ?>" target="_blank"><?php _e( 'Preview Campaign', 'translate_icegram' ); ?></a></b>
223
+ </p>
224
+
225
+ </div>
226
+
227
+ <div class="icegram-badge">
228
+ <?php printf(__( "Version: %s", "translate_icegram"), $icegram_upgrader->plugin_data['Version'] ); ?>
229
+ </div>
230
+ <div class="icegram-support">
231
+ <?php _e( 'Questions? Need Help?', "translate_icegram" ); ?>
232
+ <div id="icegram-contact-us" class="icegram-contact-us"><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=icegram" ?>"><?php _e("Contact Us", "translate_icegram"); ?></a></div>
233
+ </div>
234
+ <hr>
235
+ <div class="changelog">
236
+
237
+ <div class="about-text">
238
+ <?php _e("Do read Icegram's core concepts below to understand how you can use Icegram to inspire, convert and engage your audience.", "translate_icegram"); ?>
239
+ </div>
240
+
241
+ <div class="feature-section col three-col">
242
+ <div class="col-1">
243
+
244
+ <h2 class="icegram-dashicons dashicons-testimonial"><?php _e( "Messages", "translate_icegram" ); ?></h2>
245
+ <!--<img src="//s.w.org/images/core/3.9/editor.jpg?0">-->
246
+ <p><?php _e("A 'Message' is a communication you want to deliver to your audience.","translate_icegram"); ?></p>
247
+ <p><?php _e("And Icegram comes with not one, but four message types.","translate_icegram"); ?></p>
248
+ <p><?php _e("Different message types look and behave differently, but they all have many common characteristics. For instance, most message types will allow you to set a headline, a body text, label for the ‘call to action’ button, a link for that button, theme and styling options, animation effect and position on screen where that message should show.","translate_icegram"); ?></p>
249
+ </div>
250
+ <div class="col-2">
251
+ <h4><?php _e("Action Bar", "translate_icegram"); ?></h4>
252
+ <img src="<?php echo $assets_base; ?>/sketch-action-bar.png" width="180" height="145">
253
+ <p><?php _e("An action bar is a proven attention grabber. It shows up as a solid bar either at top or bottom. Use it for your most important messages or time sensitive announcements. Put longer content in it and it acts like a collapsible panel!", "translate_icegram"); ?></p>
254
+ <h4><?php _e("Messenger", "translate_icegram"); ?></h4>
255
+ <img src="<?php echo $assets_base; ?>/sketch-messenger.png" width="180" height="145">
256
+ <p><?php _e("A messenger is best used to invoke interest while your visitor is reading your content. Users perceive it as something new, important and urgent and are highly likely to click on it.", "translate_icegram"); ?></p>
257
+ </div>
258
+ <div class="col-3 last-feature">
259
+ <h4><?php _e("Toast Notification", "translate_icegram"); ?></h4>
260
+ <img src="<?php echo $assets_base; ?>/sketch-toast-notification.png" width="180" height="145">
261
+ <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.", "translate_icegram"); ?></p>
262
+ <h4><?php _e("Popup", "translate_icegram"); ?></h4>
263
+ <img src="<?php echo $assets_base; ?>/sketch-popup.png" width="180" height="145">
264
+ <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...", "translate_icegram"); ?></p>
265
+
266
+ </div>
267
+ </div>
268
+
269
+ <hr>
270
+
271
+ <div class="feature-section col three-col">
272
+ <div class="col-1">
273
+ <h2 class="icegram-dashicons dashicons-megaphone"><?php _e("Campaigns", "translate_icegram"); ?></h2>
274
+ <p><?php _e("Campaign = Messages + Rules", "translate_icegram"); ?></p>
275
+ <p><?php _e("A campaign allows sequencing multiple messages and defining targeting rules. Create different campaigns for different marketing goals. Icegram supports showing multiple campaigns on any page.", "translate_icegram"); ?></p>
276
+ <p><?php _e("You can always preview your campaign to ensure campaign works the way you want, before making it live.", "translate_icegram"); ?></p>
277
+ </div>
278
+ <div class="col-2">
279
+ <h4><?php _e("Multiple Messages & Sequencing", "translate_icegram"); ?></h4>
280
+ <img src="<?php echo $assets_base; ?>/sketch-multiple-sequence.png" width="180" height="145">
281
+ <p><?php _e("Add one or as many messages to a campaign as you want. Also choose the number of seconds after which each message should show up. Showing multiple messages for same goal, but with slightly different content / presentation, greatly improves conversions.", "translate_icegram"); ?></p>
282
+ </div>
283
+ <div class="col-3 last-feature">
284
+ <h4><?php _e("Targeting Rules", "translate_icegram"); ?></h4>
285
+ <img src="<?php echo $assets_base; ?>/sketch-rules.png" width="180" height="145">
286
+ <p><?php _e("You can control who sees a campaign – and on what device, which pages does it show on, and what time period will it stay active for. You can run different campaigns with different rules to maximize engagement.", "translate_icegram"); ?></p>
287
+ </div>
288
+ </div>
289
+
290
+ <hr>
291
+
292
+ <div class="feature-section col two-col">
293
+ <div class="col-1">
294
+ <h2 class="icegram-dashicons dashicons-editor-help"><?php _e("FAQ / Common Problems", "translate_icegram"); ?></h2>
295
+
296
+ <h4><?php _e("Messages look broken / formatting is weird...", "translate_icegram"); ?></h4>
297
+ <p><?php _e("This is most likely due to CSS conflicts with current theme. We suggest using simple formatting for messages. You can also write custom CSS in your theme to fix any problems.", "translate_icegram"); ?></p>
298
+
299
+ <h4><?php _e("Extra Line Breaks / Paragraphs in messages...", "translate_icegram"); ?></h4>
300
+ <p><?php _e("Go to HTML mode in content editor and pull your custom HTML code all together in one line. Don't leave blank lines between two tags. That should fix it.", "translate_icegram"); ?></p>
301
+
302
+ <h4><?php _e("How do I add custom CSS for messages?", "translate_icegram"); ?></h4>
303
+ <p><?php _e("You can use custom CSS/JS inline in your message HTML. You can also use your theme's custom JS / CSS feature to add your changes.", "translate_icegram"); ?></p>
304
+
305
+ <h4><?php _e("Optin Forms / Mailing service integration...", "translate_icegram"); ?></h4>
306
+ <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.", "translate_icegram"); ?></p>
307
+
308
+ </div>
309
+ <div class="col-2 last-feature">
310
+ <h4><?php _e("Preview does not work / not refreshing...", "translate_icegram"); ?></h4>
311
+ <p><?php _e("Doing a browser refresh while previewing will not show your most recent changes. Click 'Preview' button to see a preview with your latest changes.", "translate_icegram"); ?></p>
312
+
313
+ <h4><?php _e("Can I use shortcodes in a message?", "translate_icegram"); ?></h4>
314
+ <p><?php _e("Yes! Messages support shortcodes. You may need to adjust CSS so the shortcode output looks good in your message.", "translate_icegram"); ?></p>
315
+
316
+
317
+ <h4><?php _e("I can't find a way to do X...", "translate_icegram"); ?></h4>
318
+ <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.", "translate_icegram"); ?></p>
319
+
320
+ <h4><?php _e("I'm facing a problem and can't find a way out...", "translate_icegram"); ?></h4>
321
+ <p><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=icegram" ?>"><?php _e("Contact Us", "translate_icegram"); ?></a><?php _e(", provide as much detail of the problem as you can. We will try to solve the problem ASAP.", "translate_icegram"); ?></p>
322
+
323
+ <h4><?php _e("", "translate_icegram"); ?></h4>
324
+ <p><?php _e("", "translate_icegram"); ?></p>
325
+ </div>
326
+ </div>
327
+
328
+
329
+ </div>
330
+
331
+ </div>
assets/css/action-bar/air-mail.css ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .air-mail.container {
2
+ position: relative;
3
+ display: none;
4
+ width: 100%;
5
+ background-color: #fff;
6
+ -webkit-background-clip: padding-box;
7
+ background-clip: padding-box;
8
+ background-image: -moz-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
9
+ background-image: -o-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
10
+ background-image: -webkit-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
11
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #e5e5e5 0%), color-stop(1, #f7f7f7 100%));
12
+ filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#e5e5e5 0%, EndColorStr=#f7f7f7 100%)";
13
+ background-image: linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
14
+ padding: 0;
15
+ margin: 0;
16
+ z-index: 100000;
17
+ }
18
+
19
+ .air-mail.container:before {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ width: 100%;
24
+ height: 100%;
25
+ background: #D1D1D1;
26
+ background: repeating-linear-gradient(45deg, #b37b7a, #b37b7a 10px, transparent 10px, transparent 20px, #7897ba 20px, #7897ba 30px, transparent 30px, transparent 40px);
27
+ -webkit-background-clip: padding-box;
28
+ background-clip: padding-box;
29
+ content: "";
30
+ }
31
+
32
+ .air-mail.container.top {
33
+ padding-bottom: 7px;
34
+ }
35
+
36
+ .air-mail.container.bottom {
37
+ padding-top: 7px;
38
+ }
39
+
40
+ .air-mail .content {
41
+ position: relative;
42
+ display: block;
43
+ background: #F2F2F2;
44
+ /*
45
+ background-image: -moz-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
46
+ background-image: -o-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
47
+ background-image: -webkit-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
48
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #e5e5e5 0%), color-stop(1, #f7f7f7 100%));
49
+ filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#e5e5e5 0%, EndColorStr=#f7f7f7 100%)";
50
+ background-image: linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
51
+ */
52
+ color: #FFF;
53
+ padding: 1em 1em .25em 1em;
54
+ }
55
+
56
+ .air-mail .heading {
57
+ font-size: 1.3em;
58
+ font-weight: 700;
59
+ line-height: 1.2em;
60
+ padding: 0 10px;
61
+ }
62
+
63
+ .air-mail .popup_box_image {
64
+ display: inline-block;
65
+ vertical-align: top;
66
+ }
67
+
68
+ .air-mail img.icon {
69
+ width: 50px;
70
+ }
71
+
72
+ .air-mail .message {
73
+ line-height: 1.2em;
74
+ padding: 5px 10px;
75
+ }
76
+
77
+ .air-mail .data {
78
+ max-width: 75%;
79
+ display: inline-block;
80
+ }
81
+
82
+ .air-mail .popup_button, .air-mail input[type="submit"], .air-mail input[type="button"] {
83
+ cursor: pointer;
84
+ letter-spacing: 1px;
85
+ vertical-align: text-bottom;
86
+ text-align: center;
87
+ display: inline-block;
88
+ color: #FFF;
89
+ background: hsl(216, 46%, 50%);
90
+ white-space: nowrap;
91
+ border: 2px solid #fff !important;
92
+ font-weight: 500;
93
+ font-style: normal;
94
+ position: relative;
95
+ -moz-border-radius: 2px;
96
+ -webkit-border-radius: 2px;
97
+ border-radius: 2px;
98
+ padding: .7em 2em;
99
+ }
100
+
101
+ .air-mail .popup_button:hover, .air-mail input[type="submit"]:hover, .air-mail input[type="button"]:hover {
102
+ color: rgb(242, 245, 250);
103
+ background: hsl(216, 50%, 47%);
104
+ text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
105
+ border: 2px solid #4472b9 !important;
106
+ }
107
+
108
+ .air-mail .popup_button:active, .air-mail input[type="submit"]:active, .air-mail input[type="button"]:active {
109
+ -moz-transform: translate(1px, 4px);
110
+ -ms-transform: translate(1px, 4px);
111
+ -o-transform: translate(1px, 4px);
112
+ -webkit-transform: translate(1px, 4px);
113
+ transform: translate(1px, 4px);
114
+ -moz-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
115
+ -webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
116
+ box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
117
+ }
118
+
119
+ .air-mail .close {
120
+ background: url(../../images/chosen-sprite.png) no-repeat -43px 0;
121
+ height: 10px;
122
+ width: 10px;
123
+ -moz-box-sizing: content-box;
124
+ box-sizing: content-box;
125
+ position: absolute !important;
126
+ top: 7px;
127
+ right: 7px;
128
+ cursor: pointer;
129
+ zoom: 1.3;
130
+ }
131
+
132
+ .air-mail .popup_close {
133
+ display: none;
134
+ }
135
+ .air-mail .powered_by img {
136
+ margin: 0 !important;
137
+ }
assets/css/action-bar/bold.css ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .bold.container {
2
+ left: 0;
3
+ width: 100%;
4
+ z-index: 100000;
5
+ display: none;
6
+ padding: 0;
7
+ margin: 0;
8
+ }
9
+
10
+ .bold.container.top {
11
+ border-bottom: solid 3px #f3eeee;
12
+ -moz-box-shadow: 0 -6px 16px 7px #000;
13
+ -webkit-box-shadow: 0 -6px 16px 7px #000;
14
+ box-shadow: 0 -6px 16px 7px #000;
15
+ }
16
+
17
+ .bold.container.bottom {
18
+ border-top: solid 3px #f3eeee;
19
+ -moz-box-shadow: 0 8px 23px 7px #000;
20
+ -webkit-box-shadow: 0 8px 23px 7px #000;
21
+ box-shadow: 0 8px 23px 7px #000;
22
+ }
23
+
24
+ .bold .heading {
25
+ font-size: 1.3em;
26
+ font-weight: 700;
27
+ line-height: 1.2em;
28
+ padding: 0 10px;
29
+ }
30
+
31
+ .bold .popup_box_image {
32
+ display: inline-block;
33
+ vertical-align: top;
34
+ }
35
+
36
+ .bold img.icon {
37
+ width: 50px;
38
+ }
39
+
40
+ .bold .message {
41
+ line-height: 1.2em;
42
+ padding: 5px 10px;
43
+ }
44
+
45
+ .bold .content {
46
+ color: #FFF;
47
+ padding: 1em 0 0 1em;
48
+ }
49
+
50
+ .bold .data {
51
+ max-width: 75%;
52
+ display: inline-block;
53
+ }
54
+
55
+ .bold .popup_button, .bold input[type="submit"], .bold input[type="button"] {
56
+ cursor: pointer;
57
+ background: hsl(145, 82%, 30%);
58
+ color: hsl(0, 100%, 100%);
59
+ display: inline-block;
60
+ font-size: 1em;
61
+ letter-spacing: 1px;
62
+ vertical-align: text-bottom;
63
+ font-weight: 700;
64
+ text-align: center;
65
+ -moz-box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.25);
66
+ -webkit-box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.25);
67
+ box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.25);
68
+ -moz-border-radius: 3px;
69
+ -webkit-border-radius: 3px;
70
+ border-radius: 3px;
71
+ text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
72
+ padding: .7em 2em;
73
+ }
74
+
75
+ .bold .popup_button:active, .bold input[type="submit"]:active, .bold input[type="button"]:active {
76
+ position: relative;
77
+ top: 3px;
78
+ -moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
79
+ -webkit-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
80
+ box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
81
+ }
82
+
83
+ .bold .popup_close.border {
84
+ border: 3px solid #fff;
85
+ -moz-box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
86
+ -webkit-box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
87
+ box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
88
+ -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
89
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
90
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
91
+ }
92
+
93
+ .bold.top .popup_close.border, .bold.bottom .popup_close {
94
+ border-width: 0 3px 3px 3px;
95
+ -moz-border-radius: 0 0 5px 5px;
96
+ -webkit-border-radius: 0 0 5px 5px;
97
+ border-radius: 0 0 5px 5px;
98
+ }
99
+
100
+ .bold.bottom .popup_close.border, .bold.top .popup_close {
101
+ border-width: 3px 3px 0 3px;
102
+ -moz-border-radius: 5px 5px 0 0;
103
+ -webkit-border-radius: 5px 5px 0 0;
104
+ border-radius: 5px 5px 0 0;
105
+ padding: .8em .4em;
106
+ }
assets/css/action-bar/hello.css ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .hello.container {
2
+ left: 0;
3
+ line-height: 1.5em;
4
+ overflow: visible;
5
+ width: 100%;
6
+ z-index: 100000;
7
+ display: none;
8
+ padding: 0;
9
+ margin: 0;
10
+ }
11
+
12
+ .hello.container.top {
13
+ border-bottom: 3px solid #fff;
14
+ -moz-box-shadow: 0 -6px 16px 7px #000;
15
+ -webkit-box-shadow: 0 -6px 16px 7px #000;
16
+ box-shadow: 0 -6px 16px 7px #000;
17
+ }
18
+
19
+ .hello.container.bottom {
20
+ border-top: 3px solid #fff;
21
+ -moz-box-shadow: 0 8px 23px 7px #000;
22
+ -webkit-box-shadow: 0 8px 23px 7px #000;
23
+ box-shadow: 0 8px 23px 7px #000;
24
+ }
25
+
26
+ .hello .heading, .hello .message {
27
+ display: inline-block;
28
+ margin-right: 1.5em;
29
+ }
30
+
31
+ .hello .heading {
32
+ font-weight: bold;
33
+ }
34
+
35
+ .hello .icon {
36
+ width: 32px;
37
+ height: 32px;
38
+ }
39
+
40
+ .hello .content p {
41
+ margin: 0;
42
+ line-height: 1.2em;
43
+ }
44
+
45
+ .hello .content {
46
+ padding: .3em;
47
+ }
48
+
49
+ .hello .popup_button, .hello input[type="submit"], .hello input[type="button"] {
50
+ display: inline;
51
+ background: #4A4844;
52
+ background: linear-gradient(top, #4A4844 0%, #2D2C29 100%);
53
+ background: -moz-linear-gradient(top, #4A4844 0%, #2D2C29 100%);
54
+ background: -o-linear-gradient(top, #4A4844 0%, #2D2C29 100%);
55
+ background: -webkit-linear-gradient(top, #4A4844 0%, #2D2C29 100%);
56
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #4A4844 0%), color-stop(1, #2D2C29 100%));
57
+ filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#4A4844 0%, EndColorStr=#2D2C29 100%)";
58
+ -moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.28);
59
+ -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.28);
60
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.28);
61
+ color: #FFF;
62
+ font-weight: 400;
63
+ text-align: center;
64
+ -moz-border-radius: 4px;
65
+ -webkit-border-radius: 4px;
66
+ border-radius: 4px;
67
+ text-decoration: none;
68
+ cursor: pointer;
69
+ font-size: 1em;
70
+ margin: 4px 0 0 10px;
71
+ padding: .25em 1em;
72
+ vertical-align: text-bottom;
73
+ }
74
+
75
+ .hello .popup_button:hover, .hello input[type="submit"]:hover, .hello input[type="button"]:hover {
76
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
77
+ filter: alpha(opacity=80);
78
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
79
+ filter: alpha(opacity=80);
80
+ opacity: 0.8;
81
+ }
82
+
83
+ .hello .popup_box_image {
84
+ display: inline-block;
85
+ vertical-align: top;
86
+ line-height: 0;
87
+ }
88
+
89
+ .hello .data {
90
+ /*display: inline-block;
91
+ width: 80%;
92
+ max-width: 80%;
93
+ margin: 0 0 0 1em;*/
94
+ text-align: center;
95
+ }
96
+
97
+ .hello .popup_close.border {
98
+ border: 3px solid #fff;
99
+ -moz-box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
100
+ -webkit-box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
101
+ box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
102
+ -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
103
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
104
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
105
+ }
106
+
107
+ .hello.top .popup_close.border, .hello.bottom .popup_close {
108
+ border-width: 0 3px 3px 3px;
109
+ -moz-border-radius: 0 0 7px 7px;
110
+ -webkit-border-radius: 0 0 7px 7px;
111
+ border-radius: 0 0 7px 7px;
112
+ }
113
+
114
+ .hello.bottom .popup_close.border, .hello.top .popup_close {
115
+ border-width: 3px 3px 0 3px;
116
+ -moz-border-radius: 7px 7px 0 0;
117
+ -webkit-border-radius: 7px 7px 0 0;
118
+ border-radius: 7px 7px 0 0;
119
+ padding: .8em .4em;
120
+ }
121
+
122
+ .hello .powered_by img {
123
+ width: 24px;
124
+ }
125
+
126
+ .hello .powered_by {
127
+ margin-top: 0;
128
+ height: 32px;
129
+ }
130
+
131
+ .hello .powered_by img {
132
+ width: 1.5em !important;
133
+ margin-left: 1em !important;
134
+ margin-top: .4em !important;
135
+ }
assets/css/action-bar/solid.css ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .solid.container {
2
+ left: 0;
3
+ width: 100%;
4
+ z-index: 100000;
5
+ display: none;
6
+ padding: 0;
7
+ }
8
+
9
+ .solid .heading {
10
+ font-size: 1.2em;
11
+ line-height: 1em;
12
+ padding: 0 10px;
13
+ }
14
+
15
+ .solid .popup_box_image {
16
+ display: inline-block;
17
+ vertical-align: top;
18
+ }
19
+
20
+ .solid img.icon {
21
+ width: 50px;
22
+ }
23
+
24
+ .solid .message {
25
+ line-height: 1em;
26
+ padding: 5px 10px;
27
+ }
28
+
29
+ .solid .content {
30
+ color: #FFF;
31
+ padding: 1em 0 0 1em;
32
+ }
33
+
34
+ .solid .data {
35
+ max-width: 75%;
36
+ display: inline-block;
37
+ }
38
+
39
+ .solid .popup_button, .solid input[type="submit"], .solid input[type="button"] {
40
+ cursor: pointer;
41
+ background: #02612B;
42
+ color: hsl(0, 100%, 100%);
43
+ display: inline-block;
44
+ font-size: 1em;
45
+ letter-spacing: .1em;
46
+ -moz-border-radius: 0.1em;
47
+ -webkit-border-radius: 0.1em;
48
+ border-radius: 0.1em;
49
+ vertical-align: text-bottom;
50
+ font-weight: 700;
51
+ padding: .6em 2em;
52
+ }
53
+
54
+ .solid .popup_button:hover, .solid input[type="submit"]:hover, .solid input[type="button"]:hover {
55
+ background-color: #25a25a;
56
+ }
57
+
58
+ .solid.top .popup_close.border, .solid.bottom .popup_close {
59
+ border-width: 0 3px 3px 3px;
60
+ }
61
+
62
+ .solid.bottom .popup_close.border, .solid.top .popup_close {
63
+ border-width: 3px 3px 0 3px;
64
+ padding: .8em .4em;
65
+ }
assets/css/admin.css ADDED
@@ -0,0 +1,608 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .campaign_target_rules_panel .options_group {
2
+ border-bottom: 1px dashed #D3D3D3;
3
+ }
4
+
5
+ .campaign_target_rules_panel .options_group:last-child {
6
+ border-bottom-style: none;
7
+ }
8
+
9
+ .campaign_target_rules_panel .options_group .form-field .options_header {
10
+ display: inline-block;
11
+ width: 30%;
12
+ vertical-align: top;
13
+ }
14
+
15
+ .campaign_target_rules_panel .options_group p label input[type=checkbox], .campaign_target_rules_panel .options_group p label input[type=radio] {
16
+ width: 0;
17
+ }
18
+
19
+ .campaign_target_rules_panel .options_group p label input[type=date] {
20
+ width: auto;
21
+ margin-left: 10px;
22
+ }
23
+
24
+ .user_roles p label input[type=checkbox], .user_roles p label input[type=radio] {
25
+ margin-left: 3px;
26
+ }
27
+
28
+ .campaign_target_rules_panel .options_group .form-field #icegram_messages {
29
+ width: 300px;
30
+ text-align: center;
31
+ }
32
+
33
+ .empty_campaign {
34
+ margin: 1em;
35
+ font-style: italic;
36
+ }
37
+
38
+ .hndle em {
39
+ font-weight: normal;
40
+ font-size: 85%;
41
+ margin-left: 1em;
42
+ color: #777;
43
+ }
44
+
45
+ h3 .chosen-container {
46
+ font-weight: 500;
47
+ }
48
+
49
+ .thickbox_edit_message {
50
+ padding: 0 1em;
51
+ border-bottom: 1px solid #D3D3D3;
52
+ }
53
+
54
+ .messages-list-sortable {
55
+ margin-top: 30px;
56
+ }
57
+
58
+ .messages_list_table {
59
+ font-size: 1em;
60
+ width: 100%;
61
+ border-collapse: separate;
62
+ border-spacing: 3px;
63
+ }
64
+
65
+ th.message_header {
66
+ text-align: center !important;
67
+ }
68
+
69
+ .message_title {
70
+ text-align: left;
71
+ padding-left: 1.2em;
72
+ }
73
+
74
+ .message_seconds, .action_links {
75
+ width: 75px !important;
76
+ text-align: center;
77
+ }
78
+
79
+ .message_seconds input {
80
+ text-align: right;
81
+ }
82
+
83
+ .message-row .seconds-text {
84
+ width: 40px;
85
+ text-align: center;
86
+ }
87
+
88
+ .message-sort-placeholder {
89
+ background-color: #D3D3D3;
90
+ }
91
+
92
+ .device {
93
+ width: auto;
94
+ line-height: 5em;
95
+ vertical-align: baseline;
96
+ }
97
+
98
+ .device:after {
99
+ font-family: dashicons;
100
+ font-size: 3em;
101
+ }
102
+
103
+ .device input {
104
+ position: relative;
105
+ left: 2.5em;
106
+ top: 1.5em;
107
+ }
108
+
109
+ .admin_field_icon {
110
+ display: inline-block;
111
+ -webkit-font-smoothing: antialiased;
112
+ width: 18px;
113
+ height: 18px;
114
+ font: 400 18px/1 dashicons;
115
+ color: #888;
116
+ vertical-align: text-top;
117
+ margin: 0 2px;
118
+ }
119
+
120
+ .campaign_preview,
121
+ .message_preview {
122
+ float: right;
123
+ margin-right: 1em !important;
124
+ }
125
+
126
+ .shortcode_description:before {
127
+ content: "\f348";
128
+ }
129
+
130
+ .campaign_shortcode {
131
+ display: block;
132
+ margin-left: 30%;
133
+ }
134
+
135
+ label[for=device_mobile] {
136
+ margin-left: -2em;
137
+ }
138
+
139
+ label[for=device_mobile]:after {
140
+ content: "\f470";
141
+ }
142
+
143
+ label[for=device_tablet]:after {
144
+ content: "\f471";
145
+ }
146
+
147
+ label[for=device_laptop]:after {
148
+ content: "\f472";
149
+ }
150
+
151
+ .date_picker:after {
152
+ font-family: dashicons;
153
+ content: "\f145";
154
+ position: relative;
155
+ top: 5px;
156
+ font: normal 20px/1 dashicons;
157
+ vertical-align: top;
158
+ }
159
+
160
+ .date_picker {
161
+ margin-left: 1em;
162
+ }
163
+
164
+ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button {
165
+ -webkit-appearance: none;
166
+ appearance: none;
167
+ margin: 0;
168
+ }
169
+
170
+ .date-picker {
171
+ max-width: 15%;
172
+ }
173
+
174
+ .campaign_target_rules_panel .options_group .messages-list .form-field .message_header {
175
+ width: 75px !important;
176
+ text-align: right;
177
+ }
178
+
179
+ .disable {
180
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
181
+ filter: alpha(opacity=30);
182
+ opacity: 0.3;
183
+ }
184
+
185
+ .enable {
186
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
187
+ filter: alpha(opacity=100);
188
+ opacity: 1;
189
+ }
190
+
191
+ .message_edit:after {
192
+ content: "\f464";
193
+ }
194
+
195
+ .message_delete:after {
196
+ content: "\f158";
197
+ }
198
+
199
+ .actions:after {
200
+ font-family: dashicons;
201
+ font-size: 1.4em;
202
+ }
203
+
204
+ .actions {
205
+ text-decoration: none;
206
+ color: #444;
207
+ padding-right: 3px;
208
+ cursor: pointer;
209
+ }
210
+
211
+ .actions:hover {
212
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
213
+ filter: alpha(opacity=70);
214
+ opacity: 0.7;
215
+ }
216
+
217
+ .action_links {
218
+ vertical-align: middle;
219
+ }
220
+
221
+ .message_header_label {
222
+ color: #fff;
223
+ text-align: center;
224
+ font-size: 0.7em;
225
+ padding: 3px 5px;
226
+ cursor: auto;
227
+ text-transform: uppercase;
228
+ }
229
+
230
+ .message_header .messenger {
231
+ background-color: #883EB0;
232
+ }
233
+
234
+ .message_header .action-bar {
235
+ background-color: #DF6B00;
236
+ }
237
+
238
+ .message_header .toast {
239
+ background-color: #EDBB00;
240
+ }
241
+
242
+ .message_header .popup {
243
+ background-color: #22B189;
244
+ }
245
+
246
+ .message_label {
247
+ float: left;
248
+ width: 25%;
249
+ padding: 0;
250
+ }
251
+
252
+ .message_field {
253
+ width: 65%;
254
+ display: inline-block;
255
+ }
256
+
257
+ .message_image_button .image-buttons-icon:before {
258
+ content: "\f128";
259
+ }
260
+
261
+ .message_title_button .title-buttons-icon:before {
262
+ content: "\f130";
263
+ }
264
+
265
+ .help_tip:after {
266
+ content: "\f223";
267
+ }
268
+
269
+ .help_tip {
270
+ float: right;
271
+ margin: 4px 0;
272
+ cursor: help;
273
+ text-decoration: none;
274
+ }
275
+
276
+ .chosen-container {
277
+ width: 65% !important;
278
+ }
279
+
280
+ .message_row.position {
281
+ height: 110px;
282
+ }
283
+ .location-selector input[type=radio]:checked + label span {
284
+ background-color: #2ea2cc;
285
+ }
286
+
287
+ .location-selector {
288
+ width: 128px;
289
+ height: 115px;
290
+ position: absolute;
291
+ display: block;
292
+ margin-left: 24.3%;
293
+ background-image: url(../images/desktop.png);
294
+ background-position: 0 -19px;
295
+ }
296
+
297
+ .location-selector .location {
298
+ background-color: #ddd;
299
+ cursor: pointer;
300
+ position: absolute;
301
+ }
302
+
303
+ .location-selector .location:hover {
304
+ background-color: #ccc;
305
+ }
306
+
307
+ .location-selector .location.top, .location-selector .location.bottom, .location-selector .location.middle {
308
+ height: 14%;
309
+ width: 14%;
310
+ right: 42%;
311
+ }
312
+
313
+ .location-selector .location.top {
314
+ top: 13px;
315
+ }
316
+
317
+ .location-selector .location.middle {
318
+ top: 30%;
319
+ }
320
+
321
+ .location-selector .location.bottom {
322
+ bottom: 43px;
323
+ }
324
+
325
+ .location-selector .location.right, .location-selector .location.left {
326
+ height: 14%;
327
+ width: 14%;
328
+ margin-left: 0;
329
+ margin-right: 0;
330
+ }
331
+
332
+ .location-selector .location.right {
333
+ right: 15px;
334
+ }
335
+
336
+ .location-selector .location.left {
337
+ left: 15px;
338
+ }
339
+
340
+ .wp-editor-container {
341
+ margin-left: 25%;
342
+ }
343
+
344
+ .message-setting-fields #upload_image, .message-setting-fields #message_title {
345
+ width: 58%;
346
+ }
347
+
348
+ .wp-editor-container span .mceLayout {
349
+ width: 50%;
350
+ }
351
+
352
+ #ui-datepicker-div,
353
+ #wp-admin-bar-view,
354
+ #edit-slug-box,
355
+ .empty_campaign,
356
+ .location-selector input[type=radio] {
357
+ display: none;
358
+ }
359
+
360
+ #the-list .message_thumbnail img {
361
+ max-width: 200px;
362
+ max-height: 100px;
363
+ }
364
+
365
+ #icegram_messages + .chosen-container-single .chosen-search input[type=text] {
366
+ width: 100% !important;
367
+ }
368
+ .message_theme + .chosen-container.chosen-container .chosen-results {
369
+ max-height: 30em !important;
370
+ }
371
+ .message_theme_action-bar + .chosen-container-single .chosen-single {
372
+ height: 3.1em !important;
373
+ }
374
+ .message_theme_messenger + .chosen-container-single .chosen-single {
375
+ height: 7em !important;
376
+ }
377
+ .message_theme_popup + .chosen-container-single .chosen-single {
378
+ height: 6em !important;
379
+ }
380
+ .message_theme_toast + .chosen-container-single .chosen-single {
381
+ height: 5em !important;
382
+ }
383
+ .message_theme + .chosen-container-single .chosen-single span {
384
+ background-repeat: no-repeat !important;
385
+ }
386
+ .message_theme_action-bar + .chosen-container-single .chosen-single span {
387
+ background-size: 350px !important;
388
+ background-position: 100% 50% !important;
389
+ line-height: 3em !important;
390
+ }
391
+ .message_theme_messenger + .chosen-container-single .chosen-single span {
392
+ background-size: 70px !important;
393
+ background-position: 100% 50% !important;
394
+ line-height: 7em !important;
395
+ }
396
+ .message_theme_popup + .chosen-container-single .chosen-single span {
397
+ background-size: 9em !important;
398
+ background-position: 100% 50% !important;
399
+ line-height: 6em !important;
400
+ }
401
+ .message_theme_toast + .chosen-container-single .chosen-single span {
402
+ background-size: 11em !important;
403
+ background-position: 100% 50% !important;
404
+ line-height: 5em !important;
405
+ }
406
+ .message_theme + .chosen-container .chosen-results li.highlighted {
407
+ color: #000 !important;
408
+ border: 2px solid #2ea2cc !important;
409
+ background-color: #EAEFFF !important;
410
+ }
411
+ .message_theme + .chosen-container .chosen-results li{
412
+ border: 2px solid #EEE !important;
413
+ font-weight: 700 !important;
414
+ display: inline-block !important;
415
+ text-align: center !important;
416
+ background-repeat: no-repeat !important;
417
+ }
418
+
419
+ .message_theme_action-bar + .chosen-container .chosen-results li {
420
+ width: 92% !important;
421
+ height: 4.5em !important;
422
+ margin: 0% 0% 3% 2%;
423
+ background-position: 0.6em 1.9em !important;
424
+ -webkit-background-size: 97% !important;
425
+ background-size: 97% !important;
426
+ }
427
+ .message_theme_messenger + .chosen-container .chosen-results li {
428
+ width: 28.5% !important;
429
+ height: 13.6em !important;
430
+ margin: 0% 0% 1% 1%;
431
+ background-position: 0.3em 1.9em !important;
432
+ -webkit-background-size: 96% !important;
433
+ background-size: 96% !important;
434
+ }
435
+ .message_theme_popup + .chosen-container .chosen-results li {
436
+ width: 43% !important;
437
+ height: 10em !important;
438
+ margin: 0% 0% 2% 2%;
439
+ background-position: 0.5em 2em !important;
440
+ -webkit-background-size: 95% !important;
441
+ background-size: 95% !important;
442
+ }
443
+ .message_theme_toast + .chosen-container .chosen-results li {
444
+ width: 43% !important;
445
+ height: 7.5em !important;
446
+ margin: 0% 0% 2% 2%;
447
+ background-position: 0.5em 2em !important;
448
+ -webkit-background-size: 94% !important;
449
+ background-size: 94% !important;
450
+ }
451
+
452
+ /************* jQuery TipTip ************/
453
+ #tiptip_holder {
454
+ display: none;
455
+ position: absolute;
456
+ top: 0;
457
+ left: 0;
458
+ z-index: 99999;
459
+ }
460
+ #tiptip_holder.tip_top {
461
+ padding-bottom: 5px;
462
+ }
463
+ #tiptip_holder.tip_top #tiptip_arrow_inner {
464
+ margin-top: -7px;
465
+ margin-left: -6px;
466
+ border-top-color: #464646;
467
+ }
468
+ #tiptip_holder.tip_bottom {
469
+ padding-top: 5px;
470
+ }
471
+ #tiptip_holder.tip_bottom #tiptip_arrow_inner {
472
+ margin-top: -5px;
473
+ margin-left: -6px;
474
+ border-bottom-color: #464646;
475
+ }
476
+ #tiptip_holder.tip_right {
477
+ padding-left: 5px;
478
+ }
479
+ #tiptip_holder.tip_right #tiptip_arrow_inner {
480
+ margin-top: -6px;
481
+ margin-left: -5px;
482
+ border-right-color: #464646;
483
+ }
484
+ #tiptip_holder.tip_left {
485
+ padding-right: 5px;
486
+ }
487
+ #tiptip_holder.tip_left #tiptip_arrow_inner {
488
+ margin-top: -6px;
489
+ margin-left: -7px;
490
+ border-left-color: #464646;
491
+ }
492
+ #tiptip_content, .chart-tooltip {
493
+ font-size: 11px;
494
+ color: #fff;
495
+ padding: .5em;
496
+ background: #464646;
497
+ -webkit-border-radius: 3px;
498
+ -moz-border-radius: 3px;
499
+ border-radius: 3px;
500
+ -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, .1);
501
+ -moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, .1);
502
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, .1);
503
+ text-align: center;
504
+ max-width: 150px;
505
+ }
506
+ #tiptip_content code, .chart-tooltip code {
507
+ background: #888;
508
+ padding: 1px;
509
+ }
510
+ #tiptip_arrow, #tiptip_arrow_inner {
511
+ position: absolute;
512
+ border-color: transparent;
513
+ border-style: solid;
514
+ border-width: 6px;
515
+ height: 0;
516
+ width: 0;
517
+ }
518
+ /************* jQuery TipTip ************/
519
+ /**
520
+ Support
521
+ **/
522
+ table#icegram_post_query_table {
523
+ padding: 5px;
524
+ }
525
+ table#icegram_post_query_table tr td {
526
+ padding: 5px;
527
+ }
528
+ input.sm_text_field {
529
+ padding: 5px;
530
+ }
531
+ #icegram_post_query_table label {
532
+ font-weight: bold;
533
+ }
534
+
535
+ /**
536
+ CSS for landing page and Help and Support
537
+ **/
538
+ .icegram-dashicons:before {
539
+ font-family: dashicons;
540
+ position: relative;
541
+ font-family: dashicons;
542
+ font-style: normal;
543
+ vertical-align: middle;
544
+ font-size: 2em;
545
+ }
546
+
547
+ .about-wrap.icegram h2{
548
+ color: #3754a8;
549
+ }
550
+
551
+ .about-wrap.icegram h2{
552
+ padding-top: 19px;
553
+ font-weight: 600;
554
+ }
555
+
556
+ .icegram-dashicons-testimonial h4{
557
+ font-size: 1.5em;
558
+ }
559
+
560
+ .icegram-badge {
561
+ background: #3754a8 url(../images/icegram-logo-branding-64-white.png) no-repeat;
562
+ background-position: center 24px;
563
+ color: #FFF;
564
+ font-size: 12px;
565
+ text-align: center;
566
+ font-weight: 600;
567
+ margin: 5px 0 0;
568
+ padding-top: 120px;
569
+ height: 24px;
570
+ display: inline-block;
571
+ width: 150px;
572
+ text-rendering: optimizeLegibility;
573
+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2);
574
+ box-shadow: 0 1px 3px rgba(0,0,0,0.2);
575
+ }
576
+
577
+
578
+ .about-wrap .icegram-badge {
579
+ position: absolute;
580
+ top: 0;
581
+ right: 0;
582
+ }
583
+ .icegram-support{
584
+ font-size: 14px;
585
+ color: black;
586
+ margin: 15px 0 0;
587
+ height: 10px;
588
+ width: 180px;
589
+ text-align: center;
590
+ text-rendering: optimizeLegibility;
591
+ /*-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2);*/
592
+ /*box-shadow: 0 1px 3px rgba(0,0,0,0.2);*/
593
+ position: absolute;
594
+ top: 0;
595
+ right: 0;
596
+ margin-top: 19%;
597
+ text-align: right;
598
+ }
599
+ .icegram-contact-us{
600
+ font-size: 20px;
601
+ line-height: 1.5em;
602
+ font-weight: 800;
603
+ margin-right: 18px;
604
+ }
605
+
606
+ .icegram-contact-us a{
607
+ color: #3754a8;
608
+ }
assets/css/chosen.css ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/chosen.min.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
+
3
+ .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:23px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(../images/chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(../images/chosen-sprite.png) no-repeat 100% -20px;background:url(../images/chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:0;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:0}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(../images/chosen-sprite.png) no-repeat -30px -20px;background:url(../images/chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
assets/css/frontend.css ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .toast-block {
2
+ position: fixed;
3
+ list-style: none;
4
+ z-index: 999999;
5
+ -ms-word-wrap: break-word;
6
+ word-wrap: break-word;
7
+ padding: 0;
8
+ margin: 5px;
9
+ }
10
+
11
+ .toast-block * {
12
+ -webkit-box-sizing: content-box;
13
+ -moz-box-sizing: content-box;
14
+ box-sizing: content-box;
15
+ text-transform: none;
16
+ }
17
+
18
+ .toast-block .toast-container {
19
+ margin: 10px 0;
20
+ }
21
+
22
+ .toast-block .toast-title {
23
+ font-weight: bold;
24
+ clear: none;
25
+ padding: 0;
26
+ }
27
+
28
+ .toast-block .toast-message {
29
+ font-size: 12px;
30
+ text-align: left;
31
+ line-height: 15px;
32
+ }
33
+
34
+ /* animation 1*/
35
+ .toast-block .bang .toast-icon {
36
+ -webkit-animation: MainMoveIcon 1s;
37
+ }
38
+
39
+ .toast-block .bang .toast-base {
40
+ -webkit-animation: MainMove 1s;
41
+ }
42
+
43
+ .toast-block .bang .toast-title, .toast-block .bang .toast-message {
44
+ -webkit-animation: MainMoveText 1s;
45
+ }
46
+ @-webkit-keyframes MainMove {
47
+ 0% { opacity: 0; }
48
+ 70% { opacity: 0.1;-webkit-transform: scale(.3) rotateX(180deg); }
49
+ 90% { opacity: 0.7; -webkit-transform: scale(1.1) rotateX(0deg); }
50
+ 100% { opacity: 1;-webkit-transform: scale(1) rotateX(0deg); }
51
+ }
52
+ @-webkit-keyframes MainMoveIcon {
53
+ 0% { opacity: 0; -webkit-transform: scale(.3) rotateY(180deg); }
54
+ 70% { opacity: 1; -webkit-transform: scale(1.1) rotateY(0deg); }
55
+ 100% { -webkit-transform: scale(1) rotateY(0deg); }
56
+ }
57
+ @-webkit-keyframes MainMoveText {
58
+ 0% { opacity: 0; }
59
+ 90% { opacity: 0; -webkit-transform: translate(0px, 10px); }
60
+ 100% { opacity: 1; -webkit-transform: translate(0px, 0px); }
61
+ }
62
+ /* animation 2*/
63
+ .toast-block .slide-down .toast-title {
64
+ -moz-transition: all 0.2s linear;
65
+ -o-transition: all 0.2s linear;
66
+ -webkit-transition: all 0.2s linear;
67
+ transition: all 0.2s linear;
68
+ }
69
+
70
+ .toast-block .slide-down .toast-message {
71
+ -moz-transition: all 0.2s linear;
72
+ -o-transition: all 0.2s linear;
73
+ -webkit-transition: all 0.2s linear;
74
+ transition: all 0.2s linear;
75
+ }
76
+
77
+ .toast-block .slide-down.toast-container {
78
+ -webkit-animation-name: banner;
79
+ -webkit-animation-duration: 0.5s;
80
+ -webkit-animation-iteration-count: 1;
81
+ -webkit-animation-timing-function: ease-in;
82
+ }
83
+
84
+ .toast-block .slide-down .toast-icon {
85
+ -webkit-animation-name: fade;
86
+ -webkit-animation-duration: 0.7s;
87
+ -webkit-animation-iteration-count: 1;
88
+ -webkit-animation-timing-function: ease-in;
89
+ }
90
+
91
+ @-webkit-keyframes banner {
92
+ from {
93
+ -webkit-transform: rotateX(90deg) translateY(-40px) perspective(300);
94
+ opacity: 0;
95
+ }
96
+
97
+ 60% {
98
+ -webkit-transform: rotateX(-10deg) translateY(5px) perspective(400);
99
+ opacity: 1;
100
+ }
101
+
102
+ to {
103
+ -webkit-transform: rotateX(0deg) translateY(0px) perspective(400);
104
+ opacity: 1;
105
+ }
106
+ }
107
+
108
+ @-webkit-keyframes fade {
109
+ from {
110
+ opacity: 0;
111
+ }
112
+
113
+ 30% {
114
+ opacity: 0;
115
+ }
116
+
117
+ to {
118
+ opacity: 1;
119
+ }
120
+ }
121
+ /* animation 3*/
122
+ .toast-block .pop.toast-container {
123
+ -webkit-animation: BangTidy 1s ease forwards;
124
+ }
125
+
126
+ .toast-block .pop .toast-icon {
127
+ -webkit-animation: BangTidyIcon 1s 0.5s ease both;
128
+ }
129
+
130
+ .toast-block .pop .toast-title, .toast-block .pop .toast-message {
131
+ -webkit-animation: BangTidyText 0.4s 0.5s ease both;
132
+ }
133
+ @-webkit-keyframes BangTidy {
134
+ 0% { opacity: 0; -webkit-transform: scale(.3) rotateX(-360deg); }
135
+ 50% { opacity: 1; -webkit-transform: scale(1.01) rotateX(0deg); }
136
+ 70% { -webkit-transform: scale(.9) rotateX(0deg); }
137
+ 100% { -webkit-transform: scale(1) rotateX(0deg); }
138
+ }
139
+
140
+ @-webkit-keyframes BangTidyIcon {
141
+ 0% { opacity: 0; -webkit-transform: scale(2.8) rotateX(180deg); }
142
+ 50% { opacity: 1; -webkit-transform: scale(0.9) rotateX(0deg); }
143
+ 70% { -webkit-transform: scale(1.25) rotateX(0deg); }
144
+ 100% { -webkit-transform: scale(1) rotateX(0deg); }
145
+ }
146
+
147
+ @-webkit-keyframes BangTidyText {
148
+ 0% { opacity: 0; -webkit-transform: translate(0px, 10px); }
149
+ 100% { opacity: 1; -webkit-transform: translate(0px, 0px); }
150
+ }
151
+ /* animation 4*/
152
+ .toast-block .appear.toast-container {
153
+ -webkit-animation-duration: 0.4s;
154
+ -moz-transition: all 0.15s ease-in-out;
155
+ -o-transition: all 0.15s ease-in-out;
156
+ -webkit-transition: all 0.15s ease-in-out;
157
+ transition: all 0.15s ease-in-out;
158
+ -webkit-animation-name: bubble;
159
+ }
160
+ @-webkit-keyframes 'bubble' {
161
+ from {
162
+ opacity: 0;
163
+ -webkit-transform: scale(0.7);
164
+ -webkit-animation-timing-function: ease-out;
165
+ }
166
+
167
+ 50% {
168
+ -webkit-transform: scale(1.02);
169
+ -webkit-animation-timing-function: cubic-bezier(0.5, 0.2, 0.3, 1.0);
170
+ }
171
+
172
+ to {
173
+ opacity: ignored;
174
+ -webkit-transform: scale(1.0);
175
+ -webkit-animation-timing-function: ease-in;
176
+ }
177
+ }
178
+ /* animation 8*/
179
+ .toast-block .slide-left.toast-container {
180
+ -webkit-animation: slideFromBottom .5s ease-in-out;
181
+ }
182
+ @-webkit-keyframes slideFromBottom {
183
+ 0% { opacity: 0; -webkit-transform: translate3d( -20px, 0, 0 );}
184
+ 100% { opacity: 1; -webkit-transform: translate3d( 0, 0, 0 ); }
185
+ }
186
+
187
+ .powered_by, .powered_by a, a.powered_by {
188
+ color: #A8A8A8 !important;
189
+ text-decoration: none;
190
+ }
191
+ .TB_overlayBG .powered_by {
192
+ position: fixed;
193
+ bottom: 1em;
194
+ left: 1em;
195
+ font-size: 14px;
196
+ padding: 0.1em;
197
+ }
198
+
199
+ .messenger .powered_by {
200
+ font-size: 10px;
201
+ position: relative;
202
+ z-index: 100000;
203
+ }
204
+
205
+ .action-bar .powered_by {
206
+ vertical-align: top;
207
+ opacity: .5;
208
+ display: inline-block;
209
+ float: left;
210
+ }
211
+
212
+ .action-bar.powered_by img {
213
+ width: 32px;
214
+ }
215
+
216
+ .action-bar .popup_close {
217
+ font-weight: 700;
218
+ z-index: 100000;
219
+ right: 10px;
220
+ text-align: right;
221
+ font-size: 20px;
222
+ cursor: pointer;
223
+ line-height: 0;
224
+ padding: 8px;
225
+ float: right;
226
+ }
227
+
228
+ .action-bar .popup_close span {
229
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
230
+ filter: alpha(opacity=60);
231
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
232
+ filter: alpha(opacity=60);
233
+ opacity: 0.6;
234
+ }
235
+
236
+ .action-bar .popup_close span:hover {
237
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
238
+ filter: alpha(opacity=90);
239
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
240
+ filter: alpha(opacity=90);
241
+ opacity: 0.9;
242
+ }
243
+
244
+ .action-bar .popup_close span {
245
+ font-size: 20px;
246
+ cursor: pointer;
247
+ }
248
+
249
+ .action-bar span.bar_close:after {
250
+ font-family: dashicons;
251
+ content: "\f342";
252
+ }
253
+
254
+ .action-bar span.bar_open:after {
255
+ font-family: dashicons;
256
+ content: "\f346";
257
+ }
258
+
259
+ .action-bar .top .popup_close.open {
260
+ padding: 5px;
261
+ margin-right: 5px;
262
+ margin-top: 8px;
263
+ background-color: transparent !important;
264
+ }
265
+
266
+ .action-bar .bottom .popup_close.open {
267
+ padding: 5px;
268
+ margin-right: 5px;
269
+ }
270
+
271
+
272
+ /* Forms */
273
+ div.icegram form {
274
+ box-sizing: border-box;
275
+ -moz-box-sizing: border-box;
276
+ -webkit-box-sizing: border-box;
277
+ }
278
+ div.icegram input, div.icegram label {
279
+ margin: .2em .2em .2em .5em;
280
+ box-sizing: border-box;
281
+ -moz-box-sizing: border-box;
282
+ -webkit-box-sizing: border-box;
283
+ vertical-align: middle !important;
284
+ }
285
+ div.icegram.action-bar form {
286
+ margin: 0;
287
+ padding: 0;
288
+ }
289
+ div.icegram.action-bar input, div.icegram.action-bar label {
290
+ display: inline-block;
291
+ }
292
+ div.icegram.popup input[type="submit"], div.icegram.popup input[type="button"] {
293
+ font-size: 100%;
294
+ }
295
+
296
+ /*
297
+ div.icegram input[type="submit"], div.icegram input[type="button"], div.icegram input[type="button"] {
298
+ font-size: 100%;
299
+ }
300
+ */
301
+
302
+ /* Smartphones (portrait and landscape) ----------- */
303
+ @media only screen
304
+ and (min-device-width : 320px)
305
+ and (max-device-width : 480px) {
306
+ .bold .content, .solid .content {
307
+ width: 80%;
308
+ display: inline-block;;
309
+ }
310
+ .canvas.popup_box {
311
+ max-width: 90%;
312
+ }
313
+ }
314
+
315
+ /* Smartphones (landscape) ----------- */
316
+ @media only screen
317
+ and (min-width : 321px) {
318
+ .bold .content, .solid .content {
319
+ width: 85%;
320
+ display: inline-block;;
321
+ }
322
+ .canvas.popup_box {
323
+ max-width: 70%;
324
+ }
325
+ }
326
+
327
+ /* Smartphones (portrait) ----------- */
328
+ @media only screen
329
+ and (max-width : 320px) {
330
+ .bold .content, .solid .content {
331
+ width: 80%;
332
+ display: inline-block;;
333
+ }
334
+ .canvas.popup_box {
335
+ max-width: 90%;
336
+ }
337
+ }
338
+
339
+ /* iPads (portrait and landscape) ----------- */
340
+ @media only screen
341
+ and (min-device-width : 768px)
342
+ and (max-device-width : 1024px) {
343
+ .bold .content, .solid .content {
344
+ width: 80%;
345
+ display: inline-block;;
346
+ }
347
+ .canvas.popup_box {
348
+ max-width: 40%;
349
+ }
350
+ }
351
+
352
+ /* iPads (landscape) ----------- */
353
+ @media only screen
354
+ and (min-device-width : 768px)
355
+ and (max-device-width : 1024px)
356
+ and (orientation : landscape) {
357
+ .bold .content, .solid .content {
358
+ width: 80%;
359
+ display: inline-block;;
360
+ }
361
+ .canvas.popup_box {
362
+ max-width: 40%;
363
+ }
364
+ }
365
+
366
+ /* iPads (portrait) ----------- */
367
+ @media only screen
368
+ and (min-device-width : 768px)
369
+ and (max-device-width : 1024px)
370
+ and (orientation : portrait) {
371
+ .bold .content, .solid .content {
372
+ width: 80%;
373
+ display: inline-block;;
374
+ }
375
+ .canvas.popup_box {
376
+ max-width: 40%;
377
+ }
378
+ }
379
+
380
+ /* Desktops and laptops ----------- */
381
+ @media only screen
382
+ and (min-width : 1224px) {
383
+ .bold .content, .solid .content {
384
+ width: 95%;
385
+ display: inline-block;;
386
+ }
387
+ .canvas.popup_box {
388
+ max-width: 45%;
389
+ }
390
+ }
391
+
392
+ /* Large screens ----------- */
393
+ @media only screen
394
+ and (min-width : 1824px) {
395
+ .bold .content, .solid .content {
396
+ width: 95%;
397
+ display: inline-block;;
398
+ }
399
+ .canvas.popup_box {
400
+ max-width: 45%;
401
+ }
402
+ }
403
+
404
+ /* iPhone 4 ----------- */
405
+ @media
406
+ only screen and (-webkit-min-device-pixel-ratio : 1.5),
407
+ only screen and (min-device-pixel-ratio : 1.5) {
408
+ .bold-bar .con, .solid .content {
409
+ width: 80%;
410
+ display: inline-block;;
411
+ }
412
+ .canvas.popup_box {
413
+ max-width: 90%;
414
+ }
415
+ }
416
+
417
+ .action-bar .powered_by img {
418
+ width: 2em;
419
+ margin-left: 1em;
420
+ margin-top: 1em;
421
+ }
assets/css/jquery-ui.css ADDED
@@ -0,0 +1,1178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/css/messenger/canvas.css ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .canvas.popup_box {
2
+ display: block;
3
+ position: fixed;
4
+ cursor: pointer;
5
+ background: #FFF;
6
+ z-index: 100000;
7
+ margin: 0;
8
+ padding: 0;
9
+ max-height: 90%;
10
+ }
11
+
12
+ .canvas .popup_box_main {
13
+ border: 1px solid #BFBFBF;
14
+ margin: 10px;
15
+ padding: 10px;
16
+ overflow: hidden;
17
+ -webkit-box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.135);
18
+ box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.13);
19
+ }
20
+
21
+ .canvas .popup_box_header_image, .canvas .popup_box_header2_image {
22
+ display: none;
23
+ }
24
+
25
+ .canvas .popup_box_heading {
26
+ margin: -.35em 35px inherit inherit;
27
+ display: inline-block;
28
+ cursor: pointer;
29
+ font-size: 1.5em;
30
+ font-weight: bold;
31
+ color: #111;
32
+ white-space: nowrap;
33
+ }
34
+
35
+ .canvas .popup_box_message {
36
+ color: #444;
37
+ line-height: 1.2em;
38
+ }
39
+
40
+ .canvas .popup_icon {
41
+ max-width: 100px;
42
+ float: right;
43
+ vertical-align: top;
44
+ border-radius: 2px;
45
+ padding: 0 10px;
46
+ }
47
+
48
+ .canvas .popup_box_footer {
49
+ display: block;
50
+ }
51
+
52
+ .canvas .popup_box_footer_image {
53
+ display: none;
54
+ }
55
+
56
+ .canvas .popup_box_close {
57
+ position: absolute;
58
+ cursor: pointer;
59
+ background: no-repeat url(../../images/clear-header.png) 0 -195px;
60
+ right: 10px;
61
+ top: 20px;
62
+ width: 21px;
63
+ display: inline-block;
64
+ height: 13px;
65
+ }
66
+
67
+ .canvas .popup_box_hr {
68
+ display: none;
69
+ }
70
+
71
+ .canvas .powered_by {
72
+ margin: -0.5em 10px 0.5em 10px;
73
+ }
assets/css/messenger/clear.css ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .clear.popup_box {
2
+ width: 250px;
3
+ height: 260px;
4
+ font-family: arial, sans-serif;
5
+ display: block;
6
+ position: fixed;
7
+ cursor: pointer;
8
+ background: transparent !important;
9
+ overflow: hidden;
10
+ border: 0 solid #BFBFBF;
11
+ z-index: 100000;
12
+ text-align: left;
13
+ margin: 0;
14
+ padding: 0;
15
+ }
16
+
17
+ .clear .popup_box_header {
18
+ height: 31px;
19
+ position: relative;
20
+ -moz-box-shadow: inset 0 0 3px 0 #FFF;
21
+ -webkit-box-shadow: inset 0 0 3px 0 #FFF;
22
+ box-shadow: inset 0 0 3px 0 #FFF;
23
+ background: #F9F9F9;
24
+ border: 1px solid #BFBFBF;
25
+ overflow: hidden;
26
+ -moz-border-radius: 3px 3px 0 0;
27
+ -webkit-border-radius: 3px 3px 0 0;
28
+ border-radius: 3px 3px 0 0;
29
+ display: block;
30
+ color: #333;
31
+ font-family: arial, sans-serif;
32
+ line-height: 20px !important;
33
+ padding: 0 4px 0 5px;
34
+ }
35
+
36
+ .clear .popup_box_header_image {
37
+ background: no-repeat url(../../images/clear-header.png) 0 -181px;
38
+ position: relative;
39
+ display: inline-block;
40
+ height: 13px;
41
+ width: 35px;
42
+ margin-left: 206px;
43
+ margin-top: 9px;
44
+ line-height: 20px !important;
45
+ padding: 0;
46
+ }
47
+
48
+ .clear .popup_box_header2_image {
49
+ background-image: url(../../images/clear-option.png);
50
+ height: 31px;
51
+ position: relative;
52
+ display: block;
53
+ border: 1px solid #BFBFBF;
54
+ border-bottom: none;
55
+ border-top: none;
56
+ }
57
+
58
+ .clear .popup_box_header_text {
59
+ background: no-repeat url(../../images/clear-header.png) 0 0;
60
+ cursor: pointer;
61
+ font-family: arial, sans-serif;
62
+ font-size: 13px;
63
+ height: 15px;
64
+ overflow: hidden;
65
+ text-decoration: none;
66
+ -ms-text-overflow: ellipsis;
67
+ -o-text-overflow: ellipsis;
68
+ text-overflow: ellipsis;
69
+ white-space: nowrap;
70
+ position: relative;
71
+ display: block;
72
+ z-index: 100000;
73
+ margin-top: -19px;
74
+ margin-left: 3px;
75
+ line-height: 16px;
76
+ }
77
+
78
+ .clear .popup_box_heading {
79
+ margin-left: 20px;
80
+ margin-right: 55px;
81
+ display: inline-block;
82
+ width: 161px;
83
+ cursor: pointer;
84
+ font-family: arial, sans-serif;
85
+ font-size: 13px;
86
+ height: 16px;
87
+ overflow: hidden;
88
+ text-decoration: none;
89
+ -ms-text-overflow: ellipsis;
90
+ -o-text-overflow: ellipsis;
91
+ text-overflow: ellipsis;
92
+ white-space: nowrap;
93
+ }
94
+
95
+ .clear .popup_box_body {
96
+ display: block;
97
+ background: #fff;
98
+ z-index: 100000;
99
+ height: 152px;
100
+ -moz-box-shadow: inset 0 0 3px 0 #FFF;
101
+ -webkit-box-shadow: inset 0 0 3px 0 #FFF;
102
+ box-shadow: inset 0 0 3px 0 #FFF;
103
+ border: 1px solid #BFBFBF;
104
+ font-family: Arial, Helvetica, sans-serif;
105
+ color: #222;
106
+ font-size: 13px;
107
+ overflow-x: hidden;
108
+ line-height: 15px;
109
+ border-bottom: none;
110
+ padding: 6px 6px 0;
111
+ }
112
+
113
+ .clear .popup_box_message {
114
+ color: #3E454C;
115
+ line-height: 1.28;
116
+ text-align: left;
117
+ word-wrap: break-word;
118
+ width: 180px;
119
+ display: inline-block;
120
+ }
121
+
122
+ .clear .no-image.popup_box_message {
123
+ width: 97%;
124
+ }
125
+
126
+ .clear .popup_icon {
127
+ height: 32px;
128
+ width: 32px;
129
+ vertical-align: top;
130
+ border-radius: 2px;
131
+ }
132
+
133
+ .clear .popup_box_footer {
134
+ background-image: url(../../images/clear-footer.png);
135
+ position: relative;
136
+ display: block;
137
+ height: 36px;
138
+ z-index: 100000;
139
+ border: 1px solid #BFBFBF;
140
+ border-top: none;
141
+ padding: 0 12px;
142
+ -webkit-background-size: 96%;
143
+ background-size: 96%;
144
+ background-repeat: no-repeat;
145
+ background-color: #F5F5F5;
146
+ background-position: 5px 5px;
147
+ }
148
+
149
+ .clear .popup_box_footer_image {
150
+ position: relative;
151
+ display: block;
152
+ }
153
+
154
+ .clear .popup_box_close {
155
+ position: absolute;
156
+ cursor: pointer;
157
+ z-index: 100000;
158
+ background: no-repeat url(../../images/clear-header.png) 0 -195px;
159
+ right: 5px;
160
+ top: 10px;
161
+ margin-right: -5px;
162
+ width: 21px;
163
+ display: inline-block;
164
+ height: 13px;
165
+ vertical-align: top;
166
+ }
167
+
168
+ .clear .popup_box_hr {
169
+ border-bottom: 1px solid hsl(0, 0%, 98%);
170
+ color: transparent;
171
+ background: transparent;
172
+ border: none;
173
+ border-top: 1px solid #DFDFDF;
174
+ display: block;
175
+ -webkit-margin-before: 0.5em;
176
+ -webkit-margin-after: 0.5em;
177
+ -moz-margin-start: auto;
178
+ -webkit-margin-start: auto;
179
+ margin-start: auto;
180
+ -moz-margin-end: auto;
181
+ -webkit-margin-end: auto;
182
+ margin-end: auto;
183
+ -moz-margin-before: 0.5em;
184
+ -moz-margin-after: 0.5em;
185
+ font-size: 13px;
186
+ line-height: 15px;
187
+ margin: 1px 0 2px;
188
+ }
189
+
190
+ .clear .powered_by {
191
+ top: -20px;
192
+ left: 120px;
193
+ }
assets/css/messenger/social.css ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .social.popup_box {
2
+ position: fixed;
3
+ z-index: 100000;
4
+ width: 250px;
5
+ height: 260px;
6
+ -webkit-background-clip: padding-box;
7
+ background-clip: padding-box;
8
+ border-bottom: 0;
9
+ margin: 0;
10
+ padding: 0;
11
+ }
12
+
13
+ .social .popup_box_header {
14
+ background-color: #627BAE;
15
+ -webkit-background-clip: padding-box;
16
+ background-clip: padding-box;
17
+ border: 1px solid rgba(0, 39, 121, 0.76);
18
+ border-bottom: none;
19
+ -webkit-border-top-left-radius: 1px 1px;
20
+ -moz-border-radius-topleft: 1px 1px;
21
+ border-top-left-radius: 1px 1px;
22
+ -webkit-border-top-right-radius: 1px 1px;
23
+ -moz-border-radius-topright: 1px 1px;
24
+ border-top-right-radius: 1px 1px;
25
+ display: block;
26
+ position: relative;
27
+ height: 26px;
28
+ overflow: hidden;
29
+ -ms-text-overflow: ellipsis;
30
+ -o-text-overflow: ellipsis;
31
+ text-overflow: ellipsis;
32
+ white-space: nowrap;
33
+ color: #FFF;
34
+ font-weight: 400;
35
+ line-height: 18px;
36
+ cursor: pointer;
37
+ direction: ltr;
38
+ z-index: 100000;
39
+ }
40
+
41
+ .social .popup_box_header_text {
42
+ font-size: 11px;
43
+ font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
44
+ text-align: left;
45
+ vertical-align: top;
46
+ text-decoration: none;
47
+ zoom: 1;
48
+ font-weight: 700;
49
+ margin: 3px 7px 4px;
50
+ }
51
+
52
+ .social .popup_box_heading {
53
+ overflow: hidden;
54
+ margin-left: 5px;
55
+ margin-right: 40px;
56
+ line-height: 20px;
57
+ }
58
+
59
+ .social .popup_box_header_image {
60
+ position: absolute;
61
+ cursor: pointer;
62
+ z-index: 100000;
63
+ height: 25px;
64
+ vertical-align: top;
65
+ background-image: url(../../images/social-img.png);
66
+ background-repeat: no-repeat;
67
+ background-position: -92px -332px;
68
+ border: 0;
69
+ right: 20px;
70
+ top: 2px;
71
+ margin-right: 3px;
72
+ width: 21px;
73
+ display: inline-block;
74
+ }
75
+
76
+ .social .popup_box_body {
77
+ right: 0;
78
+ bottom: 0;
79
+ padding-left: 5px;
80
+ padding-top: 5px;
81
+ padding-right: 5px;
82
+ height: 194px;
83
+ overflow-y: auto;
84
+ -webkit-background-clip: padding-box;
85
+ background-clip: padding-box;
86
+ overflow-x: hidden;
87
+ background-color: #FFF;
88
+ border: 1px solid rgba(0, 0, 0, 0.3);
89
+ display: block;
90
+ direction: ltr;
91
+ font-size: 12px;
92
+ font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
93
+ color: #3e454c;
94
+ line-height: 1.28;
95
+ text-align: left;
96
+ cursor: pointer;
97
+ position: relative;
98
+ z-index: 100000;
99
+ border-width: 0 1px;
100
+ background-color: #edeff4;
101
+ }
102
+
103
+ .social .popup_box_message {
104
+ background-color: #F7F7F7;
105
+ background-image: -webkit-gradient(linear, center bottom, center top, from(#F2F2F2), to(#FFF));
106
+ background-image: -webkit-linear-gradient(bottom, #F2F2F2, #FFF);
107
+ margin-left: 5px;
108
+ padding: 4px 6px 3px 5px;
109
+ border: 1px solid rgba(0, 0, 0, .18);
110
+ border-bottom-color: rgba(0, 0, 0, .29);
111
+ -webkit-border-radius: 4px;
112
+ -webkit-box-shadow: 0 1px 0 #DCE0E6;
113
+ color: #3E454C;
114
+ line-height: 1.28;
115
+ min-height: 14px;
116
+ position: relative;
117
+ text-align: left;
118
+ text-shadow: rgba(255, 255, 255, .5) 0 1px 0;
119
+ white-space: pre-wrap;
120
+ word-wrap: break-word;
121
+ width: 170px;
122
+ display: inline-block;
123
+ }
124
+
125
+ .social .popup_box_message:after {
126
+ content: "";
127
+ display: block;
128
+ position: absolute;
129
+ top: 11px;
130
+ left: 0;
131
+ margin: 0 0 0 -12px;
132
+ border: 6px solid #FAFAFA;
133
+ border-color: rgba(0, 0, 0, 0) #FAFAFA rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);0, 0) ;
134
+ }
135
+
136
+ .social .popup_box_message:before {
137
+ content: "";
138
+ display: block;
139
+ position: absolute;
140
+ top: 9px;
141
+ left: 0;
142
+ margin: 0 0 0 -16px;
143
+ border: 8px solid #DFDFDF;
144
+ border-color: rgba(0, 0, 0, 0) #DFDFDF rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
145
+ }
146
+
147
+ .social .no-image.popup_box_message {
148
+ width: 91%;
149
+ }
150
+
151
+ .social .no-image.popup_box_message:after,
152
+ .social .no-image.popup_box_message:before {
153
+ content: none;
154
+ }
155
+
156
+ .social .popup_icon {
157
+ height: 32px;
158
+ width: 32px;
159
+ vertical-align: top;
160
+ border-radius: 2px;
161
+ }
162
+
163
+ .social .popup_box_close {
164
+ position: absolute;
165
+ cursor: pointer;
166
+ z-index: 100000;
167
+ background-image: url(../../images/social-img.png);
168
+ background-repeat: no-repeat;
169
+ background-position: -137px -332px;
170
+ right: 0;
171
+ top: 2px;
172
+ margin-right: 3px;
173
+ width: 21px;
174
+ display: inline-block;
175
+ height: 25px;
176
+ vertical-align: top;
177
+ }
178
+
179
+ .social .popup_box_footer {
180
+ right: 0;
181
+ bottom: 0;
182
+ -webkit-background-clip: padding-box;
183
+ background-clip: padding-box;
184
+ background-color: #FFF;
185
+ border: 1px solid rgba(0, 0, 0, 0.3);
186
+ border-top: 1px solid #C9D0DA;
187
+ max-height: 77px;
188
+ overflow-x: hidden;
189
+ overflow-y: auto;
190
+ display: block;
191
+ direction: ltr;
192
+ font-size: 11px;
193
+ font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
194
+ color: #333;
195
+ line-height: 1.28;
196
+ text-align: left;
197
+ cursor: pointer;
198
+ position: relative;
199
+ z-index: 100000;
200
+ padding: 5px 23px 3px 5px;
201
+ }
202
+
203
+ .social .popup_box_footer_image {
204
+ background-image: url(../../images/social-img.png);
205
+ background-repeat: no-repeat;
206
+ background-position: -269px -137px;
207
+ position: relative;
208
+ z-index: 100000;
209
+ width: 24px;
210
+ height: 24px;
211
+ left: 221px;
212
+ }
213
+
214
+ .social .popup_box_hr {
215
+ display: none;
216
+ }
217
+
218
+ .social .powered_by {
219
+ top: -15px;
220
+ left: 130px;
221
+ }
assets/css/messenger/talk.css ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .talk.popup_box {
2
+ width: 210px;
3
+ height: 260px;
4
+ font-family: arial, sans-serif;
5
+ display: block;
6
+ position: fixed;
7
+ cursor: pointer;
8
+ background: transparent !important;
9
+ overflow: hidden;
10
+ border: 0 solid #BFBFBF;
11
+ z-index: 100000;
12
+ text-align: left;
13
+ margin: 0;
14
+ padding: 0;
15
+ }
16
+
17
+ .talk .popup_box_header {
18
+ height: 25px;
19
+ position: relative;
20
+ -moz-box-shadow: inset 0 0 3px 0 #FFF;
21
+ -webkit-box-shadow: inset 0 0 3px 0 #FFF;
22
+ box-shadow: inset 0 0 3px 0 #FFF;
23
+ background: #F5FAFF;
24
+ border: 1px solid #BFBFBF;
25
+ overflow: hidden;
26
+ -moz-border-radius: 7px 7px 0 0;
27
+ -webkit-border-radius: 7px 7px 0 0;
28
+ border-radius: 7px 7px 0 0;
29
+ display: block;
30
+ color: #00008B;
31
+ font-family: arial, sans-serif;
32
+ font-weight: 700 !important;
33
+ line-height: 20px !important;
34
+ padding: 0;
35
+ }
36
+
37
+ .talk .popup_box_header_image {
38
+ background-image: url(../../images/talk-header-1.png);
39
+ margin-top: 4px;
40
+ position: relative;
41
+ display: inline-block;
42
+ height: 15px;
43
+ width: 15px;
44
+ margin-left: 173px;
45
+ line-height: 20px !important;
46
+ padding: 0;
47
+ }
48
+
49
+ .talk .popup_box_header2_image {
50
+ background-image: url(../../images/talk-header-2.png);
51
+ height: 30px;
52
+ position: relative;
53
+ display: block;
54
+ border: 1px solid #BFBFBF;
55
+ border-bottom: none;
56
+ border-top: none;
57
+ }
58
+
59
+ .talk .popup_box_header_text {
60
+ background: no-repeat url(../../images/clear-header.png) 0 0;
61
+ background-repeat: no-repeat;
62
+ cursor: pointer;
63
+ font-family: arial, sans-serif;
64
+ font-size: 12px;
65
+ height: 18px;
66
+ overflow: hidden;
67
+ text-decoration: none;
68
+ -ms-text-overflow: ellipsis;
69
+ -o-text-overflow: ellipsis;
70
+ text-overflow: ellipsis;
71
+ white-space: nowrap;
72
+ position: relative;
73
+ display: block;
74
+ z-index: 100000;
75
+ margin-top: -19px;
76
+ line-height: 16px;
77
+ margin-left: 10px;
78
+ }
79
+
80
+ .talk .popup_box_heading {
81
+ margin-left: 17px;
82
+ overflow: hidden;
83
+ margin-right: 40px;
84
+ line-height: 16px;
85
+ width: 141px;
86
+ display: inline-block;
87
+ -ms-text-overflow: ellipsis;
88
+ -o-text-overflow: ellipsis;
89
+ text-overflow: ellipsis;
90
+ }
91
+
92
+ .talk .popup_box_body {
93
+ display: block;
94
+ background: #fff;
95
+ z-index: 100000;
96
+ height: 160px;
97
+ -moz-box-shadow: inset 0 0 3px 0 #FFF;
98
+ -webkit-box-shadow: inset 0 0 3px 0 #FFF;
99
+ box-shadow: inset 0 0 3px 0 #FFF;
100
+ border: 1px solid #BFBFBF;
101
+ font-family: Arial, Helvetica, sans-serif;
102
+ color: #222;
103
+ font-size: 12px;
104
+ top: 0;
105
+ left: 0;
106
+ right: 0;
107
+ overflow-x: hidden;
108
+ line-height: 15px;
109
+ border-bottom: none;
110
+ padding: 6px 6px 0;
111
+ }
112
+
113
+ .talk .popup_box_message{
114
+ color: #3E454C;
115
+ text-align: left;
116
+ word-wrap: break-word;
117
+ width: 142px;
118
+ display: inline-block;
119
+ margin-left: 2px;
120
+ }
121
+
122
+ .talk .no-image.popup_box_message {
123
+ width: 98%;
124
+ }
125
+
126
+ .talk .popup_icon {
127
+ height: 32px;
128
+ width: 32px;
129
+ vertical-align: top;
130
+ }
131
+
132
+ .talk .popup_box_footer {
133
+ background-image: url(../../images/talk-footer-1.png);
134
+ position: relative;
135
+ display: block;
136
+ height: 37px;
137
+ z-index: 100000;
138
+ border: 1px solid #BFBFBF;
139
+ border-bottom: none;
140
+ }
141
+
142
+ .talk .popup_box_footer_image {
143
+ position: relative;
144
+ display: block;
145
+ margin-top: .8px;
146
+ }
147
+
148
+ .talk .popup_box_close {
149
+ position: absolute;
150
+ cursor: pointer;
151
+ z-index: 100000;
152
+ background-image: url(../../images/talk-close.png);
153
+ background-repeat: no-repeat;
154
+ right: -4px;
155
+ top: 4.5px;
156
+ margin-right: 3px;
157
+ width: 21px;
158
+ display: inline-block;
159
+ height: 25px;
160
+ vertical-align: top;
161
+ }
162
+
163
+ .talk .popup_box_hr {
164
+ border-bottom: 1px solid hsl(0, 0%, 98%);
165
+ color: transparent;
166
+ background: transparent;
167
+ border: none;
168
+ border-top: 1px solid #DFDFDF;
169
+ display: block;
170
+ -webkit-margin-before: 0.5em;
171
+ -webkit-margin-after: 0.5em;
172
+ -moz-margin-start: auto;
173
+ -webkit-margin-start: auto;
174
+ margin-start: auto;
175
+ -moz-margin-end: auto;
176
+ -webkit-margin-end: auto;
177
+ margin-end: auto;
178
+ -moz-margin-before: 0.5em;
179
+ -moz-margin-after: 0.5em;
180
+ font-size: 13px;
181
+ line-height: 15px;
182
+ margin: 1px 0 2px;
183
+ }
184
+
185
+ .talk .powered_by {
186
+ top: -25px;
187
+ left: 92px;
188
+ }
assets/css/popup/air-mail.css ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .air-mail .popup-container {
2
+ position: relative;
3
+ color: hsl(0, 100%, 100%);
4
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
5
+ filter: alpha(opacity=100);
6
+ opacity: 1;
7
+ display: block;
8
+ padding: 1em 0;
9
+ z-index: 100000;
10
+ }
11
+
12
+ .air-mail .popup-headline {
13
+ display: block;
14
+ margin-bottom: 1em;
15
+ font-size: 2.5em;
16
+ line-height: 1em;
17
+ font-weight: 600;
18
+ text-align: center;
19
+ color: hsl(206, 69%, 47%);
20
+ text-shadow: 0 1px 0 #FFF;
21
+ line-height: normal;
22
+ }
23
+
24
+ .air-mail .popup-image {
25
+ display: block;
26
+ float: right;
27
+ margin: 0 1em;
28
+ }
29
+
30
+ .air-mail .popup-message {
31
+ color: hsl(0, 0%, 44%);
32
+ margin-bottom: 1em;
33
+ padding: 0 1em;
34
+ font-size: 1.2em;
35
+ }
36
+
37
+ .air-mail .popup-close {
38
+ background: url(../../images/chosen-sprite.png) no-repeat -43px 0;
39
+ height: 10px;
40
+ width: 10px;
41
+ -moz-box-sizing: content-box;
42
+ box-sizing: content-box;
43
+ position: absolute;
44
+ top: 0;
45
+ right: 0;
46
+ cursor: pointer;
47
+ zoom: 1.5;
48
+ }
49
+
50
+ .air-mail .popup-button, div.air-mail input[type="submit"], div.air-mail input[type="button"] {
51
+ background: hsl(6, 78%, 57%);
52
+ width: 50%;
53
+ display: block;
54
+ -moz-border-radius: 5px;
55
+ -webkit-border-radius: 5px;
56
+ border-radius: 5px;
57
+ border-bottom: 3px solid hsl(6, 63%, 46%);
58
+ font-size: 16px;
59
+ color: hsl(0, 0%, 100%);
60
+ cursor: pointer;
61
+ text-transform: uppercase;
62
+ font-family: "Open Sans", sans-serif;
63
+ font-weight: 600;
64
+ text-align: center;
65
+ margin: 0 auto;
66
+ padding: 16px 0 13px;
67
+ }
68
+
69
+ .air-mail .popup-button:hover, div.air-mail input[type="submit"]:hover, div.air-mail input[type="button"]:hover {
70
+ margin-top: -3px;
71
+ border-bottom: 6px solid #c0392b;
72
+ }
73
+
74
+ .air-mail #TB_ajaxContent {
75
+ overflow: hidden;
76
+ height: auto !important;
77
+ width: auto !important;
78
+ position: relative;
79
+ display: block;
80
+ background: #F2F2F2;
81
+ background-image: -moz-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
82
+ background-image: -o-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
83
+ background-image: -webkit-linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
84
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #e5e5e5 0%), color-stop(1, #f7f7f7 100%));
85
+ filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#e5e5e5 0%, EndColorStr=#f7f7f7 100%)";
86
+ background-image: linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
87
+ }
88
+
89
+ .air-mail#TB_window {
90
+ height: auto !important;
91
+ position: absolute;
92
+ background-color: #fff;
93
+ -webkit-background-clip: padding-box;
94
+ background-clip: padding-box;
95
+ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
96
+ -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
97
+ box-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
98
+ padding: 8px;
99
+ border: 0;
100
+ }
101
+
102
+ .air-mail#TB_window:before {
103
+ position: absolute;
104
+ top: 0;
105
+ left: 0;
106
+ width: 100%;
107
+ height: 100%;
108
+ -moz-box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
109
+ -webkit-box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
110
+ box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
111
+ background: #D1D1D1;
112
+ background: repeating-linear-gradient(45deg, #b37b7a, #b37b7a 10px, transparent 10px, transparent 20px, #7897ba 20px, #7897ba 30px, transparent 30px, transparent 40px);
113
+ -webkit-background-clip: padding-box;
114
+ background-clip: padding-box;
115
+ content: "";
116
+ }
assets/css/popup/amaze.css ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .amaze .popup-container {
2
+ color: hsl(0, 100%, 100%);
3
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
4
+ filter: alpha(opacity=100);
5
+ opacity: 1;
6
+ display: block;
7
+ z-index: 100000;
8
+ }
9
+
10
+ .amaze .popup-headline {
11
+ text-align: center;
12
+ margin: .5em auto;
13
+ color: #fff;
14
+ text-shadow: 0 1px 0 hsl(0, 0%, 0%);
15
+ font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
16
+ font-size: 2em;
17
+ display: block;
18
+ line-height: 1em;
19
+ }
20
+
21
+ .amaze .popup-content {
22
+ margin: 1.5em 0 .5em 0;
23
+ width: 100%;
24
+ }
25
+
26
+ .amaze .popup-image {
27
+ display: block;
28
+ float: left;
29
+ margin: 0 2em 0 1em;
30
+ }
31
+
32
+ .amaze .popup-message {
33
+ font-size: 1.2em;
34
+ font-family: Georgia, Times, "Times New Roman", serif;
35
+ color: hsl(0, 100%, 100%);
36
+ margin: 0 2em;
37
+ }
38
+
39
+ .amaze .popup-close {
40
+ background-image: url(../../images/popup-close.png);
41
+ background-repeat: no-repeat;
42
+ background-position: left bottom;
43
+ height: 32px;
44
+ width: 30px;
45
+ -webkit-background-size: 100%;
46
+ background-size: 100%;
47
+ -moz-box-sizing: content-box;
48
+ box-sizing: content-box;
49
+ position: absolute;
50
+ top: -15px;
51
+ right: -15px;
52
+ cursor: pointer;
53
+ }
54
+
55
+ .amaze .popup-close:hover {
56
+ background-position: left top;
57
+ }
58
+
59
+ .amaze .popup-button, div.amaze input[type="submit"], div.amaze input[type="button"] {
60
+ cursor: pointer;
61
+ background: hsl(145, 63%, 49%);
62
+ color: hsl(0, 100%, 100%);
63
+ font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
64
+ display: block;
65
+ font-size: 1.3em;
66
+ letter-spacing: 1px;
67
+ vertical-align: top;
68
+ font-weight: 700;
69
+ text-align: center;
70
+ line-height: 1.8em;
71
+ webkit-box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.25);
72
+ -moz-box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.25);
73
+ -webkit-box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.25);
74
+ box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.45), 0 2px 2px rgba(0, 0, 0, 0.25);
75
+ -moz-border-radius: 3px;
76
+ -webkit-border-radius: 3px;
77
+ border-radius: 3px;
78
+ text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
79
+ margin: 0 auto;
80
+ width: 40%;
81
+ padding: 0.3em 1em;
82
+ }
83
+
84
+ .amaze .popup-button:active, div.amaze input[type="submit"]:active, div.amaze input[type="button"]:active {
85
+ position: relative;
86
+ top: 3px;
87
+ -moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
88
+ -webkit-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
89
+ box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
90
+ }
91
+
92
+ .amaze #TB_ajaxContent {
93
+ overflow: hidden;
94
+ height: auto !important;
95
+ width: auto !important;
96
+ border: .3em solid #444444;
97
+ background-image: url(../../images/popup-amaze-bg.jpg);
98
+ }
99
+
100
+ .amaze#TB_window {
101
+ height: auto !important;
102
+ position: absolute;
103
+ -moz-box-shadow: none;
104
+ -webkit-box-shadow: none;
105
+ box-shadow: none;
106
+ }
assets/css/popup/compel.css ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .compel .popup-container {
2
+ background: hsl(0, 0%, 100%);
3
+ position: relative;
4
+ color: hsl(0, 100%, 100%);
5
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
6
+ filter: alpha(opacity=100);
7
+ opacity: 1;
8
+ display: block;
9
+ padding: 1.5em 0 1em 0;
10
+ z-index: 100000;
11
+ }
12
+
13
+ .compel .popup-headline {
14
+ font-family: "Hoefler Text", "Baskerville old face", Garamond, "Times New Roman", serif;
15
+ color: hsl(204, 70%, 53%);
16
+ font-size: 2em;
17
+ line-height: 1em;
18
+ text-shadow: 0 1px 0 hsl(204, 79%, 36%);
19
+ display: block;
20
+ margin-bottom: 0.5em;
21
+ text-align: center;
22
+ }
23
+
24
+ .compel .popup-image {
25
+ display: block;
26
+ float: left;
27
+ margin: 0 1em;
28
+ padding-right: 1em;
29
+ }
30
+
31
+ .compel .popup-message {
32
+ color: hsl(0, 0%, 44%);
33
+ font-size: 1.25em;
34
+ font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
35
+ margin-bottom: .5em;
36
+ }
37
+
38
+ .compel .popup-close {
39
+ background: url(../../images/chosen-sprite.png) no-repeat -43px 0;
40
+ height: 10px;
41
+ width: 10px;
42
+ -moz-box-sizing: content-box;
43
+ box-sizing: content-box;
44
+ position: absolute;
45
+ top: 0;
46
+ right: 0;
47
+ cursor: pointer;
48
+ zoom: 1.5;
49
+ }
50
+
51
+ .compel .popup-button, div.compel input[type="submit"], div.compel input[type="button"] {
52
+ background: hsl(6, 78%, 57%);
53
+ width: 50%;
54
+ display: block;
55
+ -moz-border-radius: 5px;
56
+ -webkit-border-radius: 5px;
57
+ border-radius: 5px;
58
+ border-bottom: 3px solid hsl(6, 63%, 46%);
59
+ font-size: 16px;
60
+ color: hsl(0, 0%, 100%);
61
+ cursor: pointer;
62
+ text-transform: uppercase;
63
+ font-family: "Open Sans", sans-serif;
64
+ font-weight: 600;
65
+ text-align: center;
66
+ margin: 0 auto;
67
+ padding: 16px 0 13px;
68
+ }
69
+
70
+ .compel .popup-button:hover, div.compel input[type="submit"]:hover, div.compel input[type="button"]:hover {
71
+ margin-top: -3px;
72
+ border-bottom: 6px solid #c0392b;
73
+ }
74
+
75
+ .compel #TB_ajaxContent {
76
+ overflow: hidden;
77
+ height: auto !important;
78
+ width: auto !important;
79
+ }
80
+
81
+ .compel#TB_window {
82
+ height: auto !important;
83
+ position: absolute;
84
+ -moz-box-shadow: none;
85
+ -webkit-box-shadow: none;
86
+ box-shadow: none;
87
+ border: 4px dashed #c0392b;
88
+ }
assets/css/popup/convert.css ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .convert .popup-container {
2
+ padding: 1em;
3
+ z-index: 100000;
4
+ }
5
+
6
+ .convert .popup-headline {
7
+ font-size: 2.5em;
8
+ line-height: 1em;
9
+ font-weight: 700;
10
+ color: hsl(0, 1%, 28%);
11
+ font-family: "Hoefler Text", "Baskerville old face", Garamond, "Times New Roman", serif;
12
+ letter-spacing: 0;
13
+ text-align: left;
14
+ margin-bottom: 1em;
15
+ line-height: 80%;
16
+ }
17
+
18
+ .convert .popup-image {
19
+ display: block;
20
+ float: right;
21
+ margin: 0 1em;
22
+ }
23
+
24
+ .convert .popup-message {
25
+ font-size: 1.5em;
26
+ line-height: 1em;
27
+ font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
28
+ color: hsl(0, 1%, 28%);
29
+ vertical-align: baseline;
30
+ }
31
+
32
+ .convert .popup-close {
33
+ background-image: url(../../images/popup-close.png);
34
+ background-repeat: no-repeat;
35
+ background-position: left bottom;
36
+ height: 32px;
37
+ width: 30px;
38
+ -webkit-background-size: 100%;
39
+ background-size: 100%;
40
+ -moz-box-sizing: content-box;
41
+ box-sizing: content-box;
42
+ position: absolute;
43
+ top: -15px;
44
+ right: -15px;
45
+ cursor: pointer;
46
+ }
47
+
48
+ .convert .popup-close:hover {
49
+ background-position: left top;
50
+ }
51
+
52
+ .convert .popup-button, div.convert input[type="submit"], div.convert input[type="button"] {
53
+ text-transform: uppercase;
54
+ font-weight: 700;
55
+ text-decoration: none;
56
+ background-color: hsl(0, 94%, 41%);
57
+ font-size: 1.75em;
58
+ color: hsl(0, 33%, 98%);
59
+ border: .3em solid hsl(0, 6%, 71%);
60
+ display: block;
61
+ width: 50%;
62
+ cursor: pointer;
63
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
64
+ -moz-border-radius: 1em;
65
+ -webkit-border-radius: 1em;
66
+ border-radius: 1em;
67
+ text-align: center;
68
+ line-height: 1.5em;
69
+ -moz-box-sizing: content-box;
70
+ box-sizing: content-box;
71
+ margin: 0.1em auto;
72
+ padding: 0.1em 2em;
73
+ clear: both;
74
+ }
75
+
76
+ .convert #TB_ajaxContent {
77
+ overflow: hidden;
78
+ height: auto !important;
79
+ width: auto !important;
80
+ }
81
+
82
+ .convert#TB_window {
83
+ height: auto !important;
84
+ position: absolute;
85
+ -moz-box-shadow: none;
86
+ -webkit-box-shadow: none;
87
+ box-shadow: none;
88
+ background: hsl(58, 100%, 90%);
89
+ }
assets/css/popup/inspire.css ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .inspire .popup-container {
2
+ z-index: 100000;
3
+ padding: 1em 0 .5em 0;
4
+ }
5
+ .inspire .popup-headline {
6
+ color: #222;
7
+ text-align: center;
8
+ margin-bottom: 1em;
9
+ text-shadow: 0 1px hsl(0, 100%, 100%);
10
+ font-size: 2.5em;
11
+ line-height: 1em;
12
+ font-weight: 800;
13
+ text-decoration: none;
14
+ }
15
+
16
+ .inspire .popup-image {
17
+ display: block;
18
+ float: left;
19
+ margin: 0 1em;
20
+ }
21
+
22
+ .inspire .popup-message {
23
+ -webkit-font-smoothing: antialiased;
24
+ text-shadow: 0 1px hsl(0, 100%, 100%);
25
+ color: #333;
26
+ font-size: 1.25em;
27
+ margin-bottom: .5em;
28
+ font-weight: 400;
29
+ text-align: justify;
30
+ }
31
+
32
+ .inspire .popup-close {
33
+ background-image: url(../../images/popup-close.png);
34
+ background-repeat: no-repeat;
35
+ background-position: left bottom;
36
+ height: 32px;
37
+ width: 30px;
38
+ -webkit-background-size: 100%;
39
+ background-size: 100%;
40
+ -moz-box-sizing: content-box;
41
+ box-sizing: content-box;
42
+ position: absolute;
43
+ top: -15px;
44
+ right: -15px;
45
+ cursor: pointer;
46
+ }
47
+
48
+ .inspire .popup-close:hover {
49
+ background-position: left top;
50
+ }
51
+
52
+ .inspire .popup-button, div.inspire input[type="submit"], div.inspire input[type="button"] {
53
+ vertical-align: middle;
54
+ background-color: hsl(79, 93%, 35%);
55
+ font-size: 2em;
56
+ font-weight: 700;
57
+ font-style: normal;
58
+ text-decoration: none;
59
+ text-align: center;
60
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
61
+ filter: alpha(opacity=100);
62
+ opacity: 1;
63
+ cursor: pointer;
64
+ color: hsl(0, 100%, 100%);
65
+ width: 50%;
66
+ border-color: hsl(79, 93%, 35%);
67
+ margin: .25em auto;
68
+ padding: 0.5em;
69
+ line-height: 1.2em;
70
+ }
71
+
72
+ .inspire #TB_ajaxContent {
73
+ overflow: hidden;
74
+ height: auto !important;
75
+ width: auto !important;
76
+ }
77
+
78
+ .inspire#TB_window {
79
+ height: auto !important;
80
+ position: absolute;
81
+ background: hsl(0, 100%, 100%);
82
+ }
assets/css/popup/persuade.css ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .persuade .popup-container {
2
+ z-index: 100000;
3
+ }
4
+ .persuade .popup-headline {
5
+ line-height: 1em;
6
+ letter-spacing: 0;
7
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
8
+ color: hsl(0, 100%, 100%);
9
+ font-size: 3em;
10
+ font-weight: 700;
11
+ text-align: center;
12
+ -webkit-font-smoothing: antialiased;
13
+ margin: .25em auto;
14
+ }
15
+
16
+ .persuade .popup-image {
17
+ display: block;
18
+ float: left;
19
+ margin: 0 1em;
20
+ }
21
+
22
+ .persuade .popup-message {
23
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
24
+ color: #FFF;
25
+ font-size: 1.75em;
26
+ line-height: normal;
27
+ font-weight: 300;
28
+ margin: .5em auto 1em;
29
+ text-align: center;
30
+ -webkit-font-smoothing: antialiased;
31
+ line-height: 1em;
32
+ }
33
+
34
+ .persuade .popup-close {
35
+ background-image: url(../../images/popup-close.png);
36
+ background-repeat: no-repeat;
37
+ background-position: left bottom;
38
+ height: 32px;
39
+ width: 30px;
40
+ -webkit-background-size: 100%;
41
+ background-size: 100%;
42
+ -moz-box-sizing: content-box;
43
+ box-sizing: content-box;
44
+ position: absolute;
45
+ top: -15px;
46
+ right: -15px;
47
+ cursor: pointer
48
+ }
49
+
50
+ .persuade .popup-close:hover {
51
+ background-position: left top;
52
+ }
53
+
54
+ .persuade .popup-button, div.persuade input[type="submit"], div.persuade input[type="button"] {
55
+ color: hsl(0, 100%, 100%);
56
+ text-decoration: none;
57
+ background-color: hsl(0, 0%, 26%);
58
+ font-size: 2em;
59
+ font-weight: 400;
60
+ width: 60%;
61
+ display: block;
62
+ -moz-border-radius: .6em;
63
+ -webkit-border-radius: .6em;
64
+ border-radius: .6em;
65
+ -moz-box-shadow: 0 .3em 0 hsl(0, 0%, 20%), 0 .3em 2em hsla(0, 0%, 0%, 0.7);
66
+ -webkit-box-shadow: 0 .3em 0 hsl(0, 0%, 20%), 0 .3em 2em hsla(0, 0%, 0%, 0.7);
67
+ box-shadow: 0 .3em 0 hsl(0, 0%, 20%), 0 .3em 2em hsla(0, 0%, 0%, 0.7);
68
+ -moz-box-shadow: 0 .3em 0 #333, 0 .3em 2em rgba(0, 0, 0, 0.7);
69
+ -webkit-box-shadow: 0 .3em 0 #333, 0 .3em 2em rgba(0, 0, 0, 0.7);
70
+ box-shadow: 0 .3em 0 #333, 0 .3em 2em rgba(0, 0, 0, 0.7);
71
+ text-align: center;
72
+ cursor: pointer;
73
+ margin: .2em auto .5em;
74
+ padding: 0.5em;
75
+ line-height: 1.2em;
76
+ clear: both;
77
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
78
+ }
79
+
80
+ .persuade .popup-button:hover, div.persuade input[type="submit"]:hover, div.persuade input[type="button"]:hover {
81
+ -moz-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
82
+ -webkit-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
83
+ box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
84
+ -moz-box-shadow: 0 .1em 0 #333, 0 .1em .2em rgba(0, 0, 0, 0.9) !important;
85
+ -webkit-box-shadow: 0 .1em 0 #333, 0 .1em .2em rgba(0, 0, 0, 0.9) !important;
86
+ box-shadow: 0 .1em 0 #333, 0 .1em .2em rgba(0, 0, 0, 0.9) !important;
87
+ position: relative;
88
+ top: .2em
89
+ }
90
+
91
+ .persuade #TB_ajaxContent {
92
+ overflow: hidden;
93
+ height: auto !important;
94
+ width: auto !important;
95
+ border: .6em dashed hsl(0, 100%, 100%);
96
+ }
97
+
98
+ .persuade#TB_window {
99
+ height: auto !important;
100
+ position: absolute;
101
+ -moz-box-shadow: none;
102
+ -webkit-box-shadow: none;
103
+ box-shadow: none;
104
+ background: hsl(1, 83%, 62%);
105
+ }
assets/css/toast/announce.css ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .announce.toast-container {
2
+ background-color: rgba(255, 255, 105, 0.95)
3
+ -moz-border-radius: 4px;
4
+ -webkit-border-radius: 4px;
5
+ border-radius: 4px;
6
+ -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.15), 0 0 6px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(35, 47, 64, 0.2);
7
+ -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.15), 0 0 6px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(35, 47, 64, 0.2);
8
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.15), 0 0 6px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(35, 47, 64, 0.2);
9
+ background-image: -webkit-linear-gradient(90deg, rgba(255, 255, 105, 0.95) 0%, rgba(255, 255, 105, 0) 100%);
10
+ color: rgba(67, 76, 89, 0.9);
11
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
12
+ }
13
+
14
+ .announce.toast-container > div {
15
+ border: none;
16
+ background-color: rgba(255, 255, 255, 0.15);
17
+ -moz-border-radius: 4px;
18
+ -webkit-border-radius: 4px;
19
+ border-radius: 4px;
20
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
21
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
22
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
23
+ background: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
24
+ }
25
+
26
+ .announce.toast-container > div > div {
27
+ border: none;
28
+ background-color: rgba(255, 255, 255, 0.15);
29
+ -moz-border-radius: 4px;
30
+ -webkit-border-radius: 4px;
31
+ border-radius: 4px;
32
+ -moz-box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
33
+ -webkit-box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
34
+ box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
35
+ 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%);
36
+ overflow: hidden;
37
+ }
38
+
39
+ .announce.toast-container:hover {
40
+ border-color: rgba(0, 0, 0, 1);
41
+ }
42
+
43
+ .announce .toast-title {
44
+ color: rgba(67, 76, 89, 0.9);
45
+ margin: 10px 0 0 5px;
46
+ clear: none;
47
+ }
48
+
49
+ .announce .toast-icon {
50
+ float: left;
51
+ padding: 10px 15px;
52
+ display: block;
53
+ text-align: center;
54
+ width: 36px;
55
+ height: 36px;
56
+ overflow: hidden;
57
+ }
58
+
59
+ .announce .toast-icon img {
60
+ max-width: 36px;
61
+ max-height: 36px;
62
+ vertical-align: middle;
63
+ margin: 0;
64
+ padding: 0;
65
+ float: left;
66
+ }
67
+
68
+ .announce .toast-message {
69
+ margin: 5px 15px;
70
+ }
assets/css/toast/balance.css ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .balance.toast-container {
2
+ border: 1px solid #CCC;
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 .toast-title {
11
+ display: inline;
12
+ color: hsla(0, 0%, 8%, 1);
13
+ text-shadow: 0 1px 0 hsla(0, 100%, 100%, 0.7);
14
+ clear: none;
15
+ }
16
+
17
+ .balance .toast-message {
18
+ margin: 0 0 2px 42px;
19
+ color: hsla(0, 0%, 8%, 1);
20
+ text-shadow: 0 1px 0 hsla(0, 100%, 100%, 0.7);
21
+ }
22
+
23
+ .balance.toast-container > div > div {
24
+ padding: 8px 10px;
25
+ overflow: hidden;
26
+ }
27
+
28
+ .balance .toast-icon {
29
+ float: left;
30
+ margin: 0 10px 0 0;
31
+ display: block;
32
+ text-align: center;
33
+ line-height: 32px;
34
+ width: 32px;
35
+ height: 32px;
36
+ overflow: hidden;
37
+ }
38
+
39
+ .balance .toast-icon img {
40
+ max-width: 36px;
41
+ max-height: 36px;
42
+ vertical-align: middle;
43
+ margin: 0;
44
+ padding: 0;
45
+ float: left;
46
+ }
47
+
48
+ .balance .message {
49
+ margin: 0;
50
+ }
assets/css/toast/burnt.css ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .burnt.toast-container {
2
+ min-height: 64px;
3
+ padding: 10px 10px 12px 83px;
4
+ position: relative;
5
+ -moz-box-sizing: border-box;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ .burnt .toast-base {
10
+ position: absolute;
11
+ top: 0;
12
+ left: 0;
13
+ bottom: 0;
14
+ right: 0;
15
+ background-color: transparent;
16
+ background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.88));
17
+ border: 1px solid #000;
18
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
19
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
20
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
21
+ -moz-border-radius: 4px;
22
+ -webkit-border-radius: 4px;
23
+ border-radius: 4px;
24
+ overflow: hidden;
25
+ z-index: 0;
26
+ }
27
+
28
+ .burnt .toast-icon {
29
+ width: 42px;
30
+ height: 42px;
31
+ position: absolute;
32
+ top: 12px;
33
+ left: 16px;
34
+ bottom: 1px;
35
+ z-index: 1;
36
+ }
37
+
38
+ .burnt .toast-icon img {
39
+ width: 40px;
40
+ height: 40px;
41
+ display: block;
42
+ position: absolute;
43
+ top: 50%;
44
+ left: 50%;
45
+ margin: -21px 0 0 -21px;
46
+ -moz-border-radius: 3px;
47
+ -webkit-border-radius: 3px;
48
+ border-radius: 3px;
49
+ }
50
+
51
+ .burnt .toast-line {
52
+ width: 1px;
53
+ height: 27px;
54
+ position: absolute;
55
+ top: 1px;
56
+ left: 68px;
57
+ background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
58
+ }
59
+
60
+ .burnt .toast-line:after {
61
+ content: "";
62
+ display: block;
63
+ width: 1px;
64
+ height: 26px;
65
+ position: absolute;
66
+ top: 1px;
67
+ left: -1px;
68
+ background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
69
+ }
70
+
71
+ .burnt .toast-title {
72
+ color: #fff;
73
+ overflow: hidden;
74
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
75
+ margin: 0;
76
+ position: relative;
77
+ z-index: 1;
78
+ clear: none;
79
+ }
80
+
81
+ .burnt .toast-message {
82
+ color: rgba(255, 255, 255, 0.83);
83
+ overflow: hidden;
84
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7);
85
+ position: relative;
86
+ margin: 0;
87
+ }
88
+
89
+ .burnt .emergency .toast-message {
90
+ color: #DD4B39;
91
+ }
assets/css/toast/clear.css ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .clear.toast-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 .toast-wrapper {
10
+ overflow: hidden;
11
+ padding: 9px 9px 10px 53px;
12
+ position: relative;
13
+ min-height: 34px;
14
+ }
15
+
16
+ .clear .toast-title, .clear .toast, .clear .toastwrapper, .clear .toast-icon {
17
+ position: relative;
18
+ }
19
+
20
+ .clear .toast-title, .clear .toast-message {
21
+ text-align: left;
22
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
23
+ }
24
+
25
+ .clear .toast-title {
26
+ color: #222;
27
+ letter-spacing: 0.7pt;
28
+ line-height: 16px;
29
+ display: inline-block;
30
+ clear: none;
31
+ margin: 0;
32
+ }
33
+
34
+ .clear .toast-message {
35
+ color: #444;
36
+ margin: 3px 0 0;
37
+ text-align: left;
38
+ line-height: 15px;
39
+ }
40
+
41
+ .clear .toastwrapper {
42
+ padding: 0 0 0 11px;
43
+ min-height: 34px;
44
+ }
45
+
46
+ .clear .toast-icon {
47
+ max-height: 32px;
48
+ max-width: 32px;
49
+ left: 10px;
50
+ top: 15px;
51
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
52
+ filter: alpha(opacity=100);
53
+ opacity: 1;
54
+ position: absolute;
55
+ z-index: 2;
56
+ }
57
+
58
+ .clear .toast-iconshadow {
59
+ position: absolute;
60
+ left: 13px;
61
+ top: 8px;
62
+ background: #000;
63
+ z-index: 1;
64
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=25)";
65
+ filter: alpha(opacity=25);
66
+ opacity: 0.25;
67
+ }
assets/css/toast/night-glow.css ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .night-glow.toast-container {
2
+ -moz-border-radius: 5px;
3
+ -webkit-border-radius: 5px;
4
+ border-radius: 5px;
5
+ -moz-box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.2);
6
+ -webkit-box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.2);
7
+ box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.2);
8
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
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;
16
+ }
17
+
18
+ .night-glow.toast-container > div {
19
+ -moz-border-radius: 3px;
20
+ -webkit-border-radius: 3px;
21
+ border-radius: 3px;
22
+ background-image: url(../../images/toast-glow.png);
23
+ background-repeat: no-repeat;
24
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
25
+ -moz-border-image: stretch;
26
+ -ms-border-image: stretch;
27
+ -o-border-image: stretch;
28
+ -webkit-border-image: stretch;
29
+ border-image: stretch;
30
+ position: auto;
31
+ }
32
+
33
+ .night-glow.toast-container > div > div {
34
+ -moz-border-radius: 3px;
35
+ -webkit-border-radius: 3px;
36
+ border-radius: 3px;
37
+ border-left: 1px solid rgba(255, 255, 255, 0.1);
38
+ border-right: 1px solid rgba(255, 255, 255, 0.1);
39
+ overflow: hidden;
40
+ padding: 6px 10px;
41
+ }
42
+
43
+ .night-glow .toast-title {
44
+ color: rgba(255, 255, 255, 0.9);
45
+ display: inline;
46
+ clear: none;
47
+ margin: 0 0 2px 2px;
48
+ }
49
+
50
+ .night-glow .toast-icon {
51
+ display: block;
52
+ float: left;
53
+ height: 32px;
54
+ overflow: hidden;
55
+ width: 32px;
56
+ margin: 0 10px 0 0;
57
+ padding: 0;
58
+ }
59
+
60
+ .night-glow .toast-icon img {
61
+
62
+ }
63
+
64
+ .night-glow .toast-message {
65
+ margin: 0;
66
+ padding: 0 0 0 45px;
67
+ color: rgba(255, 255, 255, 0.9);
68
+ }
assets/css/toast/stand-out.css ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .stand-out.toast-container {
2
+ min-height: 30px;
3
+ background-color: hsl(0, 0%, 12%);
4
+ 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);
5
+ -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);
6
+ -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);
7
+ 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);
8
+ -moz-border-radius: 5px;
9
+ -webkit-border-radius: 5px;
10
+ border-radius: 5px;
11
+ padding: 10px;
12
+ color: #fff;
13
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.75);
14
+ border: 1px solid #111;
15
+ }
16
+
17
+ .stand-out .toast-icon {
18
+ display: block;
19
+ float: right;
20
+ width: 32px;
21
+ height: 32px;
22
+ -moz-border-radius: 3px;
23
+ -webkit-border-radius: 3px;
24
+ border-radius: 3px;
25
+ margin: 0 10px;
26
+ }
27
+
28
+ .stand-out .toast-title {
29
+ display: inline;
30
+ padding: 0 0 0 12px;
31
+ margin: 0;
32
+ clear: none;
33
+ }
34
+
35
+ .stand-out .toast-message {
36
+ display: block;
37
+ color: rgba(255, 255, 255, 0.7);
38
+ line-height: 15px;
39
+ margin: 0;
40
+ }
41
+
42
+ .stand-out .emergency .toast-message {
43
+ color: red;
44
+ }
assets/images/chosen-sprite.png ADDED
Binary file
assets/images/clear-footer.png ADDED
Binary file
assets/images/clear-header.png ADDED
Binary file
assets/images/clear-option.png ADDED
Binary file
assets/images/close_big.png ADDED
Binary file
assets/images/desktop.png ADDED
Binary file
assets/images/icegram-logo-branding-64-grey.png ADDED
Binary file
assets/images/icegram-logo-branding-64-white.png ADDED
Binary file
assets/images/icegram-logo-branding-64.png ADDED
Binary file
assets/images/popup-amaze-bg.jpg ADDED
Binary file
assets/images/popup-close.png ADDED
Binary file
assets/images/sketch-action-bar.png ADDED
Binary file
assets/images/sketch-messenger.png ADDED
Binary file
assets/images/sketch-multiple-sequence.png ADDED
Binary file
assets/images/sketch-popup.png ADDED
Binary file
assets/images/sketch-rules.png ADDED
Binary file
assets/images/sketch-toast-notification.png ADDED
Binary file
assets/images/social-img.png ADDED
Binary file
assets/images/stand-out.png ADDED
Binary file
assets/images/talk-close.png ADDED
Binary file
assets/images/talk-footer-1.png ADDED
Binary file
assets/images/talk-header-1.png ADDED
Binary file
assets/images/talk-header-2.png ADDED
Binary file
assets/images/themes/action-bar/air-mail.png ADDED
Binary file
assets/images/themes/action-bar/bold.png ADDED
Binary file
assets/images/themes/action-bar/hello.png ADDED
Binary file
assets/images/themes/action-bar/solid.png ADDED
Binary file
assets/images/themes/messenger/canvas.png ADDED
Binary file
assets/images/themes/messenger/clear.png ADDED
Binary file
assets/images/themes/messenger/social.png ADDED
Binary file
assets/images/themes/messenger/talk.png ADDED
Binary file
assets/images/themes/popup/air-mail.png ADDED
Binary file
assets/images/themes/popup/amaze.png ADDED
Binary file
assets/images/themes/popup/compel.png ADDED
Binary file
assets/images/themes/popup/convert.png ADDED
Binary file
assets/images/themes/popup/inspire.png ADDED
Binary file
assets/images/themes/popup/persuade.png ADDED
Binary file
assets/images/themes/toast/announce.png ADDED
Binary file
assets/images/themes/toast/balance.png ADDED
Binary file
assets/images/themes/toast/burnt.png ADDED
Binary file
assets/images/themes/toast/clear.png ADDED
Binary file
assets/images/themes/toast/night-glow.png ADDED
Binary file
assets/images/themes/toast/stand-out.png ADDED
Binary file
assets/images/toast-glow.png ADDED
Binary file
assets/js/admin.js ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function() {
2
+
3
+ var preview_block;
4
+ function display_message_themes(this_data) {
5
+ var message_type = jQuery(this_data).find('.message_type option:selected').val();
6
+ var message_theme = jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').val();
7
+
8
+ jQuery(this_data).find('.message_row, .location').hide();
9
+ jQuery(this_data).find('.' + message_type + ', .all_promo').show();
10
+ jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').css('background-image', 'url(../wp-content/plugins/icegram/assets/images/themes/'+message_type+'/'+message_theme+'.png)');
11
+ }
12
+
13
+ function get_random_int(current, min, max) {
14
+ var random_int = Math.floor(Math.random() * (max - min + 1)) + min;
15
+ if ( random_int == current ) {
16
+ return get_random_int( random_int, min, max );
17
+ } else {
18
+ return random_int;
19
+ }
20
+ }
21
+
22
+ jQuery(document).ready(function() {
23
+ var original_send_to_editor = window.send_to_editor;
24
+
25
+ jQuery('#postdivrich').hide();
26
+ preview_block = jQuery('body').append('<div id="message_preview"></div>');
27
+ jQuery('.color-field').wpColorPicker();
28
+ hide_empty_campaign_message();
29
+ jQuery('.message_edit:first').trigger('click');
30
+
31
+ this_data = jQuery('.message_type option:selected').closest('.message-setting-fields');
32
+ for (var i = 0; i < this_data.length; i++) {
33
+ display_message_themes(this_data[i]);
34
+ };
35
+
36
+ jQuery('.message-setting-fields').live('change', '.message_type', function() {
37
+ display_message_themes(this);
38
+ });
39
+
40
+ jQuery('.message-setting-fields').live('change', '.message_theme', function() {
41
+
42
+ var message_type = jQuery(this).find('.message_type').val();
43
+ var message_theme = jQuery(this).find('.message_row.'+message_type).find('.message_theme').val();
44
+
45
+ jQuery(this).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').css('background-image', 'url(../wp-content/plugins/icegram/assets/images/themes/'+message_type+'/'+message_theme+'.png)');
46
+
47
+ });
48
+
49
+ jQuery('.message_image_button').live('click', function(event) {
50
+ window.send_to_editor = function(html) {
51
+ imgurl = jQuery('img', html).attr('src');
52
+ jQuery('#upload_image').val(imgurl);
53
+ tb_remove();
54
+ window.send_to_editor = original_send_to_editor;
55
+ };
56
+ return false;
57
+ });
58
+
59
+ jQuery('.message_title_button').live('click', function() {
60
+ var headline_key = jQuery(this).prev().attr('data-headline');
61
+ var headline_max = jQuery(this).prev().attr('data-max');
62
+ var new_headline_key = get_random_int( headline_key, 0, headline_max );
63
+ var new_headline = icegram_writepanel_params.available_headlines[ new_headline_key ];
64
+ jQuery(this).prev().val( new_headline );
65
+ });
66
+
67
+ jQuery(".tips, .help_tip").tipTip({'attribute' : 'data-tip'});
68
+
69
+ jQuery('span.test_class').hover(function(){
70
+ jQuery(this).next().show();
71
+ }, function(){
72
+ jQuery(this).next().hide();
73
+ });
74
+
75
+ // Disable closing message list
76
+ jQuery('#campaign_data .hndle, #campaign_data .handlediv').unbind('click');
77
+ jQuery('#campaign_data .handlediv').hide();
78
+
79
+ });
80
+
81
+ jQuery('.message_delete').live( 'click', function() {
82
+ jQuery(this).parent().parent().next().remove();
83
+ jQuery(this).parent().parent().remove();
84
+ hide_empty_campaign_message();
85
+
86
+ });
87
+
88
+ jQuery('.message_edit').live( 'click', function() {
89
+ jQuery(this).parent().parent().next().toggle();
90
+ jQuery(this).parent().parent().find('.message-title-text, .message-title-input').toggle();
91
+ });
92
+
93
+ jQuery('.message-title-input').live( 'change', function() {
94
+ jQuery(this).prev().text(jQuery(this).val());
95
+ });
96
+
97
+ jQuery("select.ajax_chosen_select_messages").ajaxChosen({
98
+ method: 'GET',
99
+ url: icegram_writepanel_params.ajax_url,
100
+ dataType: 'json',
101
+ afterTypeDelay: 100,
102
+ data: {
103
+ action: 'icegram_json_search_messages',
104
+ security: icegram_writepanel_params.search_message_nonce
105
+ }
106
+ }, function(data) {
107
+ var terms = {};
108
+ jQuery.each(data, function(i, val) {
109
+ terms[i] = val;
110
+ });
111
+ return terms;
112
+ });
113
+
114
+ var message_rows = jQuery('.message-row').length;
115
+ jQuery('.ajax_chosen_select_messages').chosen().on('change', function() {
116
+ var message_id = jQuery(this).val();
117
+ if( message_id == '' ) {
118
+ jQuery(".ajax_chosen_select_messages").val('').trigger("chosen:updated");
119
+ return;
120
+ }
121
+
122
+ jQuery('.message-edit-row').hide();
123
+ jQuery('.message-title-text').show();
124
+ jQuery('.message-title-input').hide();
125
+ jQuery.ajax({
126
+ method: 'POST',
127
+ url: icegram_writepanel_params.ajax_url,
128
+ dataType: 'json',
129
+ data: {
130
+ action: 'get_message_action_row',
131
+ message_id: message_id,
132
+ row: message_rows
133
+ },
134
+ success: function(response) {
135
+
136
+ message_rows++;
137
+ jQuery('.messages-list .messages_list_table tbody').append(response.main);
138
+ jQuery('.color-field').wpColorPicker();
139
+ display_message_themes(jQuery('#'+response.id));
140
+ jQuery(".ajax_chosen_select_messages").val('').trigger("chosen:updated");
141
+ jQuery("select.icegram_chosen_page").chosen({
142
+ disable_search_threshold: 10
143
+ });
144
+ hide_empty_campaign_message();
145
+ jQuery('.message-setting-fields').trigger('change');
146
+ jQuery(".tips, .help_tip").tipTip({'attribute' : 'data-tip'});
147
+
148
+ // quicktags({id : 'edit'+response.id});
149
+ // tinyMCE.init({
150
+ // skin : 'edit'+response.id
151
+ // });
152
+ // tinymce.init(tinyMCEPreInit.mceInit['edit'+response.id]);
153
+
154
+ }
155
+ });
156
+ });
157
+
158
+ function hide_empty_campaign_message() {
159
+ if( jQuery('.message-row').length == 0 ) {
160
+ jQuery('.empty_campaign').show();
161
+ } else {
162
+ jQuery('.empty_campaign').hide();
163
+ }
164
+ }
165
+
166
+ jQuery('select.ajax_chosen_select_messages').next('div').find('div.chosen-drop').live('click', function() {
167
+ jQuery(this).closest('h3.hndle').trigger('click');
168
+ });
169
+
170
+ jQuery('.campaign_preview').on( 'click', function(event) {
171
+ jQuery(this).closest('h3.hndle').trigger('click');
172
+
173
+ if( jQuery('.message-row').length == 0 )
174
+ return;
175
+
176
+ // Change action
177
+ params = jQuery("#post").serializeArray();
178
+ params.push( {name: 'action', value: 'save_campaign_preview' });
179
+
180
+ jQuery.ajax({
181
+ method: 'POST',
182
+ async: false,
183
+ url: icegram_writepanel_params.ajax_url,
184
+ data: params,
185
+ success: function(response) {
186
+ if (response != '') {
187
+ window.open(response, 'preview_window');
188
+ }
189
+ }
190
+ });
191
+
192
+ });
193
+
194
+ jQuery('.message_preview').on( 'click', function() {
195
+ jQuery(this).closest('h3.hndle').trigger('click');
196
+
197
+ var message_type = jQuery('.message_type option:selected').val();
198
+ var message_theme = jQuery('.message_theme_' + message_type + ' option:selected').val();
199
+
200
+ jQuery('ul.toast, #action_bar_'+jQuery('#post_ID').val()).remove();
201
+ jQuery('#message_preview').html('<div id="'+message_type+'_'+message_theme+'"></div>');
202
+ jQuery('#message_preview').append('<link rel="stylesheet" href="../wp-content/plugins/icegram/assets/css/' + message_type + '/' + message_theme + '.css" type="text/css" />');
203
+ jQuery('#message_preview').append('<link rel="stylesheet" href="../wp-content/plugins/icegram/assets/css/frontend.css" type="text/css" />');
204
+ jQuery('#'+message_type+'_'+message_theme).load("../wp-content/plugins/icegram/templates/" + message_type + ".php", jQuery('#post').serializeArray(), function() {
205
+ apply_animation_to_promo(jQuery('#post').serializeArray(), message_theme);
206
+ });
207
+
208
+ });
209
+
210
+ jQuery("select.icegram_chosen_page").chosen({
211
+ disable_search_threshold: 10
212
+ });
213
+
214
+ jQuery('input#users_logged_in, input#users_all').on('change', function() {
215
+ jQuery('select#users_roles').parent('p').slideToggle();
216
+ if (jQuery(this).val() == 'logged_in') {
217
+ jQuery('#users_roles_chosen').find('input').trigger('click');
218
+ }
219
+ });
220
+
221
+ jQuery('.schedule_rule').on('change', function() {
222
+ if (jQuery(this).attr('id') == "when_schedule") {
223
+ jQuery('#date_picker').show();
224
+ } else {
225
+ jQuery('#date_picker').hide();
226
+ }
227
+ });
228
+
229
+ jQuery('input#where_other_page').on('change', function() {
230
+ jQuery('select#where_page_id').parent('p').slideToggle();
231
+ if (jQuery(this).is(':checked')) {
232
+ jQuery('#where_page_id_chosen').find('input').trigger('click');
233
+ }
234
+ });
235
+
236
+ jQuery('.date-picker').datepicker({
237
+ dateFormat: 'yy-mm-dd',
238
+ defaultDate: 0,
239
+ showOtherMonths: true,
240
+ selectOtherMonths: true,
241
+ changeMonth: true,
242
+ changeYear: true,
243
+ showButtonPanel: true
244
+ });
245
+ });
assets/js/ajax-chosen.jquery.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ // Generated by CoffeeScript 1.3.1
2
+ (function(e){return e.fn.ajaxChosen=function(t,n){var r,i,s,o;t==null&&(t={});n==null&&(n=function(){});i={minTermLength:3,afterTypeDelay:500,jsonTermKey:"term"};o=this;r=null;s=e.extend({},i,t);this.chosen();return this.each(function(){return e(this).next(".chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",function(){var t,i,u,a;a=e.trim(e(this).attr("value"));i=a.length<s.minTermLength?"Keep typing...":"Looking for '"+a+"'";o.next(".chosen-container").find(".no-results").text(i);if(a===e(this).data("prevVal"))return!1;e(this).data("prevVal",a);this.timer&&clearTimeout(this.timer);if(a.length<s.minTermLength)return!1;t=e(this);s.data==null&&(s.data={});s.data[s.jsonTermKey]=a;s.dataCallback!=null&&(s.data=s.dataCallback(s.data));u=s.success;s.success=function(r){var i,s;if(r==null)return;s=[];o.find("option").each(function(){return e(this).is(":selected")?s.push(e(this).val()+"-"+e(this).text()):e(this).remove()});i=n(r);e.each(i,function(t,n){if(e.inArray(t+"-"+n,s)===-1)return e("<option />").attr("value",t).html(n).appendTo(o)});o.trigger("chosen:updated");u!=null&&u(r);t.attr("value",a);return t.css("width","auto")};return this.timer=setTimeout(function(){r&&r.abort();return r=e.ajax(s)},s.afterTypeDelay)})})}})(jQuery);
assets/js/chosen.jquery.js ADDED
@@ -0,0 +1,1211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/chosen.jquery.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
+ !function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),children:0,disabled:a.disabled}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(c.text));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b;return a.search_match||a.group_match?a.active_options>0?(b=document.createElement("li"),b.className="group-result",b.innerHTML=a.search_text,this.outerHTML(b)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(this.no_results_clear(),e=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=this.search_contains?"":"^",c=new RegExp(d+a,"i"),j=new RegExp(a,"i"),m=this.results_data,k=0,l=m.length;l>k;k++)b=m[k],b.search_match=!1,f=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(f=this.results_data[b.group_array_index],0===f.active_options&&f.search_match&&(e+=1),f.active_options+=1),(!b.group||this.group_search)&&(b.search_text=b.group?b.label:b.html,b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(e+=1),b.search_match?(g.length&&(h=b.search_text.search(j),i=b.search_text.substr(0,h+g.length)+"</em>"+b.search_text.substr(h+g.length),b.search_text=i.substr(0,h)+"<em>"+i.substr(h)),null!=f&&(f.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>e&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d?d.destroy():d||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" 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>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+b.html+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(c.text),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}.call(this);
assets/js/frontend.js ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function() {
2
+
3
+ if (typeof icegram_data === 'undefined') {
4
+ return;
5
+ }
6
+
7
+ var icegram_default = icegram_data['icegram_default'];
8
+ var icegram_event = [];
9
+ for (var i = 0; i < icegram_data['messages'].length; i++) {
10
+ display_icegram_message( icegram_data['messages'][i] );
11
+ };
12
+
13
+ function display_icegram_message(icegram, theme) {
14
+
15
+ if (typeof(theme) != 'undefined') {
16
+
17
+ icegram_preview = {};
18
+ for (var i = 0; i < icegram.length; i++) {
19
+ if ((icegram[i].name).indexOf("message_data") >= 0) {
20
+ var name = (icegram[i].name).replace('message_data['+jQuery('#post_ID').val()+'][', '').replace(']', '').replace( jQuery('#post_ID').val(), '');
21
+ icegram_preview[name] = icegram[i].value;
22
+ }
23
+ }
24
+
25
+ icegram = icegram_preview;
26
+ icegram.delay_time = 0;
27
+ icegram.theme = theme;
28
+ }
29
+
30
+ var delay_time = icegram.delay_time * 1000;
31
+ var event_data = {};
32
+
33
+ // Powered by links
34
+ var ig_powered_by_link = 'http://www.icegram.com/?utm_source=inapp&utm_campaign=poweredby&utm_medium=';
35
+
36
+ if (icegram.type == "toast") {
37
+
38
+ var th = null, cf = null;
39
+ var toast = function(icegram) {
40
+ var popup_box = '#toast_' + icegram.id;
41
+ var type = icegram['theme']['toast'];
42
+ var width = 300;
43
+ var duration = 10000;
44
+ var sticky = false;
45
+
46
+ if( icegram.position == "10" || icegram.position == "12" ) {
47
+ icegram.position = '20';
48
+ }
49
+
50
+ cf = toast.config;
51
+ if (!(jQuery('ul#' + icegram.position).length)) {
52
+ th = jQuery('<ul id="' + icegram.position + '"></ul>').addClass('toast-block').appendTo(document.body).hide();
53
+ th.width(width);
54
+
55
+ if (icegram.position == "00") {
56
+ th.css({top: '0', left: '0'});
57
+ } else if (icegram.position == "01") {
58
+ th.css({top: '0', left: '50%', margin: '5px 0 0 -' + (width / 2) + 'px'});
59
+ } else if (icegram.position == "02") {
60
+ th.css({top: '0', right: '0'});
61
+ } else if (icegram.position == "20") {
62
+ th.css({bottom: '0', left: '0'});
63
+ } else if (icegram.position == "21") {
64
+ th.css({bottom: '0', left: '50%', margin: '5px 0 0 -' + (width / 2) + 'px'});
65
+ } else if (icegram.position == "22") {
66
+ th.css({bottom: '0', right: '0'});
67
+ } else if (icegram.position == "11") {
68
+ th.css({top: '50%', left: '50%', margin: '-'+(width / 2) +'px 0 0 -' + (width / 2) + 'px'});
69
+ }
70
+
71
+ } else {
72
+ th = jQuery('ul#' + icegram.position);
73
+ }
74
+ if (jQuery(popup_box).length) {
75
+
76
+ if( typeof(promo_theme) == 'undefined' ) {
77
+ jQuery(popup_box + ' li').addClass(icegram['theme']['toast']);
78
+ }
79
+ else {
80
+ jQuery(popup_box + ' li').addClass(icegram.theme);
81
+ }
82
+ jQuery(popup_box + ' li').addClass(icegram.toast_animation);
83
+ jQuery(popup_box + ' li').attr('link', icegram.link);
84
+ jQuery(popup_box + ' li').find('.toast-title').html(icegram.title);
85
+ jQuery(popup_box + ' li').find('.toast-message').html(icegram.message);
86
+ if( icegram.promo_image != '' ) {
87
+ jQuery(popup_box + ' li').find('img').attr('src', icegram.promo_image);
88
+ } else {
89
+ jQuery(popup_box + ' li').find('img').attr('src', icegram_default.default_promo_image);
90
+ }
91
+
92
+ var ti = jQuery(popup_box + ' li').appendTo(th);
93
+ jQuery(popup_box).remove();
94
+ var cb = ti,
95
+ to = null;
96
+ } else {
97
+ return;
98
+ }
99
+
100
+ ti.addClass(icegram['theme']['toast']);
101
+ !th.hasClass('active') && th.addClass('active').show();
102
+ ti.fadeIn('slow');
103
+
104
+ !icegram_data.preview_id && icegram_track_event_type('shown', icegram);
105
+
106
+ !sticky && duration > 0 && (to = setTimeout(function() {
107
+ clearTimeout(to);
108
+ ti.animate({
109
+ height: 0,
110
+ opacity: 0
111
+ }, 'fast', function() {
112
+ ti.remove();
113
+ th.children().length || th.removeClass('active').hide();
114
+ });
115
+
116
+ }, duration));
117
+ };
118
+
119
+ jQuery('#toast_' + icegram.id).hide();
120
+ setTimeout(function() {
121
+
122
+ toast(icegram);
123
+ jQuery('ul.toast-block').on('click', 'li', function() {
124
+ if( jQuery(this).attr('link') == '' ) {
125
+ jQuery(this).remove();
126
+ return;
127
+ }
128
+ !icegram_data.preview_id && icegram_track_event_type('clicked', icegram);
129
+ //window.open(jQuery(this).attr('link'), "_parent");
130
+ window.location.href = jQuery(this).attr('link');
131
+ });
132
+
133
+ }, delay_time);
134
+ // Toast Message End
135
+ } else if (icegram.type == "action-bar") {
136
+
137
+ var popup_box = '#action_bar_' + icegram.id;
138
+ var popup_box_close = '#action_bar_close_' + icegram.id;
139
+
140
+ if( typeof(promo_theme) == 'undefined' )
141
+ var theme = icegram['theme']['action-bar'];
142
+ else
143
+ var theme = icegram.theme;
144
+
145
+ jQuery(popup_box).addClass(theme);
146
+ jQuery(popup_box).find('.heading').html(icegram.title);
147
+ jQuery(popup_box).find('.message').prepend(icegram.message);
148
+ jQuery(popup_box).find('.popup_button').attr('value', icegram.link);
149
+ jQuery(popup_box).find('.popup_close').css('background-color', icegram.bg_color);
150
+ jQuery(popup_box).find('.content').css('color', icegram.text_color);
151
+ jQuery(popup_box).css('background-color', icegram.bg_color);
152
+
153
+ if( icegram_default.powered_by_logo != '' ) {
154
+ if( theme != 'air-mail' ) {
155
+ jQuery(popup_box).find('.content').before('<div class="powered_by" ><a href="'+ig_powered_by_link+icegram.type+'" target="_blank"><img src="'+icegram_default.powered_by_logo+'" title="'+icegram_default.powered_by_text+'"/></a></div>');
156
+ } else {
157
+ jQuery(popup_box).find('.content').prepend('<div class="powered_by" ><a href="'+ig_powered_by_link+icegram.type+'" target="_blank"><img src="'+icegram_default.powered_by_logo+'" title="'+icegram_default.powered_by_text+'"/></a></div>');
158
+ }
159
+ //jQuery(popup_box).find('.data').css({'width':'75%', 'max-width':'75%'});
160
+ }
161
+
162
+ if( theme == 'hello' ) {
163
+ var popup_image = jQuery(popup_box).find('.popup_box_image');
164
+ var popup_bottom = jQuery(popup_box).find('.popup_button');
165
+ jQuery(popup_box).find('.data').prepend(popup_image);
166
+ jQuery(popup_box).find('.data').append(popup_bottom);
167
+ }
168
+ if ( theme == 'air-mail') {
169
+ jQuery(popup_box).find('.content').css('background-color', icegram.bg_color);
170
+ }
171
+
172
+ if( icegram.label == '' ) {
173
+ jQuery(popup_box).find('.popup_button').hide();
174
+ } else {
175
+ jQuery(popup_box).find('.popup_button').html(icegram.label);
176
+ }
177
+
178
+ if (icegram.position == "00" || icegram.position == "01" || icegram.position == "02" || icegram.position == "10" || icegram.position == "11" ) {
179
+
180
+ jQuery(popup_box).addClass('top');
181
+ var popup_close_block = jQuery('.action_bar_' + icegram.id).find('.popup_close');
182
+ var popup_template = jQuery('.action_bar_' + icegram.id);
183
+ jQuery(popup_template).find('.popup_close').remove();
184
+ jQuery(popup_template).find('.content').prepend(popup_close_block);
185
+ jQuery(popup_box).parent('.action_bar_' + icegram.id).remove();
186
+ jQuery('body').prepend(popup_template);
187
+
188
+ function load_popup_on_top(popup_box, delay_time) {
189
+
190
+ jQuery(popup_box).delay(delay_time).animate({
191
+ marginTop: -jQuery(popup_box).outerHeight()
192
+ }, 0, "linear", function() {
193
+ jQuery(popup_box).show();
194
+ jQuery(popup_box).find('.bar_close').show();
195
+ jQuery(popup_box).find('.bar_open').hide();
196
+ jQuery(popup_box).find('.popup_close').addClass('open').removeClass('border').css('position', 'initial');
197
+ // jQuery(popup_box_close).css('margin-top', (jQuery(popup_box).find('.content').height()-jQuery(popup_box).find('.popup_close').height() - 5)+"px" );
198
+
199
+ !icegram_data.preview_id && icegram_track_event_type('shown', icegram);
200
+ });
201
+ jQuery(popup_box).animate({
202
+ marginTop: 0
203
+ }, 300);
204
+ }
205
+
206
+ load_popup_on_top(popup_box, delay_time);
207
+
208
+ jQuery(popup_box).on('click', '.bar_close, .close', function() {
209
+
210
+ var popup_id = "#" + jQuery(this).parent().parent().parent().attr('id');
211
+ jQuery(popup_id).animate({
212
+ marginTop: -jQuery(popup_id).outerHeight()
213
+ }, 300, "linear", function() {
214
+
215
+ jQuery(popup_box_close).css('margin-top', '0' );
216
+ jQuery(popup_id).find('.bar_close').hide();
217
+ jQuery(popup_id).find('.bar_open').show();
218
+ jQuery(popup_id).find('.popup_close').removeClass('open').addClass('border').css({
219
+ 'position': 'absolute',
220
+ 'top': '0'
221
+ });
222
+ !icegram_data.preview_id && icegram_track_event_type('closed', icegram);
223
+ });
224
+ });
225
+ jQuery(popup_box_close).on('click', '.bar_open', function() {
226
+ load_popup_on_top("#" + jQuery(this).parent().parent().parent().attr('id'), 0);
227
+ });
228
+
229
+ } else if (icegram.position == "12" || icegram.position == "20" || icegram.position == "21" || icegram.position == "22" ) {
230
+
231
+ jQuery(popup_box).addClass('bottom');
232
+ jQuery(popup_box).css('position', 'fixed');
233
+
234
+ function load_popup_on_bottom(popup_box, delay_time) {
235
+ jQuery(popup_box).delay(delay_time).animate({
236
+ bottom: 0,
237
+ marginBottom: -jQuery(popup_box).outerHeight()
238
+
239
+ }, 0, "linear", function() {
240
+ jQuery(popup_box).show();
241
+ jQuery(popup_box).find('.bar_close').hide();
242
+ jQuery(popup_box).find('.bar_open').show();
243
+ jQuery(popup_box).find('.popup_close').addClass('open').removeClass('border').css('position', 'initial');
244
+
245
+ !icegram_data.preview_id && icegram_track_event_type('shown', icegram);
246
+ });
247
+ jQuery(popup_box).animate({
248
+ marginBottom: 0
249
+ }, 300);
250
+ }
251
+
252
+ load_popup_on_bottom(popup_box, delay_time);
253
+
254
+ jQuery(popup_box).on('click', '.bar_open, .close', function() {
255
+
256
+ var popup_id = "#" + jQuery(this).parent().parent().parent().attr('id');
257
+ jQuery(popup_id).animate({
258
+ marginBottom: -jQuery(popup_id).outerHeight()
259
+ }, 300, "linear", function() {
260
+
261
+ jQuery(popup_id).find('.bar_close').show();
262
+ jQuery(popup_id).find('.bar_open').hide();
263
+ jQuery(popup_id).find('.popup_close').removeClass('open').addClass('border').css({
264
+ 'position': 'fixed',
265
+ 'bottom': '0'
266
+ });
267
+ !icegram_data.preview_id && icegram_track_event_type('closed', icegram);
268
+ });
269
+ });
270
+
271
+ jQuery(popup_box_close).on('click', '.bar_close', function() {
272
+ load_popup_on_bottom("#" + jQuery(this).parent().parent().parent().attr('id'), 0);
273
+ });
274
+ }
275
+
276
+ jQuery(popup_box).on('click', '.popup_button', function() {
277
+ !icegram_data.preview_id && icegram_track_event_type('clicked', icegram);
278
+ if( jQuery(this).attr('value') == '' ) {
279
+ jQuery(popup_box+' .close').trigger('click');
280
+ return;
281
+ } else {
282
+ //window.open(jQuery(this).attr('value'), "_parent");
283
+ window.location.href = jQuery(this).attr('value');
284
+ }
285
+ });
286
+ // Action Bar End
287
+ } else if (icegram.type == "messenger") {
288
+
289
+ var popup_box = '#popup_box_' + icegram.id;
290
+ var popup_box_close = '#popup_box_close_' + icegram.id;
291
+
292
+ if (typeof(promo_theme) == 'undefined') {
293
+ var theme = icegram['theme']['messenger'];
294
+ } else {
295
+ var theme = icegram.theme;
296
+ }
297
+
298
+ jQuery(popup_box).addClass(theme);
299
+ if( icegram_default.powered_by_text != '' ) {
300
+ jQuery(popup_box).find('.popup_box_main').after('<div class="powered_by"><a href="'+ig_powered_by_link+icegram.type+'" target="_blank">'+icegram_default.powered_by_text+'</a></div>');
301
+ }
302
+ jQuery(popup_box).find('.popup_box_heading').html(icegram.title);
303
+ // jQuery(popup_box).find('.popup_box_body').html(icegram.message.replace(/\n/g, '<br />'));
304
+ jQuery(popup_box).find('.popup_box_message').html(icegram.message);
305
+ jQuery(popup_box).find('.popup_box_main').attr('value', icegram.link);
306
+
307
+ if( icegram.promo_image != '' ) {
308
+ jQuery(popup_box).find('.popup_box_body').prepend('<img class="popup_icon" src="'+icegram.promo_image+'"/>')
309
+ } else {
310
+ jQuery(popup_box).find('.popup_box_message').addClass('no-image');
311
+ }
312
+ jQuery(popup_box).click(function(event) {
313
+ if (jQuery(event.target).filter('.popup_box_close').length)
314
+ return;
315
+
316
+ !icegram_data.preview_id && icegram_track_event_type('clicked', icegram);
317
+ if( jQuery(this).find('.popup_box_main').attr('value') == '' ) {
318
+ jQuery(popup_box_close).trigger('click');
319
+ return;
320
+ } else {
321
+ //window.open(jQuery(this).find('.popup_box_main').attr('value'), "_parent");
322
+ window.location.href = jQuery(this).find('.popup_box_main').attr('value');
323
+ }
324
+ });
325
+
326
+ if (icegram.position == "20" || icegram.position == "00" || icegram.position == "10" || icegram.position == "01" ) {
327
+ var left_pos = 0;
328
+ } else if (icegram.position == "22" || icegram.position == "11" || icegram.position == "21" || icegram.position == "02" || icegram.position == "12") {
329
+ var left_pos = jQuery(window).width() - jQuery(popup_box).outerWidth();
330
+ }
331
+
332
+ if (icegram.animation == "slide") {
333
+
334
+ jQuery(popup_box).delay(delay_time).animate({
335
+ bottom: 0,
336
+ left: left_pos,
337
+ height: "toggle"
338
+ }, 0);
339
+
340
+ jQuery(popup_box).animate({
341
+ height: "toggle",
342
+ opacity: "toggle"
343
+ }, 1500);
344
+ !icegram_data.preview_id && icegram_track_event_type('shown', icegram);
345
+ jQuery(popup_box_close).click(function() {
346
+ jQuery("#" + jQuery(this).parent().attr('id')).animate({
347
+ height: "toggle",
348
+ opacity: 0
349
+ }, 500, function() {
350
+ jQuery("#" + jQuery(this).parent().attr('id')).hide("slide", {
351
+ direction: "down"
352
+ }, 100);
353
+ !icegram_data.preview_id && icegram_track_event_type('closed', icegram);
354
+ });
355
+ });
356
+
357
+ } else if (icegram.animation == "appear") {
358
+
359
+ jQuery(popup_box).delay(delay_time).animate({
360
+ bottom: 0,
361
+ left: left_pos,
362
+ opacity: 0
363
+ }, 0, "linear", function() {
364
+ jQuery(popup_box).show();
365
+ });
366
+ jQuery(popup_box).animate({
367
+ opacity: 1
368
+ }, 1500);
369
+ !icegram_data.preview_id && icegram_track_event_type('shown', icegram);
370
+ jQuery(popup_box_close).click(function() {
371
+ var id = jQuery("#" + jQuery(this).parent().attr('id'));
372
+ jQuery(id).animate({
373
+ opacity: 0
374
+ }, 500, "linear", function() {
375
+ jQuery(id).hide();
376
+ !icegram_data.preview_id && icegram_track_event_type('closed', icegram);
377
+ });
378
+ });
379
+ }
380
+ // Messenger End
381
+ } else if (icegram.type == "popup") {
382
+
383
+ var popup_box = '#popup_box_' + icegram.id;
384
+ var popup_box_close = '#popup_box_close_' + icegram.id;
385
+ jQuery('#popup_main_' + icegram.id).hide();
386
+
387
+ if( typeof(promo_theme) == 'undefined' )
388
+ var theme = icegram['theme']['popup'];
389
+ else
390
+ var theme = icegram.theme;
391
+
392
+ function popup_resize() {
393
+ if( jQuery( window ).height() < jQuery( '#TB_window' ).height() || jQuery( window ).width() < jQuery( '#TB_window' ).width() ) {
394
+
395
+ var height = (jQuery( window ).height()-50)/(jQuery( '#TB_window' ).height());
396
+ var width = (jQuery( window ).width()-50)/(jQuery( '#TB_window' ).width());
397
+ if(height<width){
398
+ jQuery('#TB_window').css({'-webkit-transform': 'scale('+height+')',
399
+ '-moz-transform': 'scale('+height+')',
400
+ '-ms-transform': 'scale('+height+')',
401
+ '-o-transform': 'scale('+height+')',
402
+ 'transform': 'scale('+height+')'});
403
+ } else {
404
+ jQuery('#TB_window').css({'-webkit-transform': 'scale('+width+')',
405
+ '-moz-transform': 'scale('+width+')',
406
+ '-ms-transform': 'scale('+width+')',
407
+ '-o-transform': 'scale('+width+')',
408
+ 'transform': 'scale('+width+')'});
409
+ }
410
+ } else {
411
+ jQuery('#TB_window').css({'-webkit-transform': 'scale(1)',
412
+ '-moz-transform': 'scale(1)',
413
+ '-ms-transform': 'scale(1)',
414
+ '-o-transform': 'scale(1)',
415
+ 'transform': 'scale(1)'});
416
+ }
417
+ }
418
+
419
+ jQuery( window ).resize(function() {
420
+ popup_resize();
421
+ });
422
+
423
+ jQuery(popup_box).find('.popup-headline').html(icegram.title);
424
+ jQuery(popup_box).find('.popup-message').html(icegram.message);
425
+ jQuery(popup_box).find('.popup-button').attr('value', icegram.link);
426
+ jQuery(popup_box).find('.popup-button').html(icegram.label);
427
+ if( icegram.label == '' ) {
428
+ jQuery(popup_box).find('.popup-button').hide();
429
+ }
430
+ if( icegram.promo_image ) {
431
+ jQuery(popup_box).find('.popup-icon').attr('src', icegram.promo_image);
432
+ } else {
433
+ jQuery(popup_box).find('.popup-image').hide();
434
+ jQuery(popup_box).find('.popup-message').css({'width':'100%', 'margin-bottom': '0'});
435
+ }
436
+
437
+ setTimeout(function() {
438
+
439
+ var popup_delay = 0;
440
+ if( jQuery('body').find('#TB_window').length ) {
441
+ var popup_delay = 800;
442
+ tb_remove();
443
+ }
444
+
445
+ setTimeout( function() {
446
+ var popup_width = (jQuery(window).width() * 60) / 100;
447
+ tb_show('Popup', "#TB_inline?width="+popup_width+"&modal=true&inlineId=popup_main_" + icegram.id, true);
448
+ jQuery(popup_box).parent().parent().addClass(theme);
449
+ if( icegram_default.powered_by_text != '' ) {
450
+ jQuery('#TB_window').prev().append('<div class="powered_by"><a href="'+ig_powered_by_link+icegram.type+'" target="_blank">'+icegram_default.powered_by_text+'</a></div>');
451
+ }
452
+ popup_resize();
453
+ !icegram_data.preview_id && icegram_track_event_type('shown', icegram);
454
+ },popup_delay);
455
+
456
+ }, delay_time);
457
+
458
+ jQuery(popup_box_close).on('click', function() {
459
+ self.parent.tb_remove();
460
+ !icegram_data.preview_id && icegram_track_event_type('closed', icegram);
461
+ setTimeout( function() {
462
+ jQuery(popup_box).hide();
463
+ },500);
464
+ });
465
+ jQuery(popup_box).on('click', '.popup-button', function() {
466
+ !icegram_data.preview_id && icegram_track_event_type('clicked', icegram);
467
+ if( jQuery(this).attr('value') == '' ) {
468
+ jQuery(popup_box_close).trigger('click');
469
+ return;
470
+ } else {
471
+ //window.open(jQuery(this).attr('value'), "_parent");
472
+ window.location.href = jQuery(this).attr('value');
473
+ }
474
+ });
475
+
476
+ }
477
+ // Popup End
478
+ } // end display_icegram_message function
479
+
480
+ function icegram_track_event_type(type, icegram) {
481
+ icegram_event.push({ 'type': type, 'params': {'message_id': icegram.id,
482
+ 'campaign_id': icegram.campaign_id}
483
+ });
484
+ }
485
+
486
+ function icegram_send_tracking_data() {
487
+ if (icegram_event.length > 0) {
488
+ jQuery.ajax({
489
+ method: 'POST',
490
+ url: icegram_data.ajax_url,
491
+ async: false,
492
+ data: {
493
+ action: 'icegram_event_track',
494
+ event_data: icegram_event
495
+ }
496
+ });
497
+ }
498
+ }
499
+
500
+ jQuery( window ).unload( function() {
501
+ icegram_send_tracking_data();
502
+ } );
503
+
504
+ });
assets/js/jquery.tipTip.js ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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);
assets/js/jquery.tipTip.min.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ */(function(e){e.fn.tipTip=function(t){var n={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},r=e.extend(n,t);if(e("#tiptip_holder").length<=0){var i=e('<div id="tiptip_holder" style="max-width:'+r.maxWidth+';"></div>'),s=e('<div id="tiptip_content"></div>'),o=e('<div id="tiptip_arrow"></div>');e("body").append(i.html(s).prepend(o.html('<div id="tiptip_arrow_inner"></div>')))}else var i=e("#tiptip_holder"),s=e("#tiptip_content"),o=e("#tiptip_arrow");return this.each(function(){var t=e(this);if(r.content)var n=r.content;else var n=t.attr(r.attribute);if(n!=""){r.content||t.removeAttr(r.attribute);var u=!1;if(r.activation=="hover"){t.hover(function(){a()},function(){r.keepAlive||f()});r.keepAlive&&i.hover(function(){},function(){f()})}else if(r.activation=="focus")t.focus(function(){a()}).blur(function(){f()});else if(r.activation=="click"){t.click(function(){a();return!1}).hover(function(){},function(){r.keepAlive||f()});r.keepAlive&&i.hover(function(){},function(){f()})}function a(){r.enter.call(this);s.html(n);i.hide().removeAttr("class").css("margin","0");o.removeAttr("style");var a=parseInt(t.offset().top),f=parseInt(t.offset().left),l=parseInt(t.outerWidth()),c=parseInt(t.outerHeight()),h=i.outerWidth(),p=i.outerHeight(),d=Math.round((l-h)/2),v=Math.round((c-p)/2),m=Math.round(f+d),g=Math.round(a+c+r.edgeOffset),y="",b="",w=Math.round(h-12)/2;r.defaultPosition=="bottom"?y="_bottom":r.defaultPosition=="top"?y="_top":r.defaultPosition=="left"?y="_left":r.defaultPosition=="right"&&(y="_right");var E=d+f<parseInt(e(window).scrollLeft()),S=h+f>parseInt(e(window).width());if(E&&d<0||y=="_right"&&!S||y=="_left"&&f<h+r.edgeOffset+5){y="_right";b=Math.round(p-13)/2;w=-12;m=Math.round(f+l+r.edgeOffset);g=Math.round(a+v)}else if(S&&d<0||y=="_left"&&!E){y="_left";b=Math.round(p-13)/2;w=Math.round(h);m=Math.round(f-(h+r.edgeOffset+5));g=Math.round(a+v)}var x=a+c+r.edgeOffset+p+8>parseInt(e(window).height()+e(window).scrollTop()),T=a+c-(r.edgeOffset+p+8)<0;if(x||y=="_bottom"&&x||y=="_top"&&!T){y=="_top"||y=="_bottom"?y="_top":y+="_top";b=p;g=Math.round(a-(p+5+r.edgeOffset))}else if(T|(y=="_top"&&T)||y=="_bottom"&&!x){y=="_top"||y=="_bottom"?y="_bottom":y+="_bottom";b=-12;g=Math.round(a+c+r.edgeOffset)}if(y=="_right_top"||y=="_left_top")g+=5;else if(y=="_right_bottom"||y=="_left_bottom")g-=5;if(y=="_left_top"||y=="_left_bottom")m+=5;o.css({"margin-left":w+"px","margin-top":b+"px"});i.css({"margin-left":m+"px","margin-top":g+"px"}).attr("class","tip"+y);u&&clearTimeout(u);u=setTimeout(function(){i.stop(!0,!0).fadeIn(r.fadeIn)},r.delay)}function f(){r.exit.call(this);u&&clearTimeout(u);i.fadeOut(r.fadeOut)}}})}})(jQuery);
classes/class-wp-campaign.php ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * WP Campaign class
5
+ */
6
+ class WP_Campaign {
7
+
8
+ var $title;
9
+ var $message_ids;
10
+ var $rule_where;
11
+ var $rule_when;
12
+ var $rule_device;
13
+ var $rule_users;
14
+ var $default_target_rules;
15
+
16
+ function __construct( $campaign_id = '' ) {
17
+
18
+ if ( !empty( $campaign_id ) ) {
19
+
20
+ $post = get_post( $campaign_id );
21
+
22
+ $this->title = $post->post_title;
23
+ $this->message_ids = get_post_meta( $post->ID, 'messages', true );
24
+ $rules = get_post_meta( $post->ID, 'icegram_campaign_target_rules', true );
25
+
26
+ $this->rule_where = array(
27
+ 'homepage' => ( !empty( $rules['homepage'] ) ) ? $rules['homepage'] : '',
28
+ 'other_page' => ( !empty( $rules['other_page'] ) && $rules['other_page'] == 'yes' && !empty( $rules['page_id'] ) ) ? $rules['page_id'] : '',
29
+ 'blog' => ( !empty( $rules['blog'] ) ) ? $rules['blog'] : '',
30
+ 'sitewide' => ( !empty( $rules['sitewide'] ) ) ? $rules['sitewide'] : ''
31
+ );
32
+ $this->rule_when = array(
33
+ 'when' => ( !empty( $rules['when'] ) ) ? $rules['when'] : '',
34
+ 'from' => ( !empty( $rules['from'] ) ) ? $rules['from'] : '',
35
+ 'to' => ( !empty( $rules['to'] ) ) ? $rules['to'] : ''
36
+ );
37
+ $this->rule_device = array(
38
+ 'mobile' => ( !empty( $rules['mobile'] ) ) ? $rules['mobile'] : '',
39
+ 'tablet' => ( !empty( $rules['tablet'] ) ) ? $rules['tablet'] : '',
40
+ 'laptop' => ( !empty( $rules['laptop'] ) ) ? $rules['laptop'] : ''
41
+ );
42
+ $this->rule_users = ( !empty( $rules['logged_in'] ) && $rules['logged_in'] == 'logged_in' ) ? ( ( !empty( $rules['users'] ) ) ? $rules['users'] : array( 'none' ) ) : array( 'all' );
43
+
44
+ $this->rule_retargeting = array( 'retargeting' => ( !empty( $rules['retargeting'] ) ) ? $rules['retargeting'] : '' );
45
+
46
+ }
47
+
48
+ $this->default_target_rules = array( 'homepage' => 'yes',
49
+ 'when' => 'always',
50
+ 'mobile' => 'yes',
51
+ 'tablet' => 'yes',
52
+ 'laptop' => 'yes',
53
+ 'logged_in' => 'all'
54
+ );
55
+
56
+ add_action( 'add_meta_boxes', array( &$this, 'add_campaigns_metaboxes' ), 0 );
57
+ add_action( 'save_post', array( &$this, 'save_campaign_settings' ), 10, 2 );
58
+ add_action( 'wp_ajax_icegram_json_search_messages', array( &$this, 'icegram_json_search_messages' ) );
59
+ add_action( 'wp_ajax_get_message_action_row', array( &$this, 'get_message_action_row' ) );
60
+ add_filter( 'wp_default_editor', create_function('', 'return "html";') );
61
+ add_action( 'wp_ajax_save_campaign_preview', array( &$this , 'save_campaign_preview' ) );
62
+
63
+ }
64
+
65
+ function add_campaigns_metaboxes() {
66
+
67
+ $meta_box_title = '<label class="options_header" for="icegram_messages">' . __( 'Message &mdash; ', 'translate_icegram' ) . '</label>
68
+ <select id="icegram_messages" name="icegram_messages[]" class="ajax_chosen_select_messages" data-placeholder="' . __( 'Search to add / Create new&hellip;', 'translate_icegram' ) . '">';
69
+
70
+ $promotype = apply_filters( 'icegram_all_message_type', array() );
71
+ $meta_box_title .= '<option value=""></option>';
72
+ foreach ( $promotype as $key => $value ) {
73
+ $meta_box_title .= '<option value="'.$key.'">'.__( 'Create new', 'translate_icegram' ).' '.$value.' ...</option>';
74
+ }
75
+
76
+ $meta_box_title .= '</select>';
77
+ $meta_box_title .= '<div class="button button-primary campaign_preview" value="' . home_url() . '">' . __( 'Preview' ) . '</div>';
78
+
79
+ add_meta_box( 'campaign_data', $meta_box_title, array( &$this, 'campaign_data_content' ), 'campaign', 'normal', 'high' );
80
+ add_meta_box( 'campaign_target_rules', __( 'Targeting Rules <em>Messages in this campaign will be shown when all these rules match...</em>', 'translate_icegram' ), array( &$this, 'campaign_target_rules_content' ), 'campaign', 'normal' );
81
+
82
+ }
83
+
84
+ function campaign_data_content() {
85
+ global $post, $wp_message;
86
+
87
+ ?>
88
+ <div class="campaign_target_rules_panel">
89
+ <div class="options_group">
90
+ <div class="messages-list">
91
+ <table class="messages_list_table">
92
+ <?php
93
+ $this->message_list_table_header();
94
+ ?>
95
+ <tbody>
96
+ <?php
97
+ $promotype = apply_filters( 'icegram_all_message_type', array() );
98
+ $messages = get_post_meta( $post->ID, 'messages', true );
99
+ if ( !empty( $messages ) ) {
100
+ foreach ( $messages as $row => $message ) {
101
+ $message_title = get_the_title( $message['id'] );
102
+ $message_data = get_post_meta( $message['id'], 'icegram_message_data', true );
103
+ $promo_type = ( !empty( $message_data['type'] ) ) ? $message_data['type'] : '';
104
+ if ( empty( $promotype[ $promo_type ] ) ) continue;
105
+ ?>
106
+ <tr class="form-field message-row" value="<?php echo $message['id']; ?>">
107
+ <td class="message_header">
108
+ <label class="message_header_label <?php echo $message_data['type']; ?>"><?php echo $promotype[ $message_data['type'] ]; ?></label>
109
+ </td>
110
+ <td class="message_title">
111
+ <div class="message-title-text"><?php echo $message_title; ?></div>
112
+ <input type="text" class="message-title-input" name="message_data[<?php echo $message['id']; ?>][post_title]" value="<?php echo $message_title; ?>" placeholder="<?php echo __( 'Give this message a name for your own reference', 'translate_icegram' ); ?>" style="display: none;">
113
+ </td>
114
+ <td class="message_seconds">
115
+ <input type="hidden" name="messages[<?php echo $row; ?>][id]" value="<?php echo $message['id']; ?>" />
116
+ <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" />
117
+ <?php _e( ' sec', 'translate_icegram' )?>
118
+ </td>
119
+ <td class="action_links">
120
+ <span class="actions message_edit" title="<?php _e( 'Edit Message', 'translate_icegram' ); ?>" ></span>
121
+ <span class="actions message_delete" title="<?php _e( 'Remove from Campaign', 'translate_icegram' ); ?>" ></span>
122
+ </td>
123
+ </tr>
124
+ <tr id="message_row_<?php echo $message['id']; ?>" class="message-edit-row" style="display: none;">
125
+ <td colspan="4">
126
+ <?php
127
+ $wp_message->message_form_fields( '', array( 'message_id' => $message['id'] ) );
128
+ ?>
129
+ </td>
130
+ </tr>
131
+ <?php
132
+ }
133
+ }
134
+ ?>
135
+ </tbody>
136
+ </table>
137
+ <div class="empty_campaign">
138
+ <?php
139
+ echo __( 'No messages yet. Use search / create bar above to add messages to this campaign.', 'translate_icegram' );
140
+ ?>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ <?php
146
+ }
147
+
148
+ function icegram_json_search_messages( $x = '' ) {
149
+
150
+ check_ajax_referer( 'search-messages', 'security' );
151
+
152
+ header( 'Content-Type: application/json; charset=utf-8' );
153
+
154
+ $term = ( string ) urldecode( stripslashes( strip_tags( $_GET['term'] ) ) );
155
+ $post_types = array('message');
156
+
157
+ if ( empty( $term ) ) die();
158
+
159
+ if ( is_numeric( $term ) ) {
160
+
161
+ $args = array(
162
+ 'post_type' => $post_types,
163
+ 'post_status' => 'publish',
164
+ 'posts_per_page' => -1,
165
+ 'post__in' => array( 0, $term ),
166
+ 'fields' => 'ids'
167
+ );
168
+
169
+ $posts = get_posts( $args );
170
+
171
+ } else {
172
+
173
+ $args = array(
174
+ 'post_type' => $post_types,
175
+ 'post_status' => 'publish',
176
+ 'posts_per_page' => -1,
177
+ 's' => $term,
178
+ 'fields' => 'ids'
179
+ );
180
+
181
+ $posts = get_posts( $args );
182
+
183
+ }
184
+
185
+ $found_messages = array();
186
+ $promotype = apply_filters( 'icegram_all_message_type', array() );
187
+
188
+ if ( $posts ) {
189
+
190
+ foreach ( $posts as $post ) {
191
+
192
+ $message_title = get_the_title( $post );
193
+ $message_data = get_post_meta( $post, 'icegram_message_data', true );
194
+ $promo_type = ( !empty( $promotype[ $message_data['type'] ] ) ) ? $promotype[ $message_data['type'] ] : '';
195
+ $found_messages[ $post ] = $promo_type . ' &mdash; ' . $message_title;
196
+
197
+ }
198
+ $found_messages[''] = __( '- - - - - - - - - - - - - - - - - - - - - - - - - -', 'translate_icegram' );
199
+ }
200
+
201
+ foreach ( $promotype as $key => $value ) {
202
+ $found_messages[ $key ] = __( 'Create new', 'translate_icegram' ) . ' ' . $value . ' ...';
203
+ }
204
+ ob_clean();
205
+ echo json_encode( $found_messages );
206
+
207
+ die();
208
+
209
+ }
210
+
211
+ function message_list_table_header() {
212
+ ?>
213
+ <thead>
214
+ <tr class="form-field message-row-header">
215
+ <th class="message_header"><?php _e( 'Type', 'translate_icegram' ); ?></th>
216
+ <th class="message_title"><?php _e( 'Name', 'translate_icegram' ); ?></th>
217
+ <th class="message_seconds"><?php _e( 'Show after', 'translate_icegram' ); ?></th>
218
+ <th class="action_links"><?php _e( 'Actions', 'translate_icegram' ); ?></th>
219
+ </tr>
220
+ </thead>
221
+ <?php
222
+ }
223
+
224
+ function get_message_action_row() {
225
+ global $wp_message;
226
+
227
+ if ( empty( $_POST['message_id'] ) || !is_numeric( $_POST['message_id'] ) ) {
228
+
229
+ $my_post = array(
230
+ 'post_title' => 'Message',
231
+ 'post_status' => 'auto-draft',
232
+ 'post_type' => 'message'
233
+ );
234
+ $message_id = wp_insert_post( $my_post );
235
+ $message_title = '';
236
+ $message_type = $_POST['message_id'];
237
+
238
+ } else {
239
+
240
+ $message_id = $_POST['message_id'];
241
+ $message_title = get_the_title( $message_id );
242
+ $message_data = get_post_meta( $message_id, 'icegram_message_data', true );
243
+ $message_type = $message_data['type'];
244
+
245
+ }
246
+
247
+ ob_start();
248
+ ?>
249
+ <tr class="form-field message-row" value="<?php echo $message_id; ?>">
250
+ <td class="message_header">
251
+ <label class="message_header_label <?php echo $message_type; ?>"><?php echo ucwords( str_replace( "-", ' ', $message_type ) ); ?></label>
252
+ </td>
253
+ <td class="message_title">
254
+ <div class="message-title-text" style="display:none;"><?php echo $message_title; ?></div>
255
+ <input type="text" class="message-title-input" name="message_data[<?php echo $message_id; ?>][post_title]" value="<?php echo $message_title; ?>" placeholder="<?php echo __( 'Give this message a name for your own reference', 'translate_icegram' ); ?>">
256
+ </td>
257
+ <td class="message_seconds">
258
+ <input type="hidden" name="messages[<?php echo $_POST['row']; ?>][id]" value="<?php echo $message_id; ?>" />
259
+ <input type="number" class="seconds-text" name="messages[<?php echo $_POST['row']; ?>][time]" min="0" value="0" size="3" /><?php _e( ' sec', 'translate_icegram' )?>
260
+ </td>
261
+ <td class="action_links">
262
+ <span class="actions message_edit" title="<?php _e( 'Edit Message', 'translate_icegram' ); ?>" ></span>
263
+ <span class="actions message_delete" title="<?php _e( 'Remove from Campaign', 'translate_icegram' ); ?>" ></span>
264
+ </td>
265
+ </tr>
266
+ <tr id="message_row_<?php echo $message_id; ?>" class="message-edit-row">
267
+ <td colspan="4">
268
+ <?php
269
+ $wp_message->message_form_fields( '', array( 'promo_type' => $message_type, 'message_id' => $message_id, 'new_message_row' => true ) );
270
+ ?>
271
+ </td>
272
+ </tr>
273
+ <?php
274
+
275
+ echo json_encode( array( 'id' => $message_id, 'main' => ob_get_clean() ) );
276
+ die();
277
+
278
+ }
279
+
280
+ function campaign_target_rules_content() {
281
+ global $post, $wp_roles;
282
+
283
+ wp_nonce_field( 'icegram_campaign_save_data', 'icegram_campaign_meta_nonce' );
284
+ $campaign_target_rules = get_post_meta( $post->ID, 'icegram_campaign_target_rules', true );
285
+
286
+ if( !$campaign_target_rules ) {
287
+ $campaign_target_rules = $this->default_target_rules;
288
+ }
289
+ ?>
290
+ <div class="campaign_target_rules_panel">
291
+ <div class="options_group" id="campaign_target_rules_where">
292
+ <p class="form-field">
293
+ <label class="options_header"><?php _e( 'Where?', 'translate_icegram' ); ?></label>
294
+ <label for="where_sitewide">
295
+ <input type="checkbox" name="campaign_target_rules[sitewide]" id="where_sitewide" value="yes" <?php ( !empty( $campaign_target_rules['sitewide'] ) ) ? checked( $campaign_target_rules['sitewide'], 'yes' ) : ''; ?> />
296
+ <?php _e( 'Sitewide', 'translate_icegram' ); ?>
297
+ </label>
298
+ </p>
299
+ <p class="form-field">
300
+ <label class="options_header">&nbsp;</label>
301
+ <label for="where_homepage">
302
+ <input type="checkbox" name="campaign_target_rules[homepage]" id="where_homepage" value="yes" <?php ( !empty( $campaign_target_rules['homepage'] ) ) ? checked( $campaign_target_rules['homepage'], 'yes' ) : ''; ?> />
303
+ <?php _e( 'Homepage', 'translate_icegram' ); ?>
304
+ </label>
305
+ </p>
306
+ <p class="form-field">
307
+ <label class="options_header">&nbsp;</label>
308
+ <label for="where_other_page">
309
+ <input type="checkbox" name="campaign_target_rules[other_page]" id="where_other_page" value="yes" <?php ( !empty( $campaign_target_rules['other_page'] ) ) ? checked( $campaign_target_rules['other_page'], 'yes' ) : ''; ?> />
310
+ <?php _e( 'Selected pages', 'translate_icegram' ); ?>
311
+ </label>
312
+ </p>
313
+ <p class="form-field" <?php echo ( !empty( $campaign_target_rules['other_page'] ) && $campaign_target_rules['other_page'] == 'yes' ) ? '' : 'style="display: none;"'; ?>>
314
+ <label class="options_header">&nbsp;</label>
315
+ <?php
316
+ echo '<select name="page_id[]" id="where_page_id" data-placeholder="' . __( 'Select a page&hellip;', 'translate_icegram' ) . '" style="min-width:300px;" class="icegram_chosen_page" multiple>';
317
+ foreach ( get_pages() as $page ) {
318
+ echo '<option value="' . $page->ID . '"';
319
+ if( !empty( $campaign_target_rules['page_id'] ) ) {
320
+ echo selected( in_array( $page->ID, $campaign_target_rules['page_id'] ) );
321
+ }
322
+ echo '>' . $page->post_title . '</option>';
323
+ }
324
+ echo '</select>';
325
+ ?>
326
+ </p>
327
+ <p class="form-field">
328
+ <label class="campaign_shortcode">
329
+ <span class="shortcode_description admin_field_icon"></span>
330
+ <?php echo sprintf(__( 'Additionally you can insert <code>[%s]</code> wherever you want to run this campaign.', 'translate_icegram' ), 'icegram campaigns="' .$post->ID . '"' ); ?>
331
+ </label>
332
+ </p>
333
+ </div>
334
+ <div class="options_group" id="campaign_target_rules_when">
335
+ <p class="form-field">
336
+ <label class="options_header"><?php _e( 'When?', 'translate_icegram' ); ?></label>
337
+ <label for="when_always">
338
+ <input type="radio" class="schedule_rule" name="campaign_target_rules[when]" id="when_always" value="always" <?php ( !empty( $campaign_target_rules['when'] ) ) ? checked( $campaign_target_rules['when'], 'always' ) : ''; ?> />
339
+ <?php _e( 'Always', 'translate_icegram' ); ?>
340
+ </label>
341
+ </p>
342
+ <p class="form-field">
343
+ <label class="options_header">&nbsp;</label>
344
+ <label for="when_schedule">
345
+ <input type="radio" class="schedule_rule" name="campaign_target_rules[when]" id="when_schedule" value="schedule" <?php ( !empty( $campaign_target_rules['when'] ) ) ? checked( $campaign_target_rules['when'], 'schedule' ) : ''; ?> />
346
+ <?php _e( 'Schedule', 'translate_icegram' ); ?>
347
+ <span class="form-field" id="date_picker" <?php echo ( !empty( $campaign_target_rules['when'] ) && $campaign_target_rules['when'] == 'schedule' ) ? '' : 'style="display: none;"'; ?>>
348
+ <label class="date_picker">
349
+ <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;', 'translate_icegram' );?>" />
350
+ </label>
351
+ <label class="date_picker">
352
+ <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;', 'translate_icegram' );?>" />
353
+ </label>
354
+ </span>
355
+ </label>
356
+ </p>
357
+ </div>
358
+ <div class="options_group" id="campaign_target_rules_device">
359
+ <p class="form-field">
360
+ <label class="options_header"><?php _e( 'Device?', 'translate_icegram' ); ?></label>
361
+ <label for="device_mobile" class="device" title="<?php _e( 'Mobile / Smartphones', 'translate_icegram' ); ?>">
362
+ <input type="checkbox" name="campaign_target_rules[mobile]" id="device_mobile" value="yes" <?php ( !empty( $campaign_target_rules['mobile'] ) ) ? checked( $campaign_target_rules['mobile'], 'yes' ) : ''; ?> />
363
+ <span class="device_mobile"></span>
364
+ </label>
365
+ <label for="device_tablet" class="device" title="<?php _e( 'Tablet', 'translate_icegram' ); ?>">
366
+ <input type="checkbox" name="campaign_target_rules[tablet]" id="device_tablet" value="yes" <?php ( !empty( $campaign_target_rules['tablet'] ) ) ? checked( $campaign_target_rules['tablet'], 'yes' ) : ''; ?> />
367
+ <span class="device_tablet"></span>
368
+ </label>
369
+ <label for="device_laptop" class="device" title="<?php _e( 'Desktop / Laptop', 'translate_icegram' ); ?>">
370
+ <input type="checkbox" name="campaign_target_rules[laptop]" id="device_laptop" value="yes" <?php ( !empty( $campaign_target_rules['laptop'] ) ) ? checked( $campaign_target_rules['laptop'], 'yes' ) : ''; ?> />
371
+ <span class="device_laptop"></span>
372
+ </label>
373
+ </p>
374
+ </div>
375
+ <div class="options_group" id="campaign_target_rules_users">
376
+ <p class="form-field">
377
+ <label class="options_header"><?php _e( 'Who?', 'translate_icegram' ); ?></label>
378
+ <label for="users_all">
379
+ <input type="radio" name="campaign_target_rules[logged_in]" id="users_all" value="all" <?php ( !empty( $campaign_target_rules['logged_in'] ) ) ? checked( $campaign_target_rules['logged_in'], 'all' ) : ''; ?> />
380
+ <?php _e( 'All users', 'translate_icegram' ); ?>
381
+ </label>
382
+ </p>
383
+ <p class="form-field">
384
+ <label class="options_header">&nbsp;</label>
385
+ <label for="users_logged_in">
386
+ <input type="radio" name="campaign_target_rules[logged_in]" id="users_logged_in" value="logged_in" <?php ( !empty( $campaign_target_rules['logged_in'] ) ) ? checked( $campaign_target_rules['logged_in'], 'logged_in' ) : ''; ?> />
387
+ <?php _e( 'Logged in users only', 'translate_icegram' ); ?>
388
+ </label>
389
+ </p>
390
+ <div class="user_roles">
391
+ <?php
392
+ if ( !empty( $campaign_target_rules['logged_in'] ) && $campaign_target_rules['logged_in'] == 'all' ) {
393
+ $campaign_logged_in_user_style = 'style="display: none;"';
394
+ } else {
395
+ $campaign_logged_in_user_style = 'style="display: block;"';
396
+ }
397
+ ?>
398
+ <p class="form-field" <?php echo $campaign_logged_in_user_style; ?>>
399
+ <label class="options_header">&nbsp;</label>
400
+ <?php
401
+ if ( isset( $wp_roles ) ) {
402
+ $wp_roles = new WP_Roles();
403
+ $roles = $wp_roles->get_names();
404
+
405
+ echo '<select name="campaign_target_rules[users][]" id="users_roles" data-placeholder="' . __( 'Select a user role&hellip;', 'translate_icegram' ) . '" style="min-width:300px;" class="icegram_chosen_page" multiple>';
406
+ foreach ( $roles as $role_value => $role_name ) {
407
+ echo '<option value="' . $role_value . '"';
408
+ if( !empty( $campaign_target_rules['users'] ) ) {
409
+ echo selected( in_array( $role_value, $campaign_target_rules['users'] ) );
410
+ }
411
+ echo '>' . $role_name . '</option>';
412
+ }
413
+ echo '</select>';
414
+ }
415
+ ?>
416
+ </div>
417
+ </div>
418
+ <div class="options_group" id="campaign_target_rules_retrageting">
419
+ <p class="form-field">
420
+ <label class="options_header"><?php _e( 'Retargeting', 'translate_icegram' ); ?></label>
421
+ <label for="retargeting">
422
+ <input type="checkbox" name="campaign_target_rules[retargeting]" id="retargeting" value="yes" <?php ( !empty( $campaign_target_rules['retargeting'] ) ) ? checked( $campaign_target_rules['retargeting'], 'yes' ) : ''; ?> />
423
+ <?php _e( 'Once shown, do NOT show a message again for current session', 'translate_icegram' ); ?>
424
+ </label>
425
+ </p>
426
+ </div>
427
+ <!-- To load editor styles and scripts prior to Ajax call -->
428
+ <div style="display:none;">
429
+ <?php //wp_editor( '', 'postdivrich' ); ?>
430
+ </div>
431
+ </div>
432
+ <?php
433
+ }
434
+
435
+ function save_campaign_settings( $post_id, $post ) {
436
+
437
+ if (empty( $post_id ) || empty( $post ) || empty( $_POST )) return;
438
+ if (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE) return;
439
+ if (is_int( wp_is_post_revision( $post ) )) return;
440
+ if (is_int( wp_is_post_autosave( $post ) )) return;
441
+ if ( empty( $_POST['icegram_campaign_meta_nonce'] ) || ! wp_verify_nonce( $_POST['icegram_campaign_meta_nonce'], 'icegram_campaign_save_data' ) ) return;
442
+ if (! current_user_can( 'edit_post', $post_id )) return;
443
+ if ($post->post_type != 'campaign') return;
444
+
445
+ $campaign_target_rules = $_POST['campaign_target_rules'];
446
+
447
+ if ( isset( $_POST['page_id'] ) ) {
448
+ $campaign_target_rules['page_id'] = $_POST['page_id'];
449
+ update_post_meta( $post_id, 'icegram_campaign_target_pages', $_POST['page_id'] );
450
+ }
451
+
452
+ if ( count( $campaign_target_rules ) > 0 ) {
453
+ update_post_meta( $post_id, 'icegram_campaign_target_rules', $campaign_target_rules );
454
+ }
455
+
456
+ if ( empty( $_POST['messages'] ) ) {
457
+ update_post_meta( $post_id, 'messages', array() );
458
+ } else {
459
+
460
+ update_post_meta( $post_id, 'messages', array_values( $_POST['messages'] ) );
461
+ update_post_meta( $post_id, 'campaign_preview', array_values( $_POST['messages'] ) );
462
+
463
+ foreach ( $_POST['message_data'] as $message_id => $message_data ) {
464
+
465
+ update_post_meta( $message_id, 'icegram_message_data', $message_data );
466
+ update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
467
+ wp_update_post( array ( 'ID' => $message_id,
468
+ 'post_content' => $message_data['message'],
469
+ 'post_status' => 'publish',
470
+ 'post_title' => empty( $message_data['post_title'] ) ? $message_data['title']: $message_data['post_title']
471
+ ) );
472
+ }
473
+
474
+ }
475
+
476
+ }
477
+
478
+ function save_campaign_preview() {
479
+
480
+ if ( empty($_POST['post_ID']) ) die() ;
481
+ if (! current_user_can( 'edit_post', $_POST['post_ID'] )) die() ;
482
+
483
+ if( !empty( $_POST['messages'] ) ) {
484
+ update_post_meta( $_POST['post_ID'], 'campaign_preview', $_POST['messages'] ) ;
485
+ foreach ( (array) $_POST['message_data'] as $message_id => $message_data ) {
486
+ update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
487
+ }
488
+ // Determine page url to preview on...
489
+ $page_url = '';
490
+ if ( !empty($_POST['campaign_target_rules']) && !empty($_POST['campaign_target_rules']['other_page']) && !empty($_POST['page_id']) && is_array($_POST['page_id'])) {
491
+ $page_url = get_permalink( $_POST['page_id'][0] );
492
+ }
493
+ if ($page_url == '') {
494
+ $page_url = home_url();
495
+ }
496
+ echo add_query_arg( 'campaign_preview_id', $_POST['post_ID'], $page_url );
497
+ }
498
+ die();
499
+
500
+ }
501
+
502
+ function is_valid() {
503
+ return ( $this->is_valid_user_roles() && $this->is_valid_device() && $this->is_valid_time() && $this->is_valid_page() );
504
+ }
505
+
506
+ function is_valid_user_roles() {
507
+ if ( in_array( 'all', $this->rule_users, true ) ) {
508
+ return true;
509
+ } elseif ( is_user_logged_in() && !in_array( 'none', $this->rule_users, true ) ) {
510
+ $current_user = wp_get_current_user();
511
+ if ( in_array( $current_user->roles[0], $this->rule_users, true ) ) {
512
+ return true;
513
+ }
514
+ }
515
+ return false;
516
+ }
517
+
518
+ function is_valid_device() {
519
+ $current_platform = Icegram::get_platform();
520
+ if ( !empty( $this->rule_device[ $current_platform ] ) && $this->rule_device[ $current_platform ] == 'yes' ) {
521
+ return true;
522
+ }
523
+ return false;
524
+ }
525
+
526
+ function is_valid_time() {
527
+
528
+ if ( !empty( $this->rule_when['when'] ) && $this->rule_when['when'] == 'always' ) {
529
+ return true;
530
+ }
531
+
532
+ if ( ( !empty( $this->rule_when['from'] ) && time() > strtotime( $this->rule_when['from'] ) ) && ( !empty( $this->rule_when['to'] ) && strtotime( $this->rule_when['to'] ) > time() ) ) {
533
+ return true;
534
+ }
535
+
536
+ return false;
537
+ }
538
+
539
+ function is_valid_page() {
540
+
541
+ if ( !empty( $this->rule_where['sitewide'] ) && $this->rule_where['sitewide'] == 'yes' ) {
542
+ return true;
543
+ }
544
+ if ( !empty( $this->rule_where['homepage'] ) && $this->rule_where['homepage'] == 'yes' && ( is_home() || is_front_page() ) ) {
545
+ return true;
546
+ }
547
+ if ( !empty( Icegram::$current_page_id ) && is_page( Icegram::$current_page_id ) ) {
548
+ if ( !empty( $this->rule_where['other_page'] ) && in_array( Icegram::$current_page_id, $this->rule_where['other_page'] ) ) {
549
+ return true;
550
+ }
551
+ }
552
+
553
+ return false;
554
+ }
555
+
556
+ }
557
+
558
+ $GLOBALS['wp_campaign'] = new WP_Campaign();
classes/class-wp-message.php ADDED
@@ -0,0 +1,476 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * WP Message class
5
+ */
6
+ class WP_Message {
7
+
8
+ var $title;
9
+ var $message_data;
10
+ var $message_types;
11
+ var $message_themes;
12
+ var $default_message_color;
13
+ var $default_message_data;
14
+ var $available_headlines;
15
+
16
+ function __construct( $message_id = '' ) {
17
+
18
+ if ( !empty( $message_id ) ) {
19
+
20
+ $post = get_post( $message_id );
21
+ $this->title = $post->post_title;
22
+ $this->message_data = get_post_meta( $post->ID, 'icegram_message_data', true );
23
+ }
24
+
25
+ add_action( 'init', array( &$this, 'message_types' ) );
26
+ add_action( 'add_meta_boxes', array( &$this, 'add_message_meta_boxes' ) );
27
+ add_action( 'save_post', array( &$this, 'update_message_settings' ), 10, 2 );
28
+ add_action( 'wp_ajax_update_message_data', array( &$this , 'update_message_data' ) );
29
+ add_action( 'wp_ajax_get_message_setting', array( &$this , 'message_form_fields' ) );
30
+
31
+ add_filter( 'icegram_all_message_type', array( &$this, 'icegram_all_message_type' ) );
32
+ add_filter( 'icegram_all_message_theme', array( &$this, 'icegram_all_message_theme' ) );
33
+ add_filter( 'icegram_available_headlines', array( &$this, 'available_headlines' ) );
34
+
35
+ add_filter( 'wp_insert_post_data', array( &$this, 'save_message_in_post_content' ) );
36
+ add_filter( 'manage_edit-message_columns', array( $this, 'edit_columns' ) );
37
+ add_action( 'manage_message_posts_custom_column', array( $this, 'custom_columns' ), 2 );
38
+
39
+ $this->default_message_color = array( 'text_color' => array( 'action-bar' => '#ffffff',
40
+ 'messenger' => '#000',
41
+ 'popup' => '#333',
42
+ 'toast' => '#222'
43
+ ),
44
+ 'bg_color' => array( 'action-bar' => '#eb593c',
45
+ 'messenger' => '#fff',
46
+ 'popup' => '#fff',
47
+ 'toast' => '#fff'
48
+ )
49
+ );
50
+ $this->default_message_data = array( 'type' => 'action-bar',
51
+ 'position' => '21',
52
+ 'text_color' => '#000000',
53
+ 'bg_color' => '#ffffff',
54
+ 'theme' => array ( 'action-bar' => 'hello',
55
+ 'messenger' => 'social',
56
+ 'popup' => 'persuade',
57
+ 'toast' => 'announce'
58
+ )
59
+ );
60
+
61
+ if ( empty( $this->available_headlines ) ) {
62
+ $this->available_headlines = apply_filters( 'icegram_available_headlines', array() );
63
+ }
64
+
65
+ }
66
+
67
+ public function edit_columns( $existing_columns ) {
68
+
69
+ $date = $existing_columns['date'];
70
+ unset( $existing_columns['date'] );
71
+
72
+ $existing_columns['message_type'] = __( 'Type', 'translate_icegram' );
73
+ $existing_columns['message_theme'] = __( 'Theme', 'translate_icegram' );
74
+ $existing_columns['message_thumbnail'] = __( 'Thumbnail', 'translate_icegram' );
75
+ $existing_columns['date'] = $date;
76
+
77
+ return $existing_columns;
78
+
79
+ }
80
+
81
+ public function custom_columns( $column ) {
82
+ global $post ,$icegram;
83
+
84
+ if( ( is_object( $post ) && $post->post_type != 'message' ) )
85
+ return;
86
+
87
+ $message_data = get_post_meta( $post->ID, 'icegram_message_data', true );
88
+ $type = ucwords( str_replace( "-", ' ', $message_data['type'] ) );
89
+ $theme = ucwords( str_replace( "-", ' ', $message_data['theme'][$message_data['type']] ) );
90
+ $bg_img = "" . $icegram->plugin_url . "/assets/images/themes/" . $message_data['type'] . "/" . $message_data['theme'][$message_data['type']] .".png";
91
+
92
+ switch ($column) {
93
+ case 'message_type':
94
+ echo $type;
95
+ break;
96
+
97
+ case 'message_theme':
98
+ echo $theme;
99
+ break;
100
+
101
+ case 'message_thumbnail':
102
+ echo "<img src='$bg_img' style='max-width: 200px; max-height: 100px;'>";
103
+ break;
104
+
105
+ }
106
+
107
+ }
108
+
109
+ function message_types() {
110
+ global $icegram;
111
+
112
+ $message_templates = glob( $icegram->plugin_path . '/templates' . '/*.php' );
113
+ if( empty( $message_templates ) )
114
+ return;
115
+
116
+ foreach ( $message_templates as $type ) {
117
+ $type = str_replace( ".php", "", basename( $type ) );
118
+ $message_types[$type] = ucwords( str_replace( "-", ' ', $type ) );
119
+ }
120
+
121
+ $this->message_types = $message_types;
122
+ if( empty( $message_types ) )
123
+ return;
124
+
125
+ foreach ( $message_types as $type => $value ) {
126
+ $themes = glob( $icegram->plugin_path . '/assets/css/' . $type . '/*.css' );
127
+ if( empty( $themes ) )
128
+ continue;
129
+
130
+ $message_themes = array();
131
+ foreach ( $themes as $theme ) {
132
+ $theme = str_replace( ".css", "", basename( $theme ) );
133
+ $message_themes[$theme] = ucwords( str_replace( "-", ' ', $theme ) );
134
+ }
135
+ $this->message_themes[$type] = $message_themes;
136
+ }
137
+ }
138
+
139
+ public function add_message_meta_boxes() {
140
+
141
+ $meta_box_title = __( 'Message Settings' );
142
+ // $meta_box_title .= '<div class="button button-primary message_preview" style="margin-top: -5px;">' . __( 'Preview' ) . '</div>';
143
+
144
+ add_meta_box( 'message-settings', $meta_box_title, array ( &$this, 'message_form_fields' ), 'message', 'normal', 'high' );
145
+
146
+ }
147
+
148
+ function message_form_fields( $post = '', $action = array() ) {
149
+
150
+ global $icegram, $pagenow;
151
+
152
+ if( ( is_object( $post ) && $post->post_type != 'message' ) )
153
+ return;
154
+
155
+ if( !empty( $action['message_id'] ) ) {
156
+ $message_id = $action['message_id'];
157
+ } else {
158
+ $message_id = $post->ID;
159
+ }
160
+
161
+ if( !empty( $action['message_id'] ) ) {
162
+ ?>
163
+ <div class="thickbox_edit_message" id="<?php echo $message_id; ?>">
164
+ <?php }
165
+
166
+ wp_nonce_field( 'icegram_message_save_data', 'icegram_message_meta_nonce' );
167
+ $message_animation = array( "slide" => "Slide", "appear" => "Appear" );
168
+ $message_toast_animation = array( "bang" => "Bang",
169
+ "slide-down" => "Slide Down",
170
+ "pop" => "Pop",
171
+ "appear" => "Appear",
172
+ "slide-left" => "Slide Right"
173
+ );
174
+
175
+ $message_types = array();
176
+ $message_themes = array();
177
+ $message_data = get_post_meta( $message_id, 'icegram_message_data', true );
178
+ $message_types = apply_filters( 'icegram_all_message_type', array() );
179
+ $message_themes = apply_filters( 'icegram_all_message_theme', array() );
180
+ $message_animation = apply_filters( 'icegram_all_message_animation', $message_animation );
181
+ $show_powered_by = apply_filters( 'icegram_show_powered_by_message', true );
182
+ $message_headlines = $this->available_headlines;
183
+
184
+ if ( $pagenow == 'post-new.php' ) {
185
+ $message_title_key = array_rand( $message_headlines );
186
+ $default_message_title = $message_headlines[$message_title_key];
187
+ } else {
188
+ $default_message_title = $message_title_key = '';
189
+ }
190
+
191
+ if( !$message_data ) {
192
+ $message_data = $this->default_message_data;
193
+ }
194
+ if( !empty( $action['promo_type'] ) ) {
195
+ $message_data['type'] = $action['promo_type'];
196
+ }
197
+ ?>
198
+ <div class="wp_attachment_details edit-form-section message-setting-fields">
199
+ <p>
200
+ <label for="message_type" class="message_label"><strong><?php _e( 'Type', 'translate_icegram' ); ?></strong></label>
201
+ <select id="message_type" name="message_data[<?php echo $message_id; ?>][type]" class="message_type icegram_chosen_page">
202
+ <?php foreach ( $message_types as $value => $label ) {
203
+ $selected = ( ( !empty( $message_data['type'] ) && esc_attr( $value ) == $message_data['type'] ) ) ? 'selected' : '';
204
+ ?>
205
+ <option value="<?php echo esc_attr( $value ) ?>" <?php echo $selected; ?>><?php echo esc_html( $label ) ?></option>
206
+ <?php } ?>
207
+ </select>
208
+ </p>
209
+
210
+ <?php foreach ( $message_themes as $message_type => $message_theme ) { ?>
211
+ <p class="message_row <?php echo $message_type; ?>">
212
+ <label for="message_theme_<?php echo $message_type; ?>" class="message_label"><strong><?php _e( 'Theme', 'translate_icegram' ); ?></strong></label>
213
+ <select id="message_theme_<?php echo $message_type; ?>" name="message_data[<?php echo $message_id; ?>][theme][<?php echo $message_type; ?>]" class="icegram_chosen_page message_theme message_theme_<?php echo $message_type; ?>">
214
+ <?php foreach ( $message_theme as $value => $label ) {
215
+ $bg_img = "background-image: url(" . $icegram->plugin_url . "/assets/images/themes/" . $message_type . "/" . esc_attr( $value ) .".png)";
216
+ ?>
217
+ <option style="<?php echo $bg_img; ?>" value="<?php echo esc_attr( $value ) ?>" class="<?php echo esc_attr( $value ) ?>" <?php echo ( !empty( $message_data['theme'][$message_type] ) && esc_attr( $value ) == $message_data['theme'][$message_type] ) ? 'selected' : ''; ?>><?php echo esc_html( $label ) ?></option>
218
+ <?php } ?>
219
+ </select>
220
+ </p>
221
+ <?php } ?>
222
+
223
+ <p class="message_row messenger">
224
+ <label for="message_animation" class="message_label"><strong><?php _e( 'Animation', 'translate_icegram' ); ?></strong></label>
225
+ <select id="message_animation" name="message_data[<?php echo $message_id; ?>][animation]" class="icegram_chosen_page">
226
+ <?php foreach ( $message_animation as $value => $label ) { ?>
227
+ <option value="<?php echo esc_attr( $value ) ?>" <?php echo ( !empty( $message_data['animation'] ) && esc_attr( $value ) == $message_data['animation'] ) ? 'selected' : ''; ?>><?php echo esc_html( $label ) ?></option>
228
+ <?php } ?>
229
+ </select>
230
+ </p>
231
+ <p class="message_row toast">
232
+ <label for="message_toast_animation" class="message_label"><strong><?php _e( 'Animation', 'translate_icegram' ); ?></strong></label>
233
+ <select id="message_toast_animation" name="message_data[<?php echo $message_id; ?>][toast_animation]" class="icegram_chosen_page">
234
+ <?php foreach ( $message_toast_animation as $value => $label ) { ?>
235
+ <option value="<?php echo esc_attr( $value ) ?>" <?php echo ( !empty( $message_data['toast_animation'] ) && esc_attr( $value ) == $message_data['toast_animation'] ) ? 'selected' : ''; ?>><?php echo esc_html( $label ) ?></option>
236
+ <?php } ?>
237
+ </select>
238
+ </p>
239
+ <p class="message_row all_promo">
240
+ <label for="message_title" class="message_label">
241
+ <strong><?php _e( 'Headline', 'translate_icegram' ); ?></strong>
242
+ <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.', 'translate_icegram' ); ?>"></span>
243
+ </label>
244
+ <input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][title]" id="message_title" value="<?php echo ( isset( $message_data['title'] ) ) ? $message_data['title'] : $default_message_title; ?>" data-headline="<?php echo $message_title_key; ?>" data-max="<?php echo ( count( $message_headlines ) - 1 ); ?>" />
245
+ <a class="button message_title_button tips" data-tip="<?php _e( 'Give Me Another Headline', 'translate_icegram' ); ?>">
246
+ <span class="title-buttons-icon admin_field_icon"></span>
247
+ </a>
248
+ </p>
249
+ <p class="message_row action-bar popup">
250
+ <label for="message_label" class="message_label">
251
+ <strong><?php _e( 'Button Label', 'translate_icegram' ); ?></strong>
252
+ <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Your call to action text. Something unusual will increase conversions.', 'translate_icegram' ); ?>"></span>
253
+ </label>
254
+ <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']; ?>" />
255
+ </p>
256
+ <p class="message_row all_promo">
257
+ <label for="message_link" class="message_label">
258
+ <strong><?php _e( 'Target Link', 'translate_icegram' ); ?></strong>
259
+ <span class="help_tip admin_field_icon" data-tip="<?php _e( 'Enter destination URL here. Clicking will redirect to this link.', 'translate_icegram' ); ?>"></span>
260
+ </label>
261
+ <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']; ?>" />
262
+ </p>
263
+ <p class="message_row toast messenger">
264
+ <label for="upload_image" class="message_label">
265
+ <strong><?php _e( 'Icon / Avatar Image', 'translate_icegram' ); ?></strong>
266
+ <span class="help_tip admin_field_icon" data-tip="<?php _e( 'This image will appear in message content.', 'translate_icegram' ); ?>"></span>
267
+ </label>
268
+ <input id="upload_image" type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][promo_image]" value="<?php if( isset( $message_data['promo_image'] ) ) echo $message_data['promo_image']; ?>"/>
269
+ <a class="button message_image_button tips" data-tip="<?php _e( 'Upload / Select an image', 'translate_icegram' ); ?>" onclick="tb_show('<?php _e( 'Upload / Select Image' ); ?>', 'media-upload.php?type=image&TB_iframe=true', false);" >
270
+ <span class="image-buttons-icon admin_field_icon"></span>
271
+ </a>
272
+ </p>
273
+ <p class="message_row action-bar">
274
+ <label for="message_bg_color" class="message_label"><strong><?php _e( 'Backgound Color', 'translate_icegram' ); ?></strong></label>
275
+ <input type="text" class="message_field color-field" name="message_data[<?php echo $message_id; ?>][bg_color]" id="message_bg_color" value="<?php if( isset( $message_data['bg_color'] ) ) echo $message_data['bg_color']; ?>" data-default-color="<?php if( isset( $this->default_message_color['bg_color'][$message_data['type']] ) ) echo $this->default_message_color['bg_color'][$message_data['type']]; ?>" />
276
+ </p>
277
+ <p class="message_row action-bar">
278
+ <label for="message_text_color" class="message_label"><strong><?php _e( 'Text Color', 'translate_icegram' ); ?></strong></label>
279
+ <input type="text" class="message_field color-field" name="message_data[<?php echo $message_id; ?>][text_color]" id="message_text_color" value="<?php if( isset( $message_data['text_color'] ) ) echo $message_data['text_color']; ?>" data-default-color="<?php if( isset( $this->default_message_color['text_color'][$message_data['type']] ) ) echo $this->default_message_color['text_color'][$message_data['type']]; ?>" />
280
+ </p>
281
+
282
+ <?php
283
+ $editor_args = array(
284
+ 'textarea_name' => 'message_data[' . $message_id . '][message]',
285
+ 'textarea_rows' => 10,
286
+ 'editor_class' => 'wp-editor-message',
287
+ 'media_buttons' => true,
288
+ 'tinymce' => true
289
+ );
290
+ ?>
291
+ <p class="message_row all_promo">
292
+ <label for="message_message" class="message_label"><strong><?php _e( 'Message Body', 'translate_icegram' ); ?></strong></label>
293
+ <?php $message = ( !empty( $message_data['message'] ) ) ? $message_data['message'] : ''; ?>
294
+ <?php wp_editor( $message, 'edit'.$message_id, $editor_args ); ?>
295
+ </p>
296
+ <p class="message_row messenger action-bar toast position">
297
+ <label for="message_position" class="message_label"><strong><?php _e( 'Position', 'translate_icegram' ); ?></strong></label>
298
+ <span class="message_field location-selector message_label">
299
+ <input type="radio" id="radio01_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="00" <?php echo ( !empty( $message_data['position'] ) && "00" == $message_data['position'] ) ? 'checked' : ''; ?> />
300
+ <label for="radio01_<?php echo $message_id;?>" title="Top Left">
301
+ <span class="location toast top left" data-position="top left"></span>
302
+ </label>
303
+ <input type="radio" id="radio02_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="01" <?php echo ( !empty( $message_data['position'] ) && "01" == $message_data['position'] ) ? 'checked' : ''; ?> />
304
+ <label for="radio02_<?php echo $message_id;?>" title="Top">
305
+ <span class="location toast action-bar top" data-position="top"></span>
306
+ </label>
307
+ <input type="radio" id="radio03_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="02" <?php echo ( !empty( $message_data['position'] ) && "02" == $message_data['position'] ) ? 'checked' : ''; ?> />
308
+ <label for="radio03_<?php echo $message_id;?>" title="Top Right">
309
+ <span class="location toast top right" data-position="top right"></span>
310
+ </label>
311
+ <input type="radio" id="radio04_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="10" <?php echo ( !empty( $message_data['position'] ) && "10" == $message_data['position'] ) ? 'checked' : ''; ?> />
312
+ <label for="radio04_<?php echo $message_id;?>" title="Middle Left">
313
+ <span class="location middle left" data-position="middle left"></span>
314
+ </label>
315
+ <input type="radio" id="radio05_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="11" <?php echo ( !empty( $message_data['position'] ) && "11" == $message_data['position'] ) ? 'checked' : ''; ?> />
316
+ <label for="radio05_<?php echo $message_id;?>" title="Middle">
317
+ <span class="location toast middle middle" data-position="middle middle"></span>
318
+ </label>
319
+ <input type="radio" id="radio06_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="12" <?php echo ( !empty( $message_data['position'] ) && "12" == $message_data['position'] ) ? 'checked' : ''; ?> />
320
+ <label for="radio06_<?php echo $message_id;?>" title="Middle Right">
321
+ <span class="location middle right" data-position="middle right"></span>
322
+ </label>
323
+ <input type="radio" id="radio07_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="20" <?php echo ( !empty( $message_data['position'] ) && "20" == $message_data['position'] ) ? 'checked' : ''; ?> />
324
+ <label for="radio07_<?php echo $message_id;?>" title="Bottom Left">
325
+ <span class="location messenger toast bottom left" data-position="bottom left"></span>
326
+ </label>
327
+ <input type="radio" id="radio08_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="21" <?php echo ( !empty( $message_data['position'] ) && "21" == $message_data['position'] || !isset( $message_data['position'] ) ) ? 'checked' : ''; ?> />
328
+ <label for="radio08_<?php echo $message_id;?>" title="Bottom">
329
+ <span class="location toast action-bar bottom" data-position="bottom"></span>
330
+ </label>
331
+ <input type="radio" id="radio09_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position]" value="22" <?php echo ( !empty( $message_data['position'] ) && "22" == $message_data['position'] ) ? 'checked' : ''; ?> />
332
+ <label for="radio09_<?php echo $message_id;?>" title="Bottom Right">
333
+ <span class="location messenger toast bottom right" data-position="bottom right"></span>
334
+ </label>
335
+ </span>
336
+ </p>
337
+
338
+ </div>
339
+ <input type="hidden" name="message_data[<?php echo $message_id; ?>][id]" value="<?php echo $message_id; ?>">
340
+ <input type="hidden" class="message_id" name="message_id" value="<?php echo $message_id; ?>">
341
+ <?php
342
+
343
+ if( !empty( $action['message_id'] ) ) {
344
+
345
+ ?></div><?php
346
+
347
+ if( !empty( $action['new_message_row'] ) && $action['new_message_row'] ) {
348
+ \_WP_Editors::enqueue_scripts();
349
+ // print_footer_scripts();
350
+ \_WP_Editors::editor_js();
351
+ }
352
+
353
+ } else {
354
+
355
+ ?>
356
+ <span class="shortcode_description admin_field_icon"></span>
357
+ <?php
358
+ echo sprintf(__( 'You can insert <code>[%s]</code> wherever you want to show this message. We recommend running a campaign though.', 'translate_icegram' ), 'icegram messages="' .$post->ID . '"' );
359
+
360
+ }
361
+
362
+ }
363
+
364
+ //Used to save the settings which are being made in the message form and added to message page appropriately
365
+ public function update_message_settings( $post_id, $post ) {
366
+
367
+ if (empty( $post_id ) || empty( $post ) || empty( $_POST )) return;
368
+ if (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE) return;
369
+ if (is_int( wp_is_post_revision( $post ) )) return;
370
+ if (is_int( wp_is_post_autosave( $post ) )) return;
371
+ if ( empty( $_POST['icegram_message_meta_nonce'] ) || ! wp_verify_nonce( $_POST['icegram_message_meta_nonce'], 'icegram_message_save_data' ) ) return;
372
+ if (! current_user_can( 'edit_post', $post_id )) return;
373
+ if ($post->post_type != 'message') return;
374
+
375
+ update_post_meta( $post_id, 'icegram_message_data', $_POST['message_data'][$post_id] );
376
+
377
+ }
378
+
379
+ //Thickbox update settings
380
+ function update_message_data() {
381
+
382
+ parse_str( $_POST['message_data'], $post_data );
383
+
384
+ if( !empty( $_POST['message_id'] ) ) {
385
+ update_post_meta( $_POST['message_id'], 'icegram_message_data', $post_data['message_data'][$_POST['message_id']] );
386
+ }
387
+ die();
388
+
389
+ }
390
+
391
+ function save_message_in_post_content( $post_data ) {
392
+
393
+ if( !empty( $_POST['post_type'] ) && $_POST['post_type'] == 'message' && !empty( $_POST['message_data'] ) ) {
394
+
395
+ $message_id = $_POST['ID'];
396
+ $post_data['post_content'] = $_POST['message_data'][$message_id]['message'];
397
+
398
+ if( isset( $_POST['message_data'][$message_id]['post_title'] ) ) {
399
+
400
+ if( !empty( $_POST['message_data'][$message_id]['post_title'] ) ) {
401
+ $post_data['post_title'] = $_POST['message_data'][$message_id]['post_title'];
402
+ } else {
403
+ $post_data['post_title'] = $_POST['message_data'][$message_id]['title'];
404
+ }
405
+
406
+ }
407
+
408
+ }
409
+
410
+ return $post_data;
411
+
412
+ }
413
+
414
+ function icegram_all_message_type() {
415
+ return $this->message_types;
416
+ }
417
+
418
+ function icegram_all_message_theme() {
419
+ return $this->message_themes;
420
+ }
421
+
422
+ function available_headlines( $available_headlines = array() ) {
423
+ $available_headlines = array_merge( $available_headlines, array(
424
+ __( 'Here Is A Method That Is Helping ____ To ____', 'translate_icegram' ),
425
+ __( '__ Little Known Ways To ____', 'translate_icegram' ),
426
+ __( 'Get Rid Of ____ Once And For All', 'translate_icegram' ),
427
+ __( 'How To ____ So You Can ____', 'translate_icegram' ),
428
+ __( 'They Didn\'t Think I Could ____, But I Did', 'translate_icegram' ),
429
+ __( 'How ____ Made Me ____', 'translate_icegram' ),
430
+ __( 'Are You ____ ?', 'translate_icegram' ),
431
+ __( 'Warning: ____ !', 'translate_icegram' ),
432
+ __( 'Do You Make These Mistakes With ____ ?', 'translate_icegram' ),
433
+ __( '7 Ways To ____', 'translate_icegram' ),
434
+ __( 'If You\'re ____, You Can ____', 'translate_icegram' ),
435
+ __( 'Turn your ____ into a ____', 'translate_icegram' ),
436
+ __( 'Want To Be A ____?', 'translate_icegram' ),
437
+ __( 'The Ugly Truth About Your Beautiful ____', 'translate_icegram' ),
438
+ __( 'The Secret to ____ Is Simply ____!', 'translate_icegram' ),
439
+ __( 'The Quickest Way I Know To ____', 'translate_icegram' ),
440
+ __( 'The Lazy Man\'s Way To ____', 'translate_icegram' ),
441
+ __( 'The Amazing Story Of ____ That Requires So Little Of ____ You Could ____', 'translate_icegram' ),
442
+ __( 'The Amazing Secret Of The ____ Genius Who Is Afraid Of ____', 'translate_icegram' ),
443
+ __( 'The 10 Wackiest Ideas That ____... And How You Can Too!', 'translate_icegram' ),
444
+ __( 'The Inside Secrets To ____ With Crazy, Outlandish And Outrageous ____', 'translate_icegram' ),
445
+ __( '____ Like A ____', 'translate_icegram' ),
446
+ __( 'Remember When You Could Have ____, And You Didn\'t?', 'translate_icegram' ),
447
+ __( 'Is The ____ Worth $x To You?', 'translate_icegram' ),
448
+ __( 'Increase your ____, reduce ____, maintain ____ and ____ with ____', 'translate_icegram' ),
449
+ __( 'If You Can ____ You Can ____', 'translate_icegram' ),
450
+ __( 'I Discovered How To ____... Now I\'m Revealing My Secret', 'translate_icegram' ),
451
+ __( 'How To Turn Your ____ Into The Most ____', 'translate_icegram' ),
452
+ __( 'How To Take The Headache Out Of ____', 'translate_icegram' ),
453
+ __( 'How To ____ ... Legally', 'translate_icegram' ),
454
+ __( 'How To ____ That ____', 'translate_icegram' ),
455
+ __( 'How To Discover The ____ That Lies Hidden In Your ____', 'translate_icegram' ),
456
+ __( 'How To ____ Even When Your Not ____', 'translate_icegram' ),
457
+ __( '____ With No ____!', 'translate_icegram' ),
458
+ __( 'Greatest Goldmine of ____ Ever Jammed Into One Big ____', 'translate_icegram' ),
459
+ __( 'Free ____ Tells How To Get Better ____', 'translate_icegram' ),
460
+ __( 'FREE ____ Worth $____ for the first 100 People to take Advantage of this Offer', 'translate_icegram' ),
461
+ __( 'Don\'t Try This With Any Other ____', 'translate_icegram' ),
462
+ __( 'Do You Honestly Want To ____?', 'translate_icegram' ),
463
+ __( 'Discover The Magic ____ That Will Bring You ____ & ____!', 'translate_icegram' ),
464
+ __( '____ Man Reveals A Short-Cut To ____', 'translate_icegram' ),
465
+ __( 'Confessions Of A ____', 'translate_icegram' ),
466
+ __( 'Are You Ready To ____?', 'translate_icegram' ),
467
+ __( 'An Open Letter To Everyone Who ____ More Than ____ Per ____', 'translate_icegram' ),
468
+ __( 'An Amazing ____ You Can Carry In Your ____', 'translate_icegram' ),
469
+ __( '21 Secret ____ that will ____... NOW!', 'translate_icegram' )
470
+ ) );
471
+ return $available_headlines;
472
+ }
473
+
474
+ }
475
+
476
+ $GLOBALS['wp_message'] = new WP_Message();
icegram-includes/class-icegram-upgrade.php ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class IceGram_Upgrade {
3
+
4
+ var $base_name;
5
+ var $check_update_timeout;
6
+ var $last_checked;
7
+ var $plugin_data;
8
+ var $sku;
9
+ var $license_key;
10
+ var $download_url;
11
+ var $installed_version;
12
+ var $live_version;
13
+ var $changelog;
14
+ var $slug;
15
+ var $name;
16
+ var $documentation_link;
17
+ var $prefix;
18
+ var $text_domain;
19
+ var $login_link;
20
+ var $due_date;
21
+
22
+ function __construct( $file, $sku, $prefix, $plugin_name, $text_domain, $documentation_link ) {
23
+
24
+ $this->check_update_timeout = (24 * 60 * 60); // 24 hours
25
+
26
+ if (! function_exists( 'get_plugin_data' )) {
27
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
28
+ }
29
+ $this->plugin_data = get_plugin_data( $file );
30
+ $this->base_name = plugin_basename( $file );
31
+ $this->slug = dirname( $this->base_name );
32
+ $this->name = $plugin_name;
33
+ $this->sku = $sku;
34
+ $this->documentation_link = $documentation_link;
35
+ $this->prefix = $prefix;
36
+ $this->text_domain = $text_domain;
37
+
38
+ add_site_option( $this->prefix.'_last_checked', '' );
39
+ add_site_option( $this->prefix.'_download_url', '' );
40
+ add_site_option( $this->prefix.'_installed_version', '' );
41
+ add_site_option( $this->prefix.'_live_version', '' );
42
+
43
+ if ( empty( $this->last_checked ) ) {
44
+ $this->last_checked = (int)get_site_option( $this->prefix.'_last_checked' );
45
+ }
46
+
47
+ if (get_site_option( $this->prefix.'_installed_version' ) != $this->plugin_data ['Version']) {
48
+ update_site_option( $this->prefix.'_installed_version', $this->plugin_data ['Version'] );
49
+ }
50
+
51
+ if ( ( get_site_option( $this->prefix.'_live_version' ) == '' ) || ( get_site_option( $this->prefix.'_live_version' ) < get_site_option( $this->prefix.'_installed_version' ) ) ) {
52
+ update_site_option( $this->prefix.'_live_version', $this->plugin_data['Version'] );
53
+ }
54
+
55
+ // Actions for License Validation & Upgrade process
56
+ add_action( 'admin_footer', array ($this, 'support_ticket_content' ) );
57
+ add_action( "after_plugin_row_".$this->base_name, array ($this, 'update_row' ), 10, 2 );
58
+
59
+ // add_filter( 'plugins_api', array( $this, 'overwrite_wp_plugin_api_for_plugin' ), 10, 3 );
60
+ // add_filter( 'site_transient_update_plugins', array ($this, 'overwrite_site_transient' ), 10, 2 );
61
+
62
+ add_filter( 'plugin_row_meta', array( $this, 'add_support_link' ), 10, 4 );
63
+
64
+ }
65
+
66
+ function check_for_updates() {
67
+
68
+ $this->live_version = get_site_option( $this->prefix.'_live_version' );
69
+ $this->installed_version = get_site_option( $this->prefix.'_installed_version' );
70
+
71
+ if (version_compare( $this->installed_version, $this->live_version, '<=' )) {
72
+
73
+ $result = wp_remote_post( 'http://www.icegram.com/wp-admin/admin-ajax.php?action=get_products_latest_version&uuid=' . urlencode( admin_url( '/' ) ) . '&requester=' . get_option('admin_email') );
74
+
75
+ if (is_wp_error($result)) {
76
+ return;
77
+ }
78
+
79
+ $response = json_decode( $result ['body'] );
80
+
81
+ $live_version = $response->version;
82
+ $download_url = $response->download_url;
83
+
84
+ if ($this->live_version == $live_version || $response == 'false') {
85
+ return;
86
+ }
87
+
88
+ update_site_option( $this->prefix.'_live_version', $live_version );
89
+ update_site_option( $this->prefix.'_download_url', $download_url );
90
+
91
+ }
92
+ }
93
+
94
+ function overwrite_site_transient($plugin_info, $force_check_updates = false) {
95
+
96
+ if (empty( $plugin_info->checked ))
97
+ return $plugin_info;
98
+
99
+ $time_not_changed = isset( $this->last_checked ) && $this->check_update_timeout > ( time() - $this->last_checked );
100
+
101
+ if ( $force_check_updates || !$time_not_changed ) {
102
+ $this->check_for_updates();
103
+ $this->last_checked = time();
104
+ update_site_option( $this->prefix.'_last_checked', $this->last_checked );
105
+ }
106
+
107
+ $plugin_base_file = $this->base_name;
108
+ $live_version = get_site_option( $this->prefix.'_live_version' );
109
+ $installed_version = get_site_option( $this->prefix.'_installed_version' );
110
+
111
+ if (version_compare( $live_version, $installed_version, '>' )) {
112
+ $plugin_info->response [$plugin_base_file] = new stdClass();
113
+ $plugin_info->response [$plugin_base_file]->slug = substr( $plugin_base_file, 0, strpos( $plugin_base_file, '/' ) );
114
+ $plugin_info->response [$plugin_base_file]->new_version = $live_version;
115
+ $plugin_info->response [$plugin_base_file]->url = 'http://www.icegram.com';
116
+ $plugin_info->response [$plugin_base_file]->package = get_site_option( $this->prefix.'_download_url' );
117
+ }
118
+
119
+ return $plugin_info;
120
+ }
121
+
122
+ function overwrite_wp_plugin_api_for_plugin($api = false, $action = '', $args = '') {
123
+
124
+ if ($args->slug != $this->slug)
125
+ return $api;
126
+
127
+ if ('plugin_information' == $action || false === $api || $_REQUEST ['plugin'] == $args->slug) {
128
+ $api->name = $this->name;
129
+ $api->version = get_site_option( $this->prefix.'_live_version' );
130
+ $api->download_link = get_site_option( $this->prefix.'_download_url' );
131
+ }
132
+
133
+ return $api;
134
+ }
135
+
136
+ function update_row($file, $plugin_data) {
137
+ $license_key = get_site_option( $this->prefix.'_license_key' );
138
+ $valid_color = '#AAFFAA';
139
+ $invalid_color = '#FFAAAA';
140
+ $color = ($license_key != '') ? $valid_color : $invalid_color;
141
+ ?>
142
+ <style type="text/css">
143
+ div#TB_window {
144
+ background: lightgrey;
145
+ }
146
+ </style>
147
+ <script type="text/javascript">
148
+ jQuery(function(){
149
+ jQuery(document).ready(function(){
150
+ var loaded_url = jQuery('a.<?php echo $this->prefix; ?>_support_link').attr('href');
151
+
152
+ if ( loaded_url != undefined && ( loaded_url.indexOf('width') == -1 || loaded_url.indexOf('height') == -1 ) ) {
153
+ var width = jQuery(window).width();
154
+ var H = jQuery(window).height();
155
+ var W = ( 720 < width ) ? 720 : width;
156
+ var adminbar_height = 0;
157
+
158
+ if ( jQuery('body.admin-bar').length )
159
+ adminbar_height = 28;
160
+
161
+ jQuery('a.<?php echo $this->prefix; ?>_support_link').each(function(){
162
+ var href = jQuery(this).attr('href');
163
+ if ( ! href )
164
+ return;
165
+ href = href.replace(/&width=[0-9]+/g, '');
166
+ href = href.replace(/&height=[0-9]+/g, '');
167
+ jQuery(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 - adminbar_height ) );
168
+ });
169
+
170
+ }
171
+
172
+ });
173
+
174
+ });
175
+ </script>
176
+ <?php
177
+ }
178
+
179
+ function support_ticket_content() {
180
+ global $current_user, $wpdb, $pagenow;
181
+
182
+ if ( $pagenow != 'plugins.php' ) return;
183
+
184
+ if ( !( $current_user instanceof WP_User ) ) return;
185
+
186
+ if( isset( $_POST['icegram_submit_query'] ) && $_POST['icegram_submit_query'] == "Send" ){
187
+
188
+ check_admin_referer( 'icegram-submit-query_' . $this->sku );
189
+
190
+ $additional_info = ( isset( $_POST['additional_information'] ) && !empty( $_POST['additional_information'] ) ) ? sanitize_text_field( $_POST['additional_information'] ) : '';
191
+ $additional_info = str_replace( '=====', '<br />', $additional_info );
192
+ $additional_info = str_replace( array( '[', ']' ), '', $additional_info );
193
+
194
+ $headers = 'From: ';
195
+ $headers .= ( isset( $_POST['client_name'] ) && !empty( $_POST['client_name'] ) ) ? sanitize_text_field( $_POST['client_name'] ) : '';
196
+ $headers .= ' <' . sanitize_text_field( $_POST['client_email'] ) . '>' . "\r\n";
197
+ $headers .= 'MIME-Version: 1.0' . "\r\n";
198
+ $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
199
+
200
+ ob_start();
201
+ echo $additional_info . '<br /><br />';
202
+ echo nl2br($_POST['message']) ;
203
+ $message = ob_get_clean();
204
+ if ( empty( $_POST['name'] ) ) {
205
+ wp_mail( 'hello@icegram.com', $_POST['subject'], $message, $headers );
206
+ header('Location: ' . $_SERVER['HTTP_REFERER'] );
207
+ }
208
+
209
+ }
210
+
211
+ ?>
212
+ <div id="<?php echo $this->prefix; ?>_post_query_form" style="display: none;">
213
+ <style>
214
+ table#<?php echo $this->prefix; ?>_post_query_table {
215
+ padding: 5px;
216
+ }
217
+ table#<?php echo $this->prefix; ?>_post_query_table tr td {
218
+ padding: 5px;
219
+ }
220
+ input.<?php echo $this->sku; ?>_text_field {
221
+ padding: 5px;
222
+ }
223
+ label {
224
+ font-weight: bold;
225
+ }
226
+ </style>
227
+ <?php
228
+
229
+ if ( !wp_script_is('jquery') ) {
230
+ wp_enqueue_script('jquery');
231
+ wp_enqueue_style('jquery');
232
+ }
233
+
234
+ $first_name = get_user_meta($current_user->ID, 'first_name', true);
235
+ $last_name = get_user_meta($current_user->ID, 'last_name', true);
236
+ $name = $first_name . ' ' . $last_name;
237
+ $customer_name = ( !empty( $name ) ) ? $name : $current_user->data->display_name;
238
+ $customer_email = $current_user->data->user_email;
239
+ $wp_version = ( is_multisite() ) ? 'WPMU ' . get_bloginfo('version') : 'WP ' . get_bloginfo('version');
240
+ $admin_url = admin_url();
241
+ $php_version = ( function_exists( 'phpversion' ) ) ? phpversion() : '';
242
+ $wp_max_upload_size = size_format( wp_max_upload_size() );
243
+ $server_max_upload_size = ini_get('upload_max_filesize');
244
+ $server_post_max_size = ini_get('post_max_size');
245
+ $wp_memory_limit = WP_MEMORY_LIMIT;
246
+ $wp_debug = ( defined( 'WP_DEBUG' ) && WP_DEBUG === true ) ? 'On' : 'Off';
247
+ $this_plugins_version = $this->plugin_data['Name'] . ' ' . $this->plugin_data['Version'];
248
+ $ip_address = $_SERVER['REMOTE_ADDR'];
249
+ $additional_information = "===== [Additional Information] =====
250
+ [WP Version: $wp_version] =====
251
+ [Admin URL: $admin_url] =====
252
+ [PHP Version: $php_version] =====
253
+ [WP Max Upload Size: $wp_max_upload_size] =====
254
+ [Server Max Upload Size: $server_max_upload_size] =====
255
+ [Server Post Max Size: $server_post_max_size] =====
256
+ [WP Memory Limit: $wp_memory_limit] =====
257
+ [WP Debug: $wp_debug] =====
258
+ [" . $this->plugin_data['Name'] . " Version: " . $this->plugin_data['Version'] . "] =====
259
+ [IP Address: $ip_address] =====
260
+ ";
261
+
262
+ ?>
263
+ <form id="<?php echo $this->prefix; ?>_form_post_query" method="POST" action="" enctype="multipart/form-data" oncontextmenu="return false;">
264
+ <script type="text/javascript">
265
+ jQuery(function(){
266
+ jQuery('input#<?php echo $this->prefix; ?>_submit_query').click(function(e){
267
+ var error = false;
268
+
269
+ var client_name = jQuery('input#client_name').val();
270
+ if ( client_name == '' ) {
271
+ jQuery('input#client_name').css('border-color', 'red');
272
+ error = true;
273
+ } else {
274
+ jQuery('input#client_name').css('border-color', '');
275
+ }
276
+
277
+ var client_email = jQuery('input#client_email').val();
278
+ if ( client_email == '' ) {
279
+ jQuery('input#client_email').css('border-color', 'red');
280
+ error = true;
281
+ } else {
282
+ jQuery('input#client_email').css('border-color', '');
283
+ }
284
+
285
+ var subject = jQuery('table#<?php echo $this->prefix; ?>_post_query_table input#subject').val();
286
+ if ( subject == '' ) {
287
+ jQuery('input#subject').css('border-color', 'red');
288
+ error = true;
289
+ } else {
290
+ jQuery('input#subject').css('border-color', '');
291
+ }
292
+
293
+ var message = jQuery('table#<?php echo $this->prefix; ?>_post_query_table textarea#message').val();
294
+ if ( message == '' ) {
295
+ jQuery('textarea#message').css('border-color', 'red');
296
+ error = true;
297
+ } else {
298
+ jQuery('textarea#message').css('border-color', '');
299
+ }
300
+
301
+ if ( error == true ) {
302
+ jQuery('label#error_message').text('* All fields are compulsory.');
303
+ e.preventDefault();
304
+ } else {
305
+ jQuery('label#error_message').text('');
306
+ }
307
+
308
+ });
309
+
310
+ jQuery("span.<?php echo $this->prefix; ?>_support a.thickbox").click( function(){
311
+ setTimeout(function() {
312
+ jQuery('#TB_ajaxWindowTitle strong').text('Send your query');
313
+ }, 0 );
314
+ });
315
+
316
+ jQuery('div#TB_ajaxWindowTitle').each(function(){
317
+ var window_title = jQuery(this).text();
318
+ if ( window_title.indexOf('Send your query') != -1 ) {
319
+ jQuery(this).remove();
320
+ }
321
+ });
322
+
323
+ jQuery('input,textarea').keyup(function(){
324
+ var value = jQuery(this).val();
325
+ if ( value.length > 0 ) {
326
+ jQuery(this).css('border-color', '');
327
+ jQuery('label#error_message').text('');
328
+ }
329
+ });
330
+
331
+ });
332
+ </script>
333
+ <table id="<?php echo $this->prefix; ?>_post_query_table">
334
+ <tr>
335
+ <td><label for="client_name"><?php _e('Name', $this->text_domain); ?>*</label></td>
336
+ <td><input type="text" class="regular-text <?php echo $this->sku; ?>_text_field" id="client_name" name="client_name" value="<?php echo $customer_name; ?>" autocomplete="off" oncopy="return false;" onpaste="return false;" oncut="return false;"/></td>
337
+ </tr>
338
+ <tr>
339
+ <td><label for="client_email"><?php _e('E-mail', $this->text_domain); ?>*</label></td>
340
+ <td><input type="email" class="regular-text <?php echo $this->sku; ?>_text_field" id="client_email" name="client_email" value="<?php echo $customer_email; ?>" autocomplete="off" oncopy="return false;" onpaste="return false;" oncut="return false;"/></td>
341
+ </tr>
342
+ <tr>
343
+ <td><label for="current_plugin"><?php _e('Product', $this->text_domain); ?></label></td>
344
+ <td><input type="text" class="regular-text <?php echo $this->sku; ?>_text_field" id="current_plugin" name="current_plugin" value="<?php echo $this_plugins_version; ?>" readonly autocomplete="off" oncopy="return false;" onpaste="return false;" oncut="return false;"/><input type="text" name="name" value="" style="display: none;" /></td>
345
+ </tr>
346
+ <tr>
347
+ <td><label for="subject"><?php _e('Subject', $this->text_domain); ?>*</label></td>
348
+ <td><input type="text" class="regular-text <?php echo $this->sku; ?>_text_field" id="subject" name="subject" value="<?php echo ( !empty( $subject ) ) ? $subject : ''; ?>" autocomplete="off" oncopy="return false;" onpaste="return false;" oncut="return false;"/></td>
349
+ </tr>
350
+ <tr>
351
+ <td style="vertical-align: top; padding-top: 12px;"><label for="message"><?php _e('Message', $this->text_domain); ?>*</label></td>
352
+ <td><textarea id="message" name="message" rows="10" cols="60" autocomplete="off" oncopy="return false;" onpaste="return false;" oncut="return false;"><?php echo ( !empty( $message ) ) ? $message : ''; ?></textarea></td>
353
+ </tr>
354
+ <tr>
355
+ <td></td>
356
+ <td><label id="error_message" style="color: red;"></label></td>
357
+ </tr>
358
+ <tr>
359
+ <td></td>
360
+ <td><button type="submit" class="button" id="<?php echo $this->prefix; ?>_submit_query" name="icegram_submit_query" value="Send" ><?php _e( 'Send', $this->text_domain ) ?></button></td>
361
+ </tr>
362
+ </table>
363
+ <?php wp_nonce_field( 'icegram-submit-query_' . $this->sku ); ?>
364
+ <input type="hidden" name="sku" value="<?php echo $this->sku; ?>" />
365
+ <input type="hidden" class="hidden_field" name="wp_version" value="<?php echo $wp_version; ?>" />
366
+ <input type="hidden" class="hidden_field" name="admin_url" value="<?php echo $admin_url; ?>" />
367
+ <input type="hidden" class="hidden_field" name="php_version" value="<?php echo $php_version; ?>" />
368
+ <input type="hidden" class="hidden_field" name="wp_max_upload_size" value="<?php echo $wp_max_upload_size; ?>" />
369
+ <input type="hidden" class="hidden_field" name="server_max_upload_size" value="<?php echo $server_max_upload_size; ?>" />
370
+ <input type="hidden" class="hidden_field" name="server_post_max_size" value="<?php echo $server_post_max_size; ?>" />
371
+ <input type="hidden" class="hidden_field" name="wp_memory_limit" value="<?php echo $wp_memory_limit; ?>" />
372
+ <input type="hidden" class="hidden_field" name="wp_debug" value="<?php echo $wp_debug; ?>" />
373
+ <input type="hidden" class="hidden_field" name="current_plugin" value="<?php echo $this_plugins_version; ?>" />
374
+ <input type="hidden" class="hidden_field" name="ip_address" value="<?php echo $ip_address; ?>" />
375
+ <input type="hidden" class="hidden_field" name="additional_information" value='<?php echo $additional_information; ?>' />
376
+ </form>
377
+ </div>
378
+ <?php
379
+ }
380
+
381
+ function add_support_link( $plugin_meta, $plugin_file, $plugin_data, $status ) {
382
+
383
+ if ( $this->base_name == $plugin_file ) {
384
+ $query_char = ( strpos( $_SERVER['REQUEST_URI'], '?' ) !== false ) ? '&' : '?';
385
+ $plugin_meta[] = '<a href="#TB_inline'.$query_char.'inlineId='.$this->prefix.'_post_query_form" class="thickbox '.$this->prefix.'_support_link" title="' . __( 'Submit your query', $this->text_domain ) . '">' . __( 'Support', $this->text_domain ) . '</a>';
386
+ if ( !empty( $this->documentation_link ) ) {
387
+ $plugin_meta[] = '<a href="'.$this->documentation_link.'" target="_blank" title="' . __( 'Documentation', $this->text_domain ) . '">' . __( 'Docs', $this->text_domain ) . '</a>';
388
+ }
389
+ }
390
+
391
+ return $plugin_meta;
392
+
393
+ }
394
+ }
icegram.php ADDED
@@ -0,0 +1,843 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
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.1
7
+ Author: Icegram
8
+ Author URI: http://www.icegram.com/
9
+ Copyright (c) 2014 Icegram All rights reserved.
10
+ */
11
+
12
+ /**
13
+ * Main class Icegram
14
+ */
15
+ class Icegram {
16
+
17
+ var $plugin_url;
18
+ var $plugin_path;
19
+ var $_wpautop_tags;
20
+ public static $current_page_id;
21
+
22
+ function __construct() {
23
+
24
+ $this->include_classes();
25
+ $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
26
+ $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
27
+
28
+ add_action( 'init', array( &$this, 'register_campaign_post_type' ) );
29
+ add_action( 'init', array( &$this, 'register_message_post_type' ) );
30
+
31
+ add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_styles_and_scripts' ) );
32
+ add_action( 'wp_footer', array( &$this, 'display_messages' ) );
33
+
34
+ add_action( 'admin_print_styles', array( &$this, 'remove_preview_button' ) ) ;
35
+ add_filter( 'post_row_actions', array( &$this , 'remove_row_actions' ), 10, 2 );
36
+ add_action( 'wp_print_scripts', array( &$this, 'identify_current_page' ) );
37
+
38
+ add_shortcode( 'icegram', array( &$this, 'display_messages' ) );
39
+ add_action( 'admin_menu', array( &$this, 'admin_menus') );
40
+ add_action( 'admin_init', array( &$this, 'welcome' ) );
41
+
42
+ add_action( 'wp_ajax_nopriv_icegram_event_track', array( &$this, 'icegram_event_track' ) );
43
+ add_action( 'wp_ajax_icegram_event_track', array( &$this, 'icegram_event_track' ) );
44
+
45
+ }
46
+
47
+ public function icegram_event_track() {
48
+
49
+ if( !empty( $_POST['event_data'] ) ) {
50
+
51
+ $messages_shown = (array) unserialize( (!empty($_COOKIE['icegram_messages_shown']) ? stripslashes( $_COOKIE['icegram_messages_shown'] ) : '') );
52
+
53
+ foreach ( $_POST['event_data'] as $event ) {
54
+ switch ($event['type']) {
55
+ case 'shown':
56
+ if (is_array($event['params']) && !empty($event['params']['message_id'])) {
57
+ $messages_shown[] = $event['params']['message_id'];
58
+ }
59
+ break;
60
+
61
+ default:
62
+ break;
63
+ }
64
+
65
+ // Emit event for other plugins to handle it
66
+ do_action('icegram_event_track', $event);
67
+ do_action('icegram_event_track_'.$event['type'], $event['params']);
68
+ }
69
+ }
70
+ $messages_shown = array_values ( array_filter ( array_unique($messages_shown) ) );
71
+ setcookie('icegram_messages_shown', serialize($messages_shown), 0, '/');
72
+ exit();
73
+
74
+ }
75
+
76
+ static function install() {
77
+ // Redirect to welcome screen
78
+ set_transient( '_icegram_activation_redirect', 1, 60 * 60 );
79
+ }
80
+
81
+ public function welcome() {
82
+
83
+ // Bail if no activation redirect transient is set
84
+ if ( ! get_transient( '_icegram_activation_redirect' ) )
85
+ return;
86
+
87
+ // Delete the redirect transient
88
+ delete_transient( '_icegram_activation_redirect' );
89
+
90
+ wp_redirect( admin_url( 'edit.php?post_type=campaign&page=icegram-support' ) );
91
+ exit;
92
+
93
+ }
94
+
95
+ public function admin_menus() {
96
+
97
+ $welcome_page_title = __( 'Welcome to Icegram', 'translate_icegram' );
98
+ $menu_title = __( 'Docs & Support', 'translate_icegram' );
99
+ $about = add_submenu_page( 'edit.php?post_type=campaign', $welcome_page_title, $menu_title, 'manage_options', 'icegram-support', array( $this, 'about_screen' ) );
100
+
101
+ add_action( 'admin_print_styles-'. $about, array( $this, 'admin_css' ) );
102
+
103
+ }
104
+
105
+ public function admin_css() {
106
+ wp_enqueue_style( 'icegram-activation', $this->plugin_url . '/assets/css/admin.css' );
107
+ }
108
+
109
+ public function about_screen() {
110
+ global $icegram, $icegram_upgrader;
111
+ include ( 'about-icegram.php' );
112
+ }
113
+
114
+ function display_messages( $atts = array() ) {
115
+
116
+ if( !empty( $atts ) ) {
117
+ extract( shortcode_atts( array(
118
+ 'campaigns' => '',
119
+ 'messages' => ''
120
+ ), $atts ) );
121
+
122
+ $campaign_ids = explode( ',', $campaigns );
123
+ $campaign_ids = array_map( 'trim', $campaign_ids );
124
+ $message_ids = explode( ',', $messages );
125
+ $message_ids = array_map( 'trim', $message_ids );
126
+ $messages = $this->get_valid_messages( $message_ids, $campaign_ids );
127
+
128
+ } elseif( !empty( $_GET['campaign_preview_id'] ) ) {
129
+
130
+ $message_ids = get_post_meta( $_GET['campaign_preview_id'], 'campaign_preview', true );
131
+ $messages = $this->get_valid_messages( $message_ids, array(), true );
132
+
133
+ } else {
134
+ $messages = $this->get_valid_messages();
135
+ }
136
+
137
+ if( empty( $messages ) )
138
+ return;
139
+
140
+ $messages_shown = (array) unserialize( (!empty($_COOKIE['icegram_messages_shown']) ? stripslashes( $_COOKIE['icegram_messages_shown'] ) : '') );
141
+
142
+ foreach ( $messages as $key => $message_data ) {
143
+
144
+ if( !empty( $message_data['id'] ) &&
145
+ empty( $_GET['campaign_preview_id'] ) &&
146
+ in_array( $message_data['id'], $messages_shown ) &&
147
+ !empty( $message_data['retargeting'] ) &&
148
+ $message_data['retargeting'] == 'yes'
149
+ ) {
150
+ unset( $messages[$key] );
151
+ continue;
152
+ }
153
+
154
+ // Our own implementation so WP does not mess with script, style and pre tags
155
+ add_filter('the_content', array( $this, 'before_wpautop' ) , 9);
156
+ add_filter('the_content', array( $this, 'after_wpautop' ) , 11);
157
+ $messages[$key]['message'] = apply_filters( 'the_content', $message_data['message'] );
158
+ remove_filter('the_content', array( $this, 'before_wpautop' ) , 9);
159
+ remove_filter('the_content', array( $this, 'after_wpautop' ) , 11);
160
+ $this->get_template( $message_data );
161
+ }
162
+
163
+ if( empty( $messages ) )
164
+ return;
165
+
166
+ wp_register_script( 'icegram_frontend_script', $this->plugin_url . '/assets/js/frontend.js', array ( 'jquery' ), '', true );
167
+ wp_enqueue_style( 'icegram_frontend_styles', $this->plugin_url . '/assets/css/frontend.css' );
168
+ wp_enqueue_style( 'dashicons' );
169
+ wp_enqueue_script( 'thickbox' );
170
+ wp_enqueue_style( 'thickbox' );
171
+
172
+ $icegram_default = apply_filters( 'icegram_branding_data',
173
+ array ( 'default_promo_image' => $this->plugin_url . '/assets/images/icegram-logo-branding-64-grey.png',
174
+ 'powered_by_logo' => $this->plugin_url . '/assets/images/icegram-logo-branding-64-grey.png',
175
+ 'powered_by_text' => __( 'Powered by Icegram', 'translate_icegram' )
176
+ ) );
177
+ $icegram = array ( 'messages' => array_values( $messages ),
178
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
179
+ 'preview_id' => !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '',
180
+ 'icegram_default'=> $icegram_default
181
+ );
182
+
183
+ if( !wp_script_is( 'icegram_frontend_script' ) ) {
184
+ wp_enqueue_script( 'icegram_frontend_script' );
185
+ wp_localize_script( 'icegram_frontend_script', 'icegram_data', $icegram );
186
+ }
187
+
188
+ }
189
+
190
+ function get_template( $message_data = array() ) {
191
+
192
+ if( empty( $message_data ) )
193
+ return;
194
+
195
+ $theme = $message_data['theme'][$message_data['type']];
196
+
197
+ if( !wp_style_is( $message_data['type'] . "_" . $theme ) ) {
198
+ wp_enqueue_style( $message_data['type'] . "_" . $theme , $this->plugin_url . '/assets/css/' . str_replace( "_", "-", $message_data['type'] ) . '/' . $theme . '.css' );
199
+ }
200
+
201
+ $template_file = str_replace( "_", "-", $message_data['type'] ) . ".php";
202
+ include( $this->plugin_path . '/templates/' . $template_file );
203
+
204
+ }
205
+
206
+ function enqueue_admin_styles_and_scripts() {
207
+
208
+ $screen = get_current_screen();
209
+ if ( !in_array( $screen->id, array( 'campaign', 'message' ), true ) ) return;
210
+
211
+ // Register scripts
212
+ wp_register_script( 'icegram_writepanel', $this->plugin_url . '/assets/js/admin.js' , array ( 'jquery', 'wp-color-picker' ) );
213
+ wp_register_script( 'icegram_frontend_script', $this->plugin_url . '/assets/js/frontend.js', array ( 'jquery' ), '', true );
214
+ wp_register_script( 'icegram_chosen', $this->plugin_url . '/assets/js/chosen.jquery.js' , array ( 'jquery' ), '1.0' );
215
+ wp_register_script( 'icegram_ajax-chosen', $this->plugin_url . '/assets/js/ajax-chosen.jquery.min.js' , array ( 'icegram_chosen' ), '1.0' );
216
+ wp_register_script( 'icegram_tiptip', $this->plugin_url . '/assets/js/jquery.tipTip.min.js' , array ( 'jquery' ), get_bloginfo( 'version' ) );
217
+
218
+ wp_enqueue_script( 'icegram_writepanel' );
219
+ wp_enqueue_script( 'icegram_frontend_script' );
220
+ wp_enqueue_script( 'icegram_ajax-chosen' );
221
+ wp_enqueue_script( 'icegram_tiptip' );
222
+ wp_enqueue_script( 'thickbox' );
223
+
224
+ $icegram_witepanel_params = array ('ajax_url' => admin_url( 'admin-ajax.php' ), 'search_message_nonce' => wp_create_nonce( "search-messages" ) );
225
+ $icegram_available_headlines = apply_filters( 'icegram_available_headlines', array() );
226
+ $icegram_witepanel_params = array_merge( $icegram_witepanel_params, array( 'available_headlines' => $icegram_available_headlines ) );
227
+
228
+ wp_localize_script( 'icegram_writepanel', 'icegram_writepanel_params', $icegram_witepanel_params );
229
+
230
+ wp_enqueue_style( 'thickbox' );
231
+ wp_enqueue_style( 'wp-color-picker' );
232
+ wp_enqueue_style( 'icegram_admin_styles', $this->plugin_url . '/assets/css/admin.css' );
233
+ wp_enqueue_style( 'icegram_jquery-ui-style', $this->plugin_url . '/assets/css/jquery-ui.css' );
234
+ wp_enqueue_style( 'icegram_chosen_styles', $this->plugin_url . '/assets/css/chosen.css' );
235
+
236
+ if ( !wp_script_is( 'jquery-ui-datepicker' ) ) {
237
+ wp_enqueue_script( 'jquery-ui-datepicker' );
238
+ }
239
+
240
+ }
241
+
242
+ public static function get_platform() {
243
+ $platform = '';
244
+ $user_agent = trim(strtolower($_SERVER['HTTP_USER_AGENT']));
245
+ $pattern = '/(android\s\d|blackberry|ip(hone|ad|od)|iemobile|webos|palm|symbian|kindle|windows|win64|wow64|macintosh|intel\smac\sos\sx|ppx\smac\sos\sx|googlebot|googlebot-mobile)/';
246
+ if ( preg_match( $pattern, $user_agent, $matches ) ) {
247
+ $platform = $matches[0];
248
+ }
249
+
250
+ switch ( $platform ) {
251
+
252
+ /* phones / smartphones */
253
+ case 'android 1':
254
+ case 'android 2':
255
+ case 'blackberry':
256
+ case 'iphone':
257
+ case 'ipod':
258
+ case 'iemobile':
259
+ case 'webos':
260
+ case 'palm':
261
+ case 'symbian':
262
+ case 'googlebot-mobile':
263
+ $platform = 'mobile';
264
+ break;
265
+
266
+ /* tablets */
267
+ case 'android 3':
268
+ case 'android 4':
269
+ case 'ipad':
270
+ case 'kindle':
271
+ $platform = 'tablet';
272
+ break;
273
+
274
+ /* desktops / laptops */
275
+ case 'windows':
276
+ case 'win64':
277
+ case 'wow64':
278
+ case 'macintosh':
279
+ case 'ppx mac os x':
280
+ case 'intel mac os x':
281
+ case 'googlebot':
282
+ $platform = 'laptop';
283
+ break;
284
+
285
+ /* in case nothing else matches */
286
+ default:
287
+ $platform = 'laptop';
288
+ break;
289
+ }
290
+ return $platform;
291
+ }
292
+
293
+ function get_message_data( $message_ids = array(), $preview = false ) {
294
+ global $wpdb;
295
+
296
+ $meta_key = $preview ? 'icegram_message_preview_data' : 'icegram_message_data';
297
+ $message_data_query = "SELECT post_id, meta_value FROM {$wpdb->prefix}postmeta WHERE meta_key LIKE '$meta_key'";
298
+ if ( !empty( $message_ids ) && is_array( $message_ids ) ) {
299
+ $message_data_query .= " AND post_id IN ( " . implode( ',', $message_ids ) . " )";
300
+ }
301
+ $message_data_results = $wpdb->get_results( $message_data_query, 'ARRAY_A' );
302
+ $message_data = array();
303
+ foreach ( $message_data_results as $message_data_result ) {
304
+ $message_data[$message_data_result['post_id']] = maybe_unserialize( $message_data_result['meta_value'] );
305
+ }
306
+
307
+ return $message_data;
308
+ }
309
+
310
+ function get_valid_messages( $message_ids = array(), $campaign_ids = array(), $preview = false ) {
311
+
312
+ $valid_message_data = $this->get_message_data( array(), $preview );
313
+
314
+ $valid_messages = array();
315
+ $valid_campaigns = array();
316
+
317
+ if ( empty( $message_ids ) && empty( $campaign_ids ) ) {
318
+ $valid_campaigns = $this->get_valid_campaigns();
319
+ } else {
320
+ if ( !empty( $message_ids ) ) {
321
+
322
+ if( $preview ) {
323
+ foreach ( $message_ids as $message ) {
324
+ if ( empty( $valid_message_data[$message['id']] ) ) continue;
325
+ $message_data = $valid_message_data[$message['id']];
326
+ if ( !empty( $message_data ) ) {
327
+ $message_data['delay_time'] = $message['time'];
328
+ $message_data['campaign_id'] = !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '';
329
+ $message_data['retargeting'] = '';
330
+ $valid_messages[] = $message_data;
331
+ }
332
+ }
333
+ } else {
334
+ foreach ( $message_ids as $message_id ) {
335
+ if ( empty( $valid_message_data[$message_id] ) ) continue;
336
+ $message_data = $valid_message_data[$message_id];
337
+ if ( !empty( $message_data ) ) {
338
+ $message_data['delay_time'] = 0;
339
+ $message_data['campaign_id'] = '';
340
+ $message_data['retargeting'] = '';
341
+ $valid_messages[] = $message_data;
342
+ }
343
+ }
344
+ }
345
+ }
346
+
347
+ if ( !empty( $campaign_ids ) ) {
348
+ foreach ( $campaign_ids as $campaign_id ) {
349
+ $valid_campaigns[$campaign_id] = new WP_Campaign( $campaign_id );
350
+ }
351
+ }
352
+
353
+ }
354
+
355
+ if ( !empty( $valid_campaigns ) ) {
356
+ foreach ( $valid_campaigns as $campaign_id => $campaign ) {
357
+ if ( !empty( $campaign->message_ids ) ) {
358
+ foreach ( $campaign->message_ids as $message ) {
359
+ $message_data = $valid_message_data[$message['id']];
360
+ if ( !empty( $message_data ) ) {
361
+ $campaign_rules = get_post_meta( $campaign_id, 'icegram_campaign_target_rules', true );
362
+ $message_data['delay_time'] = $message['time'];
363
+ $message_data['campaign_id'] = $campaign_id;
364
+ $message_data['retargeting'] = !empty( $campaign_rules['retargeting'] ) ? $campaign_rules['retargeting'] : '';
365
+ $valid_messages[] = $message_data;
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+
372
+ return $valid_messages;
373
+
374
+ }
375
+
376
+ function get_valid_campaigns( $campaign_ids = array() ) {
377
+ global $wpdb;
378
+
379
+ if ( empty( $campaign_ids ) ) {
380
+ $search_text = serialize((string)self::$current_page_id);
381
+ $campaign_ids = $wpdb->get_col( "SELECT pm.post_id FROM {$wpdb->prefix}posts AS p LEFT JOIN {$wpdb->prefix}postmeta AS pm ON ( pm.post_id = p.ID ) WHERE pm.meta_key LIKE 'icegram_campaign_target_rules' AND pm.meta_value LIKE '%" . $search_text . "%' AND p.post_status LIKE 'publish'" );
382
+ }
383
+ $valid_campaigns = array();
384
+ foreach ( $campaign_ids as $campaign_id ) {
385
+ // if ( empty( $campaign_id['post_id'] ) ) continue;
386
+ $campaign = new WP_Campaign( $campaign_id );
387
+ if ( $campaign->is_valid() ) {
388
+ $valid_campaigns[$campaign_id] = $campaign;
389
+ }
390
+ }
391
+ return $valid_campaigns;
392
+ }
393
+
394
+ // Include all classes required for Icegram plugin
395
+ function include_classes() {
396
+
397
+ if ( ! class_exists( 'WP_Campaign' ) )
398
+ include_once( 'classes/class-wp-campaign.php' );
399
+
400
+ if ( ! class_exists( 'WP_Message' ) )
401
+ include_once( 'classes/class-wp-message.php' );
402
+
403
+ }
404
+
405
+ // Register Campaign post type
406
+ function register_campaign_post_type() {
407
+ $labels = array(
408
+ 'name' => __( 'Campaigns', 'translate_icegram' ),
409
+ 'singular_name' => __( 'Campaign', 'translate_icegram' ),
410
+ 'add_new' => __( 'Add New Campaign', 'translate_icegram' ),
411
+ 'add_new_item' => __( 'Add New Campaign', 'translate_icegram' ),
412
+ 'edit_item' => __( 'Edit Campaign', 'translate_icegram' ),
413
+ 'new_item' => __( 'New Campaign', 'translate_icegram' ),
414
+ 'all_items' => __( 'Campaigns', 'translate_icegram' ),
415
+ 'view_item' => __( 'View Campaign', 'translate_icegram' ),
416
+ 'search_items' => __( 'Search Campaigns', 'translate_icegram' ),
417
+ 'not_found' => __( 'No campaigns found', 'translate_icegram' ),
418
+ 'not_found_in_trash' => __( 'No campaigns found in Trash', 'translate_icegram' ),
419
+ 'parent_item_colon' => __( '', 'translate_icegram' ),
420
+ 'menu_name' => __( 'Icegram', 'translate_icegram' )
421
+ );
422
+
423
+ $args = array(
424
+ 'labels' => $labels,
425
+ 'menu_icon' => 'dashicons-info',
426
+ 'public' => true,
427
+ 'publicly_queryable' => true,
428
+ 'show_ui' => true,
429
+ 'show_in_menu' => true,
430
+ 'query_var' => true,
431
+ 'rewrite' => array( 'slug' => 'campaign' ),
432
+ 'capability_type' => 'post',
433
+ 'has_archive' => true,
434
+ 'hierarchical' => false,
435
+ 'menu_position' => null,
436
+ 'supports' => array( 'title', 'editor' )
437
+ );
438
+
439
+ register_post_type( 'campaign', $args );
440
+ }
441
+
442
+ // Register Message promo type
443
+ function register_message_post_type() {
444
+ $labels = array(
445
+ 'name' => __( 'Messages', 'translate_icegram' ),
446
+ 'singular_name' => __( 'Message', 'translate_icegram' ),
447
+ 'add_new' => __( 'Create New', 'translate_icegram' ),
448
+ 'add_new_item' => __( 'Create New Message', 'translate_icegram' ),
449
+ 'edit_item' => __( 'Edit Message', 'translate_icegram' ),
450
+ 'new_item' => __( 'New Message', 'translate_icegram' ),
451
+ 'all_items' => __( 'Messages', 'translate_icegram' ),
452
+ 'view_item' => __( 'View Message', 'translate_icegram' ),
453
+ 'search_items' => __( 'Search Messages', 'translate_icegram' ),
454
+ 'not_found' => __( 'No messages found', 'translate_icegram' ),
455
+ 'not_found_in_trash' => __( 'No messages found in Trash', 'translate_icegram' ),
456
+ 'parent_item_colon' => __( '', 'translate_icegram' ),
457
+ 'menu_name' => __( 'Messages', 'translate_icegram' )
458
+ );
459
+
460
+ $args = array(
461
+ 'labels' => $labels,
462
+ 'public' => true,
463
+ 'publicly_queryable' => true,
464
+ 'show_ui' => true,
465
+ 'show_in_menu' => 'edit.php?post_type=campaign',
466
+ 'query_var' => true,
467
+ 'rewrite' => array( 'slug' => 'message' ),
468
+ 'capability_type' => 'post',
469
+ 'has_archive' => true,
470
+ 'hierarchical' => false,
471
+ 'menu_position' => null,
472
+ 'supports' => array( 'title' )
473
+ );
474
+
475
+ register_post_type( 'message', $args );
476
+ }
477
+
478
+ function import( $data = array() ) {
479
+
480
+ if ( empty( $data['campaigns'] ) && empty( $data['messages'] ) ) return;
481
+
482
+ $message_themes = apply_filters( 'icegram_all_message_theme', array() );
483
+
484
+ $default_themes = array();
485
+
486
+ foreach ( (array) $message_themes as $message_type => $available_themes ) {
487
+
488
+ reset( $available_themes );
489
+ $first_theme = key( $available_themes );
490
+ $default_themes[ $message_type ] = $first_theme;
491
+
492
+ }
493
+
494
+ $new_campaign_ids = array();
495
+
496
+ foreach ( (array) $data['campaigns'] as $campaign ) {
497
+
498
+ $args = array(
499
+ 'post_content' => ( !empty( $campaign['post_content'] ) ) ? esc_attr( $campaign['post_content'] ) : '',
500
+ 'post_name' => ( !empty( $campaign['post_title'] ) ) ? sanitize_title( $campaign['post_title'] ) : '',
501
+ 'post_title' => ( !empty( $campaign['post_title'] ) ) ? $campaign['post_title'] : '',
502
+ 'post_status' => ( !empty( $campaign['post_status'] ) ) ? $campaign['post_status'] : 'draft',
503
+ 'post_type' => 'campaign'
504
+ );
505
+
506
+ $new_campaign_id = wp_insert_post( $args );
507
+ $new_campaign_ids[] = $new_campaign_id;
508
+
509
+ if ( !empty( $campaign['target_rules'] ) ) {
510
+
511
+ $defaults = array (
512
+ 'homepage' => 'yes',
513
+ 'when' => 'always',
514
+ 'from' => '',
515
+ 'to' => '',
516
+ 'mobile' => 'yes',
517
+ 'tablet' => 'yes',
518
+ 'laptop' => 'yes',
519
+ 'logged_in' => 'all'
520
+ );
521
+
522
+ $target_rules = wp_parse_args( $campaign['target_rules'], $defaults );
523
+ update_post_meta( $new_campaign_id, 'icegram_campaign_target_rules', $target_rules );
524
+
525
+ }
526
+
527
+ if ( !empty( $campaign['messages'] ) ) {
528
+
529
+ $messages = array();
530
+
531
+ foreach ( $campaign['messages'] as $message ) {
532
+
533
+ if ( !is_array( $message ) ) continue;
534
+
535
+ $args = array(
536
+ 'post_content' => ( !empty( $message['message'] ) ) ? esc_attr( $message['message'] ) : '',
537
+ 'post_name' => ( !empty( $message['post_title'] ) ) ? sanitize_title( $message['post_title'] ) : '',
538
+ 'post_title' => ( !empty( $message['post_title'] ) ) ? $message['post_title'] : '',
539
+ 'post_status' => ( !empty( $message['post_status'] ) ) ? $message['post_status'] : 'publish',
540
+ 'post_type' => 'message'
541
+ );
542
+
543
+ $new_message_id = wp_insert_post( $args );
544
+ $new_message = array(
545
+ 'id' => $new_message_id,
546
+ 'time' => ( !empty( $message['time'] ) ) ? $message['time'] : 0
547
+ );
548
+ $messages[] = $new_message;
549
+
550
+ unset( $message['post_content'] );
551
+ unset( $message['time'] );
552
+
553
+ $message['id'] = $new_message_id;
554
+
555
+ $defaults = array (
556
+ 'post_title' => '',
557
+ 'type' => $first_theme,
558
+ 'theme' => $default_themes,
559
+ 'animation' => '',
560
+ 'toast_animation' => '',
561
+ 'title' => '',
562
+ 'label' => '',
563
+ 'link' => '',
564
+ 'promo_image' => '',
565
+ 'message' => '',
566
+ 'position' => '',
567
+ 'text_color' => '#000000',
568
+ 'bg_color' => '#ffffff',
569
+ 'id' => ''
570
+ );
571
+
572
+ $icegram_message_data = wp_parse_args( $message, $defaults );
573
+
574
+ if ( !empty( $icegram_message_data ) ) {
575
+ update_post_meta( $new_message_id, 'icegram_message_data', $icegram_message_data );
576
+ update_post_meta( $new_message_id, 'icegram_message_preview_data', $icegram_message_data );
577
+ }
578
+ }
579
+
580
+ if ( !empty( $campaign['messages'] ) ) {
581
+ update_post_meta( $new_campaign_id, 'messages', $messages );
582
+ update_post_meta( $new_campaign_id, 'campaign_preview', $messages );
583
+ }
584
+
585
+ }
586
+ }
587
+ if( !empty( $new_campaign_ids ) ) {
588
+ update_option( 'icegram_sample_data_imported', $new_campaign_ids );
589
+ }
590
+
591
+ }
592
+
593
+ function get_sample_data() {
594
+ global $icegram;
595
+ return array(
596
+ 'campaigns' => array(
597
+ array(
598
+ 'post_name' => '',
599
+ 'post_title' => 'My First Icegram Campaign',
600
+ 'target_rules' => array (
601
+ 'homepage' => 'yes',
602
+ 'when' => 'always',
603
+ 'from' => '',
604
+ 'to' => '',
605
+ 'mobile' => 'yes',
606
+ 'tablet' => 'yes',
607
+ 'laptop' => 'yes',
608
+ 'logged_in' => 'all'
609
+ ),
610
+ 'messages' => array(
611
+ array (
612
+ 'post_title' => 'Get 2x more Contacts with Your Website',
613
+ 'post_status' => 'publish',
614
+ 'time' => '0',
615
+ 'type' => 'action-bar',
616
+ 'theme' => array ( 'action-bar' => 'hello' ),
617
+ 'animation' => 'slide',
618
+ 'toast_animation' => 'effect1',
619
+ 'title' => 'Get 2x more Contacts with Your Website',
620
+ 'label' => 'Show Me How',
621
+ 'link' => '',
622
+ 'promo_image' => '',
623
+ 'message' => 'Instant Results Guaranteed',
624
+ 'position' => '01',
625
+ 'text_color' => '#000000',
626
+ 'bg_color' => '#eb593c'
627
+ ),
628
+ array (
629
+ 'post_title' => '20% Off Coupon',
630
+ 'post_status' => 'publish',
631
+ 'time' => '4',
632
+ 'type' => 'messenger',
633
+ 'theme' => array ( 'messenger' => 'social' ),
634
+ 'animation' => 'slide',
635
+ 'toast_animation' => '',
636
+ 'title' => '20% Off - for you',
637
+ 'label' => '',
638
+ 'link' => '',
639
+ 'promo_image' => '',
640
+ 'message' => "Hey there! We are running a <strong>special 20% off this week</strong> for registered users - like you.
641
+
642
+ Use coupon <code>LOYALTY20</code> during checkout.",
643
+ 'position' => '22',
644
+ 'text_color' => '#000000',
645
+ 'bg_color' => '#ffffff'
646
+ ),
647
+ array (
648
+ 'post_title' => 'How this blog makes over $34,800 / month for FREE.',
649
+ 'post_status' => 'publish',
650
+ 'time' => '10',
651
+ 'type' => 'popup',
652
+ 'theme' => array ( 'popup' => 'air-mail' ),
653
+ 'animation' => '',
654
+ 'toast_animation' => '',
655
+ 'title' => 'How this blog makes over $34,800 / month for FREE.',
656
+ 'label' => 'FREE INSTANT ACCESS',
657
+ 'link' => '',
658
+ 'promo_image' => '',
659
+ 'message' => "This website earns over $30,000 every month, every single month, almost on autopilot. I have 4 other sites with similar results. All I do is publish new regular content every week.
660
+
661
+ <strong>Download my free kit to learn how I do this.</strong>
662
+
663
+ <ul>
664
+ <li>How to choose blog topics that create long term value</li>
665
+ <li>The type of blog post that will make your site go viral</li>
666
+ <li>How to free yourself from the routine tasks</li>
667
+ <li>Resources and tips to get started quickly</li>
668
+ <li>Private members club to connect with fellow owners</li>
669
+ </ul>",
670
+ 'text_color' => '#000000',
671
+ 'bg_color' => '#ffffff'
672
+
673
+ ),
674
+ array (
675
+ 'post_title' => 'Exclusive Marketing Report',
676
+ 'post_status' => 'publish',
677
+ 'time' => '6',
678
+ 'type' => 'toast',
679
+ 'theme' => array ( 'toast' => 'stand-out' ),
680
+ 'animation' => '',
681
+ 'toast_animation' => 'slide-down',
682
+ 'title' => 'Exclusive Marketing Report',
683
+ 'label' => '',
684
+ 'link' => '',
685
+ 'promo_image' => '',
686
+ 'message' => 'FREE for every subscriber. Click here to download it.',
687
+ 'position' => '02',
688
+ 'text_color' => '#000000',
689
+ 'bg_color' => '#ffffff'
690
+ )
691
+
692
+ )
693
+ )
694
+ )
695
+ );
696
+ }
697
+
698
+ function remove_preview_button() {
699
+ global $post_type;
700
+
701
+ if( $post_type == 'message' || $post_type == 'campaign' ) {
702
+
703
+ ?>
704
+ <style>
705
+ #preview-action { display:none; }
706
+ </style>
707
+ <?php
708
+
709
+ }
710
+
711
+ }
712
+
713
+ function remove_row_actions( $actions, $post ) {
714
+
715
+ if ( empty( $post->post_type ) || ( $post->post_type != 'campaign' && $post->post_type != 'message' ) ) return $actions;
716
+
717
+ unset( $actions['inline hide-if-no-js'] );
718
+ unset( $actions['view'] );
719
+
720
+ return $actions;
721
+
722
+ }
723
+
724
+ function identify_current_page() {
725
+ if ( is_page() ) {
726
+ global $post;
727
+ self::$current_page_id = $post->ID;
728
+ }
729
+ }
730
+
731
+ /**
732
+ * Our implementation of wpautop to preserve script and style tags
733
+ */
734
+ function before_wpautop($pee) {
735
+ if ( trim($pee) === '' ) {
736
+ $this->_wpautop_tags = array();
737
+ return '';
738
+ }
739
+
740
+ $tags = array();
741
+ // Pull out tags and add placeholders
742
+ list( $pee, $tags['pre'] ) = $this->_wpautop_add_tag_placeholders( $pee, 'pre' );
743
+ list( $pee, $tags['script'] ) = $this->_wpautop_add_tag_placeholders( $pee, 'script' );
744
+ list( $pee, $tags['style'] ) = $this->_wpautop_add_tag_placeholders( $pee, 'style' );
745
+ $this->_wpautop_tags = $tags;
746
+
747
+ if( !empty( $pre_tags ) )
748
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $pre_tags );
749
+ if( !empty( $script_tags ) )
750
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $script_tags );
751
+ if( !empty( $style_tags ) )
752
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $style_tags );
753
+
754
+ return $pee;
755
+ }
756
+
757
+ function after_wpautop($pee) {
758
+ if ( trim($pee) === '' || empty($this->_wpautop_tags) )
759
+ return '';
760
+
761
+ // Replace placeholders with original content
762
+ if (!empty($this->_wpautop_tags['pre'])) {
763
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $this->_wpautop_tags['pre'] );
764
+ }
765
+ if (!empty($this->_wpautop_tags['script'])) {
766
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $this->_wpautop_tags['script'] );
767
+ }
768
+ if (!empty($this->_wpautop_tags['style'])) {
769
+ $pee = $this->_wpautop_replace_tag_placeholders( $pee, $this->_wpautop_tags['style'] );
770
+ }
771
+
772
+ $this->_wpautop_tags = array();
773
+
774
+ return $pee;
775
+ }
776
+
777
+
778
+ function _wpautop_add_tag_placeholders( $pee, $tag ) {
779
+ $tags = array();
780
+
781
+ if ( false !== strpos( $pee, "<{$tag}" ) ) {
782
+ $pee_parts = explode( "</{$tag}>", $pee );
783
+ $last_pee = array_pop( $pee_parts );
784
+ $pee = '';
785
+ $i = 0;
786
+
787
+ foreach ( $pee_parts as $pee_part ) {
788
+ $start = strpos( $pee_part, "<{$tag}" );
789
+
790
+ // Malformed html?
791
+ if ( false === $start ) {
792
+ $pee .= $pee_part;
793
+ continue;
794
+ }
795
+
796
+ $name = "<{$tag} wp-{$tag}-tag-$i></{$tag}>";
797
+ $tags[ $name ] = substr( $pee_part, $start ) . "</{$tag}>";
798
+
799
+ $pee .= substr( $pee_part, 0, $start ) . $name;
800
+ $i++;
801
+ }
802
+
803
+ $pee .= $last_pee;
804
+ }
805
+
806
+ return array( $pee, $tags );
807
+ }
808
+
809
+
810
+ function _wpautop_replace_tag_placeholders( $pee, $tags ) {
811
+ if ( ! empty( $tags ) ) {
812
+ $pee = str_replace( array_keys( $tags ), array_values( $tags ), $pee );
813
+ }
814
+
815
+ return $pee;
816
+ }
817
+
818
+
819
+ }
820
+
821
+ function initialize_icegram() {
822
+ global $icegram, $icegram_upgrader;
823
+
824
+ $icegram = new Icegram();
825
+
826
+ if ( ! class_exists( 'IceGram_Upgrade' ) ) {
827
+ require_once 'icegram-includes/class-icegram-upgrade.php';
828
+ }
829
+ if( get_option( 'icegram_sample_data_imported' ) === false ) {
830
+ $icegram->import( $icegram->get_sample_data() );
831
+ }
832
+
833
+ $sku = 'icegram';
834
+ $prefix = 'icegram';
835
+ $plugin_name = 'Icegram ';
836
+ $text_domain = 'translate_icegram';
837
+ $documentation_link = '';
838
+ $icegram_upgrader = new IceGram_Upgrade( __FILE__, $sku, $prefix, $plugin_name, $text_domain, $documentation_link );
839
+
840
+ }
841
+
842
+ add_action( 'plugins_loaded', 'initialize_icegram' );
843
+ register_activation_hook( __FILE__, array( 'Icegram', 'install' ) );
readme.txt ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Icegram ===
2
+ Contributors: storeapps, nareshvachhani, niravmehta, putler
3
+ 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.8
6
+ Tested up to: 3.9.1
7
+ Stable tag: 1.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more.
12
+
13
+ == Description ==
14
+
15
+ **The Ultimate Plugin To Capture Leads And Connect With Your Audience**
16
+
17
+ = Includes: =
18
+ * Popups, header / footer bars, notifications, messengers
19
+ * Powerful targeting rules
20
+ * All-in-one, fully integrated WordPress plugin
21
+ * Compatible with auto responders, other plugins and themes
22
+
23
+ = Beautiful, Customizable Theme Designs Proven to Engage & Convert =
24
+ Icegram comes with 20 beautiful themes. They integrate well with your favorite WordPress theme and do not slow down your site. When you want to customize override styling with custom CSS.
25
+
26
+ = Complete Control Over Message Content =
27
+ Icegram gives you the fully powered WordPress editor for your content. You can use any layout and formatting for content within each message container.
28
+
29
+ * Continue using powerful **short codes your theme provides** for layout and styling
30
+ * Add **HD Videos / Audio or any other multimedia** content
31
+ * Embed subscription forms from **mailing list service of your choice**
32
+ * Use short codes **other plugins** provide – embed forms, widgets, social sharing buttons, twitter feed…
33
+ * Add **inline JavaScript or CSS** for customizations
34
+ * **Full HTML** editing capability for maximum control
35
+
36
+ = Learn More =
37
+
38
+ * **[Discover all features and see demos on official Icegram website](http://www.icegram.com/)**
39
+ * Follow us on Twitter [@icegram](https://twitter.com/icegram/)
40
+
41
+
42
+ == Installation ==
43
+
44
+ 1. Unzip and upload contents of the plugin to your /wp-content/plugins/ directory
45
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
46
+ 3. Click on 'Icegram' option within WordPress admin sidebar menu
47
+
48
+ == Frequently Asked Questions ==
49
+
50
+ = Messages look broken / formatting is weird... =
51
+
52
+ This is most likely due to CSS conflicts with current theme. We suggest using simple formatting for messages. You can also write custom CSS in your theme to fix any problems.
53
+
54
+ = Extra Line Breaks / Paragraphs in messages... =
55
+
56
+ Go to HTML mode in content editor and pull your custom HTML code all together in one line. Don't leave blank lines between two tags. That should fix it.
57
+
58
+ = How do I add custom CSS for messages? =
59
+
60
+ You can use custom CSS/JS inline in your message HTML. You can also use your theme's custom JS / CSS feature to add your changes.
61
+
62
+ = Optin Forms / Mailing service integration... =
63
+
64
+ 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.
65
+
66
+ = Preview does not work / not refreshing... =
67
+
68
+ Doing a browser refresh while previewing will not show your most recent changes. Click 'Preview' button to see a preview with your latest changes.
69
+
70
+ = Can I use shortcodes in a message? =
71
+
72
+ Yes! Messages support shortcodes. You may need to adjust CSS so the shortcode output looks good in your message.
73
+
74
+ = I can't find a way to do X... =
75
+
76
+ 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.
77
+
78
+ = I'm facing a problem and can't find a way out... =
79
+
80
+ Contact Us, provide as much detail of the problem as you can. We will try to solve the problem ASAP.
81
+
82
+ == Screenshots ==
83
+
84
+ 1. Different Icegram messages
85
+
86
+ 2. The Icegram workflow
87
+
88
+ 3. Editing an Icegram campaign - add multiple messages, edit them, targeting rules, full HTML editor, themes and more
89
+
90
+ == Upgrade Notice ==
91
+
92
+ = 1.0 =
93
+ Initial Release
94
+
95
+ = 1.1 =
96
+ First release on WordPress.org
97
+
98
+
99
+ == Changelog ==
100
+
101
+ = 1.0 =
102
+ * Initial Release
103
+
104
+ = 1.1 =
105
+ * Loading CSS from own domain instead of Google
templates/action-bar.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $id = !empty( $message_data['id'] ) ? $message_data['id'] : $_POST['post_ID'];
3
+ ?>
4
+ <div class="icegram action-bar action_bar_<?php echo $id; ?>">
5
+ <div class="container" id="action_bar_<?php echo $id; ?>">
6
+ <div class="content">
7
+ <div class="popup_close" id="action_bar_close_<?php echo $id; ?>">
8
+ <span class="bar_open"></span>
9
+ <span class="bar_close"></span>
10
+ </div>
11
+ <div>
12
+ <div class="close"></div>
13
+ </div>
14
+ <div class="popup_box_image"></div>
15
+ <div class="data">
16
+ <div class="heading"></div>
17
+ <div class="message"></div>
18
+ </div>
19
+ <div class="popup_button"></div>
20
+ </div>
21
+ </div>
22
+ </div>
templates/messenger.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $id = !empty( $message_data['id'] ) ? $message_data['id'] : $_POST['post_ID'];
3
+ ?>
4
+ <div class="icegram messenger popup_box" id="popup_box_<?php echo $id ?>">
5
+ <div class="popup_box_main">
6
+ <div class="popup_box_header">
7
+ <div class="popup_box_header_image"></div>
8
+ <div class="popup_box_header_text">
9
+ <div class="popup_box_heading"></div>
10
+ </div>
11
+ </div>
12
+ <div class="popup_box_header2_image"></div>
13
+ <div class="popup_box_body">
14
+ <div class="popup_box_message"></div>
15
+ <div class="popup_box_hr"></div>
16
+ </div>
17
+ <div class="popup_box_footer">
18
+ <div class="popup_box_footer_image"></div>
19
+ </div>
20
+ </div>
21
+ <div class="popup_box_close" id="popup_box_close_<?php echo $id ?>"></div>
22
+ </div>
templates/popup.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $id = !empty( $message_data['id'] ) ? $message_data['id'] : $_POST['post_ID'];
3
+ ?>
4
+ <div id="popup_main_<?php echo $id; ?>">
5
+ <div class="icegram popup popup-container" id="popup_box_<?php echo $id; ?>">
6
+ <div class="popup-close" id="popup_box_close_<?php echo $id; ?>"></div>
7
+ <div class="popup-headline"></div>
8
+ <div class="popup-content">
9
+ <div class="popup-image">
10
+ <img class="popup-icon" />
11
+ </div>
12
+ <div class="popup-message"></div>
13
+ </div>
14
+ <div class="popup-button"></div>
15
+ </div>
16
+ </div>
templates/toast.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $id = !empty( $message_data['id'] ) ? $message_data['id'] : $_POST['post_ID'];
3
+ ?>
4
+ <div id="toast_<?php echo $id; ?>">
5
+ <li class="icegram toast toast-container">
6
+ <div class="toast-wrapper">
7
+ <div class="toast-content">
8
+ <div class="toast-base"></div>
9
+ <div class="toast-line"></div>
10
+ <img class="toast-icon" />
11
+ <div class="toast-title"></div>
12
+ <div class="toast-message"></div>
13
+ </div>
14
+ </div>
15
+ </li>
16
+ </div>