Version Description
Lots of enhancements... WPML support, pluggable architecture, many internal changes. Do upgrade.
Download this release
Release Info
Developer | niravmehta |
Plugin | Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.2
- about-icegram.php +34 -26
- assets/css/action-bar/solid.css +0 -65
- assets/css/admin.css +18 -88
- assets/css/frontend.css +3 -284
- assets/css/jquery-ui.min.css +7 -0
- assets/css/messenger/canvas.css +0 -73
- assets/css/popup/convert.css +0 -89
- assets/css/popup/inspire.css +0 -82
- assets/css/toast/balance.css +0 -50
- assets/css/toast/clear.css +0 -67
- assets/images/animated-overlay.gif +0 -0
- assets/images/close_big.png +0 -0
- assets/images/desktop.png +0 -0
- assets/images/icegram-logo-branding-64-grey.png +0 -0
- assets/images/icegram-logo-branding-64.png +0 -0
- assets/images/sketch-messenger.png +0 -0
- assets/images/sketch-multiple-sequence.png +0 -0
- assets/images/sketch-popup.png +0 -0
- assets/images/sketch-rules.png +0 -0
- assets/images/sketch-toast-notification.png +0 -0
- assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- assets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- assets/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- assets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- assets/images/ui-icons_222222_256x240.png +0 -0
- assets/images/ui-icons_2e83ff_256x240.png +0 -0
- assets/images/ui-icons_454545_256x240.png +0 -0
- assets/images/ui-icons_888888_256x240.png +0 -0
- assets/images/ui-icons_cd0a0a_256x240.png +0 -0
- assets/js/admin.js +23 -28
- assets/js/frontend.js +0 -504
- assets/js/icegram.js +349 -0
- classes/class-icegram-cache.php +106 -0
- classes/class-icegram-campaign-admin.php +517 -0
- classes/class-icegram-campaign.php +133 -0
- classes/class-icegram-message-admin.php +494 -0
- classes/class-icegram-message-type.php +103 -0
- classes/class-icegram-message.php +23 -0
- classes/class-wp-campaign.php +0 -558
- classes/class-wp-message.php +0 -476
- icegram.php +475 -219
- message-types/action-bar/default.css +116 -0
- message-types/action-bar/images/chosen-sprite.png +0 -0
- message-types/action-bar/main.js +168 -0
- message-types/action-bar/main.php +36 -0
- {assets/css/action-bar → message-types/action-bar/themes}/air-mail.css +17 -39
- {assets/images/themes/action-bar → message-types/action-bar/themes}/air-mail.png +0 -0
- {assets/css/action-bar → message-types/action-bar/themes}/bold.css +21 -34
- {assets/images/themes/action-bar → message-types/action-bar/themes}/bold.png +0 -0
- {assets/css/action-bar → message-types/action-bar/themes}/hello.css +33 -47
- {assets/images/themes/action-bar → message-types/action-bar/themes}/hello.png +0 -0
- message-types/action-bar/themes/solid.css +59 -0
- {assets/images/themes/action-bar → message-types/action-bar/themes}/solid.png +0 -0
- message-types/messenger/default.css +106 -0
- {assets → message-types/messenger}/images/clear-footer.png +0 -0
- {assets → message-types/messenger}/images/clear-header.png +0 -0
- {assets → message-types/messenger}/images/clear-option.png +0 -0
- {assets → message-types/messenger}/images/social-img.png +0 -0
- {assets → message-types/messenger}/images/talk-close.png +0 -0
- {assets → message-types/messenger}/images/talk-footer-1.png +0 -0
- {assets → message-types/messenger}/images/talk-header-1.png +0 -0
- {assets → message-types/messenger}/images/talk-header-2.png +0 -0
- message-types/messenger/main.js +95 -0
- message-types/messenger/main.php +38 -0
- message-types/messenger/themes/canvas.css +86 -0
- {assets/images/themes/messenger → message-types/messenger/themes}/canvas.png +0 -0
- {assets/css/messenger → message-types/messenger/themes}/clear.css +43 -98
- {assets/images/themes/messenger → message-types/messenger/themes}/clear.png +0 -0
- {assets/css/messenger → message-types/messenger/themes}/social.css +54 -92
- {assets/images/themes/messenger → message-types/messenger/themes}/social.png +0 -0
- {assets/css/messenger → message-types/messenger/themes}/talk.css +43 -93
- {assets/images/themes/messenger → message-types/messenger/themes}/talk.png +0 -0
- message-types/popup/default.css +68 -0
- message-types/popup/images/chosen-sprite.png +0 -0
- message-types/popup/images/close_big.png +0 -0
- {assets → message-types/popup}/images/popup-amaze-bg.jpg +0 -0
- message-types/popup/images/popup-close.png +0 -0
- message-types/popup/main.js +94 -0
- message-types/popup/main.php +54 -0
- {assets/css/popup → message-types/popup/themes}/air-mail.css +11 -28
- {assets/images/themes/popup → message-types/popup/themes}/air-mail.png +0 -0
- {assets/css/popup → message-types/popup/themes}/amaze.css +14 -44
- {assets/images/themes/popup → message-types/popup/themes}/amaze.png +0 -0
- {assets/css/popup → message-types/popup/themes}/compel.css +10 -26
- {assets/images/themes/popup → message-types/popup/themes}/compel.png +0 -0
- message-types/popup/themes/convert.css +59 -0
- {assets/images/themes/popup → message-types/popup/themes}/convert.png +0 -0
- message-types/popup/themes/inspire.css +55 -0
- {assets/images/themes/popup → message-types/popup/themes}/inspire.png +0 -0
- {assets/css/popup → message-types/popup/themes}/persuade.css +9 -40
- {assets/images/themes/popup → message-types/popup/themes}/persuade.png +0 -0
- message-types/toast/default.css +236 -0
- {assets → message-types/toast}/images/stand-out.png +0 -0
- {assets → message-types/toast}/images/toast-glow.png +0 -0
- message-types/toast/main.js +86 -0
- message-types/toast/main.php +42 -0
- {assets/css/toast → message-types/toast/themes}/announce.css +9 -35
- {assets/images/themes/toast → message-types/toast/themes}/announce.png +0 -0
- message-types/toast/themes/balance.css +21 -0
- {assets/images/themes/toast → message-types/toast/themes}/balance.png +0 -0
- {assets/css/toast → message-types/toast/themes}/burnt.css +26 -41
- {assets/images/themes/toast → message-types/toast/themes}/burnt.png +0 -0
- message-types/toast/themes/clear.css +25 -0
- {assets/images/themes/toast → message-types/toast/themes}/clear.png +0 -0
- {assets/css/toast → message-types/toast/themes}/night-glow.css +7 -28
- {assets/images/themes/toast → message-types/toast/themes}/night-glow.png +0 -0
- {assets/css/toast → message-types/toast/themes}/stand-out.css +10 -24
- {assets/images/themes/toast → message-types/toast/themes}/stand-out.png +0 -0
- readme.txt +18 -5
- settings.php +30 -0
- templates/action-bar.php +0 -22
- templates/messenger.php +0 -22
- templates/popup.php +0 -16
- templates/toast.php +0 -16
- updates/icegram-update-1.2.php +70 -0
- wpml-config.xml +6 -0
about-icegram.php
CHANGED
@@ -3,21 +3,20 @@
|
|
3 |
* About Icegram
|
4 |
*/
|
5 |
|
6 |
-
|
|
|
|
|
7 |
add_action( 'admin_footer', 'icegram_support_ticket_content' );
|
8 |
|
9 |
function icegram_support_ticket_content() {
|
10 |
-
global $current_user, $pagenow, $typenow;
|
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" && !empty($_POST['client_email'])){
|
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 );
|
@@ -150,6 +149,7 @@ function icegram_support_ticket_content() {
|
|
150 |
<td><input type="submit" class="button" id="icegram_submit_query" name="submit_query" value="Send" /></td>
|
151 |
</tr>
|
152 |
</table>
|
|
|
153 |
</form>
|
154 |
</div>
|
155 |
<?php
|
@@ -163,8 +163,7 @@ if ( !wp_script_is( 'thickbox' ) ) {
|
|
163 |
}
|
164 |
|
165 |
?>
|
166 |
-
<div class="wrap about-wrap icegram">
|
167 |
-
|
168 |
<h1><?php _e( "Welcome to Icegram", "icegram" ); ?></h1>
|
169 |
<div class="about-text icegram-about-text">
|
170 |
<?php _e( "Your sample campaign is ready. We've added a few messages for you to test.", "icegram" )?>
|
@@ -172,38 +171,40 @@ if ( !wp_script_is( 'thickbox' ) ) {
|
|
172 |
$sample_id = get_option('icegram_sample_data_imported');
|
173 |
$view_campaign = admin_url( 'post.php?post='.$sample_id[0].'&action=edit' );
|
174 |
$preview_url = home_url('?campaign_preview_id='.$sample_id[0]);
|
175 |
-
$assets_base = $
|
176 |
?>
|
177 |
<p class="icegram-actions">
|
178 |
<a class="button button-primary button-large" href="<?php echo $view_campaign ; ?>"><?php _e( 'Edit & Publish it', 'icegram' ); ?></a>
|
179 |
<?php _e( "OR", "icegram")?>
|
180 |
<b><a href="<?php echo $preview_url; ?>" target="_blank"><?php _e( 'Preview Campaign', 'icegram' ); ?></a></b>
|
181 |
</p>
|
182 |
-
|
183 |
</div>
|
184 |
|
185 |
<div class="icegram-badge">
|
186 |
-
<?php printf(__( "Version: %s", "icegram"),
|
187 |
</div>
|
188 |
<div class="icegram-support">
|
189 |
<?php _e( 'Questions? Need Help?', "icegram" ); ?>
|
190 |
-
<div id="icegram-contact-us" class="icegram-contact-us"><a
|
191 |
</div>
|
192 |
<hr>
|
193 |
<div class="changelog">
|
194 |
|
|
|
|
|
|
|
|
|
195 |
<div class="about-text">
|
196 |
<?php _e("Do read Icegram's core concepts below to understand how you can use Icegram to inspire, convert and engage your audience.", "icegram"); ?>
|
197 |
</div>
|
198 |
|
199 |
<div class="feature-section col three-col">
|
200 |
-
<div class="col-1">
|
201 |
-
|
202 |
<h2 class="icegram-dashicons dashicons-testimonial"><?php _e( "Messages", "icegram" ); ?></h2>
|
203 |
-
<!--<img src="//s.w.org/images/core/3.9/editor.jpg?0">-->
|
204 |
<p><?php _e("A 'Message' is a communication you want to deliver to your audience.","icegram"); ?></p>
|
205 |
<p><?php _e("And Icegram comes with not one, but four message types.","icegram"); ?></p>
|
206 |
<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.","icegram"); ?></p>
|
|
|
207 |
</div>
|
208 |
<div class="col-2">
|
209 |
<h4><?php _e("Action Bar", "icegram"); ?></h4>
|
@@ -212,6 +213,7 @@ if ( !wp_script_is( 'thickbox' ) ) {
|
|
212 |
<h4><?php _e("Messenger", "icegram"); ?></h4>
|
213 |
<img src="<?php echo $assets_base; ?>/sketch-messenger.png" width="180" height="145">
|
214 |
<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.", "icegram"); ?></p>
|
|
|
215 |
</div>
|
216 |
<div class="col-3 last-feature">
|
217 |
<h4><?php _e("Toast Notification", "icegram"); ?></h4>
|
@@ -220,11 +222,12 @@ if ( !wp_script_is( 'thickbox' ) ) {
|
|
220 |
<h4><?php _e("Popup", "icegram"); ?></h4>
|
221 |
<img src="<?php echo $assets_base; ?>/sketch-popup.png" width="180" height="145">
|
222 |
<p><?php _e("Lightbox popup windows are most widely used for lead capture, promotions and additional content display. Ask visitors to sign up to your newsletter, or like you on social networks, or tell them about a special offer...", "icegram"); ?></p>
|
223 |
-
|
224 |
</div>
|
225 |
-
</div>
|
226 |
-
|
227 |
<hr>
|
|
|
|
|
228 |
|
229 |
<div class="feature-section col three-col">
|
230 |
<div class="col-1">
|
@@ -232,21 +235,25 @@ if ( !wp_script_is( 'thickbox' ) ) {
|
|
232 |
<p><?php _e("Campaign = Messages + Rules", "icegram"); ?></p>
|
233 |
<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.", "icegram"); ?></p>
|
234 |
<p><?php _e("You can always preview your campaign to ensure campaign works the way you want, before making it live.", "icegram"); ?></p>
|
|
|
235 |
</div>
|
236 |
<div class="col-2">
|
237 |
<h4><?php _e("Multiple Messages & Sequencing", "icegram"); ?></h4>
|
238 |
<img src="<?php echo $assets_base; ?>/sketch-multiple-sequence.png" width="180" height="145">
|
239 |
<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.", "icegram"); ?></p>
|
|
|
240 |
</div>
|
241 |
<div class="col-3 last-feature">
|
242 |
<h4><?php _e("Targeting Rules", "icegram"); ?></h4>
|
243 |
<img src="<?php echo $assets_base; ?>/sketch-rules.png" width="180" height="145">
|
244 |
<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.", "icegram"); ?></p>
|
|
|
245 |
</div>
|
246 |
</div>
|
247 |
|
248 |
-
|
249 |
-
|
|
|
250 |
<div class="feature-section col two-col">
|
251 |
<div class="col-1">
|
252 |
<h2 class="icegram-dashicons dashicons-editor-help"><?php _e("FAQ / Common Problems", "icegram"); ?></h2>
|
@@ -263,6 +270,8 @@ if ( !wp_script_is( 'thickbox' ) ) {
|
|
263 |
<h4><?php _e("Optin Forms / Mailing service integration...", "icegram"); ?></h4>
|
264 |
<p><?php _e("You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.", "icegram"); ?></p>
|
265 |
|
|
|
|
|
266 |
</div>
|
267 |
<div class="col-2 last-feature">
|
268 |
<h4><?php _e("Preview does not work / not refreshing...", "icegram"); ?></h4>
|
@@ -276,14 +285,13 @@ if ( !wp_script_is( 'thickbox' ) ) {
|
|
276 |
<p><?php _e("Icegram is actively developed. If you can't find your favorite feature (or have a suggestion) contact us. We'd love to hear from you.", "icegram"); ?></p>
|
277 |
|
278 |
<h4><?php _e("I'm facing a problem and can't find a way out...", "icegram"); ?></h4>
|
279 |
-
<p><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=
|
280 |
|
281 |
-
|
282 |
-
<p><?php _e("", "icegram"); ?></p>
|
283 |
</div>
|
284 |
</div>
|
285 |
|
|
|
286 |
|
287 |
-
</div>
|
288 |
-
|
289 |
-
</div>
|
3 |
* About Icegram
|
4 |
*/
|
5 |
|
6 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
7 |
+
|
8 |
+
// Actions for support
|
9 |
add_action( 'admin_footer', 'icegram_support_ticket_content' );
|
10 |
|
11 |
function icegram_support_ticket_content() {
|
12 |
+
global $current_user, $pagenow, $typenow, $icegram;
|
13 |
|
14 |
if ( $pagenow != 'edit.php' ) return;
|
15 |
+
if ( $typenow != 'ig_campaign') return;
|
|
|
|
|
16 |
if ( !( $current_user instanceof WP_User ) ) return;
|
17 |
|
18 |
if( isset( $_POST['submit_query'] ) && $_POST['submit_query'] == "Send" && !empty($_POST['client_email'])){
|
19 |
|
|
|
20 |
$additional_info = ( isset( $_POST['additional_information'] ) && !empty( $_POST['additional_information'] ) ) ? sanitize_text_field( $_POST['additional_information'] ) : '';
|
21 |
$additional_info = str_replace( '###', '<br />', $additional_info );
|
22 |
$additional_info = str_replace( array( '[', ']' ), '', $additional_info );
|
149 |
<td><input type="submit" class="button" id="icegram_submit_query" name="submit_query" value="Send" /></td>
|
150 |
</tr>
|
151 |
</table>
|
152 |
+
<input type="hidden" id="current_plugin" name="additional_info[current_plugin]" value="Icegram <?php echo $icegram->version; ?>" />
|
153 |
</form>
|
154 |
</div>
|
155 |
<?php
|
163 |
}
|
164 |
|
165 |
?>
|
166 |
+
<div class="wrap about-wrap icegram">
|
|
|
167 |
<h1><?php _e( "Welcome to Icegram", "icegram" ); ?></h1>
|
168 |
<div class="about-text icegram-about-text">
|
169 |
<?php _e( "Your sample campaign is ready. We've added a few messages for you to test.", "icegram" )?>
|
171 |
$sample_id = get_option('icegram_sample_data_imported');
|
172 |
$view_campaign = admin_url( 'post.php?post='.$sample_id[0].'&action=edit' );
|
173 |
$preview_url = home_url('?campaign_preview_id='.$sample_id[0]);
|
174 |
+
$assets_base = $this->plugin_url . '/assets/images/';
|
175 |
?>
|
176 |
<p class="icegram-actions">
|
177 |
<a class="button button-primary button-large" href="<?php echo $view_campaign ; ?>"><?php _e( 'Edit & Publish it', 'icegram' ); ?></a>
|
178 |
<?php _e( "OR", "icegram")?>
|
179 |
<b><a href="<?php echo $preview_url; ?>" target="_blank"><?php _e( 'Preview Campaign', 'icegram' ); ?></a></b>
|
180 |
</p>
|
|
|
181 |
</div>
|
182 |
|
183 |
<div class="icegram-badge">
|
184 |
+
<?php printf(__( "Version: %s", "icegram"), $this->version ); ?>
|
185 |
</div>
|
186 |
<div class="icegram-support">
|
187 |
<?php _e( 'Questions? Need Help?', "icegram" ); ?>
|
188 |
+
<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=ig_campaign" ?>"><?php _e("Contact Us", "icegram"); ?></a></div>
|
189 |
</div>
|
190 |
<hr>
|
191 |
<div class="changelog">
|
192 |
|
193 |
+
<?php do_action('icegram_about_changelog'); ?>
|
194 |
+
|
195 |
+
<hr>
|
196 |
+
|
197 |
<div class="about-text">
|
198 |
<?php _e("Do read Icegram's core concepts below to understand how you can use Icegram to inspire, convert and engage your audience.", "icegram"); ?>
|
199 |
</div>
|
200 |
|
201 |
<div class="feature-section col three-col">
|
202 |
+
<div class="col-1">
|
|
|
203 |
<h2 class="icegram-dashicons dashicons-testimonial"><?php _e( "Messages", "icegram" ); ?></h2>
|
|
|
204 |
<p><?php _e("A 'Message' is a communication you want to deliver to your audience.","icegram"); ?></p>
|
205 |
<p><?php _e("And Icegram comes with not one, but four message types.","icegram"); ?></p>
|
206 |
<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.","icegram"); ?></p>
|
207 |
+
<?php do_action('icegram_about_after_core_message_types_col1'); ?>
|
208 |
</div>
|
209 |
<div class="col-2">
|
210 |
<h4><?php _e("Action Bar", "icegram"); ?></h4>
|
213 |
<h4><?php _e("Messenger", "icegram"); ?></h4>
|
214 |
<img src="<?php echo $assets_base; ?>/sketch-messenger.png" width="180" height="145">
|
215 |
<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.", "icegram"); ?></p>
|
216 |
+
<?php do_action('icegram_about_after_core_message_types_col2'); ?>
|
217 |
</div>
|
218 |
<div class="col-3 last-feature">
|
219 |
<h4><?php _e("Toast Notification", "icegram"); ?></h4>
|
222 |
<h4><?php _e("Popup", "icegram"); ?></h4>
|
223 |
<img src="<?php echo $assets_base; ?>/sketch-popup.png" width="180" height="145">
|
224 |
<p><?php _e("Lightbox popup windows are most widely used for lead capture, promotions and additional content display. Ask visitors to sign up to your newsletter, or like you on social networks, or tell them about a special offer...", "icegram"); ?></p>
|
225 |
+
<?php do_action('icegram_about_after_core_message_types_col3'); ?>
|
226 |
</div>
|
227 |
+
</div>
|
|
|
228 |
<hr>
|
229 |
+
|
230 |
+
<?php do_action('icegram_about_after_core_message_types'); ?>
|
231 |
|
232 |
<div class="feature-section col three-col">
|
233 |
<div class="col-1">
|
235 |
<p><?php _e("Campaign = Messages + Rules", "icegram"); ?></p>
|
236 |
<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.", "icegram"); ?></p>
|
237 |
<p><?php _e("You can always preview your campaign to ensure campaign works the way you want, before making it live.", "icegram"); ?></p>
|
238 |
+
<?php do_action('icegram_about_after_core_campaigns_col1'); ?>
|
239 |
</div>
|
240 |
<div class="col-2">
|
241 |
<h4><?php _e("Multiple Messages & Sequencing", "icegram"); ?></h4>
|
242 |
<img src="<?php echo $assets_base; ?>/sketch-multiple-sequence.png" width="180" height="145">
|
243 |
<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.", "icegram"); ?></p>
|
244 |
+
<?php do_action('icegram_about_after_core_campaigns_col2'); ?>
|
245 |
</div>
|
246 |
<div class="col-3 last-feature">
|
247 |
<h4><?php _e("Targeting Rules", "icegram"); ?></h4>
|
248 |
<img src="<?php echo $assets_base; ?>/sketch-rules.png" width="180" height="145">
|
249 |
<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.", "icegram"); ?></p>
|
250 |
+
<?php do_action('icegram_about_after_core_campaigns_col3'); ?>
|
251 |
</div>
|
252 |
</div>
|
253 |
|
254 |
+
<?php do_action('icegram_about_after_core_campaigns'); ?>
|
255 |
+
|
256 |
+
<hr>
|
257 |
<div class="feature-section col two-col">
|
258 |
<div class="col-1">
|
259 |
<h2 class="icegram-dashicons dashicons-editor-help"><?php _e("FAQ / Common Problems", "icegram"); ?></h2>
|
270 |
<h4><?php _e("Optin Forms / Mailing service integration...", "icegram"); ?></h4>
|
271 |
<p><?php _e("You can embed any optin / subscription form to your Icegram messages using HTML code. You may even use a shortcode if you are using a WP plugin from your newsletter / lead capture service.", "icegram"); ?></p>
|
272 |
|
273 |
+
<?php do_action('icegram_about_after_faq_col1'); ?>
|
274 |
+
|
275 |
</div>
|
276 |
<div class="col-2 last-feature">
|
277 |
<h4><?php _e("Preview does not work / not refreshing...", "icegram"); ?></h4>
|
285 |
<p><?php _e("Icegram is actively developed. If you can't find your favorite feature (or have a suggestion) contact us. We'd love to hear from you.", "icegram"); ?></p>
|
286 |
|
287 |
<h4><?php _e("I'm facing a problem and can't find a way out...", "icegram"); ?></h4>
|
288 |
+
<p><a class="thickbox" href="<?php echo admin_url() . "#TB_inline?inlineId=icegram_post_query_form&post_type=ig_campaign" ?>"><?php _e("Contact Us", "icegram"); ?></a><?php _e(", provide as much detail of the problem as you can. We will try to solve the problem ASAP.", "icegram"); ?></p>
|
289 |
|
290 |
+
<?php do_action('icegram_about_after_faq_col2'); ?>
|
|
|
291 |
</div>
|
292 |
</div>
|
293 |
|
294 |
+
<?php do_action('icegram_about_after_faq'); ?>
|
295 |
|
296 |
+
</div>
|
297 |
+
</div>
|
|
assets/css/action-bar/solid.css
DELETED
@@ -1,65 +0,0 @@
|
|
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
CHANGED
@@ -68,6 +68,10 @@ th.message_header {
|
|
68 |
|
69 |
.message_title {
|
70 |
text-align: left;
|
|
|
|
|
|
|
|
|
71 |
padding-left: 1.2em;
|
72 |
}
|
73 |
|
@@ -117,8 +121,7 @@ th.message_header {
|
|
117 |
margin: 0 2px;
|
118 |
}
|
119 |
|
120 |
-
.campaign_preview
|
121 |
-
.message_preview {
|
122 |
float: right;
|
123 |
margin-right: 1em !important;
|
124 |
}
|
@@ -227,22 +230,6 @@ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer
|
|
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%;
|
@@ -258,7 +245,7 @@ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer
|
|
258 |
content: "\f128";
|
259 |
}
|
260 |
|
261 |
-
.
|
262 |
content: "\f130";
|
263 |
}
|
264 |
|
@@ -368,47 +355,17 @@ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer
|
|
368 |
.message_theme + .chosen-container.chosen-container .chosen-results {
|
369 |
max-height: 30em !important;
|
370 |
}
|
371 |
-
|
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 |
-
|
405 |
-
|
406 |
-
.message_theme + .chosen-container .chosen-results li
|
407 |
-
|
408 |
-
|
409 |
-
background-
|
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;
|
@@ -416,37 +373,10 @@ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer
|
|
416 |
background-repeat: no-repeat !important;
|
417 |
}
|
418 |
|
419 |
-
.
|
420 |
-
|
421 |
-
|
422 |
-
|
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 ************/
|
68 |
|
69 |
.message_title {
|
70 |
text-align: left;
|
71 |
+
}
|
72 |
+
|
73 |
+
.message_headline {
|
74 |
+
text-align: left;
|
75 |
padding-left: 1.2em;
|
76 |
}
|
77 |
|
121 |
margin: 0 2px;
|
122 |
}
|
123 |
|
124 |
+
.campaign_preview {
|
|
|
125 |
float: right;
|
126 |
margin-right: 1em !important;
|
127 |
}
|
230 |
text-transform: uppercase;
|
231 |
}
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
.message_label {
|
234 |
float: left;
|
235 |
width: 25%;
|
245 |
content: "\f128";
|
246 |
}
|
247 |
|
248 |
+
.message_headline_button .headline-buttons-icon:before {
|
249 |
content: "\f130";
|
250 |
}
|
251 |
|
355 |
.message_theme + .chosen-container.chosen-container .chosen-results {
|
356 |
max-height: 30em !important;
|
357 |
}
|
358 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
.message_theme + .chosen-container-single .chosen-single span {
|
360 |
background-repeat: no-repeat !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
background-position: 100% 50% !important;
|
362 |
+
}
|
363 |
+
|
364 |
+
.message_theme + .chosen-container .chosen-results li {
|
365 |
+
margin: 0% 0% 2% 2%;
|
366 |
+
background-position: 0.5em 2em !important;
|
367 |
+
-webkit-background-size: 95% !important;
|
368 |
+
background-size: 95% !important;
|
|
|
369 |
border: 2px solid #EEE !important;
|
370 |
font-weight: 700 !important;
|
371 |
display: inline-block !important;
|
373 |
background-repeat: no-repeat !important;
|
374 |
}
|
375 |
|
376 |
+
.message_theme + .chosen-container .chosen-results li.highlighted {
|
377 |
+
color: #000 !important;
|
378 |
+
border: 2px solid #2ea2cc !important;
|
379 |
+
background-color: #EAEFFF !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
}
|
381 |
|
382 |
/************* jQuery TipTip ************/
|
assets/css/frontend.css
CHANGED
@@ -1,273 +1,8 @@
|
|
1 |
-
|
2 |
-
|
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 {
|
@@ -275,6 +10,7 @@ div.icegram form {
|
|
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;
|
@@ -282,17 +18,6 @@ div.icegram input, div.icegram label {
|
|
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%;
|
@@ -412,10 +137,4 @@ only screen and (min-device-pixel-ratio : 1.5) {
|
|
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 |
}
|
1 |
+
/* Powered By link */
|
2 |
+
.powered_by, .powered_by a, a.powered_by {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
color: #A8A8A8 !important;
|
4 |
text-decoration: none;
|
5 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
/* Forms */
|
8 |
div.icegram form {
|
10 |
-moz-box-sizing: border-box;
|
11 |
-webkit-box-sizing: border-box;
|
12 |
}
|
13 |
+
|
14 |
div.icegram input, div.icegram label {
|
15 |
margin: .2em .2em .2em .5em;
|
16 |
box-sizing: border-box;
|
18 |
-webkit-box-sizing: border-box;
|
19 |
vertical-align: middle !important;
|
20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/*
|
22 |
div.icegram input[type="submit"], div.icegram input[type="button"], div.icegram input[type="button"] {
|
23 |
font-size: 100%;
|
137 |
.canvas.popup_box {
|
138 |
max-width: 90%;
|
139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
}
|
assets/css/jquery-ui.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.11.0 - 2014-07-18
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, 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 |
+
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("../images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("../images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("../images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("../images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("../images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("../images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("../images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("../images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("../images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("../images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("../images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("../images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("../images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("../images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("../images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("../images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("../images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
|
assets/css/messenger/canvas.css
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
.canvas.popup_box {
|
2 |
-
display: block;
|
3 |
-
position: fixed;
|
4 |
-
cursor: pointer;
|
5 |
-
z-index: 100000;
|
6 |
-
margin: 0;
|
7 |
-
padding: 0;
|
8 |
-
max-height: 90%;
|
9 |
-
}
|
10 |
-
|
11 |
-
.canvas .popup_box_main {
|
12 |
-
border: 1px solid #BFBFBF;
|
13 |
-
margin: 10px;
|
14 |
-
padding: 10px;
|
15 |
-
overflow: hidden;
|
16 |
-
-webkit-box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.135);
|
17 |
-
box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.13);
|
18 |
-
background: #FFF;
|
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/popup/convert.css
DELETED
@@ -1,89 +0,0 @@
|
|
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
DELETED
@@ -1,82 +0,0 @@
|
|
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/toast/balance.css
DELETED
@@ -1,50 +0,0 @@
|
|
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/clear.css
DELETED
@@ -1,67 +0,0 @@
|
|
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/images/animated-overlay.gif
ADDED
Binary file
|
assets/images/close_big.png
CHANGED
Binary file
|
assets/images/desktop.png
CHANGED
Binary file
|
assets/images/icegram-logo-branding-64-grey.png
CHANGED
Binary file
|
assets/images/icegram-logo-branding-64.png
CHANGED
Binary file
|
assets/images/sketch-messenger.png
CHANGED
Binary file
|
assets/images/sketch-multiple-sequence.png
CHANGED
Binary file
|
assets/images/sketch-popup.png
CHANGED
Binary file
|
assets/images/sketch-rules.png
CHANGED
Binary file
|
assets/images/sketch-toast-notification.png
CHANGED
Binary file
|
assets/images/ui-bg_flat_0_aaaaaa_40x100.png
ADDED
Binary file
|
assets/images/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
assets/images/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
Binary file
|
assets/images/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
assets/images/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
assets/images/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
assets/images/ui-bg_glass_95_fef1ec_1x400.png
ADDED
Binary file
|
assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
assets/images/ui-icons_222222_256x240.png
ADDED
Binary file
|
assets/images/ui-icons_2e83ff_256x240.png
ADDED
Binary file
|
assets/images/ui-icons_454545_256x240.png
ADDED
Binary file
|
assets/images/ui-icons_888888_256x240.png
ADDED
Binary file
|
assets/images/ui-icons_cd0a0a_256x240.png
ADDED
Binary file
|
assets/js/admin.js
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
jQuery(function() {
|
2 |
|
3 |
-
var preview_block;
|
4 |
function display_message_themes(this_data) {
|
5 |
-
var message_type
|
6 |
-
var message_theme
|
|
|
7 |
|
8 |
jQuery(this_data).find('.message_row, .location').hide();
|
9 |
-
jQuery(this_data).find('.' + message_type
|
10 |
-
jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
}
|
12 |
|
13 |
function get_random_int(current, min, max) {
|
@@ -19,11 +25,14 @@ jQuery(function() {
|
|
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');
|
@@ -39,26 +48,28 @@ jQuery(function() {
|
|
39 |
|
40 |
jQuery('.message-setting-fields').live('change', '.message_theme', function() {
|
41 |
|
42 |
-
var message_type
|
43 |
-
var message_theme
|
|
|
44 |
|
45 |
-
jQuery(this).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').
|
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('.
|
60 |
var headline_key = jQuery(this).prev().attr('data-headline');
|
61 |
-
var headline_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 );
|
@@ -191,22 +202,6 @@ jQuery(function() {
|
|
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 |
});
|
1 |
jQuery(function() {
|
2 |
|
|
|
3 |
function display_message_themes(this_data) {
|
4 |
+
var message_type = jQuery(this_data).find('.message_type option:selected').val();
|
5 |
+
var message_theme = jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').val();
|
6 |
+
var message_thumb = jQuery(this_data).find('#message_theme_'+message_type).find('.'+message_theme).attr('style');
|
7 |
|
8 |
jQuery(this_data).find('.message_row, .location').hide();
|
9 |
+
jQuery(this_data).find('.' + message_type).show();
|
10 |
+
jQuery(this_data).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').attr('style',message_thumb);
|
11 |
+
|
12 |
+
if( jQuery(this_data).find('.message_body').parent().css('display') !== 'block' ) {
|
13 |
+
jQuery(this_data).find('.message_body').parent().next('.wp-editor-wrap').hide();
|
14 |
+
} else {
|
15 |
+
jQuery(this_data).find('.message_body').parent().next('.wp-editor-wrap').show();
|
16 |
+
}
|
17 |
}
|
18 |
|
19 |
function get_random_int(current, min, max) {
|
25 |
}
|
26 |
}
|
27 |
|
28 |
+
// Type box
|
29 |
+
jQuery('#campaign_data').find('h3.hndle').hide();
|
30 |
+
jQuery('.target_rules_desc').appendTo( '#campaign_target_rules h3.hndle span' );
|
31 |
+
|
32 |
jQuery(document).ready(function() {
|
33 |
var original_send_to_editor = window.send_to_editor;
|
34 |
|
35 |
jQuery('#postdivrich').hide();
|
|
|
36 |
jQuery('.color-field').wpColorPicker();
|
37 |
hide_empty_campaign_message();
|
38 |
jQuery('.message_edit:first').trigger('click');
|
48 |
|
49 |
jQuery('.message-setting-fields').live('change', '.message_theme', function() {
|
50 |
|
51 |
+
var message_type = jQuery(this).find('.message_type').val();
|
52 |
+
var message_theme = jQuery(this).find('.message_row.'+message_type).find('.message_theme').val();
|
53 |
+
var message_thumb = jQuery(this).find('#message_theme_'+message_type).find('.'+message_theme).attr('style');
|
54 |
|
55 |
+
jQuery(this).find('.message_row.'+message_type).find('.message_theme').next().find('.chosen-single span').attr('style',message_thumb);
|
56 |
|
57 |
});
|
58 |
|
59 |
jQuery('.message_image_button').live('click', function(event) {
|
60 |
+
var that = this;
|
61 |
window.send_to_editor = function(html) {
|
62 |
imgurl = jQuery('img', html).attr('src');
|
63 |
+
jQuery(that).parent().find('#upload_image').val(imgurl);
|
64 |
tb_remove();
|
65 |
window.send_to_editor = original_send_to_editor;
|
66 |
};
|
67 |
return false;
|
68 |
});
|
69 |
|
70 |
+
jQuery('.message_headline_button').live('click', function() {
|
71 |
var headline_key = jQuery(this).prev().attr('data-headline');
|
72 |
+
var headline_max = icegram_writepanel_params.available_headlines.length;
|
73 |
var new_headline_key = get_random_int( headline_key, 0, headline_max );
|
74 |
var new_headline = icegram_writepanel_params.available_headlines[ new_headline_key ];
|
75 |
jQuery(this).prev().val( new_headline );
|
202 |
|
203 |
});
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
jQuery("select.icegram_chosen_page").chosen({
|
206 |
disable_search_threshold: 10
|
207 |
});
|
assets/js/frontend.js
DELETED
@@ -1,504 +0,0 @@
|
|
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/icegram.js
ADDED
@@ -0,0 +1,349 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Icegram JS class
|
3 |
+
* Initialize, run and manage all messages
|
4 |
+
* Public interface
|
5 |
+
**/
|
6 |
+
function Icegram( ) {
|
7 |
+
var data, defaults, message_data, messages, map_id_to_index, map_type_to_index,
|
8 |
+
timer, message_template_cache;
|
9 |
+
var tracking_data, powered_by;
|
10 |
+
}
|
11 |
+
|
12 |
+
Icegram.prototype.init = function ( data ) {
|
13 |
+
this.data = data;
|
14 |
+
this.defaults = jQuery.extend( {}, data.defaults );
|
15 |
+
this.message_data = data.messages;
|
16 |
+
this.messages, this.tracking_data = [];
|
17 |
+
this.message_template_cache = {};
|
18 |
+
this.map_id_to_index = {};
|
19 |
+
this.map_type_to_index = {};
|
20 |
+
this.powered_by = { link: 'http://www.icegram.com/?utm_source=inapp&utm_campaign=poweredby&utm_medium=' };
|
21 |
+
//this.timer = setInterval( this.timer_tick, 1000 );
|
22 |
+
|
23 |
+
// Add powered by properties
|
24 |
+
this.powered_by.text = this.defaults.powered_by_text;
|
25 |
+
this.powered_by.logo = this.defaults.powered_by_logo;
|
26 |
+
|
27 |
+
// Add container div for Icegram
|
28 |
+
jQuery('body').append('<div id="icegram_messages_container"></div>');
|
29 |
+
|
30 |
+
// Loop over message data and create messages & maps
|
31 |
+
var i = 0;
|
32 |
+
this.messages = [];
|
33 |
+
var self = this;
|
34 |
+
jQuery.each( this.message_data, function ( i, v ) {
|
35 |
+
var m = null;
|
36 |
+
var classname_suffix = v['type'].split('-').join(' ').ucwords().split(' ').join('_');
|
37 |
+
if (typeof (window['Icegram_Message_Type_' + classname_suffix]) === 'function') {
|
38 |
+
m = new window['Icegram_Message_Type_' + classname_suffix]( v );
|
39 |
+
} else {
|
40 |
+
m = new Icegram_Message_Type( v );
|
41 |
+
}
|
42 |
+
self.messages.push( m );
|
43 |
+
self.map_id_to_index['_'+v['id'] ] = i;
|
44 |
+
self.map_type_to_index[ v['type'] ] = jQuery.isArray(self.map_type_to_index[ v['type'] ]) ? self.map_type_to_index[ v['type'] ] : new Array();
|
45 |
+
self.map_type_to_index[ v['type'] ].push(i);
|
46 |
+
});
|
47 |
+
|
48 |
+
// Submit event data on unload...
|
49 |
+
jQuery( window ).unload( function() {
|
50 |
+
if (typeof(window.icegram.submit_tracking_data) === 'function') {
|
51 |
+
window.icegram.submit_tracking_data();
|
52 |
+
}
|
53 |
+
} );
|
54 |
+
};
|
55 |
+
|
56 |
+
|
57 |
+
Icegram.prototype.timer_tick = function ( ) {
|
58 |
+
|
59 |
+
};
|
60 |
+
|
61 |
+
// Message template cache - get / set
|
62 |
+
Icegram.prototype.get_template_fn = function ( type ) {
|
63 |
+
return this.message_template_cache[ type ];
|
64 |
+
};
|
65 |
+
Icegram.prototype.set_template_fn = function ( type, fn ) {
|
66 |
+
this.message_template_cache[ type ] = fn;
|
67 |
+
};
|
68 |
+
|
69 |
+
// Utility functions to get message instances
|
70 |
+
Icegram.prototype.get_message = function ( index ) {
|
71 |
+
if (this.messages.length > index) {
|
72 |
+
return this.messages[ index ];
|
73 |
+
}
|
74 |
+
return undefined;
|
75 |
+
};
|
76 |
+
|
77 |
+
Icegram.prototype.get_message_by_id = function ( id ) {
|
78 |
+
if ( this.map_id_to_index.hasOwnProperty( '_'+id )) {
|
79 |
+
var index = this.map_id_to_index[ '_'+id ];
|
80 |
+
return this.get_message( index );
|
81 |
+
}
|
82 |
+
return undefined;
|
83 |
+
};
|
84 |
+
|
85 |
+
Icegram.prototype.get_messages_by_type = function ( type ) {
|
86 |
+
if ( this.map_type_to_index.hasOwnProperty( type )) {
|
87 |
+
var indices = this.map_type_to_index[ type ];
|
88 |
+
var matches = [];
|
89 |
+
if (jQuery.isArray( indices )) {
|
90 |
+
var self = this;
|
91 |
+
jQuery.each( indices, function ( i, v ) {
|
92 |
+
matches.push( self.get_message( v ) );
|
93 |
+
} );
|
94 |
+
}
|
95 |
+
return matches;
|
96 |
+
}
|
97 |
+
return undefined;
|
98 |
+
};
|
99 |
+
|
100 |
+
//Get powered by link
|
101 |
+
Icegram.prototype.get_powered_by = function ( type ) {
|
102 |
+
var res = jQuery.extend( {}, this.powered_by );
|
103 |
+
res.link = res.link + (type || '');
|
104 |
+
return res;
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
+
//Event tracking
|
109 |
+
Icegram.prototype.track = function ( ev, params ) {
|
110 |
+
if (typeof(params) === 'object' && params.hasOwnProperty('message_id') && params.hasOwnProperty('campaign_id')) {
|
111 |
+
this.tracking_data.push( { 'type': ev, 'params': params} );
|
112 |
+
}
|
113 |
+
}
|
114 |
+
Icegram.prototype.submit_tracking_data = function ( ev, params ) {
|
115 |
+
if (this.tracking_data.length > 0) {
|
116 |
+
jQuery.ajax({
|
117 |
+
method: 'POST',
|
118 |
+
url: this.data.ajax_url,
|
119 |
+
async: false,
|
120 |
+
data: {
|
121 |
+
action: 'icegram_event_track',
|
122 |
+
event_data: this.tracking_data
|
123 |
+
}
|
124 |
+
});
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Icegram Message Type - Base class
|
131 |
+
**/
|
132 |
+
function Icegram_Message_Type( data ) {
|
133 |
+
|
134 |
+
var data, template, dom_id, el, type, root_container;
|
135 |
+
|
136 |
+
this.root_container = "#icegram_messages_container";
|
137 |
+
this.data = data;
|
138 |
+
this.type = data.type;
|
139 |
+
this.data.delay_time = parseInt(this.data.delay_time);
|
140 |
+
|
141 |
+
this.set_template( this.get_template_default() );
|
142 |
+
this.init();
|
143 |
+
}
|
144 |
+
|
145 |
+
Icegram_Message_Type.prototype.init = function ( ) {
|
146 |
+
// Render HTML
|
147 |
+
this.render();
|
148 |
+
|
149 |
+
// Add handlers
|
150 |
+
this.add_event_handlers();
|
151 |
+
};
|
152 |
+
|
153 |
+
Icegram_Message_Type.prototype.add_event_handlers = function ( ) {
|
154 |
+
this.el.on('click', {self: this}, this.on_click);
|
155 |
+
jQuery( window ).on('resize' , {self: this} , this.on_resize);
|
156 |
+
}
|
157 |
+
|
158 |
+
Icegram_Message_Type.prototype.render = function ( ) {
|
159 |
+
|
160 |
+
this.pre_render();
|
161 |
+
|
162 |
+
var html = this.render_template();
|
163 |
+
|
164 |
+
// Add html to DOM, Setup dom_id, el etc.
|
165 |
+
jQuery(this.root_container).append(html);
|
166 |
+
this.dom_id = 'icegram_message_'+this.data.id;
|
167 |
+
this.el = jQuery('#'+this.dom_id);
|
168 |
+
|
169 |
+
this.set_position();
|
170 |
+
|
171 |
+
var pb = window.icegram.get_powered_by( this.type );
|
172 |
+
if ( pb.hasOwnProperty('link') && pb.hasOwnProperty('text') && pb.text != '' ) {
|
173 |
+
this.add_powered_by( pb );
|
174 |
+
}
|
175 |
+
|
176 |
+
// Hide elements if insufficient data...
|
177 |
+
if(this.data.headline == '') {
|
178 |
+
this.el.find('.ig_headline').hide();
|
179 |
+
}
|
180 |
+
if(this.data.icon == '') {
|
181 |
+
this.el.find('.ig_icon').hide();
|
182 |
+
}
|
183 |
+
if(this.data.message == '') {
|
184 |
+
this.el.find('.ig_message').hide();
|
185 |
+
}
|
186 |
+
if(this.data.label == '') {
|
187 |
+
this.el.find('.ig_button').hide();
|
188 |
+
}
|
189 |
+
|
190 |
+
this.post_render();
|
191 |
+
|
192 |
+
// Hide the message by default
|
193 |
+
this.hide( {}, true );
|
194 |
+
|
195 |
+
// Set up message display trigger
|
196 |
+
this.set_up_show_trigger();
|
197 |
+
}
|
198 |
+
|
199 |
+
Icegram_Message_Type.prototype.render_template = function ( ) {
|
200 |
+
if ( typeof(window.icegram.get_template_fn( this.type ) ) !== 'function') {
|
201 |
+
// Adapted from John Resig's Simple JavaScript Templating
|
202 |
+
window.icegram.set_template_fn( this.type, new Function("obj",
|
203 |
+
"var p=[],print=function(){p.push.apply(p,arguments);};" +
|
204 |
+
"with(obj){p.push('" +
|
205 |
+
this.template
|
206 |
+
.replace(/[\r\t\n]/g, " ")
|
207 |
+
.split("{{").join("\t")
|
208 |
+
.replace(/((^|\}\})[^\t]*)'/g, "$1\r")
|
209 |
+
.replace(/\t=(.*?)\}\}/g, "',$1,'")
|
210 |
+
.split("\t").join("');")
|
211 |
+
.split("}}").join("p.push('")
|
212 |
+
.split("\r").join("\\'")
|
213 |
+
+ "');}return p.join('');") );
|
214 |
+
}
|
215 |
+
return window.icegram.get_template_fn( this.type )( this.data );
|
216 |
+
};
|
217 |
+
|
218 |
+
Icegram_Message_Type.prototype.pre_render = function ( ) {
|
219 |
+
|
220 |
+
};
|
221 |
+
|
222 |
+
Icegram_Message_Type.prototype.post_render = function ( ) {
|
223 |
+
|
224 |
+
};
|
225 |
+
|
226 |
+
Icegram_Message_Type.prototype.set_up_show_trigger = function ( ) {
|
227 |
+
if (!isNaN(this.data.delay_time)) {
|
228 |
+
if( this.data.delay_time >= 0 ) {
|
229 |
+
var self = this;
|
230 |
+
this.timer = setTimeout( function() { self.show(); } , this.data.delay_time * 1000 );
|
231 |
+
}
|
232 |
+
} else {
|
233 |
+
this.show();
|
234 |
+
}
|
235 |
+
};
|
236 |
+
|
237 |
+
Icegram_Message_Type.prototype.set_template = function ( str ) {
|
238 |
+
this.template = str;
|
239 |
+
};
|
240 |
+
|
241 |
+
Icegram_Message_Type.prototype.get_template_default = function () {
|
242 |
+
return '<div id="icegram_message_{{=id}}" class="icegram">' +
|
243 |
+
'<div class="ig_headline">{{=headline}}</div>' +
|
244 |
+
'</div>';
|
245 |
+
};
|
246 |
+
|
247 |
+
Icegram_Message_Type.prototype.show = function ( options, silent ) {
|
248 |
+
if ( !this.is_visible() ) {
|
249 |
+
this.el.show( options );
|
250 |
+
silent !== true && this.track( 'shown' );
|
251 |
+
}
|
252 |
+
};
|
253 |
+
|
254 |
+
Icegram_Message_Type.prototype.hide = function ( options, silent ) {
|
255 |
+
if ( this.is_visible() ) {
|
256 |
+
this.el.hide( options );
|
257 |
+
silent !== true && this.track( 'closed' );
|
258 |
+
}
|
259 |
+
};
|
260 |
+
|
261 |
+
Icegram_Message_Type.prototype.set_position = function ( ) {
|
262 |
+
|
263 |
+
};
|
264 |
+
|
265 |
+
|
266 |
+
Icegram_Message_Type.prototype.add_powered_by = function ( pb ) {
|
267 |
+
|
268 |
+
};
|
269 |
+
|
270 |
+
// Event tracking wrapper
|
271 |
+
Icegram_Message_Type.prototype.track = function ( e, params ) {
|
272 |
+
if (typeof( window.icegram.track ) === 'function' ) {
|
273 |
+
params = params || {};
|
274 |
+
jQuery.extend( params, {message_id: this.data.id, campaign_id: this.data.campaign_id } );
|
275 |
+
window.icegram.track( e, params);
|
276 |
+
}
|
277 |
+
};
|
278 |
+
|
279 |
+
|
280 |
+
Icegram_Message_Type.prototype.is_visible = function ( ) {
|
281 |
+
return this.el.is(':visible');
|
282 |
+
};
|
283 |
+
|
284 |
+
// Click and other event handlers
|
285 |
+
Icegram_Message_Type.prototype.toggle = function ( options ) {
|
286 |
+
|
287 |
+
if ( this.is_visible() ) {
|
288 |
+
this.hide( options );
|
289 |
+
} else {
|
290 |
+
this.show( options );
|
291 |
+
};
|
292 |
+
};
|
293 |
+
|
294 |
+
Icegram_Message_Type.prototype.on_click = function ( e ) {
|
295 |
+
e.data = e.data || { self: this };
|
296 |
+
// Clicked on close button
|
297 |
+
if (jQuery(e.target).filter('.ig_close').length) {
|
298 |
+
e.data.self.hide();
|
299 |
+
return;
|
300 |
+
}
|
301 |
+
// Any other click is considered as CTA click
|
302 |
+
e.data.self.on_cta_click( e );
|
303 |
+
};
|
304 |
+
Icegram_Message_Type.prototype.on_resize = function ( e ) {
|
305 |
+
|
306 |
+
};
|
307 |
+
|
308 |
+
Icegram_Message_Type.prototype.on_cta_click = function ( e ) {
|
309 |
+
e.data = e.data || { self: this };
|
310 |
+
e.data.self.track( 'clicked' );
|
311 |
+
typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
|
312 |
+
};
|
313 |
+
|
314 |
+
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Utilities
|
318 |
+
*/
|
319 |
+
String.prototype.ucwords = function() {
|
320 |
+
return this.toLowerCase().replace(/\b[a-z]/g, function(letter) {
|
321 |
+
return letter.toUpperCase();
|
322 |
+
});
|
323 |
+
}
|
324 |
+
|
325 |
+
if (typeof Object.create != 'function') {
|
326 |
+
(function () {
|
327 |
+
var F = function () {};
|
328 |
+
Object.create = function (o) {
|
329 |
+
if (arguments.length > 1) {
|
330 |
+
throw Error('Second argument not supported');
|
331 |
+
}
|
332 |
+
if (o === null) {
|
333 |
+
throw Error('Cannot set a null [[Prototype]]');
|
334 |
+
}
|
335 |
+
if (typeof o != 'object') {
|
336 |
+
throw TypeError('Argument must be an object');
|
337 |
+
}
|
338 |
+
F.prototype = o;
|
339 |
+
return new F();
|
340 |
+
};
|
341 |
+
})();
|
342 |
+
}
|
343 |
+
|
344 |
+
// This is called onReady
|
345 |
+
jQuery(function() {
|
346 |
+
// FINALLY: Create object in window for later usage
|
347 |
+
window.icegram = new Icegram();
|
348 |
+
window.icegram.init( icegram_data );
|
349 |
+
});
|
classes/class-icegram-cache.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
|
4 |
+
if ( !class_exists( 'Icegram_Cache' ) ) {
|
5 |
+
|
6 |
+
/*
|
7 |
+
// Example usage
|
8 |
+
$cache = new Icegram_Cache('category', 14 * 86400);
|
9 |
+
$val = $cache->get( $key );
|
10 |
+
if ( $val === null ) {
|
11 |
+
// Not in cache, compute
|
12 |
+
$val = doyourprocess();
|
13 |
+
$cache->set( $key, $val );
|
14 |
+
}
|
15 |
+
// Now use the $val
|
16 |
+
|
17 |
+
function cleanup() {
|
18 |
+
$cache = new Icegram_Cache('category', 14 * 86400);
|
19 |
+
$cache->cleanup();
|
20 |
+
}
|
21 |
+
|
22 |
+
// For cleanup
|
23 |
+
wp_schedule_event( time(), 'daily', array($this, 'cleanup') );
|
24 |
+
*/
|
25 |
+
|
26 |
+
class Icegram_Cache {
|
27 |
+
|
28 |
+
var $base_dir;
|
29 |
+
var $expire_after;
|
30 |
+
var $enabled;
|
31 |
+
var $_group;
|
32 |
+
var $_hashes;
|
33 |
+
|
34 |
+
public function set( $key, $data ) {
|
35 |
+
if (!$this->enabled) return false;
|
36 |
+
$res = file_put_contents($this->_file( $key ), serialize($data));
|
37 |
+
return ( $res === false ) ? false : true;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function get( $key ) {
|
41 |
+
if (!$this->enabled) return null;
|
42 |
+
if ($this->_exists( $key )) {
|
43 |
+
return unserialize( file_get_contents( $this->_file( $key )));
|
44 |
+
}
|
45 |
+
return null;
|
46 |
+
}
|
47 |
+
|
48 |
+
public function delete( $key ) {
|
49 |
+
if (!$this->enabled) return true;
|
50 |
+
if ($this->_exists( $key )) {
|
51 |
+
return unlink( $this->_file( $key ) );
|
52 |
+
}
|
53 |
+
return true;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function cleanup( ) {
|
57 |
+
if (!$this->enabled) return true;
|
58 |
+
foreach (glob($this->base_dir . $this->_group . "*") as $filename) {
|
59 |
+
if (filemtime($filename) < time() - $this->expire_after) {
|
60 |
+
@unlink($filename);
|
61 |
+
}
|
62 |
+
}
|
63 |
+
return true;
|
64 |
+
}
|
65 |
+
|
66 |
+
private function _exists( $key ) {
|
67 |
+
return (is_file( $this->_file( $key ) ) );
|
68 |
+
}
|
69 |
+
|
70 |
+
private function _file( $key ) {
|
71 |
+
return $this->base_dir . $this->_group . '_' . $this->_hash( $key );
|
72 |
+
}
|
73 |
+
|
74 |
+
private function _hash( $key ) {
|
75 |
+
if (!array_key_exists($key, $this->_hashes)) {
|
76 |
+
$this->_hashes[ $key ] = md5($key);
|
77 |
+
}
|
78 |
+
return $this->_hashes[ $key ];
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
public function __construct( $group = '', $expire_after = 86400, $base_dir = '' ) {
|
83 |
+
|
84 |
+
$this->_group = sanitize_key($group);
|
85 |
+
$this->base_dir = $base_dir;
|
86 |
+
$this->expire_after = $expire_after;
|
87 |
+
$this->_hashes = array();
|
88 |
+
|
89 |
+
if (empty($this->base_dir)) {
|
90 |
+
$uploads = wp_upload_dir();
|
91 |
+
$uploads_base_dir = trailingslashit( $uploads['basedir'] );
|
92 |
+
$this->base_dir = $uploads_base_dir . 'igcache/';
|
93 |
+
}
|
94 |
+
|
95 |
+
if (!is_dir( $this->base_dir )) {
|
96 |
+
if ( false === mkdir( $this->base_dir ) ) {
|
97 |
+
$this->enabled = false;
|
98 |
+
return;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
$this->base_dir = trailingslashit( $this->base_dir );
|
102 |
+
$this->enabled = true;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
}
|
classes/class-icegram-campaign-admin.php
ADDED
@@ -0,0 +1,517 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
/**
|
4 |
+
* Icegram Campaign Admin class
|
5 |
+
*/
|
6 |
+
if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
|
7 |
+
class Icegram_Campaign_Admin {
|
8 |
+
|
9 |
+
var $default_target_rules;
|
10 |
+
|
11 |
+
function __construct() {
|
12 |
+
|
13 |
+
add_action( 'add_meta_boxes', array( &$this, 'add_campaigns_metaboxes' ), 0 );
|
14 |
+
add_action( 'save_post', array( &$this, 'save_campaign_settings' ), 10, 2 );
|
15 |
+
add_action( 'wp_ajax_icegram_json_search_messages', array( &$this, 'icegram_json_search_messages' ) );
|
16 |
+
add_action( 'wp_ajax_get_message_action_row', array( &$this, 'get_message_action_row' ) );
|
17 |
+
add_filter( 'wp_default_editor', create_function('', 'return "html";') );
|
18 |
+
add_action( 'wp_ajax_save_campaign_preview', array( &$this, 'save_campaign_preview' ) );
|
19 |
+
add_action( 'icegram_campaign_target_rules', array( &$this, 'icegram_add_campaign_target_rules' ), 10, 2 );
|
20 |
+
|
21 |
+
$this->default_target_rules = apply_filters( 'icegram_campaign_default_rules',
|
22 |
+
array ( 'homepage' => 'yes',
|
23 |
+
'when' => 'always',
|
24 |
+
'mobile' => 'yes',
|
25 |
+
'tablet' => 'yes',
|
26 |
+
'laptop' => 'yes',
|
27 |
+
'logged_in' => 'all'
|
28 |
+
)
|
29 |
+
);
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
// Initialize campaign metabox
|
34 |
+
function add_campaigns_metaboxes() {
|
35 |
+
$meta_box_title = '<label class="options_header" for="icegram_messages">' . __( 'Message', 'icegram' ) . '</label>';
|
36 |
+
add_meta_box( 'campaign_data', $meta_box_title, array( &$this, 'campaign_data_content' ), 'ig_campaign', 'normal', 'high' );
|
37 |
+
add_meta_box( 'campaign_target_rules', __( 'Targeting Rules', 'icegram' ), array( &$this, 'campaign_target_rules_content' ), 'ig_campaign', 'normal' );
|
38 |
+
}
|
39 |
+
|
40 |
+
// Display list of messages of campaign
|
41 |
+
function campaign_data_content() {
|
42 |
+
global $post, $icegram;
|
43 |
+
|
44 |
+
$ig_message_admin = new Icegram_Message_Admin();
|
45 |
+
|
46 |
+
$campaign_box = '<select id="icegram_messages" name="icegram_messages[]" class="ajax_chosen_select_messages" data-placeholder="' . __( 'Search to add / Create new…', 'icegram' ) . '">';
|
47 |
+
$campaign_box .= '<option value=""></option>';
|
48 |
+
foreach ( $icegram->message_types as $message ) {
|
49 |
+
$campaign_box .= '<option value="'.$message['type'].'">'.__( 'Create new', 'icegram' ).' '.$message['name'].' ...</option>';
|
50 |
+
}
|
51 |
+
$campaign_box .= '</select>';
|
52 |
+
$campaign_box .= '<div class="button button-primary campaign_preview" value="' . home_url() . '">' . __( 'Preview', 'icegram' ) . '</div>';
|
53 |
+
|
54 |
+
$title = '<label class="options_header" for="icegram_messages"><strong>' . __( 'Message', 'icegram' ) . '</strong></label>';
|
55 |
+
?>
|
56 |
+
<div class="campaign_box"><?php echo $title; ?> — <?php echo $campaign_box; ?></div>
|
57 |
+
<div style="margin: 8px -12px 12px -12px">
|
58 |
+
<hr/>
|
59 |
+
</div>
|
60 |
+
<div class="campaign_target_rules_panel">
|
61 |
+
<div class="options_group">
|
62 |
+
<div class="messages-list">
|
63 |
+
<table class="messages_list_table">
|
64 |
+
<?php
|
65 |
+
$this->message_list_table_header();
|
66 |
+
?>
|
67 |
+
<tbody>
|
68 |
+
<?php
|
69 |
+
$messages = get_post_meta( $post->ID, 'messages', true );
|
70 |
+
if ( !empty( $messages ) ) {
|
71 |
+
foreach ( $messages as $row => $message ) {
|
72 |
+
$message_title = get_the_title( $message['id'] );
|
73 |
+
$message_data = get_post_meta( $message['id'], 'icegram_message_data', true );
|
74 |
+
$messsage_type = ( !empty( $message_data['type'] ) ) ? $message_data['type'] : '';
|
75 |
+
if ( empty( $icegram->message_types[ $messsage_type ] ) ) continue;
|
76 |
+
?>
|
77 |
+
<tr class="form-field message-row" value="<?php echo $message['id']; ?>">
|
78 |
+
<td class="message_header">
|
79 |
+
<label class="message_header_label <?php echo $message_data['type']; ?>"><?php echo $icegram->message_types[ $message_data['type'] ]['name']; ?></label>
|
80 |
+
</td>
|
81 |
+
<td class="message_title">
|
82 |
+
<div class="message-title-text"><?php echo $message_title; ?></div>
|
83 |
+
<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', 'icegram' ); ?>" style="display: none;">
|
84 |
+
</td>
|
85 |
+
<td class="message_seconds">
|
86 |
+
<input type="hidden" name="messages[<?php echo $row; ?>][id]" value="<?php echo $message['id']; ?>" />
|
87 |
+
<input type="number" class="seconds-text" name="messages[<?php echo $row; ?>][time]" min="0" value="<?php echo ( !empty( $message['time'] ) ) ? $message['time'] : 0; ?>" size="3" />
|
88 |
+
<?php _e( ' sec', 'icegram' )?>
|
89 |
+
</td>
|
90 |
+
<td class="action_links">
|
91 |
+
<span class="actions message_edit" title="<?php _e( 'Edit Message', 'icegram' ); ?>" ></span>
|
92 |
+
<span class="actions message_delete" title="<?php _e( 'Remove from Campaign', 'icegram' ); ?>" ></span>
|
93 |
+
</td>
|
94 |
+
</tr>
|
95 |
+
<tr id="message_row_<?php echo $message['id']; ?>" class="message-edit-row" style="display: none;">
|
96 |
+
<td colspan="4">
|
97 |
+
<?php
|
98 |
+
$ig_message_admin->message_form_fields( '', array( 'message_id' => $message['id'] ) );
|
99 |
+
?>
|
100 |
+
</td>
|
101 |
+
</tr>
|
102 |
+
<?php
|
103 |
+
}
|
104 |
+
}
|
105 |
+
?>
|
106 |
+
</tbody>
|
107 |
+
</table>
|
108 |
+
<div class="empty_campaign">
|
109 |
+
<?php
|
110 |
+
echo __( 'No messages yet. Use search / create bar above to add messages to this campaign.', 'icegram' );
|
111 |
+
?>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
<?php
|
117 |
+
}
|
118 |
+
|
119 |
+
// Campaign targeting rules metabox
|
120 |
+
function campaign_target_rules_content() {
|
121 |
+
global $post;
|
122 |
+
|
123 |
+
wp_nonce_field( 'icegram_campaign_save_data', 'icegram_campaign_meta_nonce' );
|
124 |
+
$campaign_target_rules = get_post_meta( $post->ID, 'icegram_campaign_target_rules', true );
|
125 |
+
|
126 |
+
if( empty( $campaign_target_rules ) ) {
|
127 |
+
$campaign_target_rules = $this->default_target_rules;
|
128 |
+
}
|
129 |
+
|
130 |
+
?>
|
131 |
+
<span class="target_rules_desc"> <em><?php echo 'Messages in this campaign will be shown when all these rules match...' ?></em></span>
|
132 |
+
<div class="campaign_target_rules_panel">
|
133 |
+
<?php do_action( 'icegram_campaign_target_rules', $post->ID, $campaign_target_rules ); ?>
|
134 |
+
</div>
|
135 |
+
<?php
|
136 |
+
}
|
137 |
+
|
138 |
+
// Display setting fields for campaign targeting rules
|
139 |
+
function icegram_add_campaign_target_rules( $campaign_id, $campaign_target_rules ) {
|
140 |
+
global $wp_roles;
|
141 |
+
?>
|
142 |
+
<div class="options_group" id="campaign_target_rules_where">
|
143 |
+
<p class="form-field">
|
144 |
+
<label class="options_header"><?php _e( 'Where?', 'icegram' ); ?></label>
|
145 |
+
<label for="where_sitewide">
|
146 |
+
<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' ) : ''; ?> />
|
147 |
+
<?php _e( 'Sitewide', 'icegram' ); ?>
|
148 |
+
</label>
|
149 |
+
</p>
|
150 |
+
<p class="form-field">
|
151 |
+
<label class="options_header"> </label>
|
152 |
+
<label for="where_homepage">
|
153 |
+
<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' ) : ''; ?> />
|
154 |
+
<?php _e( 'Homepage', 'icegram' ); ?>
|
155 |
+
</label>
|
156 |
+
</p>
|
157 |
+
<p class="form-field">
|
158 |
+
<label class="options_header"> </label>
|
159 |
+
<label for="where_other_page">
|
160 |
+
<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' ) : ''; ?> />
|
161 |
+
<?php _e( 'Selected pages', 'icegram' ); ?>
|
162 |
+
</label>
|
163 |
+
</p>
|
164 |
+
<p class="form-field" <?php echo ( !empty( $campaign_target_rules['other_page'] ) && $campaign_target_rules['other_page'] == 'yes' ) ? '' : 'style="display: none;"'; ?>>
|
165 |
+
<label class="options_header"> </label>
|
166 |
+
<?php
|
167 |
+
echo '<select name="page_id[]" id="where_page_id" data-placeholder="' . __( 'Select a page…', 'icegram' ) . '" style="min-width:300px;" class="icegram_chosen_page" multiple>';
|
168 |
+
foreach ( get_pages() as $page ) {
|
169 |
+
echo '<option value="' . $page->ID . '"';
|
170 |
+
if( !empty( $campaign_target_rules['page_id'] ) ) {
|
171 |
+
echo selected( in_array( $page->ID, $campaign_target_rules['page_id'] ) );
|
172 |
+
}
|
173 |
+
echo '>' . $page->post_title . '</option>';
|
174 |
+
}
|
175 |
+
echo '</select>';
|
176 |
+
?>
|
177 |
+
</p>
|
178 |
+
<p class="form-field">
|
179 |
+
<label class="campaign_shortcode">
|
180 |
+
<span class="shortcode_description admin_field_icon"></span>
|
181 |
+
<?php echo sprintf(__( 'Additionally you can insert <code>[%s]</code> wherever you want to run this campaign.', 'icegram' ), 'icegram campaigns="' .$campaign_id . '"' ); ?>
|
182 |
+
</label>
|
183 |
+
</p>
|
184 |
+
</div>
|
185 |
+
<div class="options_group" id="campaign_target_rules_when">
|
186 |
+
<p class="form-field">
|
187 |
+
<label class="options_header"><?php _e( 'When?', 'icegram' ); ?></label>
|
188 |
+
<label for="when_always">
|
189 |
+
<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' ) : ''; ?> />
|
190 |
+
<?php _e( 'Always', 'icegram' ); ?>
|
191 |
+
</label>
|
192 |
+
</p>
|
193 |
+
<p class="form-field">
|
194 |
+
<label class="options_header"> </label>
|
195 |
+
<label for="when_schedule">
|
196 |
+
<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' ) : ''; ?> />
|
197 |
+
<?php _e( 'Schedule', 'icegram' ); ?>
|
198 |
+
<span class="form-field" id="date_picker" <?php echo ( !empty( $campaign_target_rules['when'] ) && $campaign_target_rules['when'] == 'schedule' ) ? '' : 'style="display: none;"'; ?>>
|
199 |
+
<label class="date_picker">
|
200 |
+
<input type="text" class="date-picker" name="campaign_target_rules[from]" value="<?php echo ( !empty( $campaign_target_rules['from'] ) ) ? $campaign_target_rules['from'] : ''; ?>" placeholder="<?php _e( 'From…', 'icegram' );?>" />
|
201 |
+
</label>
|
202 |
+
<label class="date_picker">
|
203 |
+
<input type="text" class="date-picker" name="campaign_target_rules[to]" value="<?php echo ( !empty( $campaign_target_rules['to'] ) ) ? $campaign_target_rules['to'] : ''; ?>" placeholder="<?php _e( 'To…', 'icegram' );?>" />
|
204 |
+
</label>
|
205 |
+
</span>
|
206 |
+
</label>
|
207 |
+
</p>
|
208 |
+
</div>
|
209 |
+
<div class="options_group" id="campaign_target_rules_device">
|
210 |
+
<p class="form-field">
|
211 |
+
<label class="options_header"><?php _e( 'Device?', 'icegram' ); ?></label>
|
212 |
+
<label for="device_mobile" class="device" title="<?php _e( 'Mobile / Smartphones', 'icegram' ); ?>">
|
213 |
+
<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' ) : ''; ?> />
|
214 |
+
<span class="device_mobile"></span>
|
215 |
+
</label>
|
216 |
+
<label for="device_tablet" class="device" title="<?php _e( 'Tablet', 'icegram' ); ?>">
|
217 |
+
<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' ) : ''; ?> />
|
218 |
+
<span class="device_tablet"></span>
|
219 |
+
</label>
|
220 |
+
<label for="device_laptop" class="device" title="<?php _e( 'Desktop / Laptop', 'icegram' ); ?>">
|
221 |
+
<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' ) : ''; ?> />
|
222 |
+
<span class="device_laptop"></span>
|
223 |
+
</label>
|
224 |
+
</p>
|
225 |
+
</div>
|
226 |
+
<div class="options_group" id="campaign_target_rules_users">
|
227 |
+
<p class="form-field">
|
228 |
+
<label class="options_header"><?php _e( 'Who?', 'icegram' ); ?></label>
|
229 |
+
<label for="users_all">
|
230 |
+
<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' ) : ''; ?> />
|
231 |
+
<?php _e( 'All users', 'icegram' ); ?>
|
232 |
+
</label>
|
233 |
+
</p>
|
234 |
+
<p class="form-field">
|
235 |
+
<label class="options_header"> </label>
|
236 |
+
<label for="users_logged_in">
|
237 |
+
<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' ) : ''; ?> />
|
238 |
+
<?php _e( 'Logged in users only', 'icegram' ); ?>
|
239 |
+
</label>
|
240 |
+
</p>
|
241 |
+
<div class="user_roles">
|
242 |
+
<?php
|
243 |
+
if ( !empty( $campaign_target_rules['logged_in'] ) && $campaign_target_rules['logged_in'] == 'all' ) {
|
244 |
+
$campaign_logged_in_user_style = 'style="display: none;"';
|
245 |
+
} else {
|
246 |
+
$campaign_logged_in_user_style = 'style="display: block;"';
|
247 |
+
}
|
248 |
+
?>
|
249 |
+
<p class="form-field" <?php echo $campaign_logged_in_user_style; ?>>
|
250 |
+
<label class="options_header"> </label>
|
251 |
+
<?php
|
252 |
+
if ( isset( $wp_roles ) ) {
|
253 |
+
$wp_roles = new WP_Roles();
|
254 |
+
$roles = $wp_roles->get_names();
|
255 |
+
|
256 |
+
echo '<select name="campaign_target_rules[users][]" id="users_roles" data-placeholder="' . __( 'Select a user role…', 'icegram' ) . '" style="min-width:300px;" class="icegram_chosen_page" multiple>';
|
257 |
+
foreach ( $roles as $role_value => $role_name ) {
|
258 |
+
echo '<option value="' . $role_value . '"';
|
259 |
+
if( !empty( $campaign_target_rules['users'] ) ) {
|
260 |
+
echo selected( in_array( $role_value, $campaign_target_rules['users'] ) );
|
261 |
+
}
|
262 |
+
echo '>' . $role_name . '</option>';
|
263 |
+
}
|
264 |
+
echo '</select>';
|
265 |
+
}
|
266 |
+
?>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
<div class="options_group" id="campaign_target_rules_retrageting">
|
270 |
+
<p class="form-field">
|
271 |
+
<label class="options_header"><?php _e( 'Retargeting', 'icegram' ); ?></label>
|
272 |
+
<label for="retargeting">
|
273 |
+
<input type="checkbox" name="campaign_target_rules[retargeting]" id="retargeting" value="yes" <?php ( !empty( $campaign_target_rules['retargeting'] ) ) ? checked( $campaign_target_rules['retargeting'], 'yes' ) : ''; ?> />
|
274 |
+
<?php _e( 'Once shown, do NOT show a message again for current session', 'icegram' ); ?>
|
275 |
+
</label>
|
276 |
+
</p>
|
277 |
+
</div>
|
278 |
+
<?php
|
279 |
+
}
|
280 |
+
|
281 |
+
// Return json encoded messages for searched term
|
282 |
+
function icegram_json_search_messages( $x = '' ) {
|
283 |
+
global $icegram;
|
284 |
+
check_ajax_referer( 'search-messages', 'security' );
|
285 |
+
|
286 |
+
header( 'Content-Type: application/json; charset=utf-8' );
|
287 |
+
|
288 |
+
$term = ( string ) urldecode( stripslashes( strip_tags( $_GET['term'] ) ) );
|
289 |
+
$post_types = array('ig_message');
|
290 |
+
|
291 |
+
if ( empty( $term ) ) die();
|
292 |
+
|
293 |
+
if ( is_numeric( $term ) ) {
|
294 |
+
|
295 |
+
$args = array(
|
296 |
+
'post_type' => $post_types,
|
297 |
+
'post_status' => 'publish',
|
298 |
+
'posts_per_page' => -1,
|
299 |
+
'post__in' => array( 0, $term ),
|
300 |
+
'fields' => 'ids'
|
301 |
+
);
|
302 |
+
|
303 |
+
$posts = get_posts( $args );
|
304 |
+
|
305 |
+
} else {
|
306 |
+
|
307 |
+
$args = array(
|
308 |
+
'post_type' => $post_types,
|
309 |
+
'post_status' => 'publish',
|
310 |
+
'posts_per_page' => -1,
|
311 |
+
's' => $term,
|
312 |
+
'fields' => 'ids'
|
313 |
+
);
|
314 |
+
|
315 |
+
$posts = get_posts( $args );
|
316 |
+
|
317 |
+
}
|
318 |
+
|
319 |
+
$found_messages = array();
|
320 |
+
if ( $posts ) {
|
321 |
+
|
322 |
+
foreach ( $posts as $post ) {
|
323 |
+
|
324 |
+
$message_title = get_the_title( $post );
|
325 |
+
$message_data = get_post_meta( $post, 'icegram_message_data', true );
|
326 |
+
$messsage_type = ( !empty( $icegram->message_types[ $message_data['type'] ]['type'] ) ) ? $icegram->message_types[ $message_data['type'] ]['type'] : '';
|
327 |
+
$found_messages[ $post ] = $messsage_type . ' — ' . $message_title;
|
328 |
+
|
329 |
+
}
|
330 |
+
$found_messages[''] = __( '- - - - - - - - - - - - - - - - - - - - - - - - - -', 'icegram' );
|
331 |
+
}
|
332 |
+
|
333 |
+
foreach ( $icegram->message_types as $message ) {
|
334 |
+
$found_messages[ $message['type'] ] = __( 'Create new', 'icegram' ) . ' ' . $message['name'] . ' ...';
|
335 |
+
}
|
336 |
+
ob_clean();
|
337 |
+
$found_messages = apply_filters( 'icegram_searched_messages', $found_messages, $term );
|
338 |
+
echo json_encode( $found_messages );
|
339 |
+
die();
|
340 |
+
}
|
341 |
+
|
342 |
+
// Constant table header for campaign
|
343 |
+
function message_list_table_header() {
|
344 |
+
?>
|
345 |
+
<thead>
|
346 |
+
<tr class="form-field message-row-header">
|
347 |
+
<th class="message_header"><?php _e( 'Type', 'icegram' ); ?></th>
|
348 |
+
<th class="message_title"><?php _e( 'Name', 'icegram' ); ?></th>
|
349 |
+
<th class="message_seconds"><?php _e( 'Show after', 'icegram' ); ?></th>
|
350 |
+
<th class="action_links"><?php _e( 'Actions', 'icegram' ); ?></th>
|
351 |
+
</tr>
|
352 |
+
</thead>
|
353 |
+
<?php
|
354 |
+
}
|
355 |
+
|
356 |
+
// Return html for message row in json encoded format
|
357 |
+
function get_message_action_row() {
|
358 |
+
|
359 |
+
$ig_message_admin = new Icegram_Message_Admin();
|
360 |
+
|
361 |
+
if ( empty( $_POST['message_id'] ) || !is_numeric( $_POST['message_id'] ) ) {
|
362 |
+
|
363 |
+
$my_post = array(
|
364 |
+
'post_status' => 'auto-draft',
|
365 |
+
'post_type' => 'ig_message'
|
366 |
+
);
|
367 |
+
$message_id = wp_insert_post( $my_post );
|
368 |
+
$message_title = '';
|
369 |
+
$message_type = $_POST['message_id'];
|
370 |
+
|
371 |
+
} else {
|
372 |
+
|
373 |
+
$message_id = $_POST['message_id'];
|
374 |
+
$message_title = get_the_title( $message_id );
|
375 |
+
$message_data = get_post_meta( $message_id, 'icegram_message_data', true );
|
376 |
+
$message_type = $message_data['type'];
|
377 |
+
|
378 |
+
}
|
379 |
+
|
380 |
+
ob_start();
|
381 |
+
?>
|
382 |
+
<tr class="form-field message-row" value="<?php echo $message_id; ?>">
|
383 |
+
<td class="message_header">
|
384 |
+
<label class="message_header_label <?php echo $message_type; ?>"><?php echo ucwords( str_replace( "-", ' ', $message_type ) ); ?></label>
|
385 |
+
</td>
|
386 |
+
<td class="message_title">
|
387 |
+
<div class="message-title-text" style="display:none;"><?php echo $message_title; ?></div>
|
388 |
+
<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', 'icegram' ); ?>">
|
389 |
+
</td>
|
390 |
+
<td class="message_seconds">
|
391 |
+
<input type="hidden" name="messages[<?php echo $_POST['row']; ?>][id]" value="<?php echo $message_id; ?>" />
|
392 |
+
<input type="number" class="seconds-text" name="messages[<?php echo $_POST['row']; ?>][time]" min="0" value="0" size="3" /><?php _e( ' sec', 'icegram' )?>
|
393 |
+
</td>
|
394 |
+
<td class="action_links">
|
395 |
+
<span class="actions message_edit" title="<?php _e( 'Edit Message', 'icegram' ); ?>" ></span>
|
396 |
+
<span class="actions message_delete" title="<?php _e( 'Remove from Campaign', 'icegram' ); ?>" ></span>
|
397 |
+
</td>
|
398 |
+
</tr>
|
399 |
+
<tr id="message_row_<?php echo $message_id; ?>" class="message-edit-row">
|
400 |
+
<td colspan="4">
|
401 |
+
<?php
|
402 |
+
$ig_message_admin->message_form_fields( '', array( 'messsage_type' => $message_type, 'message_id' => $message_id, 'new_message_row' => true ) );
|
403 |
+
?>
|
404 |
+
</td>
|
405 |
+
</tr>
|
406 |
+
<?php
|
407 |
+
|
408 |
+
echo json_encode( array( 'id' => $message_id, 'main' => ob_get_clean() ) );
|
409 |
+
die();
|
410 |
+
|
411 |
+
}
|
412 |
+
|
413 |
+
// Save all list of messages and targeting rules
|
414 |
+
function save_campaign_settings( $post_id, $post ) {
|
415 |
+
|
416 |
+
if (empty( $post_id ) || empty( $post ) || empty( $_POST )) return;
|
417 |
+
if (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE) return;
|
418 |
+
if (is_int( wp_is_post_revision( $post ) )) return;
|
419 |
+
if (is_int( wp_is_post_autosave( $post ) )) return;
|
420 |
+
if ( empty( $_POST['icegram_campaign_meta_nonce'] ) || ! wp_verify_nonce( $_POST['icegram_campaign_meta_nonce'], 'icegram_campaign_save_data' ) ) return;
|
421 |
+
if (! current_user_can( 'edit_post', $post_id )) return;
|
422 |
+
if ($post->post_type != 'ig_campaign') return;
|
423 |
+
|
424 |
+
$campaign_target_rules = apply_filters( 'icegram_update_campaign_rules', $_POST['campaign_target_rules'], $post_id );
|
425 |
+
|
426 |
+
if ( isset( $_POST['page_id'] ) ) {
|
427 |
+
$campaign_target_rules['page_id'] = $_POST['page_id'];
|
428 |
+
update_post_meta( $post_id, 'icegram_campaign_target_pages', $_POST['page_id'] );
|
429 |
+
}
|
430 |
+
|
431 |
+
if ( count( $campaign_target_rules ) > 0 ) {
|
432 |
+
update_post_meta( $post_id, 'icegram_campaign_target_rules', $campaign_target_rules );
|
433 |
+
}
|
434 |
+
|
435 |
+
if ( empty( $_POST['messages'] ) ) {
|
436 |
+
update_post_meta( $post_id, 'messages', array() );
|
437 |
+
} else {
|
438 |
+
|
439 |
+
update_post_meta( $post_id, 'messages', array_values( $_POST['messages'] ) );
|
440 |
+
update_post_meta( $post_id, 'campaign_preview', array_values( $_POST['messages'] ) );
|
441 |
+
|
442 |
+
foreach ( $_POST['message_data'] as $message_id => $message_data ) {
|
443 |
+
|
444 |
+
$type = $message_data['type'];
|
445 |
+
if( isset( $message_data['theme'][$type] ) ) {
|
446 |
+
$message_data['theme'] = $message_data['theme'][$type];
|
447 |
+
} else {
|
448 |
+
unset( $message_data['theme'] );
|
449 |
+
}
|
450 |
+
if( isset( $message_data['animation'][$type] ) ) {
|
451 |
+
$message_data['animation'] = $message_data['animation'][$type];
|
452 |
+
} else {
|
453 |
+
unset( $message_data['animation'] );
|
454 |
+
}
|
455 |
+
if( isset( $message_data['position'][$type] ) ) {
|
456 |
+
$message_data['position'] = $message_data['position'][$type];
|
457 |
+
} elseif( isset( $message_data['position']['ig_default'] ) ) {
|
458 |
+
$message_data['position'] = $message_data['position']['ig_default'];
|
459 |
+
}
|
460 |
+
update_post_meta( $message_id, 'icegram_message_data', $message_data );
|
461 |
+
update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
|
462 |
+
wp_update_post( array ( 'ID' => $message_id,
|
463 |
+
'post_content' => $message_data['message'],
|
464 |
+
'post_status' => 'publish',
|
465 |
+
'post_title' => empty( $message_data['post_title'] ) ? $message_data['headline']: $message_data['post_title']
|
466 |
+
) );
|
467 |
+
}
|
468 |
+
|
469 |
+
}
|
470 |
+
|
471 |
+
}
|
472 |
+
|
473 |
+
// On preview button click save campaign messages list
|
474 |
+
function save_campaign_preview() {
|
475 |
+
|
476 |
+
if ( empty($_POST['post_ID']) ) die();
|
477 |
+
if ( !current_user_can( 'edit_post', $_POST['post_ID'] ) ) die();
|
478 |
+
|
479 |
+
if( !empty( $_POST['messages'] ) ) {
|
480 |
+
|
481 |
+
update_post_meta( $_POST['post_ID'], 'campaign_preview', $_POST['messages'] ) ;
|
482 |
+
|
483 |
+
foreach ( (array) $_POST['message_data'] as $message_id => $message_data ) {
|
484 |
+
$type = $message_data['type'];
|
485 |
+
if( isset( $message_data['theme'][$type] ) ) {
|
486 |
+
$message_data['theme'] = $message_data['theme'][$type];
|
487 |
+
} else {
|
488 |
+
unset( $message_data['theme'] );
|
489 |
+
}
|
490 |
+
if( isset( $message_data['animation'][$type] ) ) {
|
491 |
+
$message_data['animation'] = $message_data['animation'][$type];
|
492 |
+
} else {
|
493 |
+
unset( $message_data['animation'] );
|
494 |
+
}
|
495 |
+
if( isset( $message_data['position'][$type] ) ) {
|
496 |
+
$message_data['position'] = $message_data['position'][$type];
|
497 |
+
} elseif( isset( $message_data['position']['ig_default'] ) ) {
|
498 |
+
$message_data['position'] = $message_data['position']['ig_default'];
|
499 |
+
}
|
500 |
+
update_post_meta( $message_id, 'icegram_message_preview_data', $message_data );
|
501 |
+
}
|
502 |
+
// Determine page url to preview on...
|
503 |
+
$page_url = '';
|
504 |
+
if ( !empty($_POST['campaign_target_rules']) && !empty($_POST['campaign_target_rules']['other_page']) && !empty($_POST['page_id']) && is_array($_POST['page_id'])) {
|
505 |
+
$page_url = get_permalink( $_POST['page_id'][0] );
|
506 |
+
}
|
507 |
+
if ($page_url == '') {
|
508 |
+
$page_url = home_url();
|
509 |
+
}
|
510 |
+
ob_clean();
|
511 |
+
echo add_query_arg( 'campaign_preview_id', $_POST['post_ID'], $page_url );
|
512 |
+
}
|
513 |
+
die();
|
514 |
+
|
515 |
+
}
|
516 |
+
}
|
517 |
+
}
|
classes/class-icegram-campaign.php
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
/**
|
4 |
+
* Icegram Campaign class
|
5 |
+
*/
|
6 |
+
if ( !class_exists( 'Icegram_Campaign' ) ) {
|
7 |
+
class Icegram_Campaign {
|
8 |
+
|
9 |
+
var $_post;
|
10 |
+
var $title;
|
11 |
+
var $messages;
|
12 |
+
var $rules;
|
13 |
+
var $rules_summary;
|
14 |
+
|
15 |
+
function __construct( $id = '' ) {
|
16 |
+
|
17 |
+
if ( !empty( $id ) ) {
|
18 |
+
|
19 |
+
$this->_post = get_post( $id );
|
20 |
+
|
21 |
+
$this->title = $this->_post->post_title;
|
22 |
+
$this->messages = get_post_meta( $this->_post->ID, 'messages', true );
|
23 |
+
$this->rules = get_post_meta( $this->_post->ID, 'icegram_campaign_target_rules', true );
|
24 |
+
|
25 |
+
$this->rules_summary['where'] = array(
|
26 |
+
'homepage' => ( !empty( $this->rules['homepage'] ) ) ? $this->rules['homepage'] : '',
|
27 |
+
'other_page' => ( !empty( $this->rules['other_page'] ) && $this->rules['other_page'] == 'yes' && !empty( $this->rules['page_id'] ) ) ? $this->rules['page_id'] : '',
|
28 |
+
'blog' => ( !empty( $this->rules['blog'] ) ) ? $this->rules['blog'] : '',
|
29 |
+
'sitewide' => ( !empty( $this->rules['sitewide'] ) ) ? $this->rules['sitewide'] : ''
|
30 |
+
);
|
31 |
+
$this->rules_summary['when'] = array(
|
32 |
+
'when' => ( !empty( $this->rules['when'] ) ) ? $this->rules['when'] : '',
|
33 |
+
'from' => ( !empty( $this->rules['from'] ) ) ? $this->rules['from'] : '',
|
34 |
+
'to' => ( !empty( $this->rules['to'] ) ) ? $this->rules['to'] : ''
|
35 |
+
);
|
36 |
+
$this->rules_summary['device'] = array(
|
37 |
+
'mobile' => ( !empty( $this->rules['mobile'] ) ) ? $this->rules['mobile'] : '',
|
38 |
+
'tablet' => ( !empty( $this->rules['tablet'] ) ) ? $this->rules['tablet'] : '',
|
39 |
+
'laptop' => ( !empty( $this->rules['laptop'] ) ) ? $this->rules['laptop'] : ''
|
40 |
+
);
|
41 |
+
$this->rules_summary['users'] = ( !empty( $this->rules['logged_in'] ) && $this->rules['logged_in'] == 'logged_in' ) ? ( ( !empty( $this->rules['users'] ) ) ? $this->rules['users'] : array( 'none' ) ) : array( 'all' );
|
42 |
+
|
43 |
+
$this->rules_summary['retargeting'] = array( 'retargeting' => ( !empty( $this->rules['retargeting'] ) ) ? $this->rules['retargeting'] : '' );
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_user_roles' ), 10, 3 );
|
48 |
+
add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_device' ), 10, 3 );
|
49 |
+
add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_time' ), 10, 3 );
|
50 |
+
add_filter( 'icegram_campaign_validation', array( $this, '_is_valid_page' ), 10, 3 );
|
51 |
+
|
52 |
+
}
|
53 |
+
|
54 |
+
function get_message_meta_by_id( $message_id ) {
|
55 |
+
foreach ($this->messages as $value) {
|
56 |
+
if ($value['id'] == $message_id) {
|
57 |
+
return $value;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
function get_rule_value( $rule_type ) {
|
63 |
+
return (isset($this->rules_summary[$rule_type])) ? $this->rules_summary[$rule_type] : '';
|
64 |
+
}
|
65 |
+
|
66 |
+
function is_valid( $options = array() ) {
|
67 |
+
if( !empty( $this->_post->ID ) ) {
|
68 |
+
return apply_filters( 'icegram_campaign_validation', true, $this, $options );
|
69 |
+
}
|
70 |
+
return false;
|
71 |
+
}
|
72 |
+
|
73 |
+
function _is_valid_user_roles( $campaign_valid, $campaign, $options ) {
|
74 |
+
if( !$campaign_valid ) {
|
75 |
+
return $campaign_valid;
|
76 |
+
}
|
77 |
+
if ( in_array( 'all', $campaign->rules_summary['users'], true ) ) {
|
78 |
+
return true;
|
79 |
+
} elseif ( is_user_logged_in() && !in_array( 'none', $campaign->rules_summary['users'], true ) ) {
|
80 |
+
$current_user = wp_get_current_user();
|
81 |
+
if ( in_array( $current_user->roles[0], $campaign->rules_summary['users'], true ) ) {
|
82 |
+
return true;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
|
88 |
+
function _is_valid_device( $campaign_valid, $campaign, $options ) {
|
89 |
+
if( !$campaign_valid ) {
|
90 |
+
return $campaign_valid;
|
91 |
+
}
|
92 |
+
$current_platform = Icegram::get_platform();
|
93 |
+
if ( !empty( $campaign->rules_summary['device'][ $current_platform ] ) && $campaign->rules_summary['device'][ $current_platform ] == 'yes' ) {
|
94 |
+
return true;
|
95 |
+
}
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
|
99 |
+
function _is_valid_time( $campaign_valid, $campaign, $options ) {
|
100 |
+
if( !$campaign_valid ) {
|
101 |
+
return $campaign_valid;
|
102 |
+
}
|
103 |
+
if ( !empty( $campaign->rules_summary['when']['when'] ) && $campaign->rules_summary['when']['when'] == 'always' ) {
|
104 |
+
return true;
|
105 |
+
}
|
106 |
+
|
107 |
+
if ( ( !empty( $campaign->rules_summary['when']['from'] ) && time() > strtotime( $campaign->rules_summary['when']['from'] . " 00:00:00") ) && ( !empty( $campaign->rules_summary['when']['to'] ) && strtotime( $campaign->rules_summary['when']['to'] . " 23:59:59") > time() ) ) {
|
108 |
+
return true;
|
109 |
+
}
|
110 |
+
|
111 |
+
return false;
|
112 |
+
}
|
113 |
+
|
114 |
+
function _is_valid_page( $campaign_valid, $campaign, $options ) {
|
115 |
+
if( !$campaign_valid || !empty($options['skip_page_check']) ) {
|
116 |
+
return $campaign_valid;
|
117 |
+
}
|
118 |
+
if ( !empty( $campaign->rules_summary['where']['sitewide'] ) && $campaign->rules_summary['where']['sitewide'] == 'yes' ) {
|
119 |
+
return true;
|
120 |
+
}
|
121 |
+
if ( !empty( $campaign->rules_summary['where']['homepage'] ) && $campaign->rules_summary['where']['homepage'] == 'yes' && ( is_home() || is_front_page() ) ) {
|
122 |
+
return true;
|
123 |
+
}
|
124 |
+
$page_id = Icegram::get_current_page_id();
|
125 |
+
if ( !empty( $page_id ) ) {
|
126 |
+
if ( !empty( $campaign->rules_summary['where']['other_page'] ) && in_array( $page_id, $campaign->rules_summary['where']['other_page'] ) ) {
|
127 |
+
return true;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
return false;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
}
|
classes/class-icegram-message-admin.php
ADDED
@@ -0,0 +1,494 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
/**
|
4 |
+
* Icegram Message Admin class
|
5 |
+
*/
|
6 |
+
if ( !class_exists( 'Icegram_Message_Admin' ) ) {
|
7 |
+
|
8 |
+
class Icegram_Message_Admin {
|
9 |
+
|
10 |
+
var $message_themes;
|
11 |
+
|
12 |
+
function __construct() {
|
13 |
+
|
14 |
+
add_action( 'add_meta_boxes', array( &$this, 'add_message_meta_boxes' ) );
|
15 |
+
add_action( 'wp_ajax_get_message_setting', array( &$this , 'message_form_fields' ) );
|
16 |
+
|
17 |
+
add_action( 'save_post', array( &$this, 'update_message_settings' ), 10, 2 );
|
18 |
+
add_filter( 'wp_insert_post_data', array( &$this, 'save_message_in_post_content' ) );
|
19 |
+
|
20 |
+
add_filter( 'manage_edit-ig_message_columns', array( $this, 'edit_columns' ) );
|
21 |
+
add_action( 'manage_ig_message_posts_custom_column', array( $this, 'custom_columns' ), 2 );
|
22 |
+
add_filter( 'icegram_available_headlines', array( &$this, 'available_headlines' ) );
|
23 |
+
|
24 |
+
}
|
25 |
+
|
26 |
+
// Initialize message metabox
|
27 |
+
function add_message_meta_boxes() {
|
28 |
+
global $icegram;
|
29 |
+
add_meta_box( 'message-settings', __( 'Message Settings', 'icegram' ), array ( &$this, 'message_form_fields' ), 'ig_message', 'normal', 'high' );
|
30 |
+
|
31 |
+
?>
|
32 |
+
<style type="text/css">
|
33 |
+
<?php
|
34 |
+
foreach ( $icegram->message_types as $message_type => $message ) {
|
35 |
+
if( !empty( $message['admin_style'] ) ) {
|
36 |
+
$label_bg_color = $message['admin_style']['label_bg_color'];
|
37 |
+
$theme_header_height = $message['admin_style']['theme_header_height'];
|
38 |
+
$theme_header_bg_size = ( $theme_header_height + 3 )."em";
|
39 |
+
$thumbnail_width = $message['admin_style']['thumbnail_width'];
|
40 |
+
$thumbnail_height = $message['admin_style']['thumbnail_height'];
|
41 |
+
echo " .message_header .$message_type {
|
42 |
+
background-color: {$label_bg_color};
|
43 |
+
}
|
44 |
+
.message_theme_{$message_type} + .chosen-container-single .chosen-single {
|
45 |
+
height: {$theme_header_height} !important;
|
46 |
+
}
|
47 |
+
.message_theme_{$message_type} + .chosen-container-single .chosen-single span {
|
48 |
+
background-size: {$theme_header_bg_size} !important;
|
49 |
+
line-height: {$theme_header_height} !important;
|
50 |
+
}
|
51 |
+
.message_theme_{$message_type} + .chosen-container .chosen-results li {
|
52 |
+
width: {$thumbnail_width} !important;
|
53 |
+
height: {$thumbnail_height} !important;
|
54 |
+
}";
|
55 |
+
}
|
56 |
+
}
|
57 |
+
?>
|
58 |
+
</style>
|
59 |
+
<?php
|
60 |
+
}
|
61 |
+
|
62 |
+
// Display all message settings fields
|
63 |
+
function message_form_fields( $post = '', $action = array() ) {
|
64 |
+
|
65 |
+
global $icegram, $pagenow;
|
66 |
+
|
67 |
+
if( ( is_object( $post ) && $post->post_type != 'ig_message' ) )
|
68 |
+
return;
|
69 |
+
|
70 |
+
$message_id = !empty( $action['message_id'] ) ? $action['message_id'] : $post->ID;
|
71 |
+
$message_data = get_post_meta( $message_id, 'icegram_message_data', true );
|
72 |
+
$message_headlines = $icegram->available_headlines;
|
73 |
+
$settings = $this->message_settings_to_show();
|
74 |
+
$positions = $this->message_positions_to_show();
|
75 |
+
|
76 |
+
if ( $pagenow == 'post-new.php' ) {
|
77 |
+
$message_title_key = array_rand( $message_headlines );
|
78 |
+
$default_message_title = $message_headlines[$message_title_key];
|
79 |
+
} else {
|
80 |
+
$default_message_title = $message_title_key = '';
|
81 |
+
}
|
82 |
+
|
83 |
+
if( empty( $message_data ) ) {
|
84 |
+
$message_type = !empty( $action['message_type'] ) ? $action['message_type'] : '';
|
85 |
+
$message_data = $this->default_message_data( $message_type );
|
86 |
+
}
|
87 |
+
|
88 |
+
if( !empty( $action['message_type'] ) ) {
|
89 |
+
$message_data['type'] = $action['message_type'];
|
90 |
+
}
|
91 |
+
|
92 |
+
wp_nonce_field( 'icegram_message_save_data', 'icegram_message_meta_nonce' );
|
93 |
+
if( !empty( $action['message_id'] ) ) {
|
94 |
+
?>
|
95 |
+
<div class="thickbox_edit_message" id="<?php echo $action['message_id']; ?>">
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
?>
|
99 |
+
<div class="wp_attachment_details edit-form-section message-setting-fields">
|
100 |
+
<p>
|
101 |
+
<label for="message_type" class="message_label"><strong><?php _e( 'Type', 'icegram' ); ?></strong></label>
|
102 |
+
<select id="message_type" name="message_data[<?php echo $message_id; ?>][type]" class="message_type icegram_chosen_page">
|
103 |
+
<?php foreach ( $icegram->message_types as $message ) {
|
104 |
+
$selected = ( ( !empty( $message_data['type'] ) && esc_attr( $message['type'] ) == $message_data['type'] ) ) ? 'selected' : '';
|
105 |
+
?>
|
106 |
+
<option value="<?php echo esc_attr( $message['type'] ) ?>" <?php echo $selected; ?>><?php echo esc_html( $message['name'] ) ?></option>
|
107 |
+
<?php } ?>
|
108 |
+
</select>
|
109 |
+
</p>
|
110 |
+
<?php foreach ( $icegram->message_types as $message ) {
|
111 |
+
if( empty( $message['themes'] ) ) {
|
112 |
+
continue;
|
113 |
+
}
|
114 |
+
?>
|
115 |
+
<p class="message_row <?php echo $message['type']; ?>">
|
116 |
+
<label for="message_theme_<?php echo $message['type'] ?>" class="message_label"><strong><?php _e( 'Theme', 'icegram' ); ?></strong></label>
|
117 |
+
<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']; ?>">
|
118 |
+
<?php
|
119 |
+
foreach ( $message['themes'] as $theme ) {
|
120 |
+
$bg_img = "background-image: url(" . $message['baseurl'] . "themes/" . $theme['type'] . ".png)";
|
121 |
+
?>
|
122 |
+
<option style="<?php echo $bg_img; ?>" value="<?php echo esc_attr( $theme['type'] ) ?>" class="<?php echo esc_attr( $theme['type'] ) ?>" <?php echo ( !empty( $message_data['theme'] ) && esc_attr( $theme['type'] ) == $message_data['theme'] ) ? 'selected' : ''; ?>><?php echo esc_html( $theme['name'] ) ?></option>
|
123 |
+
<?php } ?>
|
124 |
+
</select>
|
125 |
+
</p>
|
126 |
+
<?php } ?>
|
127 |
+
<?php foreach ( $icegram->message_types as $message ) {
|
128 |
+
if( empty( $message['settings']['animation']['values'] ) ) continue;
|
129 |
+
$animations = $message['settings']['animation']['values']
|
130 |
+
?>
|
131 |
+
<p class="message_row <?php echo $message['type']; ?>">
|
132 |
+
<label for="message_animation_<?php echo $message['type'] ?>" class="message_label"><strong><?php _e( 'Animation', 'icegram' ); ?></strong></label>
|
133 |
+
<select id="message_animation_<?php echo $message['type'] ?>" name="message_data[<?php echo $message_id; ?>][animation][<?php echo $message['type'] ?>]" class="icegram_chosen_page message_animation message_animation_<?php echo $message['type']; ?>">
|
134 |
+
<?php foreach ( $animations as $value => $label ) { ?>
|
135 |
+
<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>
|
136 |
+
<?php } ?>
|
137 |
+
</select>
|
138 |
+
</p>
|
139 |
+
<?php } ?>
|
140 |
+
<p class="message_row <?php echo implode( ' ', $settings['headline'] )?>">
|
141 |
+
<label for="message_headline" class="message_label">
|
142 |
+
<strong><?php _e( 'Headline', 'icegram' ); ?></strong>
|
143 |
+
<span class="help_tip admin_field_icon" data-tip="<?php _e( 'Shown with highest prominence. Click on idea button on right to get a new headline.', 'icegram' ); ?>"></span>
|
144 |
+
</label>
|
145 |
+
<input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][headline]" id="message_title" value="<?php echo ( isset( $message_data['headline'] ) ) ? $message_data['headline'] : $default_message_title; ?>" data-headline="<?php echo $message_title_key; ?>" />
|
146 |
+
<a class="button message_headline_button tips" data-tip="<?php _e( 'Give Me Another Headline', 'icegram' ); ?>">
|
147 |
+
<span class="headline-buttons-icon admin_field_icon"></span>
|
148 |
+
</a>
|
149 |
+
</p>
|
150 |
+
<p class="message_row <?php echo implode( ' ', $settings['label'] )?>">
|
151 |
+
<label for="message_label" class="message_label">
|
152 |
+
<strong><?php _e( 'Button Label', 'icegram' ); ?></strong>
|
153 |
+
<span class="help_tip admin_field_icon" data-tip="<?php _e( 'Your call to action text. Something unusual will increase conversions.', 'icegram' ); ?>"></span>
|
154 |
+
</label>
|
155 |
+
<input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][label]" id="message_label" value="<?php if( isset( $message_data['label'] ) ) echo $message_data['label']; ?>" />
|
156 |
+
</p>
|
157 |
+
<p class="message_row <?php echo implode( ' ', $settings['link'] )?>">
|
158 |
+
<label for="message_link" class="message_label">
|
159 |
+
<strong><?php _e( 'Target Link', 'icegram' ); ?></strong>
|
160 |
+
<span class="help_tip admin_field_icon" data-tip="<?php _e( 'Enter destination URL here. Clicking will redirect to this link.', 'icegram' ); ?>"></span>
|
161 |
+
</label>
|
162 |
+
<input type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][link]" id="message_link" value="<?php if( isset( $message_data['link'] ) ) echo $message_data['link']; ?>" />
|
163 |
+
</p>
|
164 |
+
<p class="message_row <?php echo implode( ' ', $settings['icon'] )?>">
|
165 |
+
<label for="upload_image" class="message_label">
|
166 |
+
<strong><?php _e( 'Icon / Avatar Image', 'icegram' ); ?></strong>
|
167 |
+
<span class="help_tip admin_field_icon" data-tip="<?php _e( 'This image will appear in message content.', 'icegram' ); ?>"></span>
|
168 |
+
</label>
|
169 |
+
<input id="upload_image" type="text" class="message_field" name="message_data[<?php echo $message_id; ?>][icon]" value="<?php if( isset( $message_data['icon'] ) ) echo $message_data['icon']; ?>"/>
|
170 |
+
<a class="button message_image_button tips" data-tip="<?php _e( 'Upload / Select an image', 'icegram' ); ?>" onclick="tb_show('<?php _e( 'Upload / Select Image' ); ?>', 'media-upload.php?type=image&TB_iframe=true', false);" >
|
171 |
+
<span class="image-buttons-icon admin_field_icon"></span>
|
172 |
+
</a>
|
173 |
+
</p>
|
174 |
+
<?php
|
175 |
+
$default_text_color = ( !empty( $icegram->message_types[$message_data['type']]['settings']['text_color']['default'] ) ) ? $icegram->message_types[$message_data['type']]['settings']['text_color']['default'] : '';
|
176 |
+
$default_bg_color = ( !empty( $icegram->message_types[$message_data['type']]['settings']['bg_color']['default'] ) ) ? $icegram->message_types[$message_data['type']]['settings']['bg_color']['default'] : '';
|
177 |
+
$text_color = ( !empty( $message_data['text_color'] ) ) ? $message_data['text_color'] : $default_text_color;
|
178 |
+
$bg_color = ( !empty( $message_data['bg_color'] ) ) ? $message_data['bg_color'] : $default_bg_color;
|
179 |
+
?>
|
180 |
+
<p class="message_row <?php echo implode( ' ', $settings['bg_color'] )?>">
|
181 |
+
<label for="message_bg_color" class="message_label"><strong><?php _e( 'Backgound Color', 'icegram' ); ?></strong></label>
|
182 |
+
<input type="text" class="message_field color-field" name="message_data[<?php echo $message_id; ?>][bg_color]" id="message_bg_color" value="<?php echo $bg_color; ?>" data-default-color="<?php echo $default_bg_color; ?>" />
|
183 |
+
</p>
|
184 |
+
<p class="message_row <?php echo implode( ' ', $settings['text_color'] )?>">
|
185 |
+
<label for="message_text_color" class="message_label"><strong><?php _e( 'Text Color', 'icegram' ); ?></strong></label>
|
186 |
+
<input type="text" class="message_field color-field" name="message_data[<?php echo $message_id; ?>][text_color]" id="message_text_color" value="<?php echo $text_color; ?>" data-default-color="<?php echo $default_text_color; ?>" />
|
187 |
+
</p>
|
188 |
+
<?php
|
189 |
+
$editor_args = array(
|
190 |
+
'textarea_name' => 'message_data[' . $message_id . '][message]',
|
191 |
+
'textarea_rows' => 10,
|
192 |
+
'editor_class' => 'wp-editor-message',
|
193 |
+
'media_buttons' => true,
|
194 |
+
'tinymce' => true
|
195 |
+
);
|
196 |
+
?>
|
197 |
+
<p class="message_row <?php echo implode( ' ', $settings['message'] )?>">
|
198 |
+
<label for="message_body" class="message_body message_label"><strong><?php _e( 'Message Body', 'icegram' ); ?></strong></label>
|
199 |
+
<?php $message = ( !empty( $message_data['message'] ) ) ? $message_data['message'] : ''; ?>
|
200 |
+
<?php wp_editor( $message, 'edit'.$message_id, $editor_args ); ?>
|
201 |
+
</p>
|
202 |
+
<p class="message_row position <?php echo implode( ' ', $settings['position'] )?>">
|
203 |
+
<label for="message_position" class="message_label"><strong><?php _e( 'Position', 'icegram' ); ?></strong></label>
|
204 |
+
<span class="message_field location-selector message_label">
|
205 |
+
<input type="radio" id="radio01_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="00" <?php echo ( !empty( $message_data['position'] ) && "00" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
206 |
+
<label for="radio01_<?php echo $message_id;?>" title="Top Left">
|
207 |
+
<span class="location <?php if( !empty( $positions['00'] ) ) { echo implode( ' ', $positions['00'] ); } ?> top left" data-position="top left"></span>
|
208 |
+
</label>
|
209 |
+
<input type="radio" id="radio02_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="01" <?php echo ( !empty( $message_data['position'] ) && "01" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
210 |
+
<label for="radio02_<?php echo $message_id;?>" title="Top">
|
211 |
+
<span class="location <?php if( !empty( $positions['01'] ) ) { echo implode( ' ', $positions['01'] ); } ?> top" data-position="top"></span>
|
212 |
+
</label>
|
213 |
+
<input type="radio" id="radio03_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="02" <?php echo ( !empty( $message_data['position'] ) && "02" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
214 |
+
<label for="radio03_<?php echo $message_id;?>" title="Top Right">
|
215 |
+
<span class="location <?php if( !empty( $positions['02'] ) ) { echo implode( ' ', $positions['02'] ); } ?> top right" data-position="top right"></span>
|
216 |
+
</label>
|
217 |
+
<input type="radio" id="radio04_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="10" <?php echo ( !empty( $message_data['position'] ) && "10" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
218 |
+
<label for="radio04_<?php echo $message_id;?>" title="Middle Left">
|
219 |
+
<span class="location <?php if( !empty( $positions['10'] ) ) { echo implode( ' ', $positions['10'] ); } ?> middle left" data-position="middle left"></span>
|
220 |
+
</label>
|
221 |
+
<input type="radio" id="radio05_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="11" <?php echo ( !empty( $message_data['position'] ) && "11" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
222 |
+
<label for="radio05_<?php echo $message_id;?>" title="Middle">
|
223 |
+
<span class="location <?php if( !empty( $positions['11'] ) ) { echo implode( ' ', $positions['11'] ); } ?> middle middle" data-position="middle middle"></span>
|
224 |
+
</label>
|
225 |
+
<input type="radio" id="radio06_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="12" <?php echo ( !empty( $message_data['position'] ) && "12" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
226 |
+
<label for="radio06_<?php echo $message_id;?>" title="Middle Right">
|
227 |
+
<span class="location <?php if( !empty( $positions['12'] ) ) { echo implode( ' ', $positions['12'] ); } ?> middle right" data-position="middle right"></span>
|
228 |
+
</label>
|
229 |
+
<input type="radio" id="radio07_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="20" <?php echo ( !empty( $message_data['position'] ) && "20" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
230 |
+
<label for="radio07_<?php echo $message_id;?>" title="Bottom Left">
|
231 |
+
<span class="location <?php if( !empty( $positions['20'] ) ) { echo implode( ' ', $positions['20'] ); } ?> bottom left" data-position="bottom left"></span>
|
232 |
+
</label>
|
233 |
+
<input type="radio" id="radio08_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="21" <?php echo ( !empty( $message_data['position'] ) && "21" == $message_data['position'] || !isset( $message_data['position'] ) ) ? 'checked' : ''; ?> />
|
234 |
+
<label for="radio08_<?php echo $message_id;?>" title="Bottom">
|
235 |
+
<span class="location <?php if( !empty( $positions['21'] ) ) { echo implode( ' ', $positions['21'] ); } ?> bottom" data-position="bottom"></span>
|
236 |
+
</label>
|
237 |
+
<input type="radio" id="radio09_<?php echo $message_id;?>" name="message_data[<?php echo $message_id; ?>][position][ig_default]" value="22" <?php echo ( !empty( $message_data['position'] ) && "22" == $message_data['position'] ) ? 'checked' : ''; ?> />
|
238 |
+
<label for="radio09_<?php echo $message_id;?>" title="Bottom Right">
|
239 |
+
<span class="location <?php if( !empty( $positions['22'] ) ) { echo implode( ' ', $positions['22'] ); } ?> bottom right" data-position="bottom right"></span>
|
240 |
+
</label>
|
241 |
+
</span>
|
242 |
+
</p>
|
243 |
+
<?php
|
244 |
+
do_action( 'icegram_after_message_settings', $message_id, $message_data );
|
245 |
+
?>
|
246 |
+
</div>
|
247 |
+
<input type="hidden" name="message_data[<?php echo $message_id; ?>][id]" value="<?php echo $message_id; ?>">
|
248 |
+
<input type="hidden" class="message_id" name="message_id" value="<?php echo $message_id; ?>">
|
249 |
+
<?php
|
250 |
+
|
251 |
+
if( !empty( $action['message_id'] ) ) {
|
252 |
+
|
253 |
+
?></div>
|
254 |
+
<?php
|
255 |
+
if( !empty( $action['new_message_row'] ) && $action['new_message_row'] ) {
|
256 |
+
\_WP_Editors::enqueue_scripts();
|
257 |
+
// print_footer_scripts();
|
258 |
+
\_WP_Editors::editor_js();
|
259 |
+
}
|
260 |
+
|
261 |
+
} else {
|
262 |
+
|
263 |
+
?>
|
264 |
+
<span class="shortcode_description admin_field_icon"></span>
|
265 |
+
<?php
|
266 |
+
echo sprintf(__( 'You can insert <code>[%s]</code> wherever you want to show this message. We recommend running a campaign though.', 'icegram' ), 'icegram messages="' .$post->ID . '"' );
|
267 |
+
|
268 |
+
}
|
269 |
+
|
270 |
+
}
|
271 |
+
|
272 |
+
// Used to save the settings which are being made in the message form and added to message page appropriately
|
273 |
+
function update_message_settings( $post_id, $post ) {
|
274 |
+
|
275 |
+
if (empty( $post_id ) || empty( $post ) || empty( $_POST )) return;
|
276 |
+
if (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE) return;
|
277 |
+
if (is_int( wp_is_post_revision( $post ) )) return;
|
278 |
+
if (is_int( wp_is_post_autosave( $post ) )) return;
|
279 |
+
if ( empty( $_POST['icegram_message_meta_nonce'] ) || ! wp_verify_nonce( $_POST['icegram_message_meta_nonce'], 'icegram_message_save_data' ) ) return;
|
280 |
+
if (! current_user_can( 'edit_post', $post_id )) return;
|
281 |
+
if ($post->post_type != 'ig_message') return;
|
282 |
+
|
283 |
+
$message_data = $_POST['message_data'][$post_id];
|
284 |
+
$type = $message_data['type'];
|
285 |
+
|
286 |
+
if( isset( $message_data['theme'][$type] ) ) {
|
287 |
+
$message_data['theme'] = $message_data['theme'][$type];
|
288 |
+
} else {
|
289 |
+
unset( $message_data['theme'] );
|
290 |
+
}
|
291 |
+
if( isset( $message_data['animation'][$type] ) ) {
|
292 |
+
$message_data['animation'] = $message_data['animation'][$type];
|
293 |
+
} else {
|
294 |
+
unset( $message_data['animation'] );
|
295 |
+
}
|
296 |
+
if( isset( $message_data['position'][$type] ) ) {
|
297 |
+
$message_data['position'] = $message_data['position'][$type];
|
298 |
+
} elseif( isset( $message_data['position']['ig_default'] ) ) {
|
299 |
+
$message_data['position'] = $message_data['position']['ig_default'];
|
300 |
+
}
|
301 |
+
|
302 |
+
$message_data = apply_filters( 'icegram_update_message_data', $message_data, $post_id );
|
303 |
+
update_post_meta( $post_id, 'icegram_message_data', $message_data );
|
304 |
+
update_post_meta( $post_id, 'icegram_message_preview_data', $message_data );
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
// Additionally save message body content in post_content of post table
|
309 |
+
function save_message_in_post_content( $post_data ) {
|
310 |
+
|
311 |
+
if( !empty( $_POST['post_type'] ) && $_POST['post_type'] == 'ig_message' && !empty( $_POST['message_data'] ) ) {
|
312 |
+
$message_id = $_POST['ID'];
|
313 |
+
$post_data['post_content'] = $_POST['message_data'][$message_id]['message'];
|
314 |
+
|
315 |
+
if( isset( $_POST['message_data'][$message_id]['post_title'] ) ) {
|
316 |
+
|
317 |
+
if( !empty( $_POST['message_data'][$message_id]['post_title'] ) ) {
|
318 |
+
$post_data['post_title'] = $_POST['message_data'][$message_id]['post_title'];
|
319 |
+
} else {
|
320 |
+
$post_data['post_title'] = $_POST['message_data'][$message_id]['headline'];
|
321 |
+
}
|
322 |
+
|
323 |
+
}
|
324 |
+
}
|
325 |
+
return $post_data;
|
326 |
+
}
|
327 |
+
|
328 |
+
// Add message columns to message dashboard
|
329 |
+
function edit_columns( $existing_columns ) {
|
330 |
+
|
331 |
+
$date = $existing_columns['date'];
|
332 |
+
unset( $existing_columns['date'] );
|
333 |
+
|
334 |
+
$existing_columns['message_type'] = __( 'Type', 'icegram' );
|
335 |
+
$existing_columns['message_theme'] = __( 'Theme', 'icegram' );
|
336 |
+
$existing_columns['message_thumbnail'] = __( 'Thumbnail', 'icegram' );
|
337 |
+
$existing_columns['date'] = $date;
|
338 |
+
|
339 |
+
return apply_filters( 'icegram_manage_message_columns', $existing_columns );
|
340 |
+
|
341 |
+
}
|
342 |
+
|
343 |
+
// Add message columns data to message dashboard
|
344 |
+
function custom_columns( $column ) {
|
345 |
+
global $post ,$icegram;
|
346 |
+
|
347 |
+
if( ( is_object( $post ) && $post->post_type != 'ig_message' ) )
|
348 |
+
return;
|
349 |
+
|
350 |
+
$message_data = get_post_meta( $post->ID, 'icegram_message_data', true );
|
351 |
+
if ( empty( $message_data['type'] ) ) {
|
352 |
+
return;
|
353 |
+
}
|
354 |
+
$class_name = 'Icegram_Message_Type_' . str_replace(' ', '_', ucwords(str_replace('-', ' ', $message_data['type'])));
|
355 |
+
if( !class_exists( $class_name ) ) {
|
356 |
+
return;
|
357 |
+
}
|
358 |
+
$type = ucwords( str_replace( "-", ' ', $message_data['type'] ) );
|
359 |
+
$theme = ucwords( str_replace( "-", ' ', $message_data['theme'] ) );
|
360 |
+
$bg_img = $icegram->message_types[$message_data['type']]['baseurl'] . "/themes/" . $message_data['theme'] . ".png";
|
361 |
+
|
362 |
+
switch ($column) {
|
363 |
+
case 'message_type':
|
364 |
+
echo $type;
|
365 |
+
break;
|
366 |
+
|
367 |
+
case 'message_theme':
|
368 |
+
echo $theme;
|
369 |
+
break;
|
370 |
+
|
371 |
+
case 'message_thumbnail':
|
372 |
+
echo "<img src='$bg_img' style='max-width: 200px; max-height: 100px;'>";
|
373 |
+
break;
|
374 |
+
|
375 |
+
default:
|
376 |
+
do_action( 'icegram_manage_message_custom_column', $column, $message_data );
|
377 |
+
break;
|
378 |
+
|
379 |
+
}
|
380 |
+
|
381 |
+
}
|
382 |
+
|
383 |
+
// Create array for settings based on message types
|
384 |
+
function message_settings_to_show() {
|
385 |
+
|
386 |
+
global $icegram;
|
387 |
+
$settings = array();
|
388 |
+
foreach ( $icegram->message_types as $type => $value ) {
|
389 |
+
foreach ( $value['settings'] as $setting => $property ) {
|
390 |
+
$settings[$setting][] = $type;
|
391 |
+
}
|
392 |
+
}
|
393 |
+
return apply_filters( 'icegram_message_settings_to_show', $settings );
|
394 |
+
|
395 |
+
}
|
396 |
+
|
397 |
+
// Create array for positions available for all message types
|
398 |
+
function message_positions_to_show() {
|
399 |
+
|
400 |
+
global $icegram;
|
401 |
+
$positions = array();
|
402 |
+
foreach ( $icegram->message_types as $type => $value ) {
|
403 |
+
if( empty( $value['settings']['position'] ) )
|
404 |
+
continue;
|
405 |
+
|
406 |
+
if( !empty( $value['settings']['position']['values'] ) ) {
|
407 |
+
foreach ( $value['settings']['position']['values'] as $position ) {
|
408 |
+
$positions[$position][] = $type;
|
409 |
+
}
|
410 |
+
}
|
411 |
+
}
|
412 |
+
return apply_filters( 'icegram_message_positions_to_show', $positions );
|
413 |
+
|
414 |
+
}
|
415 |
+
|
416 |
+
// Default message data for newly created message
|
417 |
+
function default_message_data( $message_type = '' ) {
|
418 |
+
|
419 |
+
global $icegram;
|
420 |
+
$default_themes = array();
|
421 |
+
foreach ( $icegram->message_types as $type => $value ) {
|
422 |
+
if( isset( $value['settings']['theme']['default'] ) ) {
|
423 |
+
$default_themes[$type] = $value['settings']['theme']['default'];
|
424 |
+
}
|
425 |
+
}
|
426 |
+
if( !empty( $message_type ) ) {
|
427 |
+
$default_message = $icegram->message_types[$message_type];
|
428 |
+
} else {
|
429 |
+
$default_message = reset( $icegram->message_types );
|
430 |
+
}
|
431 |
+
$default_message_data = array( 'type' => $default_message['type'],
|
432 |
+
'position' => ( !empty( $default_message['settings']['position']['values'][0] ) ) ? $default_message['settings']['position']['values'][0] : '',
|
433 |
+
'text_color' => ( !empty( $default_message['settings']['text_color']['default'] ) ) ? $default_message['settings']['text_color']['default'] : '',
|
434 |
+
'bg_color' => ( !empty( $default_message['settings']['bg_color']['default'] ) ) ? $default_message['settings']['bg_color']['default'] : '',
|
435 |
+
'theme' => $default_themes
|
436 |
+
);
|
437 |
+
return apply_filters( 'icegram_default_message_data', $default_message_data );
|
438 |
+
|
439 |
+
}
|
440 |
+
|
441 |
+
// All headline to generate randomly for messages
|
442 |
+
function available_headlines( $available_headlines = array() ) {
|
443 |
+
$available_headlines = array_merge( $available_headlines, array(
|
444 |
+
__( 'Here Is A Method That Is Helping ____ To ____', 'icegram' ),
|
445 |
+
__( '__ Little Known Ways To ____', 'icegram' ),
|
446 |
+
__( 'Get Rid Of ____ Once And For All', 'icegram' ),
|
447 |
+
__( 'How To ____ So You Can ____', 'icegram' ),
|
448 |
+
__( 'They Didn\'t Think I Could ____, But I Did', 'icegram' ),
|
449 |
+
__( 'How ____ Made Me ____', 'icegram' ),
|
450 |
+
__( 'Are You ____ ?', 'icegram' ),
|
451 |
+
__( 'Warning: ____ !', 'icegram' ),
|
452 |
+
__( 'Do You Make These Mistakes With ____ ?', 'icegram' ),
|
453 |
+
__( '7 Ways To ____', 'icegram' ),
|
454 |
+
__( 'If You\'re ____, You Can ____', 'icegram' ),
|
455 |
+
__( 'Turn your ____ into a ____', 'icegram' ),
|
456 |
+
__( 'Want To Be A ____?', 'icegram' ),
|
457 |
+
__( 'The Ugly Truth About Your Beautiful ____', 'icegram' ),
|
458 |
+
__( 'The Secret to ____ Is Simply ____!', 'icegram' ),
|
459 |
+
__( 'The Quickest Way I Know To ____', 'icegram' ),
|
460 |
+
__( 'The Lazy Man\'s Way To ____', 'icegram' ),
|
461 |
+
__( 'The Amazing Story Of ____ That Requires So Little Of ____ You Could ____', 'icegram' ),
|
462 |
+
__( 'The Amazing Secret Of The ____ Genius Who Is Afraid Of ____', 'icegram' ),
|
463 |
+
__( 'The 10 Wackiest Ideas That ____... And How You Can Too!', 'icegram' ),
|
464 |
+
__( 'The Inside Secrets To ____ With Crazy, Outlandish And Outrageous ____', 'icegram' ),
|
465 |
+
__( '____ Like A ____', 'icegram' ),
|
466 |
+
__( 'Remember When You Could Have ____, And You Didn\'t?', 'icegram' ),
|
467 |
+
__( 'Is The ____ Worth $x To You?', 'icegram' ),
|
468 |
+
__( 'Increase your ____, reduce ____, maintain ____ and ____ with ____', 'icegram' ),
|
469 |
+
__( 'If You Can ____ You Can ____', 'icegram' ),
|
470 |
+
__( 'I Discovered How To ____... Now I\'m Revealing My Secret', 'icegram' ),
|
471 |
+
__( 'How To Turn Your ____ Into The Most ____', 'icegram' ),
|
472 |
+
__( 'How To Take The Headache Out Of ____', 'icegram' ),
|
473 |
+
__( 'How To ____ ... Legally', 'icegram' ),
|
474 |
+
__( 'How To ____ That ____', 'icegram' ),
|
475 |
+
__( 'How To Discover The ____ That Lies Hidden In Your ____', 'icegram' ),
|
476 |
+
__( 'How To ____ Even When Your Not ____', 'icegram' ),
|
477 |
+
__( '____ With No ____!', 'icegram' ),
|
478 |
+
__( 'Greatest Goldmine of ____ Ever Jammed Into One Big ____', 'icegram' ),
|
479 |
+
__( 'Free ____ Tells How To Get Better ____', 'icegram' ),
|
480 |
+
__( 'FREE ____ Worth $____ for the first 100 People to take Advantage of this Offer', 'icegram' ),
|
481 |
+
__( 'Don\'t Try This With Any Other ____', 'icegram' ),
|
482 |
+
__( 'Do You Honestly Want To ____?', 'icegram' ),
|
483 |
+
__( 'Discover The Magic ____ That Will Bring You ____ & ____!', 'icegram' ),
|
484 |
+
__( '____ Man Reveals A Short-Cut To ____', 'icegram' ),
|
485 |
+
__( 'Confessions Of A ____', 'icegram' ),
|
486 |
+
__( 'Are You Ready To ____?', 'icegram' ),
|
487 |
+
__( 'An Open Letter To Everyone Who ____ More Than ____ Per ____', 'icegram' ),
|
488 |
+
__( 'An Amazing ____ You Can Carry In Your ____', 'icegram' ),
|
489 |
+
__( '21 Secret ____ that will ____... NOW!', 'icegram' )
|
490 |
+
) );
|
491 |
+
return $available_headlines;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
}
|
classes/class-icegram-message-type.php
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
if ( class_exists( 'Icegram_Message_Type' ) ) return;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Icegram_Message_Type
|
7 |
+
*/
|
8 |
+
abstract class Icegram_Message_Type {
|
9 |
+
|
10 |
+
var $type;
|
11 |
+
var $name;
|
12 |
+
var $basedir;
|
13 |
+
var $baseurl;
|
14 |
+
var $settings;
|
15 |
+
|
16 |
+
function __construct( $basedir = '', $baseurl = '' ) {
|
17 |
+
$class_name = get_class($this);
|
18 |
+
$base = 'Icegram_Message_Type_';
|
19 |
+
if ( strpos($class_name, $base) === 0 ) {
|
20 |
+
$class_name = str_replace($base, '', $class_name);
|
21 |
+
$this->type = str_replace( '_', '-', strtolower($class_name) );
|
22 |
+
$this->name = ucwords( str_replace( "-", ' ', $this->type ) );
|
23 |
+
$this->basedir = $basedir;
|
24 |
+
$this->baseurl = $baseurl;
|
25 |
+
|
26 |
+
add_filter('icegram_message_types', array( $this, 'init') );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
function meets_guidelines() {
|
31 |
+
if (empty($this->type) || empty($this->name) || !is_dir($this->basedir) ) {
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
if (!is_file( $this->basedir . '/default.css') || !is_file( $this->basedir . '/main.js') ) {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
return true;
|
38 |
+
}
|
39 |
+
|
40 |
+
function init( $message_types = array() ) {
|
41 |
+
|
42 |
+
if (! $this->meets_guidelines() ) {
|
43 |
+
return $message_types;
|
44 |
+
}
|
45 |
+
|
46 |
+
// Load themes
|
47 |
+
$theme_files = (array) glob( $this->basedir . '/themes/*.css' );
|
48 |
+
// Allow other plugins to add themes
|
49 |
+
$theme_files = apply_filters( 'icegram_message_type_themes_' + $this->type, $theme_files );
|
50 |
+
|
51 |
+
if( empty( $theme_files ) ) {
|
52 |
+
$theme_files[] = $this->basedir . '/default.css';
|
53 |
+
}
|
54 |
+
|
55 |
+
$themes = array();
|
56 |
+
if( !empty( $theme_files ) ) {
|
57 |
+
foreach ( $theme_files as $file ) {
|
58 |
+
if (is_file ( $file )) {
|
59 |
+
$theme = str_replace( ".css", "", basename( $file ) );
|
60 |
+
$themes[ $theme ] = array(
|
61 |
+
'name' => ucwords( str_replace( "-", ' ', $theme ) ),
|
62 |
+
'type' => $theme,
|
63 |
+
'basedir' => $this->basedir . '/themes/',
|
64 |
+
'baseurl' => $this->baseurl . '/themes/'
|
65 |
+
);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
$this->define_settings();
|
71 |
+
|
72 |
+
$params = array(
|
73 |
+
'name' => $this->name,
|
74 |
+
'type' => $this->type,
|
75 |
+
'basedir' => $this->basedir,
|
76 |
+
'baseurl' => $this->baseurl,
|
77 |
+
'themes' => $themes,
|
78 |
+
'settings' => $this->settings
|
79 |
+
);
|
80 |
+
|
81 |
+
$params = apply_filters( 'icegram_message_type_params_' . $this->type, $params );
|
82 |
+
|
83 |
+
$message_types[ $this->type ] = $params;
|
84 |
+
return $message_types;
|
85 |
+
}
|
86 |
+
|
87 |
+
function define_settings() {
|
88 |
+
|
89 |
+
$this->settings = array(
|
90 |
+
'animation' => array( 'type' => 'select' ),
|
91 |
+
'theme' => array( 'type' => 'select' ),
|
92 |
+
'headline' => array( 'type' => 'text' ),
|
93 |
+
'message' => array( 'type' => 'editor' ),
|
94 |
+
'label' => array( 'type' => 'text' ),
|
95 |
+
'link' => array( 'type' => 'text' ),
|
96 |
+
'icon' => array( 'type' => 'text' ),
|
97 |
+
'bg_color' => array( 'type' => 'color' ),
|
98 |
+
'text_color' => array( 'type' => 'color' ),
|
99 |
+
'position' => array( 'type' => 'position' )
|
100 |
+
);
|
101 |
+
|
102 |
+
}
|
103 |
+
}
|
classes/class-icegram-message.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
/**
|
4 |
+
* Icegram Message class
|
5 |
+
*/
|
6 |
+
if ( !class_exists( 'Icegram_Message' ) ) {
|
7 |
+
|
8 |
+
class Icegram_Message {
|
9 |
+
|
10 |
+
var $_post;
|
11 |
+
var $title;
|
12 |
+
var $message_data;
|
13 |
+
|
14 |
+
function __construct( $message_id = '' ) {
|
15 |
+
|
16 |
+
if ( !empty( $message_id ) ) {
|
17 |
+
$this->_post = get_post( $message_id );
|
18 |
+
$this->title = $this->_post->post_title;
|
19 |
+
$this->message_data = get_post_meta( $this->_post->ID, 'icegram_message_data', true );
|
20 |
+
}
|
21 |
+
}
|
22 |
+
}
|
23 |
+
}
|
classes/class-wp-campaign.php
DELETED
@@ -1,558 +0,0 @@
|
|
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 — ', 'icegram' ) . '</label>
|
68 |
-
<select id="icegram_messages" name="icegram_messages[]" class="ajax_chosen_select_messages" data-placeholder="' . __( 'Search to add / Create new…', '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', '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>', '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', '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', 'icegram' )?>
|
118 |
-
</td>
|
119 |
-
<td class="action_links">
|
120 |
-
<span class="actions message_edit" title="<?php _e( 'Edit Message', 'icegram' ); ?>" ></span>
|
121 |
-
<span class="actions message_delete" title="<?php _e( 'Remove from Campaign', '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.', '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 . ' — ' . $message_title;
|
196 |
-
|
197 |
-
}
|
198 |
-
$found_messages[''] = __( '- - - - - - - - - - - - - - - - - - - - - - - - - -', 'icegram' );
|
199 |
-
}
|
200 |
-
|
201 |
-
foreach ( $promotype as $key => $value ) {
|
202 |
-
$found_messages[ $key ] = __( 'Create new', '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', 'icegram' ); ?></th>
|
216 |
-
<th class="message_title"><?php _e( 'Name', 'icegram' ); ?></th>
|
217 |
-
<th class="message_seconds"><?php _e( 'Show after', 'icegram' ); ?></th>
|
218 |
-
<th class="action_links"><?php _e( 'Actions', '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', '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', 'icegram' )?>
|
260 |
-
</td>
|
261 |
-
<td class="action_links">
|
262 |
-
<span class="actions message_edit" title="<?php _e( 'Edit Message', 'icegram' ); ?>" ></span>
|
263 |
-
<span class="actions message_delete" title="<?php _e( 'Remove from Campaign', '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?', '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', 'icegram' ); ?>
|
297 |
-
</label>
|
298 |
-
</p>
|
299 |
-
<p class="form-field">
|
300 |
-
<label class="options_header"> </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', 'icegram' ); ?>
|
304 |
-
</label>
|
305 |
-
</p>
|
306 |
-
<p class="form-field">
|
307 |
-
<label class="options_header"> </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', '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"> </label>
|
315 |
-
<?php
|
316 |
-
echo '<select name="page_id[]" id="where_page_id" data-placeholder="' . __( 'Select a page…', '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.', '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?', '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', 'icegram' ); ?>
|
340 |
-
</label>
|
341 |
-
</p>
|
342 |
-
<p class="form-field">
|
343 |
-
<label class="options_header"> </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', '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…', '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…', '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?', 'icegram' ); ?></label>
|
361 |
-
<label for="device_mobile" class="device" title="<?php _e( 'Mobile / Smartphones', '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', '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', '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?', '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', 'icegram' ); ?>
|
381 |
-
</label>
|
382 |
-
</p>
|
383 |
-
<p class="form-field">
|
384 |
-
<label class="options_header"> </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', '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"> </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…', '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', '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', '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
DELETED
@@ -1,476 +0,0 @@
|
|
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', 'icegram' );
|
73 |
-
$existing_columns['message_theme'] = __( 'Theme', 'icegram' );
|
74 |
-
$existing_columns['message_thumbnail'] = __( 'Thumbnail', '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', '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', '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', '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', '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', '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.', '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', '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', 'icegram' ); ?></strong>
|
252 |
-
<span class="help_tip admin_field_icon" data-tip="<?php _e( 'Your call to action text. Something unusual will increase conversions.', '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', 'icegram' ); ?></strong>
|
259 |
-
<span class="help_tip admin_field_icon" data-tip="<?php _e( 'Enter destination URL here. Clicking will redirect to this link.', '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', 'icegram' ); ?></strong>
|
266 |
-
<span class="help_tip admin_field_icon" data-tip="<?php _e( 'This image will appear in message content.', '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', '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', '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', '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', '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', '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.', '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 ____', 'icegram' ),
|
425 |
-
__( '__ Little Known Ways To ____', 'icegram' ),
|
426 |
-
__( 'Get Rid Of ____ Once And For All', 'icegram' ),
|
427 |
-
__( 'How To ____ So You Can ____', 'icegram' ),
|
428 |
-
__( 'They Didn\'t Think I Could ____, But I Did', 'icegram' ),
|
429 |
-
__( 'How ____ Made Me ____', 'icegram' ),
|
430 |
-
__( 'Are You ____ ?', 'icegram' ),
|
431 |
-
__( 'Warning: ____ !', 'icegram' ),
|
432 |
-
__( 'Do You Make These Mistakes With ____ ?', 'icegram' ),
|
433 |
-
__( '7 Ways To ____', 'icegram' ),
|
434 |
-
__( 'If You\'re ____, You Can ____', 'icegram' ),
|
435 |
-
__( 'Turn your ____ into a ____', 'icegram' ),
|
436 |
-
__( 'Want To Be A ____?', 'icegram' ),
|
437 |
-
__( 'The Ugly Truth About Your Beautiful ____', 'icegram' ),
|
438 |
-
__( 'The Secret to ____ Is Simply ____!', 'icegram' ),
|
439 |
-
__( 'The Quickest Way I Know To ____', 'icegram' ),
|
440 |
-
__( 'The Lazy Man\'s Way To ____', 'icegram' ),
|
441 |
-
__( 'The Amazing Story Of ____ That Requires So Little Of ____ You Could ____', 'icegram' ),
|
442 |
-
__( 'The Amazing Secret Of The ____ Genius Who Is Afraid Of ____', 'icegram' ),
|
443 |
-
__( 'The 10 Wackiest Ideas That ____... And How You Can Too!', 'icegram' ),
|
444 |
-
__( 'The Inside Secrets To ____ With Crazy, Outlandish And Outrageous ____', 'icegram' ),
|
445 |
-
__( '____ Like A ____', 'icegram' ),
|
446 |
-
__( 'Remember When You Could Have ____, And You Didn\'t?', 'icegram' ),
|
447 |
-
__( 'Is The ____ Worth $x To You?', 'icegram' ),
|
448 |
-
__( 'Increase your ____, reduce ____, maintain ____ and ____ with ____', 'icegram' ),
|
449 |
-
__( 'If You Can ____ You Can ____', 'icegram' ),
|
450 |
-
__( 'I Discovered How To ____... Now I\'m Revealing My Secret', 'icegram' ),
|
451 |
-
__( 'How To Turn Your ____ Into The Most ____', 'icegram' ),
|
452 |
-
__( 'How To Take The Headache Out Of ____', 'icegram' ),
|
453 |
-
__( 'How To ____ ... Legally', 'icegram' ),
|
454 |
-
__( 'How To ____ That ____', 'icegram' ),
|
455 |
-
__( 'How To Discover The ____ That Lies Hidden In Your ____', 'icegram' ),
|
456 |
-
__( 'How To ____ Even When Your Not ____', 'icegram' ),
|
457 |
-
__( '____ With No ____!', 'icegram' ),
|
458 |
-
__( 'Greatest Goldmine of ____ Ever Jammed Into One Big ____', 'icegram' ),
|
459 |
-
__( 'Free ____ Tells How To Get Better ____', 'icegram' ),
|
460 |
-
__( 'FREE ____ Worth $____ for the first 100 People to take Advantage of this Offer', 'icegram' ),
|
461 |
-
__( 'Don\'t Try This With Any Other ____', 'icegram' ),
|
462 |
-
__( 'Do You Honestly Want To ____?', 'icegram' ),
|
463 |
-
__( 'Discover The Magic ____ That Will Bring You ____ & ____!', 'icegram' ),
|
464 |
-
__( '____ Man Reveals A Short-Cut To ____', 'icegram' ),
|
465 |
-
__( 'Confessions Of A ____', 'icegram' ),
|
466 |
-
__( 'Are You Ready To ____?', 'icegram' ),
|
467 |
-
__( 'An Open Letter To Everyone Who ____ More Than ____ Per ____', 'icegram' ),
|
468 |
-
__( 'An Amazing ____ You Can Carry In Your ____', 'icegram' ),
|
469 |
-
__( '21 Secret ____ that will ____... NOW!', 'icegram' )
|
470 |
-
) );
|
471 |
-
return $available_headlines;
|
472 |
-
}
|
473 |
-
|
474 |
-
}
|
475 |
-
|
476 |
-
$GLOBALS['wp_message'] = new WP_Message();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
icegram.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Icegram
|
4 |
* Plugin URI: http://www.icegram.com/
|
5 |
* Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
|
6 |
-
* Version: 1.
|
7 |
* Author: Icegram
|
8 |
* Author URI: http://www.icegram.com/
|
9 |
*
|
@@ -22,39 +22,155 @@ class Icegram {
|
|
22 |
|
23 |
var $plugin_url;
|
24 |
var $plugin_path;
|
|
|
25 |
var $_wpautop_tags;
|
|
|
|
|
|
|
|
|
|
|
26 |
public static $current_page_id;
|
27 |
|
28 |
function __construct() {
|
29 |
|
30 |
-
$this->
|
|
|
31 |
$this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
|
32 |
$this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
|
|
34 |
add_action( 'init', array( &$this, 'register_campaign_post_type' ) );
|
35 |
add_action( 'init', array( &$this, 'register_message_post_type' ) );
|
36 |
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
public function icegram_event_track() {
|
54 |
|
55 |
if( !empty( $_POST['event_data'] ) ) {
|
56 |
|
57 |
-
$messages_shown = (array)
|
58 |
|
59 |
foreach ( $_POST['event_data'] as $event ) {
|
60 |
switch ($event['type']) {
|
@@ -74,9 +190,8 @@ class Icegram {
|
|
74 |
}
|
75 |
}
|
76 |
$messages_shown = array_values ( array_filter ( array_unique($messages_shown) ) );
|
77 |
-
setcookie('icegram_messages_shown',
|
78 |
exit();
|
79 |
-
|
80 |
}
|
81 |
|
82 |
static function install() {
|
@@ -86,6 +201,8 @@ class Icegram {
|
|
86 |
}
|
87 |
|
88 |
public function welcome() {
|
|
|
|
|
89 |
// Bail if no activation redirect transient is set
|
90 |
if ( false === get_option( '_icegram_activation_redirect' ) )
|
91 |
return;
|
@@ -93,17 +210,29 @@ class Icegram {
|
|
93 |
// Delete the redirect transient
|
94 |
delete_option( '_icegram_activation_redirect' );
|
95 |
|
96 |
-
wp_redirect( admin_url( 'edit.php?post_type=
|
97 |
exit;
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
public function admin_menus() {
|
101 |
|
102 |
-
$welcome_page_title
|
|
|
103 |
$menu_title = __( 'Docs & Support', 'icegram' );
|
104 |
-
$about
|
|
|
105 |
|
106 |
add_action( 'admin_print_styles-'. $about, array( $this, 'admin_css' ) );
|
|
|
107 |
|
108 |
}
|
109 |
|
@@ -112,137 +241,192 @@ class Icegram {
|
|
112 |
}
|
113 |
|
114 |
public function about_screen() {
|
115 |
-
global $icegram;
|
116 |
|
117 |
// Import data if not done already
|
118 |
if( false === get_option( 'icegram_sample_data_imported' ) ) {
|
119 |
-
$
|
120 |
}
|
121 |
|
122 |
include ( 'about-icegram.php' );
|
123 |
}
|
124 |
|
125 |
-
function
|
126 |
-
|
127 |
-
|
128 |
-
extract( shortcode_atts( array(
|
129 |
-
'campaigns' => '',
|
130 |
-
'messages' => ''
|
131 |
-
), $atts ) );
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
$
|
136 |
-
$
|
137 |
-
|
|
|
|
|
138 |
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
-
|
145 |
-
$
|
|
|
146 |
}
|
147 |
|
148 |
-
|
|
|
|
|
149 |
return;
|
|
|
150 |
|
151 |
-
$messages_shown = (array)
|
|
|
152 |
|
153 |
foreach ( $messages as $key => $message_data ) {
|
154 |
|
|
|
|
|
|
|
|
|
|
|
155 |
if( !empty( $message_data['id'] ) &&
|
156 |
empty( $_GET['campaign_preview_id'] ) &&
|
157 |
in_array( $message_data['id'], $messages_shown ) &&
|
158 |
!empty( $message_data['retargeting'] ) &&
|
159 |
$message_data['retargeting'] == 'yes'
|
160 |
) {
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
|
|
|
|
|
165 |
// Our own implementation so WP does not mess with script, style and pre tags
|
166 |
add_filter('the_content', array( $this, 'before_wpautop' ) , 9);
|
167 |
add_filter('the_content', array( $this, 'after_wpautop' ) , 11);
|
168 |
$messages[$key]['message'] = apply_filters( 'the_content', $message_data['message'] );
|
169 |
remove_filter('the_content', array( $this, 'before_wpautop' ) , 9);
|
170 |
remove_filter('the_content', array( $this, 'after_wpautop' ) , 11);
|
171 |
-
$this->get_template( $message_data );
|
172 |
}
|
173 |
|
174 |
if( empty( $messages ) )
|
175 |
return;
|
176 |
|
177 |
-
wp_register_script( '
|
178 |
-
wp_enqueue_style( '
|
179 |
wp_enqueue_style( 'dashicons' );
|
180 |
-
wp_enqueue_script( 'thickbox' );
|
181 |
-
wp_enqueue_style( 'thickbox' );
|
182 |
|
183 |
$icegram_default = apply_filters( 'icegram_branding_data',
|
184 |
-
array ( '
|
185 |
-
'powered_by_logo' => '',
|
186 |
-
'powered_by_text' => ''
|
187 |
) );
|
188 |
-
$
|
|
|
189 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
190 |
'preview_id' => !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '',
|
191 |
-
'
|
192 |
);
|
193 |
-
|
194 |
-
|
195 |
-
wp_enqueue_script( 'icegram_frontend_script' );
|
196 |
-
wp_localize_script( 'icegram_frontend_script', 'icegram_data', $icegram );
|
197 |
}
|
198 |
-
|
199 |
-
}
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
-
|
209 |
-
|
|
|
|
|
210 |
}
|
211 |
|
212 |
-
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
}
|
216 |
|
217 |
function enqueue_admin_styles_and_scripts() {
|
218 |
|
219 |
-
$screen = get_current_screen();
|
220 |
-
if ( !in_array( $screen->id, array( '
|
221 |
|
222 |
// Register scripts
|
223 |
wp_register_script( 'icegram_writepanel', $this->plugin_url . '/assets/js/admin.js' , array ( 'jquery', 'wp-color-picker' ) );
|
224 |
-
wp_register_script( '
|
225 |
-
wp_register_script( 'icegram_chosen', $this->plugin_url . '/assets/js/chosen.jquery.js' , array ( 'jquery' ), '1.0' );
|
226 |
wp_register_script( 'icegram_ajax-chosen', $this->plugin_url . '/assets/js/ajax-chosen.jquery.min.js' , array ( 'icegram_chosen' ), '1.0' );
|
227 |
wp_register_script( 'icegram_tiptip', $this->plugin_url . '/assets/js/jquery.tipTip.min.js' , array ( 'jquery' ), get_bloginfo( 'version' ) );
|
228 |
|
229 |
wp_enqueue_script( 'icegram_writepanel' );
|
230 |
-
wp_enqueue_script( 'icegram_frontend_script' );
|
231 |
wp_enqueue_script( 'icegram_ajax-chosen' );
|
232 |
wp_enqueue_script( 'icegram_tiptip' );
|
233 |
wp_enqueue_script( 'thickbox' );
|
234 |
|
235 |
-
$
|
236 |
-
$
|
237 |
-
$
|
238 |
|
239 |
-
wp_localize_script( 'icegram_writepanel', 'icegram_writepanel_params', $
|
240 |
|
241 |
wp_enqueue_style( 'thickbox' );
|
|
|
242 |
wp_enqueue_style( 'wp-color-picker' );
|
243 |
wp_enqueue_style( 'icegram_admin_styles', $this->plugin_url . '/assets/css/admin.css' );
|
244 |
-
wp_enqueue_style( 'icegram_jquery-ui-style', $this->plugin_url . '/assets/css/jquery-ui.css' );
|
245 |
-
wp_enqueue_style( 'icegram_chosen_styles', $this->plugin_url . '/assets/css/chosen.css' );
|
246 |
|
247 |
if ( !wp_script_is( 'jquery-ui-datepicker' ) ) {
|
248 |
wp_enqueue_script( 'jquery-ui-datepicker' );
|
@@ -304,112 +488,182 @@ class Icegram {
|
|
304 |
function get_message_data( $message_ids = array(), $preview = false ) {
|
305 |
global $wpdb;
|
306 |
|
|
|
307 |
$meta_key = $preview ? 'icegram_message_preview_data' : 'icegram_message_data';
|
308 |
$message_data_query = "SELECT post_id, meta_value FROM {$wpdb->prefix}postmeta WHERE meta_key LIKE '$meta_key'";
|
309 |
if ( !empty( $message_ids ) && is_array( $message_ids ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
$message_data_query .= " AND post_id IN ( " . implode( ',', $message_ids ) . " )";
|
311 |
}
|
|
|
312 |
$message_data_results = $wpdb->get_results( $message_data_query, 'ARRAY_A' );
|
313 |
$message_data = array();
|
314 |
foreach ( $message_data_results as $message_data_result ) {
|
315 |
$message_data[$message_data_result['post_id']] = maybe_unserialize( $message_data_result['meta_value'] );
|
316 |
}
|
317 |
-
|
318 |
return $message_data;
|
319 |
}
|
320 |
|
321 |
-
function get_valid_messages( $message_ids = array(), $campaign_ids = array(), $
|
322 |
-
|
323 |
-
$valid_message_data = $this->get_message_data( array(), $preview );
|
324 |
|
325 |
-
$valid_messages
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
$
|
337 |
-
if ( !empty( $message_data ) ) {
|
338 |
-
$message_data['delay_time'] = $message['time'];
|
339 |
-
$message_data['campaign_id'] = !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '';
|
340 |
-
$message_data['retargeting'] = '';
|
341 |
-
$valid_messages[] = $message_data;
|
342 |
-
}
|
343 |
-
}
|
344 |
-
} else {
|
345 |
-
foreach ( $message_ids as $message_id ) {
|
346 |
-
if ( empty( $valid_message_data[$message_id] ) ) continue;
|
347 |
-
$message_data = $valid_message_data[$message_id];
|
348 |
-
if ( !empty( $message_data ) ) {
|
349 |
-
$message_data['delay_time'] = 0;
|
350 |
-
$message_data['campaign_id'] = '';
|
351 |
-
$message_data['retargeting'] = '';
|
352 |
-
$valid_messages[] = $message_data;
|
353 |
-
}
|
354 |
}
|
355 |
}
|
356 |
}
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
|
|
|
|
|
|
361 |
}
|
362 |
-
}
|
363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
}
|
365 |
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
}
|
|
|
|
|
379 |
}
|
380 |
}
|
|
|
381 |
}
|
382 |
|
|
|
383 |
return $valid_messages;
|
384 |
-
|
385 |
}
|
386 |
|
387 |
-
function get_valid_campaigns( $campaign_ids = array() ) {
|
388 |
global $wpdb;
|
389 |
|
390 |
if ( empty( $campaign_ids ) ) {
|
391 |
-
$
|
392 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
394 |
$valid_campaigns = array();
|
395 |
-
foreach ( $campaign_ids as $campaign_id ) {
|
396 |
-
|
397 |
-
$campaign
|
398 |
-
if ( $campaign->is_valid() ) {
|
399 |
$valid_campaigns[$campaign_id] = $campaign;
|
|
|
|
|
400 |
}
|
401 |
}
|
402 |
return $valid_campaigns;
|
403 |
}
|
404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
// Include all classes required for Icegram plugin
|
406 |
function include_classes() {
|
407 |
|
408 |
-
|
409 |
-
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
-
|
412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
|
414 |
}
|
415 |
|
@@ -439,7 +693,7 @@ class Icegram {
|
|
439 |
'show_ui' => true,
|
440 |
'show_in_menu' => true,
|
441 |
'query_var' => true,
|
442 |
-
'rewrite' => array( 'slug' => '
|
443 |
'capability_type' => 'post',
|
444 |
'has_archive' => true,
|
445 |
'hierarchical' => false,
|
@@ -447,10 +701,10 @@ class Icegram {
|
|
447 |
'supports' => array( 'title', 'editor' )
|
448 |
);
|
449 |
|
450 |
-
register_post_type( '
|
451 |
}
|
452 |
|
453 |
-
// Register Message
|
454 |
function register_message_post_type() {
|
455 |
$labels = array(
|
456 |
'name' => __( 'Messages', 'icegram' ),
|
@@ -473,9 +727,9 @@ class Icegram {
|
|
473 |
'public' => true,
|
474 |
'publicly_queryable' => true,
|
475 |
'show_ui' => true,
|
476 |
-
'show_in_menu' => 'edit.php?post_type=
|
477 |
'query_var' => true,
|
478 |
-
'rewrite' => array( 'slug' => '
|
479 |
'capability_type' => 'post',
|
480 |
'has_archive' => true,
|
481 |
'hierarchical' => false,
|
@@ -483,27 +737,24 @@ class Icegram {
|
|
483 |
'supports' => array( 'title' )
|
484 |
);
|
485 |
|
486 |
-
register_post_type( '
|
487 |
}
|
488 |
|
489 |
function import( $data = array() ) {
|
490 |
|
491 |
if ( empty( $data['campaigns'] ) && empty( $data['messages'] ) ) return;
|
492 |
-
|
493 |
-
$
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
$default_themes[ $message_type ] = $first_theme;
|
502 |
-
|
503 |
}
|
504 |
|
505 |
$new_campaign_ids = array();
|
506 |
-
|
507 |
foreach ( (array) $data['campaigns'] as $campaign ) {
|
508 |
|
509 |
$args = array(
|
@@ -511,10 +762,10 @@ class Icegram {
|
|
511 |
'post_name' => ( !empty( $campaign['post_title'] ) ) ? sanitize_title( $campaign['post_title'] ) : '',
|
512 |
'post_title' => ( !empty( $campaign['post_title'] ) ) ? $campaign['post_title'] : '',
|
513 |
'post_status' => ( !empty( $campaign['post_status'] ) ) ? $campaign['post_status'] : 'draft',
|
514 |
-
'post_type' => '
|
515 |
);
|
516 |
|
517 |
-
$new_campaign_id
|
518 |
$new_campaign_ids[] = $new_campaign_id;
|
519 |
|
520 |
if ( !empty( $campaign['target_rules'] ) ) {
|
@@ -547,36 +798,35 @@ class Icegram {
|
|
547 |
'post_name' => ( !empty( $message['post_title'] ) ) ? sanitize_title( $message['post_title'] ) : '',
|
548 |
'post_title' => ( !empty( $message['post_title'] ) ) ? $message['post_title'] : '',
|
549 |
'post_status' => ( !empty( $message['post_status'] ) ) ? $message['post_status'] : 'publish',
|
550 |
-
'post_type' => '
|
551 |
);
|
552 |
|
553 |
$new_message_id = wp_insert_post( $args );
|
554 |
-
$new_message
|
555 |
'id' => $new_message_id,
|
556 |
'time' => ( !empty( $message['time'] ) ) ? $message['time'] : 0
|
557 |
);
|
558 |
-
$messages[]
|
559 |
|
560 |
unset( $message['post_content'] );
|
561 |
unset( $message['time'] );
|
562 |
|
563 |
-
$message['id']
|
564 |
|
565 |
$defaults = array (
|
566 |
-
'post_title'
|
567 |
-
'type'
|
568 |
-
'theme'
|
569 |
-
'animation'
|
570 |
-
'
|
571 |
-
'
|
572 |
-
'
|
573 |
-
'
|
574 |
-
'
|
575 |
-
'
|
576 |
-
'
|
577 |
-
'
|
578 |
-
'
|
579 |
-
'id' => ''
|
580 |
);
|
581 |
|
582 |
$icegram_message_data = wp_parse_args( $message, $defaults );
|
@@ -601,7 +851,7 @@ class Icegram {
|
|
601 |
}
|
602 |
|
603 |
function get_sample_data() {
|
604 |
-
|
605 |
return array(
|
606 |
'campaigns' => array(
|
607 |
array(
|
@@ -623,13 +873,11 @@ class Icegram {
|
|
623 |
'post_status' => 'publish',
|
624 |
'time' => '0',
|
625 |
'type' => 'action-bar',
|
626 |
-
'theme' =>
|
627 |
-
'
|
628 |
-
'toast_animation' => 'effect1',
|
629 |
-
'title' => 'Get 2x more Contacts with Your Website',
|
630 |
'label' => 'Show Me How',
|
631 |
'link' => '',
|
632 |
-
'
|
633 |
'message' => 'Instant Results Guaranteed',
|
634 |
'position' => '01',
|
635 |
'text_color' => '#000000',
|
@@ -640,13 +888,12 @@ class Icegram {
|
|
640 |
'post_status' => 'publish',
|
641 |
'time' => '4',
|
642 |
'type' => 'messenger',
|
643 |
-
'theme' =>
|
644 |
'animation' => 'slide',
|
645 |
-
'
|
646 |
-
'title' => '20% Off - for you',
|
647 |
'label' => '',
|
648 |
'link' => '',
|
649 |
-
'
|
650 |
'message' => "Hey there! We are running a <strong>special 20% off this week</strong> for registered users - like you.
|
651 |
|
652 |
Use coupon <code>LOYALTY20</code> during checkout.",
|
@@ -659,24 +906,22 @@ class Icegram {
|
|
659 |
'post_status' => 'publish',
|
660 |
'time' => '10',
|
661 |
'type' => 'popup',
|
662 |
-
'theme' =>
|
663 |
-
'
|
664 |
-
'toast_animation' => '',
|
665 |
-
'title' => 'How this blog makes over $34,800 / month for FREE.',
|
666 |
'label' => 'FREE INSTANT ACCESS',
|
667 |
'link' => '',
|
668 |
-
'
|
669 |
'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.
|
670 |
|
671 |
-
<strong>Download my free kit to learn how I do this.</strong>
|
672 |
|
673 |
-
<ul>
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
</ul>",
|
680 |
'text_color' => '#000000',
|
681 |
'bg_color' => '#ffffff'
|
682 |
|
@@ -686,13 +931,12 @@ class Icegram {
|
|
686 |
'post_status' => 'publish',
|
687 |
'time' => '6',
|
688 |
'type' => 'toast',
|
689 |
-
'theme' =>
|
690 |
-
'animation' => '',
|
691 |
-
'
|
692 |
-
'title' => 'Exclusive Marketing Report',
|
693 |
'label' => '',
|
694 |
'link' => '',
|
695 |
-
'
|
696 |
'message' => 'FREE for every subscriber. Click here to download it.',
|
697 |
'position' => '02',
|
698 |
'text_color' => '#000000',
|
@@ -708,7 +952,7 @@ class Icegram {
|
|
708 |
function remove_preview_button() {
|
709 |
global $post_type;
|
710 |
|
711 |
-
if( $post_type == '
|
712 |
|
713 |
?>
|
714 |
<style>
|
@@ -722,7 +966,7 @@ class Icegram {
|
|
722 |
|
723 |
function remove_row_actions( $actions, $post ) {
|
724 |
|
725 |
-
if ( empty( $post->post_type ) || ( $post->post_type != '
|
726 |
|
727 |
unset( $actions['inline hide-if-no-js'] );
|
728 |
unset( $actions['view'] );
|
@@ -732,12 +976,27 @@ class Icegram {
|
|
732 |
}
|
733 |
|
734 |
function identify_current_page() {
|
735 |
-
|
736 |
-
|
737 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
738 |
}
|
|
|
739 |
}
|
740 |
|
|
|
741 |
/**
|
742 |
* Our implementation of wpautop to preserve script and style tags
|
743 |
*/
|
@@ -784,7 +1043,6 @@ class Icegram {
|
|
784 |
return $pee;
|
785 |
}
|
786 |
|
787 |
-
|
788 |
function _wpautop_add_tag_placeholders( $pee, $tag ) {
|
789 |
$tags = array();
|
790 |
|
@@ -816,16 +1074,14 @@ class Icegram {
|
|
816 |
return array( $pee, $tags );
|
817 |
}
|
818 |
|
819 |
-
|
820 |
function _wpautop_replace_tag_placeholders( $pee, $tags ) {
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
|
825 |
-
|
826 |
}
|
827 |
|
828 |
-
|
829 |
}
|
830 |
|
831 |
function initialize_icegram() {
|
@@ -838,4 +1094,4 @@ function initialize_icegram() {
|
|
838 |
}
|
839 |
|
840 |
add_action( 'plugins_loaded', 'initialize_icegram' );
|
841 |
-
register_activation_hook( __FILE__, array( 'Icegram', 'install' ) );
|
3 |
* Plugin Name: Icegram
|
4 |
* Plugin URI: http://www.icegram.com/
|
5 |
* Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
|
6 |
+
* Version: 1.2
|
7 |
* Author: Icegram
|
8 |
* Author URI: http://www.icegram.com/
|
9 |
*
|
22 |
|
23 |
var $plugin_url;
|
24 |
var $plugin_path;
|
25 |
+
var $version;
|
26 |
var $_wpautop_tags;
|
27 |
+
var $message_types;
|
28 |
+
var $message_type_objs;
|
29 |
+
var $shortcode_instances;
|
30 |
+
var $available_headlines;
|
31 |
+
|
32 |
public static $current_page_id;
|
33 |
|
34 |
function __construct() {
|
35 |
|
36 |
+
$this->version = "1.2";
|
37 |
+
$this->shortcode_instances = array();
|
38 |
$this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
|
39 |
$this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
|
40 |
+
$this->include_classes();
|
41 |
+
|
42 |
+
if( is_admin() && current_user_can( 'manage_options' ) ) {
|
43 |
+
new Icegram_Campaign_Admin();
|
44 |
+
new Icegram_Message_Admin();
|
45 |
+
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_styles_and_scripts' ) );
|
46 |
+
add_action( 'admin_print_styles', array( &$this, 'remove_preview_button' ) );
|
47 |
+
add_filter( 'post_row_actions', array( &$this , 'remove_row_actions' ), 10, 2 );
|
48 |
+
|
49 |
+
add_action( 'admin_menu', array( &$this, 'admin_menus') );
|
50 |
+
add_action( 'admin_init', array( &$this, 'welcome' ) );
|
51 |
+
|
52 |
+
add_action( 'icegram_settings_after', array( &$this, 'klawoo_subscribe_form' ) );
|
53 |
+
add_action( 'icegram_about_changelog', array( &$this, 'klawoo_subscribe_form' ) );
|
54 |
+
} else {
|
55 |
+
add_action( 'wp_footer', array( &$this, 'display_messages' ) );
|
56 |
+
add_action( 'wp_print_scripts', array( &$this, 'identify_current_page' ) );
|
57 |
+
add_shortcode( 'icegram', array( &$this, 'execute_shortcode' ) );
|
58 |
+
add_filter( 'icegram_branding_data', array( &$this , 'branding_data_remove' ), 10 );
|
59 |
+
add_filter( 'icegram_get_valid_campaigns_sql', array( &$this , 'append_to_valid_campaigns_sql' ), 10, 2 );
|
60 |
+
// WPML compatibility
|
61 |
+
add_filter( 'icegram_identify_current_page', array( &$this, 'wpml_get_parent_id' ), 10 );
|
62 |
+
}
|
63 |
|
64 |
+
// common
|
65 |
add_action( 'init', array( &$this, 'register_campaign_post_type' ) );
|
66 |
add_action( 'init', array( &$this, 'register_message_post_type' ) );
|
67 |
|
68 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
69 |
+
add_action( 'wp_ajax_icegram_event_track', array( &$this, 'icegram_event_track' ) );
|
70 |
+
add_action( 'wp_ajax_nopriv_icegram_event_track', array( &$this, 'icegram_event_track' ) );
|
71 |
+
add_action( 'wp_ajax_klawoo_subscribe', array( &$this, 'klawoo_subscribe' ) );
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
75 |
+
|
76 |
+
public function klawoo_subscribe_form() {
|
77 |
+
?>
|
78 |
+
<div class="wrap">
|
79 |
+
<?php
|
80 |
+
if ( stripos(get_current_screen()->base, 'settings') !== false ) {
|
81 |
+
echo "<h2>".__( 'Get Updates', 'icegram' )."</h2>";
|
82 |
+
}
|
83 |
+
?>
|
84 |
+
<table class="form-table">
|
85 |
+
<tr>
|
86 |
+
<th scope="row"><?php _e( 'Join our newsletter', 'icegram' ) ?></th>
|
87 |
+
<td>
|
88 |
+
<form name="klawoo_subscribe" action="#" method="POST" accept-charset="utf-8">
|
89 |
+
<input class="ltr" type="text" name="name" id="name" placeholder="Name"/>
|
90 |
+
<input class="regular-text ltr" type="text" name="email" id="email" placeholder="Email"/>
|
91 |
+
<input type="hidden" name="list" value="7I763v6Ldrs3YhJeee5EOgFA"/>
|
92 |
+
<input type="submit" name="submit" id="submit" class="button button-primary" value="Subscribe">
|
93 |
+
<br/>
|
94 |
+
<div id="klawoo_response"></div>
|
95 |
+
</form>
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
</table>
|
99 |
+
</div>
|
100 |
+
<script type="text/javascript">
|
101 |
+
jQuery(function () {
|
102 |
+
jQuery("form[name=klawoo_subscribe]").submit(function (e) {
|
103 |
+
e.preventDefault();
|
104 |
+
|
105 |
+
jQuery('#klawoo_response').html('');
|
106 |
+
params = jQuery("form[name=klawoo_subscribe]").serializeArray();
|
107 |
+
params.push( {name: 'action', value: 'klawoo_subscribe' });
|
108 |
+
|
109 |
+
jQuery.ajax({
|
110 |
+
method: 'POST',
|
111 |
+
type: 'text',
|
112 |
+
url: "<?php echo admin_url( 'admin-ajax.php' ); ?>",
|
113 |
+
data: params,
|
114 |
+
success: function(response) {
|
115 |
+
if (response != '') {
|
116 |
+
jQuery('#klawoo_response').html(response);
|
117 |
+
} else {
|
118 |
+
jQuery('#klawoo_response').html('error!');
|
119 |
+
}
|
120 |
+
}
|
121 |
+
});
|
122 |
+
});
|
123 |
+
});
|
124 |
+
</script>
|
125 |
+
<?php
|
126 |
+
}
|
127 |
+
|
128 |
+
public function klawoo_subscribe() {
|
129 |
+
$url = 'http://app.klawoo.com/subscribe';
|
130 |
|
131 |
+
if( !empty( $_POST ) ) {
|
132 |
+
$params = $_POST;
|
133 |
+
} else {
|
134 |
+
exit();
|
135 |
+
}
|
136 |
+
$method = 'POST';
|
137 |
+
$qs = http_build_query( $params );
|
138 |
|
139 |
+
$options = array(
|
140 |
+
'timeout' => 15,
|
141 |
+
'method' => $method
|
142 |
+
);
|
143 |
|
144 |
+
if ( $method == 'POST' ) {
|
145 |
+
$options['body'] = $qs;
|
146 |
+
} else {
|
147 |
+
if ( strpos( $url, '?' ) !== false ) {
|
148 |
+
$url .= '&'.$qs;
|
149 |
+
} else {
|
150 |
+
$url .= '?'.$qs;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
$response = wp_remote_request( $url, $options );
|
155 |
+
if ( wp_remote_retrieve_response_code( $response ) == 200 ) {
|
156 |
+
$data = $response['body'];
|
157 |
+
if ( $data != 'error' ) {
|
158 |
+
|
159 |
+
$message_start = substr( $data, strpos( $data,'<body>' ) + 6 );
|
160 |
+
$remove = substr( $message_start, strpos( $message_start,'</body>' ) );
|
161 |
+
$message = trim( str_replace( $remove, '', $message_start ) );
|
162 |
+
echo ( $message );
|
163 |
+
exit();
|
164 |
+
}
|
165 |
+
}
|
166 |
+
exit();
|
167 |
}
|
168 |
|
169 |
public function icegram_event_track() {
|
170 |
|
171 |
if( !empty( $_POST['event_data'] ) ) {
|
172 |
|
173 |
+
$messages_shown = (array) explode(",", html_entity_decode( (!empty($_COOKIE['icegram_messages_shown']) ? stripslashes( $_COOKIE['icegram_messages_shown'] ) : '') ) );
|
174 |
|
175 |
foreach ( $_POST['event_data'] as $event ) {
|
176 |
switch ($event['type']) {
|
190 |
}
|
191 |
}
|
192 |
$messages_shown = array_values ( array_filter ( array_unique($messages_shown) ) );
|
193 |
+
setcookie('icegram_messages_shown', implode(",", $messages_shown), 0, '/');
|
194 |
exit();
|
|
|
195 |
}
|
196 |
|
197 |
static function install() {
|
201 |
}
|
202 |
|
203 |
public function welcome() {
|
204 |
+
|
205 |
+
$this->db_update();
|
206 |
// Bail if no activation redirect transient is set
|
207 |
if ( false === get_option( '_icegram_activation_redirect' ) )
|
208 |
return;
|
210 |
// Delete the redirect transient
|
211 |
delete_option( '_icegram_activation_redirect' );
|
212 |
|
213 |
+
wp_redirect( admin_url( 'edit.php?post_type=ig_campaign&page=icegram-support' ) );
|
214 |
exit;
|
215 |
}
|
216 |
|
217 |
+
function db_update() {
|
218 |
+
|
219 |
+
$current_db_version = get_option( 'icegram_db_version' );
|
220 |
+
if ( !$current_db_version || version_compare( $current_db_version, '1.2', '<' ) ) {
|
221 |
+
include( 'updates/icegram-update-1.2.php' );
|
222 |
+
}
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
public function admin_menus() {
|
227 |
|
228 |
+
$welcome_page_title = __( 'Welcome to Icegram', 'icegram' );
|
229 |
+
$settings_page_title = __( 'Settings', 'icegram' );
|
230 |
$menu_title = __( 'Docs & Support', 'icegram' );
|
231 |
+
$about = add_submenu_page( 'edit.php?post_type=ig_campaign', $welcome_page_title, $menu_title, 'manage_options', 'icegram-support', array( $this, 'about_screen' ) );
|
232 |
+
$settings = add_submenu_page( 'edit.php?post_type=ig_campaign', $settings_page_title, $settings_page_title, 'manage_options', 'icegram-settings', array( $this, 'settings_screen' ) );
|
233 |
|
234 |
add_action( 'admin_print_styles-'. $about, array( $this, 'admin_css' ) );
|
235 |
+
add_action( 'admin_print_styles-'. $settings, array( $this, 'admin_css' ) );
|
236 |
|
237 |
}
|
238 |
|
241 |
}
|
242 |
|
243 |
public function about_screen() {
|
|
|
244 |
|
245 |
// Import data if not done already
|
246 |
if( false === get_option( 'icegram_sample_data_imported' ) ) {
|
247 |
+
$this->import( $this->get_sample_data() );
|
248 |
}
|
249 |
|
250 |
include ( 'about-icegram.php' );
|
251 |
}
|
252 |
|
253 |
+
public function settings_screen() {
|
254 |
+
include ( 'settings.php' );
|
255 |
+
}
|
|
|
|
|
|
|
|
|
256 |
|
257 |
+
public function branding_data_remove( $icegram_branding_data ) {
|
258 |
+
if( !empty( $icegram_branding_data ) && 'yes' != get_option('icegram_share_love', 'no') ) {
|
259 |
+
$icegram_branding_data['powered_by_logo'] = '';
|
260 |
+
$icegram_branding_data['powered_by_text'] = '';
|
261 |
+
}
|
262 |
+
return $icegram_branding_data;
|
263 |
+
}
|
264 |
|
265 |
+
function execute_shortcode( $atts = array() ) {
|
266 |
+
// When shortcode is called, it will only prepare an array with conditions
|
267 |
+
// And add a placeholder div
|
268 |
+
// Display will happen in footer via display_messages()
|
269 |
+
$i = count($this->shortcode_instances);
|
270 |
+
//echo "Shortcode counter - {$i} - ";
|
271 |
+
$this->shortcode_instances[ $i ] = shortcode_atts( array(
|
272 |
+
'campaigns' => '',
|
273 |
+
'messages' => '',
|
274 |
+
'skip_others' => 'no'
|
275 |
+
), $atts );
|
276 |
+
$html[] = "<div class='ig_shortcode_container' id='icegram_shortcode_{$i}'";
|
277 |
+
foreach ($atts as $key => $value) {
|
278 |
+
$html[] = " data-{$key}=\"".htmlentities($value)."\" ";
|
279 |
+
}
|
280 |
+
$html[] = " >"."</div>";
|
281 |
+
return implode(" ", $html);
|
282 |
+
}
|
283 |
|
284 |
+
function display_messages() {
|
285 |
+
|
286 |
+
$skip_others = $preview_mode = false;
|
287 |
+
$campaign_ids = $message_ids = array();
|
288 |
+
|
289 |
+
// Pull in message and campaign IDs from shortcodes - if set
|
290 |
+
if( !empty( $this->shortcode_instances ) ) {
|
291 |
+
foreach ($this->shortcode_instances as $i => $value) {
|
292 |
+
$cids = array_map( 'trim', (array) explode( ',', $value['campaigns'] ) );
|
293 |
+
$mids = array_map( 'trim', (array) explode( ',', $value['messages'] ) );
|
294 |
+
if ($value['skip_others'] == 'yes' && (!empty($cids) || !empty($mids))) {
|
295 |
+
$skip_others = true;
|
296 |
+
}
|
297 |
+
$campaign_ids = array_merge($campaign_ids, $cids);
|
298 |
+
$message_ids = array_merge($message_ids, $mids);
|
299 |
+
}
|
300 |
+
}
|
301 |
|
302 |
+
if( !empty( $_GET['campaign_preview_id'] ) && current_user_can( 'manage_options' ) ) {
|
303 |
+
$campaign_ids[] = $_GET['campaign_preview_id'];
|
304 |
+
$preview_mode = true;
|
305 |
}
|
306 |
|
307 |
+
$messages = $this->get_valid_messages( $message_ids, $campaign_ids, $preview_mode, $skip_others );
|
308 |
+
|
309 |
+
if( empty( $messages ) ) {
|
310 |
return;
|
311 |
+
}
|
312 |
|
313 |
+
$messages_shown = (array) explode(",", html_entity_decode( (!empty($_COOKIE['icegram_messages_shown']) ? stripslashes( $_COOKIE['icegram_messages_shown'] ) : '') ) );
|
314 |
+
$types_shown = array(); $messages_to_show_ids = array();
|
315 |
|
316 |
foreach ( $messages as $key => $message_data ) {
|
317 |
|
318 |
+
if( !is_array( $message_data ) || empty( $message_data ) ) {
|
319 |
+
continue;
|
320 |
+
}
|
321 |
+
|
322 |
+
// Don't show a seen message again - if needed
|
323 |
if( !empty( $message_data['id'] ) &&
|
324 |
empty( $_GET['campaign_preview_id'] ) &&
|
325 |
in_array( $message_data['id'], $messages_shown ) &&
|
326 |
!empty( $message_data['retargeting'] ) &&
|
327 |
$message_data['retargeting'] == 'yes'
|
328 |
) {
|
329 |
+
unset( $messages[$key] );
|
330 |
+
continue;
|
331 |
+
}
|
332 |
+
|
333 |
+
// Avoid showing the same message twice
|
334 |
+
if (in_array($message_data['id'], $messages_to_show_ids)) {
|
335 |
+
unset ( $messages[$key] );
|
336 |
+
continue;
|
337 |
+
} else {
|
338 |
+
$messages_to_show_ids[] = $message_data['id'];
|
339 |
}
|
340 |
|
341 |
+
$types_shown[] = $message_data['type'];
|
342 |
+
|
343 |
// Our own implementation so WP does not mess with script, style and pre tags
|
344 |
add_filter('the_content', array( $this, 'before_wpautop' ) , 9);
|
345 |
add_filter('the_content', array( $this, 'after_wpautop' ) , 11);
|
346 |
$messages[$key]['message'] = apply_filters( 'the_content', $message_data['message'] );
|
347 |
remove_filter('the_content', array( $this, 'before_wpautop' ) , 9);
|
348 |
remove_filter('the_content', array( $this, 'after_wpautop' ) , 11);
|
|
|
349 |
}
|
350 |
|
351 |
if( empty( $messages ) )
|
352 |
return;
|
353 |
|
354 |
+
wp_register_script( 'icegram_js', $this->plugin_url . '/assets/js/icegram.js', array ( 'jquery' ), '', true);
|
355 |
+
wp_enqueue_style( 'icegram_css', $this->plugin_url . '/assets/css/frontend.css' );
|
356 |
wp_enqueue_style( 'dashicons' );
|
|
|
|
|
357 |
|
358 |
$icegram_default = apply_filters( 'icegram_branding_data',
|
359 |
+
array ( 'icon' => $this->plugin_url . '/assets/images/icegram-logo-branding-64-grey.png',
|
360 |
+
'powered_by_logo' => $this->plugin_url . '/assets/images/icegram-logo-branding-64-grey.png',
|
361 |
+
'powered_by_text' => __( 'Powered by Icegram', 'icegram' )
|
362 |
) );
|
363 |
+
$messages = apply_filters( 'icegram_messages_to_show', $messages );
|
364 |
+
$icegram = array ( 'messages' => array_values( $messages ),
|
365 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
366 |
'preview_id' => !empty( $_GET['campaign_preview_id'] ) ? $_GET['campaign_preview_id'] : '',
|
367 |
+
'defaults' => $icegram_default
|
368 |
);
|
369 |
+
if (empty($icegram['preview_id'])) {
|
370 |
+
unset($icegram['preview_id']);
|
|
|
|
|
371 |
}
|
|
|
|
|
372 |
|
373 |
+
if( !wp_script_is( 'icegram_js' ) ) {
|
374 |
+
wp_enqueue_script( 'icegram_js' );
|
375 |
+
wp_localize_script( 'icegram_js', 'icegram_data', $icegram );
|
376 |
+
}
|
377 |
|
378 |
+
// Load JS and default CSS
|
379 |
+
$types_shown = array_unique($types_shown);
|
380 |
+
|
381 |
+
if (in_array('popup', $types_shown)) {
|
382 |
+
wp_enqueue_script( 'thickbox' );
|
383 |
+
wp_enqueue_style( 'thickbox' );
|
384 |
+
}
|
385 |
|
386 |
+
foreach ($types_shown as $message_type) {
|
387 |
+
wp_register_script( 'icegram_message_type_'.$message_type, $this->message_types[$message_type]['baseurl'] . "main.js" , array ( 'icegram_js' ), '', true );
|
388 |
+
wp_enqueue_script( 'icegram_message_type_'.$message_type );
|
389 |
+
wp_enqueue_style( 'icegram_css_'.$message_type, $this->message_types[$message_type]['baseurl'] . 'default.css' );
|
390 |
}
|
391 |
|
392 |
+
// Load theme CSS
|
393 |
+
foreach ($messages as $message) {
|
394 |
+
if (!empty( $this->message_types[ $message['type'] ]['themes'][ $message['theme'] ]) ) {
|
395 |
+
$theme = $this->message_types[ $message['type'] ]['themes'][ $message['theme'] ];
|
396 |
+
wp_enqueue_style( 'icegram_css_'.$message['type'].'_'.$message['theme'], $theme['baseurl'] . $message['theme'].'.css' );
|
397 |
+
}
|
398 |
+
}
|
399 |
|
400 |
}
|
401 |
|
402 |
function enqueue_admin_styles_and_scripts() {
|
403 |
|
404 |
+
$screen = get_current_screen();
|
405 |
+
if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message' ), true ) ) return;
|
406 |
|
407 |
// Register scripts
|
408 |
wp_register_script( 'icegram_writepanel', $this->plugin_url . '/assets/js/admin.js' , array ( 'jquery', 'wp-color-picker' ) );
|
409 |
+
wp_register_script( 'icegram_chosen', $this->plugin_url . '/assets/js/chosen.jquery.min.js' , array ( 'jquery' ), '1.0' );
|
|
|
410 |
wp_register_script( 'icegram_ajax-chosen', $this->plugin_url . '/assets/js/ajax-chosen.jquery.min.js' , array ( 'icegram_chosen' ), '1.0' );
|
411 |
wp_register_script( 'icegram_tiptip', $this->plugin_url . '/assets/js/jquery.tipTip.min.js' , array ( 'jquery' ), get_bloginfo( 'version' ) );
|
412 |
|
413 |
wp_enqueue_script( 'icegram_writepanel' );
|
|
|
414 |
wp_enqueue_script( 'icegram_ajax-chosen' );
|
415 |
wp_enqueue_script( 'icegram_tiptip' );
|
416 |
wp_enqueue_script( 'thickbox' );
|
417 |
|
418 |
+
$icegram_writepanel_params = array ( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'search_message_nonce' => wp_create_nonce( "search-messages" ) );
|
419 |
+
$this->available_headlines = apply_filters( 'icegram_available_headlines', array() );
|
420 |
+
$icegram_writepanel_params = array_merge( $icegram_writepanel_params, array( 'available_headlines' => $this->available_headlines ) );
|
421 |
|
422 |
+
wp_localize_script( 'icegram_writepanel', 'icegram_writepanel_params', $icegram_writepanel_params );
|
423 |
|
424 |
wp_enqueue_style( 'thickbox' );
|
425 |
+
wp_enqueue_style( 'dashicons' );
|
426 |
wp_enqueue_style( 'wp-color-picker' );
|
427 |
wp_enqueue_style( 'icegram_admin_styles', $this->plugin_url . '/assets/css/admin.css' );
|
428 |
+
wp_enqueue_style( 'icegram_jquery-ui-style', $this->plugin_url . '/assets/css/jquery-ui.min.css' );
|
429 |
+
wp_enqueue_style( 'icegram_chosen_styles', $this->plugin_url . '/assets/css/chosen.min.css' );
|
430 |
|
431 |
if ( !wp_script_is( 'jquery-ui-datepicker' ) ) {
|
432 |
wp_enqueue_script( 'jquery-ui-datepicker' );
|
488 |
function get_message_data( $message_ids = array(), $preview = false ) {
|
489 |
global $wpdb;
|
490 |
|
491 |
+
$message_data = array();
|
492 |
$meta_key = $preview ? 'icegram_message_preview_data' : 'icegram_message_data';
|
493 |
$message_data_query = "SELECT post_id, meta_value FROM {$wpdb->prefix}postmeta WHERE meta_key LIKE '$meta_key'";
|
494 |
if ( !empty( $message_ids ) && is_array( $message_ids ) ) {
|
495 |
+
// For WPML compatibility
|
496 |
+
if ( function_exists('icl_object_id') ) {
|
497 |
+
foreach ($message_ids as $i=>$id ) {
|
498 |
+
$message_ids[ $i ] = icl_object_id( $id, 'ig_message', true );
|
499 |
+
}
|
500 |
+
}
|
501 |
$message_data_query .= " AND post_id IN ( " . implode( ',', $message_ids ) . " )";
|
502 |
}
|
503 |
+
|
504 |
$message_data_results = $wpdb->get_results( $message_data_query, 'ARRAY_A' );
|
505 |
$message_data = array();
|
506 |
foreach ( $message_data_results as $message_data_result ) {
|
507 |
$message_data[$message_data_result['post_id']] = maybe_unserialize( $message_data_result['meta_value'] );
|
508 |
}
|
|
|
509 |
return $message_data;
|
510 |
}
|
511 |
|
512 |
+
function get_valid_messages( $message_ids = array(), $campaign_ids = array(), $preview_mode = false, $skip_others = false) {
|
|
|
|
|
513 |
|
514 |
+
$valid_messages = $valid_campaigns = $message_campaign_map = array();
|
515 |
+
|
516 |
+
if ( !empty( $campaign_ids ) ) {
|
517 |
+
$valid_campaigns = $this->get_valid_campaigns( $campaign_ids, true );
|
518 |
+
}
|
519 |
+
// When skip_others is true, we won't load campaigns / messages from db
|
520 |
+
if (!$skip_others) {
|
521 |
+
$campaigns = $this->get_valid_campaigns();
|
522 |
+
if (!empty($campaigns)) {
|
523 |
+
foreach ($campaigns as $id => $campaign) {
|
524 |
+
if (!array_key_exists($id, $valid_campaigns)) {
|
525 |
+
$valid_campaigns[ $id ] = $campaign;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
}
|
527 |
}
|
528 |
}
|
529 |
+
}
|
530 |
+
|
531 |
+
// Create a map to look up campaign id for a given message
|
532 |
+
if( !empty( $valid_campaigns ) ) {
|
533 |
+
foreach ($valid_campaigns as $id => $campaign) {
|
534 |
+
if ($preview_mode) {
|
535 |
+
$campaign->messages = get_post_meta( $id, 'campaign_preview', true );
|
536 |
}
|
|
|
537 |
|
538 |
+
foreach( $campaign->messages as $msg) {
|
539 |
+
$message_ids[] = $msg['id'];
|
540 |
+
if (!array_key_exists( $msg['id'], $message_campaign_map)) {
|
541 |
+
$message_campaign_map[ $msg['id'] ] = $id;
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
}
|
546 |
|
547 |
+
// We don't display same message twice...
|
548 |
+
$message_ids = array_unique($message_ids);
|
549 |
+
|
550 |
+
if( empty( $message_ids ) ) {
|
551 |
+
return array();
|
552 |
+
}
|
553 |
+
$valid_messages = $this->get_message_data( $message_ids, $preview_mode );
|
554 |
+
|
555 |
+
foreach ($valid_messages as $id => $message_data) {
|
556 |
+
// Remove message if message type is uninstalled
|
557 |
+
$class_name = 'Icegram_Message_Type_' . str_replace(' ', '_', ucwords(str_replace('-', ' ', $message_data['type'])));
|
558 |
+
if( !class_exists( $class_name ) ) {
|
559 |
+
unset( $valid_messages[$id] );
|
560 |
+
continue;
|
561 |
+
}
|
562 |
+
$message_data['delay_time'] = 0;
|
563 |
+
$message_data['retargeting'] = '';
|
564 |
+
$message_data['campaign_id'] = ($preview_mode) ? $_GET['campaign_preview_id'] : '';
|
565 |
+
|
566 |
+
// Pull display time and retargeting rule from campaign if possible
|
567 |
+
if (!empty($message_campaign_map[ $id ])) {
|
568 |
+
$message_data['campaign_id'] = $message_campaign_map[ $id ];
|
569 |
+
$campaign = $valid_campaigns[ $message_data['campaign_id'] ];
|
570 |
+
if (!empty($campaign) && $campaign instanceof Icegram_Campaign) {
|
571 |
+
$message_meta_from_campaign = $campaign->get_message_meta_by_id( $id );
|
572 |
+
if (!empty($message_meta_from_campaign['time'])) {
|
573 |
+
$message_data['delay_time'] = $message_meta_from_campaign['time'];
|
574 |
}
|
575 |
+
$rule_value = $campaign->get_rule_value('retargeting');
|
576 |
+
$message_data['retargeting'] = !empty( $rule_value['retargeting'] ) ? $rule_value['retargeting'] : '';
|
577 |
}
|
578 |
}
|
579 |
+
$valid_messages[$id] = $message_data;
|
580 |
}
|
581 |
|
582 |
+
$valid_messages = apply_filters( 'icegram_valid_messages', $valid_messages );
|
583 |
return $valid_messages;
|
|
|
584 |
}
|
585 |
|
586 |
+
function get_valid_campaigns( $campaign_ids = array(), $skip_page_check = false ) {
|
587 |
global $wpdb;
|
588 |
|
589 |
if ( empty( $campaign_ids ) ) {
|
590 |
+
$sql = "SELECT pm.post_id
|
591 |
+
FROM {$wpdb->prefix}posts AS p
|
592 |
+
LEFT JOIN {$wpdb->prefix}postmeta AS pm ON ( pm.post_id = p.ID )
|
593 |
+
WHERE p.post_status = 'publish' ";
|
594 |
+
// Filter handler within this file (and possibly others) will append to this SQL
|
595 |
+
// and provide arguments for wpdb->prepare if needed.
|
596 |
+
// First element in the array is SQL, remaining are values for placeholders in SQL
|
597 |
+
$sql_params = apply_filters( 'icegram_get_valid_campaigns_sql', array($sql), array() );
|
598 |
+
$campaign_ids = $wpdb->get_col( $wpdb->prepare( array_shift($sql_params), $sql_params ) );
|
599 |
}
|
600 |
$valid_campaigns = array();
|
601 |
+
foreach ( (array) $campaign_ids as $campaign_id ) {
|
602 |
+
$campaign = new Icegram_Campaign( $campaign_id );
|
603 |
+
if ( $campaign->is_valid( array('skip_page_check' => $skip_page_check) ) ) {
|
|
|
604 |
$valid_campaigns[$campaign_id] = $campaign;
|
605 |
+
} else {
|
606 |
+
// Campgain is invalid!
|
607 |
}
|
608 |
}
|
609 |
return $valid_campaigns;
|
610 |
}
|
611 |
|
612 |
+
function append_to_valid_campaigns_sql( $sql_params = array(), $options = array() ) {
|
613 |
+
|
614 |
+
// Page check conditions
|
615 |
+
$pid = Icegram::get_current_page_id();
|
616 |
+
$sql = " AND (
|
617 |
+
pm.meta_key = 'icegram_campaign_target_rules' AND (
|
618 |
+
( pm.meta_value LIKE '%%%s%%' )
|
619 |
+
OR ( pm.meta_value LIKE '%%%s%%' AND pm.meta_value LIKE '%%%s%%' AND pm.meta_value LIKE '%%%s%%' )
|
620 |
+
";
|
621 |
+
$sql_params[] = 's:8:"sitewide";s:3:"yes";';
|
622 |
+
$sql_params[] = 's:10:"other_page";s:3:"yes";';
|
623 |
+
$sql_params[] = 's:7:"page_id";a:1:{';
|
624 |
+
$sql_params[] = serialize( (string) $pid );
|
625 |
+
|
626 |
+
if (is_home() || is_front_page()) {
|
627 |
+
$sql .= " OR ( pm.meta_value LIKE '%%%s%%' )
|
628 |
+
";
|
629 |
+
$sql_params[] = 's:8:"homepage";s:3:"yes";';
|
630 |
+
}
|
631 |
+
$sql .=" ) )";
|
632 |
+
$sql_params[0] .= $sql;
|
633 |
+
|
634 |
+
//s:9:"logged_in";s:3:"all";
|
635 |
+
|
636 |
+
return $sql_params;
|
637 |
+
}
|
638 |
+
|
639 |
// Include all classes required for Icegram plugin
|
640 |
function include_classes() {
|
641 |
|
642 |
+
$classes = glob( $this->plugin_path . '/classes/*.php' );
|
643 |
+
foreach ( $classes as $file ) {
|
644 |
+
// Files with 'admin' in their name are included only for admin section
|
645 |
+
if ( is_file( $file ) && ( (strpos($file, '-admin') >= 0 && is_admin()) || (strpos($file, '-admin') === false) ) ) {
|
646 |
+
include_once $file;
|
647 |
+
}
|
648 |
+
}
|
649 |
|
650 |
+
// Load built in message types
|
651 |
+
$icegram_message_type_basedirs = glob( $this->plugin_path . '/message-types/*' );
|
652 |
+
// Allow other plugins to add new message types
|
653 |
+
$icegram_message_type_basedirs = apply_filters( 'icegram_message_type_basedirs', $icegram_message_type_basedirs );
|
654 |
+
// Set up different message type classes
|
655 |
+
foreach ( $icegram_message_type_basedirs as $dir ) {
|
656 |
+
$type = basename ( $dir );
|
657 |
+
$class_file = $dir . "/main.php";
|
658 |
+
if( is_file( $class_file ) ) {
|
659 |
+
include_once( $class_file );
|
660 |
+
}
|
661 |
+
$class_name = 'Icegram_Message_Type_' . str_replace(' ', '_', ucwords(str_replace('-', ' ', $type)));
|
662 |
+
if (class_exists($class_name)) {
|
663 |
+
$this->message_type_objs[ $type ] = new $class_name();
|
664 |
+
}
|
665 |
+
}
|
666 |
+
$this->message_types = apply_filters( 'icegram_message_types', array() );
|
667 |
|
668 |
}
|
669 |
|
693 |
'show_ui' => true,
|
694 |
'show_in_menu' => true,
|
695 |
'query_var' => true,
|
696 |
+
'rewrite' => array( 'slug' => 'ig_campaign' ),
|
697 |
'capability_type' => 'post',
|
698 |
'has_archive' => true,
|
699 |
'hierarchical' => false,
|
701 |
'supports' => array( 'title', 'editor' )
|
702 |
);
|
703 |
|
704 |
+
register_post_type( 'ig_campaign', $args );
|
705 |
}
|
706 |
|
707 |
+
// Register Message post type
|
708 |
function register_message_post_type() {
|
709 |
$labels = array(
|
710 |
'name' => __( 'Messages', 'icegram' ),
|
727 |
'public' => true,
|
728 |
'publicly_queryable' => true,
|
729 |
'show_ui' => true,
|
730 |
+
'show_in_menu' => 'edit.php?post_type=ig_campaign',
|
731 |
'query_var' => true,
|
732 |
+
'rewrite' => array( 'slug' => 'ig_message' ),
|
733 |
'capability_type' => 'post',
|
734 |
'has_archive' => true,
|
735 |
'hierarchical' => false,
|
737 |
'supports' => array( 'title' )
|
738 |
);
|
739 |
|
740 |
+
register_post_type( 'ig_message', $args );
|
741 |
}
|
742 |
|
743 |
function import( $data = array() ) {
|
744 |
|
745 |
if ( empty( $data['campaigns'] ) && empty( $data['messages'] ) ) return;
|
746 |
+
|
747 |
+
$default_theme = $default_type = '';
|
748 |
+
$first_message_type = current( $this->message_types );
|
749 |
+
|
750 |
+
if( is_array( $first_message_type ) ) {
|
751 |
+
$default_type = $first_message_type['type'];
|
752 |
+
if( !empty( $first_message_type['themes'] ) ) {
|
753 |
+
$default_theme = key( $first_message_type['themes'] );
|
754 |
+
}
|
|
|
|
|
755 |
}
|
756 |
|
757 |
$new_campaign_ids = array();
|
|
|
758 |
foreach ( (array) $data['campaigns'] as $campaign ) {
|
759 |
|
760 |
$args = array(
|
762 |
'post_name' => ( !empty( $campaign['post_title'] ) ) ? sanitize_title( $campaign['post_title'] ) : '',
|
763 |
'post_title' => ( !empty( $campaign['post_title'] ) ) ? $campaign['post_title'] : '',
|
764 |
'post_status' => ( !empty( $campaign['post_status'] ) ) ? $campaign['post_status'] : 'draft',
|
765 |
+
'post_type' => 'ig_campaign'
|
766 |
);
|
767 |
|
768 |
+
$new_campaign_id = wp_insert_post( $args );
|
769 |
$new_campaign_ids[] = $new_campaign_id;
|
770 |
|
771 |
if ( !empty( $campaign['target_rules'] ) ) {
|
798 |
'post_name' => ( !empty( $message['post_title'] ) ) ? sanitize_title( $message['post_title'] ) : '',
|
799 |
'post_title' => ( !empty( $message['post_title'] ) ) ? $message['post_title'] : '',
|
800 |
'post_status' => ( !empty( $message['post_status'] ) ) ? $message['post_status'] : 'publish',
|
801 |
+
'post_type' => 'ig_message'
|
802 |
);
|
803 |
|
804 |
$new_message_id = wp_insert_post( $args );
|
805 |
+
$new_message = array(
|
806 |
'id' => $new_message_id,
|
807 |
'time' => ( !empty( $message['time'] ) ) ? $message['time'] : 0
|
808 |
);
|
809 |
+
$messages[] = $new_message;
|
810 |
|
811 |
unset( $message['post_content'] );
|
812 |
unset( $message['time'] );
|
813 |
|
814 |
+
$message['id'] = $new_message_id;
|
815 |
|
816 |
$defaults = array (
|
817 |
+
'post_title' => '',
|
818 |
+
'type' => $default_type,
|
819 |
+
'theme' => $default_theme,
|
820 |
+
'animation' => '',
|
821 |
+
'headline' => '',
|
822 |
+
'label' => '',
|
823 |
+
'link' => '',
|
824 |
+
'icon' => '',
|
825 |
+
'message' => '',
|
826 |
+
'position' => '',
|
827 |
+
'text_color' => '#000000',
|
828 |
+
'bg_color' => '#ffffff',
|
829 |
+
'id' => ''
|
|
|
830 |
);
|
831 |
|
832 |
$icegram_message_data = wp_parse_args( $message, $defaults );
|
851 |
}
|
852 |
|
853 |
function get_sample_data() {
|
854 |
+
|
855 |
return array(
|
856 |
'campaigns' => array(
|
857 |
array(
|
873 |
'post_status' => 'publish',
|
874 |
'time' => '0',
|
875 |
'type' => 'action-bar',
|
876 |
+
'theme' => 'hello',
|
877 |
+
'headline' => 'Get 2x more Contacts with Your Website',
|
|
|
|
|
878 |
'label' => 'Show Me How',
|
879 |
'link' => '',
|
880 |
+
'icon' => '',
|
881 |
'message' => 'Instant Results Guaranteed',
|
882 |
'position' => '01',
|
883 |
'text_color' => '#000000',
|
888 |
'post_status' => 'publish',
|
889 |
'time' => '4',
|
890 |
'type' => 'messenger',
|
891 |
+
'theme' => 'social',
|
892 |
'animation' => 'slide',
|
893 |
+
'headline' => '20% Off - for you',
|
|
|
894 |
'label' => '',
|
895 |
'link' => '',
|
896 |
+
'icon' => '',
|
897 |
'message' => "Hey there! We are running a <strong>special 20% off this week</strong> for registered users - like you.
|
898 |
|
899 |
Use coupon <code>LOYALTY20</code> during checkout.",
|
906 |
'post_status' => 'publish',
|
907 |
'time' => '10',
|
908 |
'type' => 'popup',
|
909 |
+
'theme' => 'air-mail',
|
910 |
+
'headline' => 'How this blog makes over $34,800 / month for FREE.',
|
|
|
|
|
911 |
'label' => 'FREE INSTANT ACCESS',
|
912 |
'link' => '',
|
913 |
+
'icon' => '',
|
914 |
'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.
|
915 |
|
916 |
+
<strong>Download my free kit to learn how I do this.</strong>
|
917 |
|
918 |
+
<ul>
|
919 |
+
<li>How to choose blog topics that create long term value</li>
|
920 |
+
<li>The type of blog post that will make your site go viral</li>
|
921 |
+
<li>How to free yourself from the routine tasks</li>
|
922 |
+
<li>Resources and tips to get started quickly</li>
|
923 |
+
<li>Private members club to connect with fellow owners</li>
|
924 |
+
</ul>",
|
925 |
'text_color' => '#000000',
|
926 |
'bg_color' => '#ffffff'
|
927 |
|
931 |
'post_status' => 'publish',
|
932 |
'time' => '6',
|
933 |
'type' => 'toast',
|
934 |
+
'theme' => 'stand-out',
|
935 |
+
'animation' => 'pop',
|
936 |
+
'headline' => 'Exclusive Marketing Report',
|
|
|
937 |
'label' => '',
|
938 |
'link' => '',
|
939 |
+
'icon' => '',
|
940 |
'message' => 'FREE for every subscriber. Click here to download it.',
|
941 |
'position' => '02',
|
942 |
'text_color' => '#000000',
|
952 |
function remove_preview_button() {
|
953 |
global $post_type;
|
954 |
|
955 |
+
if( $post_type == 'ig_message' || $post_type == 'ig_campaign' ) {
|
956 |
|
957 |
?>
|
958 |
<style>
|
966 |
|
967 |
function remove_row_actions( $actions, $post ) {
|
968 |
|
969 |
+
if ( empty( $post->post_type ) || ( $post->post_type != 'ig_campaign' && $post->post_type != 'ig_message' ) ) return $actions;
|
970 |
|
971 |
unset( $actions['inline hide-if-no-js'] );
|
972 |
unset( $actions['view'] );
|
976 |
}
|
977 |
|
978 |
function identify_current_page() {
|
979 |
+
global $post;
|
980 |
+
if( is_object( $post ) && isset( $post->ID ) ) {
|
981 |
+
$id = $post->ID;
|
982 |
+
$id = apply_filters('icegram_identify_current_page', $id );
|
983 |
+
self::$current_page_id = $id;
|
984 |
+
}
|
985 |
+
}
|
986 |
+
|
987 |
+
static function get_current_page_id() {
|
988 |
+
return self::$current_page_id;
|
989 |
+
}
|
990 |
+
|
991 |
+
function wpml_get_parent_id( $id ) {
|
992 |
+
global $post;
|
993 |
+
if (function_exists('icl_object_id') && function_exists('icl_get_default_language') ) {
|
994 |
+
$id = icl_object_id($id, $post->post_type, true, icl_get_default_language() );
|
995 |
}
|
996 |
+
return $id;
|
997 |
}
|
998 |
|
999 |
+
|
1000 |
/**
|
1001 |
* Our implementation of wpautop to preserve script and style tags
|
1002 |
*/
|
1043 |
return $pee;
|
1044 |
}
|
1045 |
|
|
|
1046 |
function _wpautop_add_tag_placeholders( $pee, $tag ) {
|
1047 |
$tags = array();
|
1048 |
|
1074 |
return array( $pee, $tags );
|
1075 |
}
|
1076 |
|
|
|
1077 |
function _wpautop_replace_tag_placeholders( $pee, $tags ) {
|
1078 |
+
if ( ! empty( $tags ) ) {
|
1079 |
+
$pee = str_replace( array_keys( $tags ), array_values( $tags ), $pee );
|
1080 |
+
}
|
1081 |
|
1082 |
+
return $pee;
|
1083 |
}
|
1084 |
|
|
|
1085 |
}
|
1086 |
|
1087 |
function initialize_icegram() {
|
1094 |
}
|
1095 |
|
1096 |
add_action( 'plugins_loaded', 'initialize_icegram' );
|
1097 |
+
register_activation_hook( __FILE__, array( 'Icegram', 'install' ) );
|
message-types/action-bar/default.css
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.action_bar.ig_container {
|
2 |
+
z-index: 100000;
|
3 |
+
width: 100%;
|
4 |
+
padding: 0;
|
5 |
+
margin: 0;
|
6 |
+
display: none;
|
7 |
+
left: 0;
|
8 |
+
}
|
9 |
+
|
10 |
+
.action_bar.ig_container.top {
|
11 |
+
}
|
12 |
+
|
13 |
+
.action_bar.ig_container.bottom {
|
14 |
+
}
|
15 |
+
|
16 |
+
.action_bar .ig_content {
|
17 |
+
color: #FFF;
|
18 |
+
}
|
19 |
+
|
20 |
+
.action_bar.hello .ig_headline {
|
21 |
+
}
|
22 |
+
|
23 |
+
.action_bar .ig_message {
|
24 |
+
}
|
25 |
+
|
26 |
+
.action_bar img.icon {
|
27 |
+
width: 50px;
|
28 |
+
}
|
29 |
+
|
30 |
+
.action_bar .ig_data {
|
31 |
+
}
|
32 |
+
|
33 |
+
.action_bar .ig_button, .action_bar input[type="submit"], .action_bar input[type="button"] {
|
34 |
+
cursor: pointer;
|
35 |
+
}
|
36 |
+
|
37 |
+
.action_bar .ig_close {
|
38 |
+
cursor: pointer;
|
39 |
+
}
|
40 |
+
|
41 |
+
.action_bar .powered_by {
|
42 |
+
vertical-align: top;
|
43 |
+
opacity: .5;
|
44 |
+
display: inline-block;
|
45 |
+
float: left;
|
46 |
+
}
|
47 |
+
|
48 |
+
.action_bar .powered_by img {
|
49 |
+
width: 2em;
|
50 |
+
margin-left: 1em;
|
51 |
+
margin-top: 1em;
|
52 |
+
}
|
53 |
+
|
54 |
+
.action_bar .ig_arrow_block {
|
55 |
+
font-weight: 700;
|
56 |
+
z-index: 100000;
|
57 |
+
right: 10px;
|
58 |
+
text-align: right;
|
59 |
+
font-size: 20px;
|
60 |
+
cursor: pointer;
|
61 |
+
line-height: 0;
|
62 |
+
padding: 8px;
|
63 |
+
float: right;
|
64 |
+
}
|
65 |
+
|
66 |
+
.action_bar .ig_arrow_block span {
|
67 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
|
68 |
+
filter: alpha(opacity=60);
|
69 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
|
70 |
+
filter: alpha(opacity=60);
|
71 |
+
opacity: 0.6;
|
72 |
+
}
|
73 |
+
|
74 |
+
.action_bar .ig_arrow_block span:hover {
|
75 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
|
76 |
+
filter: alpha(opacity=90);
|
77 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
|
78 |
+
filter: alpha(opacity=90);
|
79 |
+
opacity: 0.9;
|
80 |
+
}
|
81 |
+
|
82 |
+
.action_bar .ig_arrow_block span {
|
83 |
+
font-size: 20px;
|
84 |
+
cursor: pointer;
|
85 |
+
}
|
86 |
+
|
87 |
+
.action_bar .ig_arrow:after {
|
88 |
+
font-family: dashicons;
|
89 |
+
content: "\f346";
|
90 |
+
}
|
91 |
+
|
92 |
+
.action_bar .top .ig_arrow_block.open {
|
93 |
+
padding: 5px;
|
94 |
+
margin-right: 5px;
|
95 |
+
margin-top: 8px;
|
96 |
+
background-color: transparent !important;
|
97 |
+
}
|
98 |
+
|
99 |
+
.action_bar .bottom .ig_arrow_block.open {
|
100 |
+
padding: 5px;
|
101 |
+
margin-right: 5px;
|
102 |
+
}
|
103 |
+
|
104 |
+
.action_bar .rotate {
|
105 |
+
transform:rotate(180deg);
|
106 |
+
-ms-transform:rotate(180deg); /* IE 9 */
|
107 |
+
-webkit-transform:rotate(180deg); /* Opera, Chrome, and Safari */
|
108 |
+
}
|
109 |
+
|
110 |
+
div.icegram .action_bar form {
|
111 |
+
margin: 0;
|
112 |
+
padding: 0;
|
113 |
+
}
|
114 |
+
div.icegram .action_bar input, div.icegram .action_bar label {
|
115 |
+
display: inline-block;
|
116 |
+
}
|
message-types/action-bar/images/chosen-sprite.png
ADDED
Binary file
|
message-types/action-bar/main.js
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Icegram Message Type - Action_Bar
|
3 |
+
**/
|
4 |
+
function Icegram_Message_Type_Action_Bar( data ) {
|
5 |
+
Icegram_Message_Type.call(this, data);
|
6 |
+
}
|
7 |
+
|
8 |
+
Icegram_Message_Type_Action_Bar.prototype = Object.create(Icegram_Message_Type.prototype);
|
9 |
+
Icegram_Message_Type_Action_Bar.prototype.constructor = Icegram_Message_Type_Action_Bar;
|
10 |
+
|
11 |
+
Icegram_Message_Type_Action_Bar.prototype.get_template_default = function () {
|
12 |
+
return '<div class="icegram action_bar_{{=id}}" >'+
|
13 |
+
'<div class="action_bar ig_container {{=theme}}" id="icegram_message_{{=id}}">'+
|
14 |
+
'<div class="ig_content">'+
|
15 |
+
'<div class="ig_arrow_block" id="action_bar_close_{{=id}}">'+
|
16 |
+
'<span class="ig_arrow"></span>'+
|
17 |
+
'</div>'+
|
18 |
+
'<div>'+
|
19 |
+
'<div class="ig_close"></div>'+
|
20 |
+
'</div>'+
|
21 |
+
'<div class="ig_data">'+
|
22 |
+
'<div class="ig_headline">{{=headline}}</div>'+
|
23 |
+
'<div class="ig_message">{{=message}}</div>'+
|
24 |
+
'</div>'+
|
25 |
+
'<div class="ig_button">{{=label}}</div>'+
|
26 |
+
'</div>'+
|
27 |
+
'</div>'+
|
28 |
+
'</div>';
|
29 |
+
};
|
30 |
+
|
31 |
+
Icegram_Message_Type_Action_Bar.prototype.post_render = function ( ) {
|
32 |
+
this.el.find('.ig_arrow_block').css('background-color', this.data.bg_color);
|
33 |
+
this.el.find('.ig_content').css('color', this.data.text_color);
|
34 |
+
this.el.css('background-color', this.data.bg_color);
|
35 |
+
if( this.data.theme == 'hello' ) {
|
36 |
+
var message_button = this.el.find('.ig_button');
|
37 |
+
this.el.find('.ig_data').append(message_button);
|
38 |
+
}
|
39 |
+
if ( this.data.theme == 'air-mail') {
|
40 |
+
this.el.find('.ig_content').css('background-color', this.data.bg_color);
|
41 |
+
}
|
42 |
+
};
|
43 |
+
|
44 |
+
Icegram_Message_Type_Action_Bar.prototype.set_position = function ( ) {
|
45 |
+
switch(this.data.position) {
|
46 |
+
case "21":
|
47 |
+
this.el.addClass('bottom');
|
48 |
+
this.el.css('position', 'fixed');
|
49 |
+
break;
|
50 |
+
case "01":
|
51 |
+
default:
|
52 |
+
this.el.addClass('top');
|
53 |
+
break;
|
54 |
+
}
|
55 |
+
|
56 |
+
};
|
57 |
+
|
58 |
+
Icegram_Message_Type_Action_Bar.prototype.show = function ( options, silent ) {
|
59 |
+
//if ( this.is_visible() ) return; TODO:: we are not hiding action bar we are sliding up with css need to check
|
60 |
+
var anim_delay = silent !== true ? 1000 : 0;
|
61 |
+
switch(this.data.position) {
|
62 |
+
case "21":
|
63 |
+
var self = this;
|
64 |
+
this.el.delay(this.data.delay_time).animate({
|
65 |
+
bottom: 0,
|
66 |
+
marginBottom: -this.el.outerHeight()
|
67 |
+
|
68 |
+
}, 0, "linear", function() {
|
69 |
+
self.el.show();
|
70 |
+
self.el.find('.ig_arrow').show();
|
71 |
+
self.el.find('.ig_arrow_block').addClass('open').removeClass('rotate').removeClass('border').css('position', 'initial');
|
72 |
+
});
|
73 |
+
this.el.animate({
|
74 |
+
marginBottom: 0
|
75 |
+
}, 300);
|
76 |
+
break;
|
77 |
+
case "01":
|
78 |
+
default:
|
79 |
+
var close_block = this.el.parent().find('.ig_arrow_block');
|
80 |
+
var message_template = this.el.parent();
|
81 |
+
this.el.parent().find('.ig_arrow_block').remove();
|
82 |
+
this.el.parent().find('.ig_content').prepend(close_block);
|
83 |
+
jQuery('body').prepend(message_template);
|
84 |
+
|
85 |
+
this.el.find('.ig_arrow').hide();
|
86 |
+
this.el.find('.ig_arrow_block').addClass('open').removeClass('border').css('position', 'initial');
|
87 |
+
|
88 |
+
var self = this;
|
89 |
+
this.el.delay(this.data.delay_time).animate({
|
90 |
+
marginTop: -this.el.outerHeight()
|
91 |
+
}, 0, "linear", function() {
|
92 |
+
self.el.show();
|
93 |
+
self.el.find('.ig_arrow').show();
|
94 |
+
self.el.find('.ig_arrow_block').addClass('open').addClass('rotate').removeClass('border').css('position', 'initial');
|
95 |
+
self.el.find('.ig_arrow_block').css('background-color', '');
|
96 |
+
});
|
97 |
+
this.el.animate({
|
98 |
+
marginTop: 0
|
99 |
+
}, 300);
|
100 |
+
break;
|
101 |
+
}
|
102 |
+
silent !== true && this.track( 'shown' );
|
103 |
+
};
|
104 |
+
|
105 |
+
Icegram_Message_Type_Action_Bar.prototype.add_powered_by = function ( pb ) {
|
106 |
+
if( this.data.theme != 'air-mail' ) {
|
107 |
+
this.el.find('.ig_content').before('<div class="powered_by" ><a href="'+pb.link+'" target="_blank"><img src="'+pb.logo+'" title="'+pb.text+'"/></a></div>');
|
108 |
+
} else {
|
109 |
+
this.el.find('.ig_content').prepend('<div class="powered_by" ><a href="'+pb.link+'" target="_blank"><img src="'+pb.logo+'" title="'+pb.text+'"/></a></div>');
|
110 |
+
}
|
111 |
+
};
|
112 |
+
|
113 |
+
Icegram_Message_Type_Action_Bar.prototype.hide = function ( options, silent ) {
|
114 |
+
//if ( !this.is_visible() ) return; //TODO:: need to check this this is not workig for action bar
|
115 |
+
var self = this;
|
116 |
+
var anim_delay = silent !== true ? 1000 : 0;
|
117 |
+
switch(this.data.position) {
|
118 |
+
case "21":
|
119 |
+
this.el.animate({
|
120 |
+
marginBottom: -this.el.outerHeight()
|
121 |
+
}, 300, "linear", function() {
|
122 |
+
self.el.find('.ig_arrow').show();
|
123 |
+
self.el.find('.ig_arrow_block').removeClass('open').addClass('border').addClass('rotate').css({
|
124 |
+
'position': 'fixed',
|
125 |
+
'bottom': '0'
|
126 |
+
});
|
127 |
+
});
|
128 |
+
break;
|
129 |
+
case "01":
|
130 |
+
default:
|
131 |
+
this.el.animate({
|
132 |
+
marginTop: -this.el.outerHeight()
|
133 |
+
}, 300, "linear", function() {
|
134 |
+
self.el.find('.ig_arrow_block').css('background-color', self.data.bg_color);
|
135 |
+
self.el.find('.ig_arrow_block').css('margin-top', '0' );
|
136 |
+
self.el.find('.ig_arrow').show();
|
137 |
+
self.el.find('.ig_arrow_block').removeClass('open').removeClass('rotate').addClass('border').css({
|
138 |
+
'position': 'absolute',
|
139 |
+
'top': '0'
|
140 |
+
});
|
141 |
+
});
|
142 |
+
break;
|
143 |
+
}
|
144 |
+
silent !== true && this.track( 'closed' );
|
145 |
+
};
|
146 |
+
|
147 |
+
|
148 |
+
Icegram_Message_Type_Action_Bar.prototype.on_click = function ( e ) {
|
149 |
+
e.data = e.data || { self: this };
|
150 |
+
// Clicked on close button
|
151 |
+
if (jQuery(e.target).filter('.open,.open span.ig_arrow,.ig_close').length) {
|
152 |
+
e.data.self.hide();
|
153 |
+
return;
|
154 |
+
}else if(jQuery(e.target).filter('.border,.border span.ig_arrow').length){
|
155 |
+
e.data.self.show();
|
156 |
+
return;
|
157 |
+
}
|
158 |
+
// Any other click is considered as CTA click
|
159 |
+
e.data.self.on_cta_click( e );
|
160 |
+
};
|
161 |
+
|
162 |
+
Icegram_Message_Type_Action_Bar.prototype.on_cta_click = function ( e ) {
|
163 |
+
e.data = e.data || { self: this };
|
164 |
+
e.data.self.track( 'clicked' );
|
165 |
+
if(jQuery(e.target).filter('.action_bar .ig_button').length){
|
166 |
+
typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
|
167 |
+
}
|
168 |
+
};
|
message-types/action-bar/main.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
if ( class_exists( 'Icegram_Message_Type_Action_Bar' ) ) return;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Icegram Action Bar
|
7 |
+
*/
|
8 |
+
class Icegram_Message_Type_Action_Bar extends Icegram_Message_Type {
|
9 |
+
|
10 |
+
function __construct() {
|
11 |
+
parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
|
12 |
+
add_filter( 'icegram_message_type_params_action-bar', array( $this, 'set_admin_style' ) );
|
13 |
+
}
|
14 |
+
|
15 |
+
function define_settings() {
|
16 |
+
parent::define_settings();
|
17 |
+
$this->settings['position']['values'] = array( '01', '21' );
|
18 |
+
$this->settings['position']['default'] = '01';
|
19 |
+
$this->settings['theme']['default'] = 'hello';
|
20 |
+
$this->settings['bg_color']['default'] = '#eb593c';
|
21 |
+
$this->settings['text_color']['default'] = '#ffffff';
|
22 |
+
unset ( $this->settings['animation'],
|
23 |
+
$this->settings['icon']
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
function set_admin_style( $params ) {
|
28 |
+
|
29 |
+
$params['admin_style'] = array( 'label_bg_color' => '#DF6B00',
|
30 |
+
'theme_header_height' => '6em',
|
31 |
+
'thumbnail_width' => '92%',
|
32 |
+
'thumbnail_height' => '4.5em'
|
33 |
+
);
|
34 |
+
return $params;
|
35 |
+
}
|
36 |
+
}
|
{assets/css/action-bar → message-types/action-bar/themes}/air-mail.css
RENAMED
@@ -1,7 +1,5 @@
|
|
1 |
-
.air-mail.
|
2 |
position: relative;
|
3 |
-
display: none;
|
4 |
-
width: 100%;
|
5 |
background-color: #fff;
|
6 |
-webkit-background-clip: padding-box;
|
7 |
background-clip: padding-box;
|
@@ -11,12 +9,9 @@
|
|
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.
|
20 |
position: absolute;
|
21 |
top: 0;
|
22 |
left: 0;
|
@@ -29,58 +24,42 @@
|
|
29 |
content: "";
|
30 |
}
|
31 |
|
32 |
-
.air-mail.
|
33 |
padding-bottom: 7px;
|
34 |
}
|
35 |
|
36 |
-
.air-mail.
|
37 |
padding-top: 7px;
|
38 |
}
|
39 |
|
40 |
-
.air-mail .
|
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 .
|
57 |
font-size: 1.3em;
|
58 |
font-weight: 700;
|
59 |
line-height: 1.2em;
|
60 |
padding: 0 10px;
|
61 |
}
|
62 |
|
63 |
-
.air-mail .
|
64 |
-
|
65 |
-
|
66 |
}
|
67 |
|
68 |
-
.air-mail img.icon {
|
69 |
width: 50px;
|
70 |
}
|
71 |
|
72 |
-
.air-mail .
|
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 .
|
83 |
-
cursor: pointer;
|
84 |
letter-spacing: 1px;
|
85 |
vertical-align: text-bottom;
|
86 |
text-align: center;
|
@@ -98,14 +77,14 @@
|
|
98 |
padding: .7em 2em;
|
99 |
}
|
100 |
|
101 |
-
.air-mail .
|
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 .
|
109 |
-moz-transform: translate(1px, 4px);
|
110 |
-ms-transform: translate(1px, 4px);
|
111 |
-o-transform: translate(1px, 4px);
|
@@ -116,7 +95,7 @@
|
|
116 |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
|
117 |
}
|
118 |
|
119 |
-
.air-mail .
|
120 |
background: url(../../images/chosen-sprite.png) no-repeat -43px 0;
|
121 |
height: 10px;
|
122 |
width: 10px;
|
@@ -125,13 +104,12 @@
|
|
125 |
position: absolute !important;
|
126 |
top: 7px;
|
127 |
right: 7px;
|
128 |
-
cursor: pointer;
|
129 |
zoom: 1.3;
|
130 |
}
|
131 |
|
132 |
-
.air-mail .
|
133 |
display: none;
|
134 |
}
|
135 |
-
.air-mail .powered_by img {
|
136 |
margin: 0 !important;
|
137 |
}
|
1 |
+
.action_bar.air-mail.ig_container {
|
2 |
position: relative;
|
|
|
|
|
3 |
background-color: #fff;
|
4 |
-webkit-background-clip: padding-box;
|
5 |
background-clip: padding-box;
|
9 |
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #e5e5e5 0%), color-stop(1, #f7f7f7 100%));
|
10 |
filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr=#e5e5e5 0%, EndColorStr=#f7f7f7 100%)";
|
11 |
background-image: linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
+
.action_bar.air-mail.ig_container:before {
|
15 |
position: absolute;
|
16 |
top: 0;
|
17 |
left: 0;
|
24 |
content: "";
|
25 |
}
|
26 |
|
27 |
+
.action_bar.air-mail.ig_container.top {
|
28 |
padding-bottom: 7px;
|
29 |
}
|
30 |
|
31 |
+
.action_bar.air-mail.ig_container.bottom {
|
32 |
padding-top: 7px;
|
33 |
}
|
34 |
|
35 |
+
.action_bar.air-mail .ig_content {
|
36 |
position: relative;
|
|
|
37 |
background: #F2F2F2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
padding: 1em 1em .25em 1em;
|
39 |
}
|
40 |
|
41 |
+
.action_bar.air-mail .ig_headline {
|
42 |
font-size: 1.3em;
|
43 |
font-weight: 700;
|
44 |
line-height: 1.2em;
|
45 |
padding: 0 10px;
|
46 |
}
|
47 |
|
48 |
+
.action_bar.air-mail .ig_message {
|
49 |
+
line-height: 1.2em;
|
50 |
+
padding: 5px 10px;
|
51 |
}
|
52 |
|
53 |
+
.action_bar.air-mail img.icon {
|
54 |
width: 50px;
|
55 |
}
|
56 |
|
57 |
+
.action_bar.air-mail .ig_data {
|
|
|
|
|
|
|
|
|
|
|
58 |
max-width: 75%;
|
59 |
display: inline-block;
|
60 |
}
|
61 |
|
62 |
+
.action_bar.air-mail .ig_button, .action_bar.air-mail input[type="submit"], .action_bar.air-mail input[type="button"] {
|
|
|
63 |
letter-spacing: 1px;
|
64 |
vertical-align: text-bottom;
|
65 |
text-align: center;
|
77 |
padding: .7em 2em;
|
78 |
}
|
79 |
|
80 |
+
.action_bar.air-mail .ig_button:hover, .action_bar.air-mail input[type="submit"]:hover, .action_bar.air-mail input[type="button"]:hover {
|
81 |
color: rgb(242, 245, 250);
|
82 |
background: hsl(216, 50%, 47%);
|
83 |
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
|
84 |
border: 2px solid #4472b9 !important;
|
85 |
}
|
86 |
|
87 |
+
.action_bar.air-mail .ig_button:active, .action_bar.air-mail input[type="submit"]:active, .action_bar.air-mail input[type="button"]:active {
|
88 |
-moz-transform: translate(1px, 4px);
|
89 |
-ms-transform: translate(1px, 4px);
|
90 |
-o-transform: translate(1px, 4px);
|
95 |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
|
96 |
}
|
97 |
|
98 |
+
.action_bar.air-mail .ig_close {
|
99 |
background: url(../../images/chosen-sprite.png) no-repeat -43px 0;
|
100 |
height: 10px;
|
101 |
width: 10px;
|
104 |
position: absolute !important;
|
105 |
top: 7px;
|
106 |
right: 7px;
|
|
|
107 |
zoom: 1.3;
|
108 |
}
|
109 |
|
110 |
+
.action_bar.air-mail .ig_arrow_block {
|
111 |
display: none;
|
112 |
}
|
113 |
+
.action_bar.air-mail .powered_by img {
|
114 |
margin: 0 !important;
|
115 |
}
|
{assets/images/themes/action-bar → message-types/action-bar/themes}/air-mail.png
RENAMED
File without changes
|
{assets/css/action-bar → message-types/action-bar/themes}/bold.css
RENAMED
@@ -1,59 +1,46 @@
|
|
1 |
-
.bold.
|
2 |
-
left: 0;
|
3 |
-
width: 100%;
|
4 |
-
z-index: 100000;
|
5 |
-
display: none;
|
6 |
-
padding: 0;
|
7 |
-
margin: 0;
|
8 |
}
|
9 |
|
10 |
-
.bold.
|
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.
|
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 .
|
|
|
|
|
|
|
|
|
25 |
font-size: 1.3em;
|
26 |
font-weight: 700;
|
27 |
line-height: 1.2em;
|
28 |
padding: 0 10px;
|
29 |
}
|
30 |
|
31 |
-
.bold .
|
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 .
|
46 |
-
|
47 |
-
padding: 1em 0 0 1em;
|
48 |
}
|
49 |
|
50 |
-
.bold .
|
51 |
max-width: 75%;
|
52 |
display: inline-block;
|
53 |
}
|
54 |
|
55 |
-
.bold .
|
56 |
-
cursor: pointer;
|
57 |
background: hsl(145, 82%, 30%);
|
58 |
color: hsl(0, 100%, 100%);
|
59 |
display: inline-block;
|
@@ -72,7 +59,7 @@
|
|
72 |
padding: .7em 2em;
|
73 |
}
|
74 |
|
75 |
-
.bold .
|
76 |
position: relative;
|
77 |
top: 3px;
|
78 |
-moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
|
@@ -80,7 +67,7 @@
|
|
80 |
box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
|
81 |
}
|
82 |
|
83 |
-
.bold .
|
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);
|
@@ -90,17 +77,17 @@
|
|
90 |
box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
|
91 |
}
|
92 |
|
93 |
-
.bold.top .
|
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 .
|
101 |
-
border-width: 3px 3px
|
102 |
-
-moz-border-radius: 5px 5px
|
103 |
-
-webkit-border-radius: 5px 5px
|
104 |
-
border-radius: 5px 5px
|
105 |
padding: .8em .4em;
|
106 |
}
|
1 |
+
.action_bar.bold.ig_container {
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
}
|
3 |
|
4 |
+
.action_bar.bold.ig_container.top {
|
5 |
border-bottom: solid 3px #f3eeee;
|
6 |
-moz-box-shadow: 0 -6px 16px 7px #000;
|
7 |
-webkit-box-shadow: 0 -6px 16px 7px #000;
|
8 |
box-shadow: 0 -6px 16px 7px #000;
|
9 |
}
|
10 |
|
11 |
+
.action_bar.bold.ig_container.bottom {
|
12 |
border-top: solid 3px #f3eeee;
|
13 |
-moz-box-shadow: 0 8px 23px 7px #000;
|
14 |
-webkit-box-shadow: 0 8px 23px 7px #000;
|
15 |
box-shadow: 0 8px 23px 7px #000;
|
16 |
}
|
17 |
|
18 |
+
.action_bar.bold .ig_content {
|
19 |
+
padding: 1em 0 0 1em;
|
20 |
+
}
|
21 |
+
|
22 |
+
.action_bar.bold .ig_headline {
|
23 |
font-size: 1.3em;
|
24 |
font-weight: 700;
|
25 |
line-height: 1.2em;
|
26 |
padding: 0 10px;
|
27 |
}
|
28 |
|
29 |
+
.action_bar.bold .ig_message {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
line-height: 1.2em;
|
31 |
padding: 5px 10px;
|
32 |
}
|
33 |
|
34 |
+
.action_bar.bold img.icon {
|
35 |
+
width: 50px;
|
|
|
36 |
}
|
37 |
|
38 |
+
.action_bar.bold .ig_data {
|
39 |
max-width: 75%;
|
40 |
display: inline-block;
|
41 |
}
|
42 |
|
43 |
+
.action_bar.bold .ig_button, .action_bar.bold input[type="submit"], .action_bar.bold input[type="button"] {
|
|
|
44 |
background: hsl(145, 82%, 30%);
|
45 |
color: hsl(0, 100%, 100%);
|
46 |
display: inline-block;
|
59 |
padding: .7em 2em;
|
60 |
}
|
61 |
|
62 |
+
.action_bar.bold .ig_button:active, .action_bar.bold input[type="submit"]:active, .action_bar.bold input[type="button"]:active {
|
63 |
position: relative;
|
64 |
top: 3px;
|
65 |
-moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
|
67 |
box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
|
68 |
}
|
69 |
|
70 |
+
.action_bar.bold .ig_arrow_block.border {
|
71 |
border: 3px solid #fff;
|
72 |
-moz-box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
|
73 |
-webkit-box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.35);
|
77 |
box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
|
78 |
}
|
79 |
|
80 |
+
.action_bar.bold.top .ig_arrow_block.border, .action_bar.bold.bottom .ig_arrow_block {
|
81 |
border-width: 0 3px 3px 3px;
|
82 |
-moz-border-radius: 0 0 5px 5px;
|
83 |
-webkit-border-radius: 0 0 5px 5px;
|
84 |
border-radius: 0 0 5px 5px;
|
85 |
}
|
86 |
|
87 |
+
.action_bar.bold.bottom .ig_arrow_block.border, .action_bar.bold.top .ig_arrow_block {
|
88 |
+
border-width: 0 3px 3px 3px;
|
89 |
+
-moz-border-radius: 0 0 5px 5px;
|
90 |
+
-webkit-border-radius: 0 0 5px 5px;
|
91 |
+
border-radius: 0 0 5px 5px;
|
92 |
padding: .8em .4em;
|
93 |
}
|
{assets/images/themes/action-bar → message-types/action-bar/themes}/bold.png
RENAMED
File without changes
|
{assets/css/action-bar → message-types/action-bar/themes}/hello.css
RENAMED
@@ -1,52 +1,53 @@
|
|
1 |
-
.hello.
|
2 |
-
left: 0;
|
3 |
line-height: 1.5em;
|
4 |
overflow: visible;
|
5 |
-
|
6 |
-
z-index: 100000;
|
7 |
-
display: none;
|
8 |
-
padding: 0;
|
9 |
-
margin: 0;
|
10 |
}
|
11 |
|
12 |
-
.hello.
|
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.
|
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 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
display: inline-block;
|
|
|
28 |
margin-right: 1.5em;
|
29 |
}
|
30 |
|
31 |
-
.hello .
|
32 |
-
|
|
|
33 |
}
|
34 |
|
35 |
-
.hello .
|
36 |
width: 32px;
|
37 |
height: 32px;
|
38 |
}
|
39 |
|
40 |
-
.hello .
|
41 |
-
|
42 |
-
line-height: 1.2em;
|
43 |
-
}
|
44 |
-
|
45 |
-
.hello .content {
|
46 |
-
padding: .3em;
|
47 |
}
|
48 |
|
49 |
-
.hello .
|
50 |
display: inline;
|
51 |
background: #4A4844;
|
52 |
background: linear-gradient(top, #4A4844 0%, #2D2C29 100%);
|
@@ -65,14 +66,13 @@
|
|
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 .
|
76 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
|
77 |
filter: alpha(opacity=80);
|
78 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
|
@@ -80,21 +80,7 @@
|
|
80 |
opacity: 0.8;
|
81 |
}
|
82 |
|
83 |
-
.hello .
|
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);
|
@@ -104,31 +90,31 @@
|
|
104 |
box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
|
105 |
}
|
106 |
|
107 |
-
.hello.top .
|
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 .
|
115 |
-
border-width: 3px 3px
|
116 |
-
-moz-border-radius: 7px 7px
|
117 |
-
-webkit-border-radius: 7px 7px
|
118 |
-
border-radius: 7px 7px
|
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;
|
1 |
+
.action_bar.hello.ig_container {
|
|
|
2 |
line-height: 1.5em;
|
3 |
overflow: visible;
|
4 |
+
bottom: 0;
|
|
|
|
|
|
|
|
|
5 |
}
|
6 |
|
7 |
+
.action_bar.hello.ig_container.top {
|
8 |
border-bottom: 3px solid #fff;
|
9 |
-moz-box-shadow: 0 -6px 16px 7px #000;
|
10 |
-webkit-box-shadow: 0 -6px 16px 7px #000;
|
11 |
box-shadow: 0 -6px 16px 7px #000;
|
12 |
}
|
13 |
|
14 |
+
.action_bar.hello.ig_container.bottom {
|
15 |
border-top: 3px solid #fff;
|
16 |
-moz-box-shadow: 0 8px 23px 7px #000;
|
17 |
-webkit-box-shadow: 0 8px 23px 7px #000;
|
18 |
box-shadow: 0 8px 23px 7px #000;
|
19 |
}
|
20 |
|
21 |
+
.action_bar.hello .ig_content {
|
22 |
+
padding: .3em;
|
23 |
+
}
|
24 |
+
|
25 |
+
.action_bar.hello .ig_content p {
|
26 |
+
margin: 0;
|
27 |
+
line-height: 1.2em;
|
28 |
+
}
|
29 |
+
|
30 |
+
.action_bar.hello .ig_headline {
|
31 |
display: inline-block;
|
32 |
+
font-weight: bold;
|
33 |
margin-right: 1.5em;
|
34 |
}
|
35 |
|
36 |
+
.action_bar.hello .ig_message {
|
37 |
+
display: inline-block;
|
38 |
+
margin-right: 1.5em;
|
39 |
}
|
40 |
|
41 |
+
.action_bar.hello .ig_icon {
|
42 |
width: 32px;
|
43 |
height: 32px;
|
44 |
}
|
45 |
|
46 |
+
.action_bar.hello .ig_data {
|
47 |
+
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
+
.action_bar.hello .ig_button, .action_bar.hello input[type="submit"], .action_bar.hello input[type="button"] {
|
51 |
display: inline;
|
52 |
background: #4A4844;
|
53 |
background: linear-gradient(top, #4A4844 0%, #2D2C29 100%);
|
66 |
-webkit-border-radius: 4px;
|
67 |
border-radius: 4px;
|
68 |
text-decoration: none;
|
|
|
69 |
font-size: 1em;
|
70 |
margin: 4px 0 0 10px;
|
71 |
padding: .25em 1em;
|
72 |
vertical-align: text-bottom;
|
73 |
}
|
74 |
|
75 |
+
.action_bar.hello .ig_button:hover, .action_bar.hello input[type="submit"]:hover, .action_bar.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)";
|
80 |
opacity: 0.8;
|
81 |
}
|
82 |
|
83 |
+
.action_bar.hello .ig_arrow_block.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);
|
90 |
box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
|
91 |
}
|
92 |
|
93 |
+
.action_bar.hello.top .ig_arrow_block.border, .action_bar.hello.bottom .ig_arrow_block {
|
94 |
border-width: 0 3px 3px 3px;
|
95 |
-moz-border-radius: 0 0 7px 7px;
|
96 |
-webkit-border-radius: 0 0 7px 7px;
|
97 |
border-radius: 0 0 7px 7px;
|
98 |
}
|
99 |
|
100 |
+
.action_bar.hello.bottom .ig_arrow_block.border, .action_bar.hello.top .ig_arrow_block {
|
101 |
+
border-width: 0 3px 3px 3px;
|
102 |
+
-moz-border-radius: 0 0 7px 7px;
|
103 |
+
-webkit-border-radius: 0 0 7px 7px;
|
104 |
+
border-radius: 0 0 7px 7px;
|
105 |
padding: .8em .4em;
|
106 |
}
|
107 |
|
108 |
+
.action_bar.hello .powered_by img {
|
109 |
width: 24px;
|
110 |
}
|
111 |
|
112 |
+
.action_bar.hello .powered_by {
|
113 |
margin-top: 0;
|
114 |
height: 32px;
|
115 |
}
|
116 |
|
117 |
+
.action_bar.hello .powered_by img {
|
118 |
width: 1.5em !important;
|
119 |
margin-left: 1em !important;
|
120 |
margin-top: .4em !important;
|
{assets/images/themes/action-bar → message-types/action-bar/themes}/hello.png
RENAMED
File without changes
|
message-types/action-bar/themes/solid.css
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.action_bar.solid.ig_container {
|
2 |
+
}
|
3 |
+
|
4 |
+
.action_bar.solid.ig_container.top {
|
5 |
+
}
|
6 |
+
|
7 |
+
.action_bar.solid.ig_container.bottom {
|
8 |
+
}
|
9 |
+
|
10 |
+
.action_bar.solid .ig_content {
|
11 |
+
padding: 1em 0 0 1em;
|
12 |
+
}
|
13 |
+
|
14 |
+
.action_bar.solid .ig_headline {
|
15 |
+
font-size: 1.2em;
|
16 |
+
line-height: 1em;
|
17 |
+
padding: 0 10px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.action_bar.solid .ig_message {
|
21 |
+
line-height: 1em;
|
22 |
+
padding: 5px 10px;
|
23 |
+
}
|
24 |
+
|
25 |
+
.action_bar.solid img.icon {
|
26 |
+
width: 50px;
|
27 |
+
}
|
28 |
+
|
29 |
+
.action_bar.solid .ig_data {
|
30 |
+
max-width: 75%;
|
31 |
+
display: inline-block;
|
32 |
+
}
|
33 |
+
|
34 |
+
.action_bar.solid .ig_button, .action_bar.solid input[type="submit"], .action_bar.solid input[type="button"] {
|
35 |
+
background: #02612B;
|
36 |
+
color: hsl(0, 100%, 100%);
|
37 |
+
display: inline-block;
|
38 |
+
font-size: 1em;
|
39 |
+
letter-spacing: .1em;
|
40 |
+
-moz-border-radius: 0.1em;
|
41 |
+
-webkit-border-radius: 0.1em;
|
42 |
+
border-radius: 0.1em;
|
43 |
+
vertical-align: text-bottom;
|
44 |
+
font-weight: 700;
|
45 |
+
padding: .6em 2em;
|
46 |
+
}
|
47 |
+
|
48 |
+
.action_bar.solid .ig_button:hover, .action_bar.solid input[type="submit"]:hover, .action_bar.solid input[type="button"]:hover {
|
49 |
+
background-color: #25a25a;
|
50 |
+
}
|
51 |
+
|
52 |
+
.action_bar.solid.top .ig_arrow_block.border, .action_bar.solid.bottom .ig_arrow_block {
|
53 |
+
border-width: 0 3px 3px 3px;
|
54 |
+
}
|
55 |
+
|
56 |
+
.action_bar.solid.bottom .ig_arrow_block.border, .action_bar.solid.top .ig_arrow_block {
|
57 |
+
border-width: 3px 3px 0 3px;
|
58 |
+
padding: .8em .4em;
|
59 |
+
}
|
{assets/images/themes/action-bar → message-types/action-bar/themes}/solid.png
RENAMED
File without changes
|
message-types/messenger/default.css
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.messenger.ig_container {
|
2 |
+
display: block;
|
3 |
+
position: fixed;
|
4 |
+
cursor: pointer;
|
5 |
+
z-index: 100000;
|
6 |
+
margin: 0;
|
7 |
+
padding: 0;
|
8 |
+
font-family: "Lucida Grande", Arial, sans-serif;
|
9 |
+
background: transparent !important;
|
10 |
+
overflow: hidden;
|
11 |
+
text-align: left;
|
12 |
+
}
|
13 |
+
.messenger .ig_content {
|
14 |
+
|
15 |
+
}
|
16 |
+
.messenger .ig_header {
|
17 |
+
position: relative;
|
18 |
+
overflow: hidden;
|
19 |
+
display: block;
|
20 |
+
white-space: nowrap;
|
21 |
+
}
|
22 |
+
|
23 |
+
.messenger .ig_header_image {
|
24 |
+
display: inline-block;
|
25 |
+
}
|
26 |
+
|
27 |
+
.messenger .ig_header_text {
|
28 |
+
text-decoration: none;
|
29 |
+
font-weight: 700;
|
30 |
+
overflow: hidden;
|
31 |
+
}
|
32 |
+
|
33 |
+
.messenger .ig_headline {
|
34 |
+
overflow: hidden;
|
35 |
+
display: inline-block;
|
36 |
+
text-decoration: none;
|
37 |
+
white-space: nowrap;
|
38 |
+
}
|
39 |
+
|
40 |
+
.messenger .ig_header2_image {
|
41 |
+
height: 30px;
|
42 |
+
position: relative;
|
43 |
+
display: block;
|
44 |
+
border: 1px solid #BFBFBF;
|
45 |
+
border-bottom: none;
|
46 |
+
border-top: none;
|
47 |
+
}
|
48 |
+
|
49 |
+
.messenger .ig_body {
|
50 |
+
overflow-x: hidden;
|
51 |
+
display: block;
|
52 |
+
border-bottom: none;
|
53 |
+
}
|
54 |
+
|
55 |
+
.messenger .ig_message_body {
|
56 |
+
text-align: left;
|
57 |
+
word-wrap: break-word;
|
58 |
+
display: inline-block;
|
59 |
+
}
|
60 |
+
|
61 |
+
.messenger .ig_message_body p {
|
62 |
+
margin-bottom: 0.25em;
|
63 |
+
}
|
64 |
+
|
65 |
+
.messenger .ig_no_icon.ig_message_body {
|
66 |
+
width: 91%;
|
67 |
+
}
|
68 |
+
|
69 |
+
.messenger .ig_separator {
|
70 |
+
color: transparent;
|
71 |
+
background: transparent;
|
72 |
+
border: none;
|
73 |
+
display: block;
|
74 |
+
font-size: 13px;
|
75 |
+
line-height: 15px;
|
76 |
+
margin: 1px 0 2px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.messenger .ig_footer {
|
80 |
+
position: relative;
|
81 |
+
display: block;
|
82 |
+
background-repeat: no-repeat;
|
83 |
+
}
|
84 |
+
|
85 |
+
.messenger .ig_footer_image {
|
86 |
+
background-repeat: no-repeat;
|
87 |
+
position: relative;
|
88 |
+
display: block;
|
89 |
+
}
|
90 |
+
|
91 |
+
.messenger .ig_close {
|
92 |
+
position: absolute;
|
93 |
+
display: inline-block;
|
94 |
+
background-repeat: no-repeat;
|
95 |
+
}
|
96 |
+
|
97 |
+
.messenger .ig_icon {
|
98 |
+
height: 28px;
|
99 |
+
width: 28px;
|
100 |
+
vertical-align: top;
|
101 |
+
}
|
102 |
+
|
103 |
+
.messenger .powered_by {
|
104 |
+
font-size: 10px;
|
105 |
+
position: relative;
|
106 |
+
}
|
{assets → message-types/messenger}/images/clear-footer.png
RENAMED
File without changes
|
{assets → message-types/messenger}/images/clear-header.png
RENAMED
File without changes
|
{assets → message-types/messenger}/images/clear-option.png
RENAMED
File without changes
|
{assets → message-types/messenger}/images/social-img.png
RENAMED
File without changes
|
{assets → message-types/messenger}/images/talk-close.png
RENAMED
File without changes
|
{assets → message-types/messenger}/images/talk-footer-1.png
RENAMED
File without changes
|
{assets → message-types/messenger}/images/talk-header-1.png
RENAMED
File without changes
|
{assets → message-types/messenger}/images/talk-header-2.png
RENAMED
File without changes
|
message-types/messenger/main.js
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/**
|
3 |
+
* Icegram Message Type - Messenger
|
4 |
+
**/
|
5 |
+
function Icegram_Message_Type_Messenger( data ) {
|
6 |
+
|
7 |
+
Icegram_Message_Type.call(this, data);
|
8 |
+
}
|
9 |
+
Icegram_Message_Type_Messenger.prototype = Object.create(Icegram_Message_Type.prototype);
|
10 |
+
Icegram_Message_Type_Messenger.prototype.constructor = Icegram_Message_Type_Messenger;
|
11 |
+
|
12 |
+
Icegram_Message_Type_Messenger.prototype.get_template_default = function () {
|
13 |
+
return '<div class="icegram messenger {{=theme}} {{=animation}} ig_container" data="{{=id}}" id="icegram_message_{{=id}}">' +
|
14 |
+
'<div class="ig_content">' +
|
15 |
+
'<div class="ig_header">' +
|
16 |
+
'<div class="ig_header_image"></div>' +
|
17 |
+
'<div class="ig_header_text">' +
|
18 |
+
'<div class="ig_headline">{{=headline}}</div>' +
|
19 |
+
'</div>' +
|
20 |
+
'</div>' +
|
21 |
+
'<div class="ig_header2_image"></div>' +
|
22 |
+
'<div class="ig_body">' +
|
23 |
+
'<img class="ig_icon" src="{{=icon}}"/>' +
|
24 |
+
'<div class="ig_message_body">{{=message}}</div>' +
|
25 |
+
'<div class="ig_separator"></div>' +
|
26 |
+
'</div>' +
|
27 |
+
'<div class="ig_footer">' +
|
28 |
+
'<div class="ig_footer_image"></div>' +
|
29 |
+
'</div>' +
|
30 |
+
'</div>' +
|
31 |
+
'<div class="ig_close" id="ig_close_{{=id}}"></div>' +
|
32 |
+
'</div>';
|
33 |
+
};
|
34 |
+
|
35 |
+
|
36 |
+
Icegram_Message_Type_Messenger.prototype.post_render = function ( ) {
|
37 |
+
// No avatar...
|
38 |
+
if (this.data.icon == '') {
|
39 |
+
this.el.find('.ig_icon').remove();
|
40 |
+
this.el.find('.ig_message_body').addClass('ig_no_icon');
|
41 |
+
}
|
42 |
+
};
|
43 |
+
|
44 |
+
Icegram_Message_Type_Messenger.prototype.set_position = function ( ) {
|
45 |
+
switch(this.data.position) {
|
46 |
+
case "20":
|
47 |
+
this.el.css( { 'left': 5, 'bottom': 0} );
|
48 |
+
break;
|
49 |
+
case "22":
|
50 |
+
default:
|
51 |
+
this.el.css( {'left': jQuery(window).width() - this.el.outerWidth() - 5, 'bottom': 0} );
|
52 |
+
break;
|
53 |
+
}
|
54 |
+
|
55 |
+
};
|
56 |
+
|
57 |
+
Icegram_Message_Type_Messenger.prototype.show = function ( options, silent ) {
|
58 |
+
|
59 |
+
if ( this.is_visible() ) return;
|
60 |
+
|
61 |
+
var anim_delay = silent !== true ? 1000 : 0;
|
62 |
+
switch(this.data.animation) {
|
63 |
+
case "appear":
|
64 |
+
this.el.fadeIn(anim_delay);
|
65 |
+
break;
|
66 |
+
case "slide":
|
67 |
+
this.el.slideDown(anim_delay);
|
68 |
+
break;
|
69 |
+
default:
|
70 |
+
break;
|
71 |
+
}
|
72 |
+
silent !== true && this.track( 'shown' );
|
73 |
+
};
|
74 |
+
|
75 |
+
Icegram_Message_Type_Messenger.prototype.add_powered_by = function ( pb ) {
|
76 |
+
this.el.find('.ig_content').after('<div class="powered_by"><a href="'+pb.link+'" target="_blank">'+pb.text+'</a></div>');
|
77 |
+
};
|
78 |
+
|
79 |
+
Icegram_Message_Type_Messenger.prototype.hide = function ( options, silent ) {
|
80 |
+
|
81 |
+
if ( !this.is_visible() ) return;
|
82 |
+
|
83 |
+
var anim_delay = silent !== true ? 1000 : 0;
|
84 |
+
switch(this.data.animation) {
|
85 |
+
case "appear":
|
86 |
+
this.el.fadeOut(anim_delay);
|
87 |
+
break;
|
88 |
+
case "slide":
|
89 |
+
this.el.slideUp(anim_delay);
|
90 |
+
break;
|
91 |
+
default:
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
silent !== true && this.track( 'closed' );
|
95 |
+
};
|
message-types/messenger/main.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
if ( class_exists( 'Icegram_Message_Type_Messenger' ) ) return;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Icegram Messenger
|
7 |
+
*/
|
8 |
+
class Icegram_Message_Type_Messenger extends Icegram_Message_Type {
|
9 |
+
|
10 |
+
function __construct() {
|
11 |
+
parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
|
12 |
+
add_filter( 'icegram_message_type_params_messenger', array( $this, 'set_admin_style' ) );
|
13 |
+
}
|
14 |
+
|
15 |
+
function define_settings() {
|
16 |
+
parent::define_settings();
|
17 |
+
$this->settings['position']['values'] = array( '20', '22' );
|
18 |
+
$this->settings['position']['default'] = '22';
|
19 |
+
$this->settings['animation']['values'] = array ( "slide" => __( 'Slide', 'icegram' ),
|
20 |
+
"appear" => __( 'Appear', 'icegram' ) );
|
21 |
+
$this->settings['animation']['default'] = 'slide';
|
22 |
+
$this->settings['theme']['default'] = 'social';
|
23 |
+
unset ( $this->settings['text_color'],
|
24 |
+
$this->settings['bg_color'],
|
25 |
+
$this->settings['label']
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
function set_admin_style( $params ) {
|
30 |
+
|
31 |
+
$params['admin_style'] = array( 'label_bg_color' => '#883EB0',
|
32 |
+
'theme_header_height' => '7em',
|
33 |
+
'thumbnail_width' => '27.6%',
|
34 |
+
'thumbnail_height' => '13.6em'
|
35 |
+
);
|
36 |
+
return $params;
|
37 |
+
}
|
38 |
+
}
|
message-types/messenger/themes/canvas.css
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.messenger.canvas.ig_container {
|
2 |
+
max-height: 80%;
|
3 |
+
max-width: 400px;
|
4 |
+
font-family: inherit;
|
5 |
+
}
|
6 |
+
|
7 |
+
.messenger.canvas .ig_content {
|
8 |
+
border: 1px solid #BFBFBF;
|
9 |
+
margin: 10px;
|
10 |
+
padding: 10px;
|
11 |
+
overflow: hidden;
|
12 |
+
-webkit-box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.135);
|
13 |
+
box-shadow: 0 0.15em 0.35em 0 rgba(0, 0, 0, 0.13);
|
14 |
+
background: #FFF;
|
15 |
+
}
|
16 |
+
|
17 |
+
.messenger.canvas .ig_header {
|
18 |
+
|
19 |
+
}
|
20 |
+
|
21 |
+
.messenger.canvas .ig_header_image {
|
22 |
+
display: none;
|
23 |
+
}
|
24 |
+
|
25 |
+
.messenger.canvas .ig_header_text {
|
26 |
+
line-height: 1.2em;
|
27 |
+
}
|
28 |
+
|
29 |
+
.messenger.canvas .ig_headline {
|
30 |
+
margin: -.35em 35px inherit inherit;
|
31 |
+
display: inline-block;
|
32 |
+
font-size: 1.5em;
|
33 |
+
font-weight: bold;
|
34 |
+
color: #111;
|
35 |
+
line-height: 1.5em;
|
36 |
+
}
|
37 |
+
|
38 |
+
.messenger.canvas .ig_header2_image {
|
39 |
+
display: none;
|
40 |
+
}
|
41 |
+
|
42 |
+
.messenger.canvas .ig_body {
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
.messenger.canvas .ig_message_body {
|
47 |
+
color: #444;
|
48 |
+
line-height: 1.2em;
|
49 |
+
display: inline;
|
50 |
+
}
|
51 |
+
|
52 |
+
.messenger.canvas .ig_no_icon.ig_message_body {
|
53 |
+
width: 98%;
|
54 |
+
}
|
55 |
+
|
56 |
+
.messenger.canvas .ig_separator {
|
57 |
+
display: none;
|
58 |
+
}
|
59 |
+
|
60 |
+
.messenger.canvas .ig_footer {
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
.messenger.canvas .ig_footer_image {
|
65 |
+
display: none;
|
66 |
+
}
|
67 |
+
|
68 |
+
.messenger.canvas .ig_close {
|
69 |
+
background: no-repeat url(../images/clear-header.png) 0 -195px;
|
70 |
+
right: 10px;
|
71 |
+
top: 20px;
|
72 |
+
width: 21px;
|
73 |
+
height: 13px;
|
74 |
+
}
|
75 |
+
|
76 |
+
.messenger.canvas .powered_by {
|
77 |
+
margin: -0.5em 10px 0.5em 10px;
|
78 |
+
}
|
79 |
+
|
80 |
+
.messenger.canvas .ig_icon {
|
81 |
+
float: right;
|
82 |
+
border-radius: 5%;
|
83 |
+
max-width: 400px;
|
84 |
+
height: auto !important;
|
85 |
+
width: auto !important;
|
86 |
+
}
|
{assets/images/themes/messenger → message-types/messenger/themes}/canvas.png
RENAMED
File without changes
|
{assets/css/messenger → message-types/messenger/themes}/clear.css
RENAMED
@@ -1,42 +1,30 @@
|
|
1 |
-
.clear.
|
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 .
|
|
|
|
|
|
|
|
|
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 .
|
37 |
-
background: no-repeat url(
|
38 |
position: relative;
|
39 |
-
display: inline-block;
|
40 |
height: 13px;
|
41 |
width: 35px;
|
42 |
margin-left: 206px;
|
@@ -45,57 +33,38 @@
|
|
45 |
padding: 0;
|
46 |
}
|
47 |
|
48 |
-
.clear .
|
49 |
-
background
|
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 .
|
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 .
|
96 |
-
|
|
|
|
|
|
|
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;
|
@@ -104,90 +73,66 @@
|
|
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 .
|
114 |
color: #3E454C;
|
115 |
-
line-height: 1.
|
116 |
-
text-align: left;
|
117 |
-
word-wrap: break-word;
|
118 |
width: 180px;
|
119 |
-
|
120 |
}
|
121 |
|
122 |
-
.clear .
|
123 |
width: 97%;
|
124 |
}
|
125 |
|
126 |
-
.clear .
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
-
.clear .
|
134 |
-
background-image: url(
|
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 .
|
150 |
-
position: relative;
|
151 |
-
display: block;
|
152 |
}
|
153 |
|
154 |
-
.clear .
|
155 |
-
|
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 .
|
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 |
}
|
1 |
+
.messenger.clear.ig_container {
|
2 |
width: 250px;
|
3 |
height: 260px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
|
6 |
+
.messenger.clear .ig_content {
|
7 |
+
|
8 |
+
}
|
9 |
+
|
10 |
+
.messenger.clear .ig_header {
|
11 |
height: 31px;
|
|
|
12 |
-moz-box-shadow: inset 0 0 3px 0 #FFF;
|
13 |
-webkit-box-shadow: inset 0 0 3px 0 #FFF;
|
14 |
box-shadow: inset 0 0 3px 0 #FFF;
|
15 |
background: #F9F9F9;
|
16 |
border: 1px solid #BFBFBF;
|
|
|
17 |
-moz-border-radius: 3px 3px 0 0;
|
18 |
-webkit-border-radius: 3px 3px 0 0;
|
19 |
border-radius: 3px 3px 0 0;
|
|
|
20 |
color: #333;
|
|
|
21 |
line-height: 20px !important;
|
22 |
padding: 0 4px 0 5px;
|
23 |
}
|
24 |
|
25 |
+
.messenger.clear .ig_header_image {
|
26 |
+
background: no-repeat url(../images/clear-header.png) 0 -181px;
|
27 |
position: relative;
|
|
|
28 |
height: 13px;
|
29 |
width: 35px;
|
30 |
margin-left: 206px;
|
33 |
padding: 0;
|
34 |
}
|
35 |
|
36 |
+
.messenger.clear .ig_header_text {
|
37 |
+
background: no-repeat url(../images/clear-header.png) 0 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
font-size: 13px;
|
39 |
height: 15px;
|
|
|
|
|
40 |
-ms-text-overflow: ellipsis;
|
41 |
-o-text-overflow: ellipsis;
|
42 |
text-overflow: ellipsis;
|
43 |
white-space: nowrap;
|
44 |
position: relative;
|
45 |
display: block;
|
|
|
46 |
margin-top: -19px;
|
47 |
margin-left: 3px;
|
48 |
line-height: 16px;
|
49 |
}
|
50 |
|
51 |
+
.messenger.clear .ig_headline {
|
52 |
margin-left: 20px;
|
53 |
margin-right: 55px;
|
|
|
54 |
width: 161px;
|
|
|
|
|
55 |
font-size: 13px;
|
56 |
height: 16px;
|
|
|
|
|
57 |
-ms-text-overflow: ellipsis;
|
58 |
-o-text-overflow: ellipsis;
|
59 |
text-overflow: ellipsis;
|
|
|
60 |
}
|
61 |
|
62 |
+
.messenger.clear .ig_header2_image {
|
63 |
+
background-image: url(../images/clear-option.png);
|
64 |
+
}
|
65 |
+
|
66 |
+
.messenger.clear .ig_body {
|
67 |
background: #fff;
|
|
|
68 |
height: 152px;
|
69 |
-moz-box-shadow: inset 0 0 3px 0 #FFF;
|
70 |
-webkit-box-shadow: inset 0 0 3px 0 #FFF;
|
73 |
font-family: Arial, Helvetica, sans-serif;
|
74 |
color: #222;
|
75 |
font-size: 13px;
|
|
|
76 |
line-height: 15px;
|
|
|
77 |
padding: 6px 6px 0;
|
78 |
}
|
79 |
|
80 |
+
.messenger.clear .ig_message_body {
|
81 |
color: #3E454C;
|
82 |
+
line-height: 1.28em;
|
|
|
|
|
83 |
width: 180px;
|
84 |
+
margin-left: .5em;
|
85 |
}
|
86 |
|
87 |
+
.messenger.clear .ig_no_icon.ig_message_body {
|
88 |
width: 97%;
|
89 |
}
|
90 |
|
91 |
+
.messenger.clear .ig_separator {
|
92 |
+
border-bottom: 1px solid hsl(0, 0%, 98%);
|
93 |
+
border-top: 1px solid #DFDFDF;
|
94 |
+
-webkit-margin-before: 0.5em;
|
95 |
+
-webkit-margin-after: 0.5em;
|
96 |
+
-moz-margin-start: auto;
|
97 |
+
-webkit-margin-start: auto;
|
98 |
+
margin-start: auto;
|
99 |
+
-moz-margin-end: auto;
|
100 |
+
-webkit-margin-end: auto;
|
101 |
+
margin-end: auto;
|
102 |
+
-moz-margin-before: 0.5em;
|
103 |
+
-moz-margin-after: 0.5em;
|
104 |
}
|
105 |
|
106 |
+
.messenger.clear .ig_footer {
|
107 |
+
background-image: url(../images/clear-footer.png);
|
|
|
|
|
108 |
height: 36px;
|
|
|
109 |
border: 1px solid #BFBFBF;
|
110 |
border-top: none;
|
111 |
padding: 0 12px;
|
112 |
-webkit-background-size: 96%;
|
113 |
background-size: 96%;
|
|
|
114 |
background-color: #F5F5F5;
|
115 |
background-position: 5px 5px;
|
116 |
}
|
117 |
|
118 |
+
.messenger.clear .ig_footer_image {
|
|
|
|
|
119 |
}
|
120 |
|
121 |
+
.messenger.clear .ig_close {
|
122 |
+
background: no-repeat url(../images/clear-header.png) 0 -195px;
|
|
|
|
|
|
|
123 |
right: 5px;
|
124 |
top: 10px;
|
125 |
margin-right: -5px;
|
126 |
width: 21px;
|
|
|
127 |
height: 13px;
|
128 |
vertical-align: top;
|
129 |
}
|
130 |
|
131 |
+
.messenger.clear .powered_by {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
top: -20px;
|
133 |
left: 120px;
|
134 |
+
}
|
135 |
+
|
136 |
+
.messenger.clear .ig_icon {
|
137 |
+
border-radius: 2px;
|
138 |
}
|
{assets/images/themes/messenger → message-types/messenger/themes}/clear.png
RENAMED
File without changes
|
{assets/css/messenger → message-types/messenger/themes}/social.css
RENAMED
@@ -1,16 +1,15 @@
|
|
1 |
-
.social.
|
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 .
|
|
|
|
|
|
|
|
|
14 |
background-color: #627BAE;
|
15 |
-webkit-background-clip: padding-box;
|
16 |
background-clip: padding-box;
|
@@ -22,58 +21,47 @@
|
|
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 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 .
|
53 |
-
overflow: hidden;
|
54 |
margin-left: 5px;
|
55 |
margin-right: 40px;
|
56 |
line-height: 20px;
|
57 |
}
|
58 |
|
59 |
-
.social .
|
60 |
-
|
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 .
|
77 |
right: 0;
|
78 |
bottom: 0;
|
79 |
padding-left: 5px;
|
@@ -83,28 +71,23 @@
|
|
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 .
|
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:
|
108 |
padding: 4px 6px 3px 5px;
|
109 |
border: 1px solid rgba(0, 0, 0, .18);
|
110 |
border-bottom-color: rgba(0, 0, 0, .29);
|
@@ -114,15 +97,11 @@
|
|
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 .
|
126 |
content: "";
|
127 |
display: block;
|
128 |
position: absolute;
|
@@ -130,10 +109,10 @@
|
|
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);
|
134 |
}
|
135 |
|
136 |
-
.social .
|
137 |
content: "";
|
138 |
display: block;
|
139 |
position: absolute;
|
@@ -144,39 +123,20 @@
|
|
144 |
border-color: rgba(0, 0, 0, 0) #DFDFDF rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
|
145 |
}
|
146 |
|
147 |
-
.social .
|
148 |
width: 91%;
|
149 |
}
|
150 |
|
151 |
-
.social .
|
152 |
-
.social .
|
153 |
content: none;
|
154 |
}
|
155 |
|
156 |
-
.social .
|
157 |
-
|
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 .
|
180 |
right: 0;
|
181 |
bottom: 0;
|
182 |
-webkit-background-clip: padding-box;
|
@@ -187,35 +147,37 @@
|
|
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 .
|
204 |
-
background-image: url(
|
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 .
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
217 |
|
218 |
-
|
219 |
-
|
|
|
220 |
left: 130px;
|
|
|
|
|
|
|
|
|
221 |
}
|
1 |
+
.messenger.social.ig_container {
|
|
|
|
|
2 |
width: 250px;
|
3 |
height: 260px;
|
4 |
-webkit-background-clip: padding-box;
|
5 |
background-clip: padding-box;
|
|
|
|
|
|
|
6 |
}
|
7 |
|
8 |
+
.messenger.social .ig_content {
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
.messenger.social .ig_header {
|
13 |
background-color: #627BAE;
|
14 |
-webkit-background-clip: padding-box;
|
15 |
background-clip: padding-box;
|
21 |
-webkit-border-top-right-radius: 1px 1px;
|
22 |
-moz-border-radius-topright: 1px 1px;
|
23 |
border-top-right-radius: 1px 1px;
|
|
|
|
|
24 |
height: 26px;
|
|
|
25 |
-ms-text-overflow: ellipsis;
|
26 |
-o-text-overflow: ellipsis;
|
27 |
text-overflow: ellipsis;
|
|
|
28 |
color: #FFF;
|
29 |
font-weight: 400;
|
30 |
line-height: 18px;
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
+
.messenger.social .ig_header_image {
|
34 |
+
position: absolute;
|
35 |
+
height: 25px;
|
36 |
+
vertical-align: top;
|
37 |
+
background-image: url(../images/social-img.png);
|
38 |
+
background-repeat: no-repeat;
|
39 |
+
background-position: -92px -332px;
|
40 |
+
border: 0;
|
41 |
+
right: 20px;
|
42 |
+
top: 2px;
|
43 |
+
margin-right: 3px;
|
44 |
+
width: 21px;
|
45 |
+
}
|
46 |
+
|
47 |
+
.messenger.social .ig_header_text {
|
48 |
font-size: 11px;
|
|
|
|
|
49 |
vertical-align: top;
|
|
|
50 |
zoom: 1;
|
|
|
51 |
margin: 3px 7px 4px;
|
52 |
}
|
53 |
|
54 |
+
.messenger.social .ig_headline {
|
|
|
55 |
margin-left: 5px;
|
56 |
margin-right: 40px;
|
57 |
line-height: 20px;
|
58 |
}
|
59 |
|
60 |
+
.messenger.social .ig_header2_image {
|
61 |
+
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
+
.messenger.social .ig_body {
|
65 |
right: 0;
|
66 |
bottom: 0;
|
67 |
padding-left: 5px;
|
71 |
overflow-y: auto;
|
72 |
-webkit-background-clip: padding-box;
|
73 |
background-clip: padding-box;
|
|
|
74 |
background-color: #FFF;
|
75 |
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
|
|
|
76 |
font-size: 12px;
|
77 |
font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
|
78 |
color: #3e454c;
|
79 |
line-height: 1.28;
|
80 |
text-align: left;
|
|
|
81 |
position: relative;
|
|
|
82 |
border-width: 0 1px;
|
83 |
background-color: #edeff4;
|
84 |
}
|
85 |
|
86 |
+
.messenger.social .ig_message_body {
|
87 |
background-color: #F7F7F7;
|
88 |
background-image: -webkit-gradient(linear, center bottom, center top, from(#F2F2F2), to(#FFF));
|
89 |
background-image: -webkit-linear-gradient(bottom, #F2F2F2, #FFF);
|
90 |
+
margin-left: 10px;
|
91 |
padding: 4px 6px 3px 5px;
|
92 |
border: 1px solid rgba(0, 0, 0, .18);
|
93 |
border-bottom-color: rgba(0, 0, 0, .29);
|
97 |
line-height: 1.28;
|
98 |
min-height: 14px;
|
99 |
position: relative;
|
|
|
100 |
text-shadow: rgba(255, 255, 255, .5) 0 1px 0;
|
|
|
|
|
101 |
width: 170px;
|
|
|
102 |
}
|
103 |
|
104 |
+
.messenger.social .ig_message_body:after {
|
105 |
content: "";
|
106 |
display: block;
|
107 |
position: absolute;
|
109 |
left: 0;
|
110 |
margin: 0 0 0 -12px;
|
111 |
border: 6px solid #FAFAFA;
|
112 |
+
border-color: rgba(0, 0, 0, 0) #FAFAFA rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
|
113 |
}
|
114 |
|
115 |
+
.messenger.social .ig_message_body:before {
|
116 |
content: "";
|
117 |
display: block;
|
118 |
position: absolute;
|
123 |
border-color: rgba(0, 0, 0, 0) #DFDFDF rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
|
124 |
}
|
125 |
|
126 |
+
.messenger.social .ig_no_icon.ig_message_body {
|
127 |
width: 91%;
|
128 |
}
|
129 |
|
130 |
+
.messenger.social .ig_no_icon.ig_message_body:after,
|
131 |
+
.messenger.social .ig_no_icon.ig_message_body:before {
|
132 |
content: none;
|
133 |
}
|
134 |
|
135 |
+
.messenger.social .ig_separator {
|
136 |
+
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
138 |
|
139 |
+
.messenger.social .ig_footer {
|
140 |
right: 0;
|
141 |
bottom: 0;
|
142 |
-webkit-background-clip: padding-box;
|
147 |
max-height: 77px;
|
148 |
overflow-x: hidden;
|
149 |
overflow-y: auto;
|
|
|
|
|
150 |
font-size: 11px;
|
|
|
151 |
color: #333;
|
152 |
line-height: 1.28;
|
|
|
|
|
|
|
|
|
153 |
padding: 5px 23px 3px 5px;
|
154 |
}
|
155 |
|
156 |
+
.messenger.social .ig_footer_image {
|
157 |
+
background-image: url(../images/social-img.png);
|
|
|
158 |
background-position: -269px -137px;
|
|
|
|
|
159 |
width: 24px;
|
160 |
height: 24px;
|
161 |
left: 221px;
|
162 |
}
|
163 |
|
164 |
+
.messenger.social .ig_close {
|
165 |
+
background-image: url(../images/social-img.png);
|
166 |
+
background-position: -137px -332px;
|
167 |
+
right: 0;
|
168 |
+
top: 2px;
|
169 |
+
margin-right: 3px;
|
170 |
+
width: 21px;
|
171 |
+
height: 25px;
|
172 |
+
vertical-align: top;
|
173 |
}
|
174 |
|
175 |
+
|
176 |
+
.messenger.social .powered_by {
|
177 |
+
top: -16px;
|
178 |
left: 130px;
|
179 |
+
}
|
180 |
+
|
181 |
+
.messenger.social .ig_icon {
|
182 |
+
border-radius: 2px;
|
183 |
}
|
{assets/images/themes/messenger → message-types/messenger/themes}/social.png
RENAMED
File without changes
|
{assets/css/messenger → message-types/messenger/themes}/talk.css
RENAMED
@@ -1,44 +1,32 @@
|
|
1 |
-
.talk.
|
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 .
|
|
|
|
|
|
|
|
|
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 .
|
38 |
-
background-image: url(
|
39 |
margin-top: 4px;
|
40 |
position: relative;
|
41 |
-
display: inline-block;
|
42 |
height: 15px;
|
43 |
width: 15px;
|
44 |
margin-left: 173px;
|
@@ -46,53 +34,38 @@
|
|
46 |
padding: 0;
|
47 |
}
|
48 |
|
49 |
-
.talk .
|
50 |
-
background
|
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 .
|
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 .
|
93 |
-
|
|
|
|
|
|
|
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;
|
@@ -104,85 +77,62 @@
|
|
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 .
|
114 |
color: #3E454C;
|
115 |
-
text-align: left;
|
116 |
-
word-wrap: break-word;
|
117 |
width: 142px;
|
118 |
-
|
119 |
-
margin-left: 2px;
|
120 |
}
|
121 |
|
122 |
-
.talk .
|
123 |
width: 98%;
|
124 |
}
|
125 |
|
126 |
-
.talk .
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
|
132 |
-
.talk .
|
133 |
-
background-image: url(
|
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 .
|
143 |
-
position: relative;
|
144 |
-
display: block;
|
145 |
margin-top: .8px;
|
146 |
}
|
147 |
|
148 |
-
.talk .
|
149 |
-
|
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 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
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 .
|
186 |
-
|
187 |
-
left: 92px;
|
188 |
}
|
1 |
+
.messenger.talk.ig_container {
|
2 |
width: 210px;
|
3 |
height: 260px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
|
6 |
+
.messenger.talk .ig_content {
|
7 |
+
|
8 |
+
}
|
9 |
+
|
10 |
+
.messenger.talk .ig_header {
|
11 |
height: 25px;
|
|
|
12 |
-moz-box-shadow: inset 0 0 3px 0 #FFF;
|
13 |
-webkit-box-shadow: inset 0 0 3px 0 #FFF;
|
14 |
box-shadow: inset 0 0 3px 0 #FFF;
|
15 |
background: #F5FAFF;
|
16 |
border: 1px solid #BFBFBF;
|
|
|
17 |
-moz-border-radius: 7px 7px 0 0;
|
18 |
-webkit-border-radius: 7px 7px 0 0;
|
19 |
border-radius: 7px 7px 0 0;
|
|
|
20 |
color: #00008B;
|
|
|
21 |
font-weight: 700 !important;
|
22 |
line-height: 20px !important;
|
23 |
padding: 0;
|
24 |
}
|
25 |
|
26 |
+
.messenger.talk .ig_header_image {
|
27 |
+
background-image: url(../images/talk-header-1.png);
|
28 |
margin-top: 4px;
|
29 |
position: relative;
|
|
|
30 |
height: 15px;
|
31 |
width: 15px;
|
32 |
margin-left: 173px;
|
34 |
padding: 0;
|
35 |
}
|
36 |
|
37 |
+
.messenger.talk .ig_header_text {
|
38 |
+
background: no-repeat url(../images/clear-header.png) 0 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
background-repeat: no-repeat;
|
|
|
|
|
40 |
font-size: 12px;
|
41 |
height: 18px;
|
|
|
|
|
42 |
-ms-text-overflow: ellipsis;
|
43 |
-o-text-overflow: ellipsis;
|
44 |
text-overflow: ellipsis;
|
45 |
white-space: nowrap;
|
46 |
position: relative;
|
47 |
display: block;
|
|
|
48 |
margin-top: -19px;
|
49 |
line-height: 16px;
|
50 |
margin-left: 10px;
|
51 |
}
|
52 |
|
53 |
+
.messenger.talk .ig_headline {
|
54 |
margin-left: 17px;
|
|
|
55 |
margin-right: 40px;
|
56 |
line-height: 16px;
|
57 |
width: 141px;
|
|
|
58 |
-ms-text-overflow: ellipsis;
|
59 |
-o-text-overflow: ellipsis;
|
60 |
text-overflow: ellipsis;
|
61 |
}
|
62 |
|
63 |
+
.messenger.talk .ig_header2_image {
|
64 |
+
background-image: url(../images/talk-header-2.png);
|
65 |
+
}
|
66 |
+
|
67 |
+
.messenger.talk .ig_body {
|
68 |
background: #fff;
|
|
|
69 |
height: 160px;
|
70 |
-moz-box-shadow: inset 0 0 3px 0 #FFF;
|
71 |
-webkit-box-shadow: inset 0 0 3px 0 #FFF;
|
77 |
top: 0;
|
78 |
left: 0;
|
79 |
right: 0;
|
|
|
80 |
line-height: 15px;
|
|
|
81 |
padding: 6px 6px 0;
|
82 |
}
|
83 |
|
84 |
+
.messenger.talk .ig_message_body {
|
85 |
color: #3E454C;
|
|
|
|
|
86 |
width: 142px;
|
87 |
+
margin-left: 7px;
|
|
|
88 |
}
|
89 |
|
90 |
+
.messenger.talk .ig_no_icon.ig_message_body {
|
91 |
width: 98%;
|
92 |
}
|
93 |
|
94 |
+
.messenger.talk .ig_separator {
|
95 |
+
border-bottom: 1px solid hsl(0, 0%, 98%);
|
96 |
+
border-top: 1px solid #DFDFDF;
|
97 |
+
-webkit-margin-before: 0.5em;
|
98 |
+
-webkit-margin-after: 0.5em;
|
99 |
+
-moz-margin-start: auto;
|
100 |
+
-webkit-margin-start: auto;
|
101 |
+
margin-start: auto;
|
102 |
+
-moz-margin-end: auto;
|
103 |
+
-webkit-margin-end: auto;
|
104 |
+
margin-end: auto;
|
105 |
+
-moz-margin-before: 0.5em;
|
106 |
+
-moz-margin-after: 0.5em;
|
107 |
}
|
108 |
|
109 |
+
.messenger.talk .ig_footer {
|
110 |
+
background-image: url(../images/talk-footer-1.png);
|
|
|
|
|
111 |
height: 37px;
|
|
|
112 |
border: 1px solid #BFBFBF;
|
113 |
border-bottom: none;
|
114 |
}
|
115 |
|
116 |
+
.messenger.talk .ig_footer_image {
|
|
|
|
|
117 |
margin-top: .8px;
|
118 |
}
|
119 |
|
120 |
+
.messenger.talk .ig_close {
|
121 |
+
background-image: url(../images/talk-close.png);
|
|
|
|
|
|
|
|
|
122 |
right: -4px;
|
123 |
top: 4.5px;
|
124 |
margin-right: 3px;
|
125 |
width: 21px;
|
|
|
126 |
height: 25px;
|
127 |
vertical-align: top;
|
128 |
}
|
129 |
|
130 |
+
|
131 |
+
.messenger.talk .powered_by {
|
132 |
+
top: -24px;
|
133 |
+
left: 93px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
|
136 |
+
.messenger.talk .ig_icon {
|
137 |
+
|
|
|
138 |
}
|
{assets/images/themes/messenger → message-types/messenger/themes}/talk.png
RENAMED
File without changes
|
message-types/popup/default.css
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.popup.ig_container {
|
2 |
+
opacity: 1;
|
3 |
+
display: block;
|
4 |
+
z-index: 100000;
|
5 |
+
}
|
6 |
+
|
7 |
+
.popup .ig_headline {
|
8 |
+
text-decoration: none;
|
9 |
+
font-weight: 800;
|
10 |
+
line-height: 1em;
|
11 |
+
}
|
12 |
+
|
13 |
+
.popup .ig_image {
|
14 |
+
margin: 0 1em;
|
15 |
+
}
|
16 |
+
|
17 |
+
.popup .ig_message {
|
18 |
+
line-height: 1.2em;
|
19 |
+
}
|
20 |
+
|
21 |
+
.popup .ig_close {
|
22 |
+
background-image: url(../popup/images/popup-close.png);
|
23 |
+
background-repeat: no-repeat;
|
24 |
+
background-position: left bottom;
|
25 |
+
height: 32px;
|
26 |
+
width: 30px;
|
27 |
+
cursor: pointer;
|
28 |
+
position: absolute;
|
29 |
+
-webkit-background-size: 100%;
|
30 |
+
background-size: 100%;
|
31 |
+
-moz-box-sizing: content-box;
|
32 |
+
box-sizing: content-box;
|
33 |
+
}
|
34 |
+
|
35 |
+
.popup .ig_close:hover {
|
36 |
+
background-position: left top;
|
37 |
+
}
|
38 |
+
|
39 |
+
.popup .ig_button, .popup input[type="submit"], .popup input[type="button"] {
|
40 |
+
cursor: pointer;
|
41 |
+
display: block;
|
42 |
+
}
|
43 |
+
|
44 |
+
.popup .ig_button:hover, .popup input[type="submit"]:hover, .popup input[type="button"]:hover {
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
.popup #TB_ajaxContent {
|
49 |
+
overflow: hidden;
|
50 |
+
height: auto !important;
|
51 |
+
width: auto !important;
|
52 |
+
}
|
53 |
+
|
54 |
+
.popup#TB_window {
|
55 |
+
height: auto !important;
|
56 |
+
}
|
57 |
+
|
58 |
+
.TB_overlayBG .powered_by {
|
59 |
+
position: fixed;
|
60 |
+
bottom: 1em;
|
61 |
+
left: 1em;
|
62 |
+
font-size: 14px;
|
63 |
+
padding: 0.1em;
|
64 |
+
}
|
65 |
+
|
66 |
+
div.icegram .popup input[type="submit"], div.icegram .popup input[type="button"] {
|
67 |
+
font-size: 100%;
|
68 |
+
}
|
message-types/popup/images/chosen-sprite.png
ADDED
Binary file
|
message-types/popup/images/close_big.png
ADDED
Binary file
|
{assets → message-types/popup}/images/popup-amaze-bg.jpg
RENAMED
File without changes
|
message-types/popup/images/popup-close.png
ADDED
Binary file
|
message-types/popup/main.js
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Icegram Message Type - Popup
|
3 |
+
**/
|
4 |
+
function Icegram_Message_Type_Popup( data ) {
|
5 |
+
|
6 |
+
Icegram_Message_Type.call(this, data);
|
7 |
+
}
|
8 |
+
Icegram_Message_Type_Popup.prototype = Object.create(Icegram_Message_Type.prototype);
|
9 |
+
Icegram_Message_Type_Popup.prototype.constructor = Icegram_Message_Type_Popup;
|
10 |
+
|
11 |
+
Icegram_Message_Type_Popup.prototype.get_template_default = function () {
|
12 |
+
return '<div id="popup_main_{{=id}}" data={{=id}}>'+
|
13 |
+
'<div class="icegram popup ig_container {{=theme}}" id="icegram_message_{{=id}}">'+
|
14 |
+
'<div class="ig_close" id="popup_box_close_{{=id}}"></div>'+
|
15 |
+
'<div class="ig_headline">{{=headline}}</div>'+
|
16 |
+
'<div class="ig_content">'+
|
17 |
+
'<div class="ig_image">'+
|
18 |
+
'<img class="ig_icon" src="{{=icon}}"/>'+
|
19 |
+
'</div>'+
|
20 |
+
'<div class="ig_message">{{=message}}</div>'+
|
21 |
+
'</div>'+
|
22 |
+
'<div class="ig_button" >{{=label}}</div>'+
|
23 |
+
'</div>'+
|
24 |
+
'</div>';
|
25 |
+
};
|
26 |
+
Icegram_Message_Type_Popup.prototype.show = function ( options, silent ) {
|
27 |
+
if ( this.is_visible() ) return;
|
28 |
+
var self = this;
|
29 |
+
var popup_delay = 0;
|
30 |
+
if( jQuery('body').find('#TB_window').length ) {
|
31 |
+
popup_delay = 800;
|
32 |
+
tb_remove();
|
33 |
+
}
|
34 |
+
setTimeout( function() {
|
35 |
+
var popup_width = (jQuery(window).width() * 60) / 100;
|
36 |
+
self.el.show();
|
37 |
+
tb_show('Popup', "#TB_inline?width="+popup_width+"&modal=true&inlineId=popup_main_" + self.data.id, true);
|
38 |
+
jQuery('#popup_main_' + self.data.id).remove();
|
39 |
+
self.el = jQuery('#TB_window .popup');
|
40 |
+
self.el.on('click', {self: self}, self.on_click);
|
41 |
+
jQuery('#TB_window').addClass(self.data.theme).addClass(self.data.type);
|
42 |
+
silent !== true && self.track( 'shown' );
|
43 |
+
}, popup_delay);
|
44 |
+
};
|
45 |
+
|
46 |
+
Icegram_Message_Type_Popup.prototype.add_powered_by = function ( pb ) {
|
47 |
+
setTimeout( function() {
|
48 |
+
jQuery('#TB_window').prev().append('<div class="powered_by"><a href="'+pb.link+'" target="_blank">'+pb.text+'</a></div>');
|
49 |
+
},1000 + this.data.delay_time * 1000);
|
50 |
+
};
|
51 |
+
|
52 |
+
Icegram_Message_Type_Popup.prototype.hide = function ( options, silent ) {
|
53 |
+
if ( !this.is_visible() ) return;
|
54 |
+
var self = this;
|
55 |
+
tb_remove();
|
56 |
+
setTimeout( function() {
|
57 |
+
self.el.hide();
|
58 |
+
},0);
|
59 |
+
silent !== true && this.track( 'closed' );
|
60 |
+
};
|
61 |
+
Icegram_Message_Type_Popup.prototype.on_resize = function(){
|
62 |
+
if( jQuery( window ).height() < jQuery( '#TB_window' ).height() || jQuery( window ).width() < jQuery( '#TB_window' ).width() ) {
|
63 |
+
|
64 |
+
var height = (jQuery( window ).height()-50)/(jQuery( '#TB_window' ).height());
|
65 |
+
var width = (jQuery( window ).width()-50)/(jQuery( '#TB_window' ).width());
|
66 |
+
if(height<width){
|
67 |
+
jQuery('#TB_window').css({'-webkit-transform': 'scale('+height+')',
|
68 |
+
'-moz-transform': 'scale('+height+')',
|
69 |
+
'-ms-transform': 'scale('+height+')',
|
70 |
+
'-o-transform': 'scale('+height+')',
|
71 |
+
'transform': 'scale('+height+')'});
|
72 |
+
} else {
|
73 |
+
jQuery('#TB_window').css({'-webkit-transform': 'scale('+width+')',
|
74 |
+
'-moz-transform': 'scale('+width+')',
|
75 |
+
'-ms-transform': 'scale('+width+')',
|
76 |
+
'-o-transform': 'scale('+width+')',
|
77 |
+
'transform': 'scale('+width+')'});
|
78 |
+
}
|
79 |
+
} else {
|
80 |
+
jQuery('#TB_window').css({'-webkit-transform': 'scale(1)',
|
81 |
+
'-moz-transform': 'scale(1)',
|
82 |
+
'-ms-transform': 'scale(1)',
|
83 |
+
'-o-transform': 'scale(1)',
|
84 |
+
'transform': 'scale(1)'});
|
85 |
+
}
|
86 |
+
|
87 |
+
}
|
88 |
+
Icegram_Message_Type_Popup.prototype.on_cta_click = function ( e ) {
|
89 |
+
e.data = e.data || { self: this };
|
90 |
+
e.data.self.track( 'clicked' );
|
91 |
+
if(jQuery(e.target).filter('.popup .ig_button').length){
|
92 |
+
typeof(e.data.self.data.link) === 'string' && e.data.self.data.link != '' ? window.location.href = e.data.self.data.link : e.data.self.hide();
|
93 |
+
}
|
94 |
+
};
|
message-types/popup/main.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
if ( class_exists( 'Icegram_Message_Type_Popup' ) ) return;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Icegram Popup
|
7 |
+
*/
|
8 |
+
class Icegram_Message_Type_Popup extends Icegram_Message_Type {
|
9 |
+
var $popup_default_delay_time;
|
10 |
+
function __construct() {
|
11 |
+
parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
|
12 |
+
|
13 |
+
$this->popup_default_delay_time = 3;
|
14 |
+
add_filter( 'icegram_messages_to_show', array( $this, 'arrange_proper_delay_time' ) );
|
15 |
+
add_filter( 'icegram_message_type_params_popup', array( $this, 'set_admin_style' ) );
|
16 |
+
}
|
17 |
+
|
18 |
+
function define_settings() {
|
19 |
+
parent::define_settings();
|
20 |
+
$this->settings['theme']['default'] = 'persuade';
|
21 |
+
unset ( $this->settings['position'],
|
22 |
+
$this->settings['text_color'],
|
23 |
+
$this->settings['bg_color'],
|
24 |
+
$this->settings['icon']
|
25 |
+
);
|
26 |
+
}
|
27 |
+
|
28 |
+
function arrange_proper_delay_time( $messages ) {
|
29 |
+
|
30 |
+
$popup_delay_times = array();
|
31 |
+
foreach ($messages as $message_id => $message) {
|
32 |
+
|
33 |
+
if( $message['type'] == 'popup' ) {
|
34 |
+
while( in_array( $message['delay_time'], $popup_delay_times ) ) {
|
35 |
+
$message['delay_time'] = $message['delay_time'] + $this->popup_default_delay_time;
|
36 |
+
}
|
37 |
+
$messages[$message_id]['delay_time'] = $message['delay_time'];
|
38 |
+
$popup_delay_times[] = $message['delay_time'];
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
42 |
+
return $messages;
|
43 |
+
}
|
44 |
+
|
45 |
+
function set_admin_style( $params ) {
|
46 |
+
|
47 |
+
$params['admin_style'] = array( 'label_bg_color' => '#22B189',
|
48 |
+
'theme_header_height' => '6em',
|
49 |
+
'thumbnail_width' => '43%',
|
50 |
+
'thumbnail_height' => '10em'
|
51 |
+
);
|
52 |
+
return $params;
|
53 |
+
}
|
54 |
+
}
|
{assets/css/popup → message-types/popup/themes}/air-mail.css
RENAMED
@@ -1,41 +1,32 @@
|
|
1 |
-
.air-mail
|
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 .
|
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 .
|
25 |
-
display: block;
|
26 |
float: right;
|
27 |
-
margin: 0 1em;
|
28 |
}
|
29 |
|
30 |
-
.air-mail .
|
31 |
color: hsl(0, 0%, 44%);
|
32 |
margin-bottom: 1em;
|
33 |
padding: 0 1em;
|
34 |
font-size: 1.2em;
|
35 |
}
|
36 |
|
37 |
-
.air-mail .
|
38 |
-
background: url(
|
39 |
height: 10px;
|
40 |
width: 10px;
|
41 |
-moz-box-sizing: content-box;
|
@@ -47,34 +38,28 @@
|
|
47 |
zoom: 1.5;
|
48 |
}
|
49 |
|
50 |
-
.air-mail .
|
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 .
|
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;
|
@@ -86,9 +71,7 @@
|
|
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;
|
@@ -99,7 +82,7 @@
|
|
99 |
border: 0;
|
100 |
}
|
101 |
|
102 |
-
.air-mail#TB_window:before {
|
103 |
position: absolute;
|
104 |
top: 0;
|
105 |
left: 0;
|
1 |
+
.popup.air-mail.ig_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 |
padding: 1em 0;
|
|
|
7 |
}
|
8 |
|
9 |
+
.popup.air-mail .ig_headline {
|
|
|
10 |
margin-bottom: 1em;
|
11 |
font-size: 2.5em;
|
|
|
|
|
12 |
text-align: center;
|
13 |
color: hsl(206, 69%, 47%);
|
14 |
text-shadow: 0 1px 0 #FFF;
|
|
|
15 |
}
|
16 |
|
17 |
+
.popup.air-mail .ig_image {
|
|
|
18 |
float: right;
|
|
|
19 |
}
|
20 |
|
21 |
+
.popup.air-mail .ig_message {
|
22 |
color: hsl(0, 0%, 44%);
|
23 |
margin-bottom: 1em;
|
24 |
padding: 0 1em;
|
25 |
font-size: 1.2em;
|
26 |
}
|
27 |
|
28 |
+
.popup.air-mail .ig_close {
|
29 |
+
background: url(../images/chosen-sprite.png) no-repeat -43px 0;
|
30 |
height: 10px;
|
31 |
width: 10px;
|
32 |
-moz-box-sizing: content-box;
|
38 |
zoom: 1.5;
|
39 |
}
|
40 |
|
41 |
+
.popup.air-mail .ig_button, div.popup.air-mail input[type="submit"], div.popup.air-mail input[type="button"] {
|
42 |
background: hsl(6, 78%, 57%);
|
43 |
width: 50%;
|
|
|
44 |
-moz-border-radius: 5px;
|
45 |
-webkit-border-radius: 5px;
|
46 |
border-radius: 5px;
|
47 |
border-bottom: 3px solid hsl(6, 63%, 46%);
|
48 |
font-size: 16px;
|
49 |
color: hsl(0, 0%, 100%);
|
|
|
50 |
text-transform: uppercase;
|
|
|
51 |
font-weight: 600;
|
52 |
text-align: center;
|
53 |
margin: 0 auto;
|
54 |
padding: 16px 0 13px;
|
55 |
}
|
56 |
|
57 |
+
.popup.air-mail .ig_button:hover, div.popup.air-mail input[type="submit"]:hover, div.popup.air-mail input[type="button"]:hover {
|
58 |
margin-top: -3px;
|
59 |
border-bottom: 6px solid #c0392b;
|
60 |
}
|
61 |
|
62 |
+
.popup.air-mail #TB_ajaxContent {
|
|
|
|
|
|
|
63 |
position: relative;
|
64 |
display: block;
|
65 |
background: #F2F2F2;
|
71 |
background-image: linear-gradient(bottom, #e5e5e5 0%, #f7f7f7 100%);
|
72 |
}
|
73 |
|
74 |
+
.popup.air-mail#TB_window {
|
|
|
|
|
75 |
background-color: #fff;
|
76 |
-webkit-background-clip: padding-box;
|
77 |
background-clip: padding-box;
|
82 |
border: 0;
|
83 |
}
|
84 |
|
85 |
+
.popup.air-mail#TB_window:before {
|
86 |
position: absolute;
|
87 |
top: 0;
|
88 |
left: 0;
|
{assets/images/themes/popup → message-types/popup/themes}/air-mail.png
RENAMED
File without changes
|
{assets/css/popup → message-types/popup/themes}/amaze.css
RENAMED
@@ -1,67 +1,37 @@
|
|
1 |
-
.amaze
|
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 .
|
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 .
|
27 |
-
display: block;
|
28 |
float: left;
|
29 |
-
margin: 0 2em 0 1em;
|
30 |
}
|
31 |
|
32 |
-
.amaze .
|
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 .
|
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
|
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;
|
@@ -81,7 +51,7 @@
|
|
81 |
padding: 0.3em 1em;
|
82 |
}
|
83 |
|
84 |
-
.amaze .
|
85 |
position: relative;
|
86 |
top: 3px;
|
87 |
-moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
|
@@ -89,18 +59,18 @@
|
|
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 |
}
|
1 |
+
.popup.amaze.ig_container {
|
2 |
color: hsl(0, 100%, 100%);
|
3 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
4 |
filter: alpha(opacity=100);
|
|
|
|
|
|
|
5 |
}
|
6 |
|
7 |
+
.popup.amaze .ig_headline {
|
8 |
text-align: center;
|
9 |
margin: .5em auto;
|
10 |
color: #fff;
|
11 |
text-shadow: 0 1px 0 hsl(0, 0%, 0%);
|
|
|
12 |
font-size: 2em;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
+
.popup.amaze .ig_image {
|
|
|
16 |
float: left;
|
|
|
17 |
}
|
18 |
|
19 |
+
.popup.amaze .ig_message {
|
20 |
font-size: 1.2em;
|
21 |
font-family: Georgia, Times, "Times New Roman", serif;
|
22 |
color: hsl(0, 100%, 100%);
|
23 |
margin: 0 2em;
|
24 |
}
|
25 |
|
26 |
+
.popup.amaze .ig_close {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
top: -15px;
|
28 |
right: -15px;
|
|
|
29 |
}
|
30 |
|
31 |
+
.popup.amaze .ig_button, .popup.amaze input[type="submit"], .popup.amaze input[type="button"] {
|
|
|
|
|
|
|
|
|
|
|
32 |
background: hsl(145, 63%, 49%);
|
33 |
color: hsl(0, 100%, 100%);
|
34 |
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
|
|
|
35 |
font-size: 1.3em;
|
36 |
letter-spacing: 1px;
|
37 |
vertical-align: top;
|
51 |
padding: 0.3em 1em;
|
52 |
}
|
53 |
|
54 |
+
.popup.amaze .ig_button:active, .popup.amaze input[type="submit"]:active, .popup.amaze input[type="button"]:active {
|
55 |
position: relative;
|
56 |
top: 3px;
|
57 |
-moz-box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
|
59 |
box-shadow: inset 0 -3px 1px #2ECC70, inset 0 0 3px #2ECC70;
|
60 |
}
|
61 |
|
62 |
+
.popup.amaze #TB_ajaxContent {
|
|
|
|
|
|
|
63 |
border: .3em solid #444444;
|
64 |
background-image: url(../../images/popup-amaze-bg.jpg);
|
65 |
}
|
66 |
|
67 |
+
.popup.amaze#TB_window {
|
|
|
|
|
68 |
-moz-box-shadow: none;
|
69 |
-webkit-box-shadow: none;
|
70 |
box-shadow: none;
|
71 |
+
}
|
72 |
+
|
73 |
+
.popup.amaze .ig_content {
|
74 |
+
margin: 1.5em 0 .5em 0;
|
75 |
+
width: 100%;
|
76 |
}
|
{assets/images/themes/popup → message-types/popup/themes}/amaze.png
RENAMED
File without changes
|
{assets/css/popup → message-types/popup/themes}/compel.css
RENAMED
@@ -1,42 +1,34 @@
|
|
1 |
-
.compel
|
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 .
|
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 .
|
25 |
-
display: block;
|
26 |
float: left;
|
27 |
-
margin: 0 1em;
|
28 |
padding-right: 1em;
|
29 |
}
|
30 |
|
31 |
-
.compel .
|
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 .
|
39 |
-
background: url(
|
40 |
height: 10px;
|
41 |
width: 10px;
|
42 |
-moz-box-sizing: content-box;
|
@@ -48,39 +40,31 @@
|
|
48 |
zoom: 1.5;
|
49 |
}
|
50 |
|
51 |
-
.compel .
|
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 .
|
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;
|
1 |
+
.popup.compel.ig_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 |
padding: 1.5em 0 1em 0;
|
|
|
8 |
}
|
9 |
|
10 |
+
.popup.compel .ig_headline {
|
|
|
11 |
color: hsl(204, 70%, 53%);
|
12 |
font-size: 2em;
|
|
|
13 |
text-shadow: 0 1px 0 hsl(204, 79%, 36%);
|
|
|
14 |
margin-bottom: 0.5em;
|
15 |
text-align: center;
|
16 |
}
|
17 |
|
18 |
+
.popup.compel .ig_image {
|
|
|
19 |
float: left;
|
|
|
20 |
padding-right: 1em;
|
21 |
}
|
22 |
|
23 |
+
.popup.compel .ig_message {
|
24 |
color: hsl(0, 0%, 44%);
|
25 |
font-size: 1.25em;
|
26 |
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
27 |
margin-bottom: .5em;
|
28 |
}
|
29 |
|
30 |
+
.popup.compel .ig_close {
|
31 |
+
background: url(../images/chosen-sprite.png) no-repeat -43px 0;
|
32 |
height: 10px;
|
33 |
width: 10px;
|
34 |
-moz-box-sizing: content-box;
|
40 |
zoom: 1.5;
|
41 |
}
|
42 |
|
43 |
+
.popup.compel .ig_button, .popup.compel input[type="submit"], .popup.compel input[type="button"] {
|
44 |
background: hsl(6, 78%, 57%);
|
45 |
width: 50%;
|
|
|
46 |
-moz-border-radius: 5px;
|
47 |
-webkit-border-radius: 5px;
|
48 |
border-radius: 5px;
|
49 |
border-bottom: 3px solid hsl(6, 63%, 46%);
|
50 |
font-size: 16px;
|
51 |
color: hsl(0, 0%, 100%);
|
|
|
52 |
text-transform: uppercase;
|
|
|
53 |
font-weight: 600;
|
54 |
text-align: center;
|
55 |
margin: 0 auto;
|
56 |
padding: 16px 0 13px;
|
57 |
}
|
58 |
|
59 |
+
.popup.compel .ig_button:hover, .popup.compel input[type="submit"]:hover, .popup.compel input[type="button"]:hover {
|
60 |
margin-top: -3px;
|
61 |
border-bottom: 6px solid #c0392b;
|
62 |
}
|
63 |
|
64 |
+
.popup.compel #TB_ajaxContent {
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
+
.popup.compel#TB_window {
|
|
|
|
|
68 |
-moz-box-shadow: none;
|
69 |
-webkit-box-shadow: none;
|
70 |
box-shadow: none;
|
{assets/images/themes/popup → message-types/popup/themes}/compel.png
RENAMED
File without changes
|
message-types/popup/themes/convert.css
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.popup.convert.ig_container {
|
2 |
+
padding: 1em;
|
3 |
+
}
|
4 |
+
|
5 |
+
.popup.convert .ig_headline {
|
6 |
+
font-size: 2.5em;
|
7 |
+
color: hsl(0, 1%, 28%);
|
8 |
+
letter-spacing: 0;
|
9 |
+
text-align: left;
|
10 |
+
margin-bottom: 1em;
|
11 |
+
}
|
12 |
+
|
13 |
+
.popup.convert .ig_image {
|
14 |
+
float: right;
|
15 |
+
}
|
16 |
+
|
17 |
+
.popup.convert .ig_message {
|
18 |
+
font-size: 1.5em;
|
19 |
+
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
|
20 |
+
color: hsl(0, 1%, 28%);
|
21 |
+
vertical-align: baseline;
|
22 |
+
}
|
23 |
+
|
24 |
+
.popup.convert .ig_close {
|
25 |
+
top: -15px;
|
26 |
+
right: -15px;
|
27 |
+
}
|
28 |
+
|
29 |
+
.popup.convert .ig_button, .popup.convert input[type="submit"], .popup.convert input[type="button"] {
|
30 |
+
text-transform: uppercase;
|
31 |
+
font-weight: 700;
|
32 |
+
text-decoration: none;
|
33 |
+
background-color: hsl(0, 94%, 41%);
|
34 |
+
font-size: 1.75em;
|
35 |
+
color: hsl(0, 33%, 98%);
|
36 |
+
border: .3em solid hsl(0, 6%, 71%);
|
37 |
+
width: 50%;
|
38 |
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
39 |
+
-moz-border-radius: 1em;
|
40 |
+
-webkit-border-radius: 1em;
|
41 |
+
border-radius: 1em;
|
42 |
+
text-align: center;
|
43 |
+
line-height: 1.5em;
|
44 |
+
-moz-box-sizing: content-box;
|
45 |
+
box-sizing: content-box;
|
46 |
+
margin: 0.1em auto;
|
47 |
+
padding: 0.1em 2em;
|
48 |
+
clear: both;
|
49 |
+
}
|
50 |
+
|
51 |
+
.popup.convert #TB_ajaxContent {
|
52 |
+
}
|
53 |
+
|
54 |
+
.popup.convert#TB_window {
|
55 |
+
-moz-box-shadow: none;
|
56 |
+
-webkit-box-shadow: none;
|
57 |
+
box-shadow: none;
|
58 |
+
background: hsl(58, 100%, 90%);
|
59 |
+
}
|
{assets/images/themes/popup → message-types/popup/themes}/convert.png
RENAMED
File without changes
|
message-types/popup/themes/inspire.css
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.popup.inspire.ig_container {
|
2 |
+
padding: 1em 0 .5em 0;
|
3 |
+
}
|
4 |
+
.popup.inspire .ig_headline {
|
5 |
+
color: #222;
|
6 |
+
text-align: center;
|
7 |
+
margin-bottom: 1em;
|
8 |
+
text-shadow: 0 1px hsl(0, 100%, 100%);
|
9 |
+
font-size: 2.5em;
|
10 |
+
}
|
11 |
+
|
12 |
+
.popup.inspire .ig_image {
|
13 |
+
float: left;
|
14 |
+
}
|
15 |
+
|
16 |
+
.popup.inspire .ig_message {
|
17 |
+
-webkit-font-smoothing: antialiased;
|
18 |
+
text-shadow: 0 1px hsl(0, 100%, 100%);
|
19 |
+
color: #333;
|
20 |
+
font-size: 1.25em;
|
21 |
+
margin-bottom: .5em;
|
22 |
+
font-weight: 400;
|
23 |
+
text-align: justify;
|
24 |
+
}
|
25 |
+
|
26 |
+
.popup.inspire .ig_close {
|
27 |
+
top: -15px;
|
28 |
+
right: -15px;
|
29 |
+
}
|
30 |
+
|
31 |
+
.popup.inspire .ig_button, .popup.inspire input[type="submit"], .popup.inspire input[type="button"] {
|
32 |
+
vertical-align: middle;
|
33 |
+
background-color: hsl(79, 93%, 35%);
|
34 |
+
font-size: 2em;
|
35 |
+
font-weight: 700;
|
36 |
+
font-style: normal;
|
37 |
+
text-decoration: none;
|
38 |
+
text-align: center;
|
39 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
40 |
+
filter: alpha(opacity=100);
|
41 |
+
opacity: 1;
|
42 |
+
color: hsl(0, 100%, 100%);
|
43 |
+
width: 50%;
|
44 |
+
border-color: hsl(79, 93%, 35%);
|
45 |
+
margin: .25em auto;
|
46 |
+
padding: 0.5em;
|
47 |
+
line-height: 1.2em;
|
48 |
+
}
|
49 |
+
|
50 |
+
.popup.inspire #TB_ajaxContent {
|
51 |
+
}
|
52 |
+
|
53 |
+
.popup.inspire#TB_window {
|
54 |
+
background: hsl(0, 100%, 100%);
|
55 |
+
}
|
{assets/images/themes/popup → message-types/popup/themes}/inspire.png
RENAMED
File without changes
|
{assets/css/popup → message-types/popup/themes}/persuade.css
RENAMED
@@ -1,64 +1,39 @@
|
|
1 |
-
.persuade
|
2 |
-
z-index: 100000;
|
3 |
}
|
4 |
-
.persuade .
|
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 .
|
17 |
-
display: block;
|
18 |
float: left;
|
19 |
-
margin: 0 1em;
|
20 |
}
|
21 |
|
22 |
-
.persuade .
|
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 .
|
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 .
|
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;
|
@@ -69,7 +44,6 @@
|
|
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;
|
@@ -77,7 +51,7 @@
|
|
77 |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
78 |
}
|
79 |
|
80 |
-
.persuade .
|
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;
|
@@ -88,16 +62,11 @@
|
|
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;
|
1 |
+
.popup.persuade.ig_container {
|
|
|
2 |
}
|
3 |
+
.popup.persuade .ig_headline {
|
|
|
4 |
letter-spacing: 0;
|
|
|
5 |
color: hsl(0, 100%, 100%);
|
6 |
font-size: 3em;
|
|
|
7 |
text-align: center;
|
8 |
-webkit-font-smoothing: antialiased;
|
9 |
margin: .25em auto;
|
10 |
}
|
11 |
|
12 |
+
.popup.persuade .ig_image {
|
|
|
13 |
float: left;
|
|
|
14 |
}
|
15 |
|
16 |
+
.popup.persuade .ig_message {
|
|
|
17 |
color: #FFF;
|
18 |
font-size: 1.75em;
|
|
|
19 |
font-weight: 300;
|
20 |
margin: .5em auto 1em;
|
21 |
text-align: center;
|
22 |
-webkit-font-smoothing: antialiased;
|
|
|
23 |
}
|
24 |
|
25 |
+
.popup.persuade .ig_close {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
top: -15px;
|
27 |
right: -15px;
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
|
30 |
+
.popup.persuade .ig_button, .popup.persuade input[type="submit"], .popup.persuade input[type="button"] {
|
31 |
color: hsl(0, 100%, 100%);
|
32 |
text-decoration: none;
|
33 |
background-color: hsl(0, 0%, 26%);
|
34 |
font-size: 2em;
|
35 |
font-weight: 400;
|
36 |
width: 60%;
|
|
|
37 |
-moz-border-radius: .6em;
|
38 |
-webkit-border-radius: .6em;
|
39 |
border-radius: .6em;
|
44 |
-webkit-box-shadow: 0 .3em 0 #333, 0 .3em 2em rgba(0, 0, 0, 0.7);
|
45 |
box-shadow: 0 .3em 0 #333, 0 .3em 2em rgba(0, 0, 0, 0.7);
|
46 |
text-align: center;
|
|
|
47 |
margin: .2em auto .5em;
|
48 |
padding: 0.5em;
|
49 |
line-height: 1.2em;
|
51 |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
52 |
}
|
53 |
|
54 |
+
.popup.persuade .ig_button:hover, .popup.persuade input[type="submit"]:hover, .popup.persuade input[type="button"]:hover {
|
55 |
-moz-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
|
56 |
-webkit-box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
|
57 |
box-shadow: 0 .1em 0 hsl(0, 0%, 20%), 0 .1em .2em hsla(0, 0%, 0%, 0.9) !important;
|
62 |
top: .2em
|
63 |
}
|
64 |
|
65 |
+
.popup.persuade #TB_ajaxContent {
|
|
|
|
|
|
|
66 |
border: .6em dashed hsl(0, 100%, 100%);
|
67 |
}
|
68 |
|
69 |
+
.popup.persuade#TB_window {
|
|
|
|
|
70 |
-moz-box-shadow: none;
|
71 |
-webkit-box-shadow: none;
|
72 |
box-shadow: none;
|
{assets/images/themes/popup → message-types/popup/themes}/persuade.png
RENAMED
File without changes
|
message-types/toast/default.css
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.toast.ig_container {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
|
5 |
+
.toast .ig_wrapper {
|
6 |
+
overflow: hidden;
|
7 |
+
padding: 5px 5px 5px 50px;
|
8 |
+
position: relative;
|
9 |
+
min-height: 34px;
|
10 |
+
}
|
11 |
+
|
12 |
+
.toast .ig_content {
|
13 |
+
overflow: hidden;
|
14 |
+
}
|
15 |
+
|
16 |
+
.toast.ig_container:hover {
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
.toast .ig_headline {
|
21 |
+
display: inline-block;
|
22 |
+
margin: 0;
|
23 |
+
text-align: left;
|
24 |
+
position: relative;
|
25 |
+
}
|
26 |
+
|
27 |
+
.toast .ig_icon {
|
28 |
+
overflow: hidden;
|
29 |
+
display: block;
|
30 |
+
max-height: 32px;
|
31 |
+
max-width: 32px;
|
32 |
+
left: 10px;
|
33 |
+
top: 10px;
|
34 |
+
position: absolute;
|
35 |
+
}
|
36 |
+
|
37 |
+
.toast .ig_icon img {
|
38 |
+
max-width: 32px;
|
39 |
+
max-height: 32px;
|
40 |
+
margin: 0;
|
41 |
+
padding: 0;
|
42 |
+
}
|
43 |
+
|
44 |
+
.toast .ig_message {
|
45 |
+
margin: -3px 0 0 -2px;
|
46 |
+
}
|
47 |
+
|
48 |
+
.toast .ig_message p {
|
49 |
+
margin: 0.15em;
|
50 |
+
}
|
51 |
+
|
52 |
+
.ig_toast_block {
|
53 |
+
position: fixed;
|
54 |
+
list-style: none;
|
55 |
+
z-index: 999999;
|
56 |
+
-ms-word-wrap: break-word;
|
57 |
+
word-wrap: break-word;
|
58 |
+
padding: 0;
|
59 |
+
margin: 5px;
|
60 |
+
}
|
61 |
+
|
62 |
+
.ig_toast_block * {
|
63 |
+
-webkit-box-sizing: content-box;
|
64 |
+
-moz-box-sizing: content-box;
|
65 |
+
box-sizing: content-box;
|
66 |
+
text-transform: none;
|
67 |
+
}
|
68 |
+
|
69 |
+
.ig_toast_block .ig_container {
|
70 |
+
margin: 10px 0;
|
71 |
+
}
|
72 |
+
|
73 |
+
.ig_toast_block .ig_headline {
|
74 |
+
font-weight: bold;
|
75 |
+
clear: none;
|
76 |
+
padding: 0;
|
77 |
+
}
|
78 |
+
|
79 |
+
.ig_toast_block .ig_message {
|
80 |
+
font-size: 12px;
|
81 |
+
text-align: left;
|
82 |
+
line-height: 15px;
|
83 |
+
}
|
84 |
+
|
85 |
+
/* animation 1*/
|
86 |
+
.ig_toast_block .bang .ig_icon {
|
87 |
+
-webkit-animation: MainMoveIcon 1s;
|
88 |
+
}
|
89 |
+
|
90 |
+
.ig_toast_block .bang .ig_base {
|
91 |
+
-webkit-animation: MainMove 1s;
|
92 |
+
}
|
93 |
+
|
94 |
+
.ig_toast_block .bang .ig_headline, .ig_toast_block .bang .ig_message {
|
95 |
+
-webkit-animation: MainMoveText 1s;
|
96 |
+
}
|
97 |
+
@-webkit-keyframes MainMove {
|
98 |
+
0% { opacity: 0; }
|
99 |
+
70% { opacity: 0.1;-webkit-transform: scale(.3) rotateX(180deg); }
|
100 |
+
90% { opacity: 0.7; -webkit-transform: scale(1.1) rotateX(0deg); }
|
101 |
+
100% { opacity: 1;-webkit-transform: scale(1) rotateX(0deg); }
|
102 |
+
}
|
103 |
+
@-webkit-keyframes MainMoveIcon {
|
104 |
+
0% { opacity: 0; -webkit-transform: scale(.3) rotateY(180deg); }
|
105 |
+
70% { opacity: 1; -webkit-transform: scale(1.1) rotateY(0deg); }
|
106 |
+
100% { -webkit-transform: scale(1) rotateY(0deg); }
|
107 |
+
}
|
108 |
+
@-webkit-keyframes MainMoveText {
|
109 |
+
0% { opacity: 0; }
|
110 |
+
90% { opacity: 0; -webkit-transform: translate(0px, 10px); }
|
111 |
+
100% { opacity: 1; -webkit-transform: translate(0px, 0px); }
|
112 |
+
}
|
113 |
+
/* animation 2*/
|
114 |
+
.ig_toast_block .slide-down .ig_headline {
|
115 |
+
-moz-transition: all 0.2s linear;
|
116 |
+
-o-transition: all 0.2s linear;
|
117 |
+
-webkit-transition: all 0.2s linear;
|
118 |
+
transition: all 0.2s linear;
|
119 |
+
}
|
120 |
+
|
121 |
+
.ig_toast_block .slide-down .ig_message {
|
122 |
+
-moz-transition: all 0.2s linear;
|
123 |
+
-o-transition: all 0.2s linear;
|
124 |
+
-webkit-transition: all 0.2s linear;
|
125 |
+
transition: all 0.2s linear;
|
126 |
+
}
|
127 |
+
|
128 |
+
.ig_toast_block .slide-down.ig_container {
|
129 |
+
-webkit-animation-name: banner;
|
130 |
+
-webkit-animation-duration: 0.5s;
|
131 |
+
-webkit-animation-iteration-count: 1;
|
132 |
+
-webkit-animation-timing-function: ease-in;
|
133 |
+
}
|
134 |
+
|
135 |
+
.ig_toast_block .slide-down .ig_icon {
|
136 |
+
-webkit-animation-name: fade;
|
137 |
+
-webkit-animation-duration: 0.7s;
|
138 |
+
-webkit-animation-iteration-count: 1;
|
139 |
+
-webkit-animation-timing-function: ease-in;
|
140 |
+
}
|
141 |
+
|
142 |
+
@-webkit-keyframes banner {
|
143 |
+
from {
|
144 |
+
-webkit-transform: rotateX(90deg) translateY(-40px) perspective(300);
|
145 |
+
opacity: 0;
|
146 |
+
}
|
147 |
+
|
148 |
+
60% {
|
149 |
+
-webkit-transform: rotateX(-10deg) translateY(5px) perspective(400);
|
150 |
+
opacity: 1;
|
151 |
+
}
|
152 |
+
|
153 |
+
to {
|
154 |
+
-webkit-transform: rotateX(0deg) translateY(0px) perspective(400);
|
155 |
+
opacity: 1;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
@-webkit-keyframes fade {
|
160 |
+
from {
|
161 |
+
opacity: 0;
|
162 |
+
}
|
163 |
+
|
164 |
+
30% {
|
165 |
+
opacity: 0;
|
166 |
+
}
|
167 |
+
|
168 |
+
to {
|
169 |
+
opacity: 1;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
/* animation 3*/
|
173 |
+
.ig_toast_block .pop.ig_container {
|
174 |
+
-webkit-animation: BangTidy 1s ease forwards;
|
175 |
+
}
|
176 |
+
|
177 |
+
.ig_toast_block .pop .ig_icon {
|
178 |
+
-webkit-animation: BangTidyIcon 1s 0.5s ease both;
|
179 |
+
}
|
180 |
+
|
181 |
+
.ig_toast_block .pop .ig_headline, .ig_toast_block .pop .ig_message {
|
182 |
+
-webkit-animation: BangTidyText 0.4s 0.5s ease both;
|
183 |
+
}
|
184 |
+
@-webkit-keyframes BangTidy {
|
185 |
+
0% { opacity: 0; -webkit-transform: scale(.3) rotateX(-360deg); }
|
186 |
+
50% { opacity: 1; -webkit-transform: scale(1.01) rotateX(0deg); }
|
187 |
+
70% { -webkit-transform: scale(.9) rotateX(0deg); }
|
188 |
+
100% { -webkit-transform: scale(1) rotateX(0deg); }
|
189 |
+
}
|
190 |
+
|
191 |
+
@-webkit-keyframes BangTidyIcon {
|
192 |
+
0% { opacity: 0; -webkit-transform: scale(2.8) rotateX(180deg); }
|
193 |
+
50% { opacity: 1; -webkit-transform: scale(0.9) rotateX(0deg); }
|
194 |
+
70% { -webkit-transform: scale(1.25) rotateX(0deg); }
|
195 |
+
100% { -webkit-transform: scale(1) rotateX(0deg); }
|
196 |
+
}
|
197 |
+
|
198 |
+
@-webkit-keyframes BangTidyText {
|
199 |
+
0% { opacity: 0; -webkit-transform: translate(0px, 10px); }
|
200 |
+
100% { opacity: 1; -webkit-transform: translate(0px, 0px); }
|
201 |
+
}
|
202 |
+
/* animation 4*/
|
203 |
+
.ig_toast_block .appear.ig_container {
|
204 |
+
-webkit-animation-duration: 0.4s;
|
205 |
+
-moz-transition: all 0.15s ease-in-out;
|
206 |
+
-o-transition: all 0.15s ease-in-out;
|
207 |
+
-webkit-transition: all 0.15s ease-in-out;
|
208 |
+
transition: all 0.15s ease-in-out;
|
209 |
+
-webkit-animation-name: bubble;
|
210 |
+
}
|
211 |
+
@-webkit-keyframes 'bubble' {
|
212 |
+
from {
|
213 |
+
opacity: 0;
|
214 |
+
-webkit-transform: scale(0.7);
|
215 |
+
-webkit-animation-timing-function: ease-out;
|
216 |
+
}
|
217 |
+
|
218 |
+
50% {
|
219 |
+
-webkit-transform: scale(1.02);
|
220 |
+
-webkit-animation-timing-function: cubic-bezier(0.5, 0.2, 0.3, 1.0);
|
221 |
+
}
|
222 |
+
|
223 |
+
to {
|
224 |
+
opacity: ignored;
|
225 |
+
-webkit-transform: scale(1.0);
|
226 |
+
-webkit-animation-timing-function: ease-in;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
/* animation 8*/
|
230 |
+
.ig_toast_block .slide-left.ig_container {
|
231 |
+
-webkit-animation: slideFromBottom .5s ease-in-out;
|
232 |
+
}
|
233 |
+
@-webkit-keyframes slideFromBottom {
|
234 |
+
0% { opacity: 0; -webkit-transform: translate3d( -20px, 0, 0 );}
|
235 |
+
100% { opacity: 1; -webkit-transform: translate3d( 0, 0, 0 ); }
|
236 |
+
}
|
{assets → message-types/toast}/images/stand-out.png
RENAMED
File without changes
|
{assets → message-types/toast}/images/toast-glow.png
RENAMED
File without changes
|
message-types/toast/main.js
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/**
|
3 |
+
* Icegram Message Type - Toast
|
4 |
+
**/
|
5 |
+
function Icegram_Message_Type_Toast( data ) {
|
6 |
+
var width;
|
7 |
+
this.width = 300;
|
8 |
+
Icegram_Message_Type.call(this, data);
|
9 |
+
}
|
10 |
+
Icegram_Message_Type_Toast.prototype = Object.create(Icegram_Message_Type.prototype);
|
11 |
+
Icegram_Message_Type_Toast.prototype.constructor = Icegram_Message_Type_Toast;
|
12 |
+
|
13 |
+
Icegram_Message_Type_Toast.prototype.get_template_default = function () {
|
14 |
+
//'<div id="icegram_message_{{=id}}">'+
|
15 |
+
return '<li class="icegram toast ig_container {{=animation}} {{=theme}}" id="icegram_message_{{=id}}">'+
|
16 |
+
'<div class="ig_wrapper">'+
|
17 |
+
'<div class="ig_content">'+
|
18 |
+
'<div class="ig_base"></div>'+
|
19 |
+
'<div class="ig_line"></div>'+
|
20 |
+
'<img class="ig_icon" src="{{=icon}}"/>'+
|
21 |
+
'<div class="ig_headline">{{=headline}}</div>'+
|
22 |
+
'<div class="ig_message">{{=message}}</div>'+
|
23 |
+
'</div>'+
|
24 |
+
'</div>'+
|
25 |
+
'</li>';
|
26 |
+
//'</div>';
|
27 |
+
};
|
28 |
+
Icegram_Message_Type_Toast.prototype.pre_render = function ( ) {
|
29 |
+
if( this.data.position == "10" || this.data.position == "12" ) {
|
30 |
+
this.data.position = '20';
|
31 |
+
}
|
32 |
+
if (!(jQuery('ul#' + this.data.position).length)) {
|
33 |
+
var ul = jQuery('<ul id="' + this.data.position + '"></ul>').addClass('ig_toast_block').appendTo(this.root_container).hide();
|
34 |
+
ul.width(this.width);
|
35 |
+
if (this.data.position == "00") {
|
36 |
+
ul.css({top: '0', left: '0'});
|
37 |
+
} else if (this.data.position == "01") {
|
38 |
+
ul.css({top: '0', left: '50%', margin: '5px 0 0 -' + (this.width / 2) + 'px'});
|
39 |
+
} else if (this.data.position == "02") {
|
40 |
+
ul.css({top: '0', right: '0'});
|
41 |
+
} else if (this.data.position == "20") {
|
42 |
+
ul.css({bottom: '0', left: '0'});
|
43 |
+
} else if (this.data.position == "21") {
|
44 |
+
ul.css({bottom: '0', left: '50%', margin: '5px 0 0 -' + (this.width / 2) + 'px'});
|
45 |
+
} else if (this.data.position == "22") {
|
46 |
+
ul.css({bottom: '0', right: '0'});
|
47 |
+
} else if (this.data.position == "11") {
|
48 |
+
ul.css({top: '50%', left: '50%', margin: '-'+(this.width / 2) +'px 0 0 -' + (this.width / 2) + 'px'});
|
49 |
+
}
|
50 |
+
}else {
|
51 |
+
var ul = jQuery('ul#' + this.data.position);
|
52 |
+
}
|
53 |
+
this.root_container = ul;
|
54 |
+
}
|
55 |
+
|
56 |
+
Icegram_Message_Type_Toast.prototype.show = function ( options, silent ) {
|
57 |
+
if ( this.is_visible() ) return;
|
58 |
+
var sticky = false;
|
59 |
+
var duration = 10000;
|
60 |
+
!this.root_container.hasClass('active') && this.root_container.addClass('active').show();
|
61 |
+
var self = this;
|
62 |
+
setTimeout(function() {
|
63 |
+
self.el.show();
|
64 |
+
self.el.fadeIn('slow');
|
65 |
+
silent !== true && self.track( 'shown' );
|
66 |
+
}, this.data.delay_time);
|
67 |
+
|
68 |
+
!sticky && duration > 0 && (setTimeout(function() {
|
69 |
+
self.el.animate({
|
70 |
+
height: 0,
|
71 |
+
opacity: 0
|
72 |
+
}, 'fast', function() {
|
73 |
+
self.hide();
|
74 |
+
self.root_container.children().length || self.root_container.removeClass('active').hide();
|
75 |
+
});
|
76 |
+
|
77 |
+
}, duration));
|
78 |
+
|
79 |
+
};
|
80 |
+
|
81 |
+
Icegram_Message_Type_Toast.prototype.hide = function ( options, silent ) {
|
82 |
+
if ( !this.is_visible() ) return;
|
83 |
+
this.el.remove();
|
84 |
+
silent !== true && this.track( 'closed' );
|
85 |
+
};
|
86 |
+
|
message-types/toast/main.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
if ( class_exists( 'Icegram_Message_Type_Toast' ) ) return;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Icegram Toast
|
7 |
+
*/
|
8 |
+
class Icegram_Message_Type_Toast extends Icegram_Message_Type {
|
9 |
+
|
10 |
+
function __construct() {
|
11 |
+
parent::__construct( dirname( __FILE__ ), plugins_url( '/', __FILE__ ) );
|
12 |
+
add_filter( 'icegram_message_type_params_toast', array( $this, 'set_admin_style' ) );
|
13 |
+
}
|
14 |
+
|
15 |
+
function define_settings() {
|
16 |
+
parent::define_settings();
|
17 |
+
$this->settings['position']['values'] = array( '00', '01', '02', '11', '20', '21', '22' );
|
18 |
+
$this->settings['position']['default'] = '02';
|
19 |
+
$this->settings['animation']['values'] = array ( "bang" => __( "Bang", 'icegram' ),
|
20 |
+
"slide-down" => __( "Slide Down", 'icegram' ),
|
21 |
+
"pop" => __( "Pop", 'icegram' ),
|
22 |
+
"appear" => __( "Appear", 'icegram' ),
|
23 |
+
"slide-left" => __( "Slide Left", 'icegram' )
|
24 |
+
);
|
25 |
+
$this->settings['animation']['default'] = 'bang';
|
26 |
+
$this->settings['theme']['default'] = 'announce';
|
27 |
+
unset ( $this->settings['text_color'],
|
28 |
+
$this->settings['bg_color'],
|
29 |
+
$this->settings['label']
|
30 |
+
);
|
31 |
+
}
|
32 |
+
|
33 |
+
function set_admin_style( $params ) {
|
34 |
+
|
35 |
+
$params['admin_style'] = array( 'label_bg_color' => '#EDBB00',
|
36 |
+
'theme_header_height' => '5em',
|
37 |
+
'thumbnail_width' => '43%',
|
38 |
+
'thumbnail_height' => '7.5em'
|
39 |
+
);
|
40 |
+
return $params;
|
41 |
+
}
|
42 |
+
}
|
{assets/css/toast → message-types/toast/themes}/announce.css
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
-
.announce.
|
2 |
-
background-color: rgba(255, 255, 105, 0.95)
|
3 |
-moz-border-radius: 4px;
|
4 |
-webkit-border-radius: 4px;
|
5 |
border-radius: 4px;
|
@@ -11,7 +11,11 @@
|
|
11 |
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
|
12 |
}
|
13 |
|
14 |
-
.announce.
|
|
|
|
|
|
|
|
|
15 |
border: none;
|
16 |
background-color: rgba(255, 255, 255, 0.15);
|
17 |
-moz-border-radius: 4px;
|
@@ -23,7 +27,7 @@
|
|
23 |
background: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
|
24 |
}
|
25 |
|
26 |
-
.announce.
|
27 |
border: none;
|
28 |
background-color: rgba(255, 255, 255, 0.15);
|
29 |
-moz-border-radius: 4px;
|
@@ -33,38 +37,8 @@
|
|
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 .
|
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 |
-
}
|
1 |
+
.announce.ig_container {
|
2 |
+
background-color: rgba(255, 255, 105, 0.95);
|
3 |
-moz-border-radius: 4px;
|
4 |
-webkit-border-radius: 4px;
|
5 |
border-radius: 4px;
|
11 |
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
|
12 |
}
|
13 |
|
14 |
+
.announce.ig_container:hover {
|
15 |
+
border-color: rgba(0, 0, 0, 1);
|
16 |
+
}
|
17 |
+
|
18 |
+
.announce .ig_wrapper {
|
19 |
border: none;
|
20 |
background-color: rgba(255, 255, 255, 0.15);
|
21 |
-moz-border-radius: 4px;
|
27 |
background: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
|
28 |
}
|
29 |
|
30 |
+
.announce .ig_content {
|
31 |
border: none;
|
32 |
background-color: rgba(255, 255, 255, 0.15);
|
33 |
-moz-border-radius: 4px;
|
37 |
-webkit-box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
|
38 |
box-shadow: inset 0 -3px 2px rgba(58, 71, 89, 0.04);
|
39 |
background-image: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 49.75%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.06) 100%);
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
+
.announce .ig_headline {
|
43 |
color: rgba(67, 76, 89, 0.9);
|
|
|
|
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{assets/images/themes/toast → message-types/toast/themes}/announce.png
RENAMED
File without changes
|
message-types/toast/themes/balance.css
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.balance.ig_container {
|
2 |
+
border: 1px solid #777;
|
3 |
+
color: rgba(20, 20, 20, 1);
|
4 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
|
5 |
+
background-color: rgba(204, 204, 204, 0.75);
|
6 |
+
background: -webkit-gradient(linear, left top, left bottom, from(rgba(204, 204, 204, 0.75)), to(rgba(240, 240, 240, 1)), color-stop(0.4, rgba(139, 139, 139, 0.5)));
|
7 |
+
-webkit-font-smoothing: antialiased;
|
8 |
+
}
|
9 |
+
|
10 |
+
.balance .ig_headline {
|
11 |
+
color: hsla(0, 0%, 8%, 1);
|
12 |
+
text-shadow: 0 1px 0 hsla(0, 100%, 100%, 0.7);
|
13 |
+
border-bottom: 1px solid #777;
|
14 |
+
width: 100%;
|
15 |
+
}
|
16 |
+
|
17 |
+
.balance .ig_message {
|
18 |
+
color: hsla(0, 0%, 8%, 1);
|
19 |
+
text-shadow: 0 1px 0 hsla(0, 100%, 100%, 0.7);
|
20 |
+
margin-top: 5px;
|
21 |
+
}
|
{assets/images/themes/toast → message-types/toast/themes}/balance.png
RENAMED
File without changes
|
{assets/css/toast → message-types/toast/themes}/burnt.css
RENAMED
@@ -1,12 +1,15 @@
|
|
1 |
-
.burnt.
|
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 .
|
|
|
|
|
|
|
|
|
10 |
position: absolute;
|
11 |
top: 0;
|
12 |
left: 0;
|
@@ -25,39 +28,16 @@
|
|
25 |
z-index: 0;
|
26 |
}
|
27 |
|
28 |
-
.burnt .
|
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:
|
57 |
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
|
58 |
}
|
59 |
|
60 |
-
.burnt .
|
61 |
content: "";
|
62 |
display: block;
|
63 |
width: 1px;
|
@@ -68,24 +48,29 @@
|
|
68 |
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
69 |
}
|
70 |
|
71 |
-
.burnt .
|
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 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
}
|
1 |
+
.burnt.ig_container {
|
2 |
min-height: 64px;
|
|
|
3 |
position: relative;
|
4 |
-moz-box-sizing: border-box;
|
5 |
box-sizing: border-box;
|
6 |
}
|
7 |
|
8 |
+
.burnt .ig_wrapper {
|
9 |
+
padding: 5px 5px 5px 65px;
|
10 |
+
}
|
11 |
+
|
12 |
+
.burnt .ig_base {
|
13 |
position: absolute;
|
14 |
top: 0;
|
15 |
left: 0;
|
28 |
z-index: 0;
|
29 |
}
|
30 |
|
31 |
+
.burnt .ig_line {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
width: 1px;
|
33 |
height: 27px;
|
34 |
position: absolute;
|
35 |
top: 1px;
|
36 |
+
left: 58px;
|
37 |
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
|
38 |
}
|
39 |
|
40 |
+
.burnt .ig_line:after {
|
41 |
content: "";
|
42 |
display: block;
|
43 |
width: 1px;
|
48 |
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
49 |
}
|
50 |
|
51 |
+
.burnt .ig_headline {
|
52 |
color: #fff;
|
|
|
53 |
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
|
|
|
|
|
54 |
z-index: 1;
|
|
|
55 |
}
|
56 |
|
57 |
+
.burnt .ig_icon {
|
58 |
+
max-height: 42px;
|
59 |
+
max-width: 42px;
|
60 |
+
left: 8px;
|
61 |
+
top: 5px;
|
62 |
+
}
|
63 |
+
|
64 |
+
.burnt .ig_icon img {
|
65 |
+
width: 40px;
|
66 |
+
height: 40px;
|
67 |
+
-moz-border-radius: 3px;
|
68 |
+
-webkit-border-radius: 3px;
|
69 |
+
border-radius: 3px;
|
70 |
+
}
|
71 |
+
|
72 |
+
.burnt .ig_message {
|
73 |
color: rgba(255, 255, 255, 0.83);
|
|
|
74 |
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7);
|
75 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
{assets/images/themes/toast → message-types/toast/themes}/burnt.png
RENAMED
File without changes
|
message-types/toast/themes/clear.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.clear.ig_container {
|
2 |
+
border: 3px solid rgba(0, 0, 0, 0.4);
|
3 |
+
-moz-border-radius: .5em;
|
4 |
+
-webkit-border-radius: .5em;
|
5 |
+
border-radius: .5em;
|
6 |
+
background: #fff;
|
7 |
+
}
|
8 |
+
|
9 |
+
.clear .ig_headline {
|
10 |
+
color: #222;
|
11 |
+
letter-spacing: 0.7pt;
|
12 |
+
line-height: 16px;
|
13 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
|
14 |
+
}
|
15 |
+
|
16 |
+
.clear .ig_icon {
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
.clear .ig_message {
|
21 |
+
text-align: left;
|
22 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
|
23 |
+
color: #444;
|
24 |
+
line-height: 15px;
|
25 |
+
}
|
{assets/images/themes/toast → message-types/toast/themes}/clear.png
RENAMED
File without changes
|
{assets/css/toast → message-types/toast/themes}/night-glow.css
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
.night-glow.
|
2 |
-moz-border-radius: 5px;
|
3 |
-webkit-border-radius: 5px;
|
4 |
border-radius: 5px;
|
@@ -15,11 +15,11 @@
|
|
15 |
text-shadow: 0 -1px 0 #000;
|
16 |
}
|
17 |
|
18 |
-
.night-glow.
|
19 |
-moz-border-radius: 3px;
|
20 |
-webkit-border-radius: 3px;
|
21 |
border-radius: 3px;
|
22 |
-
background-image: url(
|
23 |
background-repeat: no-repeat;
|
24 |
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
25 |
-moz-border-image: stretch;
|
@@ -30,39 +30,18 @@
|
|
30 |
position: auto;
|
31 |
}
|
32 |
|
33 |
-
.night-glow.
|
|
|
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 .
|
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 .
|
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 |
}
|
1 |
+
.night-glow.ig_container {
|
2 |
-moz-border-radius: 5px;
|
3 |
-webkit-border-radius: 5px;
|
4 |
border-radius: 5px;
|
15 |
text-shadow: 0 -1px 0 #000;
|
16 |
}
|
17 |
|
18 |
+
.night-glow .ig_wrapper {
|
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;
|
30 |
position: auto;
|
31 |
}
|
32 |
|
33 |
+
.night-glow .ig_content {
|
34 |
+
padding-left: 8px;
|
35 |
-moz-border-radius: 3px;
|
36 |
-webkit-border-radius: 3px;
|
37 |
border-radius: 3px;
|
38 |
border-left: 1px solid rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
+
.night-glow .ig_headline {
|
42 |
color: rgba(255, 255, 255, 0.9);
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
+
.night-glow .ig_message {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
color: rgba(255, 255, 255, 0.9);
|
47 |
}
|
{assets/images/themes/toast → message-types/toast/themes}/night-glow.png
RENAMED
File without changes
|
{assets/css/toast → message-types/toast/themes}/stand-out.css
RENAMED
@@ -1,44 +1,30 @@
|
|
1 |
-
.stand-out.
|
2 |
-
|
|
|
|
|
|
|
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(
|
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 .
|
18 |
-
|
19 |
-
|
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 .
|
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 |
}
|
1 |
+
.stand-out .ig_wrapper {
|
2 |
+
padding: 5px 50px 5px 10px;
|
3 |
+
}
|
4 |
+
|
5 |
+
.stand-out.ig_container {
|
6 |
background-color: hsl(0, 0%, 12%);
|
7 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, 0.1)), color-stop(1, rgba(255, 255, 255, 0.1))), url(../images/stand-out.png);
|
8 |
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
|
9 |
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
|
10 |
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 -1px 0 rgba(255, 255, 255, 0.1) inset, 0 1px 4px rgba(0, 0, 0, 0.7);
|
11 |
-moz-border-radius: 5px;
|
12 |
-webkit-border-radius: 5px;
|
13 |
border-radius: 5px;
|
|
|
14 |
color: #fff;
|
15 |
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.75);
|
16 |
border: 1px solid #111;
|
17 |
}
|
18 |
|
19 |
+
.stand-out .ig_icon {
|
20 |
+
right: 10px;
|
21 |
+
left: auto;
|
|
|
|
|
22 |
-moz-border-radius: 3px;
|
23 |
-webkit-border-radius: 3px;
|
24 |
border-radius: 3px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
|
27 |
+
.stand-out .ig_message {
|
|
|
28 |
color: rgba(255, 255, 255, 0.7);
|
29 |
line-height: 15px;
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
{assets/images/themes/toast → message-types/toast/themes}/stand-out.png
RENAMED
File without changes
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:http://www.icegram.com/
|
|
4 |
Tags: popup, window, hellobar, action bar, header bar, footer bar, notification, messenger, targeting, rules, auto responder, icegram, responsive, slide
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -86,8 +86,8 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
|
|
86 |
|
87 |
== Upgrade Notice ==
|
88 |
|
89 |
-
= 1.
|
90 |
-
|
91 |
|
92 |
= 1.1.1 =
|
93 |
Compatibility with W3TC and Localization
|
@@ -101,8 +101,21 @@ Initial Release
|
|
101 |
|
102 |
== Changelog ==
|
103 |
|
104 |
-
= 1.
|
105 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
= 1.1.1 =
|
108 |
* Fix for crash on activation with W3 Total Cache
|
4 |
Tags: popup, window, hellobar, action bar, header bar, footer bar, notification, messenger, targeting, rules, auto responder, icegram, responsive, slide
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
86 |
|
87 |
== Upgrade Notice ==
|
88 |
|
89 |
+
= 1.2 =
|
90 |
+
Lots of enhancements... [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support, pluggable architecture, many internal changes. Do upgrade.
|
91 |
|
92 |
= 1.1.1 =
|
93 |
Compatibility with W3TC and Localization
|
101 |
|
102 |
== Changelog ==
|
103 |
|
104 |
+
= 1.2 =
|
105 |
+
* NEW: Icegram is now fully pluggable. External plugins can add message types and themes.
|
106 |
+
* NEW: [WPML](http://wpml.org/?aid=21266&affiliate_key=W1YOdHyWrIjY) support
|
107 |
+
* Update: Icegram branding is optional
|
108 |
+
* NEW: Setting to show Icegram branding
|
109 |
+
* Fix: Popups show correctly on long pages now
|
110 |
+
* Fix: Single day schedule for message display is correctly handled now
|
111 |
+
* NEW: Rewritten message display system - can even control with JavaScript now
|
112 |
+
* Fix: For problems showing a campaign on homepage
|
113 |
+
* Update: Simplified CSS and JS
|
114 |
+
* Update: Changed custom post type names to ig_message and ig_campaign
|
115 |
+
* Update: Compatibility with All in One SEO plugin
|
116 |
+
* Update: Newsletter subscription form added
|
117 |
+
* Fix: For displaying messages via shortcode
|
118 |
+
* Update: And many more!!!
|
119 |
|
120 |
= 1.1.1 =
|
121 |
* Fix for crash on activation with W3 Total Cache
|
settings.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
3 |
+
|
4 |
+
if( isset( $_POST['submit'] ) ) {
|
5 |
+
if( isset( $_POST['icegram_share_love'] ) ) {
|
6 |
+
update_option( 'icegram_share_love', $_POST['icegram_share_love'] );
|
7 |
+
} else {
|
8 |
+
update_option( 'icegram_share_love', 'no' );
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
?>
|
13 |
+
<div class="wrap">
|
14 |
+
<h2><?php _e( "Icegram Settings", "icegram" ) ?></h2>
|
15 |
+
<form name="icegram_settings" method="POST" action="<?php echo admin_url(); ?>edit.php?post_type=ig_campaign&page=icegram-settings">
|
16 |
+
<table class="form-table">
|
17 |
+
<tr>
|
18 |
+
<th scope="row"><?php _e( 'Share Icegram', 'icegram' ) ?></th>
|
19 |
+
<td>
|
20 |
+
<label for="icegram_share_love">
|
21 |
+
<input type="checkbox" name="icegram_share_love" id="icegram_share_love"/ value="yes" <?php checked('yes', get_option('icegram_share_love')); ?> />
|
22 |
+
<?php _e( 'Show "Powered by" link', 'icegram' ); ?>
|
23 |
+
</label>
|
24 |
+
</td>
|
25 |
+
</tr>
|
26 |
+
</table>
|
27 |
+
<?php submit_button(); ?>
|
28 |
+
</form>
|
29 |
+
</div>
|
30 |
+
<?php do_action( 'icegram_settings_after' ); ?>
|
templates/action-bar.php
DELETED
@@ -1,22 +0,0 @@
|
|
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
DELETED
@@ -1,22 +0,0 @@
|
|
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
DELETED
@@ -1,16 +0,0 @@
|
|
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
DELETED
@@ -1,16 +0,0 @@
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updates/icegram-update-1.2.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
+
|
5 |
+
/*
|
6 |
+
Proper structuring of message data fields in case of animation and theme key-value
|
7 |
+
Changed the array keys
|
8 |
+
title -> headline
|
9 |
+
promo_image -> icon
|
10 |
+
*/
|
11 |
+
global $wpdb, $wp_rewrite;
|
12 |
+
|
13 |
+
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->postmeta} WHERE meta_key LIKE 'icegram_message_%'" );
|
14 |
+
|
15 |
+
foreach ( $results as $result ) {
|
16 |
+
|
17 |
+
$message_data = unserialize( $result->meta_value );
|
18 |
+
if( is_array( $message_data ) && !empty( $message_data ) ) {
|
19 |
+
$message_type = $message_data['type'];
|
20 |
+
if( isset( $message_data['theme'] ) && is_array( $message_data['theme'] ) && !empty( $message_data['theme'][$message_type] ) ) {
|
21 |
+
$message_data['theme'] = $message_data['theme'][$message_type];
|
22 |
+
}
|
23 |
+
if( isset( $message_data['animation'] ) && is_array( $message_data['animation'] ) ) {
|
24 |
+
if( !empty( $message_data['animation'][$message_type] ) ) {
|
25 |
+
$message_data['animation'] = $message_data['animation'][$message_type];
|
26 |
+
} else {
|
27 |
+
unset( $message_data['animation'] );
|
28 |
+
}
|
29 |
+
}
|
30 |
+
if( isset( $message_data['title'] ) ) {
|
31 |
+
$message_data['headline'] = $message_data['title'];
|
32 |
+
unset( $message_data['title'] );
|
33 |
+
}
|
34 |
+
if( isset( $message_data['promo_image'] ) ) {
|
35 |
+
$message_data['icon'] = $message_data['promo_image'];
|
36 |
+
unset( $message_data['promo_image'] );
|
37 |
+
}
|
38 |
+
update_post_meta( $result->post_id, $result->meta_key, $message_data );
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
// Change post_type for messages and campaigns
|
44 |
+
$old_post_types = array('message', 'campaign');
|
45 |
+
foreach ($old_post_types as $type) {
|
46 |
+
|
47 |
+
$q = 'numberposts=-1&post_status=any&post_type='.$type;
|
48 |
+
$items = get_posts($q);
|
49 |
+
foreach ($items as $item) {
|
50 |
+
$update['ID'] = $item->ID;
|
51 |
+
$update['post_type'] = "ig_{$type}";
|
52 |
+
wp_update_post( $update );
|
53 |
+
}
|
54 |
+
|
55 |
+
/*
|
56 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_type = REPLACE(post_type, %s, %s)
|
57 |
+
WHERE post_type LIKE %s", $type, 'ig_'.$type, $type ) );
|
58 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
|
59 |
+
WHERE guid LIKE %s", "post_type={$type}", "post_type=ig_{$type}", "%post_type={$type}%" ) );
|
60 |
+
|
61 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
|
62 |
+
WHERE guid LIKE %s", "/{$type}/", "/ig_{$type}/", "%/{$type}/%" ) );
|
63 |
+
*/
|
64 |
+
}
|
65 |
+
|
66 |
+
if ($wp_rewrite) {
|
67 |
+
$wp_rewrite->flush_rules();
|
68 |
+
}
|
69 |
+
|
70 |
+
update_option( 'icegram_db_version', '1.2' );
|
wpml-config.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<wpml-config>
|
2 |
+
<custom-types>
|
3 |
+
<custom-type translate="1">ig_message</custom-type>
|
4 |
+
<custom-type translate="0">ig_campaign</custom-type>
|
5 |
+
</custom-types>
|
6 |
+
</wpml-config>
|