Version Description
Download this release
Release Info
Developer | averta |
Plugin | Master Slider – Responsive Touch Slider |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.9.8 to 3.0.0
- README.txt +11 -5
- admin/assets/images/thirdparty/phlox-badge.png +0 -0
- admin/assets/images/thirdparty/phlox-popup.png +0 -0
- admin/assets/images/thirdparty/pro-tab-setting.png +0 -0
- admin/includes/classes/class-msp-list-table.php +15 -9
- admin/includes/classes/class-msp-parser.php +33 -32
- admin/includes/classes/class-msp-shortcode-factory.php +4 -2
- admin/includes/msp-admin-functions.php +83 -4
- admin/includes/msp-admin-templates.php +1 -1
- admin/includes/msp-hooks.php +3 -1
- admin/views/index.php +1 -1
- admin/views/setting/class-msp-settings.php +34 -16
- admin/views/slider-dashboard/list-sliders.php +3 -3
- admin/views/slider-panel/css/msp-style.css +267 -0
- admin/views/slider-panel/images/pro-features/admin-area/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/templates.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/button-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/transition-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/button-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/transition-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/badge.png +0 -0
- admin/views/slider-panel/images/pro-features/check.png +0 -0
- admin/views/slider-panel/images/pro-features/header-logo.png +0 -0
- admin/views/slider-panel/images/pro-features/header.jpg +0 -0
- admin/views/slider-panel/images/pro-features/package.png +0 -0
- admin/views/slider-panel/images/pro-features/rate.png +0 -0
- admin/views/slider-panel/images/pro-features/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/testimonials/captial-themes.jpg +0 -0
- admin/views/slider-panel/images/pro-features/testimonials/goodlayers.png +0 -0
- admin/views/slider-panel/images/pro-features/testimonials/massImpressions.png +0 -0
- admin/views/slider-panel/images/pro-features/testimonials/pabloegrande.jpg +0 -0
- admin/views/slider-panel/images/pro-features/testimonials/pixflow.png +0 -0
- admin/views/slider-panel/images/pro-features/testimonials/theorian.jpg +0 -0
- admin/views/slider-panel/index.php +153 -0
- admin/views/slider-panel/js/masterslider.wp.js +2 -2
- admin/views/slider-panel/js/msp.required.js +1 -1
- includes/init/define.php +1 -1
- includes/msp-shortcodes.php +5 -0
- master-slider.php +1 -1
- public/assets/css/masterslider.main.css +1 -1
- public/class-master-slider.php +14 -0
README.txt
CHANGED
@@ -4,9 +4,9 @@ Donate link: http://averta.net/
|
|
4 |
License: GPLv3
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
|
7 |
-
Requires at least: 4.
|
8 |
-
Tested up to: 4.
|
9 |
-
Stable tag:
|
10 |
|
11 |
The most advanced responsive and HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on desktop and devices.
|
12 |
|
@@ -231,6 +231,13 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
|
|
231 |
|
232 |
== Changelog ==
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
= Version 2.9.8 / (15.4.2017) =
|
235 |
- [Fix]: Italian translation added
|
236 |
- [Fix]: Minor bugs fixed
|
@@ -426,6 +433,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
|
|
426 |
|
427 |
== Upgrade Notice ==
|
428 |
|
429 |
-
= Version
|
430 |
-
- [Fix]: Italian translation added
|
431 |
- [Fix]: Minor bugs fixed
|
4 |
License: GPLv3
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
|
7 |
+
Requires at least: 4.5
|
8 |
+
Tested up to: 4.8.0
|
9 |
+
Stable tag: 3.0.0
|
10 |
|
11 |
The most advanced responsive and HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on desktop and devices.
|
12 |
|
231 |
|
232 |
== Changelog ==
|
233 |
|
234 |
+
= 3.0.0 =
|
235 |
+
|
236 |
+
= Version 3.0.0 / (17.06.2017) =
|
237 |
+
- [Fix]: An issue with overlay color for slides fixed.
|
238 |
+
- [Improvement]: The corresponding styles will be generated after duplicating the slider automatically.
|
239 |
+
- [Improvement]: Some minor bugs fixed.
|
240 |
+
|
241 |
= Version 2.9.8 / (15.4.2017) =
|
242 |
- [Fix]: Italian translation added
|
243 |
- [Fix]: Minor bugs fixed
|
433 |
|
434 |
== Upgrade Notice ==
|
435 |
|
436 |
+
= Version 3.0.0 / (17.06.2017) =
|
|
|
437 |
- [Fix]: Minor bugs fixed
|
admin/assets/images/thirdparty/phlox-badge.png
ADDED
Binary file
|
admin/assets/images/thirdparty/phlox-popup.png
ADDED
Binary file
|
admin/assets/images/thirdparty/pro-tab-setting.png
ADDED
Binary file
|
admin/includes/classes/class-msp-list-table.php
CHANGED
@@ -124,23 +124,29 @@ class MSP_List_Table extends Axiom_List_Table {
|
|
124 |
if( current_user_can( 'delete_masterslider' ) && 'delete' === $this->current_action() ) {
|
125 |
|
126 |
global $mspdb;
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
129 |
|
130 |
} else {
|
131 |
-
|
132 |
}
|
133 |
|
134 |
// check if a duplicate request recieved
|
135 |
if( current_user_can( 'duplicate_masterslider' ) && 'duplicate' === $this->current_action() ) {
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
// echo "Slider id ($slider_id) duplicated";
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
144 |
|
145 |
}
|
146 |
|
124 |
if( current_user_can( 'delete_masterslider' ) && 'delete' === $this->current_action() ) {
|
125 |
|
126 |
global $mspdb;
|
127 |
+
$mspdb->delete_slider( $slider_id );
|
128 |
+
|
129 |
+
msp_save_custom_styles();
|
130 |
+
// flush slider cache if slider cache is enabled
|
131 |
+
msp_flush_slider_cache( $slider_id );
|
132 |
|
133 |
} else {
|
134 |
+
add_action( 'admin_notices', array( $this, 'delete_error_notice' ) );
|
135 |
}
|
136 |
|
137 |
// check if a duplicate request recieved
|
138 |
if( current_user_can( 'duplicate_masterslider' ) && 'duplicate' === $this->current_action() ) {
|
139 |
|
140 |
+
global $mspdb;
|
141 |
+
$mspdb->duplicate_slider( $slider_id );
|
|
|
142 |
|
143 |
+
msp_save_custom_styles();
|
144 |
+
// flush slider cache if slider cache is enabled
|
145 |
+
msp_flush_slider_cache( $slider_id );
|
146 |
+
|
147 |
+
} else {
|
148 |
+
add_action( 'admin_notices', array( $this, 'duplicate_error_notice' ) );
|
149 |
+
}
|
150 |
|
151 |
}
|
152 |
|
admin/includes/classes/class-msp-parser.php
CHANGED
@@ -148,21 +148,21 @@ class MSP_Parser {
|
|
148 |
|
149 |
|
150 |
'ps_post_type' => isset( $setting['postType'] ) ? (string) $setting['postType'] : '',
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
|
167 |
|
168 |
'facebook_username' => isset( $setting['setType'] ) && ( 'photostream' == $setting['setType'] ) ? $setid : '',
|
@@ -197,8 +197,8 @@ class MSP_Parser {
|
|
197 |
'thumbs_space' => 5,
|
198 |
'thumbs_hideunder' => '',
|
199 |
'thumbs_arrows' => 'false',
|
200 |
-
|
201 |
-
|
202 |
|
203 |
'scroll' => 'false', // display scrollbar?
|
204 |
'scroll_autohide' => 'true', // auto hide scroll?
|
@@ -208,7 +208,7 @@ class MSP_Parser {
|
|
208 |
'scroll_margin' => '',
|
209 |
'scroll_hideunder' => '',
|
210 |
'scroll_color' => '#3D3D3D',
|
211 |
-
|
212 |
|
213 |
|
214 |
'circletimer' => 'false', // display circletimer?
|
@@ -226,7 +226,7 @@ class MSP_Parser {
|
|
226 |
'timebar_align' => 'bottom',
|
227 |
'timebar_hideunder'=> '',
|
228 |
'timebar_color' => '#FFFFFF',
|
229 |
-
|
230 |
|
231 |
|
232 |
'slideinfo' => 'false', // display timebar?
|
@@ -237,18 +237,17 @@ class MSP_Parser {
|
|
237 |
'slideinfo_margin' => '',
|
238 |
'slideinfo_hideunder'=> '',
|
239 |
'slideinfo_width' => '',
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
);
|
253 |
|
254 |
|
@@ -333,6 +332,8 @@ class MSP_Parser {
|
|
333 |
|
334 |
'ishide' => $this->is_key_true( $slide, 'ishide', 'false' ),
|
335 |
|
|
|
|
|
336 |
'src' => isset( $slide['bg'] ) ? esc_attr( msp_get_the_relative_media_url( $slide['bg'] ) ) : '',
|
337 |
'src_full' => isset( $slide['bg'] ) ? esc_attr( msp_get_the_relative_media_url( $slide['bg'] ) ) : '',
|
338 |
|
@@ -753,7 +754,7 @@ class MSP_Parser {
|
|
753 |
$slides[] = $this->parse_slide( $slide );
|
754 |
}
|
755 |
|
756 |
-
$this->recent_slides = $slides;
|
757 |
}
|
758 |
return $this->recent_slides;
|
759 |
}
|
148 |
|
149 |
|
150 |
'ps_post_type' => isset( $setting['postType'] ) ? (string) $setting['postType'] : '',
|
151 |
+
'ps_tax_term_ids' => $tax_term_ids,
|
152 |
+
'ps_post_count' => isset( $setting['postCount'] ) ? (int) $setting['postCount'] : 10,
|
153 |
+
'ps_image_from' => isset( $setting['postImageType'] ) ? (string) $setting['postImageType'] : 'auto',
|
154 |
+
'ps_order' => isset( $setting['postOrder'] ) ? (string) $setting['postOrder'] : 'DESC',
|
155 |
+
'ps_orderby' => isset( $setting['postOrderDir'] ) ? (string) $setting['postOrderDir'] : 'menu_order date',
|
156 |
+
'ps_posts_not_in' => isset( $setting['postExcludeIds'] ) ? (string) $setting['postExcludeIds'] : '',
|
157 |
+
'ps_excerpt_len' => isset( $setting['postExcerptLen'] ) ? (int) $setting['postExcerptLen'] : 100,
|
158 |
+
'ps_offset' => isset( $setting['postOffset'] ) ? (int) $setting['postOffset'] : 0,
|
159 |
+
'ps_link_slide' => isset( $setting['postLinkSlide'] ) ? (boolean) $setting['postLinkSlide'] : false,
|
160 |
+
'ps_link_target' => isset( $setting['postLinkTarget'] ) ? (string) $setting['postLinkTarget'] : '_self',
|
161 |
+
'ps_slide_bg' => isset( $setting['postSlideBg'] ) ? msp_get_the_relative_media_url( $setting['postSlideBg'] ) : '',
|
162 |
+
|
163 |
+
'wc_only_featured' => $this->is_key_true( $setting, 'wcOnlyFeatured', 'false' ),
|
164 |
+
'wc_only_instock' => $this->is_key_true( $setting, 'wcOnlyInstock' , 'false' ),
|
165 |
+
'wc_only_onsale' => $this->is_key_true( $setting, 'wcOnlyOnsale' , 'false' ),
|
166 |
|
167 |
|
168 |
'facebook_username' => isset( $setting['setType'] ) && ( 'photostream' == $setting['setType'] ) ? $setid : '',
|
197 |
'thumbs_space' => 5,
|
198 |
'thumbs_hideunder' => '',
|
199 |
'thumbs_arrows' => 'false',
|
200 |
+
'thumbs_in_tab' => 'false',
|
201 |
+
'thumbs_hoverchange'=> 'false',
|
202 |
|
203 |
'scroll' => 'false', // display scrollbar?
|
204 |
'scroll_autohide' => 'true', // auto hide scroll?
|
208 |
'scroll_margin' => '',
|
209 |
'scroll_hideunder' => '',
|
210 |
'scroll_color' => '#3D3D3D',
|
211 |
+
'scroll_width' => '',
|
212 |
|
213 |
|
214 |
'circletimer' => 'false', // display circletimer?
|
226 |
'timebar_align' => 'bottom',
|
227 |
'timebar_hideunder'=> '',
|
228 |
'timebar_color' => '#FFFFFF',
|
229 |
+
'timebar_width' => '',
|
230 |
|
231 |
|
232 |
'slideinfo' => 'false', // display timebar?
|
237 |
'slideinfo_margin' => '',
|
238 |
'slideinfo_hideunder'=> '',
|
239 |
'slideinfo_width' => '',
|
240 |
+
'slideinfo_height' => '',
|
241 |
+
|
242 |
+
'on_change_start' => '',
|
243 |
+
'on_change_end' => '',
|
244 |
+
'on_waiting' => '',
|
245 |
+
'on_resize' => '',
|
246 |
+
'on_video_play' => '',
|
247 |
+
'on_video_close' => '',
|
248 |
+
'on_swipe_start' => '',
|
249 |
+
'on_swipe_move' => '',
|
250 |
+
'on_swipe_end' => ''
|
|
|
251 |
);
|
252 |
|
253 |
|
332 |
|
333 |
'ishide' => $this->is_key_true( $slide, 'ishide', 'false' ),
|
334 |
|
335 |
+
'is_overlay_layers' => $this->is_key_true( $slide, 'isOverlayLayers', 'false' ),
|
336 |
+
|
337 |
'src' => isset( $slide['bg'] ) ? esc_attr( msp_get_the_relative_media_url( $slide['bg'] ) ) : '',
|
338 |
'src_full' => isset( $slide['bg'] ) ? esc_attr( msp_get_the_relative_media_url( $slide['bg'] ) ) : '',
|
339 |
|
754 |
$slides[] = $this->parse_slide( $slide );
|
755 |
}
|
756 |
|
757 |
+
$this->recent_slides = array_filter( $slides );
|
758 |
}
|
759 |
return $this->recent_slides;
|
760 |
}
|
admin/includes/classes/class-msp-shortcode-factory.php
CHANGED
@@ -61,7 +61,7 @@ class MSP_Shortcode_Factory {
|
|
61 |
$attrs = '';
|
62 |
|
63 |
// the list of attributes which should be excluded from slide shortcode
|
64 |
-
$exclude_slide_attrs = array( 'layers', 'layer_ids', 'ishide', 'info' );
|
65 |
|
66 |
foreach ( $slide as $attr => $attr_value ) {
|
67 |
|
@@ -145,7 +145,9 @@ class MSP_Shortcode_Factory {
|
|
145 |
|
146 |
foreach ( $slides as $slide ) {
|
147 |
if( ! empty( $slide['ishide'] ) && 'true' != $slide['ishide'] ){
|
148 |
-
|
|
|
|
|
149 |
}
|
150 |
}
|
151 |
|
61 |
$attrs = '';
|
62 |
|
63 |
// the list of attributes which should be excluded from slide shortcode
|
64 |
+
$exclude_slide_attrs = array( 'layers', 'layer_ids', 'ishide', 'info', 'is_overlay_layers' );
|
65 |
|
66 |
foreach ( $slide as $attr => $attr_value ) {
|
67 |
|
145 |
|
146 |
foreach ( $slides as $slide ) {
|
147 |
if( ! empty( $slide['ishide'] ) && 'true' != $slide['ishide'] ){
|
148 |
+
if( 'true' != $slide['is_overlay_layers'] ){
|
149 |
+
$shortcodes .= $this->get_ms_slide_shortcode( $slide );
|
150 |
+
}
|
151 |
}
|
152 |
}
|
153 |
|
admin/includes/msp-admin-functions.php
CHANGED
@@ -108,19 +108,98 @@ function msp_save_custom_styles() {
|
|
108 |
}
|
109 |
|
110 |
|
|
|
111 |
/**
|
112 |
-
* Get
|
113 |
*
|
114 |
-
* @
|
|
|
|
|
|
|
115 |
*/
|
116 |
-
function
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
|
|
122 |
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
/**
|
126 |
* Prints Pretty human-readable information about a variable (developer debug tool)
|
108 |
}
|
109 |
|
110 |
|
111 |
+
|
112 |
/**
|
113 |
+
* Get total number of downloads by item slug
|
114 |
*
|
115 |
+
* @param string $remote_url Remote URL to retrieve data from
|
116 |
+
* @param array $body_args Parameters to pass to the remote API address
|
117 |
+
*
|
118 |
+
* @return array|string The API response
|
119 |
*/
|
120 |
+
function msp_get_averta_remote_api_data( $remote_url, $body_args ){
|
121 |
+
$args = array(
|
122 |
+
'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 10 ),
|
123 |
+
'body' => $body_args
|
124 |
+
);
|
125 |
+
|
126 |
+
$request = wp_remote_get( $remote_url, $args );
|
127 |
+
|
128 |
+
if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) !== 200 ) {
|
129 |
+
return '...';
|
130 |
+
}
|
131 |
+
|
132 |
+
return $request['body'];
|
133 |
}
|
134 |
|
135 |
|
136 |
+
/**
|
137 |
+
* A shortcode to retrieve data from API
|
138 |
+
*
|
139 |
+
* @return string
|
140 |
+
*/
|
141 |
+
function msp_api_stats_shortcode( $atts , $content = null ) {
|
142 |
+
|
143 |
+
// parse attributes
|
144 |
+
$atts = shortcode_atts(
|
145 |
+
array(
|
146 |
+
'branch' => 'envato',
|
147 |
+
'group' => 'items',
|
148 |
+
'cat' => 'info',
|
149 |
+
'action' => 'stats',
|
150 |
+
'item-id' => '', // item id
|
151 |
+
'item-name' => '', // item name or slug
|
152 |
+
'item-param' => 'number_of_sales', // item param
|
153 |
+
'format' => '',
|
154 |
+
'cache_in_minutes' => 0
|
155 |
+
),
|
156 |
+
$atts,
|
157 |
+
'averta-api'
|
158 |
+
);
|
159 |
+
|
160 |
+
if( empty( $atts['item-id'] ) && empty( $atts['item-name'] ) ){
|
161 |
+
return 'item-id or item-name is required';
|
162 |
+
}
|
163 |
+
|
164 |
+
// sanitize the cache period
|
165 |
+
$atts['cache_in_minutes'] = is_numeric( $atts['cache_in_minutes'] ) ? (int) $atts['cache_in_minutes'] : 180;
|
166 |
+
|
167 |
+
// create a transient id base on the passed options
|
168 |
+
$options_string_id = implode( '_' , $atts );
|
169 |
+
|
170 |
+
if( $atts['cache_in_minutes'] > 0 && false !== ( $result = get_transient( $options_string_id ) ) ){
|
171 |
+
return $result;
|
172 |
+
}
|
173 |
+
|
174 |
+
|
175 |
+
// request data
|
176 |
+
$remote_url = 'http://api.averta.net/';
|
177 |
+
$request_args = $atts;
|
178 |
+
unset( $request_args['cache_in_minutes'] );
|
179 |
+
|
180 |
+
$result = msp_get_averta_remote_api_data( $remote_url, $request_args );
|
181 |
+
$result = apply_filters( 'auxin_averta_api_shortcode_result', $result, $atts );
|
182 |
+
|
183 |
+
if( $atts['cache_in_minutes'] > 0 ){
|
184 |
+
set_transient( $options_string_id, $result, $atts['cache_in_minutes'] * MINUTE_IN_SECONDS );
|
185 |
+
}
|
186 |
+
|
187 |
+
return $result;
|
188 |
+
}
|
189 |
|
190 |
+
add_shortcode( 'msp-stats', 'msp_api_stats_shortcode' );
|
191 |
|
192 |
|
193 |
+
/**
|
194 |
+
* Get the number of PRO users
|
195 |
+
*
|
196 |
+
* @return int
|
197 |
+
*/
|
198 |
+
function msp_get_pro_users_num(){
|
199 |
+
$download_num = msp_api_stats_shortcode( array( 'item-id' => '7467925' ) );
|
200 |
+
return number_format_i18n( floor( ($download_num/1000) ) * 1000 ). '+';
|
201 |
+
}
|
202 |
+
|
203 |
|
204 |
/**
|
205 |
* Prints Pretty human-readable information about a variable (developer debug tool)
|
admin/includes/msp-admin-templates.php
CHANGED
@@ -9,7 +9,7 @@ function msp_get_panel_header(){
|
|
9 |
</a>
|
10 |
<div class="msp-phlox-badge">
|
11 |
<a href="http://avt.li/phmsltbtn" target="_blank">
|
12 |
-
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/assets/images/thirdparty/phlox-badge.
|
13 |
</a>
|
14 |
</div>
|
15 |
</div>
|
9 |
</a>
|
10 |
<div class="msp-phlox-badge">
|
11 |
<a href="http://avt.li/phmsltbtn" target="_blank">
|
12 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/assets/images/thirdparty/phlox-badge.png" />
|
13 |
</a>
|
14 |
</div>
|
15 |
</div>
|
admin/includes/msp-hooks.php
CHANGED
@@ -115,7 +115,9 @@ function msp_add_master_admin_class( $classes ){
|
|
115 |
if( ! empty( $_GET['page'] ) && MSWP_SLUG == $_GET['page'] ){
|
116 |
$classes .= ' msp';
|
117 |
}
|
118 |
-
if( empty( $_GET['slider_id'] )
|
|
|
|
|
119 |
$classes .= ' master-list';
|
120 |
}
|
121 |
return $classes;
|
115 |
if( ! empty( $_GET['page'] ) && MSWP_SLUG == $_GET['page'] ){
|
116 |
$classes .= ' msp';
|
117 |
}
|
118 |
+
if( empty( $_GET['slider_id'] ) ||
|
119 |
+
( ! empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'duplicate', 'delete' ) ) )
|
120 |
+
){
|
121 |
$classes .= ' master-list';
|
122 |
}
|
123 |
return $classes;
|
admin/views/index.php
CHANGED
@@ -21,7 +21,7 @@ function msp_thankyou_footer() {
|
|
21 |
__('If you like %sMaster Slider%s and want to support us, please rate us %s ★★★★★ %s, that is a huge help!', 'master-slider' ),
|
22 |
'<a href="http://masterslider.com/?msl" title="Version ' . MSWP_AVERTA_VERSION . '" target="_blank">',
|
23 |
'</a>',
|
24 |
-
'<a href="https://wordpress.org/support/view/plugin-reviews/master-slider/?filter=5#
|
25 |
'</a>'
|
26 |
);
|
27 |
|
21 |
__('If you like %sMaster Slider%s and want to support us, please rate us %s ★★★★★ %s, that is a huge help!', 'master-slider' ),
|
22 |
'<a href="http://masterslider.com/?msl" title="Version ' . MSWP_AVERTA_VERSION . '" target="_blank">',
|
23 |
'</a>',
|
24 |
+
'<a href="https://wordpress.org/support/view/plugin-reviews/master-slider/?filter=5#new-post" target="_blank">',
|
25 |
'</a>'
|
26 |
);
|
27 |
|
admin/views/setting/class-msp-settings.php
CHANGED
@@ -21,7 +21,7 @@ class MSP_Settings {
|
|
21 |
add_action( 'admin_init', array( $this, 'admin_init' ) );
|
22 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 11 );
|
23 |
add_action( 'admin_action_msp_envato_license', array( $this, 'envato_license_updated' ) );
|
24 |
-
|
25 |
add_action( 'admin_footer-master-slider_page_masterslider-setting', array( $this, 'print_setting_script' ) );
|
26 |
add_filter( 'axiom_wedev_setting_section_submit_button', array( $this, 'section_submit_button' ), 10, 2 );
|
27 |
}
|
@@ -53,7 +53,7 @@ class MSP_Settings {
|
|
53 |
function section_submit_button( $button_markup, $section ){
|
54 |
if( isset( $section['id'] ) && 'msp_envato_license' == $section['id'] ){
|
55 |
$is_license_actived = get_option( MSWP_SLUG . '_is_license_actived', 0 );
|
56 |
-
return sprintf( '<a id="validate_envato_license" class="button button-primary button-large" data-activate="%1$s" data-isactive="%3$d" data-deactivate="%2$s" data-validation="%4$s" >%1$s</a>%5$s',
|
57 |
__( 'Activate License', 'master-slider' ), __( 'Deactivate License', 'master-slider' ), (int)$is_license_actived,
|
58 |
__( 'Validating ..', 'master-slider' ), '<div class="msp-msg-nag">is not actived</div>' );
|
59 |
}
|
@@ -62,7 +62,7 @@ class MSP_Settings {
|
|
62 |
|
63 |
|
64 |
function admin_menu() {
|
65 |
-
|
66 |
add_submenu_page(
|
67 |
MSWP_SLUG,
|
68 |
__( 'Settings' , 'master-slider' ),
|
@@ -75,7 +75,7 @@ class MSP_Settings {
|
|
75 |
|
76 |
function get_settings_sections() {
|
77 |
$sections = array(
|
78 |
-
|
79 |
array(
|
80 |
'id' => 'msp_general_setting',
|
81 |
'title' => __( 'General Settings', 'master-slider' )
|
@@ -101,9 +101,9 @@ class MSP_Settings {
|
|
101 |
* @return array settings fields
|
102 |
*/
|
103 |
function get_settings_fields() {
|
104 |
-
|
105 |
$settings_fields = array();
|
106 |
-
|
107 |
$settings_fields['msp_general_setting'] = array(
|
108 |
array(
|
109 |
'name' => 'hide_info_table',
|
@@ -136,14 +136,32 @@ class MSP_Settings {
|
|
136 |
)
|
137 |
);
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
return $settings_fields;
|
149 |
}
|
@@ -177,7 +195,7 @@ class MSP_Settings {
|
|
177 |
|
178 |
/**
|
179 |
* This code uses localstorage for displaying active tabs
|
180 |
-
*
|
181 |
*/
|
182 |
function print_setting_script() {
|
183 |
?>
|
@@ -204,4 +222,4 @@ class MSP_Settings {
|
|
204 |
|
205 |
endif;
|
206 |
|
207 |
-
$settings = new MSP_Settings();
|
21 |
add_action( 'admin_init', array( $this, 'admin_init' ) );
|
22 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 11 );
|
23 |
add_action( 'admin_action_msp_envato_license', array( $this, 'envato_license_updated' ) );
|
24 |
+
|
25 |
add_action( 'admin_footer-master-slider_page_masterslider-setting', array( $this, 'print_setting_script' ) );
|
26 |
add_filter( 'axiom_wedev_setting_section_submit_button', array( $this, 'section_submit_button' ), 10, 2 );
|
27 |
}
|
53 |
function section_submit_button( $button_markup, $section ){
|
54 |
if( isset( $section['id'] ) && 'msp_envato_license' == $section['id'] ){
|
55 |
$is_license_actived = get_option( MSWP_SLUG . '_is_license_actived', 0 );
|
56 |
+
return sprintf( '<a id="validate_envato_license" class="button button-primary button-large" data-activate="%1$s" data-isactive="%3$d" data-deactivate="%2$s" data-validation="%4$s" >%1$s</a>%5$s',
|
57 |
__( 'Activate License', 'master-slider' ), __( 'Deactivate License', 'master-slider' ), (int)$is_license_actived,
|
58 |
__( 'Validating ..', 'master-slider' ), '<div class="msp-msg-nag">is not actived</div>' );
|
59 |
}
|
62 |
|
63 |
|
64 |
function admin_menu() {
|
65 |
+
|
66 |
add_submenu_page(
|
67 |
MSWP_SLUG,
|
68 |
__( 'Settings' , 'master-slider' ),
|
75 |
|
76 |
function get_settings_sections() {
|
77 |
$sections = array(
|
78 |
+
|
79 |
array(
|
80 |
'id' => 'msp_general_setting',
|
81 |
'title' => __( 'General Settings', 'master-slider' )
|
101 |
* @return array settings fields
|
102 |
*/
|
103 |
function get_settings_fields() {
|
104 |
+
|
105 |
$settings_fields = array();
|
106 |
+
|
107 |
$settings_fields['msp_general_setting'] = array(
|
108 |
array(
|
109 |
'name' => 'hide_info_table',
|
136 |
)
|
137 |
);
|
138 |
|
139 |
+
// AB test the pro features in setting pro tab
|
140 |
+
if( 1 == get_option( 'master-slider_ab_pro_feature_setting_content_type', 2 ) ){
|
141 |
+
|
142 |
+
$settings_fields['upgrade_to_pro'] = array(
|
143 |
+
array(
|
144 |
+
'name' => 'upgrade_text',
|
145 |
+
'desc' => __( 'Upgrade to Pro version to unlock more features!', 'master-slider' ) . sprintf( ' <a href="http://avt.li/mslset" target="_blank">%s</a>', __( 'Checkout the list of features ..', 'master-slider' ) ),
|
146 |
+
'type' => 'plain_text',
|
147 |
+
'label'=> __( 'Need more features?', 'master-slider' )
|
148 |
+
)
|
149 |
+
);
|
150 |
+
|
151 |
+
} else {
|
152 |
+
|
153 |
+
$settings_fields['upgrade_to_pro'] = array(
|
154 |
+
array(
|
155 |
+
'name' => 'upgrade_text',
|
156 |
+
'desc' => '<a href="http://avt.li/mslset2" target="_blank"><img src="'. MSWP_AVERTA_ADMIN_URL .'/assets/images/thirdparty/pro-tab-setting.png" /></a>',
|
157 |
+
'type' => 'plain_text',
|
158 |
+
'label'=> ''
|
159 |
+
)
|
160 |
+
);
|
161 |
+
echo '<style>#upgrade_to_pro form h2,#upgrade_to_pro form .submit { display:none; }</style>';
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
|
166 |
return $settings_fields;
|
167 |
}
|
195 |
|
196 |
/**
|
197 |
* This code uses localstorage for displaying active tabs
|
198 |
+
*
|
199 |
*/
|
200 |
function print_setting_script() {
|
201 |
?>
|
222 |
|
223 |
endif;
|
224 |
|
225 |
+
$settings = new MSP_Settings();
|
admin/views/slider-dashboard/list-sliders.php
CHANGED
@@ -177,11 +177,11 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
|
|
177 |
?>
|
178 |
|
179 |
<div id="smd-modal-1" class="aux-smd-modal aux-smd-show">
|
180 |
-
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/assets/images/thirdparty/phlox-popup.
|
181 |
<a href="#" class="aux-smd-close" title="Close"></a>
|
182 |
<div class="msp-ad-btns-container">
|
183 |
-
<a href="http://avt.li/phmslpu" class="msp-ad-btn aux-md-get-now"
|
184 |
-
<a href="?page=master-slider&dismiss_phlox_notice=1" class="msp-ad-btn aux-md-try-later"
|
185 |
</div>
|
186 |
</div>
|
187 |
|
177 |
?>
|
178 |
|
179 |
<div id="smd-modal-1" class="aux-smd-modal aux-smd-show">
|
180 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/assets/images/thirdparty/phlox-popup.png" />
|
181 |
<a href="#" class="aux-smd-close" title="Close"></a>
|
182 |
<div class="msp-ad-btns-container">
|
183 |
+
<a href="http://avt.li/phmslpu" class="msp-ad-btn aux-md-get-now"><?php _e( 'Get it Now', MSWP_TEXT_DOMAIN ); ?></a>
|
184 |
+
<a href="?page=master-slider&dismiss_phlox_notice=1" class="msp-ad-btn aux-md-try-later"><?php _e( 'Remind Me Later', MSWP_TEXT_DOMAIN ); ?></a>
|
185 |
</div>
|
186 |
</div>
|
187 |
|
admin/views/slider-panel/css/msp-style.css
CHANGED
@@ -2357,3 +2357,270 @@ button.msp-tempalte-save {
|
|
2357 |
}
|
2358 |
|
2359 |
.msp-pattern-prev.ms-pattern:hover{border-color: #B3B3B3;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2357 |
}
|
2358 |
|
2359 |
.msp-pattern-prev.ms-pattern:hover{border-color: #B3B3B3;}
|
2360 |
+
|
2361 |
+
/* ------------------------------------------------------------------
|
2362 |
+
New pro tab styles
|
2363 |
+
*/
|
2364 |
+
|
2365 |
+
@import url('//fonts.googleapis.com/css?family=Open+Sans:400,600,700,800');
|
2366 |
+
|
2367 |
+
.msp-metabox-row.msp-new-pro-tab {
|
2368 |
+
margin: 0;
|
2369 |
+
clear: both;
|
2370 |
+
text-align: center;
|
2371 |
+
font-family: 'Open Sans', sans-serif;
|
2372 |
+
}
|
2373 |
+
|
2374 |
+
.msp-new-pro-tab .msp-content-wrapper {
|
2375 |
+
width: 750px;
|
2376 |
+
margin: 0 auto;
|
2377 |
+
}
|
2378 |
+
|
2379 |
+
.msp-new-pro-tab h1 {
|
2380 |
+
font-size: 45px;
|
2381 |
+
font-weight: 600;
|
2382 |
+
color: #fff;
|
2383 |
+
}
|
2384 |
+
|
2385 |
+
.msp-new-pro-tab h2 {
|
2386 |
+
font-size: 30px;
|
2387 |
+
font-weight: 400;
|
2388 |
+
color: #fff;
|
2389 |
+
}
|
2390 |
+
|
2391 |
+
.msp-new-pro-tab h3 {
|
2392 |
+
color: #464646;
|
2393 |
+
text-align: center;
|
2394 |
+
font-size: 20px;
|
2395 |
+
font-weight: 700;
|
2396 |
+
}
|
2397 |
+
|
2398 |
+
.msp-new-pro-header {
|
2399 |
+
position: relative;
|
2400 |
+
background-color: #5B30D8;
|
2401 |
+
background-image: url('../images/pro-features/header.jpg') ;
|
2402 |
+
background-repeat: no-repeat;
|
2403 |
+
background-position: center bottom;
|
2404 |
+
}
|
2405 |
+
|
2406 |
+
.msp-new-pro-logo {
|
2407 |
+
padding-top: 70px;
|
2408 |
+
padding-bottom: 55px;
|
2409 |
+
background-image: url(../images/pro-features/header-logo.png);
|
2410 |
+
background-repeat: no-repeat;
|
2411 |
+
background-position: center 50px;
|
2412 |
+
}
|
2413 |
+
|
2414 |
+
.msp-new-pro-logo h2 {
|
2415 |
+
margin: 0px 0 15px 0;
|
2416 |
+
}
|
2417 |
+
|
2418 |
+
.msp-new-pro-headerBg {
|
2419 |
+
height: 506px;
|
2420 |
+
|
2421 |
+
}
|
2422 |
+
|
2423 |
+
.msp-new-pro-headerBg::after,
|
2424 |
+
.msp-new-pro-headerBg::before {
|
2425 |
+
content: "";
|
2426 |
+
position: absolute;
|
2427 |
+
bottom: 0;
|
2428 |
+
left: 50%;
|
2429 |
+
display: block;
|
2430 |
+
width: 50%;
|
2431 |
+
max-width: 940px;
|
2432 |
+
height: 520px;
|
2433 |
+
background: linear-gradient(to right, rgba(255, 255, 255, 0) 40% , #5b30d8 80%);
|
2434 |
+
}
|
2435 |
+
|
2436 |
+
.msp-new-pro-headerBg::before {
|
2437 |
+
left: auto;
|
2438 |
+
right: 50%;
|
2439 |
+
background: linear-gradient(to left, rgba(255, 255, 255, 0) 40% , #5b30d8 80%);
|
2440 |
+
}
|
2441 |
+
|
2442 |
+
|
2443 |
+
.msp-new-pro-headerBg p::before {
|
2444 |
+
content: "";
|
2445 |
+
background-image: url('../images/pro-features/package.png');
|
2446 |
+
background-repeat: no-repeat;
|
2447 |
+
display: inline-block;
|
2448 |
+
width: 22px;
|
2449 |
+
height: 23px;
|
2450 |
+
padding-right: 7px;
|
2451 |
+
position: relative;
|
2452 |
+
top: 4px;
|
2453 |
+
}
|
2454 |
+
|
2455 |
+
.msp-new-pro-headerBg p {
|
2456 |
+
color: #fff;
|
2457 |
+
font-weight: 600;
|
2458 |
+
font-size: 14px;
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
.msp-new-pro-features {
|
2462 |
+
padding: 42px 0;
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
.msp-new-pro-features p {
|
2466 |
+
font-size: 16px;
|
2467 |
+
color: #444;
|
2468 |
+
padding-bottom: 35px;
|
2469 |
+
|
2470 |
+
}
|
2471 |
+
|
2472 |
+
.msp-new-pro-flex-container {
|
2473 |
+
left: 15px;
|
2474 |
+
position: relative;
|
2475 |
+
}
|
2476 |
+
|
2477 |
+
.msp-new-pro-avatar {
|
2478 |
+
margin-top: 15px;
|
2479 |
+
}
|
2480 |
+
|
2481 |
+
.msp-new-pro-flex-container::after {
|
2482 |
+
content: "";
|
2483 |
+
display: table;
|
2484 |
+
clear: both;
|
2485 |
+
}
|
2486 |
+
|
2487 |
+
.msp-new-pro-features-items {
|
2488 |
+
float: left;
|
2489 |
+
width: 33.3333%;
|
2490 |
+
text-align: left;
|
2491 |
+
font-size: 16px;
|
2492 |
+
line-height: 1.4em;
|
2493 |
+
}
|
2494 |
+
|
2495 |
+
.msp-new-pro-features-items li::before {
|
2496 |
+
content: "";
|
2497 |
+
background-image: url('../images/pro-features/check.png');
|
2498 |
+
background-repeat: no-repeat;
|
2499 |
+
display: inline-block;
|
2500 |
+
width: 18px;
|
2501 |
+
height: 18px;
|
2502 |
+
padding-right: 5px;
|
2503 |
+
vertical-align: inherit;
|
2504 |
+
position: relative;
|
2505 |
+
top: 3px;
|
2506 |
+
}
|
2507 |
+
|
2508 |
+
.msp-new-pro-testimonials {
|
2509 |
+
background-color: #F3F3F3;
|
2510 |
+
padding: 42px 0 53px 0;
|
2511 |
+
}
|
2512 |
+
|
2513 |
+
.msp-new-pro-testimonials h3 {
|
2514 |
+
margin-bottom: 50px;
|
2515 |
+
}
|
2516 |
+
|
2517 |
+
.msp-new-pro-testimonials h4 {
|
2518 |
+
font-size: 15px;
|
2519 |
+
font-weight: 600;
|
2520 |
+
color: #444;
|
2521 |
+
line-height: normal;
|
2522 |
+
margin-top: 10px;
|
2523 |
+
margin-bottom: 5px;
|
2524 |
+
}
|
2525 |
+
|
2526 |
+
.msp-new-pro-testimonials h4 span {
|
2527 |
+
font-size: 14px;
|
2528 |
+
font-weight: 600;
|
2529 |
+
font-style: italic;
|
2530 |
+
line-height: 0;
|
2531 |
+
color: #a7a7a7;
|
2532 |
+
}
|
2533 |
+
|
2534 |
+
.msp-new-pro-testimonials p {
|
2535 |
+
font-size: 16px;
|
2536 |
+
color: #444;
|
2537 |
+
margin-bottom: 0px;
|
2538 |
+
}
|
2539 |
+
|
2540 |
+
|
2541 |
+
.msp-new-pro-testimonials .msp-metabox-tabs {
|
2542 |
+
background: transparent;
|
2543 |
+
margin-bottom: 0;
|
2544 |
+
padding-bottom: 0;
|
2545 |
+
}
|
2546 |
+
|
2547 |
+
.msp-new-pro-testimonials .msp-metabox-tabs .tabs {
|
2548 |
+
text-align: center;
|
2549 |
+
margin-top: 10px;
|
2550 |
+
}
|
2551 |
+
|
2552 |
+
.msp-new-pro-testimonials .msp-metabox-tabs .tabs li {
|
2553 |
+
float: none;
|
2554 |
+
display: inline-block;
|
2555 |
+
}
|
2556 |
+
|
2557 |
+
.msp-new-pro-testimonials .msp-metabox-tabs .tabs li a {
|
2558 |
+
width: 8px;
|
2559 |
+
height: 8px;
|
2560 |
+
border: solid 1px #333;
|
2561 |
+
padding: 0;
|
2562 |
+
margin-right: 2px;
|
2563 |
+
margin-top: 10px;
|
2564 |
+
border-radius: 50%;
|
2565 |
+
background: white;
|
2566 |
+
}
|
2567 |
+
|
2568 |
+
.msp-new-pro-testimonials .msp-metabox-tabs .tabs li.active a {
|
2569 |
+
background: #333;
|
2570 |
+
}
|
2571 |
+
|
2572 |
+
.msp-new-pro-guarantee {
|
2573 |
+
background-color: #839fcb;
|
2574 |
+
text-align: left;
|
2575 |
+
color: #fff;
|
2576 |
+
padding: 72px 0 70px 70px;
|
2577 |
+
}
|
2578 |
+
|
2579 |
+
.msp-new-pro-guarantee h3 {
|
2580 |
+
color: #fff;
|
2581 |
+
text-align: left;
|
2582 |
+
margin: 0 auto;
|
2583 |
+
font-weight: 700;
|
2584 |
+
margin-bottom: 10px;
|
2585 |
+
}
|
2586 |
+
|
2587 |
+
.msp-new-pro-guarantee p {
|
2588 |
+
font-size: 16px;
|
2589 |
+
font-weight: 400;
|
2590 |
+
margin: 0 auto;
|
2591 |
+
}
|
2592 |
+
|
2593 |
+
.msp-new-pro-guarantee img {
|
2594 |
+
float: left;
|
2595 |
+
padding-right: 32px;
|
2596 |
+
}
|
2597 |
+
|
2598 |
+
.msp-new-pro-buy {
|
2599 |
+
background-color: #444;
|
2600 |
+
padding: 60px 0;
|
2601 |
+
}
|
2602 |
+
|
2603 |
+
.msp-new-pro-buy h2 {
|
2604 |
+
margin: 0 0 40px 0px;
|
2605 |
+
font-size: 25px;
|
2606 |
+
color: white;
|
2607 |
+
font-weight: 500;
|
2608 |
+
}
|
2609 |
+
|
2610 |
+
.msp-new-pro-btn {
|
2611 |
+
display: inline-block;
|
2612 |
+
padding: 13px 34px;
|
2613 |
+
background: #1FC896;
|
2614 |
+
color: #fff;
|
2615 |
+
font-size: 18px;
|
2616 |
+
font-weight: 700;
|
2617 |
+
line-height: 35px;
|
2618 |
+
border-radius: 5em;
|
2619 |
+
}
|
2620 |
+
|
2621 |
+
.msp-new-pro-btn:hover,
|
2622 |
+
.msp-new-pro-btn:active {
|
2623 |
+
background: #22a96e;
|
2624 |
+
color: white;
|
2625 |
+
}
|
2626 |
+
|
admin/views/slider-panel/images/pro-features/admin-area/layers.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/style-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/templates.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/button-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/layers.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/sample-sliders.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/style-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/transition-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/style-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/button-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/layers.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/sample-sliders.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/style-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/transition-editor.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/badge.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/check.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/header-logo.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/header.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/package.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/rate.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/sample-sliders.jpg
CHANGED
Binary file
|
admin/views/slider-panel/images/pro-features/testimonials/captial-themes.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/testimonials/goodlayers.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/testimonials/massImpressions.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/testimonials/pabloegrande.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/testimonials/pixflow.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/testimonials/theorian.jpg
ADDED
Binary file
|
admin/views/slider-panel/index.php
CHANGED
@@ -69,6 +69,153 @@
|
|
69 |
{{/if}}
|
70 |
</script>
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
<script type="text/x-handlebars" id="pro-features">
|
73 |
{{#meta-box title="Upgrade Master Slider to PRO"}}
|
74 |
<div class="msp-metabox-row msp-pro-tab">
|
@@ -160,6 +307,10 @@
|
|
160 |
{{/meta-box}}
|
161 |
</script>
|
162 |
|
|
|
|
|
|
|
|
|
163 |
<!-- Slider Settings Page -->
|
164 |
<script type="text/x-handlebars" id="settings">
|
165 |
|
@@ -343,6 +494,7 @@
|
|
343 |
|
344 |
{{/meta-box}}
|
345 |
</script>
|
|
|
346 |
<!-- Slides Page -->
|
347 |
<script type="text/x-handlebars" id="slides">
|
348 |
{{#if customSlider}}
|
@@ -357,6 +509,7 @@
|
|
357 |
{{/if}}
|
358 |
{{/if}}
|
359 |
</script>
|
|
|
360 |
<!-- Slide Settings Partial -->
|
361 |
<script type="text/x-handlebars" id="slide-settings">
|
362 |
|
69 |
{{/if}}
|
70 |
</script>
|
71 |
|
72 |
+
<?php
|
73 |
+
/**
|
74 |
+
* Display the new or previous type of pro tab paged
|
75 |
+
* Valid numbers for $pro_content_type are: 1, 2
|
76 |
+
*/
|
77 |
+
$pro_content_type = get_option( 'master-slider_ab_pro_feature_panel_content_type', 1 );
|
78 |
+
// ab testing check
|
79 |
+
if( 2 == $pro_content_type ){
|
80 |
+
?>
|
81 |
+
|
82 |
+
<script type="text/x-handlebars" id="pro-features">
|
83 |
+
{{#meta-box title="Upgrade to Master Slider Pro Edition"}}
|
84 |
+
<div class="msp-metabox-row msp-new-pro-tab">
|
85 |
+
<div class="msp-new-pro-header">
|
86 |
+
<div class="msp-content-wrapper">
|
87 |
+
<div class="msp-new-pro-logo">
|
88 |
+
<h2>Boost Your Creativity by</h2>
|
89 |
+
<h1> Master Slider PRO</h1>
|
90 |
+
</div>
|
91 |
+
<div class="msp-new-pro-headerBg">
|
92 |
+
<p>BUNDLED WITH 70+ PREBUILT PREMIUM STARTER SLIDERS</p>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
<div class="msp-new-pro-features">
|
97 |
+
<div class="msp-content-wrapper">
|
98 |
+
<h3>What's Included in Pro Edition?</h3>
|
99 |
+
<p>You will have access to tons of premium features which help you to create professional looking sliders with ease. Some of the remarkable features:</p>
|
100 |
+
|
101 |
+
<div class="msp-new-pro-flex-container">
|
102 |
+
<div class="msp-new-pro-features-items">
|
103 |
+
<ul>
|
104 |
+
<li>
|
105 |
+
70+ Starter Sliders
|
106 |
+
</li>
|
107 |
+
<li>
|
108 |
+
Animated Layers
|
109 |
+
</li>
|
110 |
+
<li>
|
111 |
+
Parallax Effect
|
112 |
+
</li>
|
113 |
+
<li>
|
114 |
+
Fullscreen Layout
|
115 |
+
</li>
|
116 |
+
</ul>
|
117 |
+
</div>
|
118 |
+
<div class="msp-new-pro-features-items">
|
119 |
+
<ul>
|
120 |
+
<li>
|
121 |
+
8+ Slide Transitions
|
122 |
+
</li>
|
123 |
+
<li>
|
124 |
+
Post Slider
|
125 |
+
</li>
|
126 |
+
<li>
|
127 |
+
Facebook and Flickr Slider
|
128 |
+
</li>
|
129 |
+
<li>
|
130 |
+
WooCommerce Slider
|
131 |
+
</li>
|
132 |
+
</ul>
|
133 |
+
</div>
|
134 |
+
<div class="msp-new-pro-features-items">
|
135 |
+
<ul>
|
136 |
+
<li>
|
137 |
+
Video Background
|
138 |
+
</li>
|
139 |
+
<li>
|
140 |
+
Hotspots and Tooltips
|
141 |
+
</li>
|
142 |
+
<li>
|
143 |
+
Custom Slider Templates
|
144 |
+
</li>
|
145 |
+
<li>
|
146 |
+
Dedicated Support
|
147 |
+
</li>
|
148 |
+
</ul>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
|
154 |
+
<div class="msp-new-pro-testimonials">
|
155 |
+
<div class="msp-content-wrapper">
|
156 |
+
<h3>What Others Say</h3>
|
157 |
+
{{#tabs-panel}}
|
158 |
+
<ul class="tabs-content">
|
159 |
+
<li id="s1">
|
160 |
+
<p>We cannot believe how simple is using MasterSlider! The interface is so simple, easy to use and extraordinary intuitive. The sample sliders library and auto importing feature was our dream that came true by you guys! The documentation, video tutorials and variety of options for customizing everything was totally beyond our expectation! You really nailed it!</p>
|
161 |
+
<img class="msp-new-pro-avatar" src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/testimonials/pixflow.png" alt="">
|
162 |
+
<h4>PixFlow<br><span>WordPress Theme Author</span></h4>
|
163 |
+
</li>
|
164 |
+
<li id="s2">
|
165 |
+
<p>The best user experience I have ever had so far with a slideshow plugin for WordPress so far. Easy to learn, easy to set up, lots of predefined slides, fast growing, soon coming updates, lots of great features, I can go on for days and days about it, easily the best money I have spent on a project.</p>
|
166 |
+
<img class="msp-new-pro-avatar" src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/testimonials/captial-themes.jpg" alt="">
|
167 |
+
<h4>Capital Themes<br><span>WordPress Theme Author</span></h4>
|
168 |
+
</li>
|
169 |
+
<li id="s3">
|
170 |
+
<p>I've used all the best selling sliders and whilst you can achieve great things with them, I've always struggled when I pass the site over to a client. They are inundated with confusing interfaces. Master slider changes all that. I honestly feel I could give this to any of my clients and within minutes, they would be building their own sliders. I am going back over previous sites and swapping out revolution slider, with a big smile on my face. Thank you.</p>
|
171 |
+
<img class="msp-new-pro-avatar" src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/testimonials/massImpressions.png" alt="">
|
172 |
+
<h4>MassImpressions<br><span>Web Design Agency</span></h4>
|
173 |
+
</li>
|
174 |
+
<li id="s4">
|
175 |
+
<p>I've used all sliders available to WordPress and this is by far the easiest to use and with the best results.</p>
|
176 |
+
<img class="msp-new-pro-avatar" src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/testimonials/theorian.jpg" alt="">
|
177 |
+
<h4>TheOrian82</h4>
|
178 |
+
</li>
|
179 |
+
<li id="s5">
|
180 |
+
<p>Excellent plugin. Siemple and easy to use and understand. It offers freedom to configure. Highly recommended!</p>
|
181 |
+
<img class="msp-new-pro-avatar" src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/testimonials/pabloegrande.jpg" alt="">
|
182 |
+
<h4>Pabloegrande</h4>
|
183 |
+
</li>
|
184 |
+
</ul>
|
185 |
+
<ul class="tabs">
|
186 |
+
<li class="active"><a href="#s1"></a></li>
|
187 |
+
<li><a href="#s2"></a></li>
|
188 |
+
<li><a href="#s3"></a></li>
|
189 |
+
<li><a href="#s4"></a></li>
|
190 |
+
<li><a href="#s5"></a></li>
|
191 |
+
</ul>
|
192 |
+
{{/tabs-panel}}
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
|
196 |
+
<div class="msp-new-pro-guarantee">
|
197 |
+
<div class="msp-content-wrapper">
|
198 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/badge.png" alt="">
|
199 |
+
<h3>10-Day Money Back Guarantee</h3>
|
200 |
+
<p>To ensure your satisfaction, we offer 10 days money back guarantee with your purchase if you are not satisfied with Master Slider Pro, we kindly refund 100% of your money without any condition!</p>
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
+
|
204 |
+
<div class="msp-new-pro-buy">
|
205 |
+
<div class="msp-content-wrapper">
|
206 |
+
<h2>Join the <?php echo msp_get_pro_users_num(); ?> Pro users today!</h2>
|
207 |
+
<a href="http://avt.li/mspnpt" target="_blank" class="msp-new-pro-btn" target="_blank">Get a License Instantly</a>
|
208 |
+
</div>
|
209 |
+
</div>
|
210 |
+
|
211 |
+
</div>
|
212 |
+
{{/meta-box}}
|
213 |
+
</script>
|
214 |
+
|
215 |
+
<?php
|
216 |
+
} else {
|
217 |
+
?>
|
218 |
+
|
219 |
<script type="text/x-handlebars" id="pro-features">
|
220 |
{{#meta-box title="Upgrade Master Slider to PRO"}}
|
221 |
<div class="msp-metabox-row msp-pro-tab">
|
307 |
{{/meta-box}}
|
308 |
</script>
|
309 |
|
310 |
+
<?php
|
311 |
+
}
|
312 |
+
?>
|
313 |
+
|
314 |
<!-- Slider Settings Page -->
|
315 |
<script type="text/x-handlebars" id="settings">
|
316 |
|
494 |
|
495 |
{{/meta-box}}
|
496 |
</script>
|
497 |
+
|
498 |
<!-- Slides Page -->
|
499 |
<script type="text/x-handlebars" id="slides">
|
500 |
{{#if customSlider}}
|
509 |
{{/if}}
|
510 |
{{/if}}
|
511 |
</script>
|
512 |
+
|
513 |
<!-- Slide Settings Partial -->
|
514 |
<script type="text/x-handlebars" id="slide-settings">
|
515 |
|
admin/views/slider-panel/js/masterslider.wp.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Panel
|
3 |
-
* Copyright ©
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
* @version 2.50.3
|
7 |
-
* @date
|
8 |
*/
|
9 |
window.MSPanel=Ember.Application.create({rootElement:"#msp-root"}),MSPanel.version="2.50.3",MSPanel.SliderID=parseQueryString(window.location.search).slider_id||__MSP_SLIDER_ID||"100",MSPanel.SliderSlug=__MSP_SLIDER_ALIAS||"ms-"+MSPanel.SliderID,MSPanel.dependedControllers=[],String.prototype.jfmt=function(){return"".fmt.apply(this.replace(/%s|%d/,"%@"),arguments)},window.$=jQuery.noConflict(),jQuery.ui.dialog.prototype._focusTabbable=function(){},MSPanel.Router.map(function(){this.resource("settings"),this.resource("slides",{path:"/"}),this.resource("controls"),this.resource("callbacks"),this.resource("error"),this.resource("pro-features")}),MSPanel.Router.reopen({location:"none"}),MSPanel.ApplicationRoute=Ember.Route.extend({model:function(){var setting=MSPanel.Settings.find();0===setting.get("length")&&MSPanel.Settings.create().save()}}),MSPanel.SettingsRoute=Ember.Route.extend({model:function(){return MSPanel.Settings.find(1)},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),MSPanel.SlidesRoute=Ember.Route.extend({model:function(){return MSPanel.Slide.find()},setupController:function(controller,model){controller.set("model",model),controller.set("sliderSettings",MSPanel.Settings.find(1)),controller.setup()}}),MSPanel.ControlsRoute=Ember.Route.extend({model:function(){return MSPanel.Control.find()},setupController:function(controller,model){controller.set("model",model),controller.setup(),this.activate()},activate:function(){var controller=this.get("controller");controller&&controller.set("controlOptions","empty-template")}}),MSPanel.CallbacksRoute=Ember.Route.extend({model:function(){return MSPanel.Callback.find()},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),function(){var attr=Ember.attr,hasMany=Ember.hasMany,belongsTo=Ember.belongsTo,regp=/https\:|http\:/,WPPath={serialize:function(path){return void 0==path?path:regp.test(path)?path.replace(__MS.upload_dir,""):path.replace("/wp-content/uploads","")},deserialize:function(path){return void 0==path?path:regp.test(path)?path:__MS.upload_dir+path}},defaults=window.__MSP_DEF_OPTIONS||{};MSPanel.Settings=Ember.Model.extend({id:attr("number"),snapping:attr("boolean",{defaultValue:!0}),bgImageThumb:attr(WPPath),disableControls:attr("boolean",{defaultValue:!1}),name:attr("string",{defaultValue:__MSP_LAN.sm_001}),slug:attr("string"),width:attr("number",{defaultValue:defaults.width||1e3}),height:attr("number",{defaultValue:defaults.height||500}),wrapperWidth:attr("number"),minHeight:attr("number"),wrapperWidthUnit:attr("string",{defaultValue:"px"}),autoCrop:attr("boolean",{defaultValue:defaults.autoCrop||!1}),type:attr("string"),sliderId:attr("string"),autofillTarget:attr("string"),enableOverlayLayers:attr("boolean",{defaultValue:defaults.enableOverlayLayers||!0}),layout:attr("string",{defaultValue:defaults.layout||"boxed"}),autoHeight:attr("boolean",{defaultValue:defaults.autoHeight||!1}),trView:attr("string",{defaultValue:defaults.transition||"basic"}),speed:attr("number",{defaultValue:defaults.speed||20}),space:attr("number",{defaultValue:defaults.space||0}),start:attr("number",{defaultValue:defaults.start}),grabCursor:attr("boolean",{defaultValue:defaults.grabCursor}),swipe:attr("boolean",{defaultValue:defaults.swipe}),mouse:attr("boolean",{defaultValue:defaults.mouse}),wheel:attr("boolean",{defaultValue:defaults.wheel}),keyboard:attr("boolean",{defaultValue:defaults.keyboard}),autoplay:attr("boolean",{defaultValue:defaults.autoplay}),loop:attr("boolean",{defaultValue:defaults.loop}),shuffle:attr("boolean",{defaultValue:defaults.shuffle}),preload:attr("string",{defaultValue:defaults.preload}),overPause:attr("boolean",{defaultValue:defaults.overPause}),endPause:attr("boolean",{defaultValue:defaults.endPause}),hideLayers:attr("boolean",{defaultValue:defaults.hideLayers}),dir:attr("string",{defaultValue:defaults.dir}),parallaxMode:attr("srting",{defaultValue:defaults.parallaxMode}),useDeepLink:attr("string",{defaultValue:!1}),deepLink:attr("string"),deepLinkType:attr("string",{defaultValue:"path"}),mobileBGVideo:attr("boolean",{defaultValue:defaults.mobileBGVideo}),startOnAppear:attr("boolean",{defaultValue:defaults.startOnAppear}),scrollParallax:attr("boolean"),scrollParallaxMove:attr("number",{defaultValue:30}),scrollParallaxBGMove:attr("number",{defaultValue:50}),scrollParallaxFade:attr("boolean",{defaultValue:!0}),centerControls:attr("boolean",{defaultValue:defaults.centerControls}),instantShowLayers:attr("boolean",{defaultValue:defaults.instantShowLayers}),fullscreenMargin:attr("number"),inlineStyle:attr("string"),className:attr("string",{defaultValue:defaults.className}),bgColor:attr("string"),bgImage:attr(WPPath),customStyle:attr("string"),skin:attr("string",{defaultValue:defaults.skin}),msTemplate:attr("string",{defaultValue:"custom"}),msTemplateClass:attr("string",{defaultValue:""}),usedFonts:attr("string"),fbtoken:attr("string"),apiKey:attr("string"),setId:attr("string"),setType:attr("string"),imgCount:attr("number"),thumbSize:attr("srting"),imgSize:attr("string"),postType:attr("string"),postCats:attr(Array),postTags:attr(Array),postCount:attr("number"),postImageType:attr("string"),postOrder:attr("string"),postOrderDir:attr("string"),postExcerptLen:attr("number"),postExcludeIds:attr("string"),postExcludeNoImg:attr("boolean"),postIncludeIds:attr("string"),postOffset:attr("number"),postLinkSlide:attr("boolean"),postLinkTarget:attr("string"),postSlideBg:attr("string"),postSlideBgthumb:attr("string"),wcOnlyInstock:attr("boolean"),wcOnlyFeatured:attr("boolean"),wcOnlyOnsale:attr("boolean")}),MSPanel.Slide=Ember.Model.extend({id:attr("number"),timeline_h:attr("number",{defaultValue:200}),bgThumb:attr(WPPath),thumbOrginal:attr(WPPath),isOverlayLayers:attr("boolean",{defaultValue:!1}),order:attr("number"),ishide:attr("boolean"),bg:attr(WPPath),duration:attr("number",{defaultValue:defaults.duration||3}),msId:attr("string"),fillMode:attr("string",{defaultValue:defaults.slideFillMode||"fill"}),thumb:attr(WPPath),info:attr("string"),link:attr("string"),linkTarget:attr("string"),linkTitle:attr("string"),linkRel:attr("string"),linkClass:attr("string"),linkId:attr("string"),video:attr("string"),bgColor:attr("string"),autoplayVideo:attr("boolean"),pattern:attr("string"),colorOverlay:attr("string"),bgv_mp4:attr("string"),bgv_ogg:attr("string"),bgv_webm:attr("string"),bgv_fillmode:attr("string",{defaultValue:defaults.sliderVideoFillMode||"fill"}),bgv_loop:attr("boolean",{defaultValue:defaults.slideVideoLoop}),bgv_mute:attr("boolean",{defaultValue:defaults.slideVideoMute}),bgv_autopause:attr("boolean",{defaultValue:defaults.slideVideoAutopause}),cssId:attr("string"),cssClass:attr("string"),bgAlt:attr("string"),bgTitle:attr("string"),layers:hasMany("MSPanel.Layer",{key:"layer_ids"})}),MSPanel.Layer=Ember.Model.extend({id:attr("number"),name:attr("string"),isLocked:attr("boolean",{defaultValue:!1}),isHided:attr("boolean",{defaultValue:!1}),isSoloed:attr("boolean",{defaultValue:!1}),slide:belongsTo("MSPanel.Slide",{key:"slide"}),styleModel:belongsTo("MSPanel.Style",{key:"styleModel",embedded:!1}),showEffect:belongsTo("MSPanel.Effect",{key:"showEffect",embedded:!1}),showTransform:attr("string",{defaultValue:""}),showOrigin:attr("string",{defaultValue:""}),showFade:attr("boolean",{defaultValue:!0}),hideEffect:belongsTo("MSPanel.Effect",{key:"hideEffect",embedded:!1}),hideTransform:attr("string",{defaultValue:""}),hideOrigin:attr("string",{defaultValue:""}),hideFade:attr("boolean",{defaultValue:!0}),imgThumb:attr(WPPath),stageOffsetX:attr("number",{defaultValue:0}),stageOffsetY:attr("number",{defaultValue:0}),order:attr("number"),type:attr("string"),position:attr("string",{defaultValue:"normal"}),msId:attr("string"),cssClass:attr("string"),cssId:attr("string"),title:attr("string"),rel:attr("string"),noSwipe:attr("string",{defaultValue:!1}),content:attr("string",{defaultValue:defaults.layerContent||"Lorem Ipsum"}),img:attr(WPPath),imgAlt:attr("string"),video:attr("string",{defaultValue:"http://player.vimeo.com/video/11721242"}),align:attr("string",{defaultValue:"top"}),useAction:attr("boolean",{defaultValue:!1}),action:attr("string"),toSlide:attr("number"),link:attr("string"),linkTarget:attr("string"),scrollDuration:attr("number",{defaultValue:2}),scrollTarget:attr("string"),actionTargetLayer:attr("string"),offsetX:attr("number",{defaultValue:0}),offsetY:attr("number",{defaultValue:0}),width:attr("number"),height:attr("number"),resize:attr("boolean",{defaultValue:!0}),fixed:attr("boolean",{defaultValue:!1}),widthlimit:attr("number",{defaultValue:"0"}),origin:attr("string",{defaultValue:"tl"}),stayHover:attr("boolean",{defaultValue:!0}),className:attr("string"),parallax:attr("string"),wait:attr("boolean",{defaultValue:defaults.layerWait}),masked:attr("boolean"),maskCustomSize:attr("boolean"),maskWidth:attr("number"),maskHeight:attr("number"),overlayTargetSlides:attr("string"),overlayTargetSlidesAction:attr("string",{defaultValue:"show"}),showDuration:attr("number",{defaultValue:1}),showDelay:attr("number",{defaultValue:0}),showEase:attr("string",{defaultValue:"easeOutQuint"}),showEffFunc:attr("string"),useHide:attr("boolean",{defaultValue:!1}),hideDuration:attr("number",{defaultValue:1}),hideDelay:attr("number",{defaultValue:1}),hideEase:attr("string",{defaultValue:"easeOutQuint"}),hideEffFunc:attr("string"),btnClass:attr("string",{defaultValue:"ms-btn ms-default-btn"}),autoplayVideo:attr("boolean")}),MSPanel.Style=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),className:attr("string"),backgroundColor:attr("string"),paddingTop:attr("number"),paddingRight:attr("number"),paddingBottom:attr("number"),paddingLeft:attr("number"),borderTop:attr("number"),borderRight:attr("number"),borderBottom:attr("number"),borderLeft:attr("number"),borderColor:attr("string"),borderRadius:attr("number"),borderStyle:attr("string"),fontFamily:attr("string"),fontWeight:attr("string",{defaultValue:"normal"}),fontSize:attr("number"),textAlign:attr("string"),letterSpacing:attr("number"),lineHeight:attr("string",{defaultValue:"normal"}),whiteSpace:attr("string"),color:attr("string"),custom:attr("string")}),MSPanel.PresetStyle=MSPanel.Style.extend({}),MSPanel.Effect=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),fade:attr("boolean",{defaultValue:!0}),translateX:attr("number"),translateY:attr("number"),translateZ:attr("number"),scaleX:attr("number"),scaleY:attr("number"),rotate:attr("number"),rotateX:attr("number"),rotateY:attr("number"),rotateZ:attr("number"),skewX:attr("number"),skewY:attr("number"),originX:attr("number"),originY:attr("number"),originZ:attr("number")}),MSPanel.PresetEffect=MSPanel.Effect.extend({}),MSPanel.Control=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),autoHide:attr("boolean",{defaultValue:!0}),overVideo:attr("boolean",{defaultValue:!0}),cssClass:attr("string"),cssId:attr("string"),margin:attr("number"),dir:attr("string"),color:attr("string"),radius:attr("number"),stroke:attr("number"),speed:attr("number"),space:attr("number"),type:attr("string"),insertThumb:attr("boolean"),arrows:attr("boolean"),hoverChange:attr("boolean"),width:attr("number"),height:attr("number"),align:attr("string"),inset:attr("boolean"),size:attr("number"),hideUnder:attr("number"),fillMode:attr("string")}),MSPanel.Callback=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),content:attr("string",{defaultValue:"function(event){\n var api = event.target;\n}"})}),MSPanel.ButtonStyle=Ember.Model.extend({id:attr("number"),className:attr("string"),normal:attr("string"),hover:attr("string"),active:attr("string"),style:attr("string",{defaultValue:"ms-btn-box"}),size:attr("string",{defaultValue:"ms-btn-n"})});var decodeFix=function(str){var decoded=B64.decode(str);return decoded.slice(0,decoded.lastIndexOf("}")+1)};MSPanel.data=__MSP_DATA?JSON.parse(decodeFix(__MSP_DATA)):{meta:{}},MSPanel.PSData=__MSP_PRESET_STYLE?JSON.parse(decodeFix(__MSP_PRESET_STYLE)):{meta:{}},MSPanel.PEData=__MSP_PRESET_EFFECT?JSON.parse(decodeFix(__MSP_PRESET_EFFECT)):{meta:{}},MSPanel.PBData=__MSP_PRESET_BUTTON?JSON.parse(decodeFix(__MSP_PRESET_BUTTON)):{meta:{}},MSPanel.Settings.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Slide.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Layer.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Style.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Effect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Control.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Callback.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.PresetStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PSData}),MSPanel.PresetEffect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PEData}),MSPanel.ButtonStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PBData})}(),MSPanel.SlideFrame=Ember.View.extend({classNames:["msp-slideframe"],classNameBindings:["selected:active"],selected:!1,thumb_src:"",showbtnclass:"msp-ico msp-ico-whitehide",template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}}></div>{{/if}}</div><span class="msp-frame-slideorder">#{{view.order}}</span><div class="msp-framehandle"><ul><li><a title="'+__MSP_LAN.ui_001+'" href="#" {{action "hideswitch" target=view}}><span {{bind-attr class=view.showbtnclass}}></span></a></li><li><a title="'+__MSP_LAN.ui_002+'" href="#" {{action "duplicate" target=view}}><span class="msp-ico msp-ico-whiteduplicate"></span></a></li><li><a title="'+__MSP_LAN.ui_003+'" href="#" {{action "remove" target=view}}><span class="msp-ico msp-ico-whiteremove"></span></a></li></ul></div>'),click:function(){this.get("controller").send("select",this.get("slide"))},onValueChanged:function(){var hasImg=!Ember.isEmpty(this.get("slide.bg")),hasThumb=!Ember.isEmpty(this.get("slide.thumb"));this.beginPropertyChanges(),this.set("hasImg",hasImg||hasThumb),hasImg?this.set("preview","background-image:url("+this.get("slide.bgThumb")+");"):hasThumb&&this.set("preview","background-image:url("+this.get("slide.thumb")+");"),this.endPropertyChanges()}.observes("slide.bg","slide.thumb").on("didInsertElement"),onSelect:function(){var slide=this.get("slide");this.set("selected",slide===this.get("controller.currentSlide"))}.observes("controller.currentSlide").on("init"),hideChange:function(){this.get("slide.ishide")?this.set("showbtnclass","msp-ico msp-ico-whitehide msp-ico-whiteshow"):this.set("showbtnclass","msp-ico msp-ico-whitehide")}.observes("slide.ishide").on("init"),order:function(){return this.get("slide.order")+1}.property("slide.order"),actions:{duplicate:function(){this.get("controller").duplicateSlide(this.get("slide"))},hideswitch:function(){this.set("slide.ishide",!this.get("slide.ishide"))},remove:function(){confirm(__MSP_LAN.ui_004)&&this.get("controller").removeSlide(this.get("slide"))}}}),MSPanel.SlideList=Ember.View.extend({tagName:"div",classNames:["msp-slides-container"],template:Ember.Handlebars.compile('<ul class="msp-slides sortable">{{#each item in controller}}{{#if item.isOverlayLayers}}{{else}}<li class="msp-slideframe-item" {{bind-attr data-id=item.id}}>{{view MSPanel.SlideFrame slide=item}}</li>{{/if}}{{/each}}<li class="msp-addslide-cont"><div class="msp-addslide" {{action "addSlides"}}><span class="msp-ico msp-ico-grayaddlarge"></span><span class="msp-addslide-label">Add Slide</span></div></li> </ul>'),didInsertElement:function(){var that=this;this.$().find(".sortable").sortable({placeholder:"msp-frames-srtplaceholder",items:">li:not(.msp-addslide-cont)",delay:100,update:function(){that.updateSort()},create:function(){that.updateSort()}})},updateSort:function(){var indexes={};$(".msp-slideframe-item").each(function(index){indexes[$(this).data("id")]=index}),this.$().find(".sortable").sortable("cancel"),this.get("controller").updateSlidesSort(indexes)},onSelect:function(){}.observes("controller.currentSlide").on("init"),actions:{switchToOverlays:function(){this.get("controller.currentSlide.isOverlayLayers")||this.set("controller.currentSlide",this.get("controller.overlayLayersSlide"))}}}),MSPanel.ImgSelect=Ember.View.extend({classNames:["msp-imgselect"],value:"",hasImg:!1,frame:null,slideBg:!1,template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}})"></div>{{/if}}</div>{{#if view.hasImg}}<button {{action removeImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayremove"></span></button>{{else}}<button {{action addImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayadd"></span></button>{{/if}}'),willDestroyElement:function(){var frame=this.get("frame");frame&&(frame.detach(),frame.remove(),frame=null,this.set("frame",null))},onValueChanged:function(){this.beginPropertyChanges(),this.set("hasImg",!Ember.isEmpty(this.get("value"))),this.set("preview","background-image:url("+this.get("thumb")+");"),this.endPropertyChanges()}.observes("value").on("didInsertElement"),actions:{removeImg:function(){this.beginPropertyChanges(),this.set("value",void 0),this.set("thumb",void 0),this.endPropertyChanges()},addImg:function(){if("undefined"!=typeof wp){var that=this,frame=this.get("frame");if(frame)return void frame.open();var frame=wp.media.frames.frame=wp.media({title:"Select Image",multiple:!1,frame:"select",library:{type:"image"},button:{text:"Add Image"}});frame.on("select",function(){var attachment=frame.state().get("selection").first().toJSON();that.set("thumb",(attachment.sizes.thumbnail||attachment.sizes.full).url),that.set("value",attachment.url)}),frame.open(),this.set("frame",frame)}}}}),MSPanel.Select=Ember.Select.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.URLTarget=MSPanel.Select.extend({onInit:function(){var contents=[{lable:__MSP_LAN.ui_005,value:"_self"},{lable:__MSP_LAN.ui_006,value:"_blank"},{lable:__MSP_LAN.ui_007,value:"_parent"},{lable:__MSP_LAN.ui_008,value:"_top"}];this.set("content",contents),this.set("optionValuePath","content.value"),this.set("optionLabelPath","content.lable"),this.set("width",200)}.on("init")}),MSPanel.Fillmode=Ember.View.extend({classNames:["msp-fill-dd"],type:"slide",value:"fill",index:1,template:Ember.Handlebars.compile("<select>{{#each item in view.contents}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.text}}</option>{{/each}}</select>"),didInsertElement:function(){var that=this,isFirst=!0;this.$("select").ddslick({width:154,onSelected:function(selected){!isFirst&&that.set("value",selected.selectedData.value),isFirst=!1}}),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$(".dd-container").ddslick("select",{index:this.get("valuedic")[this.get("value")]})}.observes("value"),onInit:function(){var contents,valuedic;"slide"===this.get("type")?(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"},{value:"center",text:__MSP_LAN.ui_011,img:__MSP_PATH+"images/center.png"},{value:"stretch",text:__MSP_LAN.ui_012,img:__MSP_PATH+"images/stretch.png"},{value:"tile",text:__MSP_LAN.ui_013,img:__MSP_PATH+"images/tile.png"}],valuedic={fill:0,fit:1,center:2,stretch:3,tile:4}):"video"===this.get("type")&&(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"}],valuedic={fill:0,fit:1,none:2}),this.set("contents",contents),this.set("valuedic",valuedic)}.on("init")}),MSPanel.AddLayer=Ember.View.extend({classNames:["msp-addlayer"],template:Ember.Handlebars.compile('<button {{action newLayer view.value}} class="msp-add-btn msp-addlayer-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-addlayer-dd"><select>{{#each item in view.layertypes}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.lable}}</option>{{/each}}</select></div>'),didInsertElement:function(){var that=this;this.$().find("select").ddslick({width:154,onSelected:function(selected){that.set("value",selected.selectedData.value)}})},onInit:function(){for(var layertypes=[],clt=this.get("controller.layertypes"),i=0,l=clt.length;i!==l;i++)layertypes.push({value:clt[i].value,lable:clt[i].lable,img:__MSP_PATH+"images/layertypes/"+clt[i].value+".png"});this.set("layertypes",layertypes)}.on("init")}),MSPanel.AlignBtns=Ember.View.extend({classNames:["msp-align-btns"],target:null,template:Ember.Handlebars.compile('<button title="'+__MSP_LAN.ui_015+'" {{action "alignLayer" "top" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-altop"></span></button><button title="'+__MSP_LAN.ui_016+'" {{action "alignLayer" "mid" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-almid"></span></button><button title="'+__MSP_LAN.ui_017+'" {{action "alignLayer" "bot" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-albot"></span></button><div class="msp-btn-space"></div><button title="'+__MSP_LAN.ui_018+'" {{action "alignLayer" "left" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alleft"></span></button><button title="'+__MSP_LAN.ui_019+'" {{action "alignLayer" "center" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alcenter"></span></button><button title="'+__MSP_LAN.ui_020+'" {{action "alignLayer" "right" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alright"></span></button>')}),MSPanel.PositionOrigin=Ember.View.extend({classNames:["msp-origin-control"],layer:null,selectedNode:null,template:Ember.Handlebars.compile('<table><tbody><tr><td title="Top left" class="msp-origin-btn msp-origin-tl" data-origin="tl"></td><td title="Top center" class="msp-origin-btn msp-origin-tc" data-origin="tc"></td><td title="Top right" class="msp-origin-btn msp-origin-tr" data-origin="tr"></td></tr><tr><td title="Middle left" class="msp-origin-btn msp-origin-ml" data-origin="ml"></td><td title="Middle center" class="msp-origin-btn msp-origin-mc" data-origin="mc"></td><td title="Middle right" class="msp-origin-btn msp-origin-mr" data-origin="mr"></td></tr><tr><td title="Bottom left" class="msp-origin-btn msp-origin-bl" data-origin="bl"></td><td title="Bottom center" class="msp-origin-btn msp-origin-bc" data-origin="bc"></td><td title="Bottom right" class="msp-origin-btn msp-origin-br" data-origin="br"></td></tr></tbody></table>'),didInsertElement:function(){var that=this;this.$(".msp-origin-btn").click(function(){Ember.isEmpty(that.get("layer"))||that.set("layer.origin",$(this).data("origin"))}),this.onValueChanged()},onValueChanged:function(){var selectedNode=this.get("selectedNode");if(Ember.isEmpty(selectedNode)||selectedNode.removeClass("msp-origin-btn-selected"),Ember.isEmpty(this.get("layer")))return void this.$().addClass("msp-origin-control-disabled");this.$().removeClass("msp-origin-control-disabled");var value=this.get("layer.origin"),newNode=this.$(".msp-origin-"+value).addClass("msp-origin-btn-selected");this.set("selectedNode",newNode)}.observes("layer","layer.origin")}),MSPanel.ButtonsList=Ember.View.extend({classNames:["msp-buttons-container"],layer:null,template:Ember.Handlebars.compile('{{#each button in controller.buttonClasses}}<div class="msp-button-container" {{action "selectButton" button target=view}}><div class="msp-button-cell"><span {{bind-attr class=":ms-btn button.style button.size button.className"}}>Button</span></div></div>{{/each}}'),didInsertElement:function(){this.onValueChanged()},onValueChanged:function(){var className=this.get("layer.btnClass"),lastSelected=this.get("lastSelected");Ember.isEmpty(className)||(className=className.split(" ").pop(),Ember.isEmpty(lastSelected)||this.$("."+lastSelected).parent().removeClass("active"),this.$("."+className).parent().addClass("active"),this.set("lastSelected",className))}.observes("layer","layer.btnClass"),actions:{selectButton:function(button){this.set("layer.btnClass","ms-btn "+button.get("style")+" "+button.get("size")+" "+button.get("className"))}}}),MSPanel.ActionList=Ember.View.extend({classNames:["msp-action-list"],layer:null,showSlideNum:null,showDuration:null,template:Ember.Handlebars.compile('{{#dropdwon-List value=view.layer.action width=180}}<option value="next">'+(__MSP_LAN.ui_021||"Goto next slide")+'</option><option value="previous">'+(__MSP_LAN.ui_022||"Goto previous slide")+'</option><option value="gotoSlide">'+(__MSP_LAN.ui_025||"Goto slide")+'</option><option value="pause">'+(__MSP_LAN.ui_023||"Pause timer")+'</option><option value="resume">'+(__MSP_LAN.ui_024||"Resume timer")+'</option><option value="scrollToEnd">'+(__MSP_LAN.ui_028||"Scroll to bottom of slider")+'</option><option value="scrollTo">'+(__MSP_LAN.ui_030||"Scroll to an element in page")+'</option>{{/dropdwon-List}}{{#if view.showSlideNum}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_026||"Slide number : ")+' {{number-input value=view.layer.toSlide}}{{/if}}{{#if view.showDuration}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_029||"Scroll animation duration : ")+' {{number-input value=view.layer.scrollDuration}} s{{/if}}{{#if view.showTarget}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_029||"Scroll animation duration : ")+' {{number-input value=view.layer.scrollDuration}} s<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_031||"Target element : ")+" {{input value=view.layer.scrollTarget}}{{/if}}"),onValueChanged:function(){var value=this.get("layer.action");this.set("showSlideNum","gotoSlide"===value),this.set("showDuration","scrollToEnd"===value),this.set("showTarget","scrollTo"===value)}.observes("layer","layer.action").on("init")}),MSPanel.SimpleCodeBlock=Ember.View.extend({classNames:["msp-shortcode-box"],template:Ember.Handlebars.compile('<input type="text" readonly {{bind-attr value=view.value}}>'),width:150,didInsertElement:function(){this.$("input").on("click",function(){$(this).select()}).width(this.get("width"))}}),MSPanel.SettingsView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.SlidesView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.StageArea=Ember.View.extend({classNames:["msp-stage-area"],template:Ember.Handlebars.compile('{{view MSPanel.Stage}}{{#if noticeMsg}}<div class="msp-stage-msg"><span class="msp-ico msp-ico-notice"></span>{{{noticeMsg}}}</div>{{/if}}')}),MSPanel.Stage=Ember.View.extend({classNames:["msp-slide-stage"],attributeBindings:["style"],template:Ember.Handlebars.compile('<div id="stage-bg" class="msp-stage-bg"></div><div id="overlaybox" {{bind-attr class=":msp-stage-pattern :ms-pattern controller.slide.pattern"}}></div>'),resize:function(){var w=this.get("controller.sliderSettings.width"),h=this.get("controller.sliderSettings.height");this.set("width",w),this.set("height",h),this.$().css({width:w,height:h})}.observes("controller.sliderSettings.width","controller.sliderSettings.height","parentView.zoom").on("didInsertElement"),didInsertElement:function(){var BG=this.$("#stage-bg"),BGImage=$("<img/>");BGImage.css("visibelity","hidden").each($.jqLoadFix);var aligner=new MSAligner(this.get("controller.slide.fillMode"),BG,BGImage);this.set("bgAligner",aligner),this.set("bgImg",BGImage),this.onBGChange()},onBGColorChange:function(){var color=this.get("controller.slide.bgColor");Ember.isEmpty(color)?this.$("#stage-bg").css("background-color",""):this.$("#stage-bg").css("background-color",color)}.observes("controller.slide.bgColor").on("didInsertElement"),onColorOverlayChange:function(){var color=this.get("controller.slide.colorOverlay");Ember.isEmpty(color)?this.$("#overlaybox").css("background-color",""):this.$("#overlaybox").css("background-color",color)}.observes("controller.slide.colorOverlay").on("didInsertElement"),onBGChange:function(){var alinger=this.get("bgAligner");alinger&&alinger.reset();var bg=this.get("controller.slide.bg"),bgImg=this.get("bgImg");if(Ember.isEmpty(bg))bgImg.detach();else{var that=this;bgImg.appendTo(this.$("#stage-bg")),bgImg.preloadImg(bg,function(event){that._onBGLoad(event)}),bgImg.attr("src",bg)}}.observes("controller.slide.bg"),_onBGLoad:function(event){var aligner=this.get("bgAligner");aligner&&(aligner.init(event.width,event.height),aligner.align(),this.get("bgImg").css("visibelity",""))},onFillModeChanged:function(){var aligner=this.get("bgAligner");aligner.changeType(this.get("controller.slide.fillMode"))}.observes("controller.slide.fillMode"),willDestroyElement:function(){$(document).off("keydown",this.moveLayer),this.set("bgAligner",null)}}),MSPanel.ControlBtn=Ember.View.extend({control:null,tagName:"div",active:!1,classNames:["msp-control-btn"],classNameBindings:["active:msp-blue-btn"],template:Ember.Handlebars.compile('<span class="msp-control-label">{{view.control.label}}</span><a href="#" {{action "removeControl" target=view bubbles=false}}><span class="msp-control-removes msp-ico msp-ico-whiteremove"></span></a>'),didInsertElement:function(){},onActiveChange:function(){this.set("active",this.get("controller.currentControl")===this.get("control")),this.get("active")&&this.get("controller").send("showControlOptions")}.observes("controller.currentControl").on("init"),click:function(){this.get("active")||this.set("controller.currentControl",this.get("control"))},actions:{removeControl:function(){confirm('Are you sure want to remove "'+this.get("control.label")+'" control?')&&this.get("controller").send("removeControl",this.get("control"))}}}),function($){function WPEditorTemplate(id){var newEditor=$(hiddenEditor);return newEditor.find("link").remove(),newEditor.html().replace(/msp-hidden/g,id)}MSPanel.MetaBoxComponent=Ember.Component.extend({tagName:"div",classNames:["msp-metabox"],layout:Ember.Handlebars.compile('<div class="msp-metabox-handle"><h3 class="msp-metabox-title">{{title}}</h3><div class="msp-metabox-toggle"></div></div>{{yield}}<div class="clear"> </div>')}),Ember.TEMPLATES["components/tabs-panel"]=Ember.Handlebars.compile("{{yield}}"),MSPanel.TabsPanelComponent=Ember.Component.extend({tagName:"div",attributeBindings:["id"],classNames:["msp-metabox msp-metabox-tabs"],didInsertElement:function(){this.$().avertaLiveTabs()}}),MSPanel.SwitchBoxComponent=Ember.Component.extend({classNames:["msp-switchbox"],offlable:"OFF",onlable:"ON",value:!1,layout:Ember.Handlebars.compile('<div class="msp-switch-cont"><span class="msp-switch-off">{{view.offlable}}</span><div class="msp-switch-handle"></div><span class="msp-switch-on">{{view.onlable}}</span></div>'),click:function(){var that=this;that.set("value",!that.get("value"))},update:function(){this.get("value")?this.$().addClass("switched"):this.$().removeClass("switched")}.observes("value").on("didInsertElement")}),MSPanel.AddDynamicTag=Ember.View.extend({classNames:["msp-add-dynamic-tags"],editorId:null,template:Ember.Handlebars.compile('<button {{action "addTag" target=view}} class="msp-add-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-ddlist"></div>'),didInsertElement:function(){for(var select=$("<select></select>").appendTo(this.$(".msp-ddlist")).width(220),i=0,l=MSPanel.dynamicTags.length;i!==l;i++)select.append('<option value="'+MSPanel.dynamicTags[i].tag+'">'+MSPanel.dynamicTags[i].name+"</option>");
|
10 |
this.set("select",select)},actions:{addTag:function(){var id=this.get("editorId");tinymce&&$("#wp-"+id+"-wrap").hasClass("tmce-active")?tinymce.get(id).execCommand("insertHTML",!1,this.get("select").val()):$("#"+id).insertAtCaret(this.get("select").val())}}});var hiddenEditor=jQuery("#mspHiddenEditor")[0].outerHTML,__tmc_msp_id=0;MSPanel.WPEditor=Ember.View.extend({classNames:["msp-wp-editor"],_id:null,template:null,tab:null,tabs:null,onInit:function(){var id="msp-wpeditor-"+__tmc_msp_id;this.set("_id",id),this.set("template",Ember.Handlebars.compile(WPEditorTemplate(id))),__tmc_msp_id++}.on("init"),didInsertElement:function(){var tabs=this.get("tabs");return Ember.isEmpty(tabs)?void this.createEditor():void $("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.createEditor()},createEditor:function(){if(this.get("inited")!==!0){this.set("inited",!0);var id=this.get("_id"),that=this;if(window.tinymce){var settings=$.extend({},window.tinyMCEPreInit.mceInit["msp-hidden"]||{});settings.forced_root_block="",settings.force_br_newlines=!0,settings.force_p_newlines=!1,settings.wpautop=!1,"3"==tinyMCE.majorVersion?(settings.body_class=settings.elements=id,settings.setup=function(ed){ed.onInit.add(function(){that.initEditor(tinyMCE.getInstanceById(id))})},tinymce.init(settings)):"4"==tinyMCE.majorVersion&&(settings.body_class="content post-type-post post-status-auto-draft post-format-standard",settings.selector="#"+id,settings.setup=function(ed){ed.on("init",function(){that.initEditor(tinyMCE.get(id))})},tinymce.init(settings))}var qtags,qtagSettings=$.extend({},window.tinyMCEPreInit.qtInit["msp-hidden"]||{});qtagSettings.id=id,"function"==typeof QTags&&(qtags=quicktags(qtagSettings),QTags.buttonsInitDone=!1,QTags._buttonsInit(),that.set("qtags",qtags),window.tinymce?switchEditors.go(id,"html"):this.onValueChanged(),this.$("textarea#"+this.get("_id")).on("change keyup paste",function(){that.set("value",$(this).val())}))}},initEditor:function(mce){function internalUpdate(){that.set("internalChange",!0),that.set("value",mce.getContent()),that.set("internalChange",!1)}var id=this.get("_id"),that=(this.get("value"),this);this.$(".wp-editor-wrap").on("mousedown",function(){wpActiveEditor=id}),"3"==tinyMCE.majorVersion?(mce.onChange.add(internalUpdate),mce.onKeyUp.add(internalUpdate)):"4"==tinyMCE.majorVersion&&(mce.on("change",internalUpdate),mce.on("keyup",internalUpdate)),this.$().click(internalUpdate),setTimeout(function(){switchEditors.go(id,"html"),switchEditors.go(id,"tmce")},100),this.set("mce",mce),this.onValueChanged()},onValueChanged:function(){if(this.get("inited")){var value=this.get("value");if(this.$("textarea#"+this.get("_id")).val(value),this.get("internalChange"))return void this.set("internalChange",!1);if(window.tinymce){var mce=this.get("mce");Ember.isEmpty(mce)||null==value?null==value&&mce.setContent(" "):mce.setContent(value)}}}.observes("value"),willDestroyElement:function(){if(this.get("inited")){window.tinymce&&tinymce.remove(this.get("_id"));var qtags=this.get("qtags");qtags&&($(qtags.toolbar).remove(),qtags.toolbar=null,qtags=null,QTags.instances[this.get("_id")]&&delete QTags.instances[this.get("_id")],this.$("textarea#"+this.get("_id")).remove());var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor)}}}),jQuery.ui&&jQuery.ui.spinner&&(jQuery.ui.spinner.prototype._events.mousewheel=function(event,delta){if(delta&&this.element.is(":focus")){if(!this.spinning&&!this._start(event))return!1;this._spin((delta>0?1:-1)*this.options.step,event),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(event)},100),event.preventDefault()}}),MSPanel.NumberInputView=Ember.View.extend({step:1,min:0,tagName:"input",attributeBindings:["type"],lastValue:null,type:"text",didInsertElement:function(){var that=this,input=this.$(),updateValue=function(){var value=input.spinner("value");that.set("internalChange",!0),isNaN(value)||null==value?that.set("value",void 0):that.set("value",parseFloat(value))};input.on("change",updateValue).spinner({step:this.get("step"),numberFormat:"n",min:this.get("min"),max:this.get("max"),spin:updateValue,stop:updateValue}).spinner("value",this.get("value"))},onValueChanged:function(){this.get("internalChange")&&this.set("internalChange",!1),this.$().spinner("value",this.get("value"))}.observes("value")}),Ember.Handlebars.helper("number-input",MSPanel.NumberInputView),MSPanel.ColorPickerComponent=Ember.Component.extend({tagName:"input",classNames:"msp-color-picker",value:null,didInsertElement:function(){var that=this;this.$().spectrum({color:this.get("value"),allowEmpty:!0,showInput:!0,showAlpha:!0,clickoutFiresChange:!0,preferredFormat:"hex6",change:function(color){null===color?that.set("value",null):that.set("value",color.toString())}})},willDestroyElement:function(){this.$().spectrum("destroy")},onValueChanged:function(){this.$().spectrum("set",this.get("value"))}.observes("value")}),MSPanel.DropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.MultiDropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-ddlist-multiselect"],layout:Ember.Handlebars.compile("<select {{bind-attr size=view.size}} multiple>{{yield}}</select>"),value:null,width:100,size:7,didInsertElement:function(){var that=this;this.$("select").on("change",function(){that.set("value",$(this).val())}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.GoogleFontsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select"],defaultTemplate:Ember.Handlebars.compile('<select><option value="--" selected>Loading fonts..</option></select>'),value:null,variants:null,width:210,didInsertElement:function(){var that=this;GFonts.getList(function(){that.$("select").html('<option value="--" selected>-- select --</option>'+GFonts.generateSelectList()),that.onValueChanged(),that.$("select").trigger("change")}),this.$("select").on("change",function(){var option=that.$("select option:selected");"--"===option.val()?(that.set("value",void 0),that.set("variants",void 0)):(that.set("value",option.attr("value")),that.set("variants",option.attr("data-variants")))}).width(this.get("width")),that.onValueChanged()},onValueChanged:function(){this.$("select").val(Ember.isEmpty(this.get("value"))?"--":this.get("value"))}.observes("value")}),MSPanel.GoogleFontWeightsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select msp-gfonts-weight"],defaultTemplate:Ember.Handlebars.compile("<select></select>"),variants:null,value:null,width:120,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");return 0===option.length?void that.$("select").val("normal"):void("--"===option.val()?that.set("value",null):that.set("value",option.attr("value")))}).width(this.get("width")),that.updateVariants()},updateVariants:function(){var variants=this.get("variants");if(Ember.isEmpty(variants))this.$("select").html("<option>Select font</option>");else{var options="",value=this.get("value");variants=variants.split(",");for(var i=0,l=variants.length;i!==l;i++)-1===variants[i].indexOf("italic")&&(options+="regular"===variants[i]?'<option value="normal"'+("normal"===value?"selected":"")+">Normal</option>":'<option value="'+variants[i]+'"'+(value===variants[i]?"selected":"")+">"+variants[i]+"</option>");this.$("select").html(options).trigger("change")}}.observes("variants")}),MSPanel.CodeMirrorComponent=Ember.Component.extend({classNames:["msp-codemirror"],width:250,height:200,mode:"css",tab:null,tabs:null,layout:Ember.Handlebars.compile("<textarea>{{yield}}</textarea>"),didInsertElement:function(){this.$().width(this.get("width")).height(this.get("height"));var that=this,editor=CodeMirror.fromTextArea(this.$(">textarea")[0],{lineNumbers:!0,mode:this.get("mode")});editor.on("change",function(){that.set("internalChange",!0),that.set("value",editor.getValue())}),this.set("editor",editor);var value=this.get("value");Ember.isEmpty(value)||editor.setValue(value);var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},onValueChanged:function(){return this.get("internalChange")===!0?void this.set("internalChange",!1):(this.get("editor").setValue(this.get("value")),void this.set("internalChange",!1))}.observes("value"),refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.get("editor").refresh()},willDestroyElement:function(){var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor);var editor=this.get("editor");editor.toTextArea(),editor=null,this.set("editor",null)}});for(var patterns='<div class="msp-pattern-prev ms-pattern"></div>',i=1;30>=i;i++)patterns+='<div class="msp-pattern-prev ms-pattern ms-patt-'+i+'" data-pattern="ms-patt-'+i+'" style="'+(i>15?"background-color:black;":"")+'"></div>';MSPanel.PatternPickerComponent=Ember.Component.extend({tagName:"div",classNames:["msp-pattern-picker"],value:null,patternBoxIsOpen:!1,layout:Ember.Handlebars.compile('<div class="msp-pattern-control sp-replacer sp-light"><div {{bind-attr class=":ms-pattern-preview :ms-pattern view.value"}}></div><div class="sp-dd">▼</div></div><div class="msp-patterns-box">'+patterns+"</div>"),didInsertElement:function(){this.$(".msp-pattern-control").on("click",{that:this},this.togglePatternbox),$(document).on("click",{that:this},this.closePatternbox),this.$(".msp-patterns-box").css("display","none").on("click",function(e){e.stopPropagation()}).find(".ms-pattern").on("click",{that:this},this.selectPattern)},togglePatternbox:function(e){var that=e.data.that;e.stopPropagation(),that.get("patternBoxIsOpen")&&that.closePatternbox(e),that.$(".msp-patterns-box").css("display",""),that.set("patternBoxIsOpen",!0)},closePatternbox:function(e){var that=e.data.that;that.get("patternBoxIsOpen")&&(that.$(".msp-patterns-box").css("display","none"),that.set("patternBoxIsOpen",!1))},selectPattern:function(e){e.stopPropagation();var that=e.data.that;that.set("value",$(this).data("pattern"))},willDestroyElement:function(){this.$(".msp-patterns-box").off("click",this.togglePatternbox).find(".ms-pattern").off("click"),$(document).off("click",this.closePatternbox)}})}(jQuery),MSPanel.pushData=null,MSPanel.ApplicationController=Ember.Controller.extend({isFlickr:"flickr"===__MSP_TYPE,isFacebook:"facebook"===__MSP_TYPE,isPost:"post"===__MSP_TYPE,isWcproduct:"wc-product"===__MSP_TYPE,sliderId:MSPanel.SliderID,isSending:!1,statusMsg:"",hasError:!1,onInit:function(){window.$||(window.$=jQuery.noConflict()),MSPanel.Settings.find(),MSPanel.Slide.find(),MSPanel.Layer.find(),MSPanel.Style.find(),MSPanel.Effect.find(),MSPanel.PresetStyle.find(),MSPanel.PresetEffect.find(),MSPanel.Control.find(),MSPanel.Callback.find(),MSPanel.ButtonStyle.find(),this.set("disableControls",MSPanel.Settings.find(0).get("disableControls"));var that=this;MSPanel.pushData=function(){that.prepareData()},MSPanel.createButton=this.createButton,"wc-product"===__MSP_TYPE&&null==__MSP_POST&&null!=__WC_INSTALL_URL&&(this.set("hasError",!0),this.set("errorTemplate","wooc-error"),this.set("wooLink",__WC_INSTALL_URL)),this.generateButtonStyles(),this.set("shortCode",'[masterslider id="'+this.get("sliderId")+'"]'),this.set("phpFunction","<?php masterslider("+this.get("sliderId")+"); ?>"),jQuery("#panelLoading").remove(),window._msp_init_timeout&&clearTimeout(window._msp_init_timeout),$(window).scroll(function(){$(window).scrollTop()+$(window).height()>=$(document).height()-45?($("#saveBar").removeClass("msp-sticky-bar"),$("#saveBarPlaceHolder").css("display","none")):($("#saveBar").addClass("msp-sticky-bar"),$("#saveBarPlaceHolder").css("display",""))}).trigger("scroll"),$("#timeAgo").timeago(),setInterval($.proxy(this.updateSavedTime,this),3e4),$(document).bind("keydown",function(e){return(e.metaKey||e.ctrlKey)&&83==e.which?(e.preventDefault(),that.get("isSending")||that.send("saveAll"),!1):void 0})}.on("init"),updateSliderSlugShortCodes:function(){var alias=this.get("sliderSlug");Ember.isEmpty(alias)&&(alias=MSPanel.SliderSlug),this.set("shortCodeSlug",'[masterslider alias="'+alias+'"]'),this.set("phpFunctionSlug",'<?php masterslider("'+alias+'"); ?>')}.observes("sliderSlug").on("init"),prepareData:function(){var fonts={},font_str="";MSPanel.Style.find().forEach(function(record){var font=record.get("fontFamily"),weight=record.get("fontWeight");Ember.isEmpty(font)||(fonts[font]||(fonts[font]=[]),"normal"===weight&&(weight="regular"),Ember.isEmpty(weight)||-1!==fonts[font].indexOf(weight)||fonts[font].push(weight))});for(var font in fonts)font_str+=font.replace(/\s/,"+")+":"+fonts[font].join(",")+"|";MSPanel.Settings.find(1).set("usedFonts",font_str.slice(0,-1)),this.saveRecords(MSPanel.Settings.find()),this.saveRecords(MSPanel.Slide.find()),this.saveRecords(MSPanel.Layer.find()),this.saveRecords(MSPanel.Style.find()),this.saveRecords(MSPanel.Effect.find()),this.saveRecords(MSPanel.PresetStyle.find()),this.saveRecords(MSPanel.PresetEffect.find()),this.saveRecords(MSPanel.Control.find()),this.saveRecords(MSPanel.Callback.find()),this.saveRecords(MSPanel.ButtonStyle.find())},generateButtonStyles:function(){var styles=MSPanel.ButtonStyle.find(),css="",$styleElement=$("#msp-buttons");styles.forEach(function(style){css+="."+style.get("className")+" {"+style.get("normal")+"}\n."+style.get("className")+":hover {"+style.get("hover")+"}\n."+style.get("className")+":active {"+style.get("active")+"}\n"}),0===$styleElement.length?$styleElement=$('<style id="msp-buttons"></style>').text(css).appendTo($("head")):$styleElement.text(css)},actions:{saveAll:function(){this.prepareData(),this.sendData()},showPreview:function(event){window.lunchMastersliderPreview&&lunchMastersliderPreview(event)}},saveRecords:function(records){records.forEach(function(record){record.save()})},sendData:function(){this.set("statusMsg",__MSP_LAN.ap_001),this.set("isSending",!0),this.set("savingStatus","msp-saving");var that=this;jQuery.post(__MS.ajax_url,{action:"msp_panel_handler",nonce:jQuery("#msp-main-wrapper").data("nonce"),msp_data:B64.encode(JSON.stringify(MSPanel.data)),preset_style:B64.encode(JSON.stringify(MSPanel.PSData)),preset_effect:B64.encode(JSON.stringify(MSPanel.PEData)),buttons:B64.encode(JSON.stringify(MSPanel.PBData)),slider_id:MSPanel.SliderID},function(res){that.set("statusMsg",res.message),that.set("isSending",!1),res.success===!0?(that.set("savingStatus","msp-save-succeed"),that.startAutoHideMsg()):that.set("savingStatus","msp-save-error")})},startAutoHideMsg:function(){var timeout=this.get("msgTimeout"),that=this;Ember.isEmpty(timeout)||clearTimeout(timeout),this.set("timeout",setTimeout(function(){that.set("savingStatus","msp-save-hide msp-save-succeed"),$("#timeAgo").attr("title",(new Date).toISOString()),that.updateSavedTime()},2e3))},updateSavedTime:function(){var timeEle=$("#timeAgo");timeEle.attr("title")&&$("#timeAgo").timeago("updateFromDOM")},createButton:function(normal,hover,active,style,size){var newPreset=MSPanel.ButtonStyle.create({normal:normal,hover:hover,active:active,size:size,style:style});newPreset.save(),newPreset.set("className","msp-preset-btn-"+newPreset.get("id")),newPreset.save()}}),MSPanel.SettingsController=Ember.ObjectController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,sliderSkins:__MSP_SKINS,needs:["application","controls"],showAutoHeight:!1,showNearbyNum:!1,showWrapperWidth:!1,preloadMethod:null,setup:function(){var preload=this.get("preload");"all"===preload||"-1"===preload?this.set("preloadMethod",preload):this.set("preloadMethod","nearby"),this.set("draftMSTemplate",this.get("msTemplate"))},sliderLayoutChanged:function(){var layout=this.get("layout");"fullscreen"===layout||"autofill"===layout?(this.set("showAutoHeight",!1),this.set("autoHeight",!1)):this.set("showAutoHeight",!0),this.set("showWrapperWidth","boxed"===layout||"partialview"===layout),this.set("showAutoFillTarget","autofill"===layout),this.set("showMinHeight","fullscreen"!==layout&&"autofill"!==layout&&!this.get("autoHeight")),this.set("showFSMargin","fullscreen"===layout)}.observes("layout","autoHeight").on("setup"),preloadSetup:function(){var preloadMethod=this.get("preloadMethod");if("nearby"===preloadMethod){this.set("showNearbyNum",!0);var preload=this.get("preload");("all"===preload||"-1"===preload)&&this.set("preload","0")}else this.set("showNearbyNum",!1),this.set("preload",preloadMethod)}.observes("preloadMethod").on("setup"),actions:{}}),MSPanel.SlidesController=Ember.ArrayController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,_order:-1,bgImgSelector:null,sortProperties:["order"],stylesController:null,effectsController:null,buttonsController:null,layersList:[],layersController:null,mainView:null,isFirst:!0,currentSlide:null,setup:function(){if(Ember.isEmpty(this.get("sliderSettings.type"))&&this.set("sliderSettings.type",__MSP_TYPE),this.set("sliderSettings.sliderId",MSPanel.SliderID),0!==this.get("length")){var slide=this.get("firstObject");this.set("currentSlide",slide),this.updateOrder()}},slide:function(){return this.get("currentSlide")}.property("currentSlide"),duplicateSlide:function(slide){var slideProp=slide.toJSON();delete slideProp.id;var newSlide=MSPanel.Slide.create(slideProp);newSlide.set("order",slide.get("order")+1),this.forEach(function(_slide){var slide_order=_slide.get("order"),nslide_order=newSlide.get("order");slide_order>=nslide_order&&_slide!==newSlide&&_slide.set("order",slide_order+1)}),newSlide.save(),this.updateOrder()},updateSlidesSort:function(indexes){this.beginPropertyChanges(),this.forEach(function(slide){slide.set("order",indexes[slide.get("id")])},this),this.endPropertyChanges(),this.set("_order",this.get("lastObject.order"))},updateOrder:function(){var i=0;this.forEach(function(slide){slide.get("isOverlayLayers")||slide.set("order",i++)}),this.set("_order",i-1)},removeSlide:function(slide){slide.deleteRecord(),0!==this.get("length")&&(this.send("select",this.get("firstObject")),this.updateOrder())},onImageSelect:function(){var uploaderFrame=this.get("uploaderFrame"),selection=uploaderFrame.state().get("selection"),self=this;selection.map(function(attachment){attachment=attachment.toJSON(),self.generateSlide(attachment,attachment.url,(attachment.sizes.thumbnail||attachment.sizes.full).url)}),this.send("select",this.get("lastObject"))},generateSlide:function(attachment,bg,thumb){var slide=MSPanel.Slide.create({order:this.get("_order")+1,bg:bg,bgThumb:thumb,bgAlt:attachment.alt,bgTitle:attachment.title});this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},actions:{addSlides:function(){var uploaderFrame=this.get("uploaderFrame");Ember.isEmpty(uploaderFrame)&&(uploaderFrame=wp.media.frames.frame=wp.media({title:__MSP_LAN.slc_001||"Select background image for new slide. (Multiple selection is available)",multiple:!0,frame:"select",library:{type:"image"},button:{text:__MSP_LAN.slc_002||"Create Slide(s)"}}),uploaderFrame.on("select",$.proxy(this.onImageSelect,this)),this.set("uploaderFrame",uploaderFrame)),uploaderFrame.open()},newSlide:function(){var slide=MSPanel.Slide.create({order:this.get("_order")+1});this.set("currentSlide",slide),this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},select:function(slide){slide!==this.get("currentSlide")&&this.set("currentSlide",slide)}}}),MSPanel.ControlsController=Ember.ArrayController.extend({needs:"application",controls:[{used:!1,label:__MSP_LAN.cc_001,value:"arrows"},{used:!1,label:__MSP_LAN.cc_002,value:"timebar"},{used:!1,label:__MSP_LAN.cc_003,value:"bullets"},{used:!1,label:__MSP_LAN.cc_004,value:"circletimer"},{used:!1,label:__MSP_LAN.cc_005,value:"scrollbar"},{used:!1,label:__MSP_LAN.cc_006,value:"slideinfo"},{used:!1,label:__MSP_LAN.cc_007,value:"thumblist"}],selectedControl:null,availableControls:[],noMore:!1,currentControl:null,setup:function(){var that=this;this.forEach(function(control){that.findControlObj(control.get("name")).used=!0}),this.set("availableControls",this.findAvailableControls())},onInsertThumb:function(){var ctr=this.get("currentControl");Ember.isEmpty(ctr)||("tabs"===this.get("currentControl.type")?this.set("isTab",!0):this.set("isTab",!1))}.observes("currentControl.type").on("didInsertElement"),actions:{addControl:function(){var control,controlName=this.get("selectedControl"),controlObj=this.findControlObj(controlName);control=MSPanel.Control.create(this.getDefaultValues(controlName)),control.set("label",controlObj.label),controlObj.used=!0,this.set("availableControls",this.findAvailableControls()),control.save(),this.set("currentControl",control)},removeControl:function(control){this.findControlObj(control.get("name")).used=!1,this.set("availableControls",this.findAvailableControls()),control.deleteRecord(),this.set("currentControl",this.get("firstObject")),this.send("showControlOptions")},showControlOptions:function(){var currentControl=this.get("currentControl");Ember.isEmpty(currentControl)?this.set("controlOptions","empty-template"):this.set("controlOptions",currentControl.get("name")+"-options")}},findControlObj:function(control){for(var controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)if(controls[i].value===control)return controls[i];return null},findAvailableControls:function(){for(var avc=[],controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)controls[i].used||avc.push(controls[i]);return this.set("noMore",0===avc.length),this.set("selectedControl",avc[0]?avc[0].value:null),avc},getDefaultValues:function(control){var values={name:control};switch(values.inset=!("slideinfo"===control||"thumblist"===control),control){case"timebar":values.align="bottom",values.color="#FFFFFF",values.autoHide=!1,values.width=4;break;case"bullets":values.align="bottom",values.dir="h",values.margin=10,values.space=6;break;case"circletimer":values.color="#A2A2A2",values.stroke=10,values.radius=4,values.autoHide=!1;break;case"scrollbar":values.align="top",values.dir="h",values.color="#3D3D3D",values.margin=10,values.autoHide=!1,values.width=4;break;case"slideinfo":values.align="bottom",values.margin=10,values.autoHide=!1;break;case"thumblist":values.align="bottom",values.space=5,values.width=100,values.height=80,values.margin=10,values.fillMode="fill",values.autoHide=!1}return values}}),MSPanel.CallbacksController=Ember.ArrayController.extend({callbacks:[{used:!1,label:__MSP_LAN.cb_011,value:"INIT"},{used:!1,label:__MSP_LAN.cb_001,value:"CHANGE_START"},{used:!1,label:__MSP_LAN.cb_002,value:"CHANGE_END"},{used:!1,label:__MSP_LAN.cb_003,value:"WAITING"},{used:!1,label:__MSP_LAN.cb_004,value:"RESIZE"},{used:!1,label:__MSP_LAN.cb_005,value:"VIDEO_PLAY"},{used:!1,label:__MSP_LAN.cb_006,value:"VIDEO_CLOSE"},{used:!1,label:__MSP_LAN.cb_007,value:"SWIPE_START"},{used:!1,label:__MSP_LAN.cb_008,value:"SWIPE_MOVE"},{used:!1,label:__MSP_LAN.cb_009,value:"SWIPE_END"}],availableCallbacks:[],noMore:!1,selectedCallback:null,setup:function(){var that=this;this.forEach(function(callback){that.findCallbackObj(callback.get("name")).used=!0}),this.set("availableCallbacks",this.findAvailableCallbacks())},actions:{addCallback:function(){var callback,callbackName=this.get("selectedCallback"),callbackObj=this.findCallbackObj(callbackName);callback=MSPanel.Callback.create({name:callbackObj.value,label:callbackObj.label}),callbackObj.used=!0,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.save()},removeCallback:function(callback){confirm(__MSP_LAN.cb_010.jfmt(callback.get("label")))&&(this.findCallbackObj(callback.get("name")).used=!1,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.deleteRecord())}},findCallbackObj:function(callback){for(var callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)if(callbacks[i].value===callback)return callbacks[i];return null},findAvailableCallbacks:function(){for(var avc=[],callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)callbacks[i].used||avc.push(callbacks[i]);return this.set("noMore",0===avc.length),this.set("selectedCallback",avc[0]?avc[0].value:null),avc}});
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Panel
|
3 |
+
* Copyright © 2017 All Rights Reserved.
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
* @version 2.50.3
|
7 |
+
* @date May 2017
|
8 |
*/
|
9 |
window.MSPanel=Ember.Application.create({rootElement:"#msp-root"}),MSPanel.version="2.50.3",MSPanel.SliderID=parseQueryString(window.location.search).slider_id||__MSP_SLIDER_ID||"100",MSPanel.SliderSlug=__MSP_SLIDER_ALIAS||"ms-"+MSPanel.SliderID,MSPanel.dependedControllers=[],String.prototype.jfmt=function(){return"".fmt.apply(this.replace(/%s|%d/,"%@"),arguments)},window.$=jQuery.noConflict(),jQuery.ui.dialog.prototype._focusTabbable=function(){},MSPanel.Router.map(function(){this.resource("settings"),this.resource("slides",{path:"/"}),this.resource("controls"),this.resource("callbacks"),this.resource("error"),this.resource("pro-features")}),MSPanel.Router.reopen({location:"none"}),MSPanel.ApplicationRoute=Ember.Route.extend({model:function(){var setting=MSPanel.Settings.find();0===setting.get("length")&&MSPanel.Settings.create().save()}}),MSPanel.SettingsRoute=Ember.Route.extend({model:function(){return MSPanel.Settings.find(1)},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),MSPanel.SlidesRoute=Ember.Route.extend({model:function(){return MSPanel.Slide.find()},setupController:function(controller,model){controller.set("model",model),controller.set("sliderSettings",MSPanel.Settings.find(1)),controller.setup()}}),MSPanel.ControlsRoute=Ember.Route.extend({model:function(){return MSPanel.Control.find()},setupController:function(controller,model){controller.set("model",model),controller.setup(),this.activate()},activate:function(){var controller=this.get("controller");controller&&controller.set("controlOptions","empty-template")}}),MSPanel.CallbacksRoute=Ember.Route.extend({model:function(){return MSPanel.Callback.find()},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),function(){var attr=Ember.attr,hasMany=Ember.hasMany,belongsTo=Ember.belongsTo,regp=/https\:|http\:/,WPPath={serialize:function(path){return void 0==path?path:regp.test(path)?path.replace(__MS.upload_dir,""):path.replace("/wp-content/uploads","")},deserialize:function(path){return void 0==path?path:regp.test(path)?path:__MS.upload_dir+path}},defaults=window.__MSP_DEF_OPTIONS||{};MSPanel.Settings=Ember.Model.extend({id:attr("number"),snapping:attr("boolean",{defaultValue:!0}),bgImageThumb:attr(WPPath),disableControls:attr("boolean",{defaultValue:!1}),name:attr("string",{defaultValue:__MSP_LAN.sm_001}),slug:attr("string"),width:attr("number",{defaultValue:defaults.width||1e3}),height:attr("number",{defaultValue:defaults.height||500}),wrapperWidth:attr("number"),minHeight:attr("number"),wrapperWidthUnit:attr("string",{defaultValue:"px"}),autoCrop:attr("boolean",{defaultValue:defaults.autoCrop||!1}),type:attr("string"),sliderId:attr("string"),autofillTarget:attr("string"),enableOverlayLayers:attr("boolean",{defaultValue:defaults.enableOverlayLayers||!0}),layout:attr("string",{defaultValue:defaults.layout||"boxed"}),autoHeight:attr("boolean",{defaultValue:defaults.autoHeight||!1}),trView:attr("string",{defaultValue:defaults.transition||"basic"}),speed:attr("number",{defaultValue:defaults.speed||20}),space:attr("number",{defaultValue:defaults.space||0}),start:attr("number",{defaultValue:defaults.start}),grabCursor:attr("boolean",{defaultValue:defaults.grabCursor}),swipe:attr("boolean",{defaultValue:defaults.swipe}),mouse:attr("boolean",{defaultValue:defaults.mouse}),wheel:attr("boolean",{defaultValue:defaults.wheel}),keyboard:attr("boolean",{defaultValue:defaults.keyboard}),autoplay:attr("boolean",{defaultValue:defaults.autoplay}),loop:attr("boolean",{defaultValue:defaults.loop}),shuffle:attr("boolean",{defaultValue:defaults.shuffle}),preload:attr("string",{defaultValue:defaults.preload}),overPause:attr("boolean",{defaultValue:defaults.overPause}),endPause:attr("boolean",{defaultValue:defaults.endPause}),hideLayers:attr("boolean",{defaultValue:defaults.hideLayers}),dir:attr("string",{defaultValue:defaults.dir}),parallaxMode:attr("srting",{defaultValue:defaults.parallaxMode}),useDeepLink:attr("string",{defaultValue:!1}),deepLink:attr("string"),deepLinkType:attr("string",{defaultValue:"path"}),mobileBGVideo:attr("boolean",{defaultValue:defaults.mobileBGVideo}),startOnAppear:attr("boolean",{defaultValue:defaults.startOnAppear}),scrollParallax:attr("boolean"),scrollParallaxMove:attr("number",{defaultValue:30}),scrollParallaxBGMove:attr("number",{defaultValue:50}),scrollParallaxFade:attr("boolean",{defaultValue:!0}),centerControls:attr("boolean",{defaultValue:defaults.centerControls}),instantShowLayers:attr("boolean",{defaultValue:defaults.instantShowLayers}),fullscreenMargin:attr("number"),inlineStyle:attr("string"),className:attr("string",{defaultValue:defaults.className}),bgColor:attr("string"),bgImage:attr(WPPath),customStyle:attr("string"),skin:attr("string",{defaultValue:defaults.skin}),msTemplate:attr("string",{defaultValue:"custom"}),msTemplateClass:attr("string",{defaultValue:""}),usedFonts:attr("string"),fbtoken:attr("string"),apiKey:attr("string"),setId:attr("string"),setType:attr("string"),imgCount:attr("number"),thumbSize:attr("srting"),imgSize:attr("string"),postType:attr("string"),postCats:attr(Array),postTags:attr(Array),postCount:attr("number"),postImageType:attr("string"),postOrder:attr("string"),postOrderDir:attr("string"),postExcerptLen:attr("number"),postExcludeIds:attr("string"),postExcludeNoImg:attr("boolean"),postIncludeIds:attr("string"),postOffset:attr("number"),postLinkSlide:attr("boolean"),postLinkTarget:attr("string"),postSlideBg:attr("string"),postSlideBgthumb:attr("string"),wcOnlyInstock:attr("boolean"),wcOnlyFeatured:attr("boolean"),wcOnlyOnsale:attr("boolean")}),MSPanel.Slide=Ember.Model.extend({id:attr("number"),timeline_h:attr("number",{defaultValue:200}),bgThumb:attr(WPPath),thumbOrginal:attr(WPPath),isOverlayLayers:attr("boolean",{defaultValue:!1}),order:attr("number"),ishide:attr("boolean"),bg:attr(WPPath),duration:attr("number",{defaultValue:defaults.duration||3}),msId:attr("string"),fillMode:attr("string",{defaultValue:defaults.slideFillMode||"fill"}),thumb:attr(WPPath),info:attr("string"),link:attr("string"),linkTarget:attr("string"),linkTitle:attr("string"),linkRel:attr("string"),linkClass:attr("string"),linkId:attr("string"),video:attr("string"),bgColor:attr("string"),autoplayVideo:attr("boolean"),pattern:attr("string"),colorOverlay:attr("string"),bgv_mp4:attr("string"),bgv_ogg:attr("string"),bgv_webm:attr("string"),bgv_fillmode:attr("string",{defaultValue:defaults.sliderVideoFillMode||"fill"}),bgv_loop:attr("boolean",{defaultValue:defaults.slideVideoLoop}),bgv_mute:attr("boolean",{defaultValue:defaults.slideVideoMute}),bgv_autopause:attr("boolean",{defaultValue:defaults.slideVideoAutopause}),cssId:attr("string"),cssClass:attr("string"),bgAlt:attr("string"),bgTitle:attr("string"),layers:hasMany("MSPanel.Layer",{key:"layer_ids"})}),MSPanel.Layer=Ember.Model.extend({id:attr("number"),name:attr("string"),isLocked:attr("boolean",{defaultValue:!1}),isHided:attr("boolean",{defaultValue:!1}),isSoloed:attr("boolean",{defaultValue:!1}),slide:belongsTo("MSPanel.Slide",{key:"slide"}),styleModel:belongsTo("MSPanel.Style",{key:"styleModel",embedded:!1}),showEffect:belongsTo("MSPanel.Effect",{key:"showEffect",embedded:!1}),showTransform:attr("string",{defaultValue:""}),showOrigin:attr("string",{defaultValue:""}),showFade:attr("boolean",{defaultValue:!0}),hideEffect:belongsTo("MSPanel.Effect",{key:"hideEffect",embedded:!1}),hideTransform:attr("string",{defaultValue:""}),hideOrigin:attr("string",{defaultValue:""}),hideFade:attr("boolean",{defaultValue:!0}),imgThumb:attr(WPPath),stageOffsetX:attr("number",{defaultValue:0}),stageOffsetY:attr("number",{defaultValue:0}),order:attr("number"),type:attr("string"),position:attr("string",{defaultValue:"normal"}),msId:attr("string"),cssClass:attr("string"),cssId:attr("string"),title:attr("string"),rel:attr("string"),noSwipe:attr("string",{defaultValue:!1}),content:attr("string",{defaultValue:defaults.layerContent||"Lorem Ipsum"}),img:attr(WPPath),imgAlt:attr("string"),video:attr("string",{defaultValue:"http://player.vimeo.com/video/11721242"}),align:attr("string",{defaultValue:"top"}),useAction:attr("boolean",{defaultValue:!1}),action:attr("string"),toSlide:attr("number"),link:attr("string"),linkTarget:attr("string"),scrollDuration:attr("number",{defaultValue:2}),scrollTarget:attr("string"),actionTargetLayer:attr("string"),offsetX:attr("number",{defaultValue:0}),offsetY:attr("number",{defaultValue:0}),width:attr("number"),height:attr("number"),resize:attr("boolean",{defaultValue:!0}),fixed:attr("boolean",{defaultValue:!1}),widthlimit:attr("number",{defaultValue:"0"}),origin:attr("string",{defaultValue:"tl"}),stayHover:attr("boolean",{defaultValue:!0}),className:attr("string"),parallax:attr("string"),wait:attr("boolean",{defaultValue:defaults.layerWait}),masked:attr("boolean"),maskCustomSize:attr("boolean"),maskWidth:attr("number"),maskHeight:attr("number"),overlayTargetSlides:attr("string"),overlayTargetSlidesAction:attr("string",{defaultValue:"show"}),showDuration:attr("number",{defaultValue:1}),showDelay:attr("number",{defaultValue:0}),showEase:attr("string",{defaultValue:"easeOutQuint"}),showEffFunc:attr("string"),useHide:attr("boolean",{defaultValue:!1}),hideDuration:attr("number",{defaultValue:1}),hideDelay:attr("number",{defaultValue:1}),hideEase:attr("string",{defaultValue:"easeOutQuint"}),hideEffFunc:attr("string"),btnClass:attr("string",{defaultValue:"ms-btn ms-default-btn"}),autoplayVideo:attr("boolean")}),MSPanel.Style=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),className:attr("string"),backgroundColor:attr("string"),paddingTop:attr("number"),paddingRight:attr("number"),paddingBottom:attr("number"),paddingLeft:attr("number"),borderTop:attr("number"),borderRight:attr("number"),borderBottom:attr("number"),borderLeft:attr("number"),borderColor:attr("string"),borderRadius:attr("number"),borderStyle:attr("string"),fontFamily:attr("string"),fontWeight:attr("string",{defaultValue:"normal"}),fontSize:attr("number"),textAlign:attr("string"),letterSpacing:attr("number"),lineHeight:attr("string",{defaultValue:"normal"}),whiteSpace:attr("string"),color:attr("string"),custom:attr("string")}),MSPanel.PresetStyle=MSPanel.Style.extend({}),MSPanel.Effect=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),fade:attr("boolean",{defaultValue:!0}),translateX:attr("number"),translateY:attr("number"),translateZ:attr("number"),scaleX:attr("number"),scaleY:attr("number"),rotate:attr("number"),rotateX:attr("number"),rotateY:attr("number"),rotateZ:attr("number"),skewX:attr("number"),skewY:attr("number"),originX:attr("number"),originY:attr("number"),originZ:attr("number")}),MSPanel.PresetEffect=MSPanel.Effect.extend({}),MSPanel.Control=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),autoHide:attr("boolean",{defaultValue:!0}),overVideo:attr("boolean",{defaultValue:!0}),cssClass:attr("string"),cssId:attr("string"),margin:attr("number"),dir:attr("string"),color:attr("string"),radius:attr("number"),stroke:attr("number"),speed:attr("number"),space:attr("number"),type:attr("string"),insertThumb:attr("boolean"),arrows:attr("boolean"),hoverChange:attr("boolean"),width:attr("number"),height:attr("number"),align:attr("string"),inset:attr("boolean"),size:attr("number"),hideUnder:attr("number"),fillMode:attr("string")}),MSPanel.Callback=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),content:attr("string",{defaultValue:"function(event){\n var api = event.target;\n}"})}),MSPanel.ButtonStyle=Ember.Model.extend({id:attr("number"),className:attr("string"),normal:attr("string"),hover:attr("string"),active:attr("string"),style:attr("string",{defaultValue:"ms-btn-box"}),size:attr("string",{defaultValue:"ms-btn-n"})});var decodeFix=function(str){var decoded=B64.decode(str);return decoded.slice(0,decoded.lastIndexOf("}")+1)};MSPanel.data=__MSP_DATA?JSON.parse(decodeFix(__MSP_DATA)):{meta:{}},MSPanel.PSData=__MSP_PRESET_STYLE?JSON.parse(decodeFix(__MSP_PRESET_STYLE)):{meta:{}},MSPanel.PEData=__MSP_PRESET_EFFECT?JSON.parse(decodeFix(__MSP_PRESET_EFFECT)):{meta:{}},MSPanel.PBData=__MSP_PRESET_BUTTON?JSON.parse(decodeFix(__MSP_PRESET_BUTTON)):{meta:{}},MSPanel.Settings.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Slide.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Layer.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Style.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Effect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Control.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Callback.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.PresetStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PSData}),MSPanel.PresetEffect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PEData}),MSPanel.ButtonStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PBData})}(),MSPanel.SlideFrame=Ember.View.extend({classNames:["msp-slideframe"],classNameBindings:["selected:active"],selected:!1,thumb_src:"",showbtnclass:"msp-ico msp-ico-whitehide",template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}}></div>{{/if}}</div><span class="msp-frame-slideorder">#{{view.order}}</span><div class="msp-framehandle"><ul><li><a title="'+__MSP_LAN.ui_001+'" href="#" {{action "hideswitch" target=view}}><span {{bind-attr class=view.showbtnclass}}></span></a></li><li><a title="'+__MSP_LAN.ui_002+'" href="#" {{action "duplicate" target=view}}><span class="msp-ico msp-ico-whiteduplicate"></span></a></li><li><a title="'+__MSP_LAN.ui_003+'" href="#" {{action "remove" target=view}}><span class="msp-ico msp-ico-whiteremove"></span></a></li></ul></div>'),click:function(){this.get("controller").send("select",this.get("slide"))},onValueChanged:function(){var hasImg=!Ember.isEmpty(this.get("slide.bg")),hasThumb=!Ember.isEmpty(this.get("slide.thumb"));this.beginPropertyChanges(),this.set("hasImg",hasImg||hasThumb),hasImg?this.set("preview","background-image:url("+this.get("slide.bgThumb")+");"):hasThumb&&this.set("preview","background-image:url("+this.get("slide.thumb")+");"),this.endPropertyChanges()}.observes("slide.bg","slide.thumb").on("didInsertElement"),onSelect:function(){var slide=this.get("slide");this.set("selected",slide===this.get("controller.currentSlide"))}.observes("controller.currentSlide").on("init"),hideChange:function(){this.get("slide.ishide")?this.set("showbtnclass","msp-ico msp-ico-whitehide msp-ico-whiteshow"):this.set("showbtnclass","msp-ico msp-ico-whitehide")}.observes("slide.ishide").on("init"),order:function(){return this.get("slide.order")+1}.property("slide.order"),actions:{duplicate:function(){this.get("controller").duplicateSlide(this.get("slide"))},hideswitch:function(){this.set("slide.ishide",!this.get("slide.ishide"))},remove:function(){confirm(__MSP_LAN.ui_004)&&this.get("controller").removeSlide(this.get("slide"))}}}),MSPanel.SlideList=Ember.View.extend({tagName:"div",classNames:["msp-slides-container"],template:Ember.Handlebars.compile('<ul class="msp-slides sortable">{{#each item in controller}}{{#if item.isOverlayLayers}}{{else}}<li class="msp-slideframe-item" {{bind-attr data-id=item.id}}>{{view MSPanel.SlideFrame slide=item}}</li>{{/if}}{{/each}}<li class="msp-addslide-cont"><div class="msp-addslide" {{action "addSlides"}}><span class="msp-ico msp-ico-grayaddlarge"></span><span class="msp-addslide-label">Add Slide</span></div></li> </ul>'),didInsertElement:function(){var that=this;this.$().find(".sortable").sortable({placeholder:"msp-frames-srtplaceholder",items:">li:not(.msp-addslide-cont)",delay:100,update:function(){that.updateSort()},create:function(){that.updateSort()}})},updateSort:function(){var indexes={};$(".msp-slideframe-item").each(function(index){indexes[$(this).data("id")]=index}),this.$().find(".sortable").sortable("cancel"),this.get("controller").updateSlidesSort(indexes)},onSelect:function(){}.observes("controller.currentSlide").on("init"),actions:{switchToOverlays:function(){this.get("controller.currentSlide.isOverlayLayers")||this.set("controller.currentSlide",this.get("controller.overlayLayersSlide"))}}}),MSPanel.ImgSelect=Ember.View.extend({classNames:["msp-imgselect"],value:"",hasImg:!1,frame:null,slideBg:!1,template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}})"></div>{{/if}}</div>{{#if view.hasImg}}<button {{action removeImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayremove"></span></button>{{else}}<button {{action addImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayadd"></span></button>{{/if}}'),willDestroyElement:function(){var frame=this.get("frame");frame&&(frame.detach(),frame.remove(),frame=null,this.set("frame",null))},onValueChanged:function(){this.beginPropertyChanges(),this.set("hasImg",!Ember.isEmpty(this.get("value"))),this.set("preview","background-image:url("+this.get("thumb")+");"),this.endPropertyChanges()}.observes("value").on("didInsertElement"),actions:{removeImg:function(){this.beginPropertyChanges(),this.set("value",void 0),this.set("thumb",void 0),this.endPropertyChanges()},addImg:function(){if("undefined"!=typeof wp){var that=this,frame=this.get("frame");if(frame)return void frame.open();var frame=wp.media.frames.frame=wp.media({title:"Select Image",multiple:!1,frame:"select",library:{type:"image"},button:{text:"Add Image"}});frame.on("select",function(){var attachment=frame.state().get("selection").first().toJSON();that.set("thumb",(attachment.sizes.thumbnail||attachment.sizes.full).url),that.set("value",attachment.url)}),frame.open(),this.set("frame",frame)}}}}),MSPanel.Select=Ember.Select.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.URLTarget=MSPanel.Select.extend({onInit:function(){var contents=[{lable:__MSP_LAN.ui_005,value:"_self"},{lable:__MSP_LAN.ui_006,value:"_blank"},{lable:__MSP_LAN.ui_007,value:"_parent"},{lable:__MSP_LAN.ui_008,value:"_top"}];this.set("content",contents),this.set("optionValuePath","content.value"),this.set("optionLabelPath","content.lable"),this.set("width",200)}.on("init")}),MSPanel.Fillmode=Ember.View.extend({classNames:["msp-fill-dd"],type:"slide",value:"fill",index:1,template:Ember.Handlebars.compile("<select>{{#each item in view.contents}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.text}}</option>{{/each}}</select>"),didInsertElement:function(){var that=this,isFirst=!0;this.$("select").ddslick({width:154,onSelected:function(selected){!isFirst&&that.set("value",selected.selectedData.value),isFirst=!1}}),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$(".dd-container").ddslick("select",{index:this.get("valuedic")[this.get("value")]})}.observes("value"),onInit:function(){var contents,valuedic;"slide"===this.get("type")?(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"},{value:"center",text:__MSP_LAN.ui_011,img:__MSP_PATH+"images/center.png"},{value:"stretch",text:__MSP_LAN.ui_012,img:__MSP_PATH+"images/stretch.png"},{value:"tile",text:__MSP_LAN.ui_013,img:__MSP_PATH+"images/tile.png"}],valuedic={fill:0,fit:1,center:2,stretch:3,tile:4}):"video"===this.get("type")&&(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"}],valuedic={fill:0,fit:1,none:2}),this.set("contents",contents),this.set("valuedic",valuedic)}.on("init")}),MSPanel.AddLayer=Ember.View.extend({classNames:["msp-addlayer"],template:Ember.Handlebars.compile('<button {{action newLayer view.value}} class="msp-add-btn msp-addlayer-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-addlayer-dd"><select>{{#each item in view.layertypes}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.lable}}</option>{{/each}}</select></div>'),didInsertElement:function(){var that=this;this.$().find("select").ddslick({width:154,onSelected:function(selected){that.set("value",selected.selectedData.value)}})},onInit:function(){for(var layertypes=[],clt=this.get("controller.layertypes"),i=0,l=clt.length;i!==l;i++)layertypes.push({value:clt[i].value,lable:clt[i].lable,img:__MSP_PATH+"images/layertypes/"+clt[i].value+".png"});this.set("layertypes",layertypes)}.on("init")}),MSPanel.AlignBtns=Ember.View.extend({classNames:["msp-align-btns"],target:null,template:Ember.Handlebars.compile('<button title="'+__MSP_LAN.ui_015+'" {{action "alignLayer" "top" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-altop"></span></button><button title="'+__MSP_LAN.ui_016+'" {{action "alignLayer" "mid" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-almid"></span></button><button title="'+__MSP_LAN.ui_017+'" {{action "alignLayer" "bot" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-albot"></span></button><div class="msp-btn-space"></div><button title="'+__MSP_LAN.ui_018+'" {{action "alignLayer" "left" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alleft"></span></button><button title="'+__MSP_LAN.ui_019+'" {{action "alignLayer" "center" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alcenter"></span></button><button title="'+__MSP_LAN.ui_020+'" {{action "alignLayer" "right" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alright"></span></button>')}),MSPanel.PositionOrigin=Ember.View.extend({classNames:["msp-origin-control"],layer:null,selectedNode:null,template:Ember.Handlebars.compile('<table><tbody><tr><td title="Top left" class="msp-origin-btn msp-origin-tl" data-origin="tl"></td><td title="Top center" class="msp-origin-btn msp-origin-tc" data-origin="tc"></td><td title="Top right" class="msp-origin-btn msp-origin-tr" data-origin="tr"></td></tr><tr><td title="Middle left" class="msp-origin-btn msp-origin-ml" data-origin="ml"></td><td title="Middle center" class="msp-origin-btn msp-origin-mc" data-origin="mc"></td><td title="Middle right" class="msp-origin-btn msp-origin-mr" data-origin="mr"></td></tr><tr><td title="Bottom left" class="msp-origin-btn msp-origin-bl" data-origin="bl"></td><td title="Bottom center" class="msp-origin-btn msp-origin-bc" data-origin="bc"></td><td title="Bottom right" class="msp-origin-btn msp-origin-br" data-origin="br"></td></tr></tbody></table>'),didInsertElement:function(){var that=this;this.$(".msp-origin-btn").click(function(){Ember.isEmpty(that.get("layer"))||that.set("layer.origin",$(this).data("origin"))}),this.onValueChanged()},onValueChanged:function(){var selectedNode=this.get("selectedNode");if(Ember.isEmpty(selectedNode)||selectedNode.removeClass("msp-origin-btn-selected"),Ember.isEmpty(this.get("layer")))return void this.$().addClass("msp-origin-control-disabled");this.$().removeClass("msp-origin-control-disabled");var value=this.get("layer.origin"),newNode=this.$(".msp-origin-"+value).addClass("msp-origin-btn-selected");this.set("selectedNode",newNode)}.observes("layer","layer.origin")}),MSPanel.ButtonsList=Ember.View.extend({classNames:["msp-buttons-container"],layer:null,template:Ember.Handlebars.compile('{{#each button in controller.buttonClasses}}<div class="msp-button-container" {{action "selectButton" button target=view}}><div class="msp-button-cell"><span {{bind-attr class=":ms-btn button.style button.size button.className"}}>Button</span></div></div>{{/each}}'),didInsertElement:function(){this.onValueChanged()},onValueChanged:function(){var className=this.get("layer.btnClass"),lastSelected=this.get("lastSelected");Ember.isEmpty(className)||(className=className.split(" ").pop(),Ember.isEmpty(lastSelected)||this.$("."+lastSelected).parent().removeClass("active"),this.$("."+className).parent().addClass("active"),this.set("lastSelected",className))}.observes("layer","layer.btnClass"),actions:{selectButton:function(button){this.set("layer.btnClass","ms-btn "+button.get("style")+" "+button.get("size")+" "+button.get("className"))}}}),MSPanel.ActionList=Ember.View.extend({classNames:["msp-action-list"],layer:null,showSlideNum:null,showDuration:null,template:Ember.Handlebars.compile('{{#dropdwon-List value=view.layer.action width=180}}<option value="next">'+(__MSP_LAN.ui_021||"Goto next slide")+'</option><option value="previous">'+(__MSP_LAN.ui_022||"Goto previous slide")+'</option><option value="gotoSlide">'+(__MSP_LAN.ui_025||"Goto slide")+'</option><option value="pause">'+(__MSP_LAN.ui_023||"Pause timer")+'</option><option value="resume">'+(__MSP_LAN.ui_024||"Resume timer")+'</option><option value="scrollToEnd">'+(__MSP_LAN.ui_028||"Scroll to bottom of slider")+'</option><option value="scrollTo">'+(__MSP_LAN.ui_030||"Scroll to an element in page")+'</option>{{/dropdwon-List}}{{#if view.showSlideNum}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_026||"Slide number : ")+' {{number-input value=view.layer.toSlide}}{{/if}}{{#if view.showDuration}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_029||"Scroll animation duration : ")+' {{number-input value=view.layer.scrollDuration}} s{{/if}}{{#if view.showTarget}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_029||"Scroll animation duration : ")+' {{number-input value=view.layer.scrollDuration}} s<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_031||"Target element : ")+" {{input value=view.layer.scrollTarget}}{{/if}}"),onValueChanged:function(){var value=this.get("layer.action");this.set("showSlideNum","gotoSlide"===value),this.set("showDuration","scrollToEnd"===value),this.set("showTarget","scrollTo"===value)}.observes("layer","layer.action").on("init")}),MSPanel.SimpleCodeBlock=Ember.View.extend({classNames:["msp-shortcode-box"],template:Ember.Handlebars.compile('<input type="text" readonly {{bind-attr value=view.value}}>'),width:150,didInsertElement:function(){this.$("input").on("click",function(){$(this).select()}).width(this.get("width"))}}),MSPanel.SettingsView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.SlidesView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.StageArea=Ember.View.extend({classNames:["msp-stage-area"],template:Ember.Handlebars.compile('{{view MSPanel.Stage}}{{#if noticeMsg}}<div class="msp-stage-msg"><span class="msp-ico msp-ico-notice"></span>{{{noticeMsg}}}</div>{{/if}}')}),MSPanel.Stage=Ember.View.extend({classNames:["msp-slide-stage"],attributeBindings:["style"],template:Ember.Handlebars.compile('<div id="stage-bg" class="msp-stage-bg"></div><div id="overlaybox" {{bind-attr class=":msp-stage-pattern :ms-pattern controller.slide.pattern"}}></div>'),resize:function(){var w=this.get("controller.sliderSettings.width"),h=this.get("controller.sliderSettings.height");this.set("width",w),this.set("height",h),this.$().css({width:w,height:h})}.observes("controller.sliderSettings.width","controller.sliderSettings.height","parentView.zoom").on("didInsertElement"),didInsertElement:function(){var BG=this.$("#stage-bg"),BGImage=$("<img/>");BGImage.css("visibelity","hidden").each($.jqLoadFix);var aligner=new MSAligner(this.get("controller.slide.fillMode"),BG,BGImage);this.set("bgAligner",aligner),this.set("bgImg",BGImage),this.onBGChange()},onBGColorChange:function(){var color=this.get("controller.slide.bgColor");Ember.isEmpty(color)?this.$("#stage-bg").css("background-color",""):this.$("#stage-bg").css("background-color",color)}.observes("controller.slide.bgColor").on("didInsertElement"),onColorOverlayChange:function(){var color=this.get("controller.slide.colorOverlay");Ember.isEmpty(color)?this.$("#overlaybox").css("background-color",""):this.$("#overlaybox").css("background-color",color)}.observes("controller.slide.colorOverlay").on("didInsertElement"),onBGChange:function(){var alinger=this.get("bgAligner");alinger&&alinger.reset();var bg=this.get("controller.slide.bg"),bgImg=this.get("bgImg");if(Ember.isEmpty(bg))bgImg.detach();else{var that=this;bgImg.appendTo(this.$("#stage-bg")),bgImg.preloadImg(bg,function(event){that._onBGLoad(event)}),bgImg.attr("src",bg)}}.observes("controller.slide.bg"),_onBGLoad:function(event){var aligner=this.get("bgAligner");aligner&&(aligner.init(event.width,event.height),aligner.align(),this.get("bgImg").css("visibelity",""))},onFillModeChanged:function(){var aligner=this.get("bgAligner");aligner.changeType(this.get("controller.slide.fillMode"))}.observes("controller.slide.fillMode"),willDestroyElement:function(){$(document).off("keydown",this.moveLayer),this.set("bgAligner",null)}}),MSPanel.ControlBtn=Ember.View.extend({control:null,tagName:"div",active:!1,classNames:["msp-control-btn"],classNameBindings:["active:msp-blue-btn"],template:Ember.Handlebars.compile('<span class="msp-control-label">{{view.control.label}}</span><a href="#" {{action "removeControl" target=view bubbles=false}}><span class="msp-control-removes msp-ico msp-ico-whiteremove"></span></a>'),didInsertElement:function(){},onActiveChange:function(){this.set("active",this.get("controller.currentControl")===this.get("control")),this.get("active")&&this.get("controller").send("showControlOptions")}.observes("controller.currentControl").on("init"),click:function(){this.get("active")||this.set("controller.currentControl",this.get("control"))},actions:{removeControl:function(){confirm('Are you sure want to remove "'+this.get("control.label")+'" control?')&&this.get("controller").send("removeControl",this.get("control"))}}}),function($){function WPEditorTemplate(id){var newEditor=$(hiddenEditor);return newEditor.find("link").remove(),newEditor.html().replace(/msp-hidden/g,id)}MSPanel.MetaBoxComponent=Ember.Component.extend({tagName:"div",classNames:["msp-metabox"],layout:Ember.Handlebars.compile('<div class="msp-metabox-handle"><h3 class="msp-metabox-title">{{title}}</h3><div class="msp-metabox-toggle"></div></div>{{yield}}<div class="clear"> </div>')}),Ember.TEMPLATES["components/tabs-panel"]=Ember.Handlebars.compile("{{yield}}"),MSPanel.TabsPanelComponent=Ember.Component.extend({tagName:"div",attributeBindings:["id"],classNames:["msp-metabox msp-metabox-tabs"],didInsertElement:function(){this.$().avertaLiveTabs()}}),MSPanel.SwitchBoxComponent=Ember.Component.extend({classNames:["msp-switchbox"],offlable:"OFF",onlable:"ON",value:!1,layout:Ember.Handlebars.compile('<div class="msp-switch-cont"><span class="msp-switch-off">{{view.offlable}}</span><div class="msp-switch-handle"></div><span class="msp-switch-on">{{view.onlable}}</span></div>'),click:function(){var that=this;that.set("value",!that.get("value"))},update:function(){this.get("value")?this.$().addClass("switched"):this.$().removeClass("switched")}.observes("value").on("didInsertElement")}),MSPanel.AddDynamicTag=Ember.View.extend({classNames:["msp-add-dynamic-tags"],editorId:null,template:Ember.Handlebars.compile('<button {{action "addTag" target=view}} class="msp-add-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-ddlist"></div>'),didInsertElement:function(){for(var select=$("<select></select>").appendTo(this.$(".msp-ddlist")).width(220),i=0,l=MSPanel.dynamicTags.length;i!==l;i++)select.append('<option value="'+MSPanel.dynamicTags[i].tag+'">'+MSPanel.dynamicTags[i].name+"</option>");
|
10 |
this.set("select",select)},actions:{addTag:function(){var id=this.get("editorId");tinymce&&$("#wp-"+id+"-wrap").hasClass("tmce-active")?tinymce.get(id).execCommand("insertHTML",!1,this.get("select").val()):$("#"+id).insertAtCaret(this.get("select").val())}}});var hiddenEditor=jQuery("#mspHiddenEditor")[0].outerHTML,__tmc_msp_id=0;MSPanel.WPEditor=Ember.View.extend({classNames:["msp-wp-editor"],_id:null,template:null,tab:null,tabs:null,onInit:function(){var id="msp-wpeditor-"+__tmc_msp_id;this.set("_id",id),this.set("template",Ember.Handlebars.compile(WPEditorTemplate(id))),__tmc_msp_id++}.on("init"),didInsertElement:function(){var tabs=this.get("tabs");return Ember.isEmpty(tabs)?void this.createEditor():void $("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.createEditor()},createEditor:function(){if(this.get("inited")!==!0){this.set("inited",!0);var id=this.get("_id"),that=this;if(window.tinymce){var settings=$.extend({},window.tinyMCEPreInit.mceInit["msp-hidden"]||{});settings.forced_root_block="",settings.force_br_newlines=!0,settings.force_p_newlines=!1,settings.wpautop=!1,"3"==tinyMCE.majorVersion?(settings.body_class=settings.elements=id,settings.setup=function(ed){ed.onInit.add(function(){that.initEditor(tinyMCE.getInstanceById(id))})},tinymce.init(settings)):"4"==tinyMCE.majorVersion&&(settings.body_class="content post-type-post post-status-auto-draft post-format-standard",settings.selector="#"+id,settings.setup=function(ed){ed.on("init",function(){that.initEditor(tinyMCE.get(id))})},tinymce.init(settings))}var qtags,qtagSettings=$.extend({},window.tinyMCEPreInit.qtInit["msp-hidden"]||{});qtagSettings.id=id,"function"==typeof QTags&&(qtags=quicktags(qtagSettings),QTags.buttonsInitDone=!1,QTags._buttonsInit(),that.set("qtags",qtags),window.tinymce?switchEditors.go(id,"html"):this.onValueChanged(),this.$("textarea#"+this.get("_id")).on("change keyup paste",function(){that.set("value",$(this).val())}))}},initEditor:function(mce){function internalUpdate(){that.set("internalChange",!0),that.set("value",mce.getContent()),that.set("internalChange",!1)}var id=this.get("_id"),that=(this.get("value"),this);this.$(".wp-editor-wrap").on("mousedown",function(){wpActiveEditor=id}),"3"==tinyMCE.majorVersion?(mce.onChange.add(internalUpdate),mce.onKeyUp.add(internalUpdate)):"4"==tinyMCE.majorVersion&&(mce.on("change",internalUpdate),mce.on("keyup",internalUpdate)),this.$().click(internalUpdate),setTimeout(function(){switchEditors.go(id,"html"),switchEditors.go(id,"tmce")},100),this.set("mce",mce),this.onValueChanged()},onValueChanged:function(){if(this.get("inited")){var value=this.get("value");if(this.$("textarea#"+this.get("_id")).val(value),this.get("internalChange"))return void this.set("internalChange",!1);if(window.tinymce){var mce=this.get("mce");Ember.isEmpty(mce)||null==value?null==value&&mce.setContent(" "):mce.setContent(value)}}}.observes("value"),willDestroyElement:function(){if(this.get("inited")){window.tinymce&&tinymce.remove(this.get("_id"));var qtags=this.get("qtags");qtags&&($(qtags.toolbar).remove(),qtags.toolbar=null,qtags=null,QTags.instances[this.get("_id")]&&delete QTags.instances[this.get("_id")],this.$("textarea#"+this.get("_id")).remove());var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor)}}}),jQuery.ui&&jQuery.ui.spinner&&(jQuery.ui.spinner.prototype._events.mousewheel=function(event,delta){if(delta&&this.element.is(":focus")){if(!this.spinning&&!this._start(event))return!1;this._spin((delta>0?1:-1)*this.options.step,event),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(event)},100),event.preventDefault()}}),MSPanel.NumberInputView=Ember.View.extend({step:1,min:0,tagName:"input",attributeBindings:["type"],lastValue:null,type:"text",didInsertElement:function(){var that=this,input=this.$(),updateValue=function(){var value=input.spinner("value");that.set("internalChange",!0),isNaN(value)||null==value?that.set("value",void 0):that.set("value",parseFloat(value))};input.on("change",updateValue).spinner({step:this.get("step"),numberFormat:"n",min:this.get("min"),max:this.get("max"),spin:updateValue,stop:updateValue}).spinner("value",this.get("value"))},onValueChanged:function(){this.get("internalChange")&&this.set("internalChange",!1),this.$().spinner("value",this.get("value"))}.observes("value")}),Ember.Handlebars.helper("number-input",MSPanel.NumberInputView),MSPanel.ColorPickerComponent=Ember.Component.extend({tagName:"input",classNames:"msp-color-picker",value:null,didInsertElement:function(){var that=this;this.$().spectrum({color:this.get("value"),allowEmpty:!0,showInput:!0,showAlpha:!0,clickoutFiresChange:!0,preferredFormat:"hex6",change:function(color){null===color?that.set("value",null):that.set("value",color.toString())}})},willDestroyElement:function(){this.$().spectrum("destroy")},onValueChanged:function(){this.$().spectrum("set",this.get("value"))}.observes("value")}),MSPanel.DropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.MultiDropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-ddlist-multiselect"],layout:Ember.Handlebars.compile("<select {{bind-attr size=view.size}} multiple>{{yield}}</select>"),value:null,width:100,size:7,didInsertElement:function(){var that=this;this.$("select").on("change",function(){that.set("value",$(this).val())}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.GoogleFontsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select"],defaultTemplate:Ember.Handlebars.compile('<select><option value="--" selected>Loading fonts..</option></select>'),value:null,variants:null,width:210,didInsertElement:function(){var that=this;GFonts.getList(function(){that.$("select").html('<option value="--" selected>-- select --</option>'+GFonts.generateSelectList()),that.onValueChanged(),that.$("select").trigger("change")}),this.$("select").on("change",function(){var option=that.$("select option:selected");"--"===option.val()?(that.set("value",void 0),that.set("variants",void 0)):(that.set("value",option.attr("value")),that.set("variants",option.attr("data-variants")))}).width(this.get("width")),that.onValueChanged()},onValueChanged:function(){this.$("select").val(Ember.isEmpty(this.get("value"))?"--":this.get("value"))}.observes("value")}),MSPanel.GoogleFontWeightsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select msp-gfonts-weight"],defaultTemplate:Ember.Handlebars.compile("<select></select>"),variants:null,value:null,width:120,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");return 0===option.length?void that.$("select").val("normal"):void("--"===option.val()?that.set("value",null):that.set("value",option.attr("value")))}).width(this.get("width")),that.updateVariants()},updateVariants:function(){var variants=this.get("variants");if(Ember.isEmpty(variants))this.$("select").html("<option>Select font</option>");else{var options="",value=this.get("value");variants=variants.split(",");for(var i=0,l=variants.length;i!==l;i++)-1===variants[i].indexOf("italic")&&(options+="regular"===variants[i]?'<option value="normal"'+("normal"===value?"selected":"")+">Normal</option>":'<option value="'+variants[i]+'"'+(value===variants[i]?"selected":"")+">"+variants[i]+"</option>");this.$("select").html(options).trigger("change")}}.observes("variants")}),MSPanel.CodeMirrorComponent=Ember.Component.extend({classNames:["msp-codemirror"],width:250,height:200,mode:"css",tab:null,tabs:null,layout:Ember.Handlebars.compile("<textarea>{{yield}}</textarea>"),didInsertElement:function(){this.$().width(this.get("width")).height(this.get("height"));var that=this,editor=CodeMirror.fromTextArea(this.$(">textarea")[0],{lineNumbers:!0,mode:this.get("mode")});editor.on("change",function(){that.set("internalChange",!0),that.set("value",editor.getValue())}),this.set("editor",editor);var value=this.get("value");Ember.isEmpty(value)||editor.setValue(value);var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},onValueChanged:function(){return this.get("internalChange")===!0?void this.set("internalChange",!1):(this.get("editor").setValue(this.get("value")),void this.set("internalChange",!1))}.observes("value"),refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.get("editor").refresh()},willDestroyElement:function(){var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor);var editor=this.get("editor");editor.toTextArea(),editor=null,this.set("editor",null)}});for(var patterns='<div class="msp-pattern-prev ms-pattern"></div>',i=1;30>=i;i++)patterns+='<div class="msp-pattern-prev ms-pattern ms-patt-'+i+'" data-pattern="ms-patt-'+i+'" style="'+(i>15?"background-color:black;":"")+'"></div>';MSPanel.PatternPickerComponent=Ember.Component.extend({tagName:"div",classNames:["msp-pattern-picker"],value:null,patternBoxIsOpen:!1,layout:Ember.Handlebars.compile('<div class="msp-pattern-control sp-replacer sp-light"><div {{bind-attr class=":ms-pattern-preview :ms-pattern view.value"}}></div><div class="sp-dd">▼</div></div><div class="msp-patterns-box">'+patterns+"</div>"),didInsertElement:function(){this.$(".msp-pattern-control").on("click",{that:this},this.togglePatternbox),$(document).on("click",{that:this},this.closePatternbox),this.$(".msp-patterns-box").css("display","none").on("click",function(e){e.stopPropagation()}).find(".ms-pattern").on("click",{that:this},this.selectPattern)},togglePatternbox:function(e){var that=e.data.that;e.stopPropagation(),that.get("patternBoxIsOpen")&&that.closePatternbox(e),that.$(".msp-patterns-box").css("display",""),that.set("patternBoxIsOpen",!0)},closePatternbox:function(e){var that=e.data.that;that.get("patternBoxIsOpen")&&(that.$(".msp-patterns-box").css("display","none"),that.set("patternBoxIsOpen",!1))},selectPattern:function(e){e.stopPropagation();var that=e.data.that;that.set("value",$(this).data("pattern"))},willDestroyElement:function(){this.$(".msp-patterns-box").off("click",this.togglePatternbox).find(".ms-pattern").off("click"),$(document).off("click",this.closePatternbox)}})}(jQuery),MSPanel.pushData=null,MSPanel.ApplicationController=Ember.Controller.extend({isFlickr:"flickr"===__MSP_TYPE,isFacebook:"facebook"===__MSP_TYPE,isPost:"post"===__MSP_TYPE,isWcproduct:"wc-product"===__MSP_TYPE,sliderId:MSPanel.SliderID,isSending:!1,statusMsg:"",hasError:!1,onInit:function(){window.$||(window.$=jQuery.noConflict()),MSPanel.Settings.find(),MSPanel.Slide.find(),MSPanel.Layer.find(),MSPanel.Style.find(),MSPanel.Effect.find(),MSPanel.PresetStyle.find(),MSPanel.PresetEffect.find(),MSPanel.Control.find(),MSPanel.Callback.find(),MSPanel.ButtonStyle.find(),this.set("disableControls",MSPanel.Settings.find(0).get("disableControls"));var that=this;MSPanel.pushData=function(){that.prepareData()},MSPanel.createButton=this.createButton,"wc-product"===__MSP_TYPE&&null==__MSP_POST&&null!=__WC_INSTALL_URL&&(this.set("hasError",!0),this.set("errorTemplate","wooc-error"),this.set("wooLink",__WC_INSTALL_URL)),this.generateButtonStyles(),this.set("shortCode",'[masterslider id="'+this.get("sliderId")+'"]'),this.set("phpFunction","<?php masterslider("+this.get("sliderId")+"); ?>"),jQuery("#panelLoading").remove(),window._msp_init_timeout&&clearTimeout(window._msp_init_timeout),$(window).scroll(function(){$(window).scrollTop()+$(window).height()>=$(document).height()-45?($("#saveBar").removeClass("msp-sticky-bar"),$("#saveBarPlaceHolder").css("display","none")):($("#saveBar").addClass("msp-sticky-bar"),$("#saveBarPlaceHolder").css("display",""))}).trigger("scroll"),$("#timeAgo").timeago(),setInterval($.proxy(this.updateSavedTime,this),3e4),$(document).bind("keydown",function(e){return(e.metaKey||e.ctrlKey)&&83==e.which?(e.preventDefault(),that.get("isSending")||that.send("saveAll"),!1):void 0})}.on("init"),updateSliderSlugShortCodes:function(){var alias=this.get("sliderSlug");Ember.isEmpty(alias)&&(alias=MSPanel.SliderSlug),this.set("shortCodeSlug",'[masterslider alias="'+alias+'"]'),this.set("phpFunctionSlug",'<?php masterslider("'+alias+'"); ?>')}.observes("sliderSlug").on("init"),prepareData:function(){var fonts={},font_str="";MSPanel.Style.find().forEach(function(record){var font=record.get("fontFamily"),weight=record.get("fontWeight");Ember.isEmpty(font)||(fonts[font]||(fonts[font]=[]),"normal"===weight&&(weight="regular"),Ember.isEmpty(weight)||-1!==fonts[font].indexOf(weight)||fonts[font].push(weight))});for(var font in fonts)font_str+=font.replace(/\s/,"+")+":"+fonts[font].join(",")+"|";MSPanel.Settings.find(1).set("usedFonts",font_str.slice(0,-1)),this.saveRecords(MSPanel.Settings.find()),this.saveRecords(MSPanel.Slide.find()),this.saveRecords(MSPanel.Layer.find()),this.saveRecords(MSPanel.Style.find()),this.saveRecords(MSPanel.Effect.find()),this.saveRecords(MSPanel.PresetStyle.find()),this.saveRecords(MSPanel.PresetEffect.find()),this.saveRecords(MSPanel.Control.find()),this.saveRecords(MSPanel.Callback.find()),this.saveRecords(MSPanel.ButtonStyle.find())},generateButtonStyles:function(){var styles=MSPanel.ButtonStyle.find(),css="",$styleElement=$("#msp-buttons");styles.forEach(function(style){css+="."+style.get("className")+" {"+style.get("normal")+"}\n."+style.get("className")+":hover {"+style.get("hover")+"}\n."+style.get("className")+":active {"+style.get("active")+"}\n"}),0===$styleElement.length?$styleElement=$('<style id="msp-buttons"></style>').text(css).appendTo($("head")):$styleElement.text(css)},actions:{saveAll:function(){this.prepareData(),this.sendData()},showPreview:function(event){window.lunchMastersliderPreview&&lunchMastersliderPreview(event)}},saveRecords:function(records){records.forEach(function(record){record.save()})},sendData:function(){this.set("statusMsg",__MSP_LAN.ap_001),this.set("isSending",!0),this.set("savingStatus","msp-saving");var that=this;jQuery.post(__MS.ajax_url,{action:"msp_panel_handler",nonce:jQuery("#msp-main-wrapper").data("nonce"),msp_data:B64.encode(JSON.stringify(MSPanel.data)),preset_style:B64.encode(JSON.stringify(MSPanel.PSData)),preset_effect:B64.encode(JSON.stringify(MSPanel.PEData)),buttons:B64.encode(JSON.stringify(MSPanel.PBData)),slider_id:MSPanel.SliderID},function(res){that.set("statusMsg",res.message),that.set("isSending",!1),res.success===!0?(that.set("savingStatus","msp-save-succeed"),that.startAutoHideMsg()):that.set("savingStatus","msp-save-error")})},startAutoHideMsg:function(){var timeout=this.get("msgTimeout"),that=this;Ember.isEmpty(timeout)||clearTimeout(timeout),this.set("timeout",setTimeout(function(){that.set("savingStatus","msp-save-hide msp-save-succeed"),$("#timeAgo").attr("title",(new Date).toISOString()),that.updateSavedTime()},2e3))},updateSavedTime:function(){var timeEle=$("#timeAgo");timeEle.attr("title")&&$("#timeAgo").timeago("updateFromDOM")},createButton:function(normal,hover,active,style,size){var newPreset=MSPanel.ButtonStyle.create({normal:normal,hover:hover,active:active,size:size,style:style});newPreset.save(),newPreset.set("className","msp-preset-btn-"+newPreset.get("id")),newPreset.save()}}),MSPanel.SettingsController=Ember.ObjectController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,sliderSkins:__MSP_SKINS,needs:["application","controls"],showAutoHeight:!1,showNearbyNum:!1,showWrapperWidth:!1,preloadMethod:null,setup:function(){var preload=this.get("preload");"all"===preload||"-1"===preload?this.set("preloadMethod",preload):this.set("preloadMethod","nearby"),this.set("draftMSTemplate",this.get("msTemplate"))},sliderLayoutChanged:function(){var layout=this.get("layout");"fullscreen"===layout||"autofill"===layout?(this.set("showAutoHeight",!1),this.set("autoHeight",!1)):this.set("showAutoHeight",!0),this.set("showWrapperWidth","boxed"===layout||"partialview"===layout),this.set("showAutoFillTarget","autofill"===layout),this.set("showMinHeight","fullscreen"!==layout&&"autofill"!==layout&&!this.get("autoHeight")),this.set("showFSMargin","fullscreen"===layout)}.observes("layout","autoHeight").on("setup"),preloadSetup:function(){var preloadMethod=this.get("preloadMethod");if("nearby"===preloadMethod){this.set("showNearbyNum",!0);var preload=this.get("preload");("all"===preload||"-1"===preload)&&this.set("preload","0")}else this.set("showNearbyNum",!1),this.set("preload",preloadMethod)}.observes("preloadMethod").on("setup"),actions:{}}),MSPanel.SlidesController=Ember.ArrayController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,_order:-1,bgImgSelector:null,sortProperties:["order"],stylesController:null,effectsController:null,buttonsController:null,layersList:[],layersController:null,mainView:null,isFirst:!0,currentSlide:null,setup:function(){if(Ember.isEmpty(this.get("sliderSettings.type"))&&this.set("sliderSettings.type",__MSP_TYPE),this.set("sliderSettings.sliderId",MSPanel.SliderID),0!==this.get("length")){var slide=this.get("firstObject");this.set("currentSlide",slide),this.updateOrder()}},slide:function(){return this.get("currentSlide")}.property("currentSlide"),duplicateSlide:function(slide){var slideProp=slide.toJSON();delete slideProp.id;var newSlide=MSPanel.Slide.create(slideProp);newSlide.set("order",slide.get("order")+1),this.forEach(function(_slide){var slide_order=_slide.get("order"),nslide_order=newSlide.get("order");slide_order>=nslide_order&&_slide!==newSlide&&_slide.set("order",slide_order+1)}),newSlide.save(),this.updateOrder()},updateSlidesSort:function(indexes){this.beginPropertyChanges(),this.forEach(function(slide){slide.set("order",indexes[slide.get("id")])},this),this.endPropertyChanges(),this.set("_order",this.get("lastObject.order"))},updateOrder:function(){var i=0;this.forEach(function(slide){slide.get("isOverlayLayers")||slide.set("order",i++)}),this.set("_order",i-1)},removeSlide:function(slide){slide.deleteRecord(),0!==this.get("length")&&(this.send("select",this.get("firstObject")),this.updateOrder())},onImageSelect:function(){var uploaderFrame=this.get("uploaderFrame"),selection=uploaderFrame.state().get("selection"),self=this;selection.map(function(attachment){attachment=attachment.toJSON(),self.generateSlide(attachment,attachment.url,(attachment.sizes.thumbnail||attachment.sizes.full).url)}),this.send("select",this.get("lastObject"))},generateSlide:function(attachment,bg,thumb){var slide=MSPanel.Slide.create({order:this.get("_order")+1,bg:bg,bgThumb:thumb,bgAlt:attachment.alt,bgTitle:attachment.title});this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},actions:{addSlides:function(){var uploaderFrame=this.get("uploaderFrame");Ember.isEmpty(uploaderFrame)&&(uploaderFrame=wp.media.frames.frame=wp.media({title:__MSP_LAN.slc_001||"Select background image for new slide. (Multiple selection is available)",multiple:!0,frame:"select",library:{type:"image"},button:{text:__MSP_LAN.slc_002||"Create Slide(s)"}}),uploaderFrame.on("select",$.proxy(this.onImageSelect,this)),this.set("uploaderFrame",uploaderFrame)),uploaderFrame.open()},newSlide:function(){var slide=MSPanel.Slide.create({order:this.get("_order")+1});this.set("currentSlide",slide),this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},select:function(slide){slide!==this.get("currentSlide")&&this.set("currentSlide",slide)}}}),MSPanel.ControlsController=Ember.ArrayController.extend({needs:"application",controls:[{used:!1,label:__MSP_LAN.cc_001,value:"arrows"},{used:!1,label:__MSP_LAN.cc_002,value:"timebar"},{used:!1,label:__MSP_LAN.cc_003,value:"bullets"},{used:!1,label:__MSP_LAN.cc_004,value:"circletimer"},{used:!1,label:__MSP_LAN.cc_005,value:"scrollbar"},{used:!1,label:__MSP_LAN.cc_006,value:"slideinfo"},{used:!1,label:__MSP_LAN.cc_007,value:"thumblist"}],selectedControl:null,availableControls:[],noMore:!1,currentControl:null,setup:function(){var that=this;this.forEach(function(control){that.findControlObj(control.get("name")).used=!0}),this.set("availableControls",this.findAvailableControls())},onInsertThumb:function(){var ctr=this.get("currentControl");Ember.isEmpty(ctr)||("tabs"===this.get("currentControl.type")?this.set("isTab",!0):this.set("isTab",!1))}.observes("currentControl.type").on("didInsertElement"),actions:{addControl:function(){var control,controlName=this.get("selectedControl"),controlObj=this.findControlObj(controlName);control=MSPanel.Control.create(this.getDefaultValues(controlName)),control.set("label",controlObj.label),controlObj.used=!0,this.set("availableControls",this.findAvailableControls()),control.save(),this.set("currentControl",control)},removeControl:function(control){this.findControlObj(control.get("name")).used=!1,this.set("availableControls",this.findAvailableControls()),control.deleteRecord(),this.set("currentControl",this.get("firstObject")),this.send("showControlOptions")},showControlOptions:function(){var currentControl=this.get("currentControl");Ember.isEmpty(currentControl)?this.set("controlOptions","empty-template"):this.set("controlOptions",currentControl.get("name")+"-options")}},findControlObj:function(control){for(var controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)if(controls[i].value===control)return controls[i];return null},findAvailableControls:function(){for(var avc=[],controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)controls[i].used||avc.push(controls[i]);return this.set("noMore",0===avc.length),this.set("selectedControl",avc[0]?avc[0].value:null),avc},getDefaultValues:function(control){var values={name:control};switch(values.inset=!("slideinfo"===control||"thumblist"===control),control){case"timebar":values.align="bottom",values.color="#FFFFFF",values.autoHide=!1,values.width=4;break;case"bullets":values.align="bottom",values.dir="h",values.margin=10,values.space=6;break;case"circletimer":values.color="#A2A2A2",values.stroke=10,values.radius=4,values.autoHide=!1;break;case"scrollbar":values.align="top",values.dir="h",values.color="#3D3D3D",values.margin=10,values.autoHide=!1,values.width=4;break;case"slideinfo":values.align="bottom",values.margin=10,values.autoHide=!1;break;case"thumblist":values.align="bottom",values.space=5,values.width=100,values.height=80,values.margin=10,values.fillMode="fill",values.autoHide=!1}return values}}),MSPanel.CallbacksController=Ember.ArrayController.extend({callbacks:[{used:!1,label:__MSP_LAN.cb_011,value:"INIT"},{used:!1,label:__MSP_LAN.cb_001,value:"CHANGE_START"},{used:!1,label:__MSP_LAN.cb_002,value:"CHANGE_END"},{used:!1,label:__MSP_LAN.cb_003,value:"WAITING"},{used:!1,label:__MSP_LAN.cb_004,value:"RESIZE"},{used:!1,label:__MSP_LAN.cb_005,value:"VIDEO_PLAY"},{used:!1,label:__MSP_LAN.cb_006,value:"VIDEO_CLOSE"},{used:!1,label:__MSP_LAN.cb_007,value:"SWIPE_START"},{used:!1,label:__MSP_LAN.cb_008,value:"SWIPE_MOVE"},{used:!1,label:__MSP_LAN.cb_009,value:"SWIPE_END"}],availableCallbacks:[],noMore:!1,selectedCallback:null,setup:function(){var that=this;this.forEach(function(callback){that.findCallbackObj(callback.get("name")).used=!0}),this.set("availableCallbacks",this.findAvailableCallbacks())},actions:{addCallback:function(){var callback,callbackName=this.get("selectedCallback"),callbackObj=this.findCallbackObj(callbackName);callback=MSPanel.Callback.create({name:callbackObj.value,label:callbackObj.label}),callbackObj.used=!0,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.save()},removeCallback:function(callback){confirm(__MSP_LAN.cb_010.jfmt(callback.get("label")))&&(this.findCallbackObj(callback.get("name")).used=!1,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.deleteRecord())}},findCallbackObj:function(callback){for(var callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)if(callbacks[i].value===callback)return callbacks[i];return null},findAvailableCallbacks:function(){for(var avc=[],callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)callbacks[i].used||avc.push(callbacks[i]);return this.set("noMore",0===avc.length),this.set("selectedCallback",avc[0]?avc[0].value:null),avc}});
|
admin/views/slider-panel/js/msp.required.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Panel - Required JS Modules
|
3 |
-
* @date
|
4 |
*/
|
5 |
/*!
|
6 |
* @overview Averta JavaScript Libraries
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Panel - Required JS Modules
|
3 |
+
* @date May 2017
|
4 |
*/
|
5 |
/*!
|
6 |
* @overview Averta JavaScript Libraries
|
includes/init/define.php
CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') ) {
|
|
5 |
die();
|
6 |
}
|
7 |
|
8 |
-
define( 'MSWP_AVERTA_VERSION' , '
|
9 |
|
10 |
define( 'MSWP_SLUG' , 'master-slider' );
|
11 |
define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
|
5 |
die();
|
6 |
}
|
7 |
|
8 |
+
define( 'MSWP_AVERTA_VERSION' , '3.0.0' );
|
9 |
|
10 |
define( 'MSWP_SLUG' , 'master-slider' );
|
11 |
define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
|
includes/msp-shortcodes.php
CHANGED
@@ -707,6 +707,11 @@ function msp_masterslider_slide_shortcode( $atts, $content = null ) {
|
|
707 |
// if blank image is not set use original img instead
|
708 |
$src_blank = empty( $src_blank ) ? $src : $src_blank;
|
709 |
|
|
|
|
|
|
|
|
|
|
|
710 |
// decode escaped square brackets
|
711 |
$title = str_replace( array( "%5B", "%5D" ), array('[', ']'), $title );
|
712 |
$alt = str_replace( array( "%5B", "%5D" ), array('[', ']'), $alt );
|
707 |
// if blank image is not set use original img instead
|
708 |
$src_blank = empty( $src_blank ) ? $src : $src_blank;
|
709 |
|
710 |
+
if( ! empty( $pattern ) || ! empty( $tintcolor ) ){
|
711 |
+
$inline_style = ! empty( $tintcolor ) ? 'style="background-color:' . $tintcolor . ';"' : '';
|
712 |
+
$slide_content .= "\t\t\t\t\t" . sprintf('<div class="ms-pattern %s" %s ></div>', $pattern, $inline_style )."\n";
|
713 |
+
}
|
714 |
+
|
715 |
// decode escaped square brackets
|
716 |
$title = str_replace( array( "%5B", "%5D" ), array('[', ']'), $title );
|
717 |
$alt = str_replace( array( "%5B", "%5D" ), array('[', ']'), $alt );
|
master-slider.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Plugin Name: Master Slider
|
12 |
* Plugin URI: https://wordpress.org/plugins/master-slider/
|
13 |
* Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
|
14 |
-
* Version:
|
15 |
* Author: averta
|
16 |
* Author URI: http://averta.net
|
17 |
* Text Domain: master-slider
|
11 |
* Plugin Name: Master Slider
|
12 |
* Plugin URI: https://wordpress.org/plugins/master-slider/
|
13 |
* Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
|
14 |
+
* Version: 3.0.0
|
15 |
* Author: averta
|
16 |
* Author URI: http://averta.net
|
17 |
* Text Domain: master-slider
|
public/assets/css/masterslider.main.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Main CSS File
|
3 |
-
* @date
|
4 |
*/
|
5 |
|
6 |
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Main CSS File
|
3 |
+
* @date May 2017
|
4 |
*/
|
5 |
|
6 |
|
public/class-master-slider.php
CHANGED
@@ -258,6 +258,20 @@ class Master_Slider {
|
|
258 |
|
259 |
// add masterslider custom caps
|
260 |
self::assign_custom_caps();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
do_action( 'masterslider_activated', get_current_blog_id() );
|
262 |
}
|
263 |
|
258 |
|
259 |
// add masterslider custom caps
|
260 |
self::assign_custom_caps();
|
261 |
+
|
262 |
+
// determine the pro feature content type for panel tab
|
263 |
+
if( ! get_option( 'master-slider_ab_pro_feature_panel_content_type', 0 ) ){
|
264 |
+
update_option( 'master-slider_ab_pro_feature_panel_content_type', rand(1, 2) );
|
265 |
+
}
|
266 |
+
|
267 |
+
// determine the pro feature content type for pro setting page
|
268 |
+
if( ! get_option( 'master-slider_ab_pro_feature_setting_content_type', 0 ) ){
|
269 |
+
update_option( 'master-slider_ab_pro_feature_setting_content_type', rand(1, 2) );
|
270 |
+
}
|
271 |
+
|
272 |
+
// dont display phlox notice in first 3 days
|
273 |
+
set_transient( 'masterslider_display_phlox_notice', 1, 3 * DAY_IN_SECONDS );
|
274 |
+
|
275 |
do_action( 'masterslider_activated', get_current_blog_id() );
|
276 |
}
|
277 |
|