Version Description
- 27. June 2017. =
- Feature: Content builder mode in slide editor https://www.youtube.com/watch?v=2nRabX8miDY
- Feature: Slide library with tons of new premade slides https://www.youtube.com/watch?v=zzdoYHOqLnI
- Feature: Structure - build slides with rows and columns https://www.youtube.com/watch?v=Aj5BieYjxnc
- Feature: Blur effect for slide backgrounds
- Feature: Blur layer animation
- Feature: Copy and paste slides
- Feature: Move slide between sliders
- Feature: Slider displays itself in the live editor of different page builders. (Beaver Builder, Elementor, Visual Composer)
- Feature: Google font family list updated
- Feature: Adjust slider width to parent selector option for the Fullwidth and Fullpage responsive mode
- Feature: Column count is not limited anymore
- Feature: Italian translation
- Feature: Clear: both option before the slider
- Feature: font-weight: 100 now selectable
- Feature: Slide bulk select improved
- Feature: Grab cursor will only appear if slide count is greater than 1
- Feature: Other minor CSS and speed improvements
- Feature: Admin label for Smart Slider 3 Divi module
- Feature: WordPress generator featured image alt tag
- Feature: Divi/Extra Layout Injector compatibility
- Feature: Beaver Builder 2.0 alpha patch compatibility
- Feature: Visual composer backend fix
- Feature: Elementor 1.5 compatibility changes
- Feature: Tailor Page Builder compatibility
- Feature: Unyson framework - builder compatibility
- Feature: MotoPress CE compatibility
- Fix: YouTube layer Play button
- Fix: Content mode fixes in Internet Explorer
- Fix: GSAP conflict prevented
- Fix: Static slide and content mode
- Fix: Invalid item data fix
- Fix: Pre load slider id
- Fix: IOS static slide fix
- Fix: Tooltip
- Fix: Column show/hide on different devices
- Fix: Text layer
- Fix: Elementor Pro template does not show sliders in certain settings
- Fix: Show editor icon fix
- Fix: Forcing MotoPress Content Editor to save down our shortcode and not just the html code
- Fix: Lightbox fix
- Fix: EasySocial album generator
- Fix: Revolution slider compatibility fix
- Removed: Weaker CSS selectors feature (not needed anymore)
- Removed: Slide layouts are not available, use copy slides between sliders.
Download this release
Release Info
Developer | nextendweb |
Plugin | Smart Slider 3 |
Version | 3.2.4 |
Comparing to | |
See all releases |
Code changes from version 3.1.10 to 3.2.4
- editor/editor.css +8 -0
- editor/editor.min.css +1 -1
- editor/shortcode.js +2 -2
- editor/shortcode.php +105 -81
- includes/elementor.php +0 -15
- includes/integrations/BeaverBuilder.php +32 -0
- includes/{divi.php → integrations/Divi.php} +19 -11
- includes/integrations/Elementor.php +120 -0
- includes/integrations/MotoPressCE.php +8 -0
- includes/integrations/VisualComposer.php +59 -0
- includes/integrations/beaver-builder-module/beaver-builder-module.php +37 -0
- includes/integrations/beaver-builder-module/includes/frontend.php +5 -0
- includes/integrations/tailor.php +9 -0
- includes/{extensions → integrations/unyson}/smartslider/manifest.php +0 -0
- includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/config.php +0 -0
- includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/options.php +0 -0
- includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/static/img/page_builder.png +0 -0
- includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/views/view.php +0 -0
- includes/shortcode.php +121 -10
- includes/smartslider3.php +50 -20
- includes/vc.php +0 -69
- includes/widget.php +17 -19
- library/media/admin/dist/smartslider-backend.css +2021 -1282
- library/media/admin/dist/smartslider-backend.min.css +1 -1
- library/media/admin/images/contentmode.png +0 -0
- library/media/admin/images/free/gettingstarted.png +0 -0
- library/media/admin/images/free/why-upgrade.png +0 -0
- library/media/admin/js/jqueryui/jquery-ui.canvas-item.js +43 -0
- library/media/admin/js/jqueryui/jquery-ui.canvas.js +585 -0
- library/media/admin/js/jqueryui/jquery-ui.columns.js +216 -0
- library/media/admin/js/jqueryui/jquery-ui.layer-list-item.js +35 -0
- library/media/admin/js/jqueryui/jquery-ui.layer-list.js +252 -0
- library/media/dist/smartslider-backend.js +9915 -6480
editor/editor.css
CHANGED
@@ -52,4 +52,12 @@
|
|
52 |
.n2-ss-editor-inner > iframe {
|
53 |
width: 100%;
|
54 |
height: 500px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
52 |
.n2-ss-editor-inner > iframe {
|
53 |
width: 100%;
|
54 |
height: 500px;
|
55 |
+
}
|
56 |
+
|
57 |
+
#elementor-panel .elementor-button-smartslider {
|
58 |
+
background-color: #a4afb7;
|
59 |
+
color: #fff;
|
60 |
+
line-height: 26px;
|
61 |
+
padding: 0 15px;
|
62 |
+
text-transform: uppercase;
|
63 |
}
|
editor/editor.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#n2-ss-editor-modal{position:fixed;left:0;top:0;width:100%;height:100%;display:none;z-index:10000001;background-color:rgba(43,52,63,.9)}#n2-ss-editor-modal.n2-active{display:block}.n2-ss-editor-inner{position:relative;top:10%;max-width:980px;height:80%;margin:0 auto;overflow:hidden;background:#fff}.n2-ss-editor-header{position:relative;border-bottom:1px solid #ccd1d6;border-top-left-radius:3px;border-top-right-radius:3px;overflow:hidden;background-color:#f2f5fa;line-height:59px;height:59px;padding:0 58px;text-align:center;font-size:20px;text-transform:capitalize;color:#6b7989}.n2-ss-editor-header-close{position:absolute;top:0;right:0;width:59px;height:59px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGFBMVEW5w8m5w8m5w8m5w8myvMOzvMO4wsgAAABdt9D1AAAACHRSTlNhxZstF/D+AIlGn1gAAACzSURBVHgBhZNbjsQwCASb9/1vvGKRCDMTqesnjrrsODagFodKZIYovJYVTPOg9i10LDCvcoO08iGY7KRdTuwRLOb1YJJh/8LkWj/oGC3Iza8hI/TgjZmIskx7zSdBaXvvdATfBSJ8Bh6xSziwO4gxOo/dBaCJGnyMeQxIhaTVNW5eloJIr2vcvDwDmfXgN28yqUA/QTdJf5MeFD1qdln0ulnBsJKjRUvLnjcObz3evLT9/wD6sBe9VsZBUQAAAABJRU5ErkJggg==) center center no-repeat;cursor:pointer}.n2-ss-editor-inner>iframe{width:100%;height:500px}
|
1 |
+
#n2-ss-editor-modal{position:fixed;left:0;top:0;width:100%;height:100%;display:none;z-index:10000001;background-color:rgba(43,52,63,.9)}#n2-ss-editor-modal.n2-active{display:block}.n2-ss-editor-inner{position:relative;top:10%;max-width:980px;height:80%;margin:0 auto;overflow:hidden;background:#fff}.n2-ss-editor-header{position:relative;border-bottom:1px solid #ccd1d6;border-top-left-radius:3px;border-top-right-radius:3px;overflow:hidden;background-color:#f2f5fa;line-height:59px;height:59px;padding:0 58px;text-align:center;font-size:20px;text-transform:capitalize;color:#6b7989}.n2-ss-editor-header-close{position:absolute;top:0;right:0;width:59px;height:59px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGFBMVEW5w8m5w8m5w8m5w8myvMOzvMO4wsgAAABdt9D1AAAACHRSTlNhxZstF/D+AIlGn1gAAACzSURBVHgBhZNbjsQwCASb9/1vvGKRCDMTqesnjrrsODagFodKZIYovJYVTPOg9i10LDCvcoO08iGY7KRdTuwRLOb1YJJh/8LkWj/oGC3Iza8hI/TgjZmIskx7zSdBaXvvdATfBSJ8Bh6xSziwO4gxOo/dBaCJGnyMeQxIhaTVNW5eloJIr2vcvDwDmfXgN28yqUA/QTdJf5MeFD1qdln0ulnBsJKjRUvLnjcObz3evLT9/wD6sBe9VsZBUQAAAABJRU5ErkJggg==) center center no-repeat;cursor:pointer}.n2-ss-editor-inner>iframe{width:100%;height:500px}#elementor-panel .elementor-button-smartslider{background-color:#a4afb7;color:#fff;line-height:26px;padding:0 15px;text-transform:uppercase}
|
editor/shortcode.js
CHANGED
@@ -16,8 +16,8 @@
|
|
16 |
return {
|
17 |
longname: "Smart Slider 3",
|
18 |
author: 'Nextendweb',
|
19 |
-
authorurl: '
|
20 |
-
infourl: '
|
21 |
version: "3.0"
|
22 |
};
|
23 |
}
|
16 |
return {
|
17 |
longname: "Smart Slider 3",
|
18 |
author: 'Nextendweb',
|
19 |
+
authorurl: 'https://smartslider3.com',
|
20 |
+
infourl: 'https://smartslider3.com',
|
21 |
version: "3.0"
|
22 |
};
|
23 |
}
|
editor/shortcode.php
CHANGED
@@ -11,7 +11,7 @@ class N2SSShortcodeInsert {
|
|
11 |
|
12 |
public static function addButton() {
|
13 |
N2Loader::import('libraries.settings.settings', 'smartslider');
|
14 |
-
if ((!current_user_can('edit_posts') && !current_user_can('edit_pages'))
|
15 |
return;
|
16 |
}
|
17 |
if (in_array(basename($_SERVER['PHP_SELF']), array(
|
@@ -21,9 +21,36 @@ class N2SSShortcodeInsert {
|
|
21 |
'page.php'
|
22 |
))) {
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
self::initButtonDialog();
|
25 |
|
26 |
-
add_action(
|
27 |
'N2SSShortcodeInsert',
|
28 |
'addButtonDialog'
|
29 |
));
|
@@ -31,26 +58,19 @@ class N2SSShortcodeInsert {
|
|
31 |
wp_enqueue_script('jquery-ui-dialog');
|
32 |
wp_enqueue_style("wp-jquery-ui-dialog");
|
33 |
|
34 |
-
|
35 |
-
add_filter('mce_external_plugins', array(
|
36 |
-
'N2SSShortcodeInsert',
|
37 |
-
'mceAddPlugin'
|
38 |
-
));
|
39 |
-
add_filter('mce_buttons', array(
|
40 |
-
'N2SSShortcodeInsert',
|
41 |
-
'mceRegisterButton'
|
42 |
-
));
|
43 |
-
}
|
44 |
}
|
45 |
}
|
46 |
|
47 |
public static function mceAddPlugin($plugin_array) {
|
48 |
$plugin_array['nextend2smartslider3'] = plugin_dir_url(__FILE__) . 'shortcode.js';
|
|
|
49 |
return $plugin_array;
|
50 |
}
|
51 |
|
52 |
public static function mceRegisterButton($buttons) {
|
53 |
array_push($buttons, "|", "nextend2smartslider3");
|
|
|
54 |
return $buttons;
|
55 |
}
|
56 |
|
@@ -61,90 +81,94 @@ class N2SSShortcodeInsert {
|
|
61 |
}
|
62 |
|
63 |
public static function addButtonDialog() {
|
64 |
-
|
65 |
?>
|
66 |
-
<div id=
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
<script type="text/javascript">
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
iframe.height(inner.height() - 59);
|
85 |
-
$window.on('resize.ss', function () {
|
86 |
iframe.height(inner.height() - 59);
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
100 |
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
103 |
hide();
|
104 |
-
}
|
105 |
-
});
|
106 |
-
$('.n2-ss-editor-header-close').on('click', function (e) {
|
107 |
-
e.preventDefault();
|
108 |
-
hide();
|
109 |
-
});
|
110 |
-
|
111 |
-
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
112 |
|
113 |
-
|
114 |
-
if (e.source == (iframe[0].contentWindow || iframe[0].contentDocument)) {
|
115 |
-
callback(e[e.message ? "message" : "data"]);
|
116 |
-
hide();
|
117 |
-
}
|
118 |
-
}, false);
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
124 |
};
|
125 |
-
show();
|
126 |
-
};
|
127 |
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
callback = function (id) {
|
131 |
-
|
132 |
};
|
133 |
show();
|
134 |
-
|
135 |
-
}
|
136 |
-
|
137 |
-
window.NextendSmartSliderDiviModal = function (button) {
|
138 |
-
var $input = $(button).siblings('.regular-text');
|
139 |
-
callback = function (id) {
|
140 |
-
$input.val(id);
|
141 |
};
|
142 |
-
show();
|
143 |
-
return false;
|
144 |
-
};
|
145 |
|
146 |
-
|
147 |
-
|
148 |
<?php
|
149 |
}
|
150 |
}
|
11 |
|
12 |
public static function addButton() {
|
13 |
N2Loader::import('libraries.settings.settings', 'smartslider');
|
14 |
+
if ((!current_user_can('edit_posts') && !current_user_can('edit_pages'))) {
|
15 |
return;
|
16 |
}
|
17 |
if (in_array(basename($_SERVER['PHP_SELF']), array(
|
21 |
'page.php'
|
22 |
))) {
|
23 |
|
24 |
+
self::addForced();
|
25 |
+
|
26 |
+
wp_enqueue_script('jquery-ui-dialog');
|
27 |
+
wp_enqueue_style("wp-jquery-ui-dialog");
|
28 |
+
|
29 |
+
if (intval(N2SmartSliderSettings::get('editor-icon', 1))) {
|
30 |
+
if (get_user_option('rich_editing') == 'true') {
|
31 |
+
add_filter('mce_external_plugins', array(
|
32 |
+
'N2SSShortcodeInsert',
|
33 |
+
'mceAddPlugin'
|
34 |
+
));
|
35 |
+
add_filter('mce_buttons', array(
|
36 |
+
'N2SSShortcodeInsert',
|
37 |
+
'mceRegisterButton'
|
38 |
+
));
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
public static function addForcedFrontend($action = 'wp_print_footer_scripts') {
|
45 |
+
self::addForced('wp_print_footer_scripts');
|
46 |
+
}
|
47 |
+
|
48 |
+
public static function addForced($action = 'admin_print_footer_scripts') {
|
49 |
+
static $added = false;
|
50 |
+
if (!$added) {
|
51 |
self::initButtonDialog();
|
52 |
|
53 |
+
add_action($action, array(
|
54 |
'N2SSShortcodeInsert',
|
55 |
'addButtonDialog'
|
56 |
));
|
58 |
wp_enqueue_script('jquery-ui-dialog');
|
59 |
wp_enqueue_style("wp-jquery-ui-dialog");
|
60 |
|
61 |
+
$added = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
}
|
64 |
|
65 |
public static function mceAddPlugin($plugin_array) {
|
66 |
$plugin_array['nextend2smartslider3'] = plugin_dir_url(__FILE__) . 'shortcode.js';
|
67 |
+
|
68 |
return $plugin_array;
|
69 |
}
|
70 |
|
71 |
public static function mceRegisterButton($buttons) {
|
72 |
array_push($buttons, "|", "nextend2smartslider3");
|
73 |
+
|
74 |
return $buttons;
|
75 |
}
|
76 |
|
81 |
}
|
82 |
|
83 |
public static function addButtonDialog() {
|
84 |
+
N2Loader::import('libraries.settings.settings', 'smartslider');
|
85 |
?>
|
86 |
+
<div id="n2-ss-editor-modal">
|
87 |
+
<div class="n2-ss-editor-inner">
|
88 |
+
<div class="n2-ss-editor-header">Select a Slider<div class="n2-ss-editor-header-close"></div></div>
|
89 |
+
<?php
|
90 |
+
$router = N2Base::getApplication('smartslider')->router;
|
91 |
+
?>
|
92 |
+
<iframe src="<?php echo $router->createUrl(array('sliders/embed')); ?>"></iframe>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
<script type="text/javascript">
|
96 |
+
jQuery(document).ready(function ($) {
|
97 |
+
var modal = $('#n2-ss-editor-modal'),
|
98 |
+
inner = $('.n2-ss-editor-inner'),
|
99 |
+
iframe = inner.find('iframe'),
|
100 |
+
$window = $(window),
|
101 |
+
callback = function () {
|
102 |
+
},
|
103 |
+
watchResize = function () {
|
|
|
|
|
104 |
iframe.height(inner.height() - 59);
|
105 |
+
$window.on('resize.ss', function () {
|
106 |
+
iframe.height(inner.height() - 59);
|
107 |
+
});
|
108 |
+
},
|
109 |
+
unWatchResize = function () {
|
110 |
+
$window.off('resize.ss');
|
111 |
+
},
|
112 |
+
show = function () {
|
113 |
+
modal.addClass('n2-active');
|
114 |
+
watchResize();
|
115 |
+
},
|
116 |
+
hide = function () {
|
117 |
+
unWatchResize();
|
118 |
+
modal.removeClass('n2-active');
|
119 |
+
};
|
120 |
|
121 |
+
modal.on('click', function (e) {
|
122 |
+
if (e.target == modal.get(0)) {
|
123 |
+
hide();
|
124 |
+
}
|
125 |
+
});
|
126 |
+
$('.n2-ss-editor-header-close').on('click', function (e) {
|
127 |
+
e.preventDefault();
|
128 |
hide();
|
129 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
+
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
|
134 |
+
if (e.source == (iframe[0].contentWindow || iframe[0].contentDocument)) {
|
135 |
+
callback(e[e.message ? "message" : "data"]);
|
136 |
+
hide();
|
137 |
+
}
|
138 |
+
}, false);
|
139 |
|
140 |
+
<?php
|
141 |
+
if (intval(N2SmartSliderSettings::get('editor-icon', 1))) {
|
142 |
+
?>
|
143 |
+
window.NextendSmartSliderWPTinyMCEModal = function (ed) {
|
144 |
+
callback = function (id) {
|
145 |
+
ed.execCommand('mceInsertContent', false, '<div>[smartslider3 slider=' + id + ']</div>');
|
146 |
+
};
|
147 |
+
show();
|
148 |
};
|
|
|
|
|
149 |
|
150 |
+
if (typeof QTags !== 'undefined') {
|
151 |
+
QTags.addButton('smart-slider-3', 'Smart Slider', function () {
|
152 |
+
callback = function (id) {
|
153 |
+
QTags.insertContent('<div>[smartslider3 slider=' + id + ']</div>');
|
154 |
+
};
|
155 |
+
show();
|
156 |
+
});
|
157 |
+
}
|
158 |
+
<?php
|
159 |
+
}
|
160 |
+
?>
|
161 |
+
|
162 |
+
window.NextendSmartSliderSelectModal = function ($input) {
|
163 |
callback = function (id) {
|
164 |
+
$input.val(id).trigger('input').trigger('change');
|
165 |
};
|
166 |
show();
|
167 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
};
|
|
|
|
|
|
|
169 |
|
170 |
+
});
|
171 |
+
</script>
|
172 |
<?php
|
173 |
}
|
174 |
}
|
includes/elementor.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
exit; // Exit if accessed directly
|
4 |
-
}
|
5 |
-
|
6 |
-
add_action('template_redirect', function () {
|
7 |
-
if (Elementor\Plugin::instance()->editor->is_edit_mode() || Elementor\Plugin::instance()->preview->is_preview_mode()) {
|
8 |
-
remove_shortcode('smartslider3');
|
9 |
-
}
|
10 |
-
}, -1);
|
11 |
-
|
12 |
-
|
13 |
-
add_action('wp_ajax_elementor_render_widget', function () {
|
14 |
-
remove_shortcode('smartslider3');
|
15 |
-
}, -1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/integrations/BeaverBuilder.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
add_action('fl_builder_editing_enabled', 'N2SS3Shortcode::forceIframe');
|
7 |
+
add_action('fl_builder_editing_enabled', "N2SSShortcodeInsert::addForcedFrontend");
|
8 |
+
|
9 |
+
|
10 |
+
add_action('fl_ajax_before_render_new_module', 'N2SS3Shortcode::forceIframe');
|
11 |
+
add_action('fl_ajax_before_render_layout', 'N2SS3Shortcode::forceIframe');
|
12 |
+
add_action('fl_ajax_before_render_module_settings', 'N2SS3Shortcode::forceIframe');
|
13 |
+
add_action('fl_ajax_before_save_settings', 'N2SS3Shortcode::forceIframe');
|
14 |
+
add_action('fl_ajax_before_copy_module', 'N2SS3Shortcode::forceIframe');
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Custom modules
|
18 |
+
*/
|
19 |
+
function n2_fl_load_module_smart_slider() {
|
20 |
+
if (class_exists('FLBuilder')) {
|
21 |
+
require_once 'beaver-builder-module/beaver-builder-module.php';
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
add_action('init', 'n2_fl_load_module_smart_slider');
|
26 |
+
|
27 |
+
function n2_fl_smart_slider_field($name, $value, $field) {
|
28 |
+
echo '<input type="text" class="text" style="width:100px;" name="' . $name . '" value="' . $value . '" />
|
29 |
+
<a style="" href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings(\'input\'));" class="fl-builder-button fl-builder-button-small fl-builder-button-primary" title="Select slider">Select slider</a>';
|
30 |
+
}
|
31 |
+
|
32 |
+
add_action('fl_builder_control_smart-slider', 'n2_fl_smart_slider_field', 1, 3);
|
includes/{divi.php → integrations/Divi.php}
RENAMED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
-
if (
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
function Nextend_ET_Builder_Module_Smart_Slider_Field() {
|
7 |
-
$output = sprintf('<input type="button" class="button button-upload" value="%1$s" onclick="return
|
8 |
|
9 |
return $output;
|
10 |
}
|
@@ -14,8 +14,11 @@ class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
|
|
14 |
function init() {
|
15 |
$this->name = 'Smart Slider 3';
|
16 |
$this->slug = 'et_pb_nextend_smart_slider_3';
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
$this->whitelisted_fields = array(
|
@@ -27,6 +30,8 @@ class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
|
|
27 |
$this->advanced_options = array();
|
28 |
|
29 |
add_action('admin_footer', 'Nextend_ET_Builder_Module_Smart_Slider::add_admin_icon');
|
|
|
|
|
30 |
}
|
31 |
|
32 |
public static function add_admin_icon() {
|
@@ -48,6 +53,12 @@ class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
|
|
48 |
'type' => 'text',
|
49 |
'renderer' => 'Nextend_ET_Builder_Module_Smart_Slider_Field',
|
50 |
'renderer_with_field' => true
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
)
|
52 |
);
|
53 |
|
@@ -76,20 +87,17 @@ function Nextend_et_builder_get_child_modules_fix($child_modules) {
|
|
76 |
if ($child_modules === '') {
|
77 |
$child_modules = array();
|
78 |
}
|
|
|
79 |
return $child_modules;
|
80 |
}
|
81 |
|
82 |
add_filter('et_builder_get_child_modules', 'Nextend_et_builder_get_child_modules_fix');
|
83 |
|
84 |
-
if(function_exists('et_fb_is_enabled') && et_fb_is_enabled()){
|
85 |
-
|
86 |
-
}
|
87 |
-
|
88 |
-
function Nextend_et_builder_remove_shortcode() {
|
89 |
-
remove_shortcode('smartslider3');
|
90 |
}
|
91 |
|
92 |
-
add_action(
|
93 |
|
94 |
new Nextend_ET_Builder_Module_Smart_Slider;
|
95 |
new Nextend_ET_Builder_Module_Smart_Slider_Fullwidth;
|
1 |
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
function Nextend_ET_Builder_Module_Smart_Slider_Field() {
|
7 |
+
$output = sprintf('<input type="button" class="button button-upload" value="%1$s" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings(\'.regular-text\'));" />', n2_('Select Slider'));
|
8 |
|
9 |
return $output;
|
10 |
}
|
14 |
function init() {
|
15 |
$this->name = 'Smart Slider 3';
|
16 |
$this->slug = 'et_pb_nextend_smart_slider_3';
|
17 |
+
$this->whitelisted_fields = array(
|
18 |
+
'admin_label'
|
19 |
+
);
|
20 |
+
if (defined('EXTRA_LAYOUT_POST_TYPE')) {
|
21 |
+
$this->post_types = array(EXTRA_LAYOUT_POST_TYPE);
|
22 |
}
|
23 |
|
24 |
$this->whitelisted_fields = array(
|
30 |
$this->advanced_options = array();
|
31 |
|
32 |
add_action('admin_footer', 'Nextend_ET_Builder_Module_Smart_Slider::add_admin_icon');
|
33 |
+
|
34 |
+
N2SSShortcodeInsert::addForced();
|
35 |
}
|
36 |
|
37 |
public static function add_admin_icon() {
|
53 |
'type' => 'text',
|
54 |
'renderer' => 'Nextend_ET_Builder_Module_Smart_Slider_Field',
|
55 |
'renderer_with_field' => true
|
56 |
+
),
|
57 |
+
'admin_label' => array(
|
58 |
+
'label' => esc_html__( 'Admin Label', 'et_builder' ),
|
59 |
+
'type' => 'text',
|
60 |
+
'description' => esc_html__( 'This will change the label of the module in the builder for easy identification.', 'et_builder' ),
|
61 |
+
'toggle_slug' => 'admin_label',
|
62 |
)
|
63 |
);
|
64 |
|
87 |
if ($child_modules === '') {
|
88 |
$child_modules = array();
|
89 |
}
|
90 |
+
|
91 |
return $child_modules;
|
92 |
}
|
93 |
|
94 |
add_filter('et_builder_get_child_modules', 'Nextend_et_builder_get_child_modules_fix');
|
95 |
|
96 |
+
if (function_exists('et_fb_is_enabled') && et_fb_is_enabled()) {
|
97 |
+
N2SS3Shortcode::forceIframe();
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
+
add_action('wp_ajax_et_fb_retrieve_builder_data', 'N2SS3Shortcode::forceIframe', 9);
|
101 |
|
102 |
new Nextend_ET_Builder_Module_Smart_Slider;
|
103 |
new Nextend_ET_Builder_Module_Smart_Slider_Fullwidth;
|
includes/integrations/Elementor.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Elementor;
|
3 |
+
|
4 |
+
if (!defined('ABSPATH')) {
|
5 |
+
exit; // Exit if accessed directly
|
6 |
+
}
|
7 |
+
|
8 |
+
add_action('template_redirect', function () {
|
9 |
+
if (\Elementor\Plugin::instance()->editor->is_edit_mode() || \Elementor\Plugin::instance()->preview->is_preview_mode()) {
|
10 |
+
\N2SS3Shortcode::forceIframe();
|
11 |
+
}
|
12 |
+
}, -1);
|
13 |
+
|
14 |
+
|
15 |
+
add_action('wp_ajax_elementor_render_widget', 'N2SS3Shortcode::forceIframe', -1);
|
16 |
+
add_action('elementor/editor/before_enqueue_scripts', 'N2SSShortcodeInsert::addForcedFrontend');
|
17 |
+
|
18 |
+
add_action('elementor/widgets/widgets_registered', function () {
|
19 |
+
$widget_manager = \Elementor\Plugin::$instance->widgets_manager;
|
20 |
+
$widget_manager->register_widget_type(new \Elementor\Nextend_Widget_SmartSlider());
|
21 |
+
}, 100);
|
22 |
+
|
23 |
+
|
24 |
+
class Nextend_Widget_SmartSlider extends \Elementor\Widget_Base {
|
25 |
+
|
26 |
+
public function get_name() {
|
27 |
+
return 'smartslider';
|
28 |
+
}
|
29 |
+
|
30 |
+
public function get_title() {
|
31 |
+
return 'Smart Slider';
|
32 |
+
}
|
33 |
+
|
34 |
+
public function get_icon() {
|
35 |
+
return 'eicon-slider-3d';
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _register_controls() {
|
39 |
+
|
40 |
+
$this->start_controls_section('section_my_custom', [
|
41 |
+
'label' => esc_html('Smart Slider'),
|
42 |
+
]);
|
43 |
+
|
44 |
+
NextendRegisterControlSmartSliderField();
|
45 |
+
\Elementor\Plugin::instance()->controls_manager->register_control('smartsliderfield', new Control_SmartSliderField());
|
46 |
+
|
47 |
+
|
48 |
+
$this->add_control('smartsliderid', [
|
49 |
+
'label' => 'Slider ID',
|
50 |
+
'type' => 'smartsliderfield',
|
51 |
+
'default' => '',
|
52 |
+
'title' => __('Enter some text', 'elementor-custom-element'),
|
53 |
+
]);
|
54 |
+
|
55 |
+
$this->end_controls_section();
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
protected function render() {
|
60 |
+
if (\Elementor\Plugin::instance()->editor->is_edit_mode() || \Elementor\Plugin::instance()->preview->is_preview_mode()) {
|
61 |
+
echo \N2SS3Shortcode::renderIframe($this->get_settings('smartsliderid'));
|
62 |
+
} else {
|
63 |
+
echo do_shortcode('[smartslider3 slider=' . $this->get_settings('smartsliderid') . ']');
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
public function render_plain_content() {
|
68 |
+
echo 'Smart Slider with ID: ' . $this->get_settings('smartsliderid');
|
69 |
+
}
|
70 |
+
|
71 |
+
protected function _content_template() {
|
72 |
+
echo \N2SS3Shortcode::renderIframe('{{{ settings.smartsliderid }}}');
|
73 |
+
}
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
function NextendRegisterControlSmartSliderField() {
|
78 |
+
static $registered;
|
79 |
+
if (!$registered) {
|
80 |
+
if (class_exists('\Elementor\Base_Data_Control')) {
|
81 |
+
|
82 |
+
class_alias('\Elementor\Base_Data_Control', '\Elementor\NextendElementorFieldAbstract');
|
83 |
+
} else {
|
84 |
+
|
85 |
+
class_alias('\Elementor\Control_Base', '\Elementor\NextendElementorFieldAbstract');
|
86 |
+
}
|
87 |
+
|
88 |
+
class_exists('\Elementor\Group_Control_Background');
|
89 |
+
|
90 |
+
class Control_SmartSliderField extends \Elementor\NextendElementorFieldAbstract {
|
91 |
+
|
92 |
+
public function get_type() {
|
93 |
+
return 'smartsliderfield';
|
94 |
+
}
|
95 |
+
|
96 |
+
public function content_template() {
|
97 |
+
?>
|
98 |
+
<div class="elementor-control-field">
|
99 |
+
<label class="elementor-control-title">{{{ data.label }}}</label>
|
100 |
+
<div class="elementor-control-input-wrapper">
|
101 |
+
<a style="margin-bottom:10px;" href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings('input'));" class="button button-primary elementor-button elementor-button-smartslider" title="Select slider">Select slider</a>
|
102 |
+
<input type="{{ data.input_type }}" title="{{ data.title }}" data-setting="{{ data.name }}""/>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
<# if ( data.description ) { #>
|
106 |
+
<div class="elementor-control-field-description">{{{ data.description }}}</div>
|
107 |
+
<# } #>
|
108 |
+
<?php
|
109 |
+
}
|
110 |
+
|
111 |
+
public function get_default_settings() {
|
112 |
+
return [
|
113 |
+
'input_type' => 'text',
|
114 |
+
];
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
$registered = true;
|
119 |
+
}
|
120 |
+
}
|
includes/integrations/MotoPressCE.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
if (MPCEShortcode::isContentEditor()) {
|
7 |
+
remove_shortcode('smartslider3');
|
8 |
+
}
|
includes/integrations/VisualComposer.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
class NextendSmartSlider3VisualComposer {
|
7 |
+
|
8 |
+
public static function init() {
|
9 |
+
self::vc_add_element();
|
10 |
+
|
11 |
+
add_action('vc_frontend_editor_render', 'N2SS3Shortcode::forceIframe');
|
12 |
+
add_action('vc_front_load_page_', 'N2SS3Shortcode::forceIframe');
|
13 |
+
add_action('vc_load_shortcode', 'N2SS3Shortcode::forceIframe');
|
14 |
+
}
|
15 |
+
|
16 |
+
public static function vc_add_element() {
|
17 |
+
vc_add_shortcode_param('smartslider', 'NextendSmartSlider3VisualComposer::vc_add_form_field_smartslider');
|
18 |
+
|
19 |
+
vc_map(array(
|
20 |
+
"name" => "Smart Slider 3",
|
21 |
+
"base" => "smartslider3",
|
22 |
+
"category" => __('Content'),
|
23 |
+
"params" => array(
|
24 |
+
array(
|
25 |
+
'type' => 'smartslider',
|
26 |
+
'heading' => 'Slider ID',
|
27 |
+
'param_name' => 'slider',
|
28 |
+
'save_always' => true,
|
29 |
+
'description' => 'Select a slider to add it to your post or page.',
|
30 |
+
'admin_label' => true,
|
31 |
+
)
|
32 |
+
)
|
33 |
+
));
|
34 |
+
|
35 |
+
add_action('admin_footer', 'NextendSmartSlider3VisualComposer::add_admin_icon');
|
36 |
+
}
|
37 |
+
|
38 |
+
public static function add_admin_icon() {
|
39 |
+
?>
|
40 |
+
<style type="text/css">
|
41 |
+
.wpb_smartslider3 .vc_element-icon {
|
42 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEUTr+8YnOQPxPkYnOQUsO8PxPkYnOQTr+5hp8Uoncg1kryMwtqh0ePT6PFvude83ers9vlFqc4Vi8EQo9kSls4Xo+j///8XoOcYm+QVp+oQwPcStPARuvQYneUUrewPxPkMc7TJAAAACHRSTlNt9G1uG8vNAnToTbkAAAFrSURBVHgBfZPr0qowDEXrBVB6b0KgUMv7v+UJ2MFy5tOVdIbuvXT0B6Lrumszr38wN1cuRXdv1q80dxa4/2F04srftc7zdtZqSrZeRTOfWc7XRqS5BtAj1E4SdZ3ROHLq5Ig5zem9Gbymjd1JJRXvBz7gLXdaKWXJWb+UQqTC4h3XVjurjEfIqXAICczTP7SUVlsDR8rCkpZ9wQD2ypG1RE++lxULkxYGDBoi+cTnLpR+Ewqoe0cSsnek4EhrwT6IQs7emhBrIZeB4IkMZED+fD5G5A9BE6kA+UQtwJMN5zF+E0YIiohkOAkx5n0jBO8BvSMyWLLtiFhAr0mHiD2RC/HgEMbebT8wxqD/E4a4D0rOETEYIhs4KcPCG9wKaeT2P/pp+CCGcdh2CJLe2B45OVaMhQnDQypp+jCNNeI1HoMYELl+VXMR7esnrbj9Fm6ia6fyPB3zod1e3nb6Sntnoetu7eWv9tLeuPwHrqBewxDhYIoAAAAASUVORK5CYII=);
|
43 |
+
}
|
44 |
+
</style>
|
45 |
+
<?php
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
public static function vc_add_form_field_smartslider($settings, $value) {
|
50 |
+
$value = htmlspecialchars($value);
|
51 |
+
|
52 |
+
N2SSShortcodeInsert::addForced();
|
53 |
+
|
54 |
+
return '<input name="' . $settings['param_name'] . '" class="wpb_vc_param_value wpb-textinput ' . $settings['param_name'] . ' ' . $settings['type'] . '" type="text" value="' . $value . '" style="width:100px;vertical-align:middle;"/>
|
55 |
+
<a href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings(\'input\'));" class="vc_general vc_ui-button vc_ui-button-default vc_ui-button-shape-rounded vc_ui-button-fw" title="Select slider">Select slider</a>';
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
NextendSmartSlider3VisualComposer::init();
|
includes/integrations/beaver-builder-module/beaver-builder-module.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
class FLSmartSliderModule extends FLBuilderModule {
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct(array(
|
10 |
+
'name' => 'Smart Slider',
|
11 |
+
'description' => 'Display the selected slider from Smart Slider plugin.',
|
12 |
+
'category' => __('Basic Modules', 'fl-builder'),
|
13 |
+
'dir' => plugin_dir_path(__FILE__),
|
14 |
+
'url' => plugins_url('/', __FILE__),
|
15 |
+
'editor_export' => true,
|
16 |
+
'enabled' => true,
|
17 |
+
));
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
FLBuilder::register_module('FLSmartSliderModule', array(
|
22 |
+
'general' => array(
|
23 |
+
'title' => __('General', 'fl-builder'),
|
24 |
+
'sections' => array(
|
25 |
+
'general' => array(
|
26 |
+
'title' => "",
|
27 |
+
'fields' => array(
|
28 |
+
'sliderid' => array(
|
29 |
+
'type' => 'smart-slider',
|
30 |
+
'label' => 'Slider ID',
|
31 |
+
'default' => '0'
|
32 |
+
),
|
33 |
+
)
|
34 |
+
)
|
35 |
+
)
|
36 |
+
)
|
37 |
+
));
|
includes/integrations/beaver-builder-module/includes/frontend.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
echo do_shortcode('[smartslider3 slider=' . $settings->sliderid . ']');
|
includes/integrations/tailor.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!defined('ABSPATH')) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
add_action('wp_ajax_tailor_render', function () {
|
8 |
+
\N2SS3Shortcode::forceIframe();
|
9 |
+
}, -1);
|
includes/{extensions → integrations/unyson}/smartslider/manifest.php
RENAMED
File without changes
|
includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/config.php
RENAMED
File without changes
|
includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/options.php
RENAMED
File without changes
|
includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/static/img/page_builder.png
RENAMED
File without changes
|
includes/{extensions → integrations/unyson}/smartslider/shortcodes/smartslider/views/view.php
RENAMED
File without changes
|
includes/shortcode.php
CHANGED
@@ -1,12 +1,120 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class N2SS3Shortcode
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
public static function doShortcode($parameters) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
return self::render($parameters);
|
8 |
}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
public static function render($parameters, $usage = 'WordPress Shortcode') {
|
11 |
if (isset($parameters['slide'])) {
|
12 |
$slideTo = intval($parameters['slide']);
|
@@ -38,14 +146,17 @@ class N2SS3Shortcode
|
|
38 |
|
39 |
if (intval($parameters['slider']) > 0) {
|
40 |
ob_start();
|
41 |
-
N2Base::getApplication("smartslider")
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
49 |
return ob_get_clean();
|
50 |
}
|
51 |
|
1 |
<?php
|
2 |
|
3 |
+
class N2SS3Shortcode {
|
4 |
+
|
5 |
+
public static $iframe = false;
|
6 |
+
|
7 |
+
public static function forceIframe() {
|
8 |
+
self::$iframe = true;
|
9 |
+
}
|
10 |
|
11 |
public static function doShortcode($parameters) {
|
12 |
+
if (self::$iframe) {
|
13 |
+
if (isset($parameters['slider'])) {
|
14 |
+
return self::renderIframe($parameters['slider']);
|
15 |
+
}
|
16 |
+
|
17 |
+
return 'Smart Slider - Please select a slider!';
|
18 |
+
}
|
19 |
+
|
20 |
return self::render($parameters);
|
21 |
}
|
22 |
|
23 |
+
public static function renderIframe($sliderID) {
|
24 |
+
|
25 |
+
$onload = '
|
26 |
+
if(typeof window.n2SSIframeLoader != "function"){
|
27 |
+
(function($){
|
28 |
+
var frames = [],
|
29 |
+
clientHeight = 0;
|
30 |
+
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
31 |
+
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
|
32 |
+
var sourceFrame = false;
|
33 |
+
for(var i = 0; i < frames.length; i++){
|
34 |
+
if(e.source == (frames[i].contentWindow || frames[i].contentDocument)){
|
35 |
+
sourceFrame = frames[i];
|
36 |
+
}
|
37 |
+
}
|
38 |
+
if (sourceFrame) {
|
39 |
+
var data = e[e.message ? "message" : "data"];
|
40 |
+
|
41 |
+
switch(data["key"]){
|
42 |
+
case "ready":
|
43 |
+
clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
44 |
+
$(sourceFrame).removeData();
|
45 |
+
(sourceFrame.contentWindow || sourceFrame.contentDocument).postMessage({
|
46 |
+
key: "ackReady",
|
47 |
+
clientHeight: clientHeight
|
48 |
+
}, "*");
|
49 |
+
break;
|
50 |
+
case "resize":
|
51 |
+
var $sourceFrame = $(sourceFrame);
|
52 |
+
|
53 |
+
if(data.fullPage){
|
54 |
+
var resizeFP = function(){
|
55 |
+
if(clientHeight != document.documentElement.clientHeight || document.body.clientHeight){
|
56 |
+
clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
57 |
+
(sourceFrame.contentWindow || sourceFrame.contentDocument).postMessage({
|
58 |
+
key: "update",
|
59 |
+
clientHeight: clientHeight
|
60 |
+
}, "*");
|
61 |
+
}
|
62 |
+
};
|
63 |
+
if($sourceFrame.data("fullpage") != data.fullPage){
|
64 |
+
$sourceFrame.data("fullpage", data.fullPage);
|
65 |
+
resizeFP();
|
66 |
+
$(window).on("resize", resizeFP);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
$sourceFrame.css({
|
70 |
+
height: data.height
|
71 |
+
});
|
72 |
+
|
73 |
+
if(data.forceFull && $sourceFrame.data("forcefull") != data.forceFull){
|
74 |
+
$sourceFrame.data("forcefull", data.forceFull);
|
75 |
+
$("body").css("overflow-x", "hidden");
|
76 |
+
var resizeFF = function(){
|
77 |
+
var windowWidth = document.body.clientWidth || document.documentElement.clientWidth,
|
78 |
+
outerEl = $sourceFrame.parent(),
|
79 |
+
outerElOffset = outerEl.offset();
|
80 |
+
$sourceFrame.css("maxWidth", "none");
|
81 |
+
if ($("html").attr("dir") == "rtl") {
|
82 |
+
outerElOffset.right = windowWidth - (outerElOffset.left + outerEl.outerWidth());
|
83 |
+
$sourceFrame.css("marginRight", -outerElOffset.right - parseInt(outerEl.css("paddingLeft")) - parseInt(outerEl.css("borderLeftWidth"))).width(windowWidth);
|
84 |
+
} else {
|
85 |
+
$sourceFrame.css("marginLeft", -outerElOffset.left - parseInt(outerEl.css("paddingLeft")) - parseInt(outerEl.css("borderLeftWidth"))).width(windowWidth);
|
86 |
+
}
|
87 |
+
};
|
88 |
+
resizeFF();
|
89 |
+
$(window).on("resize", resizeFF);
|
90 |
+
|
91 |
+
}
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
});
|
96 |
+
window.n2SSIframeLoader = function(iframe){
|
97 |
+
frames.push(iframe);
|
98 |
+
}
|
99 |
+
})(jQuery);
|
100 |
+
}
|
101 |
+
n2SSIframeLoader(this);';
|
102 |
+
|
103 |
+
return N2HTML::tag('iframe', array(
|
104 |
+
'onload' => str_replace(array(
|
105 |
+
"\n",
|
106 |
+
"\r",
|
107 |
+
"\r\n"
|
108 |
+
), "", $onload),
|
109 |
+
'class' => "n2-ss-slider-frame",
|
110 |
+
'style' => 'width:100%',
|
111 |
+
'frameborder' => 0,
|
112 |
+
'src' => site_url() . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe&sliderid=' . $sliderID
|
113 |
+
));
|
114 |
+
|
115 |
+
return '<iframe onload="" class="n2-ss-slider-frame" style="width:100%" frameborder="0" src="' . site_url() . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe&sliderid=' . $sliderID . '"></iframe>';
|
116 |
+
}
|
117 |
+
|
118 |
public static function render($parameters, $usage = 'WordPress Shortcode') {
|
119 |
if (isset($parameters['slide'])) {
|
120 |
$slideTo = intval($parameters['slide']);
|
146 |
|
147 |
if (intval($parameters['slider']) > 0) {
|
148 |
ob_start();
|
149 |
+
N2Base::getApplication("smartslider")
|
150 |
+
->getApplicationType('frontend')
|
151 |
+
->render(array(
|
152 |
+
"controller" => 'home',
|
153 |
+
"action" => 'wordpress',
|
154 |
+
"useRequest" => false
|
155 |
+
), array(
|
156 |
+
intval($parameters['slider']),
|
157 |
+
$usage
|
158 |
+
));
|
159 |
+
|
160 |
return ob_get_clean();
|
161 |
}
|
162 |
|
includes/smartslider3.php
CHANGED
@@ -17,6 +17,8 @@ class SmartSlider3 {
|
|
17 |
|
18 |
add_action('init', 'SmartSlider3::_init');
|
19 |
|
|
|
|
|
20 |
add_action('admin_menu', 'SmartSlider3::nextendAdminInit');
|
21 |
|
22 |
add_action('network_admin_menu', 'SmartSlider3::nextendNetworkAdminInit');
|
@@ -32,25 +34,29 @@ class SmartSlider3 {
|
|
32 |
require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'includes/widget.php';
|
33 |
require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'editor' . DIRECTORY_SEPARATOR . 'shortcode.php';
|
34 |
|
35 |
-
add_action('et_builder_ready', 'SmartSlider3::
|
36 |
|
37 |
-
add_action('vc_after_set_mode', 'SmartSlider3::
|
38 |
|
39 |
if (class_exists('FLBuilderModel', false)) {
|
40 |
-
|
41 |
}
|
42 |
|
43 |
-
add_action('elementor/init', 'SmartSlider3::
|
44 |
-
|
45 |
-
add_filter('wpseo_xml_sitemap_post_url', 'SmartSlider3::wpseo_xml_sitemap_post_url', 10, 2);
|
46 |
|
|
|
47 |
|
|
|
48 |
add_filter('fw_extensions_locations', 'SmartSlider3::unyson_extension');
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
public static function unyson_extension($locations) {
|
52 |
-
$path = dirname(__FILE__) . '/
|
53 |
-
$locations[$path] = plugin_dir_url(__FILE__) . '
|
54 |
|
55 |
return $locations;
|
56 |
}
|
@@ -65,12 +71,6 @@ class SmartSlider3 {
|
|
65 |
return $permalink;
|
66 |
}
|
67 |
|
68 |
-
public static function removeShortcodeBeaverBuilder() {
|
69 |
-
if (FLBuilderModel::is_builder_active()) {
|
70 |
-
SmartSlider3::removeShortcode();
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
public static function removeShortcode() {
|
75 |
remove_shortcode('smartslider3');
|
76 |
}
|
@@ -87,6 +87,24 @@ class SmartSlider3 {
|
|
87 |
}
|
88 |
}
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
public static function nextendAdminInit() {
|
91 |
$icon = NEXTEND_SMARTSLIDER_3_URL . '/icon.png';
|
92 |
if (isset($_REQUEST['page']) && $_REQUEST['page'] == NEXTEND_SMARTSLIDER_3_URL_PATH) {
|
@@ -238,16 +256,28 @@ class SmartSlider3 {
|
|
238 |
return false;
|
239 |
}
|
240 |
|
241 |
-
public static function
|
242 |
-
require_once dirname(__FILE__) . '/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
}
|
244 |
|
245 |
-
public static function
|
246 |
-
require_once dirname(__FILE__) . '/
|
247 |
}
|
248 |
|
249 |
-
public static function
|
250 |
-
require_once dirname(__FILE__) . '/
|
251 |
}
|
252 |
|
253 |
/**
|
17 |
|
18 |
add_action('init', 'SmartSlider3::_init');
|
19 |
|
20 |
+
add_action('init', 'SmartSlider3::preRender');
|
21 |
+
|
22 |
add_action('admin_menu', 'SmartSlider3::nextendAdminInit');
|
23 |
|
24 |
add_action('network_admin_menu', 'SmartSlider3::nextendNetworkAdminInit');
|
34 |
require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'includes/widget.php';
|
35 |
require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'editor' . DIRECTORY_SEPARATOR . 'shortcode.php';
|
36 |
|
37 |
+
add_action('et_builder_ready', 'SmartSlider3::divi');
|
38 |
|
39 |
+
add_action('vc_after_set_mode', 'SmartSlider3::visualComposer');
|
40 |
|
41 |
if (class_exists('FLBuilderModel', false)) {
|
42 |
+
SmartSlider3::beaverBuilder();
|
43 |
}
|
44 |
|
45 |
+
add_action('elementor/init', 'SmartSlider3::elementor');
|
|
|
|
|
46 |
|
47 |
+
add_action('tailor_init', 'SmartSlider3::tailor');
|
48 |
|
49 |
+
add_filter('wpseo_xml_sitemap_post_url', 'SmartSlider3::wpseo_xml_sitemap_post_url', 10, 2);
|
50 |
add_filter('fw_extensions_locations', 'SmartSlider3::unyson_extension');
|
51 |
+
|
52 |
+
if (class_exists('MPCEShortcode', false)) {
|
53 |
+
SmartSlider3::motoPressCE();
|
54 |
+
}
|
55 |
}
|
56 |
|
57 |
public static function unyson_extension($locations) {
|
58 |
+
$path = dirname(__FILE__) . '/integrations/unyson';
|
59 |
+
$locations[$path] = plugin_dir_url(__FILE__) . 'integrations/unyson';
|
60 |
|
61 |
return $locations;
|
62 |
}
|
71 |
return $permalink;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
public static function removeShortcode() {
|
75 |
remove_shortcode('smartslider3');
|
76 |
}
|
87 |
}
|
88 |
}
|
89 |
|
90 |
+
public static function preRender() {
|
91 |
+
if (isset($_GET['n2prerender']) && isset($_GET['n2app']) && current_user_can('smartslider')) {
|
92 |
+
try {
|
93 |
+
N2Base::getApplication($_GET['n2app'])
|
94 |
+
->getApplicationType(N2Platform::$isAdmin ? 'backend' : 'frontend')
|
95 |
+
->setCurrent()
|
96 |
+
->render(array(
|
97 |
+
"prerender" => true,
|
98 |
+
"controller" => $_GET['n2controller'],
|
99 |
+
"action" => $_GET['n2action']
|
100 |
+
));
|
101 |
+
n2_exit(true);
|
102 |
+
} catch (Exception $e) {
|
103 |
+
exit;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
public static function nextendAdminInit() {
|
109 |
$icon = NEXTEND_SMARTSLIDER_3_URL . '/icon.png';
|
110 |
if (isset($_REQUEST['page']) && $_REQUEST['page'] == NEXTEND_SMARTSLIDER_3_URL_PATH) {
|
256 |
return false;
|
257 |
}
|
258 |
|
259 |
+
public static function divi() {
|
260 |
+
require_once dirname(__FILE__) . '/integrations/Divi.php';
|
261 |
+
}
|
262 |
+
|
263 |
+
public static function visualComposer() {
|
264 |
+
require_once dirname(__FILE__) . '/integrations/VisualComposer.php';
|
265 |
+
}
|
266 |
+
|
267 |
+
public static function elementor() {
|
268 |
+
require_once dirname(__FILE__) . '/integrations/Elementor.php';
|
269 |
+
}
|
270 |
+
|
271 |
+
public static function beaverBuilder() {
|
272 |
+
require_once dirname(__FILE__) . '/integrations/BeaverBuilder.php';
|
273 |
}
|
274 |
|
275 |
+
public static function tailor() {
|
276 |
+
require_once dirname(__FILE__) . '/integrations/tailor.php';
|
277 |
}
|
278 |
|
279 |
+
public static function motoPressCE() {
|
280 |
+
require_once dirname(__FILE__) . '/integrations/MotoPressCE.php';
|
281 |
}
|
282 |
|
283 |
/**
|
includes/vc.php
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
exit; // Exit if accessed directly
|
4 |
-
}
|
5 |
-
|
6 |
-
class NextendSmartSlider3VisualComposer
|
7 |
-
{
|
8 |
-
|
9 |
-
public static function init()
|
10 |
-
{
|
11 |
-
self::vc_add_element();
|
12 |
-
|
13 |
-
add_action('vc_frontend_editor_render', 'NextendSmartSlider3VisualComposer::removeShortcode');
|
14 |
-
add_action('vc_front_load_page_', 'NextendSmartSlider3VisualComposer::removeShortcode');
|
15 |
-
add_action('vc_load_shortcode', 'NextendSmartSlider3VisualComposer::removeShortcode');
|
16 |
-
}
|
17 |
-
|
18 |
-
public static function vc_add_element()
|
19 |
-
{
|
20 |
-
|
21 |
-
global $wpdb;
|
22 |
-
|
23 |
-
$res = $wpdb->get_results('SELECT id, title FROM ' . $wpdb->prefix . 'nextend2_smartslider3_sliders');
|
24 |
-
$options = array();
|
25 |
-
foreach ($res AS $r) {
|
26 |
-
$options[$r->title] = $r->id;
|
27 |
-
}
|
28 |
-
|
29 |
-
vc_map(array(
|
30 |
-
"name" => "Smart Slider 3",
|
31 |
-
"base" => "smartslider3",
|
32 |
-
"category" => __('Content'),
|
33 |
-
"params" => array(
|
34 |
-
array(
|
35 |
-
'type' => 'dropdown',
|
36 |
-
'heading' => 'Slider',
|
37 |
-
'param_name' => 'slider',
|
38 |
-
'value' => $options,
|
39 |
-
'save_always' => true,
|
40 |
-
'description' => 'Select a slider to add it to your post or page.',
|
41 |
-
'admin_label' => true,
|
42 |
-
),
|
43 |
-
)
|
44 |
-
));
|
45 |
-
|
46 |
-
add_action('admin_footer', 'NextendSmartSlider3VisualComposer::add_admin_icon');
|
47 |
-
}
|
48 |
-
|
49 |
-
public static function add_admin_icon()
|
50 |
-
{
|
51 |
-
?>
|
52 |
-
<style type="text/css">
|
53 |
-
.wpb_smartslider3 .vc_element-icon {
|
54 |
-
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEUTr+8YnOQPxPkYnOQUsO8PxPkYnOQTr+5hp8Uoncg1kryMwtqh0ePT6PFvude83ers9vlFqc4Vi8EQo9kSls4Xo+j///8XoOcYm+QVp+oQwPcStPARuvQYneUUrewPxPkMc7TJAAAACHRSTlNt9G1uG8vNAnToTbkAAAFrSURBVHgBfZPr0qowDEXrBVB6b0KgUMv7v+UJ2MFy5tOVdIbuvXT0B6Lrumszr38wN1cuRXdv1q80dxa4/2F04srftc7zdtZqSrZeRTOfWc7XRqS5BtAj1E4SdZ3ROHLq5Ig5zem9Gbymjd1JJRXvBz7gLXdaKWXJWb+UQqTC4h3XVjurjEfIqXAICczTP7SUVlsDR8rCkpZ9wQD2ypG1RE++lxULkxYGDBoi+cTnLpR+Ewqoe0cSsnek4EhrwT6IQs7emhBrIZeB4IkMZED+fD5G5A9BE6kA+UQtwJMN5zF+E0YIiohkOAkx5n0jBO8BvSMyWLLtiFhAr0mHiD2RC/HgEMbebT8wxqD/E4a4D0rOETEYIhs4KcPCG9wKaeT2P/pp+CCGcdh2CJLe2B45OVaMhQnDQypp+jCNNeI1HoMYELl+VXMR7esnrbj9Fm6ia6fyPB3zod1e3nb6Sntnoetu7eWv9tLeuPwHrqBewxDhYIoAAAAASUVORK5CYII=);
|
55 |
-
}
|
56 |
-
</style>
|
57 |
-
<?php
|
58 |
-
}
|
59 |
-
|
60 |
-
public static function removeShortcode(){
|
61 |
-
add_shortcode('smartslider3', 'NextendSmartSlider3VisualComposer::_removeShortcode');
|
62 |
-
}
|
63 |
-
|
64 |
-
public static function _removeShortcode($atts) {
|
65 |
-
return '<h3>Smart Slider 3 - Slider ID: #' . $atts['slider'] . '</h3><img src="' . NEXTEND_SMARTSLIDER_3_URL . '/images/ss3.jpg" />';
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
NextendSmartSlider3VisualComposer::init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/widget.php
CHANGED
@@ -35,14 +35,21 @@ class N2SS3Widget extends WP_Widget {
|
|
35 |
}
|
36 |
|
37 |
function widget($args, $instance) {
|
|
|
38 |
if ($this->preventRender) {
|
39 |
return;
|
40 |
}
|
41 |
$instance = array_merge(array(
|
42 |
'id' => md5(time()),
|
43 |
-
'slider' => 0
|
|
|
44 |
), $instance);
|
45 |
|
|
|
|
|
|
|
|
|
|
|
46 |
$slider = do_shortcode('[smartslider3 slider=' . $instance['slider'] . ']');
|
47 |
|
48 |
if ($slider != '') {
|
@@ -59,12 +66,14 @@ class N2SS3Widget extends WP_Widget {
|
|
59 |
}
|
60 |
|
61 |
function form($instance) {
|
62 |
-
global $wpdb;
|
63 |
$instance = wp_parse_args((array)$instance, array(
|
64 |
'title' => '',
|
65 |
-
'slider' =>
|
66 |
));
|
67 |
$title = $instance['title'];
|
|
|
|
|
|
|
68 |
?>
|
69 |
<p>
|
70 |
<label for="<?php echo $this->get_field_id('title'); ?>">
|
@@ -77,24 +86,12 @@ class N2SS3Widget extends WP_Widget {
|
|
77 |
|
78 |
<p>
|
79 |
<label for="<?php echo $this->get_field_id('smartslider2'); ?>">
|
80 |
-
Smart Slider
|
81 |
-
<
|
82 |
-
|
83 |
-
|
84 |
-
$slider = $instance['slider'];
|
85 |
-
|
86 |
-
$res = $wpdb->get_results('SELECT id, title FROM ' . $wpdb->prefix . 'nextend2_smartslider3_sliders');
|
87 |
-
foreach ($res AS $r) {
|
88 |
-
?>
|
89 |
-
<option <?php if ($r->id == $slider) { ?>selected="selected"
|
90 |
-
<?php } ?>value="<?php echo $r->id; ?>"><?php echo $r->title; ?></option>
|
91 |
-
<?php
|
92 |
-
}
|
93 |
-
?>
|
94 |
-
</select>
|
95 |
</label>
|
96 |
</p>
|
97 |
-
<p>You can create Sliders in the left sidebar.</p>
|
98 |
<?php
|
99 |
}
|
100 |
|
@@ -102,6 +99,7 @@ class N2SS3Widget extends WP_Widget {
|
|
102 |
$instance = $old_instance;
|
103 |
$instance['title'] = $new_instance['title'];
|
104 |
$instance['slider'] = $new_instance['slider'];
|
|
|
105 |
return $instance;
|
106 |
}
|
107 |
}
|
35 |
}
|
36 |
|
37 |
function widget($args, $instance) {
|
38 |
+
global $wpdb;
|
39 |
if ($this->preventRender) {
|
40 |
return;
|
41 |
}
|
42 |
$instance = array_merge(array(
|
43 |
'id' => md5(time()),
|
44 |
+
'slider' => 0,
|
45 |
+
'title' => ''
|
46 |
), $instance);
|
47 |
|
48 |
+
if ($instance['slider'] === 0) {
|
49 |
+
|
50 |
+
$instance['slider'] = $wpdb->get_var('SELECT id FROM ' . $wpdb->prefix . 'nextend2_smartslider3_sliders LIMIT 0,1');
|
51 |
+
}
|
52 |
+
|
53 |
$slider = do_shortcode('[smartslider3 slider=' . $instance['slider'] . ']');
|
54 |
|
55 |
if ($slider != '') {
|
66 |
}
|
67 |
|
68 |
function form($instance) {
|
|
|
69 |
$instance = wp_parse_args((array)$instance, array(
|
70 |
'title' => '',
|
71 |
+
'slider' => 0
|
72 |
));
|
73 |
$title = $instance['title'];
|
74 |
+
|
75 |
+
N2SSShortcodeInsert::addForced();
|
76 |
+
|
77 |
?>
|
78 |
<p>
|
79 |
<label for="<?php echo $this->get_field_id('title'); ?>">
|
86 |
|
87 |
<p>
|
88 |
<label for="<?php echo $this->get_field_id('smartslider2'); ?>">
|
89 |
+
Smart Slider:<br>
|
90 |
+
<input style="width:100px;vertical-align: top;" class="widefat" id="<?php echo $this->get_field_id('slider'); ?>" name="<?php echo $this->get_field_name('slider'); ?>" type="text" value="<?php echo esc_attr($instance['slider']); ?>">
|
91 |
+
|
92 |
+
<a style="vertical-align: top;" href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings('input'));" class="button button-primary elementor-button elementor-button-smartslider fl-builder-button fl-builder-button-large" title="Select slider">Select slider</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
</label>
|
94 |
</p>
|
|
|
95 |
<?php
|
96 |
}
|
97 |
|
99 |
$instance = $old_instance;
|
100 |
$instance['title'] = $new_instance['title'];
|
101 |
$instance['slider'] = $new_instance['slider'];
|
102 |
+
|
103 |
return $instance;
|
104 |
}
|
105 |
}
|
library/media/admin/dist/smartslider-backend.css
CHANGED
@@ -470,7 +470,8 @@ html[data-sliders='0'] .n2-ss-sliders-header {
|
|
470 |
.n2-ss-slider-over-group .n2-box-sortable-placeholder {
|
471 |
display: none;
|
472 |
}
|
473 |
-
html[data-slides='0'] .n2-ss-slider-edit
|
|
|
474 |
display: none;
|
475 |
}
|
476 |
|
@@ -634,15 +635,15 @@ html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
|
634 |
font-size: 11px;
|
635 |
}
|
636 |
|
637 |
-
.n2-slide-state-published
|
638 |
-
|
639 |
-
|
640 |
-
.n2-slide-state-first
|
641 |
display: none;
|
642 |
}
|
643 |
|
644 |
-
.n2-slide-state-published
|
645 |
-
.n2-slide-state-has-generator
|
646 |
display: block;
|
647 |
}
|
648 |
|
@@ -665,10 +666,13 @@ html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
|
665 |
z-index: 9;
|
666 |
color: #6b7989;
|
667 |
margin-top: -10px;
|
|
|
|
|
|
|
668 |
visibility: hidden;
|
669 |
}
|
670 |
|
671 |
-
.n2-ss-has-box-selection .n2-ss-
|
672 |
visibility: visible;
|
673 |
}
|
674 |
|
@@ -695,35 +699,23 @@ html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
|
695 |
font-family: 'Nextend' !important;
|
696 |
font-size: 48px;
|
697 |
line-height: 68px;
|
698 |
-
content: "\
|
699 |
margin-top: 20px;
|
700 |
}
|
701 |
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
width: 28px;
|
707 |
-
height: 28px;
|
708 |
-
line-height: 28px;
|
709 |
-
background: #3e9021;
|
710 |
-
border-radius: 3px;
|
711 |
-
cursor: pointer;
|
712 |
-
}
|
713 |
-
|
714 |
-
#n2-ss-slides .n2-box-slide-add .n2-button-menu-open .n2-i:before {
|
715 |
-
content: "\e911";
|
716 |
-
color: #fff;
|
717 |
-
font-size: 16px;
|
718 |
-
line-height: 28px;
|
719 |
-
}
|
720 |
-
|
721 |
-
.n2-add-quick-image {
|
722 |
-
width: 123px;
|
723 |
}
|
724 |
|
725 |
-
.n2-
|
726 |
-
|
|
|
|
|
|
|
|
|
|
|
727 |
}
|
728 |
|
729 |
.n2-ss-slides-header > * {
|
@@ -769,1901 +761,2645 @@ html:not([data-slides='0']):not([data-slides='1']) #n2-admin[data-slider-type="b
|
|
769 |
html[data-slides='0'] .n2-ss-create-static-slide {
|
770 |
display: none;
|
771 |
}
|
772 |
-
|
773 |
-
|
774 |
-
}
|
775 |
-
|
776 |
-
.n2-ss-core-item {
|
777 |
-
display: inline-block;
|
778 |
-
margin: 5px;
|
779 |
-
background-color: #6b7986;
|
780 |
-
color: #ffffff;
|
781 |
-
line-height: 20px;
|
782 |
-
cursor: pointer;
|
783 |
-
text-align: center;
|
784 |
|
785 |
-
|
786 |
-
|
787 |
-
|
|
|
|
|
788 |
|
789 |
-
|
790 |
-
height: 80px;
|
791 |
-
}
|
792 |
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
content: "\e943";
|
797 |
-
display: block;
|
798 |
-
line-height: 32px;
|
799 |
-
margin-top: 20px;
|
800 |
}
|
801 |
|
802 |
-
.n2-ss-
|
803 |
-
|
804 |
}
|
805 |
|
806 |
-
.n2-ss-
|
807 |
-
|
|
|
|
|
808 |
}
|
809 |
|
810 |
-
.n2-ss-
|
811 |
-
|
812 |
}
|
813 |
|
814 |
-
|
815 |
-
|
816 |
}
|
817 |
|
818 |
-
.n2-ss-
|
819 |
-
|
|
|
820 |
}
|
821 |
|
822 |
-
.n2-ss-
|
823 |
-
|
824 |
}
|
825 |
|
826 |
-
.n2-ss-
|
827 |
-
|
828 |
}
|
829 |
|
830 |
-
.n2-ss-
|
831 |
-
|
|
|
832 |
}
|
833 |
|
834 |
-
|
835 |
-
|
|
|
836 |
}
|
837 |
-
|
838 |
-
.n2-ss-
|
839 |
-
|
840 |
}
|
841 |
|
842 |
-
.n2-ss-
|
843 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
844 |
}
|
845 |
|
846 |
-
.n2-
|
847 |
-
|
|
|
|
|
|
|
|
|
|
|
848 |
}
|
849 |
|
850 |
-
.n2-
|
851 |
-
|
|
|
852 |
}
|
853 |
|
854 |
-
.n2-
|
855 |
-
|
|
|
856 |
}
|
857 |
|
858 |
-
.n2-
|
859 |
-
|
860 |
}
|
861 |
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
|
|
|
|
868 |
}
|
869 |
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
width: 100%;
|
875 |
-
height: 0;
|
876 |
-
border-bottom: 1px solid RGBA(254, 254, 254, 0.8);
|
877 |
-
box-shadow: 0 0 3px 0px RGBA(254, 254, 254, 0.8);
|
878 |
}
|
879 |
|
880 |
-
|
881 |
-
|
|
|
|
|
882 |
}
|
883 |
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
*/
|
890 |
-
.n2-list .n2-ss-layer-group-row {
|
891 |
-
border-bottom: 0px;
|
892 |
-
}
|
893 |
|
894 |
-
.n2-ss-layer-group-row > .n2-ss-layer-title {
|
895 |
-
border-bottom: 1px solid RGBA(0, 0, 0, 0.2);
|
896 |
}
|
897 |
|
898 |
-
.n2-
|
899 |
-
|
900 |
-
background: #1681c1;
|
901 |
}
|
902 |
|
903 |
-
.n2-ss-
|
904 |
-
|
|
|
|
|
905 |
}
|
906 |
|
907 |
-
.n2-ss-
|
908 |
-
|
909 |
-
|
910 |
-
position: relative;
|
911 |
cursor: pointer;
|
912 |
-
|
913 |
-
}
|
914 |
-
|
915 |
-
.n2-ss-layer-title span {
|
916 |
-
margin: 0 30px;
|
917 |
-
display: block;
|
918 |
-
width: 170px;
|
919 |
-
white-space: nowrap;
|
920 |
-
overflow: hidden;
|
921 |
-
text-overflow: ellipsis;
|
922 |
}
|
923 |
|
924 |
-
.n2-ss-
|
925 |
-
|
|
|
|
|
|
|
|
|
|
|
926 |
}
|
927 |
|
928 |
-
.n2-ss-
|
929 |
-
|
930 |
}
|
931 |
|
932 |
-
.n2-ss-
|
933 |
-
|
934 |
}
|
935 |
|
936 |
-
.n2-ss-
|
937 |
-
|
938 |
-
color: #b2bfc9;
|
939 |
-
font-size: 11px;
|
940 |
-
border: 2px solid #28313a;
|
941 |
-
line-height: 24px;
|
942 |
-
padding: 0 10px;
|
943 |
-
|
944 |
-
-webkit-border-radius: 3px;
|
945 |
-
-moz-border-radius: 3px;
|
946 |
-
border-radius: 3px;
|
947 |
}
|
948 |
|
949 |
-
.n2-ss-
|
950 |
-
|
951 |
}
|
952 |
|
953 |
-
.n2-ss-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
padding: 0 6px;
|
958 |
-
cursor: default;
|
959 |
-
opacity: 0.2;
|
960 |
}
|
961 |
|
962 |
-
.n2-ss-
|
963 |
-
|
|
|
|
|
964 |
}
|
965 |
|
966 |
-
.n2-ss-
|
967 |
-
|
968 |
-
|
969 |
-
left:
|
970 |
-
padding: 5px 0;
|
971 |
-
cursor: default;
|
972 |
-
line-height: 24px;
|
973 |
}
|
974 |
|
975 |
-
|
976 |
-
|
|
|
977 |
}
|
978 |
|
979 |
-
.n2-ss-
|
980 |
-
|
981 |
-
.n2-ss-layer-row.n2-active > .n2-ss-layer-title .n2-actions .n2-i,
|
982 |
-
.n2-ss-layer-row.n2-selected .n2-ss-layer-title,
|
983 |
-
.n2-ss-layer-row.n2-selected .n2-ss-layer-title .n2-actions-left .n2-i,
|
984 |
-
.n2-ss-layer-row.n2-selected .n2-ss-layer-title .n2-actions .n2-i {
|
985 |
color: #fff;
|
|
|
986 |
}
|
987 |
|
988 |
-
.n2-ss-
|
989 |
-
|
990 |
-
|
991 |
-
padding: 0;
|
992 |
}
|
993 |
|
994 |
-
|
995 |
-
|
996 |
-
|
|
|
997 |
}
|
998 |
|
999 |
-
.n2-ss-
|
1000 |
-
|
1001 |
}
|
1002 |
|
1003 |
-
.n2-ss-
|
1004 |
-
|
1005 |
-
|
1006 |
}
|
1007 |
|
1008 |
-
.n2-ss-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
cursor: pointer;
|
1013 |
-
text-transform: capitalize;
|
1014 |
}
|
1015 |
|
1016 |
-
.n2-ss-
|
1017 |
-
|
1018 |
}
|
1019 |
|
1020 |
-
.n2-
|
1021 |
-
|
1022 |
-
right: 0;
|
1023 |
-
top: 0;
|
1024 |
-
cursor: default;
|
1025 |
-
padding: 0 6px;
|
1026 |
}
|
1027 |
|
1028 |
-
.n2-
|
1029 |
-
|
1030 |
-
display: inline-block;
|
1031 |
-
height: 100%;
|
1032 |
}
|
1033 |
|
1034 |
-
.n2-
|
1035 |
-
|
1036 |
-
top: 0;
|
1037 |
-
left: 0;
|
1038 |
-
padding: 0 16px;
|
1039 |
-
cursor: default;
|
1040 |
-
font-size: 16px;
|
1041 |
-
line-height: 38px;
|
1042 |
}
|
1043 |
|
1044 |
-
.n2-
|
1045 |
-
|
1046 |
-
|
|
|
|
|
|
|
1047 |
}
|
1048 |
|
1049 |
-
.
|
1050 |
-
|
1051 |
}
|
1052 |
|
1053 |
-
#
|
1054 |
-
|
1055 |
-
|
1056 |
}
|
1057 |
|
1058 |
-
#
|
1059 |
margin-bottom: 0;
|
1060 |
}
|
1061 |
|
1062 |
-
|
1063 |
-
|
1064 |
-
}
|
1065 |
|
1066 |
-
#layer-animation-chain-in,
|
1067 |
-
#layer-animation-chain-out {
|
1068 |
-
position: relative;
|
1069 |
}
|
1070 |
|
1071 |
-
|
1072 |
-
|
1073 |
-
#layer-animation-chain-out .sortable-placeholder {
|
1074 |
-
background-color: #212d3a;
|
1075 |
-
border-bottom: 1px solid #343f4c;
|
1076 |
-
border-width: 0 0 1px 0;
|
1077 |
}
|
1078 |
|
1079 |
-
|
1080 |
-
|
1081 |
-
#layer-animation-chain-out .n2-td {
|
1082 |
-
vertical-align: middle;
|
1083 |
}
|
1084 |
|
1085 |
-
|
1086 |
-
background-color: #
|
1087 |
-
margin: -21px 0 0 0;
|
1088 |
-
border-width: 1px 0 0 0;
|
1089 |
-
padding-bottom: 400px;
|
1090 |
-
padding-bottom: 40vh;
|
1091 |
-
position: relative;
|
1092 |
}
|
1093 |
|
1094 |
-
|
1095 |
-
|
1096 |
-
background-color: #343F4C;
|
1097 |
}
|
1098 |
-
|
1099 |
-
.n2-ss-
|
1100 |
-
.n2-ss-
|
1101 |
-
|
1102 |
}
|
1103 |
|
1104 |
-
.n2-ss-
|
1105 |
-
|
|
|
1106 |
}
|
1107 |
|
1108 |
-
#n2-tab-
|
1109 |
-
z-index: 9;
|
1110 |
padding: 0;
|
1111 |
-
min-height: 0;
|
1112 |
-
border: 0;
|
1113 |
-
height: 0;
|
1114 |
-
background: #4d5d70;
|
1115 |
}
|
1116 |
|
1117 |
-
|
1118 |
-
|
1119 |
}
|
1120 |
|
1121 |
-
#n2-
|
1122 |
-
|
1123 |
-
|
1124 |
}
|
1125 |
|
1126 |
-
.n2-ss-
|
1127 |
-
|
|
|
|
|
|
|
1128 |
}
|
1129 |
|
1130 |
-
|
1131 |
-
|
1132 |
-
height: 28px;
|
1133 |
-
white-space: nowrap;
|
1134 |
-
z-index: 1000;
|
1135 |
-
padding: 13px 10px;
|
1136 |
-
line-height: 28px;
|
1137 |
}
|
1138 |
|
1139 |
-
#n2-ss-
|
1140 |
-
|
1141 |
-
|
1142 |
-
vertical-align: top;
|
1143 |
}
|
1144 |
|
1145 |
-
|
1146 |
-
|
1147 |
-
display: inline-block;
|
1148 |
-
vertical-align: top !important;
|
1149 |
}
|
1150 |
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
position: relative;
|
1155 |
}
|
1156 |
|
1157 |
-
|
1158 |
-
|
1159 |
}
|
1160 |
|
1161 |
-
|
|
|
1162 |
display: inline-block;
|
1163 |
-
|
1164 |
-
}
|
1165 |
-
|
1166 |
-
#n2-ss-slide-canvas-settings > .n2-button {
|
1167 |
width: 28px;
|
1168 |
-
|
|
|
|
|
|
|
1169 |
text-align: center;
|
|
|
|
|
1170 |
}
|
1171 |
|
1172 |
-
|
1173 |
-
|
1174 |
-
border-color: #0c92df;
|
1175 |
}
|
1176 |
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1181 |
}
|
1182 |
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1188 |
border-radius: 3px;
|
|
|
1189 |
}
|
1190 |
|
1191 |
-
|
1192 |
display: block;
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
|
|
|
|
|
|
|
|
|
|
1197 |
}
|
1198 |
|
1199 |
-
|
1200 |
-
|
1201 |
}
|
1202 |
|
1203 |
-
|
1204 |
-
|
1205 |
}
|
1206 |
|
1207 |
-
|
1208 |
-
|
1209 |
-
position: absolute;
|
1210 |
-
right: 0px;
|
1211 |
-
top: 8px;
|
1212 |
-
border-radius: 3px;
|
1213 |
-
border: 2px solid #8793a2;
|
1214 |
-
width: 12px;
|
1215 |
-
height: 12px;
|
1216 |
}
|
1217 |
|
1218 |
-
|
1219 |
-
|
1220 |
}
|
1221 |
|
1222 |
-
|
1223 |
-
|
1224 |
-
}
|
|
|
|
|
1225 |
|
1226 |
-
#n2-ss-
|
1227 |
-
|
1228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1229 |
}
|
1230 |
|
1231 |
-
|
|
|
1232 |
display: none;
|
1233 |
}
|
1234 |
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
line-height: 12px;
|
1240 |
-
margin: 0 -2px;
|
1241 |
}
|
1242 |
|
1243 |
-
#n2-ss-layer-
|
1244 |
-
|
1245 |
}
|
1246 |
|
1247 |
-
#n2-ss-
|
1248 |
-
|
1249 |
}
|
1250 |
|
1251 |
-
#n2-ss-
|
1252 |
-
|
1253 |
-
border-left: 1px solid #8c99a1;
|
1254 |
}
|
1255 |
|
1256 |
-
#n2-ss-
|
1257 |
-
|
|
|
|
|
|
|
|
|
1258 |
}
|
1259 |
|
1260 |
-
#n2-ss-
|
1261 |
-
background-color: #
|
1262 |
-
border-
|
1263 |
}
|
1264 |
|
1265 |
-
#n2-ss-
|
1266 |
-
|
1267 |
-
|
|
|
|
|
1268 |
}
|
1269 |
|
1270 |
-
#n2-ss-
|
1271 |
-
height:
|
1272 |
-
|
1273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1274 |
}
|
1275 |
|
1276 |
-
|
1277 |
-
padding: 0;
|
1278 |
-
width: 28px;
|
1279 |
-
}
|
1280 |
|
1281 |
-
#n2-ss-
|
1282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1283 |
}
|
1284 |
|
1285 |
-
|
1286 |
-
|
1287 |
-
}
|
1288 |
|
1289 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1290 |
max-width: 100%;
|
1291 |
}
|
1292 |
|
1293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1294 |
display: none;
|
1295 |
-
box-sizing: border-box;
|
1296 |
-
white-space: normal;
|
1297 |
-
text-align: left;
|
1298 |
-
}
|
1299 |
-
|
1300 |
-
#n2-ss-layer-parent-linker,
|
1301 |
-
#n2-ss-theme,
|
1302 |
-
#n2-ss-control-line #n2-ss-theme.n2-active {
|
1303 |
-
width: 28px;
|
1304 |
-
height: 28px;
|
1305 |
-
line-height: 28px;
|
1306 |
-
padding: 0;
|
1307 |
-
background-color: #a1aeb5;
|
1308 |
}
|
1309 |
|
1310 |
-
|
1311 |
-
|
|
|
|
|
|
|
|
|
|
|
1312 |
}
|
1313 |
|
1314 |
-
.
|
1315 |
-
display: none;
|
1316 |
position: absolute;
|
1317 |
-
|
1318 |
-
|
1319 |
width: 100%;
|
1320 |
-
height:
|
|
|
1321 |
}
|
1322 |
|
1323 |
-
|
1324 |
-
|
1325 |
-
background-color: RGBA(0, 132, 255, 0.4);
|
1326 |
}
|
1327 |
|
1328 |
-
|
1329 |
-
|
1330 |
-
background-color: RGBA(0, 132, 255, 0.4);
|
1331 |
}
|
1332 |
|
1333 |
-
|
1334 |
-
|
1335 |
}
|
1336 |
|
1337 |
-
|
1338 |
-
|
1339 |
-
display: block;
|
1340 |
}
|
1341 |
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
|
|
|
|
|
|
|
|
|
|
1347 |
opacity: 0.5;
|
1348 |
}
|
1349 |
-
*/
|
1350 |
|
1351 |
-
.n2-
|
1352 |
-
|
1353 |
-
.n2-ss-layer .ui-resizable-se,
|
1354 |
-
.n2-ss-layer .ui-resizable-sw,
|
1355 |
-
.n2-ss-layer .ui-resizable-nw {
|
1356 |
-
opacity: 0;
|
1357 |
}
|
1358 |
|
1359 |
-
|
1360 |
-
|
1361 |
-
.ui-resizable-e:HOVER,
|
1362 |
-
.ui-resizable-s:HOVER,
|
1363 |
-
.ui-resizable-w:HOVER,
|
1364 |
-
.n2-ss-layer .ui-resizable-ne:HOVER,
|
1365 |
-
.n2-ss-layer .ui-resizable-se:HOVER,
|
1366 |
-
.n2-ss-layer .ui-resizable-sw:HOVER,
|
1367 |
-
.n2-ss-layer .ui-resizable-nw:HOVER {
|
1368 |
-
opacity: 1;
|
1369 |
}
|
1370 |
|
1371 |
-
|
1372 |
-
|
1373 |
-
.n2-ss-layer[data-align="left"][data-valign="bottom"] .ui-resizable-sw,
|
1374 |
-
.n2-ss-layer[data-align="center"][data-valign="top"] .ui-resizable-n,
|
1375 |
-
.n2-ss-layer[data-align="center"][data-valign="middle"] .n2-ss-layer-cc,
|
1376 |
-
.n2-ss-layer[data-align="center"][data-valign="bottom"] .ui-resizable-s,
|
1377 |
-
.n2-ss-layer[data-align="right"][data-valign="top"] .ui-resizable-ne,
|
1378 |
-
.n2-ss-layer[data-align="right"][data-valign="middle"] .ui-resizable-e,
|
1379 |
-
.n2-ss-layer[data-align="right"][data-valign="bottom"] .ui-resizable-se {
|
1380 |
-
background: #0c92df;
|
1381 |
-
opacity: 1;
|
1382 |
-
border: 1px solid #fff;
|
1383 |
}
|
1384 |
|
1385 |
-
.n2-ss-
|
1386 |
-
|
1387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1388 |
display: block;
|
1389 |
-
|
|
|
|
|
|
|
1390 |
}
|
1391 |
|
1392 |
-
.n2-ss-layer
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
}
|
1400 |
|
1401 |
-
.n2-ss-layer .
|
1402 |
-
|
1403 |
-
top: -4px;
|
1404 |
-
margin-left: -4px;
|
1405 |
}
|
1406 |
|
1407 |
-
.n2-ss-layer
|
1408 |
-
|
1409 |
-
top:
|
1410 |
-
margin-top: -4px;
|
1411 |
}
|
1412 |
|
1413 |
-
.n2-ss-layer
|
1414 |
-
|
1415 |
-
left: 50%;
|
1416 |
-
margin-left: -4px;
|
1417 |
}
|
1418 |
|
1419 |
-
.n2-ss-layer .
|
1420 |
-
left:
|
1421 |
-
top: 50%;
|
1422 |
-
margin-top: -4px;
|
1423 |
}
|
1424 |
|
1425 |
-
.n2-ss-layer .
|
1426 |
-
|
1427 |
-
|
1428 |
}
|
1429 |
|
1430 |
-
.n2-ss-layer .
|
1431 |
-
|
1432 |
-
|
1433 |
}
|
1434 |
|
1435 |
-
.n2-ss-layer
|
1436 |
-
|
1437 |
-
bottom: -4px;
|
1438 |
}
|
1439 |
|
1440 |
-
.n2-ss-layer .
|
1441 |
-
left:
|
1442 |
-
top: -4px;
|
1443 |
}
|
1444 |
|
1445 |
-
|
1446 |
-
|
1447 |
-
top: 50%;
|
1448 |
-
margin-top: -4px;
|
1449 |
-
margin-left: -4px;
|
1450 |
}
|
1451 |
|
1452 |
-
.n2-ss-layer-
|
1453 |
-
|
1454 |
-
z-index: 1000;
|
1455 |
-
width: 72px;
|
1456 |
-
height: 28px;
|
1457 |
-
margin: -6px 0 0 -34px;
|
1458 |
-
padding: 5px;
|
1459 |
}
|
1460 |
|
1461 |
-
|
1462 |
-
|
1463 |
-
cursor: pointer;
|
1464 |
-
width: 26px;
|
1465 |
-
height: 26px;
|
1466 |
-
border-radius: 3px;
|
1467 |
-
background: RGBA(43, 52, 63, 0.9);
|
1468 |
-
text-align: center;
|
1469 |
-
font-size: 16px !important;
|
1470 |
-
line-height: 26px !important;
|
1471 |
-
color: #fff;
|
1472 |
-
margin: 1px;
|
1473 |
-
vertical-align: top;
|
1474 |
}
|
1475 |
|
1476 |
-
.n2-ss-layer-
|
1477 |
-
|
1478 |
-
overflow: hidden;
|
1479 |
}
|
1480 |
|
1481 |
-
.n2-ss-layer
|
1482 |
-
|
1483 |
}
|
1484 |
|
1485 |
-
.n2-ss-
|
1486 |
-
|
1487 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1488 |
border-radius: 3px;
|
1489 |
-
|
1490 |
-
|
1491 |
-
padding: 4px 6px;
|
1492 |
-
color: #fff;
|
1493 |
-
font-size: 10px;
|
1494 |
-
background: RGBA(32, 41, 52, 0.95);
|
1495 |
}
|
1496 |
|
1497 |
-
.n2-ss-
|
1498 |
-
|
1499 |
}
|
1500 |
|
1501 |
-
.n2-ss-layer-
|
1502 |
-
display: none;
|
1503 |
position: absolute;
|
1504 |
-
left: 0;
|
1505 |
top: 0;
|
1506 |
right: 0;
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
}
|
1511 |
|
1512 |
-
|
1513 |
-
.n2-
|
1514 |
-
|
1515 |
-
div#n2-ss-0 .n2-ss-layer:HOVER .n2-ss-layer-border {
|
1516 |
-
display: block;
|
1517 |
}
|
1518 |
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
display: none !important;
|
1527 |
}
|
1528 |
|
1529 |
-
.n2-ss-
|
1530 |
-
|
1531 |
-
.n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,
|
1532 |
-
.n2-ss-layer-edit-visible #n2-tab-smartslider-editor:HOVER /*#n2-ss-0:HOVER*/ .n2-ss-layer.n2-active .ui-resizable-handle,
|
1533 |
-
.n2-ss-resize-layer .n2-ss-layer.n2-active .ui-rotatable-handle,
|
1534 |
-
.n2-ss-layer-edit-visible #n2-ss-0:HOVER .n2-ss-layer.n2-active .ui-rotatable-handle,
|
1535 |
-
.n2-ss-layer-edit-visible #n2-tab-smartslider-editor:HOVER /*#n2-ss-0:HOVER*/ .n2-ss-layer.n2-active .n2-ss-layer-cc {
|
1536 |
-
display: block !important;
|
1537 |
}
|
1538 |
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-border {
|
1545 |
-
display: none !important;
|
1546 |
}
|
1547 |
|
1548 |
-
.n2-ss-layer-
|
1549 |
-
|
|
|
|
|
1550 |
}
|
1551 |
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
background: #a1aeb5;
|
1556 |
-
width: 1px;
|
1557 |
-
height: 1px;
|
1558 |
}
|
1559 |
|
1560 |
-
|
1561 |
-
|
1562 |
}
|
1563 |
|
1564 |
-
|
1565 |
-
display:
|
|
|
|
|
1566 |
}
|
1567 |
|
1568 |
-
|
1569 |
-
|
|
|
1570 |
}
|
1571 |
|
1572 |
-
.n2-ss-
|
1573 |
-
|
1574 |
-
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-resizable-handle {
|
1575 |
-
display: none !important;
|
1576 |
}
|
1577 |
|
1578 |
-
.n2-ss-layer-
|
1579 |
-
|
1580 |
}
|
1581 |
|
1582 |
-
.n2-ss-
|
1583 |
-
|
|
|
|
|
|
|
1584 |
}
|
1585 |
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
|
|
|
|
1590 |
}
|
1591 |
|
1592 |
-
#n2-ss-
|
1593 |
-
|
1594 |
-
top: 0;
|
1595 |
-
height: 100%;
|
1596 |
}
|
1597 |
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
}
|
1603 |
|
1604 |
-
#n2-ss-
|
1605 |
-
|
1606 |
bottom: 0;
|
1607 |
-
width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1608 |
}
|
1609 |
|
1610 |
-
#n2-ss-
|
1611 |
-
|
1612 |
}
|
1613 |
|
1614 |
-
#n2-ss-
|
1615 |
-
|
1616 |
-
background: RGBA(0, 0, 0, 0); /* IE fix, layer empty area doesnt trigger mouseenter when no background */
|
1617 |
}
|
1618 |
|
1619 |
-
#n2-ss-
|
1620 |
-
|
1621 |
-
cursor: auto;
|
1622 |
}
|
1623 |
|
1624 |
-
|
1625 |
-
|
1626 |
-
visibility: visible !important;
|
1627 |
-
}
|
1628 |
-
*/
|
1629 |
-
.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer {
|
1630 |
-
cursor: default;
|
1631 |
}
|
1632 |
|
1633 |
-
.n2-ss-
|
1634 |
-
|
1635 |
-
.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,
|
1636 |
-
.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,
|
1637 |
-
.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .n2-ss-layer-border,
|
1638 |
-
#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
1639 |
-
#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
1640 |
-
#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-border,
|
1641 |
-
#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .ui-resizable-handle {
|
1642 |
-
display: none !important;
|
1643 |
}
|
1644 |
|
1645 |
-
|
1646 |
position: relative;
|
1647 |
-
|
1648 |
-
width: 100%;
|
1649 |
}
|
1650 |
|
1651 |
-
.n2-ss-
|
1652 |
-
|
1653 |
-
.n2-ss-item-vimeo,
|
1654 |
-
.n2-ss-item-area,
|
1655 |
-
.n2-ss-item-imagearea {
|
1656 |
-
height: 100%;
|
1657 |
}
|
1658 |
|
1659 |
-
|
1660 |
position: relative;
|
|
|
|
|
|
|
|
|
1661 |
}
|
1662 |
|
1663 |
-
#
|
1664 |
-
|
1665 |
-
left: 0;
|
1666 |
-
height: 10px;
|
1667 |
-
width: 100%;
|
1668 |
-
background: #f04040;
|
1669 |
-
cursor: ns-resize;
|
1670 |
}
|
1671 |
|
1672 |
-
.n2-
|
1673 |
-
background: #4affff;
|
1674 |
-
position: absolute;
|
1675 |
-
left: 0;
|
1676 |
-
top: 0;
|
1677 |
-
z-index: 1000000;
|
1678 |
display: none;
|
1679 |
}
|
1680 |
|
1681 |
-
.n2-
|
1682 |
-
|
1683 |
-
height: 1px;
|
1684 |
}
|
1685 |
|
1686 |
-
.n2-
|
1687 |
-
|
1688 |
-
width: 1px;
|
1689 |
}
|
1690 |
|
1691 |
-
|
1692 |
-
|
1693 |
-
padding: 0;
|
1694 |
-
padding-bottom: 20px;
|
1695 |
}
|
1696 |
|
1697 |
-
|
1698 |
margin: 0;
|
1699 |
-
padding: 0;
|
1700 |
-
background: #eef3f8;
|
1701 |
}
|
1702 |
|
1703 |
-
|
1704 |
-
|
|
|
|
|
|
|
1705 |
}
|
1706 |
|
1707 |
-
|
1708 |
-
|
|
|
1709 |
}
|
1710 |
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
|
|
1714 |
}
|
1715 |
|
1716 |
-
.n2-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
background: #202934;
|
1723 |
|
1724 |
-
|
1725 |
-
|
1726 |
-
text-align: center;
|
1727 |
}
|
1728 |
|
1729 |
-
.n2-
|
1730 |
-
|
1731 |
-
top: 0;
|
1732 |
-
line-height: 30px;
|
1733 |
-
height: 30px;
|
1734 |
-
padding: 13px 11px;
|
1735 |
}
|
1736 |
|
1737 |
-
.n2-
|
1738 |
-
|
1739 |
}
|
1740 |
|
1741 |
-
.n2-
|
1742 |
-
|
|
|
|
|
|
|
1743 |
}
|
1744 |
|
1745 |
-
.n2-
|
1746 |
-
|
1747 |
-
|
1748 |
-
height: 30px;
|
1749 |
-
line-height: 30px;
|
1750 |
-
font-size: 16px;
|
1751 |
-
color: #fff;
|
1752 |
-
padding: 0;
|
1753 |
-
vertical-align: top;
|
1754 |
}
|
1755 |
|
1756 |
-
.n2-
|
1757 |
-
|
1758 |
}
|
1759 |
|
1760 |
-
.n2-
|
1761 |
-
|
1762 |
-
white-space: nowrap;
|
1763 |
-
overflow: hidden;
|
1764 |
-
text-overflow: ellipsis;
|
1765 |
-
margin: 0 60px 0 60px;
|
1766 |
-
text-align: center;
|
1767 |
}
|
1768 |
|
1769 |
-
.n2-ss-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
color: #95a1ab;
|
1775 |
-
bottom: 0px;
|
1776 |
-
background: #202934;
|
1777 |
-
border-bottom-left-radius: 5px;
|
1778 |
-
border-bottom-right-radius: 5px;
|
1779 |
}
|
1780 |
|
1781 |
-
#n2-ss-
|
1782 |
-
|
1783 |
-
top: 0;
|
1784 |
-
left: -35px;
|
1785 |
-
width: 32px;
|
1786 |
}
|
1787 |
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
|
|
|
|
1791 |
}
|
1792 |
|
1793 |
-
|
1794 |
-
|
1795 |
-
height: 32px;
|
1796 |
-
line-height: 32px;
|
1797 |
-
color: #b0bdc7;
|
1798 |
}
|
1799 |
|
1800 |
-
|
1801 |
-
|
1802 |
}
|
|
|
|
|
|
|
1803 |
|
1804 |
-
#n2-ss-
|
1805 |
-
|
1806 |
-
|
|
|
1807 |
|
1808 |
-
|
1809 |
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
|
|
|
|
|
|
|
|
|
|
1813 |
}
|
1814 |
|
1815 |
-
|
1816 |
-
|
1817 |
-
.n2-ss-layer-edit-visible.n2-ss-resize-layer #n2-ss-slide-sidebar {
|
1818 |
-
display: none;
|
1819 |
}
|
1820 |
|
1821 |
-
#n2-
|
1822 |
-
.n2-ss-layers-add {
|
1823 |
position: relative;
|
1824 |
-
|
1825 |
-
overflow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1826 |
}
|
1827 |
|
1828 |
-
|
1829 |
-
|
1830 |
}
|
1831 |
|
1832 |
-
.n2-
|
1833 |
-
|
|
|
|
|
|
|
|
|
1834 |
}
|
1835 |
|
1836 |
-
#n2-ss-slide-
|
1837 |
-
|
|
|
|
|
1838 |
}
|
1839 |
|
1840 |
-
#n2-ss-
|
1841 |
-
|
|
|
|
|
1842 |
}
|
1843 |
|
1844 |
-
#n2-ss-slide-
|
1845 |
-
|
|
|
|
|
1846 |
}
|
1847 |
|
1848 |
-
#n2-ss-slide-
|
1849 |
-
|
|
|
|
|
1850 |
}
|
1851 |
|
1852 |
-
#n2-ss-slide-
|
1853 |
display: block;
|
1854 |
}
|
1855 |
|
1856 |
-
|
|
|
|
|
|
|
|
|
1857 |
display: block;
|
1858 |
-
|
1859 |
}
|
1860 |
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
|
|
1865 |
}
|
1866 |
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
|
|
|
|
1870 |
}
|
1871 |
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
|
|
|
|
1875 |
}
|
1876 |
|
1877 |
-
|
1878 |
-
|
1879 |
-
font-size: 10px;
|
1880 |
}
|
1881 |
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
|
|
1886 |
}
|
1887 |
|
1888 |
-
|
1889 |
-
|
1890 |
-
max-width: 120px !important;
|
1891 |
-
}
|
1892 |
-
*/
|
1893 |
-
#n2-ss-slide-sidebar textarea {
|
1894 |
-
max-width: 290px !important;
|
1895 |
-
width: 290px !important;
|
1896 |
}
|
1897 |
|
1898 |
-
#n2-ss-
|
1899 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1900 |
overflow: hidden;
|
1901 |
-
|
1902 |
-
|
1903 |
-
#n2-ss-slide-sidebar .n2-sidebar-row {
|
1904 |
-
line-height: 34px;
|
1905 |
-
background: #28313a;
|
1906 |
-
border-bottom: 1px solid RGBA(0, 0, 0, 0.2);
|
1907 |
-
}
|
1908 |
-
|
1909 |
-
#n2-ss-slide-sidebar .n2-list li {
|
1910 |
-
border-bottom: 1px solid RGBA(0, 0, 0, 0.2);
|
1911 |
-
}
|
1912 |
|
1913 |
-
|
1914 |
-
height:
|
1915 |
-
line-height: 24px;
|
1916 |
}
|
1917 |
|
1918 |
-
#n2-ss-
|
1919 |
-
border: 0;
|
1920 |
-
border-collapse: separate;
|
1921 |
-
}
|
1922 |
|
1923 |
-
|
1924 |
-
|
1925 |
-
line-height: 47px;
|
1926 |
-
height: 47px;
|
1927 |
-
border: 1px solid #1a2028;
|
1928 |
-
border-left: 0;
|
1929 |
-
color: #b2bfc9;
|
1930 |
}
|
1931 |
|
1932 |
-
#n2-ss-
|
1933 |
-
|
1934 |
-
|
1935 |
}
|
1936 |
|
1937 |
-
#n2-ss-slide-
|
1938 |
-
|
|
|
|
|
|
|
1939 |
color: #fff;
|
|
|
|
|
|
|
|
|
1940 |
}
|
1941 |
|
1942 |
-
#n2-ss-slide-
|
|
|
|
|
|
|
1943 |
display: none;
|
1944 |
}
|
1945 |
|
1946 |
-
#n2-ss-slide-
|
1947 |
-
|
|
|
1948 |
}
|
1949 |
|
1950 |
-
#n2-ss-slide-
|
1951 |
-
|
1952 |
}
|
1953 |
|
1954 |
-
|
1955 |
-
WHEN SIDEBAR DETACHED
|
1956 |
-
**/
|
1957 |
-
.n2-sidebar-hidden .n2-panel-titlebar {
|
1958 |
-
line-height: 30px;
|
1959 |
-
height: 30px;
|
1960 |
cursor: move;
|
1961 |
-
border-top-left-radius: 5px;
|
1962 |
-
border-top-right-radius: 5px;
|
1963 |
-
}
|
1964 |
-
|
1965 |
-
.n2-sidebar-hidden .n2-panel-titlebar-nav {
|
1966 |
-
padding: 0 8px;
|
1967 |
-
}
|
1968 |
-
|
1969 |
-
.n2-sidebar-hidden #n2-ss-slide-sidebar {
|
1970 |
-
position: fixed;
|
1971 |
-
left: 100px;
|
1972 |
-
top: 100px;
|
1973 |
-
z-index: 100000;
|
1974 |
-
}
|
1975 |
-
|
1976 |
-
.n2-ss-slide-sidebar-crop {
|
1977 |
-
width: 100%;
|
1978 |
-
height: 100%;
|
1979 |
-
border-radius: 3px;
|
1980 |
-
box-shadow: 0px 1px 10px RGBA(0, 0, 0, 0.5);
|
1981 |
-
overflow: hidden;
|
1982 |
-
background: #3c4958;
|
1983 |
}
|
1984 |
|
1985 |
-
|
1986 |
-
|
1987 |
-
overflow-x: hidden;
|
1988 |
-
}
|
1989 |
-
*/
|
1990 |
-
.n2-ss-edit-slide-top {
|
1991 |
-
background: #fff;
|
1992 |
-
border-bottom: 1px solid #ccd1d6;
|
1993 |
-
padding: 30px 20px 30px 40px;
|
1994 |
-
display: flex;
|
1995 |
-
flex-wrap: nowrap;
|
1996 |
-
justify-content: space-between;
|
1997 |
-
flex-flow: row;
|
1998 |
}
|
1999 |
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
cursor: pointer;
|
2004 |
}
|
2005 |
|
2006 |
-
.n2-ss-
|
2007 |
-
|
2008 |
-
height: 135px;
|
2009 |
-
border-radius: 5px;
|
2010 |
}
|
2011 |
|
2012 |
-
|
2013 |
-
|
2014 |
-
text-align: left;
|
2015 |
-
vertical-align: middle;
|
2016 |
-
flex: 1;
|
2017 |
|
|
|
2018 |
}
|
2019 |
|
2020 |
-
.n2-ss-edit-slide-
|
2021 |
-
margin: 10px 0;
|
2022 |
-
}
|
2023 |
|
2024 |
-
|
2025 |
-
flex: 1;
|
2026 |
-
align-self: flex-end;
|
2027 |
-
padding: 0 20px;
|
2028 |
}
|
2029 |
|
2030 |
-
.n2-ss-edit-slide-
|
2031 |
-
color: #606d7b;
|
2032 |
-
margin-bottom: 15px;
|
2033 |
-
cursor: pointer;
|
2034 |
-
line-height: 30px;
|
2035 |
-
}
|
2036 |
|
2037 |
-
|
2038 |
-
font-family: 'Nextend' !important;
|
2039 |
-
content: "\e94f";
|
2040 |
-
font-size: 22px;
|
2041 |
-
vertical-align: top;
|
2042 |
-
margin: 0 5px;
|
2043 |
-
color: #b0b9bf;
|
2044 |
}
|
2045 |
|
2046 |
-
|
2047 |
-
|
|
|
2048 |
}
|
2049 |
|
2050 |
-
.n2-ss-
|
2051 |
-
|
2052 |
}
|
2053 |
|
2054 |
-
|
2055 |
-
margin-top: 15px;
|
2056 |
-
}
|
2057 |
|
2058 |
-
.n2-ss-
|
2059 |
-
|
2060 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2061 |
|
2062 |
-
.n2-ss-edit-slide-top-tabs a.n2-active {
|
2063 |
-
color: #fff;
|
2064 |
-
background-color: #0c92df;
|
2065 |
-
border-color: #0c92df;
|
2066 |
}
|
2067 |
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
}
|
2073 |
|
2074 |
-
.
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
|
|
|
|
|
|
2078 |
}
|
2079 |
|
2080 |
-
.n2-ss-
|
2081 |
-
|
2082 |
-
|
2083 |
}
|
2084 |
|
2085 |
-
.n2-ss-
|
2086 |
-
|
2087 |
-
|
2088 |
-
border-color: #0c92df;
|
2089 |
}
|
2090 |
|
2091 |
-
|
2092 |
-
border-left: 2px solid #0c92df;
|
2093 |
-
margin-left: -2px;
|
2094 |
-
}
|
2095 |
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
|
|
|
|
2100 |
}
|
2101 |
|
2102 |
-
.n2-ss-
|
2103 |
-
.
|
2104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2105 |
}
|
2106 |
|
2107 |
-
.n2-ss-
|
2108 |
-
.n2-ss-
|
2109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2110 |
}
|
2111 |
|
2112 |
-
|
2113 |
-
background: #212d3a;
|
2114 |
position: absolute;
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
width: 50px;
|
2119 |
-
text-align: center;
|
2120 |
-
}
|
2121 |
-
|
2122 |
-
.n2-ss-slide-vertical-bar-inner {
|
2123 |
-
position: relative;
|
2124 |
-
padding-top: 0.01px;
|
2125 |
-
}
|
2126 |
-
|
2127 |
-
#n2-ss-slide-vertical-bar .n2-ss-slide-vertical-bar-inner > * {
|
2128 |
-
margin-top: 10px;
|
2129 |
-
color: #80a3b5;
|
2130 |
}
|
2131 |
|
2132 |
-
|
2133 |
-
|
|
|
2134 |
}
|
2135 |
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2139 |
}
|
2140 |
|
2141 |
-
|
2142 |
-
|
2143 |
-
background: transparent;
|
2144 |
position: absolute;
|
2145 |
-
top:
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
|
|
|
|
|
|
|
|
2152 |
}
|
2153 |
|
2154 |
-
|
2155 |
-
|
2156 |
}
|
2157 |
|
2158 |
-
|
2159 |
-
|
|
|
|
|
|
|
|
|
|
|
2160 |
}
|
2161 |
|
2162 |
-
|
2163 |
-
|
|
|
2164 |
}
|
2165 |
|
2166 |
-
.n2-ss-
|
2167 |
-
|
|
|
|
|
2168 |
}
|
2169 |
|
2170 |
-
.n2-ss-
|
2171 |
-
|
2172 |
-
|
2173 |
-
padding: 10px 0;
|
2174 |
}
|
2175 |
|
2176 |
-
.n2-ss-
|
2177 |
-
|
2178 |
-
|
|
|
|
|
2179 |
}
|
2180 |
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
border-bottom: 1px solid #ccd1d6;
|
2186 |
-
background-color: #e9edf0;
|
2187 |
-
margin-left: 49px;
|
2188 |
-
border-top: 1px solid #ccd1d6;
|
2189 |
}
|
2190 |
|
2191 |
-
.n2-ss-
|
2192 |
-
|
|
|
|
|
|
|
2193 |
}
|
2194 |
|
2195 |
-
.n2-ss-
|
2196 |
-
|
2197 |
-
|
2198 |
}
|
2199 |
|
2200 |
-
.n2-ss-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
|
|
2204 |
}
|
2205 |
|
2206 |
-
.n2-ss-
|
2207 |
-
|
|
|
|
|
2208 |
}
|
2209 |
|
2210 |
-
|
2211 |
-
.n2-ss-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
.n2-ss-slides-outer-container-visible .n2-sidebar,
|
2216 |
-
.n2-ss-slides-outer-container-visible #n2-tab-smartslider-editor,
|
2217 |
-
.n2-ss-slides-outer-container-visible #n2-ss-undo,
|
2218 |
-
.n2-ss-slides-outer-container-visible #n2-ss-redo,
|
2219 |
-
.n2-ss-slides-outer-container-visible .n2-ss-device-zoomer,
|
2220 |
-
.n2-ss-slides-outer-container-visible .n2-top-bar-actions {
|
2221 |
-
display: none !important;
|
2222 |
-
}
|
2223 |
-
*/
|
2224 |
-
.n2-ss-layer-status {
|
2225 |
-
display: inline-block;
|
2226 |
-
position: relative;
|
2227 |
-
margin: 0 3px;
|
2228 |
}
|
2229 |
|
2230 |
-
.n2-ss-layer
|
2231 |
-
|
2232 |
-
|
2233 |
}
|
2234 |
|
2235 |
-
|
2236 |
-
|
|
|
|
|
|
|
2237 |
}
|
2238 |
|
2239 |
-
.n2-ss-layer
|
2240 |
-
|
|
|
|
|
|
|
2241 |
}
|
2242 |
|
2243 |
-
|
2244 |
-
.n2-ss-layer
|
2245 |
-
|
|
|
|
|
2246 |
}
|
2247 |
|
2248 |
-
.n2-ss-layer
|
2249 |
-
|
2250 |
-
|
2251 |
-
*/
|
2252 |
-
.n2-ss-layer-list-top-bar .n2-h2 {
|
2253 |
-
display: inline-block;
|
2254 |
-
line-height: 28px;
|
2255 |
-
color: #fff;
|
2256 |
-
padding: 0 5px;
|
2257 |
}
|
2258 |
|
2259 |
-
.n2-ss-layer-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
margin: 0 5px;
|
2265 |
}
|
2266 |
|
2267 |
-
|
2268 |
-
|
|
|
|
|
|
|
2269 |
}
|
2270 |
|
2271 |
-
.n2-ss-layer
|
2272 |
-
|
|
|
2273 |
}
|
2274 |
|
2275 |
-
|
2276 |
-
|
2277 |
-
bottom:
|
2278 |
-
width: 340px;
|
2279 |
-
margin: 0 -1px;
|
2280 |
-
z-index: 1;
|
2281 |
-
height: 48px;
|
2282 |
-
user-select: none;
|
2283 |
-
-o-user-select: none;
|
2284 |
-
-moz-user-select: none;
|
2285 |
-
-khtml-user-select: none;
|
2286 |
-
-webkit-user-select: none;
|
2287 |
-
display: none;
|
2288 |
-
background-color: #28313a;
|
2289 |
-
z-index: 10000;
|
2290 |
}
|
2291 |
|
2292 |
-
|
2293 |
-
|
|
|
2294 |
}
|
2295 |
|
2296 |
-
|
2297 |
-
|
|
|
2298 |
}
|
2299 |
|
2300 |
-
|
2301 |
-
|
|
|
|
|
|
|
2302 |
}
|
2303 |
|
2304 |
-
|
2305 |
-
|
2306 |
}
|
2307 |
|
2308 |
-
.n2-ss-
|
2309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2310 |
}
|
2311 |
|
2312 |
-
#n2-ss-
|
2313 |
-
|
2314 |
-
vertical-align: top;
|
2315 |
}
|
2316 |
|
2317 |
-
#n2-ss-
|
2318 |
-
|
|
|
|
|
2319 |
}
|
2320 |
|
2321 |
-
.
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
|
|
2327 |
}
|
2328 |
|
2329 |
-
|
2330 |
-
|
2331 |
}
|
2332 |
|
2333 |
-
|
2334 |
-
|
|
|
2335 |
}
|
2336 |
|
2337 |
-
.n2-ss-layer-
|
2338 |
-
|
|
|
|
|
|
|
|
|
|
|
2339 |
}
|
2340 |
|
2341 |
-
|
2342 |
-
|
|
|
2343 |
}
|
2344 |
|
2345 |
-
|
2346 |
-
|
|
|
|
|
2347 |
}
|
2348 |
|
2349 |
-
.n2-ss-
|
2350 |
-
|
|
|
|
|
|
|
|
|
2351 |
}
|
2352 |
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
|
|
|
|
2358 |
}
|
2359 |
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
}
|
2364 |
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
overflow: hidden;
|
2369 |
}
|
2370 |
|
2371 |
-
.n2-
|
2372 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2373 |
}
|
2374 |
|
2375 |
-
.n2-
|
2376 |
-
|
|
|
2377 |
}
|
2378 |
|
2379 |
-
.n2-
|
2380 |
-
|
|
|
|
|
|
|
2381 |
}
|
2382 |
|
2383 |
-
.n2-
|
2384 |
-
|
|
|
|
|
|
|
2385 |
}
|
2386 |
|
2387 |
-
.n2-
|
2388 |
-
|
|
|
|
|
|
|
2389 |
}
|
2390 |
|
2391 |
-
.n2-
|
2392 |
-
|
|
|
|
|
|
|
2393 |
}
|
2394 |
|
2395 |
-
|
|
|
|
|
|
|
|
|
|
|
2396 |
|
2397 |
-
|
2398 |
-
|
2399 |
-
overflow-y: auto;
|
2400 |
-
overflow-x: hidden;
|
2401 |
}
|
2402 |
|
2403 |
-
|
2404 |
-
|
2405 |
}
|
2406 |
|
2407 |
-
|
2408 |
-
.n2-ss-layer-menu {
|
2409 |
-
display: none;
|
2410 |
-
width: 160px;
|
2411 |
-
margin-left: -80px;
|
2412 |
-
height: 46px;
|
2413 |
position: absolute;
|
|
|
2414 |
left: 0;
|
2415 |
-
|
2416 |
-
z-index: 100000;
|
2417 |
white-space: nowrap;
|
2418 |
-
|
2419 |
}
|
2420 |
|
2421 |
-
|
2422 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2423 |
}
|
2424 |
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
|
|
2428 |
}
|
2429 |
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
text-decoration: none;
|
2434 |
-
padding: 0 12px;
|
2435 |
-
height: 40px;
|
2436 |
-
display: inline-block;
|
2437 |
-
background: RGBA(32, 41, 52, 0.95);
|
2438 |
}
|
2439 |
|
2440 |
-
.n2-ss-
|
2441 |
-
|
2442 |
-
|
|
|
|
|
|
|
|
|
|
|
2443 |
}
|
2444 |
|
2445 |
-
.n2-ss-layer-
|
2446 |
-
|
2447 |
-
border-bottom-right-radius: 50px;
|
2448 |
}
|
2449 |
|
2450 |
-
.n2-ss-layer-
|
2451 |
-
|
2452 |
}
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
width: 150px;
|
2457 |
}
|
2458 |
|
2459 |
-
#n2-
|
2460 |
-
|
2461 |
-
top: 0;*/
|
2462 |
-
background-color: #3c4958;
|
2463 |
-
/*border-bottom: 1px solid #28313a;*/
|
2464 |
-
z-index: 3;
|
2465 |
}
|
2466 |
|
2467 |
-
#n2-
|
2468 |
-
|
2469 |
}
|
2470 |
|
2471 |
-
|
2472 |
display: none;
|
|
|
2473 |
|
|
|
|
|
2474 |
}
|
2475 |
|
2476 |
-
|
2477 |
-
|
|
|
2478 |
}
|
2479 |
|
2480 |
-
.n2-
|
2481 |
-
display:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2482 |
}
|
2483 |
|
2484 |
-
.n2-
|
2485 |
-
|
2486 |
-
color: #fff;
|
2487 |
-
vertical-align: top;
|
2488 |
-
padding: 10px 15px 9px 15px;
|
2489 |
}
|
2490 |
|
2491 |
-
.n2-
|
2492 |
-
|
|
|
2493 |
}
|
2494 |
|
2495 |
-
.n2-
|
2496 |
-
|
2497 |
}
|
2498 |
|
2499 |
-
|
2500 |
-
margin: 0
|
|
|
2501 |
}
|
2502 |
|
2503 |
-
.n2-
|
2504 |
-
|
2505 |
-
top: 10px;
|
2506 |
-
right: 5px;
|
2507 |
-
margin: 0 10px;
|
2508 |
}
|
2509 |
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
|
|
|
|
|
|
2513 |
}
|
2514 |
|
2515 |
-
|
2516 |
-
|
|
|
|
|
2517 |
}
|
2518 |
|
2519 |
-
|
2520 |
-
margin:
|
2521 |
}
|
2522 |
|
2523 |
-
.n2-ss-
|
2524 |
-
|
2525 |
-
color: #fff;
|
2526 |
-
padding: 0 10px;
|
2527 |
-
vertical-align: top;
|
2528 |
}
|
2529 |
|
2530 |
-
#n2-
|
2531 |
-
|
|
|
|
|
2532 |
}
|
2533 |
|
2534 |
-
.n2-ss-
|
2535 |
-
|
2536 |
-
width: 28px;
|
2537 |
-
font-size: 16px;
|
2538 |
-
vertical-align: middle;
|
2539 |
}
|
2540 |
|
2541 |
-
|
2542 |
-
|
|
|
2543 |
}
|
2544 |
|
2545 |
-
.n2-
|
2546 |
-
|
|
|
|
|
|
|
|
|
|
|
2547 |
}
|
2548 |
|
2549 |
-
.n2-ss-
|
2550 |
-
|
2551 |
}
|
2552 |
|
2553 |
-
|
2554 |
-
|
2555 |
-
border-collapse: separate;
|
2556 |
-
background: #28313a;
|
2557 |
-
border-bottom: 1px solid #20282f;
|
2558 |
}
|
2559 |
|
2560 |
-
|
2561 |
-
|
2562 |
-
height: 28px;
|
2563 |
-
border: 0px;
|
2564 |
-
border-radius: 50px;
|
2565 |
}
|
2566 |
|
2567 |
-
|
2568 |
-
|
2569 |
-
border-bottom: 1px solid #28313a;
|
2570 |
-
position: relative;
|
2571 |
}
|
2572 |
|
2573 |
-
.n2-ss-
|
2574 |
-
|
2575 |
-
margin: -38px 20px 0;
|
2576 |
}
|
2577 |
|
2578 |
-
|
2579 |
-
|
2580 |
}
|
2581 |
|
2582 |
-
.n2-
|
2583 |
-
|
2584 |
}
|
2585 |
|
2586 |
-
|
2587 |
-
|
2588 |
-
z-index: 10;
|
2589 |
-
right: 10px;
|
2590 |
-
top: 10px;
|
2591 |
-
line-height: 18px;
|
2592 |
-
font-size: 12px;
|
2593 |
-
width: 18px;
|
2594 |
-
display: none;
|
2595 |
}
|
2596 |
|
2597 |
-
.n2-ss-
|
2598 |
-
|
2599 |
-
|
|
|
|
|
2600 |
}
|
2601 |
|
2602 |
-
.n2-ss-
|
2603 |
-
|
|
|
|
|
2604 |
}
|
2605 |
|
2606 |
-
.n2-ss-
|
2607 |
-
|
2608 |
-
|
|
|
|
|
2609 |
}
|
2610 |
|
2611 |
-
.n2-ss-
|
2612 |
-
|
2613 |
-
|
|
|
|
|
|
|
2614 |
}
|
2615 |
|
2616 |
-
|
2617 |
-
|
|
|
|
|
2618 |
}
|
2619 |
|
2620 |
-
|
2621 |
-
|
|
|
|
|
|
|
2622 |
}
|
2623 |
|
2624 |
-
#n2-ss-slide-
|
2625 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2626 |
}
|
2627 |
|
2628 |
-
|
|
|
|
|
|
|
2629 |
display: block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2630 |
}
|
2631 |
|
2632 |
-
#n2-
|
2633 |
-
display: none;
|
2634 |
}
|
2635 |
|
2636 |
-
.n2-ss-
|
2637 |
-
|
2638 |
-
line-height: 18px;
|
2639 |
-
background: #6b7986;
|
2640 |
-
color: #fff;
|
2641 |
}
|
2642 |
|
2643 |
-
.n2-ss-
|
2644 |
-
|
|
|
|
|
|
|
|
|
|
|
2645 |
}
|
2646 |
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2650 |
}
|
2651 |
|
2652 |
-
.n2-ss-
|
2653 |
-
display:
|
2654 |
}
|
2655 |
|
2656 |
-
.n2-ss-
|
2657 |
-
|
2658 |
-
color: #fff;
|
2659 |
}
|
2660 |
|
2661 |
-
.n2-ss-
|
2662 |
-
|
2663 |
}
|
2664 |
|
2665 |
-
.n2-ss-
|
2666 |
-
|
2667 |
}
|
2668 |
|
2669 |
.n2-ss-scrollbar-wrapper {
|
@@ -2726,7 +3462,6 @@ div#n2-ss-0 .n2-ss-layer-chain-parent {
|
|
2726 |
top: 9px;
|
2727 |
color: #6b7986;
|
2728 |
font-size: 16px;
|
2729 |
-
cursor: pointer;
|
2730 |
}
|
2731 |
|
2732 |
#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-minus {
|
@@ -2960,7 +3695,7 @@ html[dir="rtl"] #n2-ss-devices .n2-table {
|
|
2960 |
background: #0c92df;
|
2961 |
}
|
2962 |
|
2963 |
-
#n2-ss-
|
2964 |
.n2-ss-layer-picker.n2-under-pick {
|
2965 |
background-color: #51b82d;
|
2966 |
}
|
@@ -2998,12 +3733,16 @@ html[dir="rtl"] #n2-ss-devices .n2-table {
|
|
2998 |
background: RGBA(0, 52, 63, 0.9);
|
2999 |
}
|
3000 |
|
3001 |
-
#n2-ss-
|
3002 |
display: none;
|
3003 |
}
|
3004 |
|
3005 |
-
.n2-ss-has-layers .n2-ss-mode-desktopPortrait #n2-ss-
|
3006 |
display: inline-block;
|
|
|
|
|
|
|
|
|
3007 |
}
|
3008 |
|
3009 |
.n2-ruler-container {
|
@@ -3163,7 +3902,7 @@ html[dir="rtl"] #n2-ss-devices .n2-table {
|
|
3163 |
|
3164 |
.n2-ruler-horizontal .n2-ruler-guide {
|
3165 |
width: 0px;
|
3166 |
-
height:
|
3167 |
}
|
3168 |
|
3169 |
.n2-ss-lock-guides .n2-ruler-horizontal .n2-ruler-guide {
|
470 |
.n2-ss-slider-over-group .n2-box-sortable-placeholder {
|
471 |
display: none;
|
472 |
}
|
473 |
+
html[data-slides='0'] .n2-ss-slider-edit,
|
474 |
+
html[data-slides='0'] .n2-ss-create-static-slide {
|
475 |
display: none;
|
476 |
}
|
477 |
|
635 |
font-size: 11px;
|
636 |
}
|
637 |
|
638 |
+
.n2-slide-state-published [data-action="publish"],
|
639 |
+
[data-action="unpublish"],
|
640 |
+
[data-action="generator"],
|
641 |
+
.n2-slide-state-first [data-action="setFirst"] {
|
642 |
display: none;
|
643 |
}
|
644 |
|
645 |
+
.n2-slide-state-published [data-action="unpublish"],
|
646 |
+
.n2-slide-state-has-generator [data-action="generator"] {
|
647 |
display: block;
|
648 |
}
|
649 |
|
666 |
z-index: 9;
|
667 |
color: #6b7989;
|
668 |
margin-top: -10px;
|
669 |
+
}
|
670 |
+
|
671 |
+
.n2-ss-bulk-controls {
|
672 |
visibility: hidden;
|
673 |
}
|
674 |
|
675 |
+
.n2-ss-has-box-selection .n2-ss-bulk-controls {
|
676 |
visibility: visible;
|
677 |
}
|
678 |
|
699 |
font-family: 'Nextend' !important;
|
700 |
font-size: 48px;
|
701 |
line-height: 68px;
|
702 |
+
content: "\e981";
|
703 |
margin-top: 20px;
|
704 |
}
|
705 |
|
706 |
+
.n2-box-add-sample-slide > a {
|
707 |
+
width: 100%;
|
708 |
+
height: 135px;
|
709 |
+
padding: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
}
|
711 |
|
712 |
+
.n2-box-add-sample-slide > a:before {
|
713 |
+
display: block;
|
714 |
+
font-family: 'Nextend' !important;
|
715 |
+
font-size: 48px;
|
716 |
+
line-height: 68px;
|
717 |
+
content: "\e97d";
|
718 |
+
margin-top: 20px;
|
719 |
}
|
720 |
|
721 |
.n2-ss-slides-header > * {
|
761 |
html[data-slides='0'] .n2-ss-create-static-slide {
|
762 |
display: none;
|
763 |
}
|
764 |
+
/*
|
765 |
+
MARKINGS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
|
767 |
+
BODY
|
768 |
+
- .n2-ss-slider-visible
|
769 |
+
- .n2-ss-preview-mode
|
770 |
+
- .n2-ss-has-layers
|
771 |
+
- .n2-ss-layer-edit-visible
|
772 |
|
773 |
+
*/
|
|
|
|
|
774 |
|
775 |
+
/* Static slide */
|
776 |
+
div#n2-ss-0:HOVER .n2-ss-static-slide {
|
777 |
+
display: none;
|
|
|
|
|
|
|
|
|
778 |
}
|
779 |
|
780 |
+
div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
781 |
+
display: flex;
|
782 |
}
|
783 |
|
784 |
+
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .n2-ss-layer-cc,
|
785 |
+
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-resizable-handle,
|
786 |
+
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-customresizable-handle {
|
787 |
+
display: none !important;
|
788 |
}
|
789 |
|
790 |
+
.n2-ss-select-layer-mode-group .n2-list li.n2-ss-layerlist-row.n2-active.n2-selected {
|
791 |
+
color: #b2bfc9;
|
792 |
}
|
793 |
|
794 |
+
#n2-ss-0 .n2-ss-layer {
|
795 |
+
cursor: not-allowed;
|
796 |
}
|
797 |
|
798 |
+
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer {
|
799 |
+
cursor: move;
|
800 |
+
background: RGBA(0, 0, 0, 0); /* IE fix, layer empty area doesnt trigger mouseenter when no background */
|
801 |
}
|
802 |
|
803 |
+
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type="col"] {
|
804 |
+
cursor: pointer;
|
805 |
}
|
806 |
|
807 |
+
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type="col"] .n2-ss-layer {
|
808 |
+
cursor: pointer;
|
809 |
}
|
810 |
|
811 |
+
#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked,
|
812 |
+
#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked {
|
813 |
+
cursor: auto;
|
814 |
}
|
815 |
|
816 |
+
/*
|
817 |
+
#n2-ss-0 .n2-ss-static-slide {
|
818 |
+
visibility: visible !important;
|
819 |
}
|
820 |
+
*/
|
821 |
+
.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer {
|
822 |
+
cursor: default;
|
823 |
}
|
824 |
|
825 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-resizable-handle,
|
826 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,
|
827 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,
|
828 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,
|
829 |
+
#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
830 |
+
#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
831 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-selected .ui-item-overlay,
|
832 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-highlight {
|
833 |
+
display: none !important;
|
834 |
}
|
835 |
|
836 |
+
.n2-grid {
|
837 |
+
background: #4affff;
|
838 |
+
position: absolute;
|
839 |
+
left: 0;
|
840 |
+
top: 0;
|
841 |
+
z-index: 1000000;
|
842 |
+
display: none;
|
843 |
}
|
844 |
|
845 |
+
.n2-grid-h {
|
846 |
+
width: 100%;
|
847 |
+
height: 1px;
|
848 |
}
|
849 |
|
850 |
+
.n2-grid-v {
|
851 |
+
height: 100%;
|
852 |
+
width: 1px;
|
853 |
}
|
854 |
|
855 |
+
.n2-sidebar {
|
856 |
+
width: 340px;
|
857 |
}
|
858 |
|
859 |
+
.n2-ss-edit-slide-top {
|
860 |
+
background: #fff;
|
861 |
+
border-bottom: 1px solid #ccd1d6;
|
862 |
+
padding: 30px 20px 30px 40px;
|
863 |
+
display: flex;
|
864 |
+
flex-wrap: nowrap;
|
865 |
+
justify-content: space-between;
|
866 |
+
flex-flow: row;
|
867 |
}
|
868 |
|
869 |
+
.n2-ss-edit-slide-top-thumbnail {
|
870 |
+
width: 200px;
|
871 |
+
height: 135px;
|
872 |
+
cursor: pointer;
|
|
|
|
|
|
|
|
|
873 |
}
|
874 |
|
875 |
+
.n2-ss-edit-slide-top-thumbnail img {
|
876 |
+
width: 200px;
|
877 |
+
height: 135px;
|
878 |
+
border-radius: 5px;
|
879 |
}
|
880 |
|
881 |
+
.n2-ss-edit-slide-top-actions {
|
882 |
+
width: 180px;
|
883 |
+
text-align: left;
|
884 |
+
vertical-align: middle;
|
885 |
+
flex: 1;
|
|
|
|
|
|
|
|
|
886 |
|
|
|
|
|
887 |
}
|
888 |
|
889 |
+
.n2-ss-edit-slide-top-actions > * {
|
890 |
+
margin: 10px 0;
|
|
|
891 |
}
|
892 |
|
893 |
+
.n2-ss-edit-slide-top-details {
|
894 |
+
flex: 1;
|
895 |
+
align-self: flex-end;
|
896 |
+
padding: 0 20px;
|
897 |
}
|
898 |
|
899 |
+
.n2-ss-edit-slide-top-details .n2-h1 {
|
900 |
+
color: #606d7b;
|
901 |
+
margin-bottom: 15px;
|
|
|
902 |
cursor: pointer;
|
903 |
+
line-height: 30px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
904 |
}
|
905 |
|
906 |
+
.n2-ss-edit-slide-top-details .n2-h1:HOVER:after {
|
907 |
+
font-family: 'Nextend' !important;
|
908 |
+
content: "\e94f";
|
909 |
+
font-size: 22px;
|
910 |
+
vertical-align: top;
|
911 |
+
margin: 0 5px;
|
912 |
+
color: #b0b9bf;
|
913 |
}
|
914 |
|
915 |
+
.n2-ss-edit-slide-top-details .n2-h4 a {
|
916 |
+
color: #7b8898;
|
917 |
}
|
918 |
|
919 |
+
.n2-ss-edit-slide-top-details .n2-h4 a .n2-i {
|
920 |
+
font-size: 16px;
|
921 |
}
|
922 |
|
923 |
+
.n2-ss-edit-slide-top-tabs {
|
924 |
+
margin-top: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
925 |
}
|
926 |
|
927 |
+
.n2-ss-edit-slide-top-tabs a {
|
928 |
+
margin: 0;
|
929 |
}
|
930 |
|
931 |
+
.n2-ss-edit-slide-top-tabs a.n2-active {
|
932 |
+
color: #fff;
|
933 |
+
background-color: #0c92df;
|
934 |
+
border-color: #0c92df;
|
|
|
|
|
|
|
935 |
}
|
936 |
|
937 |
+
.n2-ss-edit-slide-top-tabs .n2-button {
|
938 |
+
border-radius: 0;
|
939 |
+
border-left: 0px;
|
940 |
+
padding: 0 20px;
|
941 |
}
|
942 |
|
943 |
+
.n2-ss-edit-slide-top-tabs .n2-button.n2-first {
|
944 |
+
border-top-left-radius: 3px;
|
945 |
+
border-bottom-left-radius: 3px;
|
946 |
+
border-left: 2px solid #e0e6ed;
|
|
|
|
|
|
|
947 |
}
|
948 |
|
949 |
+
.n2-ss-edit-slide-top-tabs .n2-button.n2-last {
|
950 |
+
border-top-right-radius: 3px;
|
951 |
+
border-bottom-right-radius: 3px;
|
952 |
}
|
953 |
|
954 |
+
.n2-ss-edit-slide-top-tabs .n2-button.n2-active {
|
955 |
+
background: #0c92df;
|
|
|
|
|
|
|
|
|
956 |
color: #fff;
|
957 |
+
border-color: #0c92df;
|
958 |
}
|
959 |
|
960 |
+
.n2-ss-edit-slide-top-tabs .n2-button.n2-active:not(.n2-first) {
|
961 |
+
border-left: 2px solid #0c92df;
|
962 |
+
margin-left: -2px;
|
|
|
963 |
}
|
964 |
|
965 |
+
#n2-form-matrix-slide-settings {
|
966 |
+
margin: 0;
|
967 |
+
border: 0;
|
968 |
+
border-radius: 0;
|
969 |
}
|
970 |
|
971 |
+
.n2-ss-slider-real-container {
|
972 |
+
position: relative;
|
973 |
}
|
974 |
|
975 |
+
.n2-ss-slider-outer-container {
|
976 |
+
position: relative;
|
977 |
+
float: left;
|
978 |
}
|
979 |
|
980 |
+
.n2-ss-canvas-slider-container {
|
981 |
+
padding-bottom: 99px;
|
982 |
+
float: left;
|
983 |
+
margin: 10px;
|
|
|
|
|
984 |
}
|
985 |
|
986 |
+
.n2-ss-has-ruler .n2-ss-canvas-slider-container {
|
987 |
+
margin: 40px 0 0 40px;
|
988 |
}
|
989 |
|
990 |
+
.n2-i-desktopPortrait:before {
|
991 |
+
content: '\e925';
|
|
|
|
|
|
|
|
|
992 |
}
|
993 |
|
994 |
+
.n2-i-desktopLandscape:before {
|
995 |
+
content: '\e95a';
|
|
|
|
|
996 |
}
|
997 |
|
998 |
+
.n2-i-tabletPortrait:before {
|
999 |
+
content: '\e928';
|
|
|
|
|
|
|
|
|
|
|
|
|
1000 |
}
|
1001 |
|
1002 |
+
.n2-i-tabletLandscape:before {
|
1003 |
+
content: '\e927';
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
.n2-i-mobilePortrait:before {
|
1007 |
+
content: '\e92a';
|
1008 |
}
|
1009 |
|
1010 |
+
.n2-i-mobileLandscape:before {
|
1011 |
+
content: '\e929';
|
1012 |
}
|
1013 |
|
1014 |
+
#n2-tab-basiccsspreset {
|
1015 |
+
background-color: #3c4958;
|
1016 |
+
z-index: 3;
|
1017 |
}
|
1018 |
|
1019 |
+
#n2-tab-basiccsspreset > .n2-h2 {
|
1020 |
margin-bottom: 0;
|
1021 |
}
|
1022 |
|
1023 |
+
.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container > .n2-basiccss-choose {
|
1024 |
+
display: none;
|
|
|
1025 |
|
|
|
|
|
|
|
1026 |
}
|
1027 |
|
1028 |
+
.n2-editor-header .n2-ss-button-container > .n2-basiccss-back {
|
1029 |
+
display: none;
|
|
|
|
|
|
|
|
|
1030 |
}
|
1031 |
|
1032 |
+
.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container > .n2-basiccss-back {
|
1033 |
+
display: inline-block;
|
|
|
|
|
1034 |
}
|
1035 |
|
1036 |
+
.n2-ss-preview-modal .n2-modal-window {
|
1037 |
+
background-color: #e9edf0;
|
|
|
|
|
|
|
|
|
|
|
1038 |
}
|
1039 |
|
1040 |
+
.n2-ss-background-type-image .n2-ss-background-video-param {
|
1041 |
+
display: none;
|
|
|
1042 |
}
|
1043 |
+
|
1044 |
+
.n2-ss-background-type-color .n2-ss-background-video-param,
|
1045 |
+
.n2-ss-background-type-color .n2-ss-background-image-param {
|
1046 |
+
display: none;
|
1047 |
}
|
1048 |
|
1049 |
+
.n2-ss-background-type-gradient .n2-ss-background-video-param,
|
1050 |
+
.n2-ss-background-type-gradient .n2-ss-background-image-param {
|
1051 |
+
display: none;
|
1052 |
}
|
1053 |
|
1054 |
+
#n2-tab-animations-events td.n2-label {
|
|
|
1055 |
padding: 0;
|
|
|
|
|
|
|
|
|
1056 |
}
|
1057 |
|
1058 |
+
#n2-tab-animations-events td.n2-element {
|
1059 |
+
padding: 6px 0;
|
1060 |
}
|
1061 |
|
1062 |
+
#n2-admin.n2-ss-mode-desktopPortrait .n2-ss-responsive-helper,
|
1063 |
+
body[data-editormode="content"] #n2-admin .n2-ss-responsive-helper {
|
1064 |
+
display: none;
|
1065 |
}
|
1066 |
|
1067 |
+
.n2-ss-editor-window-notice {
|
1068 |
+
padding: 8px 10px;
|
1069 |
+
line-height: 18px;
|
1070 |
+
background: #6b7986;
|
1071 |
+
color: #fff;
|
1072 |
}
|
1073 |
|
1074 |
+
.n2-ss-editor-window-notice a {
|
1075 |
+
color: #ffb527;
|
|
|
|
|
|
|
|
|
|
|
1076 |
}
|
1077 |
|
1078 |
+
#n2-ss-slide-edit-slides {
|
1079 |
+
display: none;
|
1080 |
+
border-bottom: 1px solid #e0e6ed;
|
|
|
1081 |
}
|
1082 |
|
1083 |
+
.n2-ss-show-slides #n2-ss-slide-edit-slides {
|
1084 |
+
display: block;
|
|
|
|
|
1085 |
}
|
1086 |
|
1087 |
+
.n2-ss-show-slides a.n2-ss-back-slides,
|
1088 |
+
.n2-ss-show-slides a.n2-ss-back-slides:before {
|
1089 |
+
color: #fff;
|
|
|
1090 |
}
|
1091 |
|
1092 |
+
.n2-ss-columns-element {
|
1093 |
+
background: #28313a;
|
1094 |
}
|
1095 |
|
1096 |
+
.n2-ss-columns-element-add-col {
|
1097 |
+
vertical-align: top;
|
1098 |
display: inline-block;
|
1099 |
+
background: #51b82d;
|
|
|
|
|
|
|
1100 |
width: 28px;
|
1101 |
+
height: 28px;
|
1102 |
+
border-radius: 3px;
|
1103 |
+
margin: 8px 0;
|
1104 |
+
cursor: pointer;
|
1105 |
text-align: center;
|
1106 |
+
color: #fff;
|
1107 |
+
font-size: 16px;
|
1108 |
}
|
1109 |
|
1110 |
+
.n2-ss-columns-element-add-col .n2-i {
|
1111 |
+
line-height: 28px;
|
|
|
1112 |
}
|
1113 |
|
1114 |
+
.n2-ss-columns-element-container {
|
1115 |
+
vertical-align: top;
|
1116 |
+
position: relative;
|
1117 |
+
width: 300px;
|
1118 |
+
display: inline-flex;
|
1119 |
+
padding: 8px;
|
1120 |
+
box-sizing: border-box;
|
1121 |
+
-webkit-user-select: none;
|
1122 |
+
/* Chrome/Safari */
|
1123 |
+
-moz-user-select: none;
|
1124 |
+
/* Firefox */
|
1125 |
+
-ms-user-select: none;
|
1126 |
+
/* IE10+ */
|
1127 |
+
/* Rules below not implemented in browsers yet */
|
1128 |
+
-o-user-select: none;
|
1129 |
+
user-select: none;
|
1130 |
+
overflow: hidden;
|
1131 |
}
|
1132 |
|
1133 |
+
.n2-ss-columns-element-container > .n2-ss-columns-element-column {
|
1134 |
+
position: relative;
|
1135 |
+
flex: 0 0 auto;
|
1136 |
+
background: #51b82d;
|
1137 |
+
height: 28px;
|
1138 |
+
line-height: 28px;
|
1139 |
+
width: 25%;
|
1140 |
+
color: #fff;
|
1141 |
+
text-align: center;
|
1142 |
+
overflow: hidden;
|
1143 |
+
cursor: move;
|
1144 |
border-radius: 3px;
|
1145 |
+
min-width: 5px;
|
1146 |
}
|
1147 |
|
1148 |
+
.n2-ss-columns-element-container .n2-ss-columns-element-handle {
|
1149 |
display: block;
|
1150 |
+
width: 11px;
|
1151 |
+
height: 28px;
|
1152 |
+
background: #202934;
|
1153 |
+
flex: 0 0 11px;
|
1154 |
+
border-radius: 3px;
|
1155 |
+
margin: 0 2px;
|
1156 |
+
cursor: ew-resize;
|
1157 |
+
color: #9aa7b2;
|
1158 |
+
text-align: center;
|
1159 |
}
|
1160 |
|
1161 |
+
.n2-ss-columns-element-container .n2-ss-columns-element-handle .n2-i {
|
1162 |
+
line-height: 28px;
|
1163 |
}
|
1164 |
|
1165 |
+
.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-handle {
|
1166 |
+
display: none;
|
1167 |
}
|
1168 |
|
1169 |
+
.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column {
|
1170 |
+
margin-right: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1171 |
}
|
1172 |
|
1173 |
+
.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column:last-child {
|
1174 |
+
margin-right: 0;
|
1175 |
}
|
1176 |
|
1177 |
+
.n2-ss-section-main-content {
|
1178 |
+
min-height: 20px;
|
1179 |
+
}
|
1180 |
+
/*
|
1181 |
+
MARKINGS
|
1182 |
|
1183 |
+
#n2-ss-layer-window
|
1184 |
+
- .n2-ss-has-design-option
|
1185 |
+
*/
|
1186 |
+
|
1187 |
+
#n2-ss-layer-window {
|
1188 |
+
z-index: 100000;
|
1189 |
+
position: fixed;
|
1190 |
+
left: 100px;
|
1191 |
+
top: 100px;
|
1192 |
+
width: 355px;
|
1193 |
}
|
1194 |
|
1195 |
+
body:not(.n2-ss-has-layers) #n2-ss-layer-window,
|
1196 |
+
body:not(.n2-ss-layer-edit-visible) #n2-ss-layer-window {
|
1197 |
display: none;
|
1198 |
}
|
1199 |
|
1200 |
+
.n2-ss-has-layers.n2-ss-layer-edit-visible.n2-ss-preview-mode #n2-ss-layer-window,
|
1201 |
+
.n2-ss-layer-edit-visible.n2-ss-move-layer #n2-ss-layer-window,
|
1202 |
+
.n2-ss-layer-edit-visible.n2-ss-resize-layer #n2-ss-layer-window {
|
1203 |
+
display: none;
|
|
|
|
|
1204 |
}
|
1205 |
|
1206 |
+
#n2-ss-layer-window.n2-ss-layer-window-minized {
|
1207 |
+
height: 30px !important;
|
1208 |
}
|
1209 |
|
1210 |
+
#n2-ss-layer-window.n2-ss-layer-window-minized .n2-ss-layer-window-resizer {
|
1211 |
+
display: none;
|
1212 |
}
|
1213 |
|
1214 |
+
#n2-ss-layer-window.n2-ss-layer-window-minized .n2-i-minimize:before {
|
1215 |
+
content: '\e915';
|
|
|
1216 |
}
|
1217 |
|
1218 |
+
#n2-ss-layer-window .n2-ss-layer-window-actions {
|
1219 |
+
display: none;
|
1220 |
+
position: absolute;
|
1221 |
+
top: 0;
|
1222 |
+
left: -35px;
|
1223 |
+
width: 32px;
|
1224 |
}
|
1225 |
|
1226 |
+
#n2-ss-layer-window .n2-ss-layer-window-actions {
|
1227 |
+
background-color: #202934;
|
1228 |
+
border-radius: 3px;
|
1229 |
}
|
1230 |
|
1231 |
+
#n2-ss-layer-window .n2-ss-layer-window-actions > .n2-button {
|
1232 |
+
width: 32px;
|
1233 |
+
height: 32px;
|
1234 |
+
line-height: 32px;
|
1235 |
+
color: #b0bdc7;
|
1236 |
}
|
1237 |
|
1238 |
+
#n2-ss-layer-window .n2-ss-layer-window-resizer {
|
1239 |
+
height: 7px;
|
1240 |
+
width: 100%;
|
1241 |
+
cursor: ns-resize;
|
1242 |
+
text-align: center;
|
1243 |
+
color: #95a1ab;
|
1244 |
+
bottom: 0;
|
1245 |
+
background: #202934;
|
1246 |
+
border-bottom-left-radius: 5px;
|
1247 |
+
border-bottom-right-radius: 5px;
|
1248 |
}
|
1249 |
|
1250 |
+
/** LAYER WINDOW CONTENT **/
|
|
|
|
|
|
|
1251 |
|
1252 |
+
#n2-ss-layer-window .n2-ss-layer-window-crop {
|
1253 |
+
position: relative;
|
1254 |
+
width: 100%;
|
1255 |
+
height: 100%;
|
1256 |
+
border-radius: 3px;
|
1257 |
+
box-shadow: 0px 1px 10px RGBA(0, 0, 0, 0.5);
|
1258 |
+
overflow: hidden;
|
1259 |
+
background: #3c4958;
|
1260 |
+
z-index: 2;
|
1261 |
}
|
1262 |
|
1263 |
+
.n2-ss-layer-window-title {
|
1264 |
+
position: relative;
|
|
|
1265 |
|
1266 |
+
line-height: 60px;
|
1267 |
+
height: 60px;
|
1268 |
+
overflow: hidden;
|
1269 |
+
background: #202934;
|
1270 |
+
|
1271 |
+
font-size: 12px;
|
1272 |
+
color: #cbd6df;
|
1273 |
+
text-align: left;
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
.n2-ss-layer-window-title .n2-ss-layer-window-title-nav {
|
1277 |
+
position: absolute;
|
1278 |
+
top: 0;
|
1279 |
+
line-height: 30px;
|
1280 |
+
height: 30px;
|
1281 |
+
margin: 0 5px;
|
1282 |
+
}
|
1283 |
+
|
1284 |
+
.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-left {
|
1285 |
+
left: 0;
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-right {
|
1289 |
+
right: 0;
|
1290 |
+
}
|
1291 |
+
|
1292 |
+
.n2-ss-layer-window-title .n2-ss-layer-window-title-nav > * {
|
1293 |
+
display: inline-block;
|
1294 |
+
width: 20px;
|
1295 |
+
height: 30px;
|
1296 |
+
line-height: 30px;
|
1297 |
+
font-size: 16px;
|
1298 |
+
color: #fff;
|
1299 |
+
padding: 0;
|
1300 |
+
vertical-align: top;
|
1301 |
+
text-align: center;
|
1302 |
+
}
|
1303 |
+
|
1304 |
+
.n2-ss-layer-window-title .n2-ss-layer-window-title-nav .n2-i {
|
1305 |
+
vertical-align: middle;
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
.n2-ss-layer-window-title .n2-ss-layer-window-title span {
|
1309 |
+
display: block;
|
1310 |
+
white-space: nowrap;
|
1311 |
+
overflow: hidden;
|
1312 |
+
text-overflow: ellipsis;
|
1313 |
+
margin: 0 60px 0 60px;
|
1314 |
+
text-align: center;
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
.n2-ss-layer-window-breadcrumb {
|
1318 |
+
display: none;
|
1319 |
+
height: 22px;
|
1320 |
+
font-size: 11px;
|
1321 |
+
color: #b2bfc9;
|
1322 |
+
background-color: #202934;
|
1323 |
+
border-bottom: 1px solid #1a2028;
|
1324 |
+
text-transform: uppercase;
|
1325 |
+
padding: 0 5px;
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
.n2-ss-layer-window-breadcrumb.n2-has-breadcrumb {
|
1329 |
+
display: block;
|
1330 |
+
}
|
1331 |
+
|
1332 |
+
.n2-ss-layer-window-breadcrumb * {
|
1333 |
+
display: inline-block;
|
1334 |
+
height: 22px;
|
1335 |
+
vertical-align: top;
|
1336 |
+
line-height: 22px;
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
.n2-window-title-structure-nav span {
|
1340 |
+
padding: 0 5px;
|
1341 |
+
cursor: pointer;
|
1342 |
+
}
|
1343 |
+
|
1344 |
+
.n2-window-title-structure-nav .n2-i-mini-arrow-thin {
|
1345 |
+
font-size: 16px;
|
1346 |
+
padding: 0;
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
.n2-window-title-structure-nav:last-child {
|
1350 |
+
color: #fff;
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
.n2-window-title-structure-nav:last-child .n2-i-mini-arrow-thin {
|
1354 |
+
display: none;
|
1355 |
+
}
|
1356 |
+
|
1357 |
+
#n2-tabbed-slide-editor-settings .n2-tabs {
|
1358 |
+
position: relative;
|
1359 |
+
overflow-y: auto;
|
1360 |
+
overflow-x: hidden;
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
#n2-ss-layer-window table {
|
1364 |
+
display: block;
|
1365 |
+
}
|
1366 |
+
|
1367 |
+
#n2-ss-layer-window tbody {
|
1368 |
+
display: block;
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
#n2-ss-layer-window tr {
|
1372 |
+
display: block;
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
#n2-ss-layer-window td {
|
1376 |
+
display: block;
|
1377 |
+
width: auto;
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
#n2-ss-layer-window .n2-label {
|
1381 |
+
background: #3c4958;
|
1382 |
+
border-top: 1px solid #303b47;
|
1383 |
+
padding: 3px 10px 0;
|
1384 |
+
}
|
1385 |
+
|
1386 |
+
#n2-ss-layer-window .n2-empty-label {
|
1387 |
+
padding: 0;
|
1388 |
+
height: 4px;
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
#n2-ss-layer-window .n2-empty-group-label {
|
1392 |
+
padding: 0;
|
1393 |
+
height: 0;
|
1394 |
+
}
|
1395 |
+
|
1396 |
+
#n2-ss-layer-window .n2-label label {
|
1397 |
+
color: #b2bfc9;
|
1398 |
+
font-size: 10px;
|
1399 |
+
}
|
1400 |
+
|
1401 |
+
#n2-ss-layer-window .n2-element {
|
1402 |
+
background: #3c4958;
|
1403 |
+
border-top: 0;
|
1404 |
+
padding: 0;
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
#n2-ss-layer-window textarea {
|
1408 |
+
max-width: 290px !important;
|
1409 |
+
width: 290px !important;
|
1410 |
+
}
|
1411 |
+
|
1412 |
+
#n2-ss-layer-window .n2-form-element-button {
|
1413 |
+
max-width: 38px;
|
1414 |
+
overflow: hidden;
|
1415 |
+
}
|
1416 |
+
|
1417 |
+
#n2-ss-layer-window .n2-sidebar-row {
|
1418 |
+
line-height: 34px;
|
1419 |
+
background: #28313a;
|
1420 |
+
border-bottom: 1px solid RGBA(0, 0, 0, 0.2);
|
1421 |
+
}
|
1422 |
+
|
1423 |
+
#n2-ss-layer-window .n2-list li {
|
1424 |
+
border-bottom: 1px solid RGBA(0, 0, 0, 0.2);
|
1425 |
+
}
|
1426 |
+
|
1427 |
+
#n2-ss-layer-window .n2-button-m {
|
1428 |
+
height: 24px;
|
1429 |
+
line-height: 24px;
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
#n2-ss-layer-window .n2-sidebar-tab-switcher {
|
1433 |
+
border: 0;
|
1434 |
+
border-collapse: separate;
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td {
|
1438 |
+
font-size: 11px;
|
1439 |
+
line-height: 47px;
|
1440 |
+
height: 47px;
|
1441 |
+
border: 1px solid #1a2028;
|
1442 |
+
border-left: 0;
|
1443 |
+
color: #b2bfc9;
|
1444 |
+
}
|
1445 |
+
|
1446 |
+
#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td .n2-i {
|
1447 |
+
font-size: 32px;
|
1448 |
+
line-height: 47px;
|
1449 |
+
}
|
1450 |
+
|
1451 |
+
#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td.n2-active {
|
1452 |
+
background: #0c92df;
|
1453 |
+
color: #fff;
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab="style"] {
|
1457 |
+
display: none;
|
1458 |
+
}
|
1459 |
+
|
1460 |
+
#n2-ss-layer-window.n2-ss-has-design-option .n2-sidebar-tab-switcher .n2-td[data-tab="style"] {
|
1461 |
+
display: table-cell;
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
#n2-ss-layer-window .n2-has-underline > .n2-underline::after {
|
1465 |
+
display: none;
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
#n2-ss-layer-window .n2-ss-layer-window-title {
|
1469 |
+
line-height: 30px;
|
1470 |
+
height: 30px;
|
1471 |
+
cursor: move;
|
1472 |
+
border-top-left-radius: 5px;
|
1473 |
+
border-top-right-radius: 5px;
|
1474 |
+
}
|
1475 |
+
|
1476 |
+
#n2-ss-layer-window .n2-ss-layer-window-title .n2-ss-layer-window-title-inner {
|
1477 |
+
white-space: nowrap;
|
1478 |
+
margin: 0 10px;
|
1479 |
+
text-align: center;
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
#n2-ss-layer-window .ui-autocomplete {
|
1483 |
+
|
1484 |
+
padding: 0;
|
1485 |
+
max-height: 200px;
|
1486 |
+
overflow-y: auto;
|
1487 |
+
overflow-x: hidden;
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
#n2-ss-layer-window .n2-form-element-autocomplete .ui-autocomplete .ui-menu-item {
|
1491 |
+
padding-right: 20px;
|
1492 |
+
}
|
1493 |
+
|
1494 |
+
#n2-ss-layer-window .n2-ss-generator-param {
|
1495 |
+
display: none;
|
1496 |
+
}
|
1497 |
+
|
1498 |
+
.n2-ss-dynamic-slide #n2-ss-layer-window .n2-ss-generator-param {
|
1499 |
+
display: block;
|
1500 |
+
}
|
1501 |
+
|
1502 |
+
#n2-tabbed-animations-tabbed > .n2-table {
|
1503 |
+
border-spacing: 8px;
|
1504 |
+
border-collapse: separate;
|
1505 |
+
background: #28313a;
|
1506 |
+
border-bottom: 1px solid #20282f;
|
1507 |
+
}
|
1508 |
+
|
1509 |
+
#n2-tabbed-animations-tabbed .n2-sidebar-tab-switcher .n2-td {
|
1510 |
+
line-height: 28px;
|
1511 |
+
height: 28px;
|
1512 |
+
border: 0px;
|
1513 |
+
border-radius: 50px;
|
1514 |
+
}
|
1515 |
+
|
1516 |
+
#n2-tabbed-animations-tabbed .n2-editor-header.n2-h2 {
|
1517 |
+
background: #303b47;
|
1518 |
+
border-bottom: 1px solid #28313a;
|
1519 |
+
position: relative;
|
1520 |
+
}
|
1521 |
+
|
1522 |
+
.n2-ss-small-more {
|
1523 |
+
float: right;
|
1524 |
+
margin: -38px 20px 0;
|
1525 |
+
}
|
1526 |
+
|
1527 |
+
html[dir=rtl] .n2-ss-small-more {
|
1528 |
+
float: left;
|
1529 |
+
}
|
1530 |
+
|
1531 |
+
.n2-button-single-animation-play.n2-active .n2-i:before {
|
1532 |
+
content: '\e607';
|
1533 |
+
}
|
1534 |
+
#n2-ss-add-sidebar {
|
1535 |
+
background: #212d3a;
|
1536 |
+
position: absolute;
|
1537 |
+
left: -1px;
|
1538 |
+
top: 54px;
|
1539 |
+
bottom: -1px;
|
1540 |
+
width: 50px;
|
1541 |
+
text-align: center;
|
1542 |
+
}
|
1543 |
+
|
1544 |
+
#n2-ss-add-sidebar .n2-ss-add-sidebar-inner {
|
1545 |
+
position: relative;
|
1546 |
+
padding-top: 0.01px;
|
1547 |
+
}
|
1548 |
+
|
1549 |
+
#n2-ss-add-sidebar .n2-ss-add-sidebar-inner > * {
|
1550 |
+
margin-top: 10px;
|
1551 |
+
color: #80a3b5;
|
1552 |
+
}
|
1553 |
+
|
1554 |
+
#n2-ss-add-sidebar .n2-ss-add-sidebar-inner > .n2-button-blue {
|
1555 |
+
color: #fff;
|
1556 |
+
}
|
1557 |
+
|
1558 |
+
#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner > * {
|
1559 |
+
margin-top: 0;
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
#n2-ss-add-sidebar.n2-active {
|
1563 |
+
width: 341px;
|
1564 |
+
z-index: 1010;
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button {
|
1568 |
+
margin: 0;
|
1569 |
+
background: transparent;
|
1570 |
+
position: absolute;
|
1571 |
+
top: 16px;
|
1572 |
+
right: 5px;
|
1573 |
+
}
|
1574 |
+
|
1575 |
+
#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button .n2-i:before {
|
1576 |
+
content: "\e90a";
|
1577 |
+
color: #b2bfc9;
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner > a {
|
1581 |
+
display: none;
|
1582 |
+
}
|
1583 |
+
|
1584 |
+
#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner {
|
1585 |
+
width: 341px !important;
|
1586 |
+
}
|
1587 |
+
|
1588 |
+
#n2-ss-add-sidebar.n2-active .n2-ss-available-layers {
|
1589 |
+
display: block;
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
.n2-ss-available-layers .n2-sidebar-tab-switcher {
|
1593 |
+
border: 0;
|
1594 |
+
}
|
1595 |
+
|
1596 |
+
.n2-ss-available-layers-container {
|
1597 |
+
width: 300px;
|
1598 |
+
margin: 0 auto;
|
1599 |
+
padding: 10px 0;
|
1600 |
+
}
|
1601 |
+
|
1602 |
+
.n2-ss-slide-item-group {
|
1603 |
+
color: #b2bfc9;
|
1604 |
+
padding: 4px 5px 1px;
|
1605 |
+
}
|
1606 |
+
|
1607 |
+
.n2-ss-addlayer .n2-ss-available-layers {
|
1608 |
+
display: none;
|
1609 |
+
box-sizing: border-box;
|
1610 |
+
white-space: normal;
|
1611 |
+
text-align: left;
|
1612 |
+
}
|
1613 |
+
|
1614 |
+
.n2-ss-core-item {
|
1615 |
+
display: inline-block;
|
1616 |
+
margin: 5px;
|
1617 |
+
background-color: #6b7986;
|
1618 |
+
color: #ffffff;
|
1619 |
+
line-height: 20px;
|
1620 |
+
cursor: pointer;
|
1621 |
+
text-align: center;
|
1622 |
+
|
1623 |
+
-webkit-border-radius: 3px;
|
1624 |
+
-moz-border-radius: 3px;
|
1625 |
+
border-radius: 3px;
|
1626 |
+
|
1627 |
+
width: 90px;
|
1628 |
+
height: 80px;
|
1629 |
+
z-index: 1000;
|
1630 |
+
}
|
1631 |
+
|
1632 |
+
.n2-ss-core-item:before {
|
1633 |
+
font-family: 'Nextend';
|
1634 |
+
font-size: 32px;
|
1635 |
+
content: "\e943";
|
1636 |
+
display: block;
|
1637 |
+
line-height: 32px;
|
1638 |
+
margin-top: 20px;
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
.n2-ss-core-item[data-item="heading"]:before {
|
1642 |
+
content: "\e945";
|
1643 |
+
}
|
1644 |
+
|
1645 |
+
.n2-ss-core-item[data-item="text"]:before {
|
1646 |
+
content: "\e944";
|
1647 |
+
}
|
1648 |
+
|
1649 |
+
.n2-ss-core-item[data-item="button"]:before {
|
1650 |
+
content: "\e942";
|
1651 |
+
}
|
1652 |
+
|
1653 |
+
.n2-ss-core-item[data-item="imagearea"]:before {
|
1654 |
+
content: "\e950";
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
.n2-ss-core-item[data-item="icon"]:before {
|
1658 |
+
content: "\e941";
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
.n2-ss-core-item[data-item="icon2"]:before {
|
1662 |
+
content: "\e941";
|
1663 |
+
}
|
1664 |
+
|
1665 |
+
.n2-ss-core-item[data-item="input"]:before {
|
1666 |
+
content: "\e939";
|
1667 |
+
}
|
1668 |
+
|
1669 |
+
.n2-ss-core-item[data-item="iframe"]:before {
|
1670 |
+
content: "\e938";
|
1671 |
+
}
|
1672 |
+
|
1673 |
+
.n2-ss-core-item[data-item="area"]:before {
|
1674 |
+
content: "\e937";
|
1675 |
+
}
|
1676 |
+
|
1677 |
+
.n2-ss-core-item[data-item="list"]:before {
|
1678 |
+
content: "\e93e";
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
.n2-ss-core-item[data-item="caption"]:before {
|
1682 |
+
content: "\e940";
|
1683 |
+
}
|
1684 |
+
|
1685 |
+
.n2-ss-core-item[data-item="transition"]:before {
|
1686 |
+
content: "\e93f";
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
.n2-ss-core-item[data-item="youtube"]:before {
|
1690 |
+
content: "\e93d";
|
1691 |
+
}
|
1692 |
+
|
1693 |
+
.n2-ss-core-item[data-item="vimeo"]:before {
|
1694 |
+
content: "\e93c";
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
.n2-ss-core-item[data-item="video"]:before {
|
1698 |
+
content: "\e93b";
|
1699 |
+
}
|
1700 |
+
|
1701 |
+
.n2-ss-core-item[data-item="html"]:before {
|
1702 |
+
content: "\e93a";
|
1703 |
+
}
|
1704 |
+
|
1705 |
+
.n2-ss-core-item[data-item="progressbar"]:before {
|
1706 |
+
content: "\e982";
|
1707 |
+
}
|
1708 |
+
|
1709 |
+
.n2-ss-core-item[data-item="imagebox"]:before {
|
1710 |
+
content: "\e983";
|
1711 |
+
}
|
1712 |
+
|
1713 |
+
.n2-ss-core-item[data-item="counter"]:before {
|
1714 |
+
content: "\e984";
|
1715 |
+
}
|
1716 |
+
|
1717 |
+
.n2-ss-core-item[data-item="circlecounter"]:before {
|
1718 |
+
content: "\e985";
|
1719 |
+
}
|
1720 |
+
|
1721 |
+
.n2-ss-core-item[data-item="audio"]:before {
|
1722 |
+
content: "\e986";
|
1723 |
+
}
|
1724 |
+
|
1725 |
+
.n2-ss-core-item[data-item="structure"]:before {
|
1726 |
+
font-size: 74px;
|
1727 |
+
margin-top: 24px;
|
1728 |
+
}
|
1729 |
+
|
1730 |
+
.n2-ss-core-item[data-item="structure"][data-type="1col"]:before {
|
1731 |
+
content: "\e967";
|
1732 |
+
}
|
1733 |
+
|
1734 |
+
.n2-ss-core-item[data-item="structure"][data-type="2col"]:before {
|
1735 |
+
content: "\e966";
|
1736 |
+
}
|
1737 |
+
|
1738 |
+
.n2-ss-core-item[data-item="structure"][data-type="3col"]:before {
|
1739 |
+
content: "\e961";
|
1740 |
+
}
|
1741 |
+
|
1742 |
+
.n2-ss-core-item[data-item="structure"][data-type="4col"]:before {
|
1743 |
+
content: "\e95f";
|
1744 |
+
}
|
1745 |
+
|
1746 |
+
.n2-ss-core-item[data-item="structure"][data-type="2col-60-40"]:before {
|
1747 |
+
content: "\e965";
|
1748 |
+
}
|
1749 |
+
|
1750 |
+
.n2-ss-core-item[data-item="structure"][data-type="2col-40-60"]:before {
|
1751 |
+
content: "\e964";
|
1752 |
+
}
|
1753 |
+
|
1754 |
+
.n2-ss-core-item[data-item="structure"][data-type="2col-80-20"]:before {
|
1755 |
+
content: "\e963";
|
1756 |
+
}
|
1757 |
+
|
1758 |
+
.n2-ss-core-item[data-item="structure"][data-type="2col-20-80"]:before {
|
1759 |
+
content: "\e962";
|
1760 |
+
}
|
1761 |
+
|
1762 |
+
.n2-ss-core-item[data-item="structure"][data-type="3col-20-60-20"]:before {
|
1763 |
+
content: "\e960";
|
1764 |
+
}
|
1765 |
+
|
1766 |
+
.n2-ss-core-item[data-item="structure"][data-type="special"]:before {
|
1767 |
+
content: "\e95d";
|
1768 |
+
}
|
1769 |
+
#n2-ss-toolbar {
|
1770 |
+
z-index: 9;
|
1771 |
+
position: relative;
|
1772 |
+
height: 28px;
|
1773 |
+
line-height: 28px;
|
1774 |
+
background: #f2f5fa;
|
1775 |
+
white-space: nowrap;
|
1776 |
+
padding: 13px 10px;
|
1777 |
+
}
|
1778 |
+
|
1779 |
+
.n2-ss-slider-visible #n2-ss-slide-canvas-container #n2-ss-toolbar {
|
1780 |
+
height: auto;
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
#n2-ss-slide-canvas-container.n2-scroll-disable #n2-ss-toolbar {
|
1784 |
+
height: 28px;
|
1785 |
+
border-bottom: 0;
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
#n2-ss-toolbar > * {
|
1789 |
+
line-height: 28px;
|
1790 |
+
height: 28px;
|
1791 |
+
vertical-align: top;
|
1792 |
+
display: inline-block;
|
1793 |
+
}
|
1794 |
+
|
1795 |
+
#n2-ss-toolbar .n2-ss-tool {
|
1796 |
+
margin: 0 5px;
|
1797 |
+
display: inline-block;
|
1798 |
+
vertical-align: top !important;
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
#n2-ss-toolbar .n2-ss-tool.n2-form-element-text {
|
1802 |
+
height: 24px;
|
1803 |
+
line-height: 24px;
|
1804 |
+
position: relative;
|
1805 |
+
}
|
1806 |
+
|
1807 |
+
#n2-ss-toolbar .n2-text-sub-label {
|
1808 |
+
font-size: 16px;
|
1809 |
+
}
|
1810 |
+
|
1811 |
+
.n2-ss-theme-dark #n2-ss-slide-canvas-container-inner,
|
1812 |
+
.n2-ss-theme-dark .n2-ruler-vertical {
|
1813 |
+
background-color: #28313a;
|
1814 |
+
}
|
1815 |
+
|
1816 |
+
.n2-ss-theme-dark .n2-ruler > span span {
|
1817 |
+
color: #fff;
|
1818 |
+
}
|
1819 |
+
|
1820 |
+
.n2-ss-preview-mode .n2-main-top-bar {
|
1821 |
+
opacity: 0;
|
1822 |
+
}
|
1823 |
+
|
1824 |
+
#n2-ss-slide-canvas-settings {
|
1825 |
+
display: inline-block;
|
1826 |
+
position: relative;
|
1827 |
+
}
|
1828 |
+
|
1829 |
+
#n2-ss-slide-canvas-settings > .n2-button {
|
1830 |
+
width: 28px;
|
1831 |
+
padding: 0;
|
1832 |
+
text-align: center;
|
1833 |
+
}
|
1834 |
+
|
1835 |
+
#n2-ss-slide-canvas-settings.n2-active > .n2-button {
|
1836 |
+
background-color: #0c92df;
|
1837 |
+
border-color: #0c92df;
|
1838 |
+
}
|
1839 |
+
|
1840 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel {
|
1841 |
+
position: absolute;
|
1842 |
+
left: 0;
|
1843 |
+
top: 28px;
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner {
|
1847 |
+
margin-top: 6px;
|
1848 |
+
min-width: 180px;
|
1849 |
+
box-shadow: 0px 0px 5px 0 RGBA(0, 0, 0, 0.3);
|
1850 |
+
background-color: #fff;
|
1851 |
+
border-radius: 3px;
|
1852 |
+
}
|
1853 |
+
|
1854 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner > * {
|
1855 |
+
display: block;
|
1856 |
+
line-height: 32px;
|
1857 |
+
margin: 0 10px;
|
1858 |
+
position: relative;
|
1859 |
+
text-align: left;
|
1860 |
+
}
|
1861 |
+
|
1862 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner a {
|
1863 |
+
color: #7b8898;
|
1864 |
+
}
|
1865 |
+
|
1866 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-panel-action {
|
1867 |
+
color: #0c92df;
|
1868 |
+
}
|
1869 |
+
|
1870 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick {
|
1871 |
+
display: block;
|
1872 |
+
position: absolute;
|
1873 |
+
right: 0px;
|
1874 |
+
top: 8px;
|
1875 |
+
border-radius: 3px;
|
1876 |
+
border: 2px solid #8793a2;
|
1877 |
+
width: 12px;
|
1878 |
+
height: 12px;
|
1879 |
+
}
|
1880 |
+
|
1881 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel {
|
1882 |
+
display: none;
|
1883 |
+
}
|
1884 |
+
|
1885 |
+
#n2-ss-slide-canvas-settings.n2-active .n2-ss-settings-panel {
|
1886 |
+
display: inline-block;
|
1887 |
+
}
|
1888 |
+
|
1889 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-setting-tick {
|
1890 |
+
border-color: #1999e3;
|
1891 |
+
background-color: #1999e3;
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick .n2-i {
|
1895 |
+
display: none;
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-i {
|
1899 |
+
display: inline-block;
|
1900 |
+
color: #fff;
|
1901 |
+
font-size: 16px;
|
1902 |
+
line-height: 12px;
|
1903 |
+
margin: 0 -2px;
|
1904 |
+
}
|
1905 |
+
|
1906 |
+
#n2-ss-layer-show-on {
|
1907 |
+
display: inline-block;
|
1908 |
+
}
|
1909 |
+
|
1910 |
+
#n2-ss-toolbar .n2-button-grey {
|
1911 |
+
background-color: #a1aeb5;
|
1912 |
+
}
|
1913 |
+
|
1914 |
+
#n2-ss-toolbar .n2-radio-option {
|
1915 |
+
background-color: #a1aeb5;
|
1916 |
+
border-left: 1px solid #8c99a1;
|
1917 |
+
}
|
1918 |
+
|
1919 |
+
#n2-ss-toolbar .n2-radio-option.n2-first {
|
1920 |
+
border-left-width: 0px;
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
#n2-ss-toolbar .n2-radio-option.n2-active {
|
1924 |
+
background-color: #0c92df;
|
1925 |
+
border-color: #0c92df;
|
1926 |
+
}
|
1927 |
+
|
1928 |
+
#n2-ss-toolbar .n2-radio-option.n2-sub-active {
|
1929 |
+
background-color: #51b82d;
|
1930 |
+
border-color: #51b82d;
|
1931 |
+
}
|
1932 |
+
|
1933 |
+
#n2-ss-toolbar .n2-ss-tool.n2-button {
|
1934 |
+
height: 28px;
|
1935 |
+
line-height: 28px;
|
1936 |
+
background-color: #a1aeb5;
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
#n2-ss-toolbar .n2-ss-tool.n2-button-icon {
|
1940 |
+
padding: 0;
|
1941 |
+
width: 28px;
|
1942 |
+
}
|
1943 |
+
|
1944 |
+
#n2-ss-toolbar .n2-ss-tool.n2-button.n2-active {
|
1945 |
+
background-color: #0c92df;
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
#n2-ss-toolbar .n2-ss-tool.n2-button.n2-sub-active {
|
1949 |
+
background-color: #51b82d;
|
1950 |
+
}
|
1951 |
+
|
1952 |
+
#n2-ss-toolbar .ui-autocomplete {
|
1953 |
max-width: 100%;
|
1954 |
}
|
1955 |
|
1956 |
+
#n2-ss-layer-parent-linker,
|
1957 |
+
#n2-ss-theme,
|
1958 |
+
#n2-ss-toolbar #n2-ss-theme.n2-active {
|
1959 |
+
width: 28px;
|
1960 |
+
height: 28px;
|
1961 |
+
line-height: 28px;
|
1962 |
+
padding: 0;
|
1963 |
+
background-color: #a1aeb5;
|
1964 |
+
}
|
1965 |
+
|
1966 |
+
#n2-ss-theme.n2-active .n2-i:before {
|
1967 |
+
content: "\e64c";
|
1968 |
+
}
|
1969 |
+
#n2-ss-layers ul {
|
1970 |
+
|
1971 |
+
}
|
1972 |
+
|
1973 |
+
#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-ss-ll-dragging-parent {
|
1974 |
+
background: #000;
|
1975 |
+
}
|
1976 |
+
|
1977 |
+
#n2-ss-layer-list > .n2-list > li {
|
1978 |
+
background-color: #303b47;
|
1979 |
+
}
|
1980 |
+
|
1981 |
+
#n2-ss-layer-list .n2-list > li {
|
1982 |
+
line-height: 31px;
|
1983 |
+
}
|
1984 |
+
|
1985 |
+
#n2-ss-layer-list > .n2-list > li li {
|
1986 |
+
background-color: #28313a;
|
1987 |
+
}
|
1988 |
+
|
1989 |
+
#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-active,
|
1990 |
+
#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-selected {
|
1991 |
+
background: #1681c1;
|
1992 |
+
}
|
1993 |
+
|
1994 |
+
#n2-ss-layer-list .n2-ss-layer-content-row .n2-list > li .n2-actions-left,
|
1995 |
+
#n2-ss-layer-list .n2-ss-layerlist-row-row .n2-list > li .n2-actions-left {
|
1996 |
+
display: none;
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging {
|
2000 |
+
position: absolute;
|
2001 |
+
left: 0;
|
2002 |
+
width: 100%;
|
2003 |
+
height: 32px;
|
2004 |
+
overflow: hidden;
|
2005 |
+
opacity: 0.5;
|
2006 |
+
}
|
2007 |
+
|
2008 |
+
#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions-left,
|
2009 |
+
#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions {
|
2010 |
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011 |
}
|
2012 |
|
2013 |
+
/* When layer list sorted, show a lightning bar */
|
2014 |
+
#n2-ss-layers .nextend-sortable-placeholder {
|
2015 |
+
border: 0;
|
2016 |
+
position: relative;
|
2017 |
+
height: 0;
|
2018 |
+
overflow: visible;
|
2019 |
+
z-index: 1001;
|
2020 |
}
|
2021 |
|
2022 |
+
#n2-ss-layers .nextend-sortable-placeholder div {
|
|
|
2023 |
position: absolute;
|
2024 |
+
left: 0px;
|
2025 |
+
top: -1px;
|
2026 |
width: 100%;
|
2027 |
+
height: 0;
|
2028 |
+
box-shadow: 0 0 0px 2px #0c92df;
|
2029 |
}
|
2030 |
|
2031 |
+
#n2-ss-layers ul .nextend-sortable-placeholder div {
|
2032 |
+
margin-left: 30px;
|
|
|
2033 |
}
|
2034 |
|
2035 |
+
#n2-ss-layers ul ul .nextend-sortable-placeholder div {
|
2036 |
+
margin-left: 50px;
|
|
|
2037 |
}
|
2038 |
|
2039 |
+
#n2-ss-layers ul ul ul .nextend-sortable-placeholder div {
|
2040 |
+
margin-left: 70px;
|
2041 |
}
|
2042 |
|
2043 |
+
#n2-ss-layers ul ul ul ul .nextend-sortable-placeholder div {
|
2044 |
+
margin-left: 90px;
|
|
|
2045 |
}
|
2046 |
|
2047 |
+
#n2-ss-layers ul ul ul ul ul .nextend-sortable-placeholder div {
|
2048 |
+
margin-left: 110px;
|
2049 |
+
}
|
2050 |
+
|
2051 |
+
#n2-ss-layers ul ul ul ul ul ul .nextend-sortable-placeholder div {
|
2052 |
+
margin-left: 130px;
|
2053 |
+
}
|
2054 |
+
|
2055 |
+
/* Fade out the cloned layer row */
|
2056 |
+
#n2-ss-layers .ui-sortable-helper {
|
2057 |
opacity: 0.5;
|
2058 |
}
|
|
|
2059 |
|
2060 |
+
.n2-list .n2-ss-layer-group-row {
|
2061 |
+
border-bottom: 0px;
|
|
|
|
|
|
|
|
|
2062 |
}
|
2063 |
|
2064 |
+
#n2-ss-layers-table .n2-list li {
|
2065 |
+
border-bottom: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2066 |
}
|
2067 |
|
2068 |
+
#n2-ss-layers-table .n2-ss-layer-title {
|
2069 |
+
border-bottom: 1px solid RGBA(0, 0, 0, 0.2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2070 |
}
|
2071 |
|
2072 |
+
.n2-list .n2-ss-layerlist-row.n2-active,
|
2073 |
+
.n2-list .n2-ss-layerlist-row.n2-selected {
|
2074 |
+
background: #1681c1;
|
2075 |
+
}
|
2076 |
+
|
2077 |
+
#n2-ss-layers-table .n2-active > .n2-ss-layer-title,
|
2078 |
+
#n2-ss-layers-table .n2-selected > .n2-ss-layer-title {
|
2079 |
+
border-color: #1681c1;
|
2080 |
+
}
|
2081 |
+
|
2082 |
+
.n2-ss-layer-group-row ul.n2-list {
|
2083 |
+
margin-top: -10px;
|
2084 |
+
padding-top: 10px;
|
2085 |
+
}
|
2086 |
+
|
2087 |
+
.n2-ss-layer-content-row ul.n2-list {
|
2088 |
+
|
2089 |
+
}
|
2090 |
+
|
2091 |
+
.n2-ss-layer-title {
|
2092 |
display: block;
|
2093 |
+
line-height: 31px;
|
2094 |
+
position: relative;
|
2095 |
+
cursor: pointer;
|
2096 |
+
overflow: hidden;
|
2097 |
}
|
2098 |
|
2099 |
+
.n2-ss-layer-title span {
|
2100 |
+
margin: 0 30px;
|
2101 |
+
display: block;
|
2102 |
+
width: 170px;
|
2103 |
+
white-space: nowrap;
|
2104 |
+
overflow: hidden;
|
2105 |
+
text-overflow: ellipsis;
|
2106 |
}
|
2107 |
|
2108 |
+
.n2-ss-layer-group-row > .n2-ss-layer-title span {
|
2109 |
+
margin: 0 30px;
|
|
|
|
|
2110 |
}
|
2111 |
|
2112 |
+
.n2-ss-layer-icon {
|
2113 |
+
position: absolute;
|
2114 |
+
top: 2px;
|
|
|
2115 |
}
|
2116 |
|
2117 |
+
ul > li > .n2-ss-layer-title span {
|
2118 |
+
margin: 0 30px;
|
|
|
|
|
2119 |
}
|
2120 |
|
2121 |
+
ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2122 |
+
left: 3px;
|
|
|
|
|
2123 |
}
|
2124 |
|
2125 |
+
#n2-ss-layer-list > ul > li.n2-ss-layer-content-row > .n2-ss-layer-title span,
|
2126 |
+
#n2-ss-layer-list > ul > li.n2-ss-layer-row-row > .n2-ss-layer-title span {
|
2127 |
+
margin: 0 50px;
|
2128 |
}
|
2129 |
|
2130 |
+
#n2-ss-layer-list > ul > li.n2-ss-layer-content-row > .n2-ss-layer-title .n2-ss-layer-icon,
|
2131 |
+
#n2-ss-layer-list > ul > li.n2-ss-layer-row-row > .n2-ss-layer-title .n2-ss-layer-icon {
|
2132 |
+
left: 23px;
|
2133 |
}
|
2134 |
|
2135 |
+
ul > li > ul > li > .n2-ss-layer-title span {
|
2136 |
+
margin: 0 50px;
|
|
|
2137 |
}
|
2138 |
|
2139 |
+
ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2140 |
+
left: 23px;
|
|
|
2141 |
}
|
2142 |
|
2143 |
+
ul > li > ul > li > ul > li > .n2-ss-layer-title span {
|
2144 |
+
margin: 0 70px;
|
|
|
|
|
|
|
2145 |
}
|
2146 |
|
2147 |
+
ul > li > ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2148 |
+
left: 43px;
|
|
|
|
|
|
|
|
|
|
|
2149 |
}
|
2150 |
|
2151 |
+
ul > li > ul > li > ul > li > ul > li > .n2-ss-layer-title span {
|
2152 |
+
margin: 0 90px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2153 |
}
|
2154 |
|
2155 |
+
ul > li > ul > li > ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2156 |
+
left: 63px;
|
|
|
2157 |
}
|
2158 |
|
2159 |
+
ul > li > ul > li > ul > li > ul > li > ul > li > .n2-ss-layer-title span {
|
2160 |
+
margin: 0 110px;
|
2161 |
}
|
2162 |
|
2163 |
+
ul > li > ul > li > ul > li > ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2164 |
+
left: 83px;
|
2165 |
+
}
|
2166 |
+
|
2167 |
+
ul > li > ul > li > ul > li > ul > li > ul > li > ul > li .n2-ss-layer-title span {
|
2168 |
+
margin: 0 130px;
|
2169 |
+
}
|
2170 |
+
|
2171 |
+
ul > li > ul > li > ul > li > ul > li > ul > li > ul > li .n2-ss-layer-title .n2-ss-layer-icon {
|
2172 |
+
left: 103px;
|
2173 |
+
}
|
2174 |
+
|
2175 |
+
ul > li .n2-inline-form {
|
2176 |
+
margin: 0 50px;
|
2177 |
+
}
|
2178 |
+
|
2179 |
+
ul > li > ul > li > ul > li .n2-inline-form {
|
2180 |
+
margin: 0 70px;
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
ul > li > ul > li > ul > li > ul > li > ul > li .n2-inline-form {
|
2184 |
+
margin: 0 90px;
|
2185 |
+
}
|
2186 |
+
|
2187 |
+
.n2-ss-layerlist-row .n2-inline-form input {
|
2188 |
+
background: #3c4958 none repeat scroll 0 0;
|
2189 |
+
color: #b2bfc9;
|
2190 |
+
font-size: 11px;
|
2191 |
+
border: 2px solid #28313a;
|
2192 |
+
line-height: 24px;
|
2193 |
+
padding: 0 10px;
|
2194 |
+
|
2195 |
+
-webkit-border-radius: 3px;
|
2196 |
+
-moz-border-radius: 3px;
|
2197 |
border-radius: 3px;
|
2198 |
+
|
2199 |
+
margin: 0;
|
|
|
|
|
|
|
|
|
2200 |
}
|
2201 |
|
2202 |
+
.n2-ss-layerlist-row .n2-inline-form input:focus {
|
2203 |
+
box-shadow: none;
|
2204 |
}
|
2205 |
|
2206 |
+
.n2-ss-layer-title .n2-actions {
|
|
|
2207 |
position: absolute;
|
|
|
2208 |
top: 0;
|
2209 |
right: 0;
|
2210 |
+
padding: 0 6px;
|
2211 |
+
cursor: default;
|
2212 |
+
opacity: 0.2;
|
2213 |
}
|
2214 |
|
2215 |
+
/*.n2-ss-layer-title:HOVER .n2-actions,*/
|
2216 |
+
.n2-active > .n2-ss-layer-title .n2-actions {
|
2217 |
+
opacity: 1;
|
|
|
|
|
2218 |
}
|
2219 |
|
2220 |
+
.n2-ss-layer-title .n2-actions-left {
|
2221 |
+
position: absolute;
|
2222 |
+
top: 0;
|
2223 |
+
left: 0;
|
2224 |
+
padding: 2px 0;
|
2225 |
+
cursor: default;
|
2226 |
+
line-height: 24px;
|
|
|
2227 |
}
|
2228 |
|
2229 |
+
html[dir="rtl"] .n2-ss-layer-title .n2-actions-left {
|
2230 |
+
padding: 0 16px 0 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
2231 |
}
|
2232 |
|
2233 |
+
#n2-ss-layer-list .n2-ss-layerlist-row.n2-active > .n2-ss-layer-title,
|
2234 |
+
#n2-ss-layer-list .n2-ss-layerlist-row.n2-active > .n2-ss-layer-title .n2-i,
|
2235 |
+
#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title,
|
2236 |
+
#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title .n2-i {
|
2237 |
+
color: #fff;
|
|
|
|
|
2238 |
}
|
2239 |
|
2240 |
+
.n2-ss-layer-title .n2-actions a,
|
2241 |
+
.n2-ss-layer-title .n2-actions-left a {
|
2242 |
+
display: inline-block;
|
2243 |
+
padding: 0;
|
2244 |
}
|
2245 |
|
2246 |
+
.n2-ss-layer-title .n2-actions-left i {
|
2247 |
+
padding: 0 2px;
|
2248 |
+
vertical-align: middle;
|
|
|
|
|
|
|
2249 |
}
|
2250 |
|
2251 |
+
.n2-ss-layer-title .n2-i-order {
|
2252 |
+
cursor: move;
|
2253 |
}
|
2254 |
|
2255 |
+
.n2-ss-layer-status {
|
2256 |
+
display: inline-block;
|
2257 |
+
position: relative;
|
2258 |
+
margin: 0 3px;
|
2259 |
}
|
2260 |
|
2261 |
+
#n2-ss-layer-list a .n2-i,
|
2262 |
+
#n2-ss-layer-list a:HOVER .n2-i {
|
2263 |
+
color: #b2bfc9;
|
2264 |
}
|
2265 |
|
2266 |
+
div.n2-ss-layer-status a.n2-ss-sc-hide {
|
2267 |
+
|
|
|
|
|
2268 |
}
|
2269 |
|
2270 |
+
.n2-ss-layer-status-hidden .n2-ss-layer-status .n2-ss-sc-hide .n2-i:before {
|
2271 |
+
content: "\e923";
|
2272 |
}
|
2273 |
|
2274 |
+
.n2-ss-layer-list-top-bar .n2-h2 {
|
2275 |
+
display: inline-block;
|
2276 |
+
line-height: 28px;
|
2277 |
+
color: #fff;
|
2278 |
+
padding: 0 5px;
|
2279 |
}
|
2280 |
|
2281 |
+
.n2-ss-layer-list-opener {
|
2282 |
+
width: 28px;
|
2283 |
+
display: inline-block;
|
2284 |
+
padding: 0;
|
2285 |
+
vertical-align: top;
|
2286 |
+
margin: 0 5px;
|
2287 |
}
|
2288 |
|
2289 |
+
#n2-ss-layers.n2-active .n2-ss-layer-list-opener > .n2-i:before {
|
2290 |
+
content: "\e92c";
|
|
|
|
|
2291 |
}
|
2292 |
|
2293 |
+
.n2-closed .n2-i-row:before,
|
2294 |
+
.n2-closed .n2-i-col:before,
|
2295 |
+
.n2-ss-layer-list-group-opener.n2-closed .n2-i:before {
|
2296 |
+
content: "\e921";
|
2297 |
}
|
2298 |
|
2299 |
+
#n2-ss-layers {
|
2300 |
+
position: fixed;
|
2301 |
bottom: 0;
|
2302 |
+
width: 340px;
|
2303 |
+
margin: 0 -1px;
|
2304 |
+
height: 48px;
|
2305 |
+
user-select: none;
|
2306 |
+
-o-user-select: none;
|
2307 |
+
-moz-user-select: none;
|
2308 |
+
-khtml-user-select: none;
|
2309 |
+
-webkit-user-select: none;
|
2310 |
+
display: none;
|
2311 |
+
background-color: #28313a;
|
2312 |
+
z-index: 1019;
|
2313 |
}
|
2314 |
|
2315 |
+
#n2-ss-layers.n2-active {
|
2316 |
+
height: 100px;
|
2317 |
}
|
2318 |
|
2319 |
+
#n2-ss-layers:not(.n2-active) {
|
2320 |
+
width: 50px !important;
|
|
|
2321 |
}
|
2322 |
|
2323 |
+
#n2-ss-layers:not(.n2-active) .n2-ss-layers-sidebar {
|
2324 |
+
width: 50px;
|
|
|
2325 |
}
|
2326 |
|
2327 |
+
#n2-ss-layers:not(.n2-active) .n2-ss-layer-list-layers-top-bar > div {
|
2328 |
+
display: none !important;
|
|
|
|
|
|
|
|
|
|
|
2329 |
}
|
2330 |
|
2331 |
+
.n2-ss-has-layers #n2-ss-layers {
|
2332 |
+
display: block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2333 |
}
|
2334 |
|
2335 |
+
#n2-ss-layers-table .n2-td {
|
2336 |
position: relative;
|
2337 |
+
vertical-align: top;
|
|
|
2338 |
}
|
2339 |
|
2340 |
+
#n2-ss-layers-table .n2-ss-layers-sidebar {
|
2341 |
+
width: 340px;
|
|
|
|
|
|
|
|
|
2342 |
}
|
2343 |
|
2344 |
+
.n2-ss-layer-list-top-bar {
|
2345 |
position: relative;
|
2346 |
+
padding: 10px 5px 9px 5px;
|
2347 |
+
height: 28px;
|
2348 |
+
background-color: #212d3a;
|
2349 |
+
border-bottom: 1px solid #20282f;
|
2350 |
}
|
2351 |
|
2352 |
+
#n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar {
|
2353 |
+
cursor: n-resize;
|
|
|
|
|
|
|
|
|
|
|
2354 |
}
|
2355 |
|
2356 |
+
[data-component="layer"] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar {
|
|
|
|
|
|
|
|
|
|
|
2357 |
display: none;
|
2358 |
}
|
2359 |
|
2360 |
+
.n2-ss-layer-list-bulk-top-bar {
|
2361 |
+
display: none;
|
|
|
2362 |
}
|
2363 |
|
2364 |
+
[data-component="layer"] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-bulk-top-bar {
|
2365 |
+
display: block;
|
|
|
2366 |
}
|
2367 |
|
2368 |
+
#n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar {
|
2369 |
+
cursor: ns-resize;
|
|
|
|
|
2370 |
}
|
2371 |
|
2372 |
+
.n2-ss-layer-list-top-bar .n2-form-element-text {
|
2373 |
margin: 0;
|
|
|
|
|
2374 |
}
|
2375 |
|
2376 |
+
.n2-ss-layers-sidebar-rows {
|
2377 |
+
position: relative;
|
2378 |
+
height: 100%;
|
2379 |
+
overflow-x: hidden;
|
2380 |
+
overflow-y: visible;
|
2381 |
}
|
2382 |
|
2383 |
+
#n2-ss-layers .n2-form-element-text {
|
2384 |
+
margin: 0 10px;
|
2385 |
+
line-height: 2px;
|
2386 |
}
|
2387 |
|
2388 |
+
#n2-ss-layers .n2-text-sub-label {
|
2389 |
+
width: 30px;
|
2390 |
+
text-align: center;
|
2391 |
+
overflow: hidden;
|
2392 |
}
|
2393 |
|
2394 |
+
.n2-ss-layer-list-bulk-top-bar {
|
2395 |
+
text-align: right;
|
2396 |
+
color: #fff;
|
2397 |
+
vertical-align: top;
|
2398 |
+
padding: 10px 15px 9px 15px;
|
2399 |
+
}
|
|
|
2400 |
|
2401 |
+
.n2-ss-layer-list-bulk-top-bar .n2-button {
|
2402 |
+
vertical-align: middle;
|
|
|
2403 |
}
|
2404 |
|
2405 |
+
.n2-ss-layer-list-bulk-top-bar .n2-button + .n2-button {
|
2406 |
+
margin: 0 0 0 5px;
|
|
|
|
|
|
|
|
|
2407 |
}
|
2408 |
|
2409 |
+
html[dir="rtl"] .n2-ss-layer-list-top-bar .n2-button + .n2-button {
|
2410 |
+
margin: 0 5px 0 0;
|
2411 |
}
|
2412 |
|
2413 |
+
.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control {
|
2414 |
+
position: absolute;
|
2415 |
+
top: 10px;
|
2416 |
+
right: 5px;
|
2417 |
+
margin: 0 10px;
|
2418 |
}
|
2419 |
|
2420 |
+
html[dir="rtl"] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control {
|
2421 |
+
right: auto;
|
2422 |
+
left: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
2423 |
}
|
2424 |
|
2425 |
+
.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button {
|
2426 |
+
margin: 0 0 0 5px;
|
2427 |
}
|
2428 |
|
2429 |
+
html[dir="rtl"] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button {
|
2430 |
+
margin: 0 5px 0 0;
|
|
|
|
|
|
|
|
|
|
|
2431 |
}
|
2432 |
|
2433 |
+
.n2-ss-layer-list-topbar-control {
|
2434 |
+
text-align: right;
|
2435 |
+
color: #fff;
|
2436 |
+
padding: 0 10px;
|
2437 |
+
vertical-align: top;
|
|
|
|
|
|
|
|
|
|
|
2438 |
}
|
2439 |
|
2440 |
+
#n2-ss-layers .n2-ss-layer-list-topbar-control {
|
2441 |
+
padding: 0;
|
|
|
|
|
|
|
2442 |
}
|
2443 |
|
2444 |
+
.n2-ss-layer-list-topbar-control .n2-button {
|
2445 |
+
padding: 0;
|
2446 |
+
width: 28px;
|
2447 |
+
font-size: 16px;
|
2448 |
+
vertical-align: middle;
|
2449 |
}
|
2450 |
|
2451 |
+
.n2-ss-layer-list-topbar-control .n2-button i {
|
2452 |
+
line-height: inherit;
|
|
|
|
|
|
|
2453 |
}
|
2454 |
|
2455 |
+
.n2-play.n2-active i:before {
|
2456 |
+
content: "\e607";
|
2457 |
}
|
2458 |
+
|
2459 |
+
/*
|
2460 |
+
MARKINGS
|
2461 |
|
2462 |
+
#n2-ss-slide-canvas-container
|
2463 |
+
- .n2-ss-has-ruler
|
2464 |
+
- .n2-ss-show-guides
|
2465 |
+
- .n2-scroll-disable
|
2466 |
|
2467 |
+
*/
|
2468 |
|
2469 |
+
#n2-ss-slide-canvas-container {
|
2470 |
+
background-color: #fff;
|
2471 |
+
/*margin: -21px 0 0 0;*/
|
2472 |
+
border-width: 1px 0 0 0;
|
2473 |
+
padding-bottom: 400px;
|
2474 |
+
padding-bottom: 40vh;
|
2475 |
+
position: relative;
|
2476 |
+
border-top: 1px solid #ccd1d6;
|
2477 |
}
|
2478 |
|
2479 |
+
#smartslider-form > div {
|
2480 |
+
margin-bottom: -1px;
|
|
|
|
|
2481 |
}
|
2482 |
|
2483 |
+
#n2-ss-slide-canvas-container-inner {
|
|
|
2484 |
position: relative;
|
2485 |
+
z-index: 1;
|
2486 |
+
overflow: hidden;
|
2487 |
+
border-bottom: 1px solid #ccd1d6;
|
2488 |
+
background-color: #e9edf0;
|
2489 |
+
margin-left: 49px;
|
2490 |
+
border-top: 1px solid #ccd1d6;
|
2491 |
+
}
|
2492 |
+
|
2493 |
+
.n2-ss-position-display {
|
2494 |
+
display: none;
|
2495 |
+
position: absolute;
|
2496 |
+
border-radius: 3px;
|
2497 |
+
z-index: 10000;
|
2498 |
+
line-height: 16px;
|
2499 |
+
padding: 4px 6px;
|
2500 |
+
color: #fff;
|
2501 |
+
font-size: 10px;
|
2502 |
+
background: RGBA(32, 41, 52, 0.95);
|
2503 |
}
|
2504 |
|
2505 |
+
.n2-ss-position-display.n2-active {
|
2506 |
+
display: block;
|
2507 |
}
|
2508 |
|
2509 |
+
#n2-ss-0 .n2-ss-slide-border {
|
2510 |
+
display: none;
|
2511 |
+
position: absolute;
|
2512 |
+
background: #a1aeb5;
|
2513 |
+
width: 1px;
|
2514 |
+
height: 1px;
|
2515 |
}
|
2516 |
|
2517 |
+
#n2-ss-0 .n2-ss-slide-border-left {
|
2518 |
+
left: 0;
|
2519 |
+
top: 0;
|
2520 |
+
height: 100%;
|
2521 |
}
|
2522 |
|
2523 |
+
#n2-ss-0 .n2-ss-slide-border-right {
|
2524 |
+
right: 0;
|
2525 |
+
top: 0;
|
2526 |
+
height: 100%;
|
2527 |
}
|
2528 |
|
2529 |
+
#n2-ss-0 .n2-ss-slide-border-top {
|
2530 |
+
left: 0;
|
2531 |
+
top: 0;
|
2532 |
+
width: 100%;
|
2533 |
}
|
2534 |
|
2535 |
+
#n2-ss-0 .n2-ss-slide-border-bottom {
|
2536 |
+
left: 0;
|
2537 |
+
bottom: 0;
|
2538 |
+
width: 100%;
|
2539 |
}
|
2540 |
|
2541 |
+
#n2-ss-0:HOVER .n2-ss-slide-border {
|
2542 |
display: block;
|
2543 |
}
|
2544 |
|
2545 |
+
.n2-ss-layer-placeholder {
|
2546 |
+
position: relative;
|
2547 |
+
height: 0;
|
2548 |
+
width: 100%;
|
2549 |
+
box-shadow: 0 0 0px 2px #0c92df;
|
2550 |
display: block;
|
2551 |
+
z-index: 100000;
|
2552 |
}
|
2553 |
|
2554 |
+
.n2-ss-layer-row > .n2-ss-layer-placeholder {
|
2555 |
+
height: auto;
|
2556 |
+
width: 0;
|
2557 |
+
align-self: stretch;
|
2558 |
+
flex: 0 0 auto;
|
2559 |
}
|
2560 |
|
2561 |
+
.n2-ss-layer-inline > .n2-ss-layer-placeholder {
|
2562 |
+
height: auto;
|
2563 |
+
width: 0;
|
2564 |
+
align-self: stretch;
|
2565 |
+
flex: 0 0 auto;
|
2566 |
}
|
2567 |
|
2568 |
+
/* When item dragged from outside */
|
2569 |
+
.n2-ss-core-item.n2-canvas-item-drag {
|
2570 |
+
opacity: 0.5;
|
2571 |
+
z-index: 9999;
|
2572 |
+
margin: 0;
|
2573 |
}
|
2574 |
|
2575 |
+
.n2-canvas-item-drag {
|
2576 |
+
opacity: 0.5 !important;
|
|
|
2577 |
}
|
2578 |
|
2579 |
+
/* When resize a layer, it shows other layers to snap too */
|
2580 |
+
/* When move a layer, it shows other layers to snap too */
|
2581 |
+
.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.ui-resizable,
|
2582 |
+
.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.ui-resizable {
|
2583 |
+
box-shadow: inset 0px 0px 0px 1px #0c92df;
|
2584 |
}
|
2585 |
|
2586 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over {
|
2587 |
+
box-shadow: inset 0px 0px 0px 1px RGBA(12, 146, 223, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
2588 |
}
|
2589 |
|
2590 |
+
div#n2-ss-0 .n2-ss-layer-ui-label-container {
|
2591 |
+
display: none;
|
2592 |
+
position: absolute;
|
2593 |
+
left: 0;
|
2594 |
+
top: 0;
|
2595 |
+
text-align: left;
|
2596 |
+
line-height: 16px;
|
2597 |
+
z-index: 91;
|
2598 |
+
white-space: nowrap;
|
2599 |
+
border-bottom-right-radius: 2px;
|
2600 |
overflow: hidden;
|
2601 |
+
background: #0c92df;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2602 |
|
2603 |
+
max-width: 100%;
|
2604 |
+
max-height: 100%;
|
|
|
2605 |
}
|
2606 |
|
2607 |
+
div#n2-ss-0 .n2-ss-layer-ui-label-container:HOVER {
|
|
|
|
|
|
|
2608 |
|
2609 |
+
max-width: none;
|
2610 |
+
max-height: none;
|
|
|
|
|
|
|
|
|
|
|
2611 |
}
|
2612 |
|
2613 |
+
div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-over-delayed > .n2-ss-layer-ui-label-container,
|
2614 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active > .n2-ss-layer-ui-label-container {
|
2615 |
+
display: block;
|
2616 |
}
|
2617 |
|
2618 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-ui-label {
|
2619 |
+
display: inline-block;
|
2620 |
+
height: 16px;
|
2621 |
+
font-size: 10px;
|
2622 |
+
line-height: 16px;
|
2623 |
color: #fff;
|
2624 |
+
padding: 0 5px;
|
2625 |
+
vertical-align: top;
|
2626 |
+
text-transform: uppercase;
|
2627 |
+
border-left: 1px solid #0b7dbe;
|
2628 |
}
|
2629 |
|
2630 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer > .n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action {
|
2631 |
+
padding: 0;
|
2632 |
+
cursor: pointer;
|
2633 |
+
font-size: 16px;
|
2634 |
display: none;
|
2635 |
}
|
2636 |
|
2637 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-active > .n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action,
|
2638 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer > .n2-ss-layer-ui-label-container:HOVER .n2-ss-layer-ui-label-action {
|
2639 |
+
display: inline-block;
|
2640 |
}
|
2641 |
|
2642 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer > .n2-ss-layer-ui-label-container .n2-ss-layer-ui-label:first-child {
|
2643 |
+
border-left: 0;
|
2644 |
}
|
2645 |
|
2646 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer > .n2-ss-layer-ui-label-container .n2-ss-layer-ui-layer-move {
|
|
|
|
|
|
|
|
|
|
|
2647 |
cursor: move;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2648 |
}
|
2649 |
|
2650 |
+
div#n2-ss-0 .n2-ss-layer-ui-label-container.invisible {
|
2651 |
+
visibility: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2652 |
}
|
2653 |
|
2654 |
+
/* Outline col when highlighted */
|
2655 |
+
.n2-ss-layer[data-type="col"].n2-highlight {
|
2656 |
+
box-shadow: inset 0px 0px 0px 1px #0c92df;
|
|
|
2657 |
}
|
2658 |
|
2659 |
+
div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-type="col"] {
|
2660 |
+
z-index: 2;
|
|
|
|
|
2661 |
}
|
2662 |
|
2663 |
+
/* Outline when the mouse over the editor and component is active */
|
2664 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active {
|
|
|
|
|
|
|
2665 |
|
2666 |
+
box-shadow: inset 0px 0px 0px 1px #0c92df;
|
2667 |
}
|
2668 |
|
2669 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER #n2-ss-0 .n2-ss-layer[data-type="row"].n2-active {
|
|
|
|
|
2670 |
|
2671 |
+
box-shadow: inset 0px 0px 0px 1px RGBA(12, 146, 223, 1);
|
|
|
|
|
|
|
2672 |
}
|
2673 |
|
2674 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer .n2-ss-layer[data-type="col"].n2-active {
|
|
|
|
|
|
|
|
|
|
|
2675 |
|
2676 |
+
box-shadow: inset 0px 0px 0px 1px RGBA(12, 146, 223, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
2677 |
}
|
2678 |
|
2679 |
+
/* When a normal positioned layer dragged, outline the cols where it can be placed */
|
2680 |
+
.n2-ss-move-layer .n2-ss-layer[data-type="col"] {
|
2681 |
+
box-shadow: inset 0px 0px 0px 1px RGBA(12, 146, 223, 1);
|
2682 |
}
|
2683 |
|
2684 |
+
.n2-ss-move-layer #n2-ss-0 .n2-ss-layer:HOVER {
|
2685 |
+
box-shadow: none;
|
2686 |
}
|
2687 |
|
2688 |
+
/* While dragging a layer with normal position */
|
|
|
|
|
2689 |
|
2690 |
+
div#n2-ss-0 .n2-ss-layer[data-type="content"] .n2-ss-layer.ui-draggable-dragging,
|
2691 |
+
div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
2692 |
+
/*position: absolute !important;*/
|
2693 |
+
/*width: 50px !important;
|
2694 |
+
height: 50px !important;
|
2695 |
+
overflow: hidden !important;
|
2696 |
+
background: #0c92df !important;
|
2697 |
+
opacity: 0.5 !important;*/
|
2698 |
+
z-index: 100000;
|
2699 |
+
outline: 0 !important;
|
2700 |
|
|
|
|
|
|
|
|
|
2701 |
}
|
2702 |
|
2703 |
+
/* While dragging a layer with normal position, hide all inside elements */
|
2704 |
+
/*div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging * {
|
2705 |
+
display: none !important;
|
2706 |
+
}*/
|
|
|
2707 |
|
2708 |
+
.ui-item-overlay {
|
2709 |
+
display: none;
|
2710 |
+
position: absolute;
|
2711 |
+
top: 0;
|
2712 |
+
left: 0;
|
2713 |
+
width: 100%;
|
2714 |
+
height: 100%;
|
2715 |
}
|
2716 |
|
2717 |
+
.n2-ss-select-layer-mode .n2-ss-layer-selected .ui-item-overlay {
|
2718 |
+
display: block;
|
2719 |
+
background-color: RGBA(0, 132, 255, 0.4);
|
2720 |
}
|
2721 |
|
2722 |
+
.n2-ss-item-html .ui-item-overlay,
|
2723 |
+
.n2-ss-item-iframe .ui-item-overlay {
|
2724 |
+
display: block;
|
|
|
2725 |
}
|
2726 |
|
2727 |
+
/* RESIZE */
|
|
|
|
|
|
|
2728 |
|
2729 |
+
.n2-ss-layer .n2-ss-layer-cc,
|
2730 |
+
.n2-ss-layer .ui-resizable-ne,
|
2731 |
+
.n2-ss-layer .ui-resizable-se,
|
2732 |
+
.n2-ss-layer .ui-resizable-sw,
|
2733 |
+
.n2-ss-layer .ui-resizable-nw {
|
2734 |
+
opacity: 0;
|
2735 |
}
|
2736 |
|
2737 |
+
.n2-ss-layer-cc:HOVER,
|
2738 |
+
.ui-resizable-n:HOVER,
|
2739 |
+
.ui-resizable-e:HOVER,
|
2740 |
+
.ui-resizable-s:HOVER,
|
2741 |
+
.ui-resizable-w:HOVER,
|
2742 |
+
.n2-ss-layer .ui-resizable-ne:HOVER,
|
2743 |
+
.n2-ss-layer .ui-resizable-se:HOVER,
|
2744 |
+
.n2-ss-layer .ui-resizable-sw:HOVER,
|
2745 |
+
.n2-ss-layer .ui-resizable-nw:HOVER {
|
2746 |
+
opacity: 1;
|
2747 |
}
|
2748 |
|
2749 |
+
.n2-ss-layer[data-align="left"][data-valign="top"] .ui-resizable-nw,
|
2750 |
+
.n2-ss-layer[data-align="left"][data-valign="middle"] .ui-resizable-w,
|
2751 |
+
.n2-ss-layer[data-align="left"][data-valign="bottom"] .ui-resizable-sw,
|
2752 |
+
.n2-ss-layer[data-align="center"][data-valign="top"] .ui-resizable-n,
|
2753 |
+
.n2-ss-layer[data-align="center"][data-valign="middle"] .n2-ss-layer-cc,
|
2754 |
+
.n2-ss-layer[data-align="center"][data-valign="bottom"] .ui-resizable-s,
|
2755 |
+
.n2-ss-layer[data-align="right"][data-valign="top"] .ui-resizable-ne,
|
2756 |
+
.n2-ss-layer[data-align="right"][data-valign="middle"] .ui-resizable-e,
|
2757 |
+
.n2-ss-layer[data-align="right"][data-valign="bottom"] .ui-resizable-se {
|
2758 |
+
background: #0c92df;
|
2759 |
+
opacity: 1;
|
2760 |
+
border: 1px solid #fff;
|
2761 |
}
|
2762 |
|
2763 |
+
.n2-ss-layer-cc {
|
|
|
2764 |
position: absolute;
|
2765 |
+
font-size: 0.1px;
|
2766 |
+
display: block;
|
2767 |
+
z-index: 92;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2768 |
}
|
2769 |
|
2770 |
+
.n2-ss-layer .ui-resizable-handle,
|
2771 |
+
.n2-ss-layer .ui-customresizable-handle {
|
2772 |
+
border-radius: 50px;
|
2773 |
}
|
2774 |
|
2775 |
+
.n2-ss-layer .n2-ss-layer-cc,
|
2776 |
+
.n2-ss-layer .ui-resizable-handle,
|
2777 |
+
.n2-ss-layer .ui-customresizable-handle {
|
2778 |
+
display: none !important;
|
2779 |
+
background-image: none;
|
2780 |
+
border: 1px solid #0c92df;
|
2781 |
+
height: 7px;
|
2782 |
+
width: 7px;
|
2783 |
+
background: #fff;
|
2784 |
}
|
2785 |
|
2786 |
+
.n2-ss-layer .ui-column-width-handle {
|
2787 |
+
display: none !important;
|
|
|
2788 |
position: absolute;
|
2789 |
+
top: 25%;
|
2790 |
+
height: 50%;
|
2791 |
+
width: 0;
|
2792 |
+
cursor: ew-resize;
|
2793 |
+
/*border: 1px dashed #0c92df;*/
|
2794 |
+
width: 5px;
|
2795 |
+
background: RGBA(12, 146, 223, .5);
|
2796 |
+
z-index: 88;
|
2797 |
+
opacity: 1;
|
2798 |
+
box-sizing: border-box !important;
|
2799 |
+
border-radius: 5px;
|
2800 |
}
|
2801 |
|
2802 |
+
.n2-ss-layer .ui-column-width-handle:HOVER {
|
2803 |
+
background: RGBA(12, 146, 223, 1);
|
2804 |
}
|
2805 |
|
2806 |
+
.n2-ss-layer .ui-spacing-handle {
|
2807 |
+
display: none !important;
|
2808 |
+
opacity: 1;
|
2809 |
+
z-index: 89;
|
2810 |
+
background: #0c92df;
|
2811 |
+
opacity: 0.5;
|
2812 |
+
overflow: hidden;
|
2813 |
}
|
2814 |
|
2815 |
+
.n2-ss-layer .ui-spacing-handle:HOVER,
|
2816 |
+
.n2-ss-layer .ui-spacing-handle.ui-spacing-under-spacing {
|
2817 |
+
opacity: 0.8;
|
2818 |
}
|
2819 |
|
2820 |
+
.n2-ss-layer .ui-resizable-n {
|
2821 |
+
left: 50%;
|
2822 |
+
top: -4px;
|
2823 |
+
margin-left: -4px;
|
2824 |
}
|
2825 |
|
2826 |
+
.n2-ss-layer .ui-spacing-handle.ui-spacing-n {
|
2827 |
+
min-height: 5px;
|
2828 |
+
cursor: s-resize;
|
|
|
2829 |
}
|
2830 |
|
2831 |
+
.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-n {
|
2832 |
+
top: 0;
|
2833 |
+
margin-left: 0;
|
2834 |
+
left: 25%;
|
2835 |
+
width: 50%;
|
2836 |
}
|
2837 |
|
2838 |
+
.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-n {
|
2839 |
+
left: 0;
|
2840 |
+
bottom: 100%;
|
2841 |
+
width: 100%;
|
|
|
|
|
|
|
|
|
2842 |
}
|
2843 |
|
2844 |
+
.n2-ss-layer .ui-resizable-e,
|
2845 |
+
.n2-ss-layer .ui-customresizable-e {
|
2846 |
+
right: -4px;
|
2847 |
+
top: 50%;
|
2848 |
+
margin-top: -4px;
|
2849 |
}
|
2850 |
|
2851 |
+
.n2-ss-layer .ui-spacing-handle.ui-spacing-e {
|
2852 |
+
min-width: 5px;
|
2853 |
+
cursor: w-resize;
|
2854 |
}
|
2855 |
|
2856 |
+
.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-e {
|
2857 |
+
top: 25%;
|
2858 |
+
margin-top: 0;
|
2859 |
+
right: 0;
|
2860 |
+
height: 50%;
|
2861 |
}
|
2862 |
|
2863 |
+
.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-e {
|
2864 |
+
top: 0;
|
2865 |
+
left: 100%;
|
2866 |
+
height: 100%;
|
2867 |
}
|
2868 |
|
2869 |
+
.n2-ss-layer .ui-resizable-s,
|
2870 |
+
.n2-ss-layer .ui-customresizable-s {
|
2871 |
+
bottom: -4px;
|
2872 |
+
left: 50%;
|
2873 |
+
margin-left: -4px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2874 |
}
|
2875 |
|
2876 |
+
.n2-ss-layer .ui-spacing-handle.ui-spacing-s {
|
2877 |
+
min-height: 5px;
|
2878 |
+
cursor: n-resize;
|
2879 |
}
|
2880 |
|
2881 |
+
.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-s {
|
2882 |
+
bottom: 0;
|
2883 |
+
margin-left: 0;
|
2884 |
+
left: 25%;
|
2885 |
+
width: 50%;
|
2886 |
}
|
2887 |
|
2888 |
+
.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-s {
|
2889 |
+
bottom: auto;
|
2890 |
+
top: 100%;
|
2891 |
+
left: 0;
|
2892 |
+
width: 100%;
|
2893 |
}
|
2894 |
|
2895 |
+
.n2-ss-layer .ui-resizable-w,
|
2896 |
+
.n2-ss-layer .ui-customresizable-w {
|
2897 |
+
left: -4px;
|
2898 |
+
top: 50%;
|
2899 |
+
margin-top: -4px;
|
2900 |
}
|
2901 |
|
2902 |
+
.n2-ss-layer .ui-spacing-handle.ui-spacing-w {
|
2903 |
+
min-width: 5px;
|
2904 |
+
cursor: e-resize;
|
|
|
|
|
|
|
|
|
|
|
|
|
2905 |
}
|
2906 |
|
2907 |
+
.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-w {
|
2908 |
+
top: 25%;
|
2909 |
+
margin-top: 0;
|
2910 |
+
left: 0;
|
2911 |
+
height: 50%;
|
|
|
2912 |
}
|
2913 |
|
2914 |
+
.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-w {
|
2915 |
+
left: auto;
|
2916 |
+
right: 100%;
|
2917 |
+
top: 0;
|
2918 |
+
height: 100%;
|
2919 |
}
|
2920 |
|
2921 |
+
.n2-ss-layer .ui-resizable-ne {
|
2922 |
+
right: -4px;
|
2923 |
+
top: -4px;
|
2924 |
}
|
2925 |
|
2926 |
+
.n2-ss-layer .ui-resizable-se {
|
2927 |
+
right: -4px;
|
2928 |
+
bottom: -4px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2929 |
}
|
2930 |
|
2931 |
+
.n2-ss-layer .ui-resizable-sw {
|
2932 |
+
left: -4px;
|
2933 |
+
bottom: -4px;
|
2934 |
}
|
2935 |
|
2936 |
+
.n2-ss-layer .ui-resizable-nw {
|
2937 |
+
left: -4px;
|
2938 |
+
top: -4px;
|
2939 |
}
|
2940 |
|
2941 |
+
.n2-ss-layer .n2-ss-layer-cc {
|
2942 |
+
left: 50%;
|
2943 |
+
top: 50%;
|
2944 |
+
margin-top: -4px;
|
2945 |
+
margin-left: -4px;
|
2946 |
}
|
2947 |
|
2948 |
+
.n2-ss-layer.n2-active:HOVER {
|
2949 |
+
box-shadow: inset 0px 0px 0px 1px RGBA(12, 146, 223, 1);
|
2950 |
}
|
2951 |
|
2952 |
+
.n2-ss-resize-layer .n2-ss-layer.n2-active > .ui-resizable-handle,
|
2953 |
+
.n2-ss-layer.n2-active:HOVER > .ui-resizable-handle,
|
2954 |
+
.n2-ss-resize-layer .n2-ss-layer.n2-active > .ui-customresizable-handle,
|
2955 |
+
.n2-ss-layer.n2-active:HOVER > .ui-customresizable-handle,
|
2956 |
+
.n2-ss-resize-layer .n2-ss-layer.n2-active > .n2-ss-layer-row > .ui-column-width-handle,
|
2957 |
+
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .ui-column-width-handle,
|
2958 |
+
.n2-ss-resize-layer .n2-ss-layer.n2-active > .n2-ss-layer-row > .ui-spacing-handle,
|
2959 |
+
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .ui-spacing-handle,
|
2960 |
+
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-cc,
|
2961 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .ui-resizable-handle,
|
2962 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .ui-customresizable-handle,
|
2963 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .n2-ss-layer-cc {
|
2964 |
+
display: block !important;
|
2965 |
}
|
2966 |
|
2967 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .ui-spacing-handle {
|
2968 |
+
display: none !important;
|
|
|
2969 |
}
|
2970 |
|
2971 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .ui-spacing-handle,
|
2972 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .ui-spacing-handle,
|
2973 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-content > .ui-spacing-handle {
|
2974 |
+
display: block !important;
|
2975 |
}
|
2976 |
|
2977 |
+
.ui-spacing-resizing > .ui-spacing-handle,
|
2978 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing > .ui-spacing-handle,
|
2979 |
+
.ui-resizable-resizing > .ui-spacing-handle,
|
2980 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-resizable-resizing > div > .ui-spacing-handle,
|
2981 |
+
.ui-resizable-resizing > .ui-spacing-handle,
|
2982 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-resizable-resizing > div > .ui-spacing-handle {
|
2983 |
+
display: block !important;
|
2984 |
}
|
2985 |
|
2986 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing > .ui-spacing-handle.ui-spacing-under-spacing {
|
2987 |
+
opacity: 1;
|
2988 |
}
|
2989 |
|
2990 |
+
#n2-ss-0 .ui-spacing-resizing .ui-column-width-handle,
|
2991 |
+
#n2-ss-0 .n2-ss-layer-row.n2-ss-row-wrapped .ui-column-width-handle {
|
2992 |
+
display: none !important;
|
2993 |
}
|
2994 |
|
2995 |
+
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-resizable-handle,
|
2996 |
+
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-customresizable-handle,
|
2997 |
+
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,
|
2998 |
+
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-resizable-handle,
|
2999 |
+
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,
|
3000 |
+
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc {
|
3001 |
+
display: none !important;
|
3002 |
}
|
3003 |
|
3004 |
+
/* Make overflow visible on active layer */
|
3005 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active {
|
3006 |
+
overflow: visible !important;
|
3007 |
}
|
3008 |
|
3009 |
+
.n2-ss-item {
|
3010 |
+
position: relative;
|
3011 |
+
float: left;
|
3012 |
+
width: 100%;
|
3013 |
}
|
3014 |
|
3015 |
+
.n2-ss-item-video,
|
3016 |
+
.n2-ss-item-youtube,
|
3017 |
+
.n2-ss-item-vimeo,
|
3018 |
+
.n2-ss-item-area,
|
3019 |
+
.n2-ss-item-imagearea {
|
3020 |
+
height: 100%;
|
3021 |
}
|
3022 |
|
3023 |
+
[data-placement="absolute"] [data-placement]:not([data-placement="absolute"]):not([data-placement="all"]),
|
3024 |
+
[data-placement="content"] [data-placement]:not([data-placement="content"]):not([data-placement="all"]),
|
3025 |
+
[data-placement="normal"] [data-placement]:not([data-placement="normal"]):not([data-placement="all"]),
|
3026 |
+
[data-placement="default"] [data-placement]:not([data-placement="default"]):not([data-placement="all"]),
|
3027 |
+
[data-placement="group"] [data-placement]:not([data-placement="group"]):not([data-placement="all"]),
|
3028 |
+
[data-placement=""] [data-placement] {
|
3029 |
+
display: none !important;
|
3030 |
}
|
3031 |
|
3032 |
+
.n2-ss-editor-layer-mode-only,
|
3033 |
+
.n2-ss-editor-group-mode-only {
|
3034 |
+
display: none !important;
|
3035 |
}
|
3036 |
|
3037 |
+
.n2-ss-has-layers[data-component="layer"] .n2-ss-editor-layer-mode-only,
|
3038 |
+
.n2-ss-has-layers[data-component="group"] .n2-ss-editor-group-mode-only {
|
3039 |
+
display: inline-block !important;
|
|
|
3040 |
}
|
3041 |
|
3042 |
+
div#n2-ss-0 .n2-ss-layer-chain-parent {
|
3043 |
+
position: absolute;
|
3044 |
+
z-index: 10;
|
3045 |
+
right: 10px;
|
3046 |
+
top: 10px;
|
3047 |
+
line-height: 18px;
|
3048 |
+
font-size: 12px;
|
3049 |
+
width: 18px;
|
3050 |
+
display: none;
|
3051 |
}
|
3052 |
|
3053 |
+
.n2-ss-layer-edit-visible .n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent .n2-ss-layer-chain-parent,
|
3054 |
+
.n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent:HOVER .n2-ss-layer-chain-parent {
|
3055 |
+
display: inline-block;
|
3056 |
}
|
3057 |
|
3058 |
+
.n2-ss-layer-highlight {
|
3059 |
+
position: absolute;
|
3060 |
+
background: #0c92df;
|
3061 |
+
z-index: 91;
|
3062 |
+
opacity: 1;
|
3063 |
}
|
3064 |
|
3065 |
+
.n2-ss-layer-highlight-n {
|
3066 |
+
top: 0;
|
3067 |
+
left: 0;
|
3068 |
+
width: 100%;
|
3069 |
+
height: 1px;
|
3070 |
}
|
3071 |
|
3072 |
+
.n2-ss-layer-highlight-e {
|
3073 |
+
top: 0;
|
3074 |
+
right: 0;
|
3075 |
+
width: 1px;
|
3076 |
+
height: 100%;
|
3077 |
}
|
3078 |
|
3079 |
+
.n2-ss-layer-highlight-s {
|
3080 |
+
bottom: 0;
|
3081 |
+
left: 0;
|
3082 |
+
width: 100%;
|
3083 |
+
height: 1px;
|
3084 |
}
|
3085 |
|
3086 |
+
.n2-ss-layer-highlight-w {
|
3087 |
+
top: 0;
|
3088 |
+
left: 0;
|
3089 |
+
width: 1px;
|
3090 |
+
height: 100%;
|
3091 |
+
}
|
3092 |
|
3093 |
+
#n2-ss-0 .n2-ss-layer-row .n2-ss-layer-content {
|
3094 |
+
min-height: 20px;
|
|
|
|
|
3095 |
}
|
3096 |
|
3097 |
+
[data-devicespecific] {
|
3098 |
+
position: relative;
|
3099 |
}
|
3100 |
|
3101 |
+
#n2-ss-devicespecific-settings {
|
|
|
|
|
|
|
|
|
|
|
3102 |
position: absolute;
|
3103 |
+
bottom: 40px;
|
3104 |
left: 0;
|
3105 |
+
padding: 0 10px;
|
|
|
3106 |
white-space: nowrap;
|
3107 |
+
z-index: 2;
|
3108 |
}
|
3109 |
|
3110 |
+
#n2-ss-devicespecific-settings * {
|
3111 |
+
cursor: pointer;
|
3112 |
+
background: #a1aeb5;
|
3113 |
+
display: inline-block;
|
3114 |
+
width: 20px;
|
3115 |
+
height: 20px;
|
3116 |
+
line-height: 20px;
|
3117 |
+
text-align: center;
|
3118 |
+
font-size: 16px;
|
3119 |
+
color: #fff;
|
3120 |
+
border-left: 1px solid #5b6874;
|
3121 |
}
|
3122 |
|
3123 |
+
#n2-ss-devicespecific-settings > :first-child {
|
3124 |
+
border-top-left-radius: 3px;
|
3125 |
+
border-bottom-left-radius: 3px;
|
3126 |
+
border-left: 0;
|
3127 |
}
|
3128 |
|
3129 |
+
#n2-ss-devicespecific-settings > :last-child {
|
3130 |
+
border-top-right-radius: 3px;
|
3131 |
+
border-bottom-right-radius: 3px;
|
|
|
|
|
|
|
|
|
|
|
3132 |
}
|
3133 |
|
3134 |
+
.n2-ss-mode-desktopPortrait #n2-ss-devicespecific-settings .n2-i-mini-desktop-portrait,
|
3135 |
+
.n2-ss-mode-desktopLandscape #n2-ss-devicespecific-settings .n2-i-mini-desktop-landscape,
|
3136 |
+
.n2-ss-mode-tabletPortrait #n2-ss-devicespecific-settings .n2-i-mini-tablet-portrait,
|
3137 |
+
.n2-ss-mode-tabletLandscape #n2-ss-devicespecific-settings .n2-i-mini-tablet-landscape,
|
3138 |
+
.n2-ss-mode-mobilePortrait #n2-ss-devicespecific-settings .n2-i-mini-mobile-portrait,
|
3139 |
+
.n2-ss-mode-mobileLandscape #n2-ss-devicespecific-settings .n2-i-mini-mobile-landscape {
|
3140 |
+
background: #0c92df;
|
3141 |
+
border-color: #0b7dbe;
|
3142 |
}
|
3143 |
|
3144 |
+
.n2-ss-layer[data-type="col"] > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self {
|
3145 |
+
cursor: move;
|
|
|
3146 |
}
|
3147 |
|
3148 |
+
.n2-highlight-structure .n2-ss-layer[data-type="col"] {
|
3149 |
+
box-shadow: 0 0 0px 2px #0c92df;
|
3150 |
}
|
3151 |
+
|
3152 |
+
.n2-ss-layer-under-creation {
|
3153 |
+
visibility: hidden !important;
|
|
|
3154 |
}
|
3155 |
|
3156 |
+
[data-editormode="canvas"] div#n2-ss-0 .n2-ss-layer[data-type="content"].n2-ss-content-empty {
|
3157 |
+
display: none;
|
|
|
|
|
|
|
|
|
3158 |
}
|
3159 |
|
3160 |
+
[data-editormode="content"] div#n2-ss-0 .n2-ss-layer[data-type="content"].n2-ss-content-empty {
|
3161 |
+
height: 100%;
|
3162 |
}
|
3163 |
|
3164 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layers-container > .n2-ss-layer > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-up {
|
3165 |
display: none;
|
3166 |
+
}
|
3167 |
|
3168 |
+
div#n2-ss-0 .n2-ss-layer-content .n2-ss-layer.n2-active:HOVER {
|
3169 |
+
z-index: 10;
|
3170 |
}
|
3171 |
|
3172 |
+
#n2-ss-editor-mode .n2-i {
|
3173 |
+
font-size: 16px;
|
3174 |
+
vertical-align: middle;
|
3175 |
}
|
3176 |
|
3177 |
+
.n2-context-menu {
|
3178 |
+
display: none;
|
3179 |
+
position: absolute;
|
3180 |
+
left: 0;
|
3181 |
+
top: 0;
|
3182 |
+
font-family: "Montserrat", Arial, sans-serif;
|
3183 |
+
font-size: 13px;
|
3184 |
+
background-color: #202934;
|
3185 |
+
color: #cedae2;
|
3186 |
+
z-index: 1000000;
|
3187 |
+
border-radius: 3px;
|
3188 |
+
line-height: 25px;
|
3189 |
}
|
3190 |
|
3191 |
+
.n2-context-menu.n2-active {
|
3192 |
+
display: block;
|
|
|
|
|
|
|
3193 |
}
|
3194 |
|
3195 |
+
.n2-context-menu > div {
|
3196 |
+
padding: 3px 10px;
|
3197 |
+
cursor: pointer;
|
3198 |
}
|
3199 |
|
3200 |
+
.n2-context-menu > div:HOVER {
|
3201 |
+
background-color: RGBA(255, 255, 255, 0.2);
|
3202 |
}
|
3203 |
|
3204 |
+
.n2-context-menu > div * {
|
3205 |
+
margin: 0 3px;
|
3206 |
+
vertical-align: middle;
|
3207 |
}
|
3208 |
|
3209 |
+
.n2-context-menu > div .n2-i {
|
3210 |
+
font-size: 16px;
|
|
|
|
|
|
|
3211 |
}
|
3212 |
|
3213 |
+
#n2-ss32-content-mode-tutorial {
|
3214 |
+
background-color: #212d3a;
|
3215 |
+
margin: 0 -1px;
|
3216 |
+
z-index: 2;
|
3217 |
+
position: relative;
|
3218 |
+
color: #fff;
|
3219 |
}
|
3220 |
|
3221 |
+
#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container {
|
3222 |
+
display: flex;
|
3223 |
+
align-items: center;
|
3224 |
+
max-width: 960px;
|
3225 |
}
|
3226 |
|
3227 |
+
#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container > div {
|
3228 |
+
margin: 20px;
|
3229 |
}
|
3230 |
|
3231 |
+
#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container a + a {
|
3232 |
+
margin: 0 20px;
|
|
|
|
|
|
|
3233 |
}
|
3234 |
|
3235 |
+
#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container p {
|
3236 |
+
color: #b2bfc9;
|
3237 |
+
font-size: 14px;
|
3238 |
+
margin: 20px 0;
|
3239 |
}
|
3240 |
|
3241 |
+
.n2-ss-section-outer {
|
3242 |
+
min-height: 10px;
|
|
|
|
|
|
|
3243 |
}
|
3244 |
|
3245 |
+
[data-visibility="hidden"],
|
3246 |
+
[data-visibility="hidden"] * {
|
3247 |
+
visibility: hidden !important;
|
3248 |
}
|
3249 |
|
3250 |
+
div div#n2-ss-0 .n2-ss-static-slide .n2-ss-section-outer,
|
3251 |
+
div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"],
|
3252 |
+
div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-main-content {
|
3253 |
+
visibility: visible;
|
3254 |
+
}
|
3255 |
+
.n2-ss-sample-slides-container {
|
3256 |
+
display: none;
|
3257 |
}
|
3258 |
|
3259 |
+
.n2-ss-add-slide-with-sample .n2-main-top-bar {
|
3260 |
+
display: none;
|
3261 |
}
|
3262 |
|
3263 |
+
.n2-ss-add-slide-with-sample .n2-ss-sample-slides-container {
|
3264 |
+
display: block;
|
|
|
|
|
|
|
3265 |
}
|
3266 |
|
3267 |
+
.n2-ss-add-slide-with-sample .n2-ss-edit-slide-top {
|
3268 |
+
display: none;
|
|
|
|
|
|
|
3269 |
}
|
3270 |
|
3271 |
+
.n2-ss-add-slide-with-sample #smartslider-form {
|
3272 |
+
display: none;
|
|
|
|
|
3273 |
}
|
3274 |
|
3275 |
+
.n2-ss-add-slide-with-sample #n2-ss-devices {
|
3276 |
+
display: none;
|
|
|
3277 |
}
|
3278 |
|
3279 |
+
.n2-ss-add-slide-with-sample #n2-ss-toolbar {
|
3280 |
+
display: none;
|
3281 |
}
|
3282 |
|
3283 |
+
.n2-ss-add-slide-with-sample #n2-ss-add-sidebar {
|
3284 |
+
top: 0;
|
3285 |
}
|
3286 |
|
3287 |
+
.n2-ss-add-slide-with-sample #n2-ss-slide-canvas-container-inner {
|
3288 |
+
border-top: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3289 |
}
|
3290 |
|
3291 |
+
.n2-ss-sample-slides-container {
|
3292 |
+
position: relative;
|
3293 |
+
margin: 0 -1px -1px;
|
3294 |
+
background-color: #202934;
|
3295 |
+
z-index: 2;
|
3296 |
}
|
3297 |
|
3298 |
+
.n2-ss-sample-slides-container iframe {
|
3299 |
+
width: 100%;
|
3300 |
+
height: 240px;
|
3301 |
+
border: 0;
|
3302 |
}
|
3303 |
|
3304 |
+
.n2-ss-sample-slide-settings {
|
3305 |
+
padding: 20px;
|
3306 |
+
background: #212d3a;
|
3307 |
+
height: 68px;
|
3308 |
+
display: flex;
|
3309 |
}
|
3310 |
|
3311 |
+
.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col {
|
3312 |
+
flex: 0 0 auto;
|
3313 |
+
margin: 0 10px;
|
3314 |
+
display: flex;
|
3315 |
+
flex-direction: column;
|
3316 |
+
justify-content: space-around;
|
3317 |
}
|
3318 |
|
3319 |
+
.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting {
|
3320 |
+
flex: 0 0 auto;
|
3321 |
+
display: flex;
|
3322 |
+
align-items: center;
|
3323 |
}
|
3324 |
|
3325 |
+
.n2-ss-sample-slide-setting-label {
|
3326 |
+
color: #b2bfc9;
|
3327 |
+
font-size: 10px;
|
3328 |
+
text-transform: uppercase;
|
3329 |
+
padding-right: 20px;
|
3330 |
}
|
3331 |
|
3332 |
+
#n2-ss-sample-slide-setting-background-image {
|
3333 |
+
position: relative;
|
3334 |
+
width: 100px;
|
3335 |
+
height: 68px;
|
3336 |
+
background-size: cover;
|
3337 |
+
border-radius: 5px;
|
3338 |
+
overflow: hidden;
|
3339 |
+
cursor: pointer;
|
3340 |
}
|
3341 |
|
3342 |
+
#n2-ss-sample-slide-setting-background-image .n2-i-close {
|
3343 |
+
position: absolute;
|
3344 |
+
right: 0;
|
3345 |
+
top: 0;
|
3346 |
display: block;
|
3347 |
+
width: 16px;
|
3348 |
+
height: 16px;
|
3349 |
+
border-bottom-left-radius: 5px;
|
3350 |
+
background-color: #526377;
|
3351 |
+
color: #fff;
|
3352 |
+
font-size: 14px;
|
3353 |
+
text-align: center;
|
3354 |
+
line-height: 16px;
|
3355 |
+
cursor: pointer;
|
3356 |
}
|
3357 |
|
3358 |
+
#n2-ss-sample-slide-setting-opacity-slider {
|
|
|
3359 |
}
|
3360 |
|
3361 |
+
.n2-ss-sample-slide-setting-field {
|
3362 |
+
margin-left: auto;
|
|
|
|
|
|
|
3363 |
}
|
3364 |
|
3365 |
+
.n2-ss-sample-slide-setting-field .ui-slider {
|
3366 |
+
width: 100px;
|
3367 |
+
position: relative;
|
3368 |
+
background: #374d64;
|
3369 |
+
height: 6px;
|
3370 |
+
margin: 10px 10px;
|
3371 |
+
border-radius: 10px;
|
3372 |
}
|
3373 |
|
3374 |
+
.n2-ss-sample-slide-setting-field .ui-slider .ui-slider-handle {
|
3375 |
+
position: absolute;
|
3376 |
+
top: 0;
|
3377 |
+
z-index: 2;
|
3378 |
+
width: 14px;
|
3379 |
+
height: 14px;
|
3380 |
+
cursor: default;
|
3381 |
+
-ms-touch-action: none;
|
3382 |
+
touch-action: none;
|
3383 |
+
background: #fff;
|
3384 |
+
margin: -4px -7px 0;
|
3385 |
+
border-radius: 50px;
|
3386 |
+
cursor: ew-resize;
|
3387 |
}
|
3388 |
|
3389 |
+
.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific {
|
3390 |
+
display: none;
|
3391 |
}
|
3392 |
|
3393 |
+
.n2-ss-sample-slide-settings.n2-ss-has-image .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific {
|
3394 |
+
display: flex;
|
|
|
3395 |
}
|
3396 |
|
3397 |
+
.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific {
|
3398 |
+
display: none;
|
3399 |
}
|
3400 |
|
3401 |
+
.n2-ss-sample-slide-settings.n2-ss-has-gradient .n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific {
|
3402 |
+
display: flex;
|
3403 |
}
|
3404 |
|
3405 |
.n2-ss-scrollbar-wrapper {
|
3462 |
top: 9px;
|
3463 |
color: #6b7986;
|
3464 |
font-size: 16px;
|
|
|
3465 |
}
|
3466 |
|
3467 |
#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-minus {
|
3695 |
background: #0c92df;
|
3696 |
}
|
3697 |
|
3698 |
+
#n2-ss-toolbar #n2-ss-layer-parent-linker.n2-under-pick,
|
3699 |
.n2-ss-layer-picker.n2-under-pick {
|
3700 |
background-color: #51b82d;
|
3701 |
}
|
3733 |
background: RGBA(0, 52, 63, 0.9);
|
3734 |
}
|
3735 |
|
3736 |
+
#n2-ss-toolbar #n2-ss-layer-parent-linker {
|
3737 |
display: none;
|
3738 |
}
|
3739 |
|
3740 |
+
.n2-ss-has-layers .n2-ss-mode-desktopPortrait #n2-ss-toolbar #n2-ss-layer-parent-linker {
|
3741 |
display: inline-block;
|
3742 |
+
}
|
3743 |
+
|
3744 |
+
.n2-ss-layer.n2-ss-picking-on-layer {
|
3745 |
+
z-index: 1000000 !important;
|
3746 |
}
|
3747 |
|
3748 |
.n2-ruler-container {
|
3902 |
|
3903 |
.n2-ruler-horizontal .n2-ruler-guide {
|
3904 |
width: 0px;
|
3905 |
+
height: 3000px;
|
3906 |
}
|
3907 |
|
3908 |
.n2-ss-lock-guides .n2-ruler-horizontal .n2-ruler-guide {
|
library/media/admin/dist/smartslider-backend.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#html-body header,.adminhtml-smartslider3-index #footer,.adminhtml-smartslider3-index .footer,.smartslider3-index-index footer{display:none}#html-body #anchor-content{padding-top:30px}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.n2-definition-list dt.n2-ss-slider-ordering{color:#fff;background-color:#212d3a;border:0}.n2-definition-list dt.n2-ss-slider-ordering>div{padding:0 30px}.n2-definition-list .n2-ss-slider-ordering .n2-button{min-width:28px;line-height:28px;height:28px;margin-left:10px;background-color:#54667b;color:#fff}.n2-definition-list .n2-ss-slider-ordering .n2-button.n2-active{background:#0c92df}.n2-definition-list dt.n2-ss-slider-ordering .n2-actions{background-color:#212d3a;padding-top:16px}.n2-definition-list .n2-ss-slider-ordering>.n2-actions a{display:inline-block;padding:0}.n2-definition-list .n2-ss-slider-ordering>.n2-actions .n2-i{vertical-align:top}.n2-ss-slide2-list li .n2-actions .n2-i-delete,.n2-ss-slide2-list li .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li .n2-actions .n2-i-star{visibility:hidden}.n2-ss-slide2-list li .n2-actions .n2-i-star.n2-active,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-delete,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-star{visibility:visible}.n2-lightbox-sidebar-list{overflow-y:auto}#n2-tab-widgets{border-bottom:0;margin-bottom:1000px}.n2-i-edit.n2-active{color:#0c92df}.n2-ss-live-preview span{text-decoration:line-through;vertical-align:middle}.n2-ss-live-preview .n2-button,.n2-widget-area{vertical-align:middle;margin:0 20px}.n2-ss-live-preview.n2-active span{text-decoration:none}.n2-ss-live-preview.n2-active .n2-button{display:none}.n2-widget-area{display:inline-block;width:80px;height:80px;position:relative;margin:0 10px}.n2-form .n2-widget-area{margin-bottom:10px}.n2-widget-area-inner{position:absolute;top:14px;left:14px;width:46px;height:46px;border:3px solid #bbc3cc;border-radius:3px}.n2-widget-area .n2-area{position:absolute;background-color:#a1aeb5;border-radius:2px;cursor:pointer;width:10px;height:10px;left:0;top:0}.n2-widget-area .n2-area.n2-active{background-color:#0c92df;cursor:default}.n2-widget-area .n2-area-1{left:35px}.n2-widget-area .n2-area-2{left:21px;top:21px}.n2-widget-area .n2-area-3{left:35px;top:21px}.n2-widget-area .n2-area-4{left:49px;top:21px}.n2-widget-area .n2-area-5{top:35px}.n2-widget-area .n2-area-6{left:21px;top:35px}.n2-widget-area .n2-area-7{left:49px;top:35px}.n2-widget-area .n2-area-8{left:70px;top:35px}.n2-widget-area .n2-area-9{left:21px;top:49px}.n2-widget-area .n2-area-10{left:35px;top:49px}.n2-widget-area .n2-area-11{left:49px;top:49px}.n2-widget-area .n2-area-12{left:35px;top:70px}.n2-ss-slider-publish{border-collapse:collapse;overflow:hidden}.n2-ss-slider-publish .n2-td{text-align:center;border-right:1px solid #ccd1d6;color:#6b7989;padding:48px 0 0}.n2-ss-slider-publish .n2-td .n2-h2 a{color:#6b7989}.n2-ss-slider-publish .n2-td.n2-last{border-right:0}.n2-ss-slider-publish div.n2-h2{line-height:30px;font-size:18px}.n2-ss-slider-publish div.n2-h4{line-height:26px}.n2-ss-slider-publish .n2-code{display:inline-block;padding:16px 30px;line-height:20px;border-radius:3px;background-color:#f5e293;text-align:left;margin:17px 0;color:#6f653f;font-size:12px;border:0}.n2-ss-slider-publish img{margin-top:17px;margin-bottom:-10px}.n2-ss-generator-modal .n2-modal-content h3{text-align:left}.n2-generator-records td div{max-height:100px;overflow:hidden;padding:10px;margin:-10px}.n2-generator-records td:HOVER div{overflow-y:auto;overflow-x:visible}#n2-admin[data-slider-type=block] .n2-fm-arrow,#n2-admin[data-slider-type=block] .n2-fm-autoplay,#n2-admin[data-slider-type=block] .n2-fm-bar,#n2-admin[data-slider-type=block] .n2-fm-bullet,#n2-admin[data-slider-type=block] .n2-fm-indicator,#n2-admin[data-slider-type=block] .n2-fm-slides,#n2-admin[data-slider-type=block] .n2-fm-thumbnail{display:none}.n2-ss-container-device{position:relative;background-color:#fff;border:1px solid #ccd1d6;border-width:0 1px;margin:40px auto 0}.n2-modal.n2-ss-go-pro .n2-modal-window{text-align:center;line-height:2}.n2-modal.n2-ss-go-pro .n2-ss-rate{margin:50px -20px 0;background:url(../images/free/rate.png);height:90px;line-height:90px;color:#fff}.n2-modal.n2-ss-go-pro .n2-ss-rate .n2-h3{display:inline-block;margin-right:30px}.n2-modal.n2-ss-go-pro .n2-modal-controls{margin-bottom:40px}.n2-ss-create-slider-free-sample{float:left;height:70px;width:170px;cursor:pointer}.n2-ss-create-slider-free-sample:HOVER{background-position:0 -80px}.n2-ss-modal-subscribe>.n2-modal-window{text-align:center}.n2-ss-modal-subscribe .n2-form{margin:0 -20px}.n2-ss-modal-subscribe .n2-h3{margin:0 auto;width:95%;text-align:center;line-height:2}.n2-ss-preview-subscribe .n2-input-button{display:inline-block}.n2-input-button,.n2-ss-modal-subscribe .n2-input-button{display:inline-block;margin-top:20px}.n2-input-button>*,.n2-ss-modal-subscribe .n2-input-button>*,.n2-ss-preview-subscribe .n2-input-button>*{display:inline-block;white-space:nowrap}.n2-input-button input,.n2-input-button input:focus,.n2-ss-modal-subscribe input,.n2-ss-modal-subscribe input:focus,.n2-ss-preview-subscribe input,.n2-ss-preview-subscribe input:focus{margin:0 auto;width:250px;height:36px;border:2px solid #b9c3c9;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px;overflow:hidden;padding:0 10px;line-height:36px;box-shadow:none;color:#7b8898;font-size:12px;background:#fff}.n2-input-button .n2-button,.n2-ss-modal-subscribe .n2-input-button .n2-button,.n2-ss-preview-subscribe .n2-input-button .n2-button{border-top-left-radius:0;border-bottom-left-radius:0}.n2-ss-preview-subscribe{position:fixed;left:50%;margin-left:-500px;bottom:-100px;transition:bottom .5s ease;background:url(../images/free/subscribepreview.png);width:1000px;height:90px;z-index:1000}.n2-ss-preview-subscribe.n2-active{bottom:10px}.n2-ss-preview-subscribe-close{position:absolute;top:-12px;right:-12px;width:24px;height:24px;cursor:pointer;background:url(../images/free/close.png) no-repeat center center}.n2-ss-preview-subscribe .n2-input-button{position:absolute;right:20px;top:0;margin-top:28px}.n2-ss-slider-edit>.n2-form>.n2-form-tab{margin:20px 0 0;border-radius:0;border:0}.n2-ss-slider-edit>.n2-form>.n2-form-tab .n2-form-matrix-views{border-radius:0}.n2-box-add-license.n2-ss-license-has-active-key,.n2-box-license-activated.n2-ss-license-no-active-key{display:none}#n2-ss-slider-container,#n2-ss-slides{position:relative;padding:25px}.n2-ss-sliders .n2-box-new-slider>a:before{content:"\e952"}.n2-ss-sliders .n2-box-template-library>a:before{content:"\e951"}.n2-box-up-group>a:before{content:"\e958"}.n2-box-insert-group>a:before{content:"\e959"}.n2-ss-sliders-header>*{margin:0 10px}html[data-sliders='0'] .n2-ss-sliders-header{visibility:hidden}.n2-ss-box-slider{cursor:pointer}#n2-ss-slider-container[data-groupid="0"] .n2-ss-remove-from-group,.n2-ss-box-slider-group .n2-ss-add-to-group,.n2-ss-box-slider-group .n2-ss-remove-from-group,.n2-ss-slider-over-group .n2-box-sortable-placeholder,html[data-slides='0'] .n2-ss-slider-edit{display:none}.n2-ss-slides-outer-container{display:block}.n2-modal-window .n2-ss-slides-outer-container{height:100%;overflow:auto}.n2-ss-slides-container{position:relative;margin:0 -10px}.n2-slide-first.n2-i{line-height:16px}.n2-slide-first.n2-i,.n2-slide-published{font-size:16px;padding:3px}.n2-i-unpublished{color:#c54633}.n2-slide-state-published .n2-i-unpublished{color:#6fbc49}.n2-slide-state-published .n2-i-unpublished:before{content:"\e60c"}.n2-box.n2-first-slide:HOVER .n2-slide-first,.n2-slide-first,.n2-slide-is-first{display:none}.n2-first-slide .n2-slide-is-first{display:inline-block}.n2-slide-duplicate{margin-right:5px}.n2-slide-delete,.n2-slide-duplicate,.n2-slide-selected{padding:0;width:24px}#n2-ss-slides .n2-box.n2-ss-slide-active{box-shadow:0 0 0 3px #0c92df}#n2-ss-slides .n2-box-slide-dummy{background:#e9edf0;border:2px dashed #b2bfc9;box-sizing:border-box;background-image:url(../images/dummy-slide.png);background-repeat:no-repeat;background-position:center 36px;color:#7b8898;font-size:14px;text-align:center;line-height:200px}#n2-ss-slides .n2-box-slide-drag-images{background:url(../images/drag.png) no-repeat center 4px;text-align:center;color:#7b8898;box-sizing:border-box;padding:90px 60px 0;line-height:12px}html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-dummy{display:none}.n2-ss-slides-control{position:relative;padding:22px 10px;border-bottom:1px solid RGBA(0,0,0,.3)}.n2-ss-slides-control .n2-button{margin:0 10px}.n2-slides-add{vertical-align:bottom;margin:-2px}#n2-ss-slides .n2-box-slide-drag-upload{display:none;position:absolute;z-index:101;left:0;top:0;width:100%;height:100%;background-color:rgba(32,41,52,.9);border:0;right:0;bottom:0;margin:0;vertical-align:bottom;line-height:130px;text-align:center;color:#fff}#n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload{display:block}.n2-box-slide .n2-button.n2-sidebar-list-bg:HOVER{background-color:#0c92df}.n2-ss-quick-slides-edit-modal .n2-modal-content table{border-spacing:10px;border-collapse:separate;margin:10px auto}.n2-ss-quick-slides-edit-modal .n2-modal-content table td{padding:0}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label{margin-top:0;margin-bottom:3px}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label label{font-size:11px}.n2-slide-state-first .n2-ss-setFirst,.n2-slide-state-published .n2-ss-publish,.n2-ss-generator,.n2-ss-unpublish{display:none}.n2-slide-state-has-generator .n2-ss-generator,.n2-slide-state-published .n2-ss-unpublish{display:block}.n2-box-slide .n2-i-star{display:none}.n2-box-slide.n2-slide-state-first .n2-i-star{display:inline;color:#e19f21;font-size:16px}#n2-ss-slides .n2-box:HOVER img{opacity:.1}.n2-ss-slides-header{position:relative;z-index:9;color:#6b7989;margin-top:-10px;visibility:hidden}.n2-ss-has-box-selection .n2-ss-slides-header{visibility:visible}.n2-ss-slides-header .n2-button-menu-open .n2-button-menu{right:-90px}#n2-ss-slides .n2-box-slide-add{display:inline-block;color:#b2bfc9;background:0 0;text-align:center;z-index:5}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image{width:100%;height:135px;padding:0}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image:before{display:block;font-family:'Nextend'!important;font-size:48px;line-height:68px;content:"\e91c";margin-top:20px}#n2-ss-slides .n2-box-slide-add .n2-button-menu-open{position:absolute;right:5px;top:5px;width:28px;height:28px;line-height:28px;background:#3e9021;border-radius:3px;cursor:pointer}#n2-ss-slides .n2-box-slide-add .n2-button-menu-open .n2-i:before{content:"\e911";color:#fff;font-size:16px;line-height:28px}.n2-add-quick-image{width:123px}.n2-button-menu-inner .n2-add-quick-image{width:auto}.n2-ss-slides-header>*{vertical-align:middle;display:inline-block}.n2-ss-slides-header .n2-h5,.n2-ss-slides-header .n2-h5 a{margin-right:10px;color:#6b7986}.n2-ss-slides-header .n2-h5 .n2-i{font-size:16px}.n2-top-bar-menu .n2-ss-back-dashboard:before{content:"\e94a"}.n2-top-bar-menu .n2-ss-back-slider:before{content:"\e94b"}.n2-top-bar-menu .n2-ss-back-slides:before{content:"\e91a"}.n2-top-bar-menu>#n2-ss-preview:before{content:"\e92d"}.n2-ss-block-slides-notice{display:none;color:#7b8898}html:not([data-slides='0']):not([data-slides='1']) #n2-admin[data-slider-type=block] .n2-ss-block-slides-notice{display:block}html[data-slides='0'] .n2-ss-create-static-slide{display:none}.n2-ss-core-item,.n2-ss-layers-add{text-align:center}.n2-ss-core-item{display:inline-block;margin:5px;background-color:#6b7986;color:#fff;line-height:20px;cursor:pointer;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:90px;height:80px}.n2-ss-core-item div:before{font-family:'Nextend';font-size:32px;content:"\e943";display:block;line-height:32px;margin-top:20px}.n2-ss-core-item[data-item=heading] div:before{content:"\e945"}.n2-ss-core-item[data-item=text] div:before{content:"\e944"}.n2-ss-core-item[data-item=button] div:before{content:"\e942"}.n2-ss-core-item[data-item=imagearea] div:before{content:"\e950"}.n2-ss-core-item[data-item=icon] div:before{content:"\e941"}.n2-ss-core-item[data-item=input] div:before{content:"\e939"}.n2-ss-core-item[data-item=iframe] div:before{content:"\e938"}.n2-ss-core-item[data-item=area] div:before{content:"\e937"}.n2-ss-core-item[data-item=list] div:before{content:"\e93e"}.n2-ss-core-item[data-item=caption] div:before{content:"\e940"}.n2-ss-core-item[data-item=transition] div:before{content:"\e93f"}.n2-ss-core-item[data-item=youtube] div:before{content:"\e93d"}.n2-ss-core-item[data-item=vimeo] div:before{content:"\e93c"}.n2-ss-core-item[data-item=video] div:before{content:"\e93b"}.n2-ss-core-item[data-item=html] div:before{content:"\e93a"}#n2-ss-layers .sortable-placeholder{border:0;position:relative;height:0;overflow:visible;z-index:1001}#n2-ss-layers .sortable-placeholder div{position:absolute;left:0;top:-1px;width:100%;height:0;border-bottom:1px solid RGBA(254,254,254,.8);box-shadow:0 0 3px 0 RGBA(254,254,254,.8)}#n2-ss-layers .ui-sortable-helper{opacity:.5}.n2-list .n2-ss-layer-group-row{border-bottom:0}.n2-ss-layer-group-row>.n2-ss-layer-title{border-bottom:1px solid RGBA(0,0,0,.2)}.n2-list .n2-ss-layer-row.n2-active,.n2-list .n2-ss-layer-row.n2-selected{background:#1681c1}.n2-ss-layer-group-row ul.n2-list{min-height:10px}.n2-ss-layer-title{display:block;line-height:39px;position:relative;cursor:pointer;overflow:hidden}.n2-ss-layer-title span{margin:0 30px;display:block;width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-ss-layer-group-row>.n2-ss-layer-title span,.n2-ss-layer-row .n2-inline-form{margin:0 30px}.n2-ss-layer-group-row ul .n2-ss-layer-title span{margin:0 40px}.n2-ss-layer-row .n2-inline-form input{background:#3c4958 0 0;color:#b2bfc9;font-size:11px;border:2px solid #28313a;line-height:24px;padding:0 10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-ss-layer-row .n2-inline-form input:focus{box-shadow:none}.n2-ss-layer-title .n2-actions{position:absolute;top:0;right:0;padding:0 6px;cursor:default;opacity:.2}.n2-ss-layer-title:HOVER .n2-actions{opacity:1}.n2-ss-layer-title .n2-actions-left{position:absolute;top:0;left:0;padding:5px 0;cursor:default;line-height:24px}html[dir=rtl] .n2-ss-layer-title .n2-actions-left{padding:0 16px 0 0}.n2-ss-layer-row.n2-active>.n2-ss-layer-title,.n2-ss-layer-row.n2-active>.n2-ss-layer-title .n2-actions .n2-i,.n2-ss-layer-row.n2-active>.n2-ss-layer-title .n2-actions-left .n2-i,.n2-ss-layer-row.n2-selected .n2-ss-layer-title,.n2-ss-layer-row.n2-selected .n2-ss-layer-title .n2-actions .n2-i,.n2-ss-layer-row.n2-selected .n2-ss-layer-title .n2-actions-left .n2-i,.n2-ss-theme-dark .n2-ruler>span span{color:#fff}.n2-ss-layer-title .n2-actions a,.n2-ss-layer-title .n2-actions-left a{display:inline-block;padding:0}.n2-ss-animation-title .n2-actions-left i,.n2-ss-layer-title .n2-actions-left i{padding:0 2px;vertical-align:middle}.n2-ss-layer-title .n2-i-order{cursor:move}.n2-ss-animation-row{list-style:none;color:#b2bfc9}.n2-ss-animation-title{position:relative;line-height:39px;background-color:#303b47;cursor:pointer;text-transform:capitalize}.n2-ss-animation-title span{padding:0 40px}.n2-ss-animation-title .n2-actions{position:absolute;right:0;top:0;cursor:default;padding:0 6px}.n2-ss-animation-title .n2-actions a,.n2-ss-animation-title .n2-actions-left a{display:inline-block;height:100%}.n2-ss-animation-title .n2-actions-left{position:absolute;top:0;left:0;padding:0 16px;cursor:default;font-size:16px;line-height:38px}.smartslider-advanced-layer-mode-active #layersanditems li.layer-orderable.item-active.active .layerTitle{border-left:5px solid #eef3f8}#layeritemeditorpanel,#smartslider-slide-toolbox-layer .n2-sidebar-pane-sizer{visibility:hidden}#layeritemeditorpanel>.n2-form{margin-bottom:0}#layeritemeditorpanel .n2-form-element-radio .n2-radio-option{margin:5px}#layer-animation-chain-in,#layer-animation-chain-out{position:relative}#layer-animation-chain-in .sortable-placeholder,#layer-animation-chain-loop .sortable-placeholder,#layer-animation-chain-out .sortable-placeholder{background-color:#212d3a;border-bottom:1px solid #343f4c;border-width:0 0 1px}#layer-animation-chain-in .n2-td,#layer-animation-chain-loop .n2-td,#layer-animation-chain-out .n2-td{vertical-align:middle}#n2-tab-smartslider-editor{background-color:#fff;margin:-21px 0 0;border-width:1px 0 0;padding-bottom:400px;padding-bottom:40vh;position:relative}.n2-ss-theme-dark #smartslider-adjust-height,.n2-ss-theme-dark .n2-ruler-vertical{background-color:#28313a}#n2-tab-smartslider-editor .n2-heading-controls{z-index:9;padding:0;min-height:0;border:0;height:0;background:#4d5d70}.n2-ss-slider-visible #n2-tab-smartslider-editor .n2-heading-controls{height:auto}#n2-tab-smartslider-editor.n2-scroll-disable .n2-heading-controls{height:54px;border-bottom:0}.n2-ss-preview-mode .n2-main-top-bar{opacity:0}#n2-ss-control-line{position:relative;height:28px;white-space:nowrap;z-index:1000;padding:13px 10px;line-height:28px}#n2-ss-control-line>*{line-height:28px;height:28px;vertical-align:top}#n2-ss-control-line .n2-ss-tool{margin:0 5px;display:inline-block;vertical-align:top!important}#n2-ss-control-line .n2-ss-tool.n2-form-element-text{height:24px;line-height:24px;position:relative}#n2-ss-control-line .n2-text-sub-label{font-size:16px}#n2-ss-slide-canvas-settings{display:inline-block;position:relative}#n2-ss-slide-canvas-settings>.n2-button{width:28px;padding:0;text-align:center}#n2-ss-slide-canvas-settings.n2-active>.n2-button{background-color:#0c92df;border-color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel{position:absolute;left:0;top:28px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner{margin-top:6px;min-width:180px;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);background-color:#fff;border-radius:3px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner>*{display:block;line-height:32px;margin:0 10px;position:relative;text-align:left}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner a{color:#7b8898}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-panel-action{color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick{display:block;position:absolute;right:0;top:8px;border-radius:3px;border:2px solid #8793a2;width:12px;height:12px}#n2-ss-layer-show-on,#n2-ss-slide-canvas-settings.n2-active .n2-ss-settings-panel{display:inline-block}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-setting-tick{border-color:#1999e3;background-color:#1999e3}#n2-ss-slide-canvas-settings .n2-ss-settings-panel,#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick .n2-i,.n2-ss-preview-mode .n2-ss-layer.n2-highlight .ui-item-overlay{display:none}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-i{display:inline-block;color:#fff;font-size:16px;line-height:12px;margin:0 -2px}#n2-ss-control-line .n2-button-grey{background-color:#a1aeb5}#n2-ss-control-line .n2-radio-option{background-color:#a1aeb5;border-left:1px solid #8c99a1}#n2-ss-control-line .n2-radio-option.n2-first{border-left-width:0}#n2-ss-control-line .n2-radio-option.n2-active{background-color:#0c92df;border-color:#0c92df}#n2-ss-control-line .n2-radio-option.n2-sub-active{background-color:#51b82d;border-color:#51b82d}#n2-ss-control-line .n2-ss-tool.n2-button{height:28px;line-height:28px;background-color:#a1aeb5}#n2-ss-control-line .n2-ss-tool.n2-button-icon{padding:0;width:28px}#n2-ss-control-line .n2-ss-tool.n2-button.n2-active{background-color:#0c92df}#n2-ss-control-line .n2-ss-tool.n2-button.n2-sub-active{background-color:#51b82d}#n2-ss-control-line .ui-autocomplete{max-width:100%}.n2-ss-addlayer .n2-ss-available-layers{display:none;box-sizing:border-box;white-space:normal;text-align:left}#n2-ss-control-line #n2-ss-theme.n2-active,#n2-ss-layer-parent-linker,#n2-ss-theme{width:28px;height:28px;line-height:28px;padding:0;background-color:#a1aeb5}#n2-ss-theme.n2-active .n2-i:before{content:"\e64c"}.ui-item-overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.n2-ss-layer.n2-highlight .ui-item-overlay,.n2-ss-select-layer-mode .n2-ss-layer-selected .ui-item-overlay{display:block;background-color:RGBA(0,132,255,.4)}.n2-ss-item-html .ui-item-overlay,.n2-ss-item-iframe .ui-item-overlay{display:block}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-resizable-ne,.n2-ss-layer .ui-resizable-nw,.n2-ss-layer .ui-resizable-se,.n2-ss-layer .ui-resizable-sw{opacity:0}.n2-ss-layer .ui-resizable-ne:HOVER,.n2-ss-layer .ui-resizable-nw:HOVER,.n2-ss-layer .ui-resizable-se:HOVER,.n2-ss-layer .ui-resizable-sw:HOVER,.n2-ss-layer-cc:HOVER,.ui-resizable-e:HOVER,.ui-resizable-n:HOVER,.ui-resizable-s:HOVER,.ui-resizable-w:HOVER{opacity:1}.n2-ss-layer[data-align=center][data-valign=bottom] .ui-resizable-s,.n2-ss-layer[data-align=center][data-valign=middle] .n2-ss-layer-cc,.n2-ss-layer[data-align=center][data-valign=top] .ui-resizable-n,.n2-ss-layer[data-align=left][data-valign=bottom] .ui-resizable-sw,.n2-ss-layer[data-align=left][data-valign=middle] .ui-resizable-w,.n2-ss-layer[data-align=left][data-valign=top] .ui-resizable-nw,.n2-ss-layer[data-align=right][data-valign=bottom] .ui-resizable-se,.n2-ss-layer[data-align=right][data-valign=middle] .ui-resizable-e,.n2-ss-layer[data-align=right][data-valign=top] .ui-resizable-ne{background:#0c92df;opacity:1;border:1px solid #fff}.n2-ss-layer-cc{position:absolute;font-size:.1px;display:block;z-index:92}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-resizable-handle{background-image:none;border:1px solid #0c92df;height:7px;width:7px;background:#fff}.n2-ss-layer .ui-resizable-n{left:50%;top:-4px;margin-left:-4px}.n2-ss-layer .ui-resizable-e{right:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-resizable-s{bottom:-4px;left:50%;margin-left:-4px}.n2-ss-layer .ui-resizable-w{left:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-resizable-ne{right:-4px;top:-4px}.n2-ss-layer .ui-resizable-se{right:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-sw{left:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-nw{left:-4px;top:-4px}.n2-ss-layer .n2-ss-layer-cc{left:50%;top:50%;margin-top:-4px;margin-left:-4px}.n2-ss-layer-quick-panel{position:absolute;z-index:1000;width:72px;height:28px;margin:-6px 0 0 -34px;padding:5px}.n2-ss-layer-quick-panel .n2-ss-layer-quick-panel-option{display:inline-block;cursor:pointer;width:26px;height:26px;border-radius:3px;background:RGBA(43,52,63,.9);text-align:center;font-size:16px!important;line-height:26px!important;color:#fff;margin:1px;vertical-align:top}.n2-ss-layer-quick-panel .n2-ss-layer-quick-panel-option-center{width:14px;overflow:hidden}.n2-ss-layer.n2-ss-picking-on-layer{z-index:1000000!important}.n2-ss-position-display{display:none;position:absolute;border-radius:3px;z-index:10000;line-height:16px;padding:4px 6px;color:#fff;font-size:10px;background:RGBA(32,41,52,.95)}.n2-ss-position-display.n2-active{display:block}.n2-ss-layer-border{display:none;position:absolute;left:0;top:0;right:0;bottom:0;border:1px solid #0c92df;box-sizing:border-box}.n2-ss-layer-edit-visible #n2-tab-smartslider-editor:HOVER .n2-ss-layer.n2-active .n2-ss-layer-border,.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer .n2-ss-layer-border,.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer .n2-ss-layer-border,div#n2-ss-0 .n2-ss-layer:HOVER .n2-ss-layer-border{display:block}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-resizable-handle,.n2-ss-layer .ui-rotatable-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-0:HOVER .n2-ss-layer.n2-active .ui-rotatable-handle,.n2-ss-layer-edit-visible #n2-tab-smartslider-editor:HOVER .n2-ss-layer.n2-active .n2-ss-layer-cc,.n2-ss-layer-edit-visible #n2-tab-smartslider-editor:HOVER .n2-ss-layer.n2-active .ui-resizable-handle,.n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,.n2-ss-layer.n2-active:HOVER .ui-resizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active .ui-resizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active .ui-rotatable-handle{display:block!important}.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-border,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-resizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-rotatable-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-0:HOVER .n2-ss-layer.n2-active{overflow:visible!important}#n2-ss-0 .n2-ss-slide-border{display:none;position:absolute;background:#a1aeb5;width:1px;height:1px}#n2-ss-0:HOVER .n2-ss-slide-border,div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide{display:block}div#n2-ss-0:HOVER .n2-ss-static-slide{display:none}.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .n2-ss-layer-cc,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-resizable-handle,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-rotatable-handle{display:none!important}.n2-ss-layer-group-row li.n2-ss-layer-row{background:#28313a}.n2-ss-select-layer-mode-group .n2-list li.n2-ss-layer-row.n2-active.n2-selected{color:#b2bfc9}#n2-ss-0 .n2-ss-slide-border-left{left:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-right{right:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-top{left:0;top:0;width:100%}#n2-ss-0 .n2-ss-slide-border-bottom{left:0;bottom:0;width:100%}#n2-ss-0 .n2-ss-layer{cursor:not-allowed}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer{cursor:move;background:RGBA(0,0,0,0)}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked{cursor:auto}.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer{cursor:default}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-border,#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .ui-resizable-handle,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .n2-ss-layer-border,.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-preview-mode #n2-tab-smartslider-editor #n2-ss-0 .n2-ss-layer .ui-rotatable-handle{display:none!important}.n2-ss-item{position:relative;float:left;width:100%}.n2-ss-item-area,.n2-ss-item-imagearea,.n2-ss-item-video,.n2-ss-item-vimeo,.n2-ss-item-youtube{height:100%}#smartslider-slide-toolbox-layer{position:relative}#layeritemdraggable{top:0;left:0;height:10px;width:100%;background:#f04040;cursor:ns-resize}.n2-grid{background:#4affff;position:absolute;left:0;top:0;z-index:1000000;display:none}.n2-grid-h{width:100%;height:1px}.n2-grid-v{height:100%;width:1px}ul.animation-list{margin:0;padding:0 0 20px}ul.animation-list li{margin:0;padding:0;background:#eef3f8}ul.animation-list li.sortable-animation{border-bottom:1px solid #cdd1d6}.n2-ss-layer-solo-mode .n2-ss-layer{opacity:.5!important}.n2-ss-layer-solo-mode .n2-ss-layer-solo{z-index:100000000!important;opacity:1!important}.n2-panel-titlebar{position:relative;line-height:60px;height:60px;overflow:hidden;background:#202934;font-size:12px;color:#cbd6df;text-align:center}.n2-panel-titlebar-nav{position:absolute;top:0;line-height:30px;height:30px;padding:13px 11px}.n2-panel-titlebar-nav-left{left:0}.n2-panel-titlebar-nav-right{right:0}.n2-panel-titlebar-nav>*{display:inline-block;width:20px;height:30px;line-height:30px;font-size:16px;color:#fff;padding:0;vertical-align:top}.n2-panel-titlebar-nav .n2-i{vertical-align:middle}.n2-panel-titlebar-title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 60px;text-align:center}.n2-ss-panel-resizer{height:6px;width:100%;cursor:ns-resize;text-align:center;color:#95a1ab;bottom:0;background:#202934;border-bottom-left-radius:5px;border-bottom-right-radius:5px}#n2-ss-slide-sidebar .n2-ss-slide-sidebar-actions{position:absolute;top:0;left:-35px;width:32px;background-color:#202934;border-radius:3px}#n2-ss-slide-sidebar .n2-ss-slide-sidebar-actions>.n2-button{width:32px;height:32px;line-height:32px;color:#b0bdc7}#n2-ss-layer-edit-activate-row .n2-ss-layer-row{border-bottom:0}#n2-ss-layer-edit-activate-row .n2-actions-left{padding:0;margin:0}.n2-ss-has-layers.n2-ss-layer-edit-visible.n2-ss-preview-mode #n2-ss-slide-sidebar,.n2-ss-layer-edit-visible.n2-ss-move-layer #n2-ss-slide-sidebar,.n2-ss-layer-edit-visible.n2-ss-resize-layer #n2-ss-slide-sidebar,body:not(.n2-ss-has-layers) #n2-ss-slide-sidebar,body:not(.n2-ss-layer-edit-visible) #n2-ss-slide-sidebar{display:none}#n2-tabbed-slide-editor-settings .n2-tabs,.n2-ss-layers-add{position:relative;overflow-y:auto;overflow-x:hidden}.n2-sidebar{width:340px}#n2-ss-slide-sidebar{width:355px}#n2-ss-slide-sidebar table,#n2-ss-slide-sidebar tbody,#n2-ss-slide-sidebar tr{display:block}#n2-ss-slide-sidebar td{display:block;width:auto}#n2-ss-slide-sidebar .n2-label{background:#3c4958;border-top:1px solid #303b47;padding:3px 10px 0}#n2-ss-slide-sidebar .n2-empty-label{padding:0;height:4px}#n2-ss-slide-sidebar .n2-empty-group-label{padding:0;height:0}#n2-ss-slide-sidebar .n2-label label{color:#b2bfc9;font-size:10px}#n2-ss-slide-sidebar .n2-element{background:#3c4958;border-top:0;padding:0}#n2-ss-slide-sidebar textarea{max-width:290px!important;width:290px!important}#n2-ss-slide-sidebar .n2-form-element-button{max-width:38px;overflow:hidden}#n2-ss-slide-sidebar .n2-sidebar-row{line-height:34px;background:#28313a}#n2-ss-slide-sidebar .n2-list li,#n2-ss-slide-sidebar .n2-sidebar-row{border-bottom:1px solid RGBA(0,0,0,.2)}#n2-ss-slide-sidebar .n2-button-m{height:24px;line-height:24px}#n2-ss-slide-sidebar .n2-sidebar-tab-switcher{border:0;border-collapse:separate}#n2-ss-slide-sidebar .n2-sidebar-tab-switcher .n2-td{font-size:11px;line-height:47px;height:47px;border:1px solid #1a2028;border-left:0;color:#b2bfc9}#n2-ss-slide-sidebar .n2-sidebar-tab-switcher .n2-td .n2-i{font-size:32px;line-height:47px}#n2-ss-slide-sidebar .n2-sidebar-tab-switcher .n2-td.n2-active{background:#0c92df;color:#fff}#n2-ss-slide-sidebar .n2-has-underline>.n2-underline::after,#n2-ss-slide-sidebar .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:none}#n2-ss-slide-sidebar.n2-ss-has-design-option .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:table-cell}.n2-sidebar-hidden .n2-panel-titlebar{line-height:30px;height:30px;cursor:move;border-top-left-radius:5px;border-top-right-radius:5px}.n2-sidebar-hidden .n2-panel-titlebar-nav{padding:0 8px}.n2-sidebar-hidden #n2-ss-slide-sidebar{position:fixed;left:100px;top:100px;z-index:100000}.n2-ss-slide-sidebar-crop{width:100%;height:100%;border-radius:3px;box-shadow:0 1px 10px RGBA(0,0,0,.5);overflow:hidden;background:#3c4958}.n2-ss-edit-slide-top{background:#fff;border-bottom:1px solid #ccd1d6;padding:30px 20px 30px 40px;display:flex;flex-wrap:nowrap;justify-content:space-between;flex-flow:row}.n2-ss-edit-slide-top-thumbnail{width:200px;height:135px;cursor:pointer}.n2-ss-edit-slide-top-thumbnail img{width:200px;height:135px;border-radius:5px}.n2-ss-edit-slide-top-actions{width:180px;text-align:left;vertical-align:middle;flex:1}.n2-ss-edit-slide-top-actions>*{margin:10px 0}.n2-ss-edit-slide-top-details{flex:1;align-self:flex-end;padding:0 20px}.n2-ss-edit-slide-top-details .n2-h1{color:#606d7b;margin-bottom:15px;cursor:pointer;line-height:30px}.n2-ss-edit-slide-top-details .n2-h1:HOVER:after{font-family:'Nextend'!important;content:"\e94f";font-size:22px;vertical-align:top;margin:0 5px;color:#b0b9bf}.n2-ss-edit-slide-top-details .n2-h4 a{color:#7b8898}.n2-ss-edit-slide-top-details .n2-h4 a .n2-i{font-size:16px}.n2-ss-edit-slide-top-tabs{margin-top:15px}.n2-ss-edit-slide-top-tabs a{margin:0}.n2-ss-edit-slide-top-tabs a.n2-active{color:#fff;background-color:#0c92df;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button{border-radius:0;border-left:0;padding:0 20px}.n2-ss-edit-slide-top-tabs .n2-button.n2-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:2px solid #e0e6ed}.n2-ss-edit-slide-top-tabs .n2-button.n2-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-ss-edit-slide-top-tabs .n2-button.n2-active{background:#0c92df;color:#fff;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button.n2-active:not(.n2-first){border-left:2px solid #0c92df;margin-left:-2px}#n2-form-matrix-slide-settings{margin:0;border:0;border-radius:0}.n2-ss-editor-group-mode-only,.n2-ss-editor-layer-mode-only{display:none!important}.n2-ss-has-layers.n2-ss-editor-mode-GROUP .n2-ss-editor-group-mode-only,.n2-ss-has-layers.n2-ss-editor-mode-LAYER .n2-ss-editor-layer-mode-only{display:inline-block!important}#n2-ss-slide-vertical-bar{background:#212d3a;position:absolute;left:-1px;top:54px;bottom:-1px;width:50px;text-align:center}.n2-ss-slide-vertical-bar-inner{position:relative;padding-top:.01px}#n2-ss-slide-vertical-bar .n2-ss-slide-vertical-bar-inner>*{margin-top:10px;color:#80a3b5}#n2-ss-slide-vertical-bar.n2-active .n2-ss-slide-vertical-bar-inner>*{margin-top:0}#n2-ss-slide-vertical-bar.n2-active{width:341px;z-index:2}#n2-ss-slide-vertical-bar.n2-active .n2-ss-add-layer-button{margin:0;background:0 0;position:absolute;top:16px;right:5px}#n2-ss-slide-vertical-bar.n2-active .n2-ss-add-layer-button .n2-i:before{content:"\e90a";color:#b2bfc9}#n2-ss-slide-vertical-bar.n2-active .n2-ss-slide-vertical-bar-inner>a{display:none}#n2-ss-slide-vertical-bar.n2-active .n2-ss-slide-vertical-bar-inner{width:341px!important}#n2-ss-slide-vertical-bar.n2-active .n2-ss-available-layers{display:block}.n2-ss-available-layers .n2-sidebar-tab-switcher{border:0}.n2-ss-available-layers-container{width:300px;margin:0 auto;padding:10px 0}.n2-ss-slide-item-group{color:#b2bfc9;padding:4px 5px 1px}#smartslider-adjust-height{position:relative;z-index:1;overflow:hidden;border-bottom:1px solid #ccd1d6;background-color:#e9edf0;margin-left:49px;border-top:1px solid #ccd1d6}.n2-ss-slider-real-container{position:relative}.n2-ss-slider-outer-container{position:relative;float:left}.n2-ss-slider-container{padding-bottom:99px;float:left;margin:10px}.n2-ss-has-ruler .n2-ss-slider-container{margin:40px 0 0 40px}.n2-ss-layer-status{display:inline-block;position:relative;margin:0 3px}.n2-ss-layer-status>a .n2-i,.n2-ss-layer-status>a:HOVER .n2-i{color:#b2bfc9}.n2-ss-layer-status-hidden .n2-ss-layer-status .n2-ss-sc-hide .n2-i:before{content:"\e923"}.n2-ss-layer-list-top-bar .n2-h2{display:inline-block;line-height:28px;color:#fff;padding:0 5px}.n2-ss-layer-list-opener{width:28px;display:inline-block;padding:0;vertical-align:top;margin:0 5px}#n2-ss-layers.n2-active .n2-ss-layer-list-opener>.n2-i:before{content:"\e92c"}.n2-ss-layer-list-group-opener.n2-closed .n2-i:before{content:"\e921"}#n2-ss-layers{position:fixed;bottom:0;width:340px;margin:0 -1px;height:48px;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;display:none;background-color:#28313a;z-index:10000}#n2-ss-layers.n2-active{height:100px}#n2-ss-layers:not(.n2-active){width:50px!important}#n2-ss-layers:not(.n2-active) .n2-ss-layers-sidebar{width:50px}#n2-ss-layers:not(.n2-active) .n2-ss-layer-list-layers-top-bar>div{display:none!important}.n2-ss-has-layers #n2-ss-layers{display:block}#n2-ss-layers-table .n2-td{position:relative;vertical-align:top}#n2-ss-layers-table .n2-ss-layers-sidebar{width:340px}.n2-ss-layer-list-top-bar{position:relative;padding:10px 5px 9px;height:28px;background-color:#212d3a;border-bottom:1px solid #20282f}#n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar{cursor:ns-resize}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-choose,.n2-editor-header .n2-ss-button-container>.n2-basiccss-back,.n2-ss-editor-mode-LAYER .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar,.n2-ss-layer-list-bulk-top-bar{display:none}.n2-ss-editor-mode-LAYER .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-bulk-top-bar{display:block}.n2-ss-layer-list-top-bar .n2-form-element-text{margin:0}.n2-ss-layers-sidebar-rows{position:relative;height:100%;overflow-x:hidden;overflow-y:visible}#n2-ss-layers .n2-form-element-text{margin:0 10px;line-height:2px}#n2-ss-layers .n2-text-sub-label{width:30px;text-align:center;overflow:hidden}.n2-i-desktopPortrait:before{content:'\e926'}.n2-i-desktopLandscape:before{content:'\e925'}.n2-i-tabletPortrait:before{content:'\e928'}.n2-i-tabletLandscape:before{content:'\e927'}.n2-i-mobilePortrait:before{content:'\e92a'}.n2-i-mobileLandscape:before{content:'\e929'}#n2-ss-slide-sidebar .ui-autocomplete{padding:0;max-height:200px;overflow-y:auto;overflow-x:hidden}#n2-ss-slide-sidebar .n2-form-element-autocomplete .ui-autocomplete .ui-menu-item{padding-right:20px}input#presets{max-width:none!important;width:150px}#n2-tab-basiccsspreset{background-color:#3c4958;z-index:3}#n2-tab-basiccsspreset>.n2-h2{margin-bottom:0}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-back{display:inline-block}.n2-ss-layer-list-bulk-top-bar{text-align:right;color:#fff;vertical-align:top;padding:10px 15px 9px}.n2-ss-layer-list-bulk-top-bar .n2-button{vertical-align:middle}.n2-ss-layer-list-bulk-top-bar .n2-button+.n2-button,.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 0 0 5px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-button+.n2-button,html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 5px 0 0}.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{position:absolute;top:10px;right:5px;margin:0 10px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{right:auto;left:5px}.n2-ss-layer-list-topbar-control{text-align:right;color:#fff;padding:0 10px;vertical-align:top}#n2-ss-layers .n2-ss-layer-list-topbar-control{padding:0}.n2-ss-layer-list-topbar-control .n2-button{padding:0;width:28px;font-size:16px;vertical-align:middle}.n2-ss-layer-list-topbar-control .n2-button i{line-height:inherit}.n2-play.n2-active i:before{content:"\e607"}.n2-ss-preview-modal .n2-modal-window{background-color:#e9edf0}#n2-tabbed-animations-tabbed>.n2-table{border-spacing:8px;border-collapse:separate;background:#28313a;border-bottom:1px solid #20282f}#n2-tabbed-animations-tabbed .n2-sidebar-tab-switcher .n2-td{line-height:28px;height:28px;border:0;border-radius:50px}#n2-tabbed-animations-tabbed .n2-editor-header.n2-h2{background:#303b47;border-bottom:1px solid #28313a;position:relative}.n2-ss-small-more{float:right;margin:-38px 20px 0}html[dir=rtl] .n2-ss-small-more{float:left}.n2-button-single-animation-play.n2-active .n2-i:before{content:'\e607'}div#n2-ss-0 .n2-ss-layer-chain-parent{position:absolute;z-index:10;right:10px;top:10px;line-height:18px;font-size:12px;width:18px;display:none}.n2-ss-layer-edit-visible .n2-ss-mode-desktopPortrait #n2-tab-smartslider-editor:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent .n2-ss-layer-chain-parent,.n2-ss-mode-desktopPortrait #n2-tab-smartslider-editor:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent:HOVER .n2-ss-layer-chain-parent{display:inline-block}#n2-ss-slide-sidebar .n2-ss-generator-param,.n2-ss-background-type-color .n2-ss-background-image-param,.n2-ss-background-type-color .n2-ss-background-video-param,.n2-ss-background-type-gradient .n2-ss-background-image-param,.n2-ss-background-type-gradient .n2-ss-background-video-param,.n2-ss-background-type-image .n2-ss-background-video-param{display:none}#n2-tab-animations-events td.n2-label{padding:0}#n2-tab-animations-events td.n2-element{padding:6px 0}.n2-ss-dynamic-slide #n2-ss-slide-sidebar .n2-ss-generator-param,.n2-ss-show-slides #n2-ss-slide-edit-slides{display:block}#n2-admin.n2-ss-mode-desktopPortrait .n2-ss-responsive-helper{display:none}.n2-ss-editor-window-notice{padding:8px 10px;line-height:18px;background:#6b7986;color:#fff}.n2-ss-editor-window-notice a{color:#ffb527}#n2-ss-slide-edit-slides{display:none;border-bottom:1px solid #e0e6ed}.n2-ss-show-slides a.n2-ss-back-slides,.n2-ss-show-slides a.n2-ss-back-slides:before{color:#fff}.n2-ss-layer-status-locked .n2-actions-left .n2-i-eye:before{content:'\e609'}.n2-ss-focus-on-active-layer .n2-ss-layer.n2-active{z-index:10000000!important}.n2-ss-scrollbar-wrapper{background-color:#212d3a;padding:4px;height:8px;z-index:10}.n2-scroll-disable .n2-ss-scrollbar-wrapper{visibility:hidden;height:0;padding:0}.n2-ss-scrollbar-wrapper .track{position:relative;height:8px}.n2-ss-scrollbar-wrapper .thumb{position:absolute;top:0;background-color:#49586a;height:8px;cursor:default;width:20px;z-index:2;border:0;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light{background-color:#b9c3c9}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light .thumb{background-color:#fff}#n2-ss-zoom{width:280px;text-align:center;vertical-align:middle}#n2-ss-zoom .n2-ss-slider-zoom-container{position:relative;display:inline-block;vertical-align:middle;width:150px;height:34px;padding:0 23px}#n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{position:absolute;top:9px;color:#6b7986;font-size:16px;cursor:pointer}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-minus{left:-18px}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-plus{right:-18px}.n2-ss-slider-zoom-bg{position:absolute;left:0;top:50%;margin-top:-3px;width:100%;background:#505c69;height:6px;border-radius:3px}#n2-ss-slider-zoom{height:100%;position:relative;margin:0;background:0 0;border:none;border-radius:0}#n2-ss-slider-zoom .ui-slider-range{display:none}#n2-ss-slider-zoom .ui-slider-handle{position:absolute;top:50%;display:block;width:47px;height:22px;margin-top:-11px;margin-left:-23px;background-color:#e6eaee;background:#e6eaee;border:none;border-radius:3px;z-index:2;color:#7b8898;font-size:10px;text-align:center;line-height:22px;cursor:pointer}.n2-ss-slider-zoom-1{position:absolute;left:50%;top:0;margin-left:-1.5px;width:3px;height:100%;background-color:#6b7986}#n2-ss-lock{display:inline-block;position:absolute;right:-36px;top:9px;cursor:pointer;line-height:16px}#n2-ss-lock .n2-i{color:#6b7986;font-size:16px}#n2-ss-lock.n2-active .n2-i:before{content:"\e609"}.n2-ss-device-zoomer{min-width:280px}.n2-ss-device-zoomer #n2-ss-zoom{padding:10px 0;background:#212d3a;margin:0 auto;display:none;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.n2-ss-device-zoomer:HOVER #n2-ss-zoom{display:block}.n2-ss-device-zoomer .n2-ss-slider-zoom-1,.n2-ss-device-zoomer .n2-ss-slider-zoom-bg{background-color:#374d64}.n2-ss-device-zoomer #n2-ss-zoom #n2-ss-lock>.n2-i,.n2-ss-device-zoomer #n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{color:#4e667f}.n2-ss-device-zoomer #n2-ss-slider-zoom .ui-slider-handle{background-color:#526a80;color:#fff}#n2-ss-devices{height:60px}#n2-ss-devices.n2-ss-devices-compact>.n2-controls-panel{width:260px}#n2-ss-devices .n2-table{font-size:32px;color:#80a3b5;margin:0 auto}.n2-lb-header #n2-ss-devices .n2-table{color:#a4b0b7}html[dir=rtl] #n2-ss-devices .n2-table{float:left}#n2-ss-devices .n2-td{height:60px;vertical-align:middle;text-align:center;padding:0 15px;cursor:pointer}#n2-ss-devices .n2-td.n2-active{cursor:default;color:#0c92df}.n2-i-devices:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAAAeCAMAAABzNtkNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACdlBMVEUAAAChrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrUZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrUZmeMAAAA99lBfAAAA0XRSTlMAJ6DHzCgytbY2MLMnoMfMKDK1tjYws5+ytLGfsrSxxh0ixh0il5qXmgY7a5SvvspsB2aHBjtrlK++ymwHZod+wiN+wiMSgbh6SiYQAnl9DBKBuHpKJhACeX0MNbmdQwQzNbmdQwQzRrtLAUa7SwHIpRWkyKUVpJgKUqLDnk2YClKiw55Nhq2KhIatioTLLlgOT8suWA5PcH9ZX3B/WV+sJcQqrqwlxCquKSmjXqNeV1eRiZGJCQmIiLq6AzQDNIK3SYK3SSQkCG2hCG2hsLA3NxRx1r0AAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAE0UlEQVRo3s2a+18UVRTAN/eYJLmHJCAjS4pehG4vQrcHhq0bCrFu6BKkRmq+JSNTpBQpVlnjEY+wtAglFIjeWmCWZb7t8Se109z57Mzcc+eBLrPnl7nn3DOP8/3MvXPPueNyWZSbprhBKO4pU9W+N0+jnFJuIS47PVXrlDrd6gPp5NYZHhSKZ0aa2ve2mZRT+u3EZTMytU6ZGZafKAsMJUvtewftk0Jcdpbe6c4JEstGQ8lW+95F+6QTl52td7rb8hO5wagX7tFopC9pBZijVnPA8DYG4kGjXrxXo5G+pBXxPrWai4a3MY9X0BvT7te/Ow+IiNm5jRETtN4b0x7UvzsPiYiJ9YfzHsmfO8/rnTc3/9G8x6jQHhcNySd4YryTiBjnJ5AnC54qnL/A51swv/Dpgmeo0J4VDcnneGK8k4gY58ckp2ih+rEXFj3PExPPYhQx4vTrIJZbvEj92IuKX+CJiWcxihhxug1i/sVegMCLJUuWlpYuXVJSFgDwvlRuKWSqyxYxY12W4DIfYujliuUrwuEVyysqQ4i+V6oshUx12SJG6tWvAqxctTpuX71qJcC015KFWM3riGvWrosb1q1dgzjzDceIrXfDho2btD2bNm4A9/rkILbZg1u2btPatm3dgp7NDhGrroU3t/O+298Cd3UyEKupw7d38GfueAc9NY4Q8wdg5y5ZLa3f3dDw7nvsddu1EwJ+54kFQ7hnr9wMN+5ranr/A/a67d2DoaATxJohwub40v3y1+oAQ1YegWbnibVglM3x4YPy1+pDhqwqii0OEMtp9bYxrR7c7R0d7W74iBnavK05ThPL7fR1sWYjerp7ero9+DEzdPk6cyefWC8cUrQs+EQ6fBpPEhdDr9PEDuMRpZmNn0mHz+NJ4jI8PPnE+uALReuHDunQAf2K5Sgcc5rYAH6pNAexRzr04KBiOY4nJp9YBI6KiQ05TyyKx8XEhp0g1gtFijYij8qv4qPyUDKMymKlOSqPyq/jo/KIE6MyNvMPMe0bZeavZ4ah5Jj5h1nzW2Xmb2SGYUdm/tjqok9ZXXwnry6+L5X18r7kWF0MKKuLH+TVxY9hWa8acGR18f8K9iRD1j7S37+7ngE7ya9gE1G7MCMmrWBPMWTdo4OD+xoZsFP8CjYRtQtCj2VJI1SWNAK12ixpvwjYT4nOkkapLGkU67RZ0kERsJ8TkImPlegz8ZIxLhM3kERn4uMV+ky8YpzLxA3khld7xqRqz+m4/bRU7Un5xSwUQ2I3sAZbMy5Ve87EDWekak/6r0ahmRK7vhqs/7dYRfFsGaso/l52FqC1SFtRtLkz0mw2cu0QcwX/iFUUz1WyiuKflecQO4u1FUWbOyMtZiPXhJjLdV5ftT6vO9XO7putvSQLTjG5oK9aX9A52Nl9s7WXJNYv5l3Kj0g7I5H8S3kXuVOnXq4V86q9rNnhVYVNN3nXhgZjYi7XlYKrhVFpZyRaeLXgCteddq1OzKvuWpogbLrJuzY1GcE2FTkscXAJIWZD5LDEwSU1MTMrgF+t+iebmJkVMahWgxMhZmGv7C967KYSrql6p4n+RaCKkZqnNfI3PXYzCddMvZP1vwjsEGs7RgGbRf2p8k9AB2yif6rYIdZ1ggI2m/pT5d+QDljGf3zSNGZGqKPpAAAAAElFTkSuQmCC)}.n2-i-devices-all:before{background-position:0 0}.n2-i-devices-desktop:before{background-position:-40px 0}.n2-i-devices-tablet:before{background-position:-80px 0}.n2-i-devices-phone:before{background-position:-120px 0}.n2-active>.n2-i-devices-all:before{background-position:-160px 0}.n2-active>.n2-i-devices-desktop:before{background-position:-200px 0}.n2-active>.n2-i-devices-tablet:before{background-position:-240px 0}.n2-active>.n2-i-devices-phone:before{background-position:-280px 0}.n2-generator-insert-variable .n2-variable-container{height:90px;overflow:auto}.n2-generator-insert-variable .n2-group-container{height:40px;overflow:auto}.n2-generator-insert-variable .n2-group-container .n2-button,.n2-generator-insert-variable .n2-variable-container .n2-button{margin:3px}.n2-generator-insert-variable .n2-group-container .n2-button.n2-active,.n2-generator-insert-variable .n2-variable-container .n2-button.n2-active,.n2-ss-layer-picker.n2-active{background:#0c92df}.n2-generator-result-container{height:100px;overflow:auto;margin:0 3px}.n2-ss-layer-picker{background:#6b7986;color:#fff;font-size:16px;height:28px;line-height:28px;padding:0;text-align:center;width:28px;border-radius:3px;margin:0 10px 10px;cursor:pointer}#n2-ss-control-line #n2-ss-layer-parent-linker.n2-under-pick,.n2-ss-layer-picker.n2-under-pick{background-color:#51b82d}#n2-ss-layer-parent-linker.n2-under-pick .n2-i-layerlink:before,.n2-ss-layer-picker.n2-under-pick .n2-i-layerlink:before{content:"\e64b"}.n2-ss-picker-overlay,.n2-ss-picker-overlay-tile{position:absolute;left:0;top:0;background:RGBA(25,153,227,.8);cursor:pointer;width:100%;height:100%;z-index:1000000;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4)}.n2-ss-picker-overlay-tile{width:33%;height:33%}.n2-ss-picker-overlay-tile:HOVER,.n2-ss-picker-overlay:HOVER{background:RGBA(42,52,63,.9)}.n2-ss-picker-overlay-tile.n2-active,.n2-ss-picker-overlay-tile.n2-active:HOVER{background:RGBA(0,52,63,.9)}#n2-ss-control-line #n2-ss-layer-parent-linker{display:none}.n2-ss-has-layers .n2-ss-mode-desktopPortrait #n2-ss-control-line #n2-ss-layer-parent-linker,.n2-ss-has-ruler .n2-ruler>span{display:inline-block}.n2-ruler-container{position:absolute;left:0;top:0;height:100%;width:100%;visibility:hidden;z-index:10}.n2-ruler-container>*{visibility:visible}.n2-ruler,.n2-ruler-guide{position:absolute;left:0;top:0}.n2-ruler{box-sizing:border-box;white-space:nowrap}.n2-ruler>span{position:relative;display:none;vertical-align:top}.n2-ruler>span span{position:absolute;display:block;font-size:10px;color:#7b8898;line-height:10px}.n2-ruler-guide{display:none;z-index:2}.n2-ss-show-guides .n2-ruler-guide{display:block}.n2-ruler-guide .n2-ruler-guide-handle{position:absolute;background:#e6b625;left:0;top:0;width:9px;height:9px;cursor:pointer;font-family:'Nextend'!important;font-size:9px;color:#fff;line-height:9px;text-align:center}.n2-ruler-guide .n2-ruler-guide-handle:before{content:"\e90a"}.n2-ruler-horizontal{padding-left:1px;height:0;width:100%}.n2-ss-has-ruler .n2-ruler-horizontal{height:39px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-large{height:20px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-medium{height:10px}.n2-ruler-horizontal>span{width:9px;height:5px;border-right:1px solid #bcc4c8}.n2-ruler-horizontal span span{left:12px;top:10px}.n2-ruler-vertical .n2-ruler-guide{height:0;width:3000px}.n2-ss-lock-guides .n2-ruler-vertical .n2-ruler-guide{cursor:default}.n2-ruler-vertical .n2-ruler-guide .n2-ruler-guide-border{border-bottom:1px solid #ccaa2b;width:100%}.n2-ruler-vertical .n2-ruler-guide-handle{top:-4px}.n2-ruler-vertical{padding-top:1px;width:0;height:100%;background:#e9edf0;z-index:5}.n2-ss-has-ruler .n2-ruler-vertical{width:40px}.n2-ruler-vertical>span.n2-ss-ruler-mark-large{width:20px}.n2-ruler-vertical>span.n2-ss-ruler-mark-medium{width:10px}.n2-ruler-vertical>span{display:none;width:5px;height:9px;border-bottom:1px solid #bcc4c8}.n2-ss-has-ruler .n2-ruler-vertical>span{display:block}.n2-ruler-vertical span span{left:8px;top:12px}.n2-ruler-horizontal .n2-ruler-guide{width:0;height:1600px}.n2-ss-lock-guides .n2-ruler-horizontal .n2-ruler-guide{cursor:default}.n2-ruler-horizontal .n2-ruler-guide .n2-ruler-guide-border{border-right:1px solid #ccaa2b;height:100%}.n2-ruler-horizontal .n2-ruler-guide-handle{left:-4px}.n2-ruler-guide-handle{display:none}.n2-ss-has-ruler .n2-ruler-guide-handle{display:block}
|
1 |
+
#html-body header,.adminhtml-smartslider3-index #footer,.adminhtml-smartslider3-index .footer,.smartslider3-index-index footer{display:none}#html-body #anchor-content{padding-top:30px}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.n2-definition-list dt.n2-ss-slider-ordering{color:#fff;background-color:#212d3a;border:0}.n2-definition-list dt.n2-ss-slider-ordering>div{padding:0 30px}.n2-definition-list .n2-ss-slider-ordering .n2-button{min-width:28px;line-height:28px;height:28px;margin-left:10px;background-color:#54667b;color:#fff}.n2-definition-list .n2-ss-slider-ordering .n2-button.n2-active{background:#0c92df}.n2-definition-list dt.n2-ss-slider-ordering .n2-actions{background-color:#212d3a;padding-top:16px}.n2-definition-list .n2-ss-slider-ordering>.n2-actions a{display:inline-block;padding:0}.n2-definition-list .n2-ss-slider-ordering>.n2-actions .n2-i{vertical-align:top}.n2-ss-slide2-list li .n2-actions .n2-i-delete,.n2-ss-slide2-list li .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li .n2-actions .n2-i-star{visibility:hidden}.n2-ss-slide2-list li .n2-actions .n2-i-star.n2-active,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-delete,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-star{visibility:visible}.n2-lightbox-sidebar-list{overflow-y:auto}#n2-tab-widgets{border-bottom:0;margin-bottom:1000px}.n2-i-edit.n2-active{color:#0c92df}.n2-ss-live-preview span{text-decoration:line-through;vertical-align:middle}.n2-ss-live-preview .n2-button,.n2-widget-area{vertical-align:middle;margin:0 20px}.n2-ss-live-preview.n2-active span{text-decoration:none}.n2-ss-live-preview.n2-active .n2-button{display:none}.n2-widget-area{display:inline-block;width:80px;height:80px;position:relative;margin:0 10px}.n2-form .n2-widget-area{margin-bottom:10px}.n2-widget-area-inner{position:absolute;top:14px;left:14px;width:46px;height:46px;border:3px solid #bbc3cc;border-radius:3px}.n2-widget-area .n2-area{position:absolute;background-color:#a1aeb5;border-radius:2px;cursor:pointer;width:10px;height:10px;left:0;top:0}.n2-widget-area .n2-area.n2-active{background-color:#0c92df;cursor:default}.n2-widget-area .n2-area-1{left:35px}.n2-widget-area .n2-area-2{left:21px;top:21px}.n2-widget-area .n2-area-3{left:35px;top:21px}.n2-widget-area .n2-area-4{left:49px;top:21px}.n2-widget-area .n2-area-5{top:35px}.n2-widget-area .n2-area-6{left:21px;top:35px}.n2-widget-area .n2-area-7{left:49px;top:35px}.n2-widget-area .n2-area-8{left:70px;top:35px}.n2-widget-area .n2-area-9{left:21px;top:49px}.n2-widget-area .n2-area-10{left:35px;top:49px}.n2-widget-area .n2-area-11{left:49px;top:49px}.n2-widget-area .n2-area-12{left:35px;top:70px}.n2-ss-slider-publish{border-collapse:collapse;overflow:hidden}.n2-ss-slider-publish .n2-td{text-align:center;border-right:1px solid #ccd1d6;color:#6b7989;padding:48px 0 0}.n2-ss-slider-publish .n2-td .n2-h2 a{color:#6b7989}.n2-ss-slider-publish .n2-td.n2-last{border-right:0}.n2-ss-slider-publish div.n2-h2{line-height:30px;font-size:18px}.n2-ss-slider-publish div.n2-h4{line-height:26px}.n2-ss-slider-publish .n2-code{display:inline-block;padding:16px 30px;line-height:20px;border-radius:3px;background-color:#f5e293;text-align:left;margin:17px 0;color:#6f653f;font-size:12px;border:0}.n2-ss-slider-publish img{margin-top:17px;margin-bottom:-10px}.n2-ss-generator-modal .n2-modal-content h3{text-align:left}.n2-generator-records td div{max-height:100px;overflow:hidden;padding:10px;margin:-10px}.n2-generator-records td:HOVER div{overflow-y:auto;overflow-x:visible}#n2-admin[data-slider-type=block] .n2-fm-arrow,#n2-admin[data-slider-type=block] .n2-fm-autoplay,#n2-admin[data-slider-type=block] .n2-fm-bar,#n2-admin[data-slider-type=block] .n2-fm-bullet,#n2-admin[data-slider-type=block] .n2-fm-indicator,#n2-admin[data-slider-type=block] .n2-fm-slides,#n2-admin[data-slider-type=block] .n2-fm-thumbnail{display:none}.n2-ss-container-device{position:relative;background-color:#fff;border:1px solid #ccd1d6;border-width:0 1px;margin:40px auto 0}.n2-modal.n2-ss-go-pro .n2-modal-window{text-align:center;line-height:2}.n2-modal.n2-ss-go-pro .n2-ss-rate{margin:50px -20px 0;background:url(../images/free/rate.png);height:90px;line-height:90px;color:#fff}.n2-modal.n2-ss-go-pro .n2-ss-rate .n2-h3{display:inline-block;margin-right:30px}.n2-modal.n2-ss-go-pro .n2-modal-controls{margin-bottom:40px}.n2-ss-create-slider-free-sample{float:left;height:70px;width:170px;cursor:pointer}.n2-ss-create-slider-free-sample:HOVER{background-position:0 -80px}.n2-ss-modal-subscribe>.n2-modal-window{text-align:center}.n2-ss-modal-subscribe .n2-form{margin:0 -20px}.n2-ss-modal-subscribe .n2-h3{margin:0 auto;width:95%;text-align:center;line-height:2}.n2-ss-preview-subscribe .n2-input-button{display:inline-block}.n2-input-button,.n2-ss-modal-subscribe .n2-input-button{display:inline-block;margin-top:20px}.n2-input-button>*,.n2-ss-modal-subscribe .n2-input-button>*,.n2-ss-preview-subscribe .n2-input-button>*{display:inline-block;white-space:nowrap}.n2-input-button input,.n2-input-button input:focus,.n2-ss-modal-subscribe input,.n2-ss-modal-subscribe input:focus,.n2-ss-preview-subscribe input,.n2-ss-preview-subscribe input:focus{margin:0 auto;width:250px;height:36px;border:2px solid #b9c3c9;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px;overflow:hidden;padding:0 10px;line-height:36px;box-shadow:none;color:#7b8898;font-size:12px;background:#fff}.n2-input-button .n2-button,.n2-ss-modal-subscribe .n2-input-button .n2-button,.n2-ss-preview-subscribe .n2-input-button .n2-button{border-top-left-radius:0;border-bottom-left-radius:0}.n2-ss-preview-subscribe{position:fixed;left:50%;margin-left:-500px;bottom:-100px;transition:bottom .5s ease;background:url(../images/free/subscribepreview.png);width:1000px;height:90px;z-index:1000}.n2-ss-preview-subscribe.n2-active{bottom:10px}.n2-ss-preview-subscribe-close{position:absolute;top:-12px;right:-12px;width:24px;height:24px;cursor:pointer;background:url(../images/free/close.png) no-repeat center center}.n2-ss-preview-subscribe .n2-input-button{position:absolute;right:20px;top:0;margin-top:28px}.n2-ss-slider-edit>.n2-form>.n2-form-tab{margin:20px 0 0;border-radius:0;border:0}.n2-ss-slider-edit>.n2-form>.n2-form-tab .n2-form-matrix-views{border-radius:0}.n2-box-add-license.n2-ss-license-has-active-key,.n2-box-license-activated.n2-ss-license-no-active-key{display:none}#n2-ss-slider-container,#n2-ss-slides{position:relative;padding:25px}.n2-ss-sliders .n2-box-new-slider>a:before{content:"\e952"}.n2-ss-sliders .n2-box-template-library>a:before{content:"\e951"}.n2-box-up-group>a:before{content:"\e958"}.n2-box-insert-group>a:before{content:"\e959"}.n2-ss-sliders-header>*{margin:0 10px}html[data-sliders='0'] .n2-ss-sliders-header{visibility:hidden}.n2-ss-box-slider{cursor:pointer}#n2-ss-slider-container[data-groupid="0"] .n2-ss-remove-from-group,.n2-ss-box-slider-group .n2-ss-add-to-group,.n2-ss-box-slider-group .n2-ss-remove-from-group,.n2-ss-slider-over-group .n2-box-sortable-placeholder,html[data-slides='0'] .n2-ss-slider-edit{display:none}.n2-ss-slides-outer-container{display:block}.n2-modal-window .n2-ss-slides-outer-container{height:100%;overflow:auto}.n2-ss-slides-container{position:relative;margin:0 -10px}.n2-slide-first.n2-i{line-height:16px}.n2-slide-first.n2-i,.n2-slide-published{font-size:16px;padding:3px}.n2-i-unpublished{color:#c54633}.n2-slide-state-published .n2-i-unpublished{color:#6fbc49}.n2-slide-state-published .n2-i-unpublished:before{content:"\e60c"}.n2-box.n2-first-slide:HOVER .n2-slide-first,.n2-slide-first,.n2-slide-is-first{display:none}.n2-first-slide .n2-slide-is-first{display:inline-block}.n2-slide-duplicate{margin-right:5px}.n2-slide-delete,.n2-slide-duplicate,.n2-slide-selected{padding:0;width:24px}#n2-ss-slides .n2-box.n2-ss-slide-active{box-shadow:0 0 0 3px #0c92df}#n2-ss-slides .n2-box-slide-dummy{background:#e9edf0;border:2px dashed #b2bfc9;box-sizing:border-box;background-image:url(../images/dummy-slide.png);background-repeat:no-repeat;background-position:center 36px;color:#7b8898;font-size:14px;text-align:center;line-height:200px}#n2-ss-slides .n2-box-slide-drag-images{background:url(../images/drag.png) no-repeat center 4px;text-align:center;color:#7b8898;box-sizing:border-box;padding:90px 60px 0;line-height:12px}html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-dummy{display:none}.n2-ss-slides-control{position:relative;padding:22px 10px;border-bottom:1px solid RGBA(0,0,0,.3)}.n2-ss-slides-control .n2-button{margin:0 10px}.n2-slides-add{vertical-align:bottom;margin:-2px}#n2-ss-slides .n2-box-slide-drag-upload{display:none;position:absolute;z-index:101;left:0;top:0;width:100%;height:100%;background-color:rgba(32,41,52,.9);border:0;right:0;bottom:0;margin:0;vertical-align:bottom;line-height:130px;text-align:center;color:#fff}#n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload{display:block}.n2-box-slide .n2-button.n2-sidebar-list-bg:HOVER{background-color:#0c92df}.n2-ss-quick-slides-edit-modal .n2-modal-content table{border-spacing:10px;border-collapse:separate;margin:10px auto}.n2-ss-quick-slides-edit-modal .n2-modal-content table td{padding:0}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label{margin-top:0;margin-bottom:3px}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label label{font-size:11px}.n2-slide-state-first [data-action=setFirst],.n2-slide-state-published [data-action=publish],[data-action=generator],[data-action=unpublish]{display:none}.n2-slide-state-has-generator [data-action=generator],.n2-slide-state-published [data-action=unpublish]{display:block}.n2-box-slide .n2-i-star{display:none}.n2-box-slide.n2-slide-state-first .n2-i-star{display:inline;color:#e19f21;font-size:16px}#n2-ss-slides .n2-box:HOVER img{opacity:.1}.n2-ss-slides-header{position:relative;z-index:9;color:#6b7989;margin-top:-10px}.n2-ss-bulk-controls{visibility:hidden}.n2-ss-has-box-selection .n2-ss-bulk-controls{visibility:visible}.n2-ss-slides-header .n2-button-menu-open .n2-button-menu{right:-90px}#n2-ss-slides .n2-box-slide-add{display:inline-block;color:#b2bfc9;background:0 0;text-align:center;z-index:5}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image,.n2-box-add-sample-slide>a{width:100%;height:135px;padding:0}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image:before,.n2-box-add-sample-slide>a:before{display:block;font-family:'Nextend'!important;font-size:48px;line-height:68px;content:"\e981";margin-top:20px}.n2-box-add-sample-slide>a:before{content:"\e97d"}.n2-ss-slides-header>*{vertical-align:middle;display:inline-block}.n2-ss-slides-header .n2-h5,.n2-ss-slides-header .n2-h5 a{margin-right:10px;color:#6b7986}.n2-ss-slides-header .n2-h5 .n2-i{font-size:16px}.n2-top-bar-menu .n2-ss-back-dashboard:before{content:"\e94a"}.n2-top-bar-menu .n2-ss-back-slider:before{content:"\e94b"}.n2-top-bar-menu .n2-ss-back-slides:before{content:"\e91a"}.n2-top-bar-menu>#n2-ss-preview:before{content:"\e92d"}.n2-ss-block-slides-notice{display:none;color:#7b8898}html:not([data-slides='0']):not([data-slides='1']) #n2-admin[data-slider-type=block] .n2-ss-block-slides-notice{display:block}html[data-slides='0'] .n2-ss-create-static-slide{display:none}div#n2-ss-0:HOVER .n2-ss-static-slide{display:none}div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide{display:flex}.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .n2-ss-layer-cc,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-customresizable-handle,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-resizable-handle{display:none!important}.n2-ss-select-layer-mode-group .n2-list li.n2-ss-layerlist-row.n2-active.n2-selected{color:#b2bfc9}#n2-ss-0 .n2-ss-layer{cursor:not-allowed}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer{cursor:move;background:RGBA(0,0,0,0)}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type=col],#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type=col] .n2-ss-layer{cursor:pointer}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked{cursor:auto}.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer{cursor:default}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-highlight,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-selected .ui-item-overlay{display:none!important}.n2-grid{background:#4affff;position:absolute;left:0;top:0;z-index:1000000;display:none}.n2-grid-h{width:100%;height:1px}.n2-grid-v{height:100%;width:1px}.n2-sidebar{width:340px}.n2-ss-edit-slide-top{background:#fff;border-bottom:1px solid #ccd1d6;padding:30px 20px 30px 40px;display:flex;flex-wrap:nowrap;justify-content:space-between;flex-flow:row}.n2-ss-edit-slide-top-thumbnail{width:200px;height:135px;cursor:pointer}.n2-ss-edit-slide-top-thumbnail img{width:200px;height:135px;border-radius:5px}.n2-ss-edit-slide-top-actions{width:180px;text-align:left;vertical-align:middle;flex:1}.n2-ss-edit-slide-top-actions>*{margin:10px 0}.n2-ss-edit-slide-top-details{flex:1;align-self:flex-end;padding:0 20px}.n2-ss-edit-slide-top-details .n2-h1{color:#606d7b;margin-bottom:15px;cursor:pointer;line-height:30px}.n2-ss-edit-slide-top-details .n2-h1:HOVER:after{font-family:'Nextend'!important;content:"\e94f";font-size:22px;vertical-align:top;margin:0 5px;color:#b0b9bf}.n2-ss-edit-slide-top-details .n2-h4 a{color:#7b8898}.n2-ss-edit-slide-top-details .n2-h4 a .n2-i{font-size:16px}.n2-ss-edit-slide-top-tabs{margin-top:15px}.n2-ss-edit-slide-top-tabs a{margin:0}.n2-ss-edit-slide-top-tabs a.n2-active{color:#fff;background-color:#0c92df;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button{border-radius:0;border-left:0;padding:0 20px}.n2-ss-edit-slide-top-tabs .n2-button.n2-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:2px solid #e0e6ed}.n2-ss-edit-slide-top-tabs .n2-button.n2-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-ss-edit-slide-top-tabs .n2-button.n2-active{background:#0c92df;color:#fff;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button.n2-active:not(.n2-first){border-left:2px solid #0c92df;margin-left:-2px}#n2-form-matrix-slide-settings{margin:0;border:0;border-radius:0}.n2-ss-slider-real-container{position:relative}.n2-ss-slider-outer-container{position:relative;float:left}.n2-ss-canvas-slider-container{padding-bottom:99px;float:left;margin:10px}.n2-ss-has-ruler .n2-ss-canvas-slider-container{margin:40px 0 0 40px}.n2-i-desktopPortrait:before{content:'\e925'}.n2-i-desktopLandscape:before{content:'\e95a'}.n2-i-tabletPortrait:before{content:'\e928'}.n2-i-tabletLandscape:before{content:'\e927'}.n2-i-mobilePortrait:before{content:'\e92a'}.n2-i-mobileLandscape:before{content:'\e929'}#n2-tab-basiccsspreset{background-color:#3c4958;z-index:3}#n2-tab-basiccsspreset>.n2-h2{margin-bottom:0}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-choose,.n2-editor-header .n2-ss-button-container>.n2-basiccss-back{display:none}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-back{display:inline-block}.n2-ss-preview-modal .n2-modal-window{background-color:#e9edf0}#n2-admin.n2-ss-mode-desktopPortrait .n2-ss-responsive-helper,.n2-ss-background-type-color .n2-ss-background-image-param,.n2-ss-background-type-color .n2-ss-background-video-param,.n2-ss-background-type-gradient .n2-ss-background-image-param,.n2-ss-background-type-gradient .n2-ss-background-video-param,.n2-ss-background-type-image .n2-ss-background-video-param,body[data-editormode=content] #n2-admin .n2-ss-responsive-helper{display:none}#n2-tab-animations-events td.n2-label{padding:0}#n2-tab-animations-events td.n2-element{padding:6px 0}.n2-ss-editor-window-notice{padding:8px 10px;line-height:18px;background:#6b7986;color:#fff}.n2-ss-editor-window-notice a{color:#ffb527}#n2-ss-slide-edit-slides{display:none;border-bottom:1px solid #e0e6ed}.n2-ss-show-slides #n2-ss-slide-edit-slides{display:block}.n2-ss-show-slides a.n2-ss-back-slides,.n2-ss-show-slides a.n2-ss-back-slides:before{color:#fff}.n2-ss-columns-element{background:#28313a}.n2-ss-columns-element-add-col{vertical-align:top;display:inline-block;background:#51b82d;width:28px;height:28px;border-radius:3px;margin:8px 0;cursor:pointer;text-align:center;color:#fff;font-size:16px}.n2-ss-columns-element-add-col .n2-i,.n2-ss-columns-element-container .n2-ss-columns-element-handle .n2-i{line-height:28px}.n2-ss-columns-element-container{vertical-align:top;position:relative;width:300px;display:inline-flex;padding:8px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;overflow:hidden}.n2-ss-columns-element-container>.n2-ss-columns-element-column{position:relative;flex:0 0 auto;background:#51b82d;height:28px;line-height:28px;width:25%;color:#fff;text-align:center;overflow:hidden;cursor:move;border-radius:3px;min-width:5px}.n2-ss-columns-element-container .n2-ss-columns-element-handle{display:block;width:11px;height:28px;background:#202934;flex:0 0 11px;border-radius:3px;margin:0 2px;cursor:ew-resize;color:#9aa7b2;text-align:center}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-handle{display:none}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column{margin-right:15px}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column:last-child{margin-right:0}.n2-ss-section-main-content{min-height:20px}#n2-ss-layer-window{z-index:100000;position:fixed;left:100px;top:100px;width:355px}#n2-ss-layer-window.n2-ss-layer-window-minized .n2-ss-layer-window-resizer,.n2-ss-has-layers.n2-ss-layer-edit-visible.n2-ss-preview-mode #n2-ss-layer-window,.n2-ss-layer-edit-visible.n2-ss-move-layer #n2-ss-layer-window,.n2-ss-layer-edit-visible.n2-ss-resize-layer #n2-ss-layer-window,body:not(.n2-ss-has-layers) #n2-ss-layer-window,body:not(.n2-ss-layer-edit-visible) #n2-ss-layer-window{display:none}#n2-ss-layer-window.n2-ss-layer-window-minized{height:30px!important}#n2-ss-layer-window.n2-ss-layer-window-minized .n2-i-minimize:before{content:'\e915'}#n2-ss-layer-window .n2-ss-layer-window-actions{display:none;position:absolute;top:0;left:-35px;width:32px;background-color:#202934;border-radius:3px}#n2-ss-layer-window .n2-ss-layer-window-actions>.n2-button{width:32px;height:32px;line-height:32px;color:#b0bdc7}#n2-ss-layer-window .n2-ss-layer-window-resizer{height:7px;width:100%;cursor:ns-resize;text-align:center;color:#95a1ab;bottom:0;background:#202934;border-bottom-left-radius:5px;border-bottom-right-radius:5px}#n2-ss-layer-window .n2-ss-layer-window-crop{position:relative;width:100%;height:100%;border-radius:3px;box-shadow:0 1px 10px RGBA(0,0,0,.5);overflow:hidden;background:#3c4958;z-index:2}.n2-ss-layer-window-title{position:relative;line-height:60px;height:60px;overflow:hidden;background:#202934;font-size:12px;color:#cbd6df;text-align:left}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav{position:absolute;top:0;line-height:30px;height:30px;margin:0 5px}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-left{left:0}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-right{right:0}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav>*{display:inline-block;width:20px;height:30px;line-height:30px;font-size:16px;color:#fff;padding:0;vertical-align:top;text-align:center}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav .n2-i{vertical-align:middle}.n2-ss-layer-window-title .n2-ss-layer-window-title span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 60px;text-align:center}.n2-ss-layer-window-breadcrumb{display:none;height:22px;font-size:11px;color:#b2bfc9;background-color:#202934;border-bottom:1px solid #1a2028;text-transform:uppercase;padding:0 5px}.n2-ss-layer-window-breadcrumb.n2-has-breadcrumb{display:block}.n2-ss-layer-window-breadcrumb *{display:inline-block;height:22px;vertical-align:top;line-height:22px}.n2-window-title-structure-nav span{padding:0 5px;cursor:pointer}.n2-window-title-structure-nav .n2-i-mini-arrow-thin{font-size:16px;padding:0}.n2-window-title-structure-nav:last-child{color:#fff}.n2-window-title-structure-nav:last-child .n2-i-mini-arrow-thin{display:none}#n2-tabbed-slide-editor-settings .n2-tabs{position:relative;overflow-y:auto;overflow-x:hidden}#n2-ss-layer-window table,#n2-ss-layer-window tbody,#n2-ss-layer-window tr{display:block}#n2-ss-layer-window td{display:block;width:auto}#n2-ss-layer-window .n2-label{background:#3c4958;border-top:1px solid #303b47;padding:3px 10px 0}#n2-ss-layer-window .n2-empty-label{padding:0;height:4px}#n2-ss-layer-window .n2-empty-group-label{padding:0;height:0}#n2-ss-layer-window .n2-label label{color:#b2bfc9;font-size:10px}#n2-ss-layer-window .n2-element{background:#3c4958;border-top:0;padding:0}#n2-ss-layer-window textarea{max-width:290px!important;width:290px!important}#n2-ss-layer-window .n2-form-element-button{max-width:38px;overflow:hidden}#n2-ss-layer-window .n2-sidebar-row{line-height:34px;background:#28313a}#n2-ss-layer-window .n2-list li,#n2-ss-layer-window .n2-sidebar-row{border-bottom:1px solid RGBA(0,0,0,.2)}#n2-ss-layer-window .n2-button-m{height:24px;line-height:24px}#n2-ss-layer-window .n2-sidebar-tab-switcher{border:0;border-collapse:separate}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td{font-size:11px;line-height:47px;height:47px;border:1px solid #1a2028;border-left:0;color:#b2bfc9}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td .n2-i{font-size:32px;line-height:47px}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td.n2-active{background:#0c92df;color:#fff}#n2-ss-layer-window .n2-has-underline>.n2-underline::after,#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:none}#n2-ss-layer-window.n2-ss-has-design-option .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:table-cell}#n2-ss-layer-window .n2-ss-layer-window-title{line-height:30px;height:30px;cursor:move;border-top-left-radius:5px;border-top-right-radius:5px}#n2-ss-layer-window .n2-ss-layer-window-title .n2-ss-layer-window-title-inner{white-space:nowrap;margin:0 10px;text-align:center}#n2-ss-layer-window .ui-autocomplete{padding:0;max-height:200px;overflow-y:auto;overflow-x:hidden}#n2-ss-layer-window .n2-form-element-autocomplete .ui-autocomplete .ui-menu-item{padding-right:20px}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner>a,#n2-ss-layer-window .n2-ss-generator-param{display:none}.n2-ss-dynamic-slide #n2-ss-layer-window .n2-ss-generator-param{display:block}#n2-tabbed-animations-tabbed>.n2-table{border-spacing:8px;border-collapse:separate;background:#28313a;border-bottom:1px solid #20282f}#n2-tabbed-animations-tabbed .n2-sidebar-tab-switcher .n2-td{line-height:28px;height:28px;border:0;border-radius:50px}#n2-tabbed-animations-tabbed .n2-editor-header.n2-h2{background:#303b47;border-bottom:1px solid #28313a;position:relative}.n2-ss-small-more{float:right;margin:-38px 20px 0}html[dir=rtl] .n2-ss-small-more{float:left}.n2-button-single-animation-play.n2-active .n2-i:before{content:'\e607'}#n2-ss-add-sidebar{background:#212d3a;position:absolute;left:-1px;top:54px;bottom:-1px;width:50px;text-align:center}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner{position:relative;padding-top:.01px}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner>*{margin-top:10px;color:#80a3b5}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner>.n2-button-blue,.n2-ss-theme-dark .n2-ruler>span span{color:#fff}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner>*{margin-top:0}#n2-ss-add-sidebar.n2-active{width:341px;z-index:1010}#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button{margin:0;background:0 0;position:absolute;top:16px;right:5px}#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button .n2-i:before{content:"\e90a";color:#b2bfc9}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner{width:341px!important}#n2-ss-add-sidebar.n2-active .n2-ss-available-layers{display:block}.n2-ss-available-layers .n2-sidebar-tab-switcher{border:0}.n2-ss-available-layers-container{width:300px;margin:0 auto;padding:10px 0}.n2-ss-slide-item-group{color:#b2bfc9;padding:4px 5px 1px}.n2-ss-addlayer .n2-ss-available-layers{display:none;box-sizing:border-box;white-space:normal;text-align:left}.n2-ss-core-item{display:inline-block;margin:5px;background-color:#6b7986;color:#fff;line-height:20px;cursor:pointer;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:90px;height:80px;z-index:1000}.n2-ss-core-item:before{font-family:'Nextend';font-size:32px;content:"\e943";display:block;line-height:32px;margin-top:20px}.n2-ss-core-item[data-item=heading]:before{content:"\e945"}.n2-ss-core-item[data-item=text]:before{content:"\e944"}.n2-ss-core-item[data-item=button]:before{content:"\e942"}.n2-ss-core-item[data-item=imagearea]:before{content:"\e950"}.n2-ss-core-item[data-item=icon2]:before,.n2-ss-core-item[data-item=icon]:before{content:"\e941"}.n2-ss-core-item[data-item=input]:before{content:"\e939"}.n2-ss-core-item[data-item=iframe]:before{content:"\e938"}.n2-ss-core-item[data-item=area]:before{content:"\e937"}.n2-ss-core-item[data-item=list]:before{content:"\e93e"}.n2-ss-core-item[data-item=caption]:before{content:"\e940"}.n2-ss-core-item[data-item=transition]:before{content:"\e93f"}.n2-ss-core-item[data-item=youtube]:before{content:"\e93d"}.n2-ss-core-item[data-item=vimeo]:before{content:"\e93c"}.n2-ss-core-item[data-item=video]:before{content:"\e93b"}.n2-ss-core-item[data-item=html]:before{content:"\e93a"}.n2-ss-core-item[data-item=progressbar]:before{content:"\e982"}.n2-ss-core-item[data-item=imagebox]:before{content:"\e983"}.n2-ss-core-item[data-item=counter]:before{content:"\e984"}.n2-ss-core-item[data-item=circlecounter]:before{content:"\e985"}.n2-ss-core-item[data-item=audio]:before{content:"\e986"}.n2-ss-core-item[data-item=structure]:before{font-size:74px;margin-top:24px}.n2-ss-core-item[data-item=structure][data-type="1col"]:before{content:"\e967"}.n2-ss-core-item[data-item=structure][data-type="2col"]:before{content:"\e966"}.n2-ss-core-item[data-item=structure][data-type="3col"]:before{content:"\e961"}.n2-ss-core-item[data-item=structure][data-type="4col"]:before{content:"\e95f"}.n2-ss-core-item[data-item=structure][data-type="2col-60-40"]:before{content:"\e965"}.n2-ss-core-item[data-item=structure][data-type="2col-40-60"]:before{content:"\e964"}.n2-ss-core-item[data-item=structure][data-type="2col-80-20"]:before{content:"\e963"}.n2-ss-core-item[data-item=structure][data-type="2col-20-80"]:before{content:"\e962"}.n2-ss-core-item[data-item=structure][data-type="3col-20-60-20"]:before{content:"\e960"}.n2-ss-core-item[data-item=structure][data-type=special]:before{content:"\e95d"}#n2-ss-toolbar{z-index:9;position:relative;height:28px;line-height:28px;background:#f2f5fa;white-space:nowrap;padding:13px 10px}.n2-ss-slider-visible #n2-ss-slide-canvas-container #n2-ss-toolbar{height:auto}#n2-ss-slide-canvas-container.n2-scroll-disable #n2-ss-toolbar{height:28px;border-bottom:0}#n2-ss-toolbar>*{line-height:28px;height:28px;vertical-align:top;display:inline-block}#n2-ss-toolbar .n2-ss-tool{margin:0 5px;display:inline-block;vertical-align:top!important}#n2-ss-toolbar .n2-ss-tool.n2-form-element-text{height:24px;line-height:24px;position:relative}#n2-ss-toolbar .n2-text-sub-label{font-size:16px}#n2-ss-layer-list>.n2-list>li li,.n2-ss-theme-dark #n2-ss-slide-canvas-container-inner,.n2-ss-theme-dark .n2-ruler-vertical{background-color:#28313a}.n2-ss-preview-mode .n2-main-top-bar{opacity:0}#n2-ss-slide-canvas-settings{display:inline-block;position:relative}#n2-ss-slide-canvas-settings>.n2-button{width:28px;padding:0;text-align:center}#n2-ss-slide-canvas-settings.n2-active>.n2-button{background-color:#0c92df;border-color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel{position:absolute;left:0;top:28px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner{margin-top:6px;min-width:180px;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);background-color:#fff;border-radius:3px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner>*{display:block;line-height:32px;margin:0 10px;position:relative;text-align:left}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner a{color:#7b8898}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-panel-action{color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick{display:block;position:absolute;right:0;top:8px;border-radius:3px;border:2px solid #8793a2;width:12px;height:12px}#n2-ss-layer-show-on,#n2-ss-slide-canvas-settings.n2-active .n2-ss-settings-panel{display:inline-block}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-setting-tick{border-color:#1999e3;background-color:#1999e3}#n2-ss-slide-canvas-settings .n2-ss-settings-panel,#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick .n2-i{display:none}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-i{display:inline-block;color:#fff;font-size:16px;line-height:12px;margin:0 -2px}#n2-ss-toolbar .n2-button-grey{background-color:#a1aeb5}#n2-ss-toolbar .n2-radio-option{background-color:#a1aeb5;border-left:1px solid #8c99a1}#n2-ss-toolbar .n2-radio-option.n2-first{border-left-width:0}#n2-ss-toolbar .n2-radio-option.n2-active{background-color:#0c92df;border-color:#0c92df}#n2-ss-toolbar .n2-radio-option.n2-sub-active{background-color:#51b82d;border-color:#51b82d}#n2-ss-toolbar .n2-ss-tool.n2-button{height:28px;line-height:28px;background-color:#a1aeb5}#n2-ss-toolbar .n2-ss-tool.n2-button-icon{padding:0;width:28px}#n2-ss-toolbar .n2-ss-tool.n2-button.n2-active{background-color:#0c92df}#n2-ss-toolbar .n2-ss-tool.n2-button.n2-sub-active{background-color:#51b82d}#n2-ss-toolbar .ui-autocomplete{max-width:100%}#n2-ss-layer-parent-linker,#n2-ss-theme,#n2-ss-toolbar #n2-ss-theme.n2-active{width:28px;height:28px;line-height:28px;padding:0;background-color:#a1aeb5}#n2-ss-theme.n2-active .n2-i:before{content:"\e64c"}#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-ss-ll-dragging-parent{background:#000}#n2-ss-layer-list>.n2-list>li{background-color:#303b47}#n2-ss-layer-list .n2-list>li{line-height:31px}#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-active,#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-selected,.n2-list .n2-ss-layerlist-row.n2-active,.n2-list .n2-ss-layerlist-row.n2-selected{background:#1681c1}#n2-ss-layer-list .n2-ss-layer-content-row .n2-list>li .n2-actions-left,#n2-ss-layer-list .n2-ss-layerlist-row-row .n2-list>li .n2-actions-left,#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions,#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions-left{display:none}#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging{position:absolute;left:0;width:100%;height:32px;overflow:hidden;opacity:.5}#n2-ss-layers .nextend-sortable-placeholder{border:0;position:relative;height:0;overflow:visible;z-index:1001}#n2-ss-layers .nextend-sortable-placeholder div{position:absolute;left:0;top:-1px;width:100%;height:0;box-shadow:0 0 0 2px #0c92df}#n2-ss-layers ul .nextend-sortable-placeholder div{margin-left:30px}#n2-ss-layers ul ul .nextend-sortable-placeholder div{margin-left:50px}#n2-ss-layers ul ul ul .nextend-sortable-placeholder div{margin-left:70px}#n2-ss-layers ul ul ul ul .nextend-sortable-placeholder div{margin-left:90px}#n2-ss-layers ul ul ul ul ul .nextend-sortable-placeholder div{margin-left:110px}#n2-ss-layers ul ul ul ul ul ul .nextend-sortable-placeholder div{margin-left:130px}#n2-ss-layers .ui-sortable-helper{opacity:.5}#n2-ss-layers-table .n2-list li,.n2-list .n2-ss-layer-group-row{border-bottom:0}#n2-ss-layers-table .n2-ss-layer-title{border-bottom:1px solid RGBA(0,0,0,.2)}#n2-ss-layers-table .n2-active>.n2-ss-layer-title,#n2-ss-layers-table .n2-selected>.n2-ss-layer-title{border-color:#1681c1}.n2-ss-layer-group-row ul.n2-list{margin-top:-10px;padding-top:10px}.n2-ss-layer-title{display:block;line-height:31px;position:relative;cursor:pointer;overflow:hidden}.n2-ss-layer-title span{margin:0 30px;display:block;width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-ss-layer-group-row>.n2-ss-layer-title span,ul>li>.n2-ss-layer-title span{margin:0 30px}.n2-ss-layer-icon{position:absolute;top:2px}ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:3px}#n2-ss-layer-list>ul>li.n2-ss-layer-content-row>.n2-ss-layer-title span,#n2-ss-layer-list>ul>li.n2-ss-layer-row-row>.n2-ss-layer-title span,ul>li .n2-inline-form,ul>li>ul>li>.n2-ss-layer-title span{margin:0 50px}#n2-ss-layer-list>ul>li.n2-ss-layer-content-row>.n2-ss-layer-title .n2-ss-layer-icon,#n2-ss-layer-list>ul>li.n2-ss-layer-row-row>.n2-ss-layer-title .n2-ss-layer-icon,ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:23px}ul>li>ul>li>ul>li .n2-inline-form,ul>li>ul>li>ul>li>.n2-ss-layer-title span{margin:0 70px}ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:43px}ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title span,ul>li>ul>li>ul>li>ul>li>ul>li .n2-inline-form{margin:0 90px}ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:63px}ul>li>ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title span{margin:0 110px}ul>li>ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:83px}ul>li>ul>li>ul>li>ul>li>ul>li>ul>li .n2-ss-layer-title span{margin:0 130px}ul>li>ul>li>ul>li>ul>li>ul>li>ul>li .n2-ss-layer-title .n2-ss-layer-icon{left:103px}.n2-ss-layerlist-row .n2-inline-form input{background:#3c4958 0 0;color:#b2bfc9;font-size:11px;border:2px solid #28313a;line-height:24px;padding:0 10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:0}.n2-ss-layerlist-row .n2-inline-form input:focus{box-shadow:none}.n2-ss-layer-title .n2-actions{position:absolute;top:0;right:0;padding:0 6px;cursor:default;opacity:.2}.n2-active>.n2-ss-layer-title .n2-actions{opacity:1}.n2-ss-layer-title .n2-actions-left{position:absolute;top:0;left:0;padding:2px 0;cursor:default;line-height:24px}html[dir=rtl] .n2-ss-layer-title .n2-actions-left{padding:0 16px 0 0}#n2-ss-layer-list .n2-ss-layerlist-row.n2-active>.n2-ss-layer-title,#n2-ss-layer-list .n2-ss-layerlist-row.n2-active>.n2-ss-layer-title .n2-i,#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title,#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title .n2-i{color:#fff}.n2-ss-layer-title .n2-actions a,.n2-ss-layer-title .n2-actions-left a{display:inline-block;padding:0}.n2-ss-layer-title .n2-actions-left i{padding:0 2px;vertical-align:middle}.n2-ss-layer-title .n2-i-order{cursor:move}.n2-ss-layer-status{display:inline-block;position:relative;margin:0 3px}#n2-ss-layer-list a .n2-i,#n2-ss-layer-list a:HOVER .n2-i{color:#b2bfc9}.n2-ss-layer-status-hidden .n2-ss-layer-status .n2-ss-sc-hide .n2-i:before{content:"\e923"}.n2-ss-layer-list-top-bar .n2-h2{display:inline-block;line-height:28px;color:#fff;padding:0 5px}.n2-ss-layer-list-opener{width:28px;display:inline-block;padding:0;vertical-align:top;margin:0 5px}#n2-ss-layers.n2-active .n2-ss-layer-list-opener>.n2-i:before{content:"\e92c"}.n2-closed .n2-i-col:before,.n2-closed .n2-i-row:before,.n2-ss-layer-list-group-opener.n2-closed .n2-i:before{content:"\e921"}#n2-ss-layers{position:fixed;bottom:0;width:340px;margin:0 -1px;height:48px;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;display:none;background-color:#28313a;z-index:1019}#n2-ss-layers.n2-active{height:100px}#n2-ss-layers:not(.n2-active){width:50px!important}#n2-ss-layers:not(.n2-active) .n2-ss-layers-sidebar{width:50px}#n2-ss-layers:not(.n2-active) .n2-ss-layer-list-layers-top-bar>div{display:none!important}.n2-ss-has-layers #n2-ss-layers{display:block}#n2-ss-layers-table .n2-td{position:relative;vertical-align:top}#n2-ss-layers-table .n2-ss-layers-sidebar{width:340px}.n2-ss-layer-list-top-bar{position:relative;padding:10px 5px 9px;height:28px;background-color:#212d3a;border-bottom:1px solid #20282f}#n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar{cursor:ns-resize}.n2-ss-layer-list-bulk-top-bar,[data-component=layer] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar{display:none}[data-component=layer] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-bulk-top-bar{display:block}.n2-ss-layer-list-top-bar .n2-form-element-text{margin:0}.n2-ss-layers-sidebar-rows{position:relative;height:100%;overflow-x:hidden;overflow-y:visible}#n2-ss-layers .n2-form-element-text{margin:0 10px;line-height:2px}#n2-ss-layers .n2-text-sub-label{width:30px;text-align:center;overflow:hidden}.n2-ss-layer-list-bulk-top-bar{text-align:right;color:#fff;vertical-align:top;padding:10px 15px 9px}.n2-ss-layer-list-bulk-top-bar .n2-button{vertical-align:middle}.n2-ss-layer-list-bulk-top-bar .n2-button+.n2-button,.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 0 0 5px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-button+.n2-button,html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 5px 0 0}.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{position:absolute;top:10px;right:5px;margin:0 10px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{right:auto;left:5px}.n2-ss-layer-list-topbar-control{text-align:right;color:#fff;padding:0 10px;vertical-align:top}#n2-ss-layers .n2-ss-layer-list-topbar-control{padding:0}.n2-ss-layer-list-topbar-control .n2-button{padding:0;width:28px;font-size:16px;vertical-align:middle}.n2-ss-layer-list-topbar-control .n2-button i{line-height:inherit}.n2-play.n2-active i:before{content:"\e607"}#n2-ss-slide-canvas-container{background-color:#fff;border-width:1px 0 0;padding-bottom:400px;padding-bottom:40vh;position:relative;border-top:1px solid #ccd1d6}#smartslider-form>div{margin-bottom:-1px}#n2-ss-slide-canvas-container-inner{position:relative;z-index:1;overflow:hidden;border-bottom:1px solid #ccd1d6;background-color:#e9edf0;margin-left:49px;border-top:1px solid #ccd1d6}.n2-ss-position-display{display:none;position:absolute;border-radius:3px;z-index:10000;line-height:16px;padding:4px 6px;color:#fff;font-size:10px;background:RGBA(32,41,52,.95)}.n2-ss-position-display.n2-active{display:block}#n2-ss-0 .n2-ss-slide-border{display:none;position:absolute;background:#a1aeb5;width:1px;height:1px}#n2-ss-0 .n2-ss-slide-border-left{left:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-right{right:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-top{left:0;top:0;width:100%}#n2-ss-0 .n2-ss-slide-border-bottom{left:0;bottom:0;width:100%}#n2-ss-0:HOVER .n2-ss-slide-border{display:block}.n2-ss-layer-placeholder{position:relative;height:0;width:100%;box-shadow:0 0 0 2px #0c92df;display:block;z-index:100000}.n2-ss-layer-inline>.n2-ss-layer-placeholder,.n2-ss-layer-row>.n2-ss-layer-placeholder{height:auto;width:0;align-self:stretch;flex:0 0 auto}.n2-ss-core-item.n2-canvas-item-drag{opacity:.5;z-index:9999;margin:0}.n2-canvas-item-drag{opacity:.5!important}.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.ui-resizable,.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.ui-resizable{box-shadow:inset 0 0 0 1px #0c92df}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}div#n2-ss-0 .n2-ss-layer-ui-label-container{display:none;position:absolute;left:0;top:0;text-align:left;line-height:16px;z-index:91;white-space:nowrap;border-bottom-right-radius:2px;overflow:hidden;background:#0c92df;max-width:100%;max-height:100%}div#n2-ss-0 .n2-ss-layer-ui-label-container:HOVER{max-width:none;max-height:none}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active>.n2-ss-layer-ui-label-container,div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-over-delayed>.n2-ss-layer-ui-label-container{display:block}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-ui-label{display:inline-block;height:16px;font-size:10px;line-height:16px;color:#fff;padding:0 5px;vertical-align:top;text-transform:uppercase;border-left:1px solid #0b7dbe}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action{padding:0;cursor:pointer;font-size:16px;display:none}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-active>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action,#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container:HOVER .n2-ss-layer-ui-label-action{display:inline-block}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label:first-child{border-left:0}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-layer-move{cursor:move}div#n2-ss-0 .n2-ss-layer-ui-label-container.invisible{visibility:hidden}.n2-ss-layer[data-type=col].n2-highlight{box-shadow:inset 0 0 0 1px #0c92df}div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-type=col]{z-index:2}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active{box-shadow:inset 0 0 0 1px #0c92df}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER #n2-ss-0 .n2-ss-layer[data-type=row].n2-active,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer .n2-ss-layer[data-type=col].n2-active{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-move-layer .n2-ss-layer[data-type=col]{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-move-layer #n2-ss-0 .n2-ss-layer:HOVER{box-shadow:none}div#n2-ss-0 .n2-ss-layer[data-type=col] .n2-ss-layer.ui-draggable-dragging,div#n2-ss-0 .n2-ss-layer[data-type=content] .n2-ss-layer.ui-draggable-dragging{z-index:100000;outline:0!important}.ui-item-overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.n2-ss-select-layer-mode .n2-ss-layer-selected .ui-item-overlay{display:block;background-color:RGBA(0,132,255,.4)}.n2-ss-item-html .ui-item-overlay,.n2-ss-item-iframe .ui-item-overlay{display:block}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-resizable-ne,.n2-ss-layer .ui-resizable-nw,.n2-ss-layer .ui-resizable-se,.n2-ss-layer .ui-resizable-sw{opacity:0}.n2-ss-layer .ui-resizable-ne:HOVER,.n2-ss-layer .ui-resizable-nw:HOVER,.n2-ss-layer .ui-resizable-se:HOVER,.n2-ss-layer .ui-resizable-sw:HOVER,.n2-ss-layer-cc:HOVER,.ui-resizable-e:HOVER,.ui-resizable-n:HOVER,.ui-resizable-s:HOVER,.ui-resizable-w:HOVER{opacity:1}.n2-ss-layer[data-align=center][data-valign=bottom] .ui-resizable-s,.n2-ss-layer[data-align=center][data-valign=middle] .n2-ss-layer-cc,.n2-ss-layer[data-align=center][data-valign=top] .ui-resizable-n,.n2-ss-layer[data-align=left][data-valign=bottom] .ui-resizable-sw,.n2-ss-layer[data-align=left][data-valign=middle] .ui-resizable-w,.n2-ss-layer[data-align=left][data-valign=top] .ui-resizable-nw,.n2-ss-layer[data-align=right][data-valign=bottom] .ui-resizable-se,.n2-ss-layer[data-align=right][data-valign=middle] .ui-resizable-e,.n2-ss-layer[data-align=right][data-valign=top] .ui-resizable-ne{background:#0c92df;opacity:1;border:1px solid #fff}.n2-ss-layer-cc{position:absolute;font-size:.1px;display:block;z-index:92}.n2-ss-layer .ui-customresizable-handle,.n2-ss-layer .ui-resizable-handle{border-radius:50px}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-customresizable-handle,.n2-ss-layer .ui-resizable-handle{display:none!important;background-image:none;border:1px solid #0c92df;height:7px;width:7px;background:#fff}.n2-ss-layer .ui-column-width-handle{display:none!important;position:absolute;top:25%;height:50%;cursor:ew-resize;width:5px;background:RGBA(12,146,223,.5);z-index:88;opacity:1;box-sizing:border-box!important;border-radius:5px}.n2-ss-layer .ui-column-width-handle:HOVER{background:RGBA(12,146,223,1)}.n2-ss-layer .ui-spacing-handle{display:none!important;z-index:89;background:#0c92df;opacity:.5;overflow:hidden}.n2-ss-layer .ui-spacing-handle.ui-spacing-under-spacing,.n2-ss-layer .ui-spacing-handle:HOVER{opacity:.8}.n2-ss-layer .ui-resizable-n{left:50%;top:-4px;margin-left:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-n{min-height:5px;cursor:s-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-n{top:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-n{left:0;bottom:100%;width:100%}.n2-ss-layer .ui-customresizable-e,.n2-ss-layer .ui-resizable-e{right:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-e{min-width:5px;cursor:w-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-e{top:25%;margin-top:0;right:0;height:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-e{top:0;left:100%;height:100%}.n2-ss-layer .ui-customresizable-s,.n2-ss-layer .ui-resizable-s{bottom:-4px;left:50%;margin-left:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-s{min-height:5px;cursor:n-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-s{bottom:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-s{bottom:auto;top:100%;left:0;width:100%}.n2-ss-layer .ui-customresizable-w,.n2-ss-layer .ui-resizable-w{left:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-w{min-width:5px;cursor:e-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-w{top:25%;margin-top:0;left:0;height:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-w{left:auto;right:100%;top:0;height:100%}.n2-ss-layer .ui-resizable-ne{right:-4px;top:-4px}.n2-ss-layer .ui-resizable-se{right:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-sw{left:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-nw{left:-4px;top:-4px}.n2-ss-layer .n2-ss-layer-cc{left:50%;top:50%;margin-top:-4px;margin-left:-4px}.n2-ss-layer.n2-active:HOVER{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.n2-ss-layer-cc,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-customresizable-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-resizable-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-cc,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-column-width-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-layer.n2-active:HOVER>.ui-customresizable-handle,.n2-ss-layer.n2-active:HOVER>.ui-resizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.n2-ss-layer-row>.ui-column-width-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.ui-customresizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.ui-resizable-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-spacing-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-content>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-resizable-resizing>div>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing>.ui-spacing-handle,.ui-resizable-resizing>.ui-spacing-handle,.ui-spacing-resizing>.ui-spacing-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing>.ui-spacing-handle.ui-spacing-under-spacing{opacity:1}#n2-ss-0 .n2-ss-layer-row.n2-ss-row-wrapped .ui-column-width-handle,#n2-ss-0 .ui-spacing-resizing .ui-column-width-handle{display:none!important}.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-customresizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-resizable-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active{overflow:visible!important}.n2-ss-item{position:relative;float:left;width:100%}.n2-ss-item-area,.n2-ss-item-imagearea,.n2-ss-item-video,.n2-ss-item-vimeo,.n2-ss-item-youtube{height:100%}.n2-ss-editor-group-mode-only,.n2-ss-editor-layer-mode-only,[data-placement=""] [data-placement],[data-placement=absolute] [data-placement]:not([data-placement=absolute]):not([data-placement=all]),[data-placement=content] [data-placement]:not([data-placement=content]):not([data-placement=all]),[data-placement=default] [data-placement]:not([data-placement=default]):not([data-placement=all]),[data-placement=group] [data-placement]:not([data-placement=group]):not([data-placement=all]),[data-placement=normal] [data-placement]:not([data-placement=normal]):not([data-placement=all]){display:none!important}.n2-ss-has-layers[data-component=group] .n2-ss-editor-group-mode-only,.n2-ss-has-layers[data-component=layer] .n2-ss-editor-layer-mode-only{display:inline-block!important}div#n2-ss-0 .n2-ss-layer-chain-parent{position:absolute;z-index:10;right:10px;top:10px;line-height:18px;font-size:12px;width:18px;display:none}.n2-ss-layer-edit-visible .n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent .n2-ss-layer-chain-parent,.n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent:HOVER .n2-ss-layer-chain-parent{display:inline-block}.n2-ss-layer-highlight{position:absolute;background:#0c92df;z-index:91;opacity:1}.n2-ss-layer-highlight-n{top:0;left:0;width:100%;height:1px}.n2-ss-layer-highlight-e{top:0;right:0;width:1px;height:100%}.n2-ss-layer-highlight-s{bottom:0;left:0;width:100%;height:1px}.n2-ss-layer-highlight-w{top:0;left:0;width:1px;height:100%}#n2-ss-0 .n2-ss-layer-row .n2-ss-layer-content{min-height:20px}[data-devicespecific]{position:relative}#n2-ss-devicespecific-settings{position:absolute;bottom:40px;left:0;padding:0 10px;white-space:nowrap;z-index:2}#n2-ss-devicespecific-settings *{cursor:pointer;background:#a1aeb5;display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;font-size:16px;color:#fff;border-left:1px solid #5b6874}#n2-ss-devicespecific-settings>:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:0}#n2-ss-devicespecific-settings>:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-ss-mode-desktopLandscape #n2-ss-devicespecific-settings .n2-i-mini-desktop-landscape,.n2-ss-mode-desktopPortrait #n2-ss-devicespecific-settings .n2-i-mini-desktop-portrait,.n2-ss-mode-mobileLandscape #n2-ss-devicespecific-settings .n2-i-mini-mobile-landscape,.n2-ss-mode-mobilePortrait #n2-ss-devicespecific-settings .n2-i-mini-mobile-portrait,.n2-ss-mode-tabletLandscape #n2-ss-devicespecific-settings .n2-i-mini-tablet-landscape,.n2-ss-mode-tabletPortrait #n2-ss-devicespecific-settings .n2-i-mini-tablet-portrait{background:#0c92df;border-color:#0b7dbe}.n2-ss-layer[data-type=col]>.n2-ss-layer-ui-label-container>.n2-ss-layer-ui-label-self{cursor:move}.n2-highlight-structure .n2-ss-layer[data-type=col]{box-shadow:0 0 0 2px #0c92df}.n2-ss-layer-under-creation{visibility:hidden!important}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layers-container>.n2-ss-layer>.n2-ss-layer-ui-label-container>.n2-ss-layer-ui-label-up,[data-editormode=canvas] div#n2-ss-0 .n2-ss-layer[data-type=content].n2-ss-content-empty{display:none}[data-editormode=content] div#n2-ss-0 .n2-ss-layer[data-type=content].n2-ss-content-empty{height:100%}div#n2-ss-0 .n2-ss-layer-content .n2-ss-layer.n2-active:HOVER{z-index:10}#n2-ss-editor-mode .n2-i{font-size:16px;vertical-align:middle}.n2-context-menu{display:none;position:absolute;left:0;top:0;font-family:"Montserrat",Arial,sans-serif;font-size:13px;background-color:#202934;color:#cedae2;z-index:1000000;border-radius:3px;line-height:25px}.n2-context-menu.n2-active{display:block}.n2-context-menu>div{padding:3px 10px;cursor:pointer}.n2-context-menu>div:HOVER{background-color:RGBA(255,255,255,.2)}.n2-context-menu>div *{margin:0 3px;vertical-align:middle}.n2-context-menu>div .n2-i{font-size:16px}#n2-ss32-content-mode-tutorial{background-color:#212d3a;margin:0 -1px;z-index:2;position:relative;color:#fff}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container{display:flex;align-items:center;max-width:960px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container>div{margin:20px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container a+a{margin:0 20px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container p{color:#b2bfc9;font-size:14px;margin:20px 0}.n2-ss-section-outer{min-height:10px}[data-visibility=hidden],[data-visibility=hidden] *{visibility:hidden!important}div div#n2-ss-0 .n2-ss-static-slide .n2-ss-section-outer,div div#n2-ss-0 .n2-ss-static-slide div[data-type=content],div div#n2-ss-0 .n2-ss-static-slide div[data-type=content] div.n2-ss-section-main-content{visibility:visible}.n2-ss-sample-slides-container{display:none;position:relative;margin:0 -1px -1px;background-color:#202934;z-index:2}.n2-ss-add-slide-with-sample .n2-main-top-bar{display:none}.n2-ss-add-slide-with-sample .n2-ss-sample-slides-container{display:block}.n2-ss-add-slide-with-sample #n2-ss-devices,.n2-ss-add-slide-with-sample #n2-ss-toolbar,.n2-ss-add-slide-with-sample #smartslider-form,.n2-ss-add-slide-with-sample .n2-ss-edit-slide-top{display:none}.n2-ss-add-slide-with-sample #n2-ss-add-sidebar{top:0}.n2-ss-add-slide-with-sample #n2-ss-slide-canvas-container-inner{border-top:0}.n2-ss-sample-slides-container iframe{width:100%;height:240px;border:0}.n2-ss-sample-slide-settings{padding:20px;background:#212d3a;height:68px;display:flex}.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col{flex:0 0 auto;margin:0 10px;display:flex;flex-direction:column;justify-content:space-around}.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting{flex:0 0 auto;display:flex;align-items:center}.n2-ss-sample-slide-setting-label{color:#b2bfc9;font-size:10px;text-transform:uppercase;padding-right:20px}#n2-ss-sample-slide-setting-background-image{position:relative;width:100px;height:68px;background-size:cover;border-radius:5px;overflow:hidden;cursor:pointer}#n2-ss-sample-slide-setting-background-image .n2-i-close{position:absolute;right:0;top:0;display:block;width:16px;height:16px;border-bottom-left-radius:5px;background-color:#526377;color:#fff;font-size:14px;text-align:center;line-height:16px;cursor:pointer}.n2-ss-sample-slide-setting-field{margin-left:auto}.n2-ss-sample-slide-setting-field .ui-slider{width:100px;position:relative;background:#374d64;height:6px;margin:10px;border-radius:10px}.n2-ss-sample-slide-setting-field .ui-slider .ui-slider-handle{position:absolute;top:0;z-index:2;width:14px;height:14px;-ms-touch-action:none;touch-action:none;background:#fff;margin:-4px -7px 0;border-radius:50px;cursor:ew-resize}.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific,.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific{display:none}.n2-ss-sample-slide-settings.n2-ss-has-gradient .n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific,.n2-ss-sample-slide-settings.n2-ss-has-image .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific{display:flex}.n2-ss-scrollbar-wrapper{background-color:#212d3a;padding:4px;height:8px;z-index:10}.n2-scroll-disable .n2-ss-scrollbar-wrapper{visibility:hidden;height:0;padding:0}.n2-ss-scrollbar-wrapper .track{position:relative;height:8px}.n2-ss-scrollbar-wrapper .thumb{position:absolute;top:0;background-color:#49586a;height:8px;cursor:default;width:20px;z-index:2;border:0;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light{background-color:#b9c3c9}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light .thumb{background-color:#fff}#n2-ss-zoom{width:280px;text-align:center;vertical-align:middle}#n2-ss-zoom .n2-ss-slider-zoom-container{position:relative;display:inline-block;vertical-align:middle;width:150px;height:34px;padding:0 23px}#n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{position:absolute;top:9px;color:#6b7986;font-size:16px}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-minus{left:-18px}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-plus{right:-18px}.n2-ss-slider-zoom-bg{position:absolute;left:0;top:50%;margin-top:-3px;width:100%;background:#505c69;height:6px;border-radius:3px}#n2-ss-slider-zoom{height:100%;position:relative;margin:0;background:0 0;border:none;border-radius:0}#n2-ss-slider-zoom .ui-slider-range{display:none}#n2-ss-slider-zoom .ui-slider-handle{position:absolute;top:50%;display:block;width:47px;height:22px;margin-top:-11px;margin-left:-23px;background-color:#e6eaee;background:#e6eaee;border:none;border-radius:3px;z-index:2;color:#7b8898;font-size:10px;text-align:center;line-height:22px;cursor:pointer}.n2-ss-slider-zoom-1{position:absolute;left:50%;top:0;margin-left:-1.5px;width:3px;height:100%;background-color:#6b7986}#n2-ss-lock{display:inline-block;position:absolute;right:-36px;top:9px;cursor:pointer;line-height:16px}#n2-ss-lock .n2-i{color:#6b7986;font-size:16px}#n2-ss-lock.n2-active .n2-i:before{content:"\e609"}.n2-ss-device-zoomer{min-width:280px}.n2-ss-device-zoomer #n2-ss-zoom{padding:10px 0;background:#212d3a;margin:0 auto;display:none;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.n2-ss-device-zoomer:HOVER #n2-ss-zoom{display:block}.n2-ss-device-zoomer .n2-ss-slider-zoom-1,.n2-ss-device-zoomer .n2-ss-slider-zoom-bg{background-color:#374d64}.n2-ss-device-zoomer #n2-ss-zoom #n2-ss-lock>.n2-i,.n2-ss-device-zoomer #n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{color:#4e667f}.n2-ss-device-zoomer #n2-ss-slider-zoom .ui-slider-handle{background-color:#526a80;color:#fff}#n2-ss-devices{height:60px}#n2-ss-devices.n2-ss-devices-compact>.n2-controls-panel{width:260px}#n2-ss-devices .n2-table{font-size:32px;color:#80a3b5;margin:0 auto}.n2-lb-header #n2-ss-devices .n2-table{color:#a4b0b7}html[dir=rtl] #n2-ss-devices .n2-table{float:left}#n2-ss-devices .n2-td{height:60px;vertical-align:middle;text-align:center;padding:0 15px;cursor:pointer}#n2-ss-devices .n2-td.n2-active{cursor:default;color:#0c92df}.n2-i-devices:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAAAeCAMAAABzNtkNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACdlBMVEUAAAChrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrUZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrUZmeMAAAA99lBfAAAA0XRSTlMAJ6DHzCgytbY2MLMnoMfMKDK1tjYws5+ytLGfsrSxxh0ixh0il5qXmgY7a5SvvspsB2aHBjtrlK++ymwHZod+wiN+wiMSgbh6SiYQAnl9DBKBuHpKJhACeX0MNbmdQwQzNbmdQwQzRrtLAUa7SwHIpRWkyKUVpJgKUqLDnk2YClKiw55Nhq2KhIatioTLLlgOT8suWA5PcH9ZX3B/WV+sJcQqrqwlxCquKSmjXqNeV1eRiZGJCQmIiLq6AzQDNIK3SYK3SSQkCG2hCG2hsLA3NxRx1r0AAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAE0UlEQVRo3s2a+18UVRTAN/eYJLmHJCAjS4pehG4vQrcHhq0bCrFu6BKkRmq+JSNTpBQpVlnjEY+wtAglFIjeWmCWZb7t8Se109z57Mzcc+eBLrPnl7nn3DOP8/3MvXPPueNyWZSbprhBKO4pU9W+N0+jnFJuIS47PVXrlDrd6gPp5NYZHhSKZ0aa2ve2mZRT+u3EZTMytU6ZGZafKAsMJUvtewftk0Jcdpbe6c4JEstGQ8lW+95F+6QTl52td7rb8hO5wagX7tFopC9pBZijVnPA8DYG4kGjXrxXo5G+pBXxPrWai4a3MY9X0BvT7te/Ow+IiNm5jRETtN4b0x7UvzsPiYiJ9YfzHsmfO8/rnTc3/9G8x6jQHhcNySd4YryTiBjnJ5AnC54qnL/A51swv/Dpgmeo0J4VDcnneGK8k4gY58ckp2ih+rEXFj3PExPPYhQx4vTrIJZbvEj92IuKX+CJiWcxihhxug1i/sVegMCLJUuWlpYuXVJSFgDwvlRuKWSqyxYxY12W4DIfYujliuUrwuEVyysqQ4i+V6oshUx12SJG6tWvAqxctTpuX71qJcC015KFWM3riGvWrosb1q1dgzjzDceIrXfDho2btD2bNm4A9/rkILbZg1u2btPatm3dgp7NDhGrroU3t/O+298Cd3UyEKupw7d38GfueAc9NY4Q8wdg5y5ZLa3f3dDw7nvsddu1EwJ+54kFQ7hnr9wMN+5ranr/A/a67d2DoaATxJohwub40v3y1+oAQ1YegWbnibVglM3x4YPy1+pDhqwqii0OEMtp9bYxrR7c7R0d7W74iBnavK05ThPL7fR1sWYjerp7ero9+DEzdPk6cyefWC8cUrQs+EQ6fBpPEhdDr9PEDuMRpZmNn0mHz+NJ4jI8PPnE+uALReuHDunQAf2K5Sgcc5rYAH6pNAexRzr04KBiOY4nJp9YBI6KiQ05TyyKx8XEhp0g1gtFijYij8qv4qPyUDKMymKlOSqPyq/jo/KIE6MyNvMPMe0bZeavZ4ah5Jj5h1nzW2Xmb2SGYUdm/tjqok9ZXXwnry6+L5X18r7kWF0MKKuLH+TVxY9hWa8acGR18f8K9iRD1j7S37+7ngE7ya9gE1G7MCMmrWBPMWTdo4OD+xoZsFP8CjYRtQtCj2VJI1SWNAK12ixpvwjYT4nOkkapLGkU67RZ0kERsJ8TkImPlegz8ZIxLhM3kERn4uMV+ky8YpzLxA3khld7xqRqz+m4/bRU7Un5xSwUQ2I3sAZbMy5Ve87EDWekak/6r0ahmRK7vhqs/7dYRfFsGaso/l52FqC1SFtRtLkz0mw2cu0QcwX/iFUUz1WyiuKflecQO4u1FUWbOyMtZiPXhJjLdV5ftT6vO9XO7putvSQLTjG5oK9aX9A52Nl9s7WXJNYv5l3Kj0g7I5H8S3kXuVOnXq4V86q9rNnhVYVNN3nXhgZjYi7XlYKrhVFpZyRaeLXgCteddq1OzKvuWpogbLrJuzY1GcE2FTkscXAJIWZD5LDEwSU1MTMrgF+t+iebmJkVMahWgxMhZmGv7C967KYSrql6p4n+RaCKkZqnNfI3PXYzCddMvZP1vwjsEGs7RgGbRf2p8k9AB2yif6rYIdZ1ggI2m/pT5d+QDljGf3zSNGZGqKPpAAAAAElFTkSuQmCC)}.n2-i-devices-all:before{background-position:0 0}.n2-i-devices-desktop:before{background-position:-40px 0}.n2-i-devices-tablet:before{background-position:-80px 0}.n2-i-devices-phone:before{background-position:-120px 0}.n2-active>.n2-i-devices-all:before{background-position:-160px 0}.n2-active>.n2-i-devices-desktop:before{background-position:-200px 0}.n2-active>.n2-i-devices-tablet:before{background-position:-240px 0}.n2-active>.n2-i-devices-phone:before{background-position:-280px 0}.n2-generator-insert-variable .n2-variable-container{height:90px;overflow:auto}.n2-generator-insert-variable .n2-group-container{height:40px;overflow:auto}.n2-generator-insert-variable .n2-group-container .n2-button,.n2-generator-insert-variable .n2-variable-container .n2-button{margin:3px}.n2-generator-insert-variable .n2-group-container .n2-button.n2-active,.n2-generator-insert-variable .n2-variable-container .n2-button.n2-active,.n2-ss-layer-picker.n2-active{background:#0c92df}.n2-generator-result-container{height:100px;overflow:auto;margin:0 3px}.n2-ss-layer-picker{background:#6b7986;color:#fff;font-size:16px;height:28px;line-height:28px;padding:0;text-align:center;width:28px;border-radius:3px;margin:0 10px 10px;cursor:pointer}#n2-ss-toolbar #n2-ss-layer-parent-linker.n2-under-pick,.n2-ss-layer-picker.n2-under-pick{background-color:#51b82d}#n2-ss-layer-parent-linker.n2-under-pick .n2-i-layerlink:before,.n2-ss-layer-picker.n2-under-pick .n2-i-layerlink:before{content:"\e64b"}.n2-ss-picker-overlay,.n2-ss-picker-overlay-tile{position:absolute;left:0;top:0;background:RGBA(25,153,227,.8);cursor:pointer;width:100%;height:100%;z-index:1000000;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4)}.n2-ss-picker-overlay-tile{width:33%;height:33%}.n2-ss-picker-overlay-tile:HOVER,.n2-ss-picker-overlay:HOVER{background:RGBA(42,52,63,.9)}.n2-ss-picker-overlay-tile.n2-active,.n2-ss-picker-overlay-tile.n2-active:HOVER{background:RGBA(0,52,63,.9)}#n2-ss-toolbar #n2-ss-layer-parent-linker{display:none}.n2-ss-has-layers .n2-ss-mode-desktopPortrait #n2-ss-toolbar #n2-ss-layer-parent-linker,.n2-ss-has-ruler .n2-ruler>span{display:inline-block}.n2-ss-layer.n2-ss-picking-on-layer{z-index:1000000!important}.n2-ruler-container{position:absolute;left:0;top:0;height:100%;width:100%;visibility:hidden;z-index:10}.n2-ruler-container>*{visibility:visible}.n2-ruler,.n2-ruler-guide{position:absolute;left:0;top:0}.n2-ruler{box-sizing:border-box;white-space:nowrap}.n2-ruler>span{position:relative;display:none;vertical-align:top}.n2-ruler>span span{position:absolute;display:block;font-size:10px;color:#7b8898;line-height:10px}.n2-ruler-guide{display:none;z-index:2}.n2-ss-show-guides .n2-ruler-guide{display:block}.n2-ruler-guide .n2-ruler-guide-handle{position:absolute;background:#e6b625;left:0;top:0;width:9px;height:9px;cursor:pointer;font-family:'Nextend'!important;font-size:9px;color:#fff;line-height:9px;text-align:center}.n2-ruler-guide .n2-ruler-guide-handle:before{content:"\e90a"}.n2-ruler-horizontal{padding-left:1px;height:0;width:100%}.n2-ss-has-ruler .n2-ruler-horizontal{height:39px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-large{height:20px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-medium{height:10px}.n2-ruler-horizontal>span{width:9px;height:5px;border-right:1px solid #bcc4c8}.n2-ruler-horizontal span span{left:12px;top:10px}.n2-ruler-vertical .n2-ruler-guide{height:0;width:3000px}.n2-ss-lock-guides .n2-ruler-vertical .n2-ruler-guide{cursor:default}.n2-ruler-vertical .n2-ruler-guide .n2-ruler-guide-border{border-bottom:1px solid #ccaa2b;width:100%}.n2-ruler-vertical .n2-ruler-guide-handle{top:-4px}.n2-ruler-vertical{padding-top:1px;width:0;height:100%;background:#e9edf0;z-index:5}.n2-ss-has-ruler .n2-ruler-vertical{width:40px}.n2-ruler-vertical>span.n2-ss-ruler-mark-large{width:20px}.n2-ruler-vertical>span.n2-ss-ruler-mark-medium{width:10px}.n2-ruler-vertical>span{display:none;width:5px;height:9px;border-bottom:1px solid #bcc4c8}.n2-ss-has-ruler .n2-ruler-vertical>span{display:block}.n2-ruler-vertical span span{left:8px;top:12px}.n2-ruler-horizontal .n2-ruler-guide{width:0;height:3000px}.n2-ss-lock-guides .n2-ruler-horizontal .n2-ruler-guide{cursor:default}.n2-ruler-horizontal .n2-ruler-guide .n2-ruler-guide-border{border-right:1px solid #ccaa2b;height:100%}.n2-ruler-horizontal .n2-ruler-guide-handle{left:-4px}.n2-ruler-guide-handle{display:none}.n2-ss-has-ruler .n2-ruler-guide-handle{display:block}
|
library/media/admin/images/contentmode.png
ADDED
Binary file
|
library/media/admin/images/free/gettingstarted.png
ADDED
Binary file
|
library/media/admin/images/free/why-upgrade.png
CHANGED
Binary file
|
library/media/admin/js/jqueryui/jquery-ui.canvas-item.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$.widget("ui.nextendCanvasItem", $.ui.mouse, {
|
5 |
+
widgetEventPrefix: "canvasItem",
|
6 |
+
options: {
|
7 |
+
canvasUIManager: null,
|
8 |
+
layer: false,
|
9 |
+
$layer: null,
|
10 |
+
distance: 2,
|
11 |
+
onCreate: function () {
|
12 |
+
|
13 |
+
}
|
14 |
+
},
|
15 |
+
_create: function () {
|
16 |
+
|
17 |
+
if (typeof this.options.$layer === 'function') {
|
18 |
+
this.options.$layer = this.options.$layer.call(this, this);
|
19 |
+
}
|
20 |
+
this._mouseInit();
|
21 |
+
},
|
22 |
+
_mouseCapture: function (event, overrideHandle) {
|
23 |
+
return this.options.canvasUIManager._mouseCapture(this.options, event, overrideHandle);
|
24 |
+
},
|
25 |
+
_mouseStart: function (event, overrideHandle, noActivation) {
|
26 |
+
this._trigger('start');
|
27 |
+
return this.options.canvasUIManager._mouseStart(this.options, event, overrideHandle, noActivation);
|
28 |
+
},
|
29 |
+
_mouseDrag: function (event) {
|
30 |
+
return this.options.canvasUIManager._mouseDrag(this.options, event);
|
31 |
+
},
|
32 |
+
_mouseStop: function (event, noPropagation) {
|
33 |
+
return this.options.canvasUIManager._mouseStop(this.options, event, noPropagation);
|
34 |
+
|
35 |
+
},
|
36 |
+
_destroy: function () {
|
37 |
+
this._mouseDestroy();
|
38 |
+
|
39 |
+
return this;
|
40 |
+
},
|
41 |
+
});
|
42 |
+
|
43 |
+
})(n2);
|
library/media/admin/js/jqueryui/jquery-ui.canvas.js
ADDED
@@ -0,0 +1,585 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$.widget("ui.nextendCanvas", {
|
5 |
+
|
6 |
+
widgetEventPrefix: "canvas",
|
7 |
+
ready: false,
|
8 |
+
options: {
|
9 |
+
mainContainer: null
|
10 |
+
},
|
11 |
+
display: false,
|
12 |
+
_create: function () {
|
13 |
+
|
14 |
+
},
|
15 |
+
_mouseCapture: function (itemOptions, event, overrideHandle) {
|
16 |
+
if ($(event.target).closest(".ui-resizable-handle, .ui-customresizable-handle, .ui-spacing-handle").length > 0) {
|
17 |
+
return false;
|
18 |
+
}
|
19 |
+
return true;
|
20 |
+
},
|
21 |
+
_mouseStart: function (itemOptions, event, overrideHandle, noActivation) {
|
22 |
+
|
23 |
+
$('body').addClass('n2-ss-move-layer');
|
24 |
+
|
25 |
+
this.dragDeferred = $.Deferred();
|
26 |
+
this.options.mainContainer.canvasManager.layerWindow.hideWithDeferred(this.dragDeferred);
|
27 |
+
|
28 |
+
this.context = {
|
29 |
+
placeholder: $('<div class="n2-ss-layer-placeholder" />'),
|
30 |
+
mouse: {
|
31 |
+
offset: {
|
32 |
+
left: event.pageX,
|
33 |
+
top: event.pageY
|
34 |
+
}
|
35 |
+
},
|
36 |
+
canvas: {
|
37 |
+
offset: this.options.mainContainer.layer.offset(),
|
38 |
+
size: {
|
39 |
+
width: this.options.mainContainer.layer.outerWidth(),
|
40 |
+
height: this.options.mainContainer.layer.outerHeight()
|
41 |
+
}
|
42 |
+
},
|
43 |
+
$layer: itemOptions.$layer
|
44 |
+
};
|
45 |
+
|
46 |
+
var css = {
|
47 |
+
position: 'absolute',
|
48 |
+
right: 'auto',
|
49 |
+
bottom: 'auto'
|
50 |
+
};
|
51 |
+
|
52 |
+
if (!itemOptions.layer) {
|
53 |
+
this.startMode = 'create';
|
54 |
+
|
55 |
+
this.context.layer = {
|
56 |
+
offset: {
|
57 |
+
left: 0,
|
58 |
+
top: 0
|
59 |
+
}
|
60 |
+
};
|
61 |
+
|
62 |
+
itemOptions.$layer.appendTo('body');
|
63 |
+
} else {
|
64 |
+
this.startMode = itemOptions.layer.placement.getType();
|
65 |
+
|
66 |
+
this.context.layer = {
|
67 |
+
offset: itemOptions.$layer.offset()
|
68 |
+
};
|
69 |
+
|
70 |
+
this.context.originalIndex = itemOptions.layer.getIndex();
|
71 |
+
|
72 |
+
if (this.startMode == 'normal') {
|
73 |
+
|
74 |
+
css.width = itemOptions.$layer.width();
|
75 |
+
//css.height = itemOptions.$layer.height();
|
76 |
+
|
77 |
+
itemOptions.$layer.appendTo(this.options.mainContainer.layer);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
itemOptions.$layer
|
82 |
+
.addClass('n2-canvas-item-drag')
|
83 |
+
.css(css);
|
84 |
+
|
85 |
+
this._cacheMargins(itemOptions.$layer);
|
86 |
+
|
87 |
+
this.context.size = {
|
88 |
+
width: itemOptions.$layer.outerWidth(),
|
89 |
+
height: itemOptions.$layer.outerHeight()
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
this.context.droppables = this.options.mainContainer.getDroppables(itemOptions.layer);
|
94 |
+
|
95 |
+
this._cacheContainers();
|
96 |
+
|
97 |
+
this._trigger("start", event, {
|
98 |
+
layer: itemOptions.layer,
|
99 |
+
mode: this.startMode
|
100 |
+
});
|
101 |
+
|
102 |
+
this._mouseDrag(itemOptions, event);
|
103 |
+
},
|
104 |
+
_mouseDrag: function (itemOptions, event) {
|
105 |
+
var position;
|
106 |
+
if (this.startMode == 'create') {
|
107 |
+
position = {
|
108 |
+
top: event.pageY - this.context.canvas.offset.top - 20,
|
109 |
+
left: event.pageX - this.context.canvas.offset.left - 20
|
110 |
+
};
|
111 |
+
} else {
|
112 |
+
position = {
|
113 |
+
top: this.context.layer.offset.top - this.context.canvas.offset.top + event.pageY - this.context.mouse.offset.top,
|
114 |
+
left: this.context.layer.offset.left - this.context.canvas.offset.left + event.pageX - this.context.mouse.offset.left
|
115 |
+
};
|
116 |
+
}
|
117 |
+
|
118 |
+
var targetContainer = this._findInnerContainer(event);
|
119 |
+
if (targetContainer === false && this.startMode != 'create') {
|
120 |
+
targetContainer = this.context.droppables[0];
|
121 |
+
}
|
122 |
+
if (targetContainer) {
|
123 |
+
if (targetContainer.placement == 'normal') {
|
124 |
+
|
125 |
+
if (typeof targetContainer.layers === "undefined") {
|
126 |
+
targetContainer.layers = this._cacheContainerLayers(targetContainer);
|
127 |
+
}
|
128 |
+
|
129 |
+
var targetIndex = this._findNormalIndex(event, targetContainer);
|
130 |
+
if (targetIndex > 0) {
|
131 |
+
this.context.placeholder.css('order', targetContainer.layers[targetIndex - 1].layer.layer.css('order'));
|
132 |
+
this.context.placeholder.insertAfter(targetContainer.layers[targetIndex - 1].layer.layer);
|
133 |
+
} else {
|
134 |
+
this.context.placeholder.css('order', 0);
|
135 |
+
this.context.placeholder.prependTo(targetContainer.$container);
|
136 |
+
}
|
137 |
+
|
138 |
+
this.context.targetIndex = targetIndex;
|
139 |
+
} else {
|
140 |
+
this.context.placeholder.detach();
|
141 |
+
}
|
142 |
+
} else {
|
143 |
+
this.context.placeholder.detach();
|
144 |
+
}
|
145 |
+
|
146 |
+
this.context.targetContainer = targetContainer;
|
147 |
+
|
148 |
+
|
149 |
+
this._trigger("drag", event, {
|
150 |
+
layer: itemOptions.layer,
|
151 |
+
originalOffset: this.context.layer.offset,
|
152 |
+
position: position,
|
153 |
+
canvasOffset: this.context.canvas.offset,
|
154 |
+
offset: {
|
155 |
+
left: position.left + this.context.canvas.offset.left,
|
156 |
+
top: position.top + this.context.canvas.offset.top
|
157 |
+
}
|
158 |
+
});
|
159 |
+
|
160 |
+
if (this.startMode == 'create') {
|
161 |
+
position.left += this.context.canvas.offset.left;
|
162 |
+
position.top += this.context.canvas.offset.top;
|
163 |
+
}
|
164 |
+
|
165 |
+
itemOptions.$layer.css(position);
|
166 |
+
|
167 |
+
this._displayPosition(event, position);
|
168 |
+
},
|
169 |
+
|
170 |
+
_mouseStop: function (itemOptions, event, noPropagation) {
|
171 |
+
this.context.placeholder.remove();
|
172 |
+
|
173 |
+
var targetIndex = this.context.targetIndex,
|
174 |
+
targetContainer = this.context.targetContainer;
|
175 |
+
|
176 |
+
itemOptions.$layer
|
177 |
+
.removeClass('n2-canvas-item-drag')
|
178 |
+
|
179 |
+
if (this.startMode == 'create') {
|
180 |
+
if (targetContainer) {
|
181 |
+
itemOptions.onCreate.call(this, event, itemOptions, targetContainer, targetIndex);
|
182 |
+
}
|
183 |
+
itemOptions.$layer.detach();
|
184 |
+
|
185 |
+
} else {
|
186 |
+
if (this.startMode == 'absolute' && this.context.targetContainer.placement == 'absolute') {
|
187 |
+
|
188 |
+
// Simple drag on the canvas on an absolute layer. Just update its position!
|
189 |
+
var left = parseInt(itemOptions.$layer.css('left')),
|
190 |
+
top = parseInt(itemOptions.$layer.css('top'));
|
191 |
+
|
192 |
+
itemOptions.$layer.css({
|
193 |
+
position: '',
|
194 |
+
right: '',
|
195 |
+
bottom: '',
|
196 |
+
});
|
197 |
+
|
198 |
+
itemOptions.layer.placement.current.setPosition(left, top);
|
199 |
+
|
200 |
+
} else if (this.context.targetContainer.placement == 'absolute') {
|
201 |
+
|
202 |
+
// Layer moved from a normal container to the canvas.
|
203 |
+
|
204 |
+
var left = parseInt(itemOptions.$layer.css('left')),
|
205 |
+
top = parseInt(itemOptions.$layer.css('top'));
|
206 |
+
|
207 |
+
itemOptions.$layer.css({
|
208 |
+
position: '',
|
209 |
+
right: '',
|
210 |
+
bottom: '',
|
211 |
+
});
|
212 |
+
|
213 |
+
var width = itemOptions.$layer.width(),
|
214 |
+
height = itemOptions.$layer.height();
|
215 |
+
|
216 |
+
itemOptions.layer.group.onChildCountChange();
|
217 |
+
|
218 |
+
var oldAbsoluteGroup = itemOptions.layer;
|
219 |
+
while (oldAbsoluteGroup && (!oldAbsoluteGroup.placement || oldAbsoluteGroup.placement.getType() !== 'absolute')) {
|
220 |
+
oldAbsoluteGroup = oldAbsoluteGroup.group;
|
221 |
+
}
|
222 |
+
|
223 |
+
nextend.smartSlider.history.startBatch();
|
224 |
+
// Set the new group, which will trigger this current placement to activate
|
225 |
+
itemOptions.layer.changeGroup(this.context.originalIndex, this.options.mainContainer);
|
226 |
+
nextend.smartSlider.history.addControl('skipForwardUndos');
|
227 |
+
|
228 |
+
if (itemOptions.layer.type == 'layer' && itemOptions.layer.item) {
|
229 |
+
if (!itemOptions.layer.item.needSize) {
|
230 |
+
height = 'auto';
|
231 |
+
width++; //Prevent text layers to wrap line ending to new line after drag
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
// As this placement activated, we have to set these values from the closest absolute parent
|
236 |
+
var targetAlign = oldAbsoluteGroup ? oldAbsoluteGroup.getProperty('align') : 'center',
|
237 |
+
targetValign = oldAbsoluteGroup ? oldAbsoluteGroup.getProperty('valign') : 'middle';
|
238 |
+
|
239 |
+
itemOptions.layer.placement.current._setPosition(targetAlign, targetValign, left, top, width, height, true);
|
240 |
+
|
241 |
+
nextend.smartSlider.history.endBatch();
|
242 |
+
|
243 |
+
} else if (this.context.targetContainer.placement == 'normal') {
|
244 |
+
itemOptions.$layer.css({
|
245 |
+
position: 'relative',
|
246 |
+
width: '',
|
247 |
+
left: '',
|
248 |
+
top: ''
|
249 |
+
});
|
250 |
+
|
251 |
+
switch (targetContainer.layer.type) {
|
252 |
+
|
253 |
+
case 'content':
|
254 |
+
case 'col':
|
255 |
+
if (targetIndex > 0) {
|
256 |
+
itemOptions.$layer.insertAfter(targetContainer.layers[targetIndex - 1].layer.layer);
|
257 |
+
} else {
|
258 |
+
itemOptions.$layer.prependTo(targetContainer.$container);
|
259 |
+
}
|
260 |
+
|
261 |
+
itemOptions.layer.onCanvasUpdate(this.context.originalIndex, targetContainer.layer, targetIndex);
|
262 |
+
break;
|
263 |
+
|
264 |
+
case 'row':
|
265 |
+
var col = targetContainer.layer.createCol();
|
266 |
+
targetContainer.layer.moveCol(col.getIndex(), targetIndex);
|
267 |
+
|
268 |
+
itemOptions.$layer.prependTo(col.$content);
|
269 |
+
itemOptions.layer.onCanvasUpdate(this.context.originalIndex, col, 0);
|
270 |
+
|
271 |
+
break;
|
272 |
+
}
|
273 |
+
|
274 |
+
//itemOptions.layer.placement.current._syncheight(); // we should sync back the height of the normal layer
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
delete this.context;
|
279 |
+
|
280 |
+
if (this.options.display) {
|
281 |
+
this.options.display.hide();
|
282 |
+
}
|
283 |
+
|
284 |
+
this._trigger("stop", event, {
|
285 |
+
layer: itemOptions.layer
|
286 |
+
});
|
287 |
+
|
288 |
+
this.dragDeferred.resolve();
|
289 |
+
|
290 |
+
|
291 |
+
$('body').removeClass('n2-ss-move-layer');
|
292 |
+
},
|
293 |
+
|
294 |
+
cancel: function (itemOptions) {
|
295 |
+
},
|
296 |
+
|
297 |
+
_cacheContainers: function () {
|
298 |
+
for (var i = 0; i < this.context.droppables.length; i++) {
|
299 |
+
var obj = this.context.droppables[i];
|
300 |
+
obj.offset = obj.$container.offset();
|
301 |
+
obj.size = {
|
302 |
+
width: obj.$container.outerWidth(),
|
303 |
+
height: obj.$container.outerHeight()
|
304 |
+
}
|
305 |
+
obj.offset.right = obj.offset.left + obj.size.width;
|
306 |
+
obj.offset.bottom = obj.offset.top + obj.size.height;
|
307 |
+
}
|
308 |
+
},
|
309 |
+
|
310 |
+
_findInnerContainer: function (event) {
|
311 |
+
for (var i = this.context.droppables.length - 1; i >= 0; i--) {
|
312 |
+
var obj = this.context.droppables[i];
|
313 |
+
if (obj.offset.left <= event.pageX && obj.offset.right >= event.pageX && obj.offset.top <= event.pageY && obj.offset.bottom >= event.pageY) {
|
314 |
+
return obj;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
return false;
|
318 |
+
},
|
319 |
+
|
320 |
+
_cacheContainerLayers: function (droppable) {
|
321 |
+
var layerObjects = [],
|
322 |
+
layers = droppable.layer.container.getSortedLayers();
|
323 |
+
|
324 |
+
for (var i = 0; i < layers.length; i++) {
|
325 |
+
var obj = {
|
326 |
+
layer: layers[i]
|
327 |
+
};
|
328 |
+
obj.offset = obj.layer.layer.offset();
|
329 |
+
obj.size = {
|
330 |
+
width: obj.layer.layer.outerWidth(),
|
331 |
+
height: obj.layer.layer.outerHeight()
|
332 |
+
}
|
333 |
+
obj.offset.right = obj.offset.left + obj.size.width / 2;
|
334 |
+
obj.offset.bottom = obj.offset.top + obj.size.height / 2;
|
335 |
+
layerObjects.push(obj);
|
336 |
+
}
|
337 |
+
|
338 |
+
return layerObjects;
|
339 |
+
},
|
340 |
+
|
341 |
+
_findNormalIndex: function (event, targetContainer) {
|
342 |
+
var index = -1;
|
343 |
+
|
344 |
+
switch (targetContainer.axis) {
|
345 |
+
case 'y':
|
346 |
+
for (var i = 0; i < targetContainer.layers.length; i++) {
|
347 |
+
var obj = targetContainer.layers[i];
|
348 |
+
if (event.pageY <= obj.offset.bottom) {
|
349 |
+
index = i;
|
350 |
+
break;
|
351 |
+
}
|
352 |
+
}
|
353 |
+
break;
|
354 |
+
case 'x':
|
355 |
+
for (var i = 0; i < targetContainer.layers.length; i++) {
|
356 |
+
var obj = targetContainer.layers[i];
|
357 |
+
if (event.pageX <= obj.offset.right) {
|
358 |
+
index = i;
|
359 |
+
break;
|
360 |
+
}
|
361 |
+
}
|
362 |
+
break;
|
363 |
+
}
|
364 |
+
|
365 |
+
if (index === -1) {
|
366 |
+
index = targetContainer.layers.length;
|
367 |
+
}
|
368 |
+
|
369 |
+
return index;
|
370 |
+
},
|
371 |
+
|
372 |
+
_displayPosition: function (event, position) {
|
373 |
+
|
374 |
+
if (this.options.display) {
|
375 |
+
if (this.context.targetContainer && this.context.targetContainer.placement == 'absolute') {
|
376 |
+
if (this.options.display.hidden) {
|
377 |
+
this.options.display.show();
|
378 |
+
}
|
379 |
+
if (this.startMode == 'create') {
|
380 |
+
position.left -= this.context.canvas.offset.left;
|
381 |
+
position.top -= this.context.canvas.offset.top;
|
382 |
+
}
|
383 |
+
this.options.display.update(event, position);
|
384 |
+
} else {
|
385 |
+
if (this.options.display.hidden) {
|
386 |
+
this.options.display.hide();
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
},
|
391 |
+
|
392 |
+
_trigger: function (type, event, ui) {
|
393 |
+
ui = ui || {};
|
394 |
+
|
395 |
+
$.ui.plugin.call(this, type, [event, ui, this], true);
|
396 |
+
|
397 |
+
return $.Widget.prototype._trigger.call(this, type, event, ui);
|
398 |
+
},
|
399 |
+
|
400 |
+
plugins: {},
|
401 |
+
|
402 |
+
_cacheMargins: function (layer) {
|
403 |
+
this.margins = {
|
404 |
+
left: ( parseInt(layer.css("marginLeft"), 10) || 0 ),
|
405 |
+
top: ( parseInt(layer.css("marginTop"), 10) || 0 ),
|
406 |
+
right: ( parseInt(layer.css("marginRight"), 10) || 0 ),
|
407 |
+
bottom: ( parseInt(layer.css("marginBottom"), 10) || 0 )
|
408 |
+
};
|
409 |
+
}
|
410 |
+
});
|
411 |
+
|
412 |
+
$.ui.plugin.add("nextendCanvas", "smartguides", {
|
413 |
+
|
414 |
+
start: function (event, ui) {
|
415 |
+
var inst = $(this).data("uiNextendCanvas"), o = inst.options;
|
416 |
+
|
417 |
+
if (inst.startMode == 'create') return;
|
418 |
+
|
419 |
+
inst.gridH = $('<div class="n2-grid n2-grid-h"></div>').appendTo(o.mainContainer.layer);
|
420 |
+
inst.gridV = $('<div class="n2-grid n2-grid-v"></div>').appendTo(o.mainContainer.layer);
|
421 |
+
inst.elements = [];
|
422 |
+
if (typeof o.smartguides == 'function') {
|
423 |
+
var guides = $(o.smartguides(inst.context)).not(inst.context.$layer);
|
424 |
+
if (guides && guides.length) {
|
425 |
+
guides.each(function () {
|
426 |
+
var $t = $(this);
|
427 |
+
var $o = $t.offset();
|
428 |
+
if (this != inst.element[0]) inst.elements.push({
|
429 |
+
item: this,
|
430 |
+
width: $t.outerWidth(), height: $t.outerHeight(),
|
431 |
+
top: Math.round($o.top), left: Math.round($o.left),
|
432 |
+
backgroundColor: ''
|
433 |
+
});
|
434 |
+
});
|
435 |
+
}
|
436 |
+
var $o = o.mainContainer.layer.offset();
|
437 |
+
inst.elements.push({
|
438 |
+
width: o.mainContainer.layer.width(), height: o.mainContainer.layer.height(),
|
439 |
+
top: Math.round($o.top), left: Math.round($o.left),
|
440 |
+
backgroundColor: '#ff4aff'
|
441 |
+
});
|
442 |
+
}
|
443 |
+
},
|
444 |
+
|
445 |
+
stop: function (event, ui) {
|
446 |
+
var inst = $(this).data("uiNextendCanvas");
|
447 |
+
|
448 |
+
if (inst.startMode == 'create') return;
|
449 |
+
|
450 |
+
inst.gridH.remove();
|
451 |
+
inst.gridV.remove();
|
452 |
+
},
|
453 |
+
|
454 |
+
drag: function (event, ui) {
|
455 |
+
var vElement = false,
|
456 |
+
hElement = false,
|
457 |
+
inst = $(this).data("uiNextendCanvas"),
|
458 |
+
o = inst.options,
|
459 |
+
verticalTolerance = o.tolerance,
|
460 |
+
horizontalTolerance = o.tolerance;
|
461 |
+
|
462 |
+
if (inst.startMode == 'create') return;
|
463 |
+
|
464 |
+
inst.gridH.css({"display": "none"});
|
465 |
+
inst.gridV.css({"display": "none"});
|
466 |
+
|
467 |
+
if (inst.context.targetContainer && inst.context.targetContainer.placement == 'absolute') {
|
468 |
+
|
469 |
+
var container = inst.elements[inst.elements.length - 1],
|
470 |
+
setGridV = function (left) {
|
471 |
+
inst.gridV.css({left: Math.min(left, container.width - 1), display: "block"});
|
472 |
+
},
|
473 |
+
setGridH = function (top) {
|
474 |
+
inst.gridH.css({top: Math.min(top, container.height - 1), display: "block"});
|
475 |
+
}
|
476 |
+
|
477 |
+
var ctrlKey = event.ctrlKey || event.metaKey,
|
478 |
+
altKey = event.altKey;
|
479 |
+
if (ctrlKey && altKey) {
|
480 |
+
return;
|
481 |
+
} else if (ctrlKey) {
|
482 |
+
vElement = true;
|
483 |
+
} else if (altKey) {
|
484 |
+
hElement = true;
|
485 |
+
}
|
486 |
+
var x1 = ui.offset.left, x2 = x1 + inst.context.size.width,
|
487 |
+
y1 = ui.offset.top, y2 = y1 + inst.context.size.height,
|
488 |
+
xc = (x1 + x2) / 2,
|
489 |
+
yc = (y1 + y2) / 2;
|
490 |
+
|
491 |
+
if (!vElement) {
|
492 |
+
for (var i = inst.elements.length - 1; i >= 0; i--) {
|
493 |
+
if (verticalTolerance == 0) break;
|
494 |
+
|
495 |
+
var l = inst.elements[i].left,
|
496 |
+
r = l + inst.elements[i].width,
|
497 |
+
hc = (l + r) / 2;
|
498 |
+
|
499 |
+
var v = true,
|
500 |
+
c;
|
501 |
+
if ((c = Math.abs(l - x2)) < verticalTolerance) {
|
502 |
+
ui.position.left = l - inst.context.size.width - inst.context.canvas.offset.left - inst.margins.left;
|
503 |
+
setGridV(ui.position.left + inst.context.size.width);
|
504 |
+
} else if ((c = Math.abs(l - x1)) < verticalTolerance) {
|
505 |
+
ui.position.left = l - inst.context.canvas.offset.left - inst.margins.left;
|
506 |
+
setGridV(ui.position.left);
|
507 |
+
} else if ((c = Math.abs(r - x1)) < verticalTolerance) {
|
508 |
+
ui.position.left = r - inst.context.canvas.offset.left - inst.margins.left;
|
509 |
+
setGridV(ui.position.left);
|
510 |
+
} else if ((c = Math.abs(r - x2)) < verticalTolerance) {
|
511 |
+
ui.position.left = r - inst.context.size.width - inst.context.canvas.offset.left - inst.margins.left;
|
512 |
+
setGridV(ui.position.left + inst.context.size.width);
|
513 |
+
} else if ((c = Math.abs(hc - x2)) < verticalTolerance) {
|
514 |
+
ui.position.left = hc - inst.context.size.width - inst.context.canvas.offset.left - inst.margins.left;
|
515 |
+
setGridV(ui.position.left + inst.context.size.width);
|
516 |
+
} else if ((c = Math.abs(hc - x1)) < verticalTolerance) {
|
517 |
+
ui.position.left = hc - inst.context.canvas.offset.left - inst.margins.left;
|
518 |
+
setGridV(ui.position.left);
|
519 |
+
} else if ((c = Math.abs(hc - xc)) < verticalTolerance) {
|
520 |
+
ui.position.left = hc - inst.context.size.width / 2 - inst.context.canvas.offset.left - inst.margins.left;
|
521 |
+
setGridV(ui.position.left + inst.context.size.width / 2);
|
522 |
+
} else {
|
523 |
+
v = false;
|
524 |
+
}
|
525 |
+
|
526 |
+
if (v) {
|
527 |
+
vElement = inst.elements[i];
|
528 |
+
verticalTolerance = Math.min(c, verticalTolerance);
|
529 |
+
}
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
if (!hElement) {
|
534 |
+
for (var i = inst.elements.length - 1; i >= 0; i--) {
|
535 |
+
if (horizontalTolerance == 0) break;
|
536 |
+
|
537 |
+
var t = inst.elements[i].top,
|
538 |
+
b = t + inst.elements[i].height,
|
539 |
+
vc = (t + b) / 2;
|
540 |
+
|
541 |
+
var h = true,
|
542 |
+
c;
|
543 |
+
if ((c = Math.abs(t - y2)) < horizontalTolerance) {
|
544 |
+
ui.position.top = t - inst.context.size.height - inst.context.canvas.offset.top - inst.margins.top;
|
545 |
+
setGridH(ui.position.top + inst.context.size.height);
|
546 |
+
} else if ((c = Math.abs(t - y1)) < horizontalTolerance) {
|
547 |
+
ui.position.top = t - inst.context.canvas.offset.top - inst.margins.top;
|
548 |
+
setGridH(ui.position.top);
|
549 |
+
} else if ((c = Math.abs(b - y1)) < horizontalTolerance) {
|
550 |
+
ui.position.top = b - inst.context.canvas.offset.top - inst.margins.top;
|
551 |
+
setGridH(ui.position.top);
|
552 |
+
} else if ((c = Math.abs(b - y2)) < horizontalTolerance) {
|
553 |
+
ui.position.top = b - inst.context.size.height - inst.context.canvas.offset.top - inst.margins.top;
|
554 |
+
setGridH(ui.position.top + inst.context.size.height);
|
555 |
+
} else if ((c = Math.abs(vc - y2)) < horizontalTolerance) {
|
556 |
+
ui.position.top = vc - inst.context.size.height - inst.context.canvas.offset.top - inst.margins.top;
|
557 |
+
setGridH(ui.position.top + inst.context.size.height);
|
558 |
+
} else if ((c = Math.abs(vc - y1)) < horizontalTolerance) {
|
559 |
+
ui.position.top = vc - inst.context.canvas.offset.top - inst.margins.top;
|
560 |
+
setGridH(ui.position.top);
|
561 |
+
} else if ((c = Math.abs(vc - yc)) < horizontalTolerance) {
|
562 |
+
ui.position.top = vc - inst.context.size.height / 2 - inst.context.canvas.offset.top - inst.margins.top;
|
563 |
+
setGridH(ui.position.top + inst.context.size.height / 2);
|
564 |
+
} else {
|
565 |
+
h = false;
|
566 |
+
}
|
567 |
+
|
568 |
+
if (h) {
|
569 |
+
hElement = inst.elements[i];
|
570 |
+
horizontalTolerance = Math.min(c, horizontalTolerance);
|
571 |
+
}
|
572 |
+
}
|
573 |
+
}
|
574 |
+
|
575 |
+
if (vElement && vElement !== true) {
|
576 |
+
inst.gridV.css('backgroundColor', vElement.backgroundColor);
|
577 |
+
}
|
578 |
+
if (hElement && hElement !== true) {
|
579 |
+
inst.gridH.css('backgroundColor', hElement.backgroundColor);
|
580 |
+
}
|
581 |
+
}
|
582 |
+
}
|
583 |
+
});
|
584 |
+
|
585 |
+
})(n2);
|
library/media/admin/js/jqueryui/jquery-ui.columns.js
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
$.widget("ui.nextendColumns", $.ui.mouse, {
|
4 |
+
version: "1.0.0",
|
5 |
+
widgetEventPrefix: "columns",
|
6 |
+
options: {
|
7 |
+
columns: '1',
|
8 |
+
gutter: 0,
|
9 |
+
denominators: {
|
10 |
+
1: 100,
|
11 |
+
2: 100,
|
12 |
+
3: 144,
|
13 |
+
4: 100,
|
14 |
+
5: 100,
|
15 |
+
6: 144
|
16 |
+
},
|
17 |
+
// Callbacks
|
18 |
+
drag: null,
|
19 |
+
start: null,
|
20 |
+
stop: null
|
21 |
+
},
|
22 |
+
getDenominator: function (i) {
|
23 |
+
if (this.options.denominators[i] === undefined) {
|
24 |
+
this.options.denominators[i] = i * 15;
|
25 |
+
}
|
26 |
+
return this.options.denominators[i];
|
27 |
+
},
|
28 |
+
_create: function () {
|
29 |
+
|
30 |
+
this._setupHandles();
|
31 |
+
|
32 |
+
$(window).on('resize', $.proxy(this._resize, this));
|
33 |
+
|
34 |
+
this._mouseInit();
|
35 |
+
},
|
36 |
+
|
37 |
+
_destroy: function () {
|
38 |
+
|
39 |
+
this._mouseDestroy();
|
40 |
+
this.element
|
41 |
+
.removeData("uiNextendColumns")
|
42 |
+
.off(".columns")
|
43 |
+
.find("> .ui-column-width-handle")
|
44 |
+
.remove();
|
45 |
+
|
46 |
+
return this;
|
47 |
+
},
|
48 |
+
|
49 |
+
_setupHandles: function () {
|
50 |
+
var o = this.options, handle, i, n, axis;
|
51 |
+
|
52 |
+
this.fractions = [];
|
53 |
+
|
54 |
+
var columnWidths = o.columns.split('+');
|
55 |
+
for (var i = 0; i < columnWidths.length; i++) {
|
56 |
+
this.fractions.push(new Fraction(columnWidths[i]));
|
57 |
+
}
|
58 |
+
this.currentDenominator = this.getDenominator(this.fractions.length);
|
59 |
+
|
60 |
+
var currentPercent = 0;
|
61 |
+
for (i = 0; i < this.fractions.length - 1; i++) {
|
62 |
+
axis = $("<div class='ui-column-width-handle'>");
|
63 |
+
|
64 |
+
var width = (this.fractions[i].valueOf() * 100);
|
65 |
+
currentPercent += width;
|
66 |
+
axis
|
67 |
+
.data('i', i)
|
68 |
+
.data('percent', currentPercent)
|
69 |
+
.appendTo(this.element);
|
70 |
+
this._on(axis, {"mousedown": this._mouseDown});
|
71 |
+
}
|
72 |
+
|
73 |
+
this.handles = this.element.find('> .ui-column-width-handle');
|
74 |
+
|
75 |
+
this.handles.disableSelection();
|
76 |
+
|
77 |
+
this._resize();
|
78 |
+
},
|
79 |
+
|
80 |
+
_resize: function () {
|
81 |
+
this.paddingLeft = parseInt(this.element.css('paddingLeft'));
|
82 |
+
this.paddingRight = parseInt(this.element.css('paddingRight'));
|
83 |
+
|
84 |
+
var containerWidth = this.element.width();
|
85 |
+
|
86 |
+
this.outerWidth = containerWidth + this.paddingLeft + this.paddingRight,
|
87 |
+
this.innerWidth = containerWidth - this.handles.length * this.options.gutter;
|
88 |
+
|
89 |
+
for (var i = 0; i < this.handles.length; i++) {
|
90 |
+
var currentPercent = this.handles.eq(i).data('percent');
|
91 |
+
this._updateResizer(i, currentPercent);
|
92 |
+
}
|
93 |
+
},
|
94 |
+
|
95 |
+
_updateResizer: function (i, currentPercent) {
|
96 |
+
this.handles.eq(i).css({
|
97 |
+
left: currentPercent + '%',
|
98 |
+
marginLeft: -2 + this.paddingLeft + (i + 0.5) * this.options.gutter + (this.innerWidth - this.outerWidth) * currentPercent / 100
|
99 |
+
})
|
100 |
+
},
|
101 |
+
|
102 |
+
_removeHandles: function () {
|
103 |
+
this.handles.remove();
|
104 |
+
},
|
105 |
+
|
106 |
+
_setOption: function (key, value) {
|
107 |
+
this._super(key, value);
|
108 |
+
|
109 |
+
switch (key) {
|
110 |
+
case "columns":
|
111 |
+
this._removeHandles();
|
112 |
+
this._setupHandles();
|
113 |
+
break;
|
114 |
+
case "gutter":
|
115 |
+
this._resize();
|
116 |
+
default:
|
117 |
+
break;
|
118 |
+
}
|
119 |
+
},
|
120 |
+
|
121 |
+
_mouseCapture: function (event) {
|
122 |
+
var i, handle,
|
123 |
+
capture = false;
|
124 |
+
|
125 |
+
for (i = 0; i < this.handles.length; i++) {
|
126 |
+
handle = this.handles[i];
|
127 |
+
if (handle === event.target) {
|
128 |
+
capture = true;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
return !this.options.disabled && capture;
|
133 |
+
},
|
134 |
+
|
135 |
+
_mouseStart: function (event) {
|
136 |
+
var index = $(event.target).data('i'),
|
137 |
+
cLeft = this.element.offset().left + 10,
|
138 |
+
containerWidth = this.element.width() - 20;
|
139 |
+
|
140 |
+
this.resizeContext = {
|
141 |
+
index: index,
|
142 |
+
cLeft: cLeft,
|
143 |
+
containerWidth: containerWidth,
|
144 |
+
startX: Math.max(0, Math.min(event.clientX - cLeft, containerWidth)),
|
145 |
+
}
|
146 |
+
|
147 |
+
this.currentFractions = [];
|
148 |
+
this.currentPercent = [];
|
149 |
+
for (var i = 0; i < this.fractions.length; i++) {
|
150 |
+
this.currentFractions.push(this.fractions[i].clone());
|
151 |
+
this.currentPercent.push(this.fractions[i].valueOf());
|
152 |
+
}
|
153 |
+
|
154 |
+
this.resizing = true;
|
155 |
+
|
156 |
+
$("body").css("cursor", "ew-resize");
|
157 |
+
|
158 |
+
this.element.addClass("ui-column-width-resizing");
|
159 |
+
this._trigger("start", event, this.ui());
|
160 |
+
return true;
|
161 |
+
},
|
162 |
+
|
163 |
+
_mouseDrag: function (event) {
|
164 |
+
|
165 |
+
var currentX = Math.max(0, Math.min(event.clientX - this.resizeContext.cLeft, this.resizeContext.containerWidth)),
|
166 |
+
fractionDifference = new Fraction(Math.round((currentX - this.resizeContext.startX) / (this.resizeContext.containerWidth / this.currentDenominator)), this.currentDenominator);
|
167 |
+
|
168 |
+
if (fractionDifference.compare(this.fractions[this.resizeContext.index].clone().mul(-1)) < 0) {
|
169 |
+
fractionDifference = this.fractions[this.resizeContext.index].clone().mul(-1);
|
170 |
+
}
|
171 |
+
if (fractionDifference.compare(this.fractions[this.resizeContext.index + 1]) > 0) {
|
172 |
+
fractionDifference = this.fractions[this.resizeContext.index + 1].clone();
|
173 |
+
}
|
174 |
+
var currentP = this.fractions[this.resizeContext.index].add(fractionDifference),
|
175 |
+
nextP = this.fractions[this.resizeContext.index + 1].sub(fractionDifference);
|
176 |
+
|
177 |
+
this.currentFractions[this.resizeContext.index] = currentP;
|
178 |
+
this.currentFractions[this.resizeContext.index + 1] = nextP;
|
179 |
+
|
180 |
+
var currentPercent = 0;
|
181 |
+
this.currentPercent = [];
|
182 |
+
for (var i = 0; i < this.currentFractions.length; i++) {
|
183 |
+
var width = this.currentFractions[i].valueOf();
|
184 |
+
this.currentPercent.push(width);
|
185 |
+
currentPercent += width * 100;
|
186 |
+
this._updateResizer(i, currentPercent);
|
187 |
+
}
|
188 |
+
|
189 |
+
this._trigger("colwidth", event, this.ui());
|
190 |
+
},
|
191 |
+
|
192 |
+
_mouseStop: function (event) {
|
193 |
+
|
194 |
+
this.resizing = false;
|
195 |
+
|
196 |
+
$("body").css("cursor", "auto");
|
197 |
+
|
198 |
+
this._trigger("stop", event, this.ui());
|
199 |
+
|
200 |
+
this.fractions = this.currentFractions;
|
201 |
+
|
202 |
+
nextend.preventMouseUp();
|
203 |
+
return false;
|
204 |
+
},
|
205 |
+
|
206 |
+
ui: function () {
|
207 |
+
return {
|
208 |
+
element: this.element,
|
209 |
+
originalFractions: this.fractions,
|
210 |
+
currentFractions: this.currentFractions,
|
211 |
+
currentPercent: this.currentPercent,
|
212 |
+
index: this.resizeContext.index
|
213 |
+
};
|
214 |
+
}
|
215 |
+
});
|
216 |
+
})(n2);
|
library/media/admin/js/jqueryui/jquery-ui.layer-list-item.js
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$.widget("ui.nextendLayerListItem", $.ui.mouse, {
|
5 |
+
widgetEventPrefix: "layerListItem",
|
6 |
+
options: {
|
7 |
+
UIManager: null,
|
8 |
+
layer: false,
|
9 |
+
$layer: null,
|
10 |
+
distance: 2
|
11 |
+
},
|
12 |
+
_create: function () {
|
13 |
+
this._mouseInit();
|
14 |
+
},
|
15 |
+
_mouseCapture: function (event, overrideHandle) {
|
16 |
+
return this.options.UIManager._mouseCapture(this.options, event, overrideHandle);
|
17 |
+
},
|
18 |
+
_mouseStart: function (event, overrideHandle, noActivation) {
|
19 |
+
this._trigger('start');
|
20 |
+
return this.options.UIManager._mouseStart(this.options, event, overrideHandle, noActivation);
|
21 |
+
},
|
22 |
+
_mouseDrag: function (event) {
|
23 |
+
return this.options.UIManager._mouseDrag(this.options, event);
|
24 |
+
},
|
25 |
+
_mouseStop: function (event, noPropagation) {
|
26 |
+
return this.options.UIManager._mouseStop(this.options, event, noPropagation);
|
27 |
+
|
28 |
+
},
|
29 |
+
_destroy: function () {
|
30 |
+
this._mouseDestroy();
|
31 |
+
return this;
|
32 |
+
},
|
33 |
+
});
|
34 |
+
|
35 |
+
})(n2);
|
library/media/admin/js/jqueryui/jquery-ui.layer-list.js
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$.widget("ui.nextendLayerList", {
|
5 |
+
|
6 |
+
widgetEventPrefix: "layerList",
|
7 |
+
ready: false,
|
8 |
+
scrollTimeout: null,
|
9 |
+
options: {
|
10 |
+
$fixed: null,
|
11 |
+
$scrolled: null
|
12 |
+
},
|
13 |
+
_create: function () {
|
14 |
+
},
|
15 |
+
_mouseCapture: function (itemOptions, event, overrideHandle) {
|
16 |
+
return true;
|
17 |
+
},
|
18 |
+
_mouseStart: function (itemOptions, event, overrideHandle, noActivation) {
|
19 |
+
|
20 |
+
this.scrolledTop = this.options.$scrolled.offset().top;
|
21 |
+
this.scrolledHeight = this.options.$scrolled.height();
|
22 |
+
this.scrolledScroll = this.options.$scrolled.scrollTop();
|
23 |
+
this.scrolledMaxHeight = this.options.$scrolled[0].scrollHeight - this.scrolledHeight;
|
24 |
+
|
25 |
+
$('body').addClass('n2-ss-layer-list-move-layer');
|
26 |
+
|
27 |
+
this.context = {
|
28 |
+
placeholder: $('<div class="nextend-sortable-placeholder"><div></div></div>'),
|
29 |
+
mouse: {
|
30 |
+
y: event.pageY,
|
31 |
+
topModifier: itemOptions.$item.offset().top - event.pageY
|
32 |
+
},
|
33 |
+
$item: itemOptions.$item,
|
34 |
+
$clone: itemOptions.$item.clone()
|
35 |
+
};
|
36 |
+
|
37 |
+
this.context.$clone.addClass('n2-ss-ll-dragging').appendTo(this.options.$scrolled.find('> ul'));
|
38 |
+
|
39 |
+
this.context.droppables = this.options.mainContainer.getLLDroppables(itemOptions.layer);
|
40 |
+
|
41 |
+
this._cacheContainers();
|
42 |
+
|
43 |
+
this._trigger("start", event);
|
44 |
+
|
45 |
+
this._mouseDrag(itemOptions, event);
|
46 |
+
},
|
47 |
+
_scrollUp: function () {
|
48 |
+
if (this.scrolledTop > 0) {
|
49 |
+
if (this.scrollTimeout === null) {
|
50 |
+
this.scrollTimeout = setInterval($.proxy(function () {
|
51 |
+
this.scrolledScroll -= 30;
|
52 |
+
this.options.$scrolled.scrollTop(this.scrolledScroll);
|
53 |
+
}, this), 100);
|
54 |
+
this.scrolledScroll -= 30;
|
55 |
+
this.options.$scrolled.scrollTop(this.scrolledScroll);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
},
|
59 |
+
_scrollDown: function () {
|
60 |
+
if (this.scrollTimeout === null) {
|
61 |
+
this.scrollTimeout = setInterval($.proxy(function () {
|
62 |
+
this.scrolledScroll += 30;
|
63 |
+
this.options.$scrolled.scrollTop(Math.min(this.scrolledScroll, this.scrolledMaxHeight));
|
64 |
+
}, this), 100);
|
65 |
+
this.scrolledScroll += 30;
|
66 |
+
this.options.$scrolled.scrollTop(Math.min(this.scrolledScroll, this.scrolledMaxHeight));
|
67 |
+
}
|
68 |
+
},
|
69 |
+
_mouseDrag: function (itemOptions, event) {
|
70 |
+
|
71 |
+
this.scrolledTop = this.options.$scrolled.offset().top;
|
72 |
+
|
73 |
+
if (this.scrolledHeight > 60) {
|
74 |
+
if (event.pageY < this.scrolledTop + 30) {
|
75 |
+
this._scrollUp();
|
76 |
+
} else if (event.pageY > this.scrolledTop + this.scrolledHeight - 30) {
|
77 |
+
this._scrollDown();
|
78 |
+
} else {
|
79 |
+
clearInterval(this.scrollTimeout);
|
80 |
+
this.scrollTimeout = null;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
this.scrolledScroll = this.options.$scrolled.scrollTop();
|
86 |
+
|
87 |
+
var y = event.pageY - this.scrolledTop + this.scrolledScroll;
|
88 |
+
|
89 |
+
var targetContainer = this._findInnerContainer(y);
|
90 |
+
if (targetContainer === false) {
|
91 |
+
targetContainer = this.context.droppables[0];
|
92 |
+
}
|
93 |
+
|
94 |
+
if (typeof targetContainer.layers === "undefined") {
|
95 |
+
targetContainer.layers = this._cacheContainerLayers(targetContainer);
|
96 |
+
}
|
97 |
+
|
98 |
+
var targetIndex = this._findNormalIndex(y, targetContainer);
|
99 |
+
|
100 |
+
if (targetIndex > 0) {
|
101 |
+
this.context.placeholder.insertAfter(targetContainer.layers[targetIndex - 1].layer.layerRow);
|
102 |
+
} else {
|
103 |
+
this.context.placeholder.prependTo(targetContainer.$container);
|
104 |
+
}
|
105 |
+
|
106 |
+
this.context.targetIndex = targetIndex;
|
107 |
+
if (this.context.targetContainer && this.context.targetContainer != targetContainer) {
|
108 |
+
this.context.targetContainer.layer.layerRow.removeClass('n2-ss-ll-dragging-parent');
|
109 |
+
}
|
110 |
+
|
111 |
+
this.context.targetContainer = targetContainer;
|
112 |
+
this.context.targetContainer.layer.layerRow.addClass('n2-ss-ll-dragging-parent');
|
113 |
+
|
114 |
+
this.context.$clone.css({
|
115 |
+
top: y + this.context.mouse.topModifier
|
116 |
+
});
|
117 |
+
|
118 |
+
},
|
119 |
+
|
120 |
+
_mouseStop: function (itemOptions, event, noPropagation) {
|
121 |
+
|
122 |
+
if (this.scrollTimeout !== null) {
|
123 |
+
clearInterval(this.scrollTimeout);
|
124 |
+
this.scrollTimeout = null;
|
125 |
+
}
|
126 |
+
|
127 |
+
this.context.placeholder.remove();
|
128 |
+
|
129 |
+
this.context.$clone.remove();
|
130 |
+
|
131 |
+
this.context.targetContainer.layer.layerRow.removeClass('n2-ss-ll-dragging-parent');
|
132 |
+
|
133 |
+
var targetIndex = this.context.targetIndex,
|
134 |
+
targetContainer = this.context.targetContainer,
|
135 |
+
originalIndex = itemOptions.layer.getIndex(),
|
136 |
+
newIndex = -1;
|
137 |
+
|
138 |
+
|
139 |
+
if (this.context.targetContainer.layers.length == 0) {
|
140 |
+
newIndex = 0;
|
141 |
+
} else {
|
142 |
+
var nextLayer = false,
|
143 |
+
prevLayer = false;
|
144 |
+
|
145 |
+
if (this.context.targetContainer.layers[targetIndex]) {
|
146 |
+
nextLayer = this.context.targetContainer.layers[targetIndex].layer;
|
147 |
+
}
|
148 |
+
|
149 |
+
if (this.context.targetContainer.layers[targetIndex - 1]) {
|
150 |
+
prevLayer = this.context.targetContainer.layers[targetIndex - 1].layer;
|
151 |
+
}
|
152 |
+
|
153 |
+
if (nextLayer == itemOptions.layer || prevLayer == itemOptions.layer) {
|
154 |
+
newIndex = -1;
|
155 |
+
} else {
|
156 |
+
if (targetContainer.layer.container.allowedPlacementMode == 'absolute') {
|
157 |
+
if (nextLayer) {
|
158 |
+
//itemOptions.layer.layer.detach();
|
159 |
+
newIndex = nextLayer.getIndex() + 1;
|
160 |
+
} else if (prevLayer) {
|
161 |
+
//itemOptions.layer.layer.detach();
|
162 |
+
newIndex = prevLayer.getIndex();
|
163 |
+
}
|
164 |
+
} else {
|
165 |
+
if (prevLayer) {
|
166 |
+
//itemOptions.layer.layer.detach();
|
167 |
+
newIndex = prevLayer.getIndex() + 1;
|
168 |
+
} else if (nextLayer) {
|
169 |
+
//itemOptions.layer.layer.detach();
|
170 |
+
newIndex = nextLayer.getIndex();
|
171 |
+
}
|
172 |
+
}
|
173 |
+
}
|
174 |
+
}
|
175 |
+
if (newIndex >= 0) {
|
176 |
+
if (itemOptions.layer.type == 'col') {
|
177 |
+
if (newIndex > originalIndex) {
|
178 |
+
newIndex--;
|
179 |
+
}
|
180 |
+
targetContainer.layer.moveCol(originalIndex, newIndex);
|
181 |
+
} else {
|
182 |
+
targetContainer.layer.container.insertLayerAt(itemOptions.layer, newIndex);
|
183 |
+
itemOptions.layer.onCanvasUpdate(originalIndex, targetContainer.layer, newIndex);
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
delete this.context;
|
188 |
+
|
189 |
+
this._trigger("stop", event);
|
190 |
+
|
191 |
+
|
192 |
+
$('body').removeClass('n2-ss-layer-list-move-layer');
|
193 |
+
},
|
194 |
+
|
195 |
+
cancel: function (itemOptions) {
|
196 |
+
},
|
197 |
+
|
198 |
+
_cacheContainers: function () {
|
199 |
+
for (var i = 0; i < this.context.droppables.length; i++) {
|
200 |
+
var obj = this.context.droppables[i];
|
201 |
+
obj.top = obj.$container.offset().top - this.scrolledTop + this.scrolledScroll - 15;
|
202 |
+
obj.height = obj.$container.outerHeight();
|
203 |
+
obj.bottom = obj.top + obj.height + 15;
|
204 |
+
}
|
205 |
+
},
|
206 |
+
|
207 |
+
_findInnerContainer: function (y) {
|
208 |
+
for (var i = this.context.droppables.length - 1; i >= 0; i--) {
|
209 |
+
var obj = this.context.droppables[i];
|
210 |
+
if (obj.top <= y && obj.bottom >= y) {
|
211 |
+
return obj;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
return false;
|
215 |
+
},
|
216 |
+
|
217 |
+
_cacheContainerLayers: function (droppable) {
|
218 |
+
var layerObjects = [],
|
219 |
+
layers = droppable.layer.container.getSortedLayers();
|
220 |
+
|
221 |
+
for (var i = 0; i < layers.length; i++) {
|
222 |
+
//if (layers[i].layerRow[0] === this.context.$item[0]) continue;
|
223 |
+
var obj = {
|
224 |
+
layer: layers[i]
|
225 |
+
};
|
226 |
+
obj.top = obj.layer.layerRow.offset().top - this.scrolledTop + this.scrolledScroll;
|
227 |
+
obj.height = obj.layer.layerRow.outerHeight();
|
228 |
+
obj.bottom = obj.top + obj.height / 2;
|
229 |
+
obj.index = i;
|
230 |
+
layerObjects.push(obj);
|
231 |
+
}
|
232 |
+
|
233 |
+
if (droppable.layer.container.allowedPlacementMode == 'absolute') {
|
234 |
+
layerObjects.reverse();
|
235 |
+
}
|
236 |
+
|
237 |
+
return layerObjects;
|
238 |
+
},
|
239 |
+
|
240 |
+
_findNormalIndex: function (y, targetContainer) {
|
241 |
+
for (var i = 0; i < targetContainer.layers.length; i++) {
|
242 |
+
var obj = targetContainer.layers[i];
|
243 |
+
if (y <= obj.bottom) {
|
244 |
+
return i;
|
245 |
+
break;
|
246 |
+
}
|
247 |
+
}
|
248 |
+
return targetContainer.layers.length;
|
249 |
+
}
|
250 |
+
});
|
251 |
+
|
252 |
+
})(n2);
|
library/media/dist/smartslider-backend.js
CHANGED
@@ -1,7140 +1,10431 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
this.pxToFrame = this.oneSecWidth / this.fps;
|
22 |
-
|
23 |
-
this.$currentSlideElement = null;
|
24 |
-
};
|
25 |
-
|
26 |
-
NextendSmartSliderAdminStorage.prototype.durationToOffsetX = function (sec) {
|
27 |
-
return sec * this.oneSecWidth;
|
28 |
-
};
|
29 |
-
|
30 |
-
NextendSmartSliderAdminStorage.prototype.offsetXToDuration = function (px) {
|
31 |
-
return px / this.oneSecWidth;
|
32 |
-
};
|
33 |
-
|
34 |
-
NextendSmartSliderAdminStorage.prototype.normalizeOffsetX = function (offsetX) {
|
35 |
-
return Math.round(offsetX / this.pxToFrame) * this.pxToFrame;
|
36 |
-
};
|
37 |
-
|
38 |
-
|
39 |
-
NextendSmartSliderAdminStorage.prototype.startEditor = function (sliderElementID, slideContentElementID, isUploadDisabled, uploadUrl, uploadDir, options) {
|
40 |
-
if (this.slide === null) {
|
41 |
-
window[sliderElementID].started(function(){
|
42 |
-
new SmartSliderAdminSlide(sliderElementID, slideContentElementID, isUploadDisabled, uploadUrl, uploadDir, options);
|
43 |
-
});
|
44 |
-
}
|
45 |
-
return this.slide;
|
46 |
-
};
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
;
|
51 |
-
(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
}
|
57 |
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
};
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
73 |
|
74 |
-
|
75 |
-
return
|
|
|
|
|
76 |
};
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
})(nextend.smartSlider, n2, window);
|
81 |
|
82 |
-
|
83 |
-
(function ($, scope) {
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
88 |
};
|
89 |
-
NextendVisualEditorController.prototype.constructor.call(this, false);
|
90 |
-
|
91 |
-
this.bgAnimationElement = $('.n2-bg-animation');
|
92 |
-
this.slides = $('.n2-bg-animation-slide');
|
93 |
-
this.bgImages = $('.n2-bg-animation-slide-bg');
|
94 |
-
|
95 |
-
this.directionTab = new NextendElementRadio('n2-background-animation-preview-tabs', ['0', '1']);
|
96 |
-
this.directionTab.element.on('nextendChange.n2-editor', $.proxy(this.directionTabChanged, this));
|
97 |
-
|
98 |
-
if (!nModernizr.csstransforms3d || !nModernizr.csstransformspreserve3d) {
|
99 |
-
nextend.notificationCenter.error('Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ')
|
100 |
-
}
|
101 |
};
|
102 |
|
103 |
-
|
104 |
-
NextendBackgroundAnimationEditorController.prototype.constructor = NextendBackgroundAnimationEditorController;
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
this.
|
111 |
-
|
112 |
-
|
|
|
|
|
113 |
|
114 |
-
|
115 |
-
return null;
|
116 |
-
};
|
117 |
|
118 |
-
|
119 |
-
this.lightbox.addClass('n2-editor-loaded');
|
120 |
-
};
|
121 |
|
122 |
-
|
|
|
|
|
123 |
|
124 |
-
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
};
|
129 |
|
130 |
-
|
131 |
-
if (
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
this.timeline.play();
|
136 |
-
}
|
137 |
}
|
138 |
-
};
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
-
};
|
145 |
-
|
146 |
-
NextendBackgroundAnimationEditorController.prototype.next = function () {
|
147 |
-
this.timeline = new NextendTimeline({
|
148 |
-
paused: true,
|
149 |
-
onComplete: $.proxy(this.ended, this)
|
150 |
-
});
|
151 |
-
var current = this.bgImages.eq(this.current),
|
152 |
-
next = this.bgImages.eq(1 - this.current);
|
153 |
|
154 |
-
if (
|
155 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
-
|
158 |
-
this.slides.eq(1 - this.current).css('zIndex', 3);
|
159 |
|
160 |
-
|
161 |
-
opacity: 0
|
162 |
-
}, this.currentAnimation.getExtraDelay());
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
167 |
|
|
|
|
|
168 |
|
169 |
-
|
170 |
|
171 |
-
|
|
|
|
|
|
|
|
|
172 |
|
173 |
-
|
174 |
-
|
175 |
-
}, 0);
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
this.
|
182 |
-
this.timeline.play();
|
183 |
};
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
}
|
189 |
-
this.next();
|
190 |
};
|
191 |
|
192 |
-
|
193 |
-
|
194 |
-
this.
|
195 |
-
if (
|
196 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
};
|
199 |
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
(n2, window);
|
204 |
-
|
205 |
-
function strip_tags(input, allowed) {
|
206 |
-
allowed = (((allowed || '') + '')
|
207 |
-
.toLowerCase()
|
208 |
-
.match(/<[a-z][a-z0-9]*>/g) || [])
|
209 |
-
.join(''); // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
|
210 |
-
var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
|
211 |
-
commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
|
212 |
-
return input.replace(commentsAndPhpTags, '')
|
213 |
-
.replace(tags, function ($0, $1) {
|
214 |
-
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
|
215 |
-
});
|
216 |
-
}
|
217 |
|
218 |
-
if (
|
219 |
-
|
220 |
-
|
221 |
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
-
|
226 |
-
var len = t.length >>> 0;
|
227 |
-
if (typeof fun !== "function")
|
228 |
-
throw new TypeError();
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
if (fun.call(thisp, val, i, t))
|
236 |
-
res.push(val);
|
237 |
}
|
238 |
}
|
239 |
-
|
240 |
-
return res;
|
241 |
};
|
242 |
-
}
|
243 |
-
(function ($, scope, undefined) {
|
244 |
|
245 |
-
function
|
|
|
|
|
246 |
|
247 |
-
|
|
|
248 |
.on({
|
249 |
-
|
250 |
-
|
251 |
-
},
|
252 |
-
keyup: $.proxy(function (e) {
|
253 |
-
if (e.keyCode == 27) {
|
254 |
-
this.cancel();
|
255 |
-
}
|
256 |
-
}, this),
|
257 |
-
blur: $.proxy(this.save, this)
|
258 |
});
|
259 |
-
|
260 |
-
this.$form = $('<form class="n2-inline-form"></form>')
|
261 |
-
.append(this.$input)
|
262 |
-
.on('submit', $.proxy(this.save, this));
|
263 |
-
}
|
264 |
-
|
265 |
-
NextendSmartSliderAdminInlineField.prototype.injectNode = function ($targetNode, value) {
|
266 |
-
this.$input.val(value);
|
267 |
-
$targetNode.append(this.$form);
|
268 |
-
this.$input.focus();
|
269 |
};
|
270 |
|
271 |
-
|
272 |
-
e.preventDefault();
|
273 |
-
this.$input.trigger('valueChanged', [this.$input.val()]);
|
274 |
-
this.$input.off('blur');
|
275 |
-
this.destroy();
|
276 |
-
};
|
277 |
|
278 |
-
|
279 |
-
|
280 |
-
|
|
|
|
|
281 |
};
|
282 |
|
283 |
-
|
284 |
-
this
|
285 |
-
this.$form.remove();
|
286 |
};
|
287 |
|
288 |
-
|
|
|
|
|
289 |
|
290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
|
292 |
-
|
|
|
|
|
293 |
|
294 |
-
|
295 |
-
|
296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
|
298 |
-
function
|
299 |
-
this.
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
this.preventUndoRedo = false;
|
307 |
-
|
308 |
-
this.undoBTN = $('#n2-ss-undo').on('click', $.proxy(this.undo, this));
|
309 |
-
this.redoBTN = $('#n2-ss-redo').on('click', $.proxy(this.redo, this));
|
310 |
-
this.updateUI();
|
311 |
-
};
|
312 |
-
|
313 |
-
NextendSmartSliderSlideEditorHistory.prototype.updateUI = function () {
|
314 |
-
if (this.index == 0 || this.history.length == 0) {
|
315 |
-
this.undoBTN.removeClass('n2-active');
|
316 |
-
} else {
|
317 |
-
this.undoBTN.addClass('n2-active');
|
318 |
-
}
|
319 |
-
|
320 |
-
if (this.index == -1 || this.index >= this.history.length) {
|
321 |
-
this.redoBTN.removeClass('n2-active');
|
322 |
-
} else {
|
323 |
-
this.redoBTN.addClass('n2-active');
|
324 |
-
}
|
325 |
-
};
|
326 |
-
|
327 |
-
NextendSmartSliderSlideEditorHistory.prototype.throttleUndoRedo = function () {
|
328 |
-
if (!this.preventUndoRedo) {
|
329 |
-
this.preventUndoRedo = true;
|
330 |
-
setTimeout($.proxy(function () {
|
331 |
-
this.preventUndoRedo = false;
|
332 |
-
}, this), 100);
|
333 |
-
return false;
|
334 |
-
}
|
335 |
-
return true;
|
336 |
-
};
|
337 |
-
|
338 |
-
NextendSmartSliderSlideEditorHistory.prototype.add = function (cb) {
|
339 |
-
if (!this.isEnabled || !this.historyAddAllowed) return;
|
340 |
-
if (this.index != -1) {
|
341 |
-
this.history.splice(this.index, this.history.length);
|
342 |
-
}
|
343 |
-
this.index = -1;
|
344 |
-
var currentTask = cb();
|
345 |
-
if (!this.isBatched) {
|
346 |
-
this.history.push([currentTask]);
|
347 |
-
this.isBatched = true;
|
348 |
-
setTimeout($.proxy(function () {
|
349 |
-
this.isBatched = false;
|
350 |
-
}, this), 100);
|
351 |
-
} else {
|
352 |
-
this.history[this.history.length - 1].push(currentTask);
|
353 |
-
}
|
354 |
-
|
355 |
-
if (this.history.length > this.historyStates) {
|
356 |
-
this.history.unshift();
|
357 |
}
|
358 |
-
this.
|
359 |
-
|
360 |
-
};
|
361 |
-
|
362 |
-
NextendSmartSliderSlideEditorHistory.prototype.off = function () {
|
363 |
-
this.historyAddAllowed = false;
|
364 |
};
|
365 |
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
|
370 |
-
|
371 |
-
|
|
|
|
|
|
|
372 |
e.preventDefault();
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
}
|
377 |
-
this.off();
|
378 |
-
if (this.index == -1) {
|
379 |
-
this.index = this.history.length - 1;
|
380 |
-
} else {
|
381 |
-
this.index--;
|
382 |
-
}
|
383 |
-
if (this.index >= 0) {
|
384 |
-
var actions = this.history[this.index];
|
385 |
-
for (var i = actions.length - 1; i >= 0; i--) {
|
386 |
-
var action = actions[i];
|
387 |
-
action[0].history(action[1], action[3], action[4], action);
|
388 |
-
}
|
389 |
-
} else {
|
390 |
-
this.index = 0;
|
391 |
-
// No more undo
|
392 |
-
}
|
393 |
-
this.on();
|
394 |
-
this.updateUI();
|
395 |
-
};
|
396 |
|
397 |
-
|
398 |
-
|
399 |
e.preventDefault();
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
}
|
404 |
-
this.off();
|
405 |
-
if (this.index != -1) {
|
406 |
-
if (this.index < this.history.length) {
|
407 |
-
var actions = this.history[this.index];
|
408 |
-
this.index++;
|
409 |
-
for (var i = 0; i < actions.length; i++) {
|
410 |
-
var action = actions[i];
|
411 |
-
action[0].history(action[1], action[2], action[4], action);
|
412 |
-
}
|
413 |
-
} else {
|
414 |
-
// No more redo
|
415 |
-
}
|
416 |
-
} else {
|
417 |
-
// No redo
|
418 |
-
}
|
419 |
-
this.on();
|
420 |
-
this.updateUI();
|
421 |
-
};
|
422 |
-
|
423 |
-
NextendSmartSliderSlideEditorHistory.prototype.changeFuture = function (originalScope, newScope) {
|
424 |
-
for (var i = 0; i < this.history.length; i++) {
|
425 |
-
for (var j = 0; j < this.history[i].length; j++) {
|
426 |
-
if (this.history[i][j][0] === originalScope) {
|
427 |
-
this.history[i][j][0] = newScope;
|
428 |
-
}
|
429 |
-
for (var k = 2; k < this.history[i][j].length; k++) {
|
430 |
-
for (var l = 0; l < this.history[i][j][k].length; l++) {
|
431 |
-
if (this.history[i][j][k][l] === originalScope) {
|
432 |
-
this.history[i][j][k][l] = newScope;
|
433 |
-
}
|
434 |
-
}
|
435 |
-
}
|
436 |
-
}
|
437 |
-
}
|
438 |
-
};
|
439 |
-
|
440 |
-
n2(window).ready(function () {
|
441 |
-
smartSlider.history = new NextendSmartSliderSlideEditorHistory();
|
442 |
-
});
|
443 |
-
|
444 |
-
})(nextend.smartSlider, n2, window);
|
445 |
-
|
446 |
-
(function ($, scope, undefined) {
|
447 |
|
448 |
-
|
449 |
|
450 |
-
|
451 |
-
|
452 |
-
return;
|
453 |
}
|
|
|
454 |
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
QuickSlides.prototype.openEdit = function (e) {
|
461 |
-
e.preventDefault();
|
462 |
-
var slides = $('#n2-ss-slides .n2-box-slide');
|
463 |
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
table = form.find('table');
|
490 |
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
id = slide.data('slideid');
|
495 |
-
tr.append($('<td />').append('<img src="' + slide.data('image') + '" style="width:100px;"/>'));
|
496 |
-
tr.append($('<td />').append(that.createInput('Name', 'title-' + id, slide.data('title'), 'width: 240px;')));
|
497 |
-
tr.append($('<td />').append(that.createTextarea('Description', 'description-' + id, slide.data('description'), 'width: 330px;height:24px;')));
|
498 |
-
var link = slide.data('link').split('|*|');
|
499 |
-
tr.append($('<td />').append(that.createLink('Link', 'link-' + id, link[0], 'width: 180px;')));
|
500 |
-
tr.append($('<td />').append(that.createTarget('Target', 'target-' + id, link.length > 1 ? link[1] : '_self', '')));
|
501 |
|
502 |
-
new
|
|
|
503 |
|
504 |
-
|
|
|
|
|
505 |
|
|
|
|
|
506 |
|
507 |
-
|
508 |
|
509 |
-
var
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
|
517 |
-
|
518 |
-
changed[id] = {
|
519 |
-
name: name,
|
520 |
-
description: description,
|
521 |
-
link: link
|
522 |
-
};
|
523 |
-
}
|
524 |
-
}, this));
|
525 |
|
526 |
-
if (jQuery.isEmptyObject(changed)) {
|
527 |
-
this.hide(e);
|
528 |
-
} else {
|
529 |
-
this.hide(e);
|
530 |
NextendAjaxHelper.ajax({
|
531 |
type: "POST",
|
532 |
-
url: NextendAjaxHelper.makeAjaxUrl(
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
slideBox.attr('data-link', slides[slideID].rawLink);
|
546 |
-
slideBox.data('link', slides[slideID].rawLink);
|
547 |
-
}
|
548 |
}, this));
|
549 |
-
|
550 |
-
|
|
|
551 |
}
|
552 |
}
|
553 |
-
}
|
554 |
-
});
|
555 |
-
|
556 |
-
this.modal.setCustomClass('n2-ss-quick-slides-edit-modal');
|
557 |
-
this.modal.show();
|
558 |
-
|
559 |
-
};
|
560 |
-
|
561 |
-
QuickSlides.prototype.createInput = function (label, id, value) {
|
562 |
-
var style = '';
|
563 |
-
if (arguments.length == 4) {
|
564 |
-
style = arguments[3];
|
565 |
}
|
566 |
-
|
567 |
-
nodes.find('input').val(value);
|
568 |
-
return nodes;
|
569 |
};
|
570 |
|
571 |
-
|
572 |
-
var
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="' + id + '" class="n2-h5" autocomplete="off" style="' + style + '"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="' + id + '_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');
|
587 |
-
nodes.find('input').val(value);
|
588 |
-
return nodes;
|
589 |
-
};
|
590 |
|
|
|
|
|
|
|
|
|
|
|
591 |
|
592 |
-
|
593 |
-
var style = '';
|
594 |
-
if (arguments.length == 4) {
|
595 |
-
style = arguments[3];
|
596 |
-
}
|
597 |
-
var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="' + id + '" autocomplete="off" style="' + style + '"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');
|
598 |
-
nodes.find('select').val(value);
|
599 |
-
return nodes;
|
600 |
};
|
601 |
|
602 |
-
|
603 |
-
})
|
604 |
-
(function ($, scope, undefined) {
|
605 |
-
|
606 |
-
function ruler(stored) {
|
607 |
-
this.showGuides = 1;
|
608 |
-
this.guides = [];
|
609 |
-
this.ratios = {
|
610 |
-
w: 1,
|
611 |
-
h: 1
|
612 |
-
};
|
613 |
-
this.container = $('<div class="n2-ruler-container" />').appendTo('#smartslider-adjust-height .n2-ss-slider-outer-container');
|
614 |
-
|
615 |
-
this.scale = 10;
|
616 |
-
|
617 |
-
this.vertical = $('<div class="n2-ruler n2-ruler-vertical unselectable"></div>').appendTo('.n2-ss-slider-real-container');
|
618 |
-
this.horizontal = $('<div class="n2-ruler n2-ruler-horizontal unselectable"></div>').appendTo(this.container);
|
619 |
|
620 |
-
|
621 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
|
623 |
-
this.
|
624 |
-
|
625 |
-
|
|
|
626 |
|
|
|
627 |
|
628 |
-
this.
|
629 |
-
.appendTo('body');
|
630 |
|
631 |
-
this.
|
632 |
-
if (this.showGuides) {
|
633 |
-
new GuideHorizontal(this, this.horizontal, this.ratios.w, e);
|
634 |
-
}
|
635 |
-
}, this));
|
636 |
|
|
|
|
|
|
|
637 |
|
638 |
-
|
639 |
-
if (this.showGuides) {
|
640 |
-
new GuideVertical(this, this.vertical, this.ratios.h, e);
|
641 |
-
}
|
642 |
-
}, this));
|
643 |
|
|
|
|
|
644 |
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
var guide = new GuideVertical(this, this.vertical, this.ratios.h);
|
653 |
-
guide.setPosition(stored.vertical[i]);
|
654 |
-
}
|
655 |
-
} catch (e) {
|
656 |
}
|
657 |
-
|
658 |
-
this.
|
659 |
-
|
660 |
-
}
|
661 |
-
|
662 |
-
ruler.prototype.addGuide = function (guide) {
|
663 |
-
this.guides.push(guide);
|
664 |
-
}
|
665 |
|
666 |
-
|
667 |
-
|
668 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
669 |
|
670 |
-
|
671 |
-
|
672 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
673 |
}
|
674 |
-
}
|
675 |
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
680 |
}
|
681 |
-
|
682 |
-
}
|
683 |
|
684 |
-
ruler.prototype.onResize = function () {
|
685 |
-
var dimensions = nextend.smartSlider.frontend.responsive.responsiveDimensions,
|
686 |
-
width = Math.max(dimensions.slider.width, $('#n2-tab-smartslider-editor').outerWidth(true) - 40),
|
687 |
-
height = Math.max(dimensions.slider.height, $('#n2-tab-smartslider-editor').outerHeight(true));
|
688 |
|
|
|
|
|
|
|
689 |
|
690 |
-
this.
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
703 |
}
|
704 |
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
|
|
|
|
|
|
711 |
}
|
712 |
-
|
713 |
-
}
|
714 |
}
|
715 |
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
};
|
721 |
-
for (var i = 0; i < this.guides.length; i++) {
|
722 |
-
if (this.guides[i] instanceof GuideHorizontal) {
|
723 |
-
data.horizontal.push(this.guides[i].position);
|
724 |
-
} else if (this.guides[i] instanceof GuideVertical) {
|
725 |
-
data.vertical.push(this.guides[i].position);
|
726 |
-
}
|
727 |
-
}
|
728 |
-
return data;
|
729 |
}
|
730 |
|
731 |
-
|
732 |
-
|
733 |
-
.
|
734 |
-
|
|
|
|
|
735 |
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
742 |
}
|
743 |
-
}
|
744 |
-
|
745 |
-
|
746 |
-
guideVisible = false;
|
747 |
-
guide.css('display', 'none');
|
748 |
-
this.positionDisplay.removeClass('n2-active');
|
749 |
}
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
offset = Math.round(this.vertical.offset().top);
|
756 |
-
showGuide();
|
757 |
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
left: e.pageX + 10,
|
768 |
-
top: e.pageY + 10
|
769 |
-
});
|
770 |
-
lastY = e.pageY;
|
771 |
-
}
|
772 |
-
}
|
773 |
-
}, this));
|
774 |
-
}, this),
|
775 |
-
mouseleave: $.proxy(function () {
|
776 |
-
this.vertical.off('.n2-ruler-measure-tool');
|
777 |
-
hideGuide();
|
778 |
-
}, this)
|
779 |
-
});
|
780 |
-
}
|
781 |
|
782 |
-
|
783 |
-
var guide = $('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>')
|
784 |
-
.css('display', 'none')
|
785 |
-
.appendTo(this.horizontal);
|
786 |
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
this.positionDisplay.addClass('n2-active');
|
793 |
-
}
|
794 |
-
}, this),
|
795 |
-
hideGuide = $.proxy(function () {
|
796 |
-
if (guideVisible) {
|
797 |
-
guideVisible = false;
|
798 |
-
guide.css('display', 'none');
|
799 |
-
this.positionDisplay.removeClass('n2-active');
|
800 |
-
}
|
801 |
-
}, this);
|
802 |
|
803 |
-
this.horizontal.on({
|
804 |
-
mouseenter: $.proxy(function (e) {
|
805 |
-
if (!this.showGuides) return;
|
806 |
-
var lastX = 0,
|
807 |
-
offset = Math.round(this.horizontal.offset().left);
|
808 |
-
showGuide();
|
809 |
|
810 |
-
|
811 |
-
if ($(e.target).hasClass('n2-ruler-guide-border') && $(e.target).parent()[0] != guide[0]) {
|
812 |
-
hideGuide();
|
813 |
-
} else {
|
814 |
-
showGuide();
|
815 |
-
if (lastX != e.pageX) {
|
816 |
-
var pos = Math.max(e.pageX - offset, 40);
|
817 |
-
guide.css('left', pos);
|
818 |
-
this.positionDisplay.html((pos - 40) + 'px').css({
|
819 |
-
left: e.pageX + 10,
|
820 |
-
top: e.pageY + 10
|
821 |
-
});
|
822 |
-
lastX = e.pageX;
|
823 |
-
}
|
824 |
-
}
|
825 |
-
}, this));
|
826 |
-
}, this),
|
827 |
-
mouseleave: $.proxy(function () {
|
828 |
-
this.horizontal.off('.n2-ruler-measure-tool');
|
829 |
-
hideGuide();
|
830 |
-
}, this)
|
831 |
-
});
|
832 |
-
}
|
833 |
|
834 |
-
|
835 |
|
836 |
-
|
837 |
-
this.ruler = ruler;
|
838 |
-
this.container = container;
|
839 |
-
this.position = 0;
|
840 |
-
this.ratio = ratio;
|
841 |
|
842 |
-
|
843 |
-
|
844 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
845 |
e.preventDefault();
|
846 |
-
|
847 |
-
|
848 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
849 |
}
|
850 |
}, this));
|
|
|
851 |
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
this.create(e);
|
856 |
}
|
857 |
-
|
858 |
-
}
|
859 |
-
|
860 |
-
Guide.prototype._position = function (position, e) {
|
861 |
-
return Math.max(0, position);
|
862 |
}
|
863 |
|
864 |
-
|
865 |
-
this.
|
866 |
-
this.
|
|
|
|
|
867 |
}
|
868 |
|
869 |
-
|
870 |
-
|
871 |
-
|
|
|
|
|
872 |
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
884 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
885 |
|
886 |
-
|
|
|
|
|
|
|
|
|
|
|
887 |
|
888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
|
890 |
-
|
891 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
}
|
893 |
|
894 |
-
|
895 |
-
|
896 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
897 |
|
898 |
-
|
899 |
-
|
900 |
-
|
|
|
901 |
|
902 |
-
|
903 |
-
|
904 |
-
this.refresh();
|
905 |
-
}
|
906 |
|
907 |
-
|
908 |
-
|
909 |
-
|
|
|
910 |
|
911 |
-
|
912 |
-
|
|
|
|
|
913 |
|
914 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
915 |
|
916 |
-
|
917 |
-
this.position = this._position((e.pageY - offset) / this.ratio, e);
|
918 |
-
this.positionRender(this.position);
|
919 |
-
}
|
920 |
|
921 |
-
|
922 |
-
|
923 |
-
|
|
|
|
|
924 |
|
925 |
-
|
926 |
-
this.guide.css('top', Math.max(0, value) * this.ratio + 40);
|
927 |
-
}
|
928 |
|
929 |
-
|
930 |
-
this.ratio = w;
|
931 |
-
this.refresh();
|
932 |
-
}
|
933 |
|
|
|
934 |
|
935 |
-
|
936 |
-
(function ($, scope, undefined) {
|
937 |
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
this.slides = [];
|
943 |
-
this.ajaxUrl = ajaxUrl;
|
944 |
-
this.contentAjaxUrl = contentAjaxUrl;
|
945 |
-
this.slidesPanel = $('#n2-ss-slides-container');
|
946 |
-
this.slidesContainer = this.slidesPanel.find('.n2-ss-slides-container');
|
947 |
|
948 |
-
|
|
|
|
|
|
|
|
|
949 |
|
950 |
-
this.initSlidesOrderable();
|
951 |
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
|
957 |
-
|
|
|
|
|
|
|
|
|
958 |
|
959 |
-
|
960 |
-
$('.n2-add-quick-video').on('click', $.proxy(this.addQuickVideo, this));
|
961 |
-
$('.n2-add-quick-post').on('click', $.proxy(this.addQuickPost, this));
|
962 |
|
963 |
-
|
|
|
|
|
|
|
|
|
964 |
|
|
|
|
|
|
|
|
|
|
|
|
|
965 |
|
966 |
-
|
967 |
-
|
968 |
-
this.slidesContainer.fileupload({
|
969 |
-
url: uploadUrl,
|
970 |
-
pasteZone: false,
|
971 |
-
dataType: 'json',
|
972 |
-
paramName: 'image',
|
973 |
-
dropZone: typeof nextend.smartSlider == 'undefined' ? $(document) : $('.n2-ss-slides-outer-container'),
|
974 |
|
975 |
-
|
976 |
-
data.formData = {path: '/' + uploadDir};
|
977 |
-
data.submit();
|
978 |
-
}, this),
|
979 |
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
} else {
|
989 |
-
NextendAjaxHelper.notification(response);
|
990 |
-
}
|
991 |
|
992 |
-
|
|
|
|
|
993 |
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
start: function () {
|
999 |
-
NextendAjaxHelper.startLoading();
|
1000 |
-
},
|
1001 |
-
|
1002 |
-
stop: $.proxy(function () {
|
1003 |
-
if (images.length) {
|
1004 |
-
this._addQuickImages(images);
|
1005 |
-
} else {
|
1006 |
-
setTimeout(function () {
|
1007 |
-
NextendAjaxHelper.stopLoading();
|
1008 |
-
}, 100);
|
1009 |
-
}
|
1010 |
-
images = [];
|
1011 |
-
}, this)
|
1012 |
-
});
|
1013 |
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
clearTimeout(timeout);
|
1018 |
-
timeout = null;
|
1019 |
-
} else {
|
1020 |
-
this.slidesContainer.addClass('n2-drag-over');
|
1021 |
-
}
|
1022 |
-
timeout = setTimeout($.proxy(function () {
|
1023 |
-
this.slidesContainer.removeClass('n2-drag-over');
|
1024 |
-
timeout = null;
|
1025 |
-
}, this), 400);
|
1026 |
|
1027 |
-
|
|
|
|
|
|
|
|
|
|
|
1028 |
}
|
1029 |
};
|
1030 |
|
1031 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1032 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1033 |
};
|
1034 |
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
ui.item.show();
|
1043 |
-
},
|
1044 |
-
stop: $.proxy(this.saveSlideOrder, this),
|
1045 |
-
placeholder: 'n2-box-sortable-placeholder n2-box-sortable-placeholder-small',
|
1046 |
-
distance: 10
|
1047 |
-
});
|
1048 |
};
|
1049 |
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
ids = [],
|
1054 |
-
originalIds = [];
|
1055 |
-
for (var i = 0; i < slideNodes.length; i++) {
|
1056 |
-
var slide = slideNodes.eq(i).data('slide');
|
1057 |
-
slides.push(slide);
|
1058 |
-
ids.push(slide.getId());
|
1059 |
-
}
|
1060 |
-
for (var i = 0; i < this.slides.length; i++) {
|
1061 |
-
originalIds.push(this.slides[i].getId());
|
1062 |
}
|
1063 |
|
1064 |
-
if (
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
nextendaction: 'order'
|
1069 |
-
};
|
1070 |
-
NextendAjaxHelper.ajax({
|
1071 |
-
type: 'POST',
|
1072 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, queries),
|
1073 |
-
data: {
|
1074 |
-
slideorder: ids
|
1075 |
-
}
|
1076 |
-
});
|
1077 |
-
this.slides = slides;
|
1078 |
-
this.changed();
|
1079 |
}
|
1080 |
};
|
1081 |
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
var slide = slideNodes.eq(i).data('slide');
|
1088 |
-
slides.push(slide);
|
1089 |
}
|
1090 |
-
this.slides = slides;
|
1091 |
-
this.changed();
|
1092 |
-
$(window).triggerHandler('SmartSliderSidebarSlidesChanged');
|
1093 |
-
|
1094 |
-
$('html').attr('data-slides', this.slides.length);
|
1095 |
};
|
1096 |
|
1097 |
-
|
1098 |
-
|
1099 |
-
this.
|
|
|
|
|
1100 |
}
|
1101 |
-
this.changed();
|
1102 |
};
|
1103 |
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
};
|
1108 |
|
1109 |
-
|
|
|
|
|
1110 |
|
1111 |
-
|
1112 |
-
|
1113 |
-
new NextendSmartSliderAdminSlide(this, $(el));
|
1114 |
-
}, this));
|
1115 |
-
this.initSlides();
|
1116 |
-
setTimeout(function () {
|
1117 |
-
boxes.removeClass('n2-ss-box-just-added');
|
1118 |
-
}, 200);
|
1119 |
-
}
|
1120 |
|
1121 |
-
|
1122 |
-
|
1123 |
-
type: 'POST',
|
1124 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
1125 |
-
nextendaction: 'quickImages'
|
1126 |
-
}),
|
1127 |
-
data: {
|
1128 |
-
images: Base64.encode(JSON.stringify(images))
|
1129 |
-
}
|
1130 |
-
}).done($.proxy(function (response) {
|
1131 |
-
this.addBoxes($(response.data));
|
1132 |
-
}, this));
|
1133 |
-
};
|
1134 |
|
1135 |
-
|
1136 |
-
e.preventDefault();
|
1137 |
-
var manager = this;
|
1138 |
-
if (!this.quickVideoModal) {
|
1139 |
-
this.quickVideoModal = new NextendModal({
|
1140 |
-
zero: {
|
1141 |
-
size: [
|
1142 |
-
500,
|
1143 |
-
350
|
1144 |
-
],
|
1145 |
-
title: n2_('Add video'),
|
1146 |
-
back: false,
|
1147 |
-
close: true,
|
1148 |
-
content: '<form class="n2-form"></form>',
|
1149 |
-
controls: ['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">' + n2_('Add video') + '</a>'],
|
1150 |
-
fn: {
|
1151 |
-
show: function () {
|
1152 |
-
var button = this.controls.find('.n2-button'),
|
1153 |
-
form = this.content.find('.n2-form').on('submit', function (e) {
|
1154 |
-
e.preventDefault();
|
1155 |
-
button.trigger('click');
|
1156 |
-
}).append(this.createInput(n2_('Video url'), 'n2-slide-video-url', 'width: 446px;')),
|
1157 |
-
videoUrlField = this.content.find('#n2-slide-video-url').focus();
|
1158 |
|
1159 |
-
|
1160 |
-
this.content.append(this.createTable([['YouTube', 'https://www.youtube.com/watch?v=MKmIwHAFjSU'], ['Vimeo', 'https://vimeo.com/144598279']], ['', '']));
|
1161 |
|
1162 |
-
|
1163 |
-
|
1164 |
-
var video = videoUrlField.val(),
|
1165 |
-
youtubeRegexp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,
|
1166 |
-
youtubeMatch = video.match(youtubeRegexp),
|
1167 |
-
vimeoRegexp = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,
|
1168 |
-
vimeoMatch = video.match(vimeoRegexp),
|
1169 |
-
html5Video = video.match(/\.(mp4|ogv|ogg|webm)/i);
|
1170 |
|
1171 |
-
if (youtubeMatch) {
|
1172 |
-
NextendAjaxHelper.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + encodeURI(youtubeMatch[2]) + '&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM').done($.proxy(function (data) {
|
1173 |
-
if (data.items.length) {
|
1174 |
-
var snippet = data.items[0].snippet;
|
1175 |
|
1176 |
-
|
1177 |
-
|
1178 |
|
1179 |
-
manager._addQuickVideo(this, {
|
1180 |
-
type: 'youtube',
|
1181 |
-
title: snippet.title,
|
1182 |
-
description: snippet.description,
|
1183 |
-
image: thumbnail.url,
|
1184 |
-
video: video
|
1185 |
-
});
|
1186 |
-
}
|
1187 |
-
}, this)).fail(function (data) {
|
1188 |
-
nextend.notificationCenter.error(data.error.errors[0].message);
|
1189 |
-
});
|
1190 |
-
} else if (vimeoMatch) {
|
1191 |
-
NextendAjaxHelper.getJSON('https://vimeo.com/api/v2/video/' + vimeoMatch[3] + '.json').done($.proxy(function (data) {
|
1192 |
-
manager._addQuickVideo(this, {
|
1193 |
-
type: 'vimeo',
|
1194 |
-
title: data[0].title,
|
1195 |
-
description: data[0].description,
|
1196 |
-
video: vimeoMatch[3],
|
1197 |
-
image: data[0].thumbnail_large
|
1198 |
-
});
|
1199 |
-
}, this)).fail(function (data) {
|
1200 |
-
nextend.notificationCenter.error(data.responseText);
|
1201 |
-
});
|
1202 |
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
} else {
|
1207 |
-
nextend.notificationCenter.error('This video url is not supported!');
|
1208 |
-
}
|
1209 |
-
}, this)));
|
1210 |
-
}
|
1211 |
-
}
|
1212 |
-
}
|
1213 |
-
});
|
1214 |
-
}
|
1215 |
-
this.quickVideoModal.show();
|
1216 |
};
|
1217 |
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
nextendaction: 'quickVideo'
|
1223 |
-
}),
|
1224 |
-
data: {
|
1225 |
-
video: Base64.encode(encodeURIComponent(JSON.stringify(video)))
|
1226 |
-
}
|
1227 |
-
}).done($.proxy(function (response) {
|
1228 |
-
this.addBoxes($(response.data));
|
1229 |
-
|
1230 |
-
this.initSlides();
|
1231 |
-
}, this));
|
1232 |
-
modal.hide();
|
1233 |
};
|
1234 |
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
var manager = this,
|
1239 |
-
cache = {},
|
1240 |
-
getContent = $.proxy(function (search) {
|
1241 |
-
if (typeof cache[search] == 'undefined') {
|
1242 |
-
cache[search] = NextendAjaxHelper.ajax({
|
1243 |
-
type: "POST",
|
1244 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),
|
1245 |
-
data: {
|
1246 |
-
keyword: search
|
1247 |
-
},
|
1248 |
-
dataType: 'json'
|
1249 |
-
});
|
1250 |
-
}
|
1251 |
-
return cache[search];
|
1252 |
-
}, this);
|
1253 |
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
],
|
1260 |
-
title: n2_('Add post'),
|
1261 |
-
back: false,
|
1262 |
-
close: true,
|
1263 |
-
content: '<div class="n2-form"></div>',
|
1264 |
-
fn: {
|
1265 |
-
show: function () {
|
1266 |
|
1267 |
-
|
1268 |
-
|
1269 |
-
heading = this.createHeading('').appendTo(this.content),
|
1270 |
-
result = this.createResult().appendTo(this.content),
|
1271 |
-
searchString = '';
|
1272 |
|
1273 |
-
|
1274 |
-
searchString = search.val();
|
1275 |
-
getContent(searchString).done($.proxy(function (r) {
|
1276 |
-
if (search.val() == searchString) {
|
1277 |
-
if (searchString == '') {
|
1278 |
-
heading.html(n2_('No search term specified. Showing recent items.'));
|
1279 |
-
} else {
|
1280 |
-
heading.html(n2_printf(n2_('Showing items match for "%s"'), searchString));
|
1281 |
-
}
|
1282 |
|
1283 |
-
|
1284 |
-
data = [],
|
1285 |
-
modal = this;
|
1286 |
-
for (var i = 0; i < rows.length; i++) {
|
1287 |
-
data.push([rows[i].title, rows[i].info, $('<div class="n2-button n2-button-normal n2-button-xs n2-button-green n2-radius-s n2-uc n2-h5">' + n2_('Select') + '</div>')
|
1288 |
-
.on('click', {post: rows[i]}, function (e) {
|
1289 |
-
manager._addQuickPost(modal, e.data.post);
|
1290 |
-
})]);
|
1291 |
-
}
|
1292 |
-
result.html('');
|
1293 |
-
this.createTable(data, ['width:100%;', '', '']).appendTo(this.createTableWrap().appendTo(result));
|
1294 |
-
}
|
1295 |
-
}, this));
|
1296 |
-
}, this))
|
1297 |
-
.trigger('keyup').focus();
|
1298 |
-
}
|
1299 |
-
}
|
1300 |
-
}
|
1301 |
-
});
|
1302 |
-
}
|
1303 |
-
this.quickPostModal.show();
|
1304 |
};
|
1305 |
|
1306 |
-
|
1307 |
-
if (
|
1308 |
-
|
|
|
|
|
|
|
|
|
1309 |
}
|
1310 |
-
|
1311 |
-
|
1312 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
1313 |
-
nextendaction: 'quickPost'
|
1314 |
-
}),
|
1315 |
-
data: {
|
1316 |
-
post: post
|
1317 |
-
}
|
1318 |
-
}).done($.proxy(function (response) {
|
1319 |
-
this.addBoxes($(response.data));
|
1320 |
|
1321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1322 |
}, this));
|
1323 |
-
|
|
|
1324 |
};
|
1325 |
|
1326 |
-
|
|
|
1327 |
|
1328 |
-
|
|
|
|
|
1329 |
|
1330 |
-
|
|
|
1331 |
|
1332 |
-
|
1333 |
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
|
|
|
|
1341 |
|
1342 |
-
|
1343 |
-
|
1344 |
-
e.preventDefault();
|
1345 |
-
this.bulkSelect(function (slide) {
|
1346 |
-
slide.deSelect();
|
1347 |
-
});
|
1348 |
-
}, this));
|
1349 |
|
1350 |
-
|
1351 |
-
selects.eq(2).on('click', $.proxy(function (e) {
|
1352 |
-
e.preventDefault();
|
1353 |
-
this.bulkSelect(function (slide) {
|
1354 |
-
if (slide.box.hasClass('n2-slide-state-published')) {
|
1355 |
-
slide.select();
|
1356 |
-
} else {
|
1357 |
-
slide.deSelect();
|
1358 |
-
}
|
1359 |
-
});
|
1360 |
-
}, this));
|
1361 |
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1370 |
}
|
1371 |
-
|
1372 |
-
|
|
|
|
|
1373 |
|
1374 |
-
|
|
|
|
|
|
|
|
|
|
|
1375 |
|
1376 |
-
|
1377 |
-
|
1378 |
-
e.preventDefault();
|
1379 |
-
this.bulkAction('deleteSlides');
|
1380 |
-
}, this));
|
1381 |
|
1382 |
-
//Duplicate
|
1383 |
-
actions.eq(1).on('click', $.proxy(function (e) {
|
1384 |
-
e.preventDefault();
|
1385 |
-
this.bulkAction('duplicateSlides');
|
1386 |
-
}, this));
|
1387 |
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
|
|
1393 |
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
}, this));
|
1399 |
-
};
|
1400 |
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1404 |
}
|
1405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1406 |
}
|
1407 |
|
1408 |
-
|
1409 |
-
this.
|
1410 |
-
|
1411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1412 |
}
|
|
|
|
|
|
|
|
|
|
|
1413 |
}
|
1414 |
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1418 |
}
|
1419 |
-
};
|
1420 |
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
slides.push(slide);
|
1427 |
-
ids.push(slide.getId());
|
1428 |
-
}
|
1429 |
});
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1435 |
};
|
1436 |
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
$('#n2-admin').addClass('n2-ss-has-box-selection');
|
1442 |
}
|
1443 |
-
|
|
|
1444 |
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
$('#n2-admin').removeClass('n2-ss-has-box-selection');
|
1449 |
|
1450 |
-
|
1451 |
-
this.slides[i].deSelect();
|
1452 |
-
}
|
1453 |
-
this.selection = [];
|
1454 |
-
this.isBulkSelection = false;
|
1455 |
-
}
|
1456 |
-
};
|
1457 |
|
1458 |
-
|
1459 |
-
|
1460 |
-
var title = slides[0].box.find('.n2-box-placeholder-title a').text();
|
1461 |
-
if (slides.length > 1) {
|
1462 |
-
title += ' and ' + (slides.length - 1) + ' more';
|
1463 |
-
}
|
1464 |
-
NextendDeleteModal('slide-delete', title, $.proxy(function () {
|
1465 |
-
NextendAjaxHelper.ajax({
|
1466 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
1467 |
-
nextendaction: 'delete'
|
1468 |
-
}),
|
1469 |
-
type: 'POST',
|
1470 |
-
data: {
|
1471 |
-
slides: ids
|
1472 |
-
}
|
1473 |
-
}).done($.proxy(function () {
|
1474 |
-
for (var i = 0; i < slides.length; i++) {
|
1475 |
-
slides[i].deleted();
|
1476 |
-
}
|
1477 |
-
this.initSlides();
|
1478 |
-
this.leaveBulk();
|
1479 |
-
}, this));
|
1480 |
-
}, this));
|
1481 |
-
};
|
1482 |
|
1483 |
-
|
1484 |
-
|
1485 |
-
if (this.slides[i].selected) {
|
1486 |
-
this.slides[i].duplicate($.Event("click", {
|
1487 |
-
currentTarget: null
|
1488 |
-
}));
|
1489 |
-
}
|
1490 |
-
}
|
1491 |
-
};
|
1492 |
|
1493 |
-
|
1494 |
-
|
1495 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
1496 |
-
nextendaction: 'publish'
|
1497 |
-
}),
|
1498 |
-
type: 'POST',
|
1499 |
-
data: {
|
1500 |
-
slides: ids
|
1501 |
-
}
|
1502 |
-
}).done($.proxy(function () {
|
1503 |
-
for (var i = 0; i < slides.length; i++) {
|
1504 |
-
slides[i].published();
|
1505 |
-
}
|
1506 |
-
this.changed();
|
1507 |
-
}, this));
|
1508 |
-
};
|
1509 |
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
}
|
1519 |
-
}).done($.proxy(function () {
|
1520 |
-
for (var i = 0; i < slides.length; i++) {
|
1521 |
-
slides[i].unPublished();
|
1522 |
-
}
|
1523 |
-
this.changed();
|
1524 |
-
}, this));
|
1525 |
-
};
|
1526 |
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1530 |
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
}, this)),
|
1535 |
-
unpublish: this.menu.find('.n2-ss-unpublish').on('click', $.proxy(function (e) {
|
1536 |
-
this.slide.switchPublished(e);
|
1537 |
-
}, this)),
|
1538 |
-
generator: this.menu.find('.n2-ss-generator').on('click', $.proxy(function (e) {
|
1539 |
-
e.preventDefault();
|
1540 |
-
e.stopPropagation();
|
1541 |
-
window.location = this.slide.box.data('generator');
|
1542 |
-
}, this)),
|
1543 |
-
duplicate: this.menu.find('.n2-ss-duplicate').on('click', $.proxy(function (e) {
|
1544 |
-
this.slide.duplicate(e);
|
1545 |
-
}, this)),
|
1546 |
-
'delete': this.menu.find('.n2-ss-delete').on('click', $.proxy(function (e) {
|
1547 |
-
this.slide.delete(e);
|
1548 |
-
}, this)),
|
1549 |
-
setFirst: this.menu.find('.n2-ss-setFirst').on('click', $.proxy(function (e) {
|
1550 |
-
this.slide.setFirst(e);
|
1551 |
-
}, this)),
|
1552 |
-
saveLayout: this.menu.find('.n2-ss-saveLayout')
|
1553 |
-
}
|
1554 |
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
this.menu.removeClass('n2-active').off('mouseleave');
|
1560 |
-
} else {
|
1561 |
-
this.menu.addClass('n2-active').on('mouseleave', function () {
|
1562 |
-
$(this).removeClass('n2-active');
|
1563 |
-
});
|
1564 |
-
}
|
1565 |
-
}, this));
|
1566 |
-
}
|
1567 |
|
|
|
|
|
1568 |
|
1569 |
-
|
1570 |
-
|
1571 |
-
this.menu.appendTo(slide.box);
|
1572 |
-
}
|
1573 |
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1577 |
|
1578 |
-
|
1579 |
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
|
|
|
|
|
|
|
|
1583 |
|
1584 |
-
|
1585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1586 |
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
}, this))
|
1591 |
-
.on('mouseleave', $.proxy(function () {
|
1592 |
-
this.manager.hideMenu();
|
1593 |
-
}, this))
|
1594 |
-
.on('click.n2-slide', $.proxy(this.goToEdit, this));
|
1595 |
|
1596 |
-
|
1597 |
-
|
|
|
|
|
1598 |
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
|
|
|
|
|
|
1602 |
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
|
|
|
|
|
|
1606 |
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1620 |
}
|
1621 |
-
}).done($.proxy(function () {
|
1622 |
-
this.manager.unsetFirst();
|
1623 |
-
this.box.addClass('n2-slide-state-first');
|
1624 |
-
}, this));
|
1625 |
-
};
|
1626 |
-
NextendSmartSliderAdminSlide.prototype.unsetFirst = function () {
|
1627 |
-
this.box.removeClass('n2-slide-state-first');
|
1628 |
-
};
|
1629 |
|
1630 |
-
|
1631 |
-
|
1632 |
-
e.preventDefault();
|
1633 |
-
if (this.isPublished()) {
|
1634 |
-
this.manager.unPublishSlides([this.getId()], [this]);
|
1635 |
-
} else {
|
1636 |
-
this.manager.publishSlides([this.getId()], [this]);
|
1637 |
}
|
1638 |
-
};
|
1639 |
|
1640 |
-
|
1641 |
-
|
|
|
1642 |
};
|
1643 |
|
1644 |
-
|
1645 |
-
this.box.addClass('n2-slide-state-published');
|
1646 |
-
};
|
1647 |
|
1648 |
-
|
1649 |
-
this.box.removeClass('n2-slide-state-published');
|
1650 |
-
};
|
1651 |
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
window.open(editUrl, '_blank');
|
1656 |
-
} else if (editUrl == location.href) {
|
1657 |
-
n2("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible");
|
1658 |
-
} else {
|
1659 |
-
window.location = editUrl;
|
1660 |
}
|
|
|
1661 |
};
|
1662 |
|
1663 |
-
|
1664 |
-
e.stopPropagation();
|
1665 |
-
e.preventDefault();
|
1666 |
-
var deferred = $.Deferred();
|
1667 |
-
NextendAjaxHelper.ajax({
|
1668 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.box.data('editurl'), {
|
1669 |
-
nextendaction: 'duplicate'
|
1670 |
-
})
|
1671 |
-
}).done($.proxy(function (response) {
|
1672 |
-
var box = $(response.data).insertAfter(this.box);
|
1673 |
-
var newSlide = new NextendSmartSliderAdminSlide(this.manager, box);
|
1674 |
-
this.manager.initSlides();
|
1675 |
-
deferred.resolve(newSlide);
|
1676 |
-
}, this));
|
1677 |
-
return deferred;
|
1678 |
-
};
|
1679 |
-
|
1680 |
-
NextendSmartSliderAdminSlide.prototype.delete = function (e) {
|
1681 |
-
e.stopPropagation();
|
1682 |
-
e.preventDefault();
|
1683 |
-
this.manager.deleteSlides([this.getId()], [this]);
|
1684 |
-
};
|
1685 |
-
NextendSmartSliderAdminSlide.prototype.deleted = function () {
|
1686 |
-
this.box.remove();
|
1687 |
-
};
|
1688 |
|
1689 |
-
|
1690 |
-
|
1691 |
-
e.preventDefault();
|
1692 |
}
|
1693 |
|
1694 |
-
|
1695 |
-
|
1696 |
-
} else {
|
1697 |
-
this.deSelect();
|
1698 |
}
|
1699 |
-
};
|
1700 |
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1706 |
}
|
|
|
1707 |
};
|
1708 |
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1714 |
}
|
|
|
1715 |
};
|
1716 |
|
1717 |
-
|
1718 |
|
|
|
|
|
1719 |
|
1720 |
-
|
1721 |
-
|
|
|
|
|
|
|
|
|
|
|
1722 |
|
1723 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1724 |
|
1725 |
-
|
|
|
|
|
1726 |
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
|
|
|
|
1731 |
}
|
1732 |
|
1733 |
-
this
|
|
|
|
|
|
|
1734 |
|
1735 |
-
|
|
|
|
|
|
|
|
|
1736 |
|
1737 |
-
|
1738 |
-
this.sidebar = $('#n2-ss-slide-sidebar').on('mousedown', $.proxy(nextend.context.setMouseDownArea, nextend.context, 'sidebarClicked'));
|
1739 |
-
this.title = this.sidebar.find('.n2-panel-titlebar-title');
|
1740 |
-
this.sidebarTD = this.sidebar.parent();
|
1741 |
|
1742 |
-
|
1743 |
-
|
|
|
1744 |
|
1745 |
-
|
|
|
|
|
|
|
|
|
|
|
1746 |
|
1747 |
-
|
1748 |
-
|
1749 |
-
};
|
1750 |
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
|
|
|
|
|
|
1754 |
|
1755 |
-
|
1756 |
-
|
1757 |
-
var up = false;
|
1758 |
-
if (e.originalEvent) {
|
1759 |
-
if (e.originalEvent.wheelDelta) up = e.originalEvent.wheelDelta / -1 < 0;
|
1760 |
-
if (e.originalEvent.deltaY) up = e.originalEvent.deltaY < 0;
|
1761 |
-
if (e.originalEvent.detail) up = e.originalEvent.detail < 0;
|
1762 |
-
}
|
1763 |
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1770 |
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1778 |
|
1779 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1780 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1781 |
|
1782 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1783 |
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1792 |
|
1793 |
-
|
|
|
|
|
|
|
|
|
|
|
1794 |
|
|
|
1795 |
|
1796 |
-
|
1797 |
-
$('.n2-ss-add-layer-button').on('click', function (e) {
|
1798 |
-
e.preventDefault();
|
1799 |
-
$verticalBar.toggleClass('n2-active');
|
1800 |
-
})
|
1801 |
|
1802 |
-
|
1803 |
-
|
1804 |
-
});
|
1805 |
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
});
|
1813 |
|
1814 |
-
|
1815 |
-
this.extraHeightToRemove = 60;
|
1816 |
-
if (!this.$resizeInnerContainer.length) {
|
1817 |
-
this.extraHeightToRemove = 0;
|
1818 |
-
this.$resizeInnerContainer = this.$verticalBarInner;
|
1819 |
-
}
|
1820 |
|
1821 |
-
|
1822 |
|
1823 |
-
|
|
|
|
|
|
|
|
|
1824 |
|
1825 |
-
|
|
|
|
|
|
|
|
|
|
|
1826 |
|
1827 |
-
|
1828 |
|
1829 |
-
|
|
|
|
|
|
|
|
|
1830 |
|
1831 |
-
|
1832 |
-
|
|
|
|
|
|
|
|
|
1833 |
|
1834 |
-
|
1835 |
-
$.jStorage.set('ssPanelAutoPosition', 1);
|
1836 |
|
1837 |
-
this
|
|
|
|
|
|
|
|
|
1838 |
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1842 |
}
|
1843 |
-
|
1844 |
-
|
1845 |
|
1846 |
-
|
|
|
|
|
|
|
|
|
|
|
1847 |
|
1848 |
-
|
|
|
1849 |
|
1850 |
-
|
|
|
|
|
|
|
|
|
|
|
1851 |
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
});
|
1859 |
-
}
|
1860 |
-
}
|
1861 |
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1865 |
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1869 |
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
|
|
|
|
|
|
1884 |
|
1885 |
-
|
1886 |
-
|
1887 |
-
}
|
1888 |
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
|
|
|
|
|
|
1892 |
|
1893 |
-
|
|
|
|
|
|
|
|
|
|
|
1894 |
|
1895 |
-
|
|
|
|
|
1896 |
|
1897 |
-
|
|
|
|
|
|
|
|
|
1898 |
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
|
|
|
|
|
|
1902 |
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
|
|
1908 |
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
}
|
1915 |
-
}
|
1916 |
|
1917 |
-
|
1918 |
-
|
|
|
1919 |
|
1920 |
-
|
|
|
|
|
|
|
1921 |
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
}
|
1930 |
-
this.sidebar.appendTo(this.admin);
|
1931 |
|
1932 |
-
|
|
|
|
|
|
|
|
|
|
|
1933 |
|
1934 |
-
|
1935 |
-
|
|
|
|
|
1936 |
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
this.sidebar.css('height', this.lastHeight);
|
1944 |
-
var bounding = this.sidebar[0].getBoundingClientRect();
|
1945 |
-
this.detachedPosition.left = bounding.left;
|
1946 |
-
this.detachedPosition.top = bounding.top;
|
1947 |
|
1948 |
-
|
1949 |
-
|
1950 |
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
.resizable({
|
1958 |
-
distance: 5,
|
1959 |
-
handles: "s",
|
1960 |
-
stop: $.proxy(function (event, ui) {
|
1961 |
-
this.lastHeight = this.detachedPosition.height = this.sidebar.height();
|
1962 |
-
$.jStorage.set('ssPanelHeight', this.detachedPosition.height);
|
1963 |
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
}, this)
|
1968 |
-
});
|
1969 |
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
|
1974 |
-
|
1975 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1976 |
};
|
|
|
1977 |
|
|
|
|
|
1978 |
|
1979 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1980 |
|
1981 |
-
|
1982 |
-
;
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
this
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
}
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
}
|
2055 |
-
|
2056 |
-
|
2057 |
-
var
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
});
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
this
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
var
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
}, this));
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
var
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
this.
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
properties[m[1]] = propertiesRaw[i].value;
|
2261 |
-
}
|
2262 |
-
}
|
2263 |
-
delete properties['generator'];
|
2264 |
-
delete properties['published'];
|
2265 |
-
delete properties['publishdates'];
|
2266 |
-
delete properties['record-start'];
|
2267 |
-
delete properties['record-slides'];
|
2268 |
-
delete properties['slide'];
|
2269 |
-
|
2270 |
-
properties['slide'] = smartSlider.layerManager.getData();
|
2271 |
-
return properties;
|
2272 |
-
};
|
2273 |
-
|
2274 |
-
SmartSliderAdminSlide.prototype.loadLayout = function (properties, slideDataOverwrite, layerOverwrite) {
|
2275 |
-
// we are working on references!
|
2276 |
-
var slide = properties['slide'];
|
2277 |
-
delete properties['slide'];
|
2278 |
-
if (layerOverwrite) {
|
2279 |
-
smartSlider.layerManager.loadData(slide, true);
|
2280 |
-
} else {
|
2281 |
-
smartSlider.layerManager.loadData(slide, false);
|
2282 |
-
}
|
2283 |
-
if (slideDataOverwrite) {
|
2284 |
-
for (var k in properties) {
|
2285 |
-
$('#slide' + k).val(properties[k]).trigger('change');
|
2286 |
-
}
|
2287 |
-
}
|
2288 |
-
properties['slide'] = slide;
|
2289 |
-
};
|
2290 |
-
|
2291 |
-
SmartSliderAdminSlide.prototype.createHistory = function () {
|
2292 |
-
this.slideValues = {};
|
2293 |
-
n2('#smartslider-form').find('input[id][name^="slide"], textarea[id][name^="slide"]').not('#slideslide').each($.proxy(function (i, el) {
|
2294 |
-
var $input = $(el),
|
2295 |
-
field = $input.data('field'),
|
2296 |
-
id = $input.attr('id');
|
2297 |
-
this.slideValues[id] = $input.val();
|
2298 |
-
$input.on('nextendChange', $.proxy(function () {
|
2299 |
-
var newValue = $input.val(),
|
2300 |
-
oldValue = this.slideValues[id];
|
2301 |
-
this.slideValues[id] = newValue;
|
2302 |
-
smartSlider.history.add($.proxy(function () {
|
2303 |
-
return [this, 'slideValueChange', newValue, oldValue, [$input, field]];
|
2304 |
-
}, this));
|
2305 |
-
}, this));
|
2306 |
-
}, this));
|
2307 |
-
};
|
2308 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2309 |
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2317 |
|
2318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2319 |
|
2320 |
-
|
2321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2322 |
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2328 |
};
|
2329 |
-
}
|
2330 |
|
2331 |
-
function
|
|
|
|
|
2332 |
|
2333 |
-
|
2334 |
-
this.devices = {
|
2335 |
-
unknownUnknown: $('<div />')
|
2336 |
-
};
|
2337 |
-
this.responsives = [responsive];
|
2338 |
-
responsive.setOrientation('portrait');
|
2339 |
-
responsive.parameters.onResizeEnabled = 0;
|
2340 |
-
responsive.parameters.forceFull = 0; // We should disable force full feature on admin dashboard as it won't render before the sidebar
|
2341 |
-
responsive._getDevice = responsive._getDeviceZoom;
|
2342 |
|
2343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2344 |
|
2345 |
-
|
2346 |
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2350 |
|
2351 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2352 |
|
2353 |
-
|
2354 |
-
modes = responsive.parameters.deviceModes;
|
2355 |
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
|
|
|
|
|
|
2359 |
} else {
|
2360 |
-
|
|
|
|
|
|
|
|
|
2361 |
}
|
2362 |
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
this.
|
2367 |
}
|
2368 |
-
|
2369 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2370 |
} else {
|
2371 |
-
this.
|
2372 |
}
|
2373 |
|
2374 |
-
|
2375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2376 |
} else {
|
2377 |
-
this.
|
2378 |
}
|
2379 |
-
|
2380 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2381 |
} else {
|
2382 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2383 |
}
|
|
|
|
|
2384 |
|
2385 |
-
|
|
|
|
|
|
|
2386 |
|
2387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2388 |
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2394 |
}, this));
|
2395 |
|
2396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2397 |
};
|
2398 |
|
2399 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2400 |
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
responsive.parameters.forceFull = 0; // We should disable force full feature on admin dashboard as it won't render before the sidebar
|
2405 |
-
responsive._getDevice = responsive._getDeviceZoom;
|
2406 |
|
2407 |
-
|
|
|
2408 |
}
|
2409 |
|
2410 |
-
|
2411 |
-
$('#n2-admin').removeClass('n2-ss-mode-' + modes.lastDevice + modes.lastOrientation)
|
2412 |
-
.addClass('n2-ss-mode-' + modes.device + modes.orientation);
|
2413 |
-
this.devices[modes.lastDevice + modes.lastOrientation].removeClass('n2-active');
|
2414 |
-
this.devices[modes.device + modes.orientation].addClass('n2-active');
|
2415 |
-
};
|
2416 |
|
2417 |
-
NextendSmartSliderAdminZoom.prototype.setDeviceMode = function (e) {
|
2418 |
-
var el = $(e.currentTarget);
|
2419 |
-
if ((e.ctrlKey || e.metaKey) && smartSlider.layerManager) {
|
2420 |
-
var orientation = el.data('orientation');
|
2421 |
-
smartSlider.layerManager.copyOrResetMode(el.data('device') + orientation[0].toUpperCase() + orientation.substr(1));
|
2422 |
-
} else {
|
2423 |
-
for (var i = 0; i < this.responsives.length; i++) {
|
2424 |
-
this.responsives[i].setOrientation(el.data('orientation'));
|
2425 |
-
this.responsives[i].setMode(el.data('device'), this.responsives[0]);
|
2426 |
-
}
|
2427 |
-
}
|
2428 |
-
};
|
2429 |
|
2430 |
-
|
2431 |
-
|
2432 |
-
this.
|
2433 |
-
|
2434 |
-
this.
|
2435 |
-
|
|
|
|
|
2436 |
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2441 |
}
|
2442 |
-
};
|
2443 |
|
2444 |
-
|
2445 |
-
|
2446 |
-
if (zoom.length > 0) {
|
2447 |
|
2448 |
-
|
2449 |
-
|
|
|
|
|
2450 |
}
|
|
|
2451 |
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
max: 102
|
2459 |
-
});
|
2460 |
|
2461 |
-
|
|
|
2462 |
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
this.lock.addClass('n2-active');
|
2468 |
-
}
|
2469 |
|
2470 |
-
|
2471 |
-
change = $.proxy(function (value) {
|
2472 |
-
var oldValue = this.zoom.slider('value');
|
2473 |
-
this.zoom.slider('value', oldValue + value);
|
2474 |
-
}, this),
|
2475 |
-
interval = null,
|
2476 |
-
mouseDown = $.proxy(function (value) {
|
2477 |
-
change(value);
|
2478 |
-
interval = setInterval($.proxy(change, this, value), 1000 / 25);
|
2479 |
-
}, this);
|
2480 |
-
parent.find('.n2-i-minus').on({
|
2481 |
-
mousedown: $.proxy(mouseDown, this, -1),
|
2482 |
-
'mouseup mouseleave': function () {
|
2483 |
-
if (interval) {
|
2484 |
-
clearInterval(interval);
|
2485 |
-
interval = null;
|
2486 |
-
}
|
2487 |
-
}
|
2488 |
-
});
|
2489 |
-
parent.find('.n2-i-plus').on({
|
2490 |
-
mousedown: $.proxy(mouseDown, this, 1),
|
2491 |
-
'mouseup mouseleave': function () {
|
2492 |
-
if (interval) {
|
2493 |
-
clearInterval(interval);
|
2494 |
-
interval = null;
|
2495 |
-
}
|
2496 |
-
}
|
2497 |
-
});
|
2498 |
-
}
|
2499 |
-
};
|
2500 |
|
2501 |
-
NextendSmartSliderAdminZoom.prototype.sliderResize = function (e, ratios) {
|
2502 |
-
this.setZoom();
|
2503 |
};
|
2504 |
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
'slidechange.n2-ss-zoom': $.proxy(this.zoomChangeFixMode, this)
|
2510 |
-
});
|
2511 |
-
};
|
2512 |
|
2513 |
-
|
2514 |
|
2515 |
-
|
2516 |
-
.on({
|
2517 |
-
'slide.n2-ss-zoom': $.proxy(this.zoomChangeSyncMode, this),
|
2518 |
-
'slidechange.n2-ss-zoom': $.proxy(this.zoomChangeSyncMode, this)
|
2519 |
-
});
|
2520 |
};
|
2521 |
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
|
|
|
|
|
|
2525 |
|
2526 |
-
|
2527 |
-
this.
|
2528 |
-
};
|
2529 |
|
2530 |
-
|
2531 |
-
|
2532 |
-
if (value < 50) {
|
2533 |
-
ratio = nextend.smallestZoom / this.containerWidth + Math.max(value / 50, 0) * (1 - nextend.smallestZoom / this.containerWidth);
|
2534 |
-
} else if (value > 52) {
|
2535 |
-
ratio = 1 + (value - 52) / 50;
|
2536 |
-
}
|
2537 |
-
var width = parseInt(ratio * this.containerWidth);
|
2538 |
-
this.container.width(width);
|
2539 |
|
2540 |
-
|
2541 |
-
|
2542 |
-
}
|
2543 |
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
}
|
2553 |
-
}
|
2554 |
-
if (ui) {
|
2555 |
-
ui.handle.innerHTML = width + 'px';
|
2556 |
}
|
2557 |
};
|
2558 |
|
2559 |
-
|
2560 |
-
var
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
|
|
|
|
|
|
|
|
|
|
2566 |
}
|
2567 |
-
var oldValue = this.zoom.slider('value');
|
2568 |
-
this.zoom.slider('value', v);
|
2569 |
};
|
2570 |
-
})
|
2571 |
-
(nextend.smartSlider, n2, window);
|
2572 |
-
(function ($, scope) {
|
2573 |
|
2574 |
-
|
2575 |
-
this.addToGroupModal = null;
|
2576 |
-
this.groupID = groupID;
|
2577 |
-
this.ajaxUrl = ajaxUrl;
|
2578 |
-
$('.n2-ss-create-slider').click($.proxy(function (e) {
|
2579 |
-
e.preventDefault();
|
2580 |
-
e.stopImmediatePropagation();
|
2581 |
-
this.showModal();
|
2582 |
-
|
2583 |
-
}, this));
|
2584 |
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
|
|
|
|
|
|
2591 |
|
2592 |
-
|
|
|
|
|
|
|
|
|
|
|
2593 |
|
2594 |
-
|
2595 |
-
|
|
|
2596 |
}
|
2597 |
-
}
|
2598 |
|
2599 |
-
|
2600 |
-
|
2601 |
-
var that = this;
|
2602 |
-
var ajaxUrl = this.ajaxUrl;
|
2603 |
-
var presets = [];
|
2604 |
|
2605 |
-
presets.push({
|
2606 |
-
key: 'default',
|
2607 |
-
name: n2_('Default'),
|
2608 |
-
image: '$ss$/admin/images/sliderpresets/default.png'
|
2609 |
-
});
|
2610 |
-
presets.push({
|
2611 |
-
key: 'fullwidth',
|
2612 |
-
name: n2_('Full width'),
|
2613 |
-
image: '$ss$/admin/images/sliderpresets/fullwidth.png'
|
2614 |
-
});
|
2615 |
-
presets.push({
|
2616 |
-
key: 'thumbnailhorizontal',
|
2617 |
-
name: n2_('Thumbnail - horizontal'),
|
2618 |
-
image: '$ss$/admin/images/sliderpresets/thumbnailhorizontal.png'
|
2619 |
-
});
|
2620 |
-
this.createSliderModal = new NextendModal({
|
2621 |
-
zero: {
|
2622 |
-
size: [
|
2623 |
-
N2SSPRO ? 750 : 550,
|
2624 |
-
N2SSPRO ? 630 : 390 + 130
|
2625 |
-
],
|
2626 |
-
title: n2_('Create Slider'),
|
2627 |
-
back: false,
|
2628 |
-
close: true,
|
2629 |
-
content: '<form class="n2-form"></form>',
|
2630 |
-
controls: [
|
2631 |
-
'<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">' + n2_('Create') + '</a>'
|
2632 |
-
],
|
2633 |
-
fn: {
|
2634 |
-
show: function () {
|
2635 |
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
button.trigger('click');
|
2640 |
-
});
|
2641 |
|
2642 |
-
|
2643 |
-
|
2644 |
-
form.append(this.createInputUnit(n2_('Height'), 'createsliderheight', 'px', 'width: 30px;'));
|
2645 |
|
2646 |
-
|
2647 |
-
|
|
|
|
|
2648 |
|
2649 |
-
|
2650 |
-
sliderWidth = $('#createsliderwidth').val(900),
|
2651 |
-
sliderHeight = $('#createsliderheight').val(500);
|
2652 |
|
2653 |
-
|
2654 |
-
sliderHeight.parent().addClass('n2-form-element-autocomplete ui-front');
|
2655 |
|
2656 |
-
|
|
|
|
|
2657 |
|
2658 |
-
|
2659 |
-
.css('height', N2SSPRO ? 360 : 100)
|
2660 |
-
.appendTo(this.content),
|
2661 |
-
sliderPreset = imageRadio.find('input');
|
2662 |
-
imageRadio.css('overflow', 'hidden');
|
2663 |
-
this.createHeading(n2_('Import Sample Sliders')).appendTo(this.content);
|
2664 |
-
$('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample1.png') + '\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample2.png') + '\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample3.png') + '\')"></div>')
|
2665 |
-
.on('click', $.proxy(function () {
|
2666 |
-
this.hide();
|
2667 |
-
that.showDemoSliders();
|
2668 |
-
}, this))
|
2669 |
-
.appendTo(this.content);
|
2670 |
-
|
2671 |
|
2672 |
-
button.on('click', $.proxy(function () {
|
2673 |
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
groupID: that.groupID,
|
2681 |
-
sliderTitle: sliderTitle.val(),
|
2682 |
-
sliderSizeWidth: sliderWidth.val(),
|
2683 |
-
sliderSizeHeight: sliderHeight.val(),
|
2684 |
-
preset: sliderPreset.val()
|
2685 |
-
},
|
2686 |
-
dataType: 'json'
|
2687 |
-
}).done($.proxy(function (response) {
|
2688 |
-
NextendAjaxHelper.startLoading();
|
2689 |
-
}, this));
|
2690 |
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
|
|
|
|
|
|
2696 |
}
|
2697 |
-
|
|
|
2698 |
};
|
2699 |
|
2700 |
-
|
2701 |
-
var that = this;
|
2702 |
-
$('body').css('overflow', 'hidden');
|
2703 |
-
var pro = 0;
|
2704 |
-
var frame = $('<iframe src="//smartslider3.com/demo-import/?pro=' + pro + '&version=' + N2SS3VERSION + '&utm_campaign=' + N2SS3C + '&utm_source=import-slider-frame&utm_medium=smartslider-' + N2PLATFORM + '-' + (pro ? 'pro' : 'free') + '" frameborder="0"></iframe>').css({
|
2705 |
-
position: 'fixed',
|
2706 |
-
zIndex: 100000,
|
2707 |
-
left: 0,
|
2708 |
-
top: 0,
|
2709 |
-
width: '100%',
|
2710 |
-
height: '100%'
|
2711 |
-
}).appendTo('body'),
|
2712 |
-
closeFrame = function () {
|
2713 |
-
$('body').css('overflow', '');
|
2714 |
-
frame.remove();
|
2715 |
-
window.removeEventListener("message", listener, false);
|
2716 |
-
that.notificationStack.popStack();
|
2717 |
-
},
|
2718 |
-
importSlider = function (href) {
|
2719 |
-
NextendAjaxHelper.ajax({
|
2720 |
-
type: "POST",
|
2721 |
-
url: NextendAjaxHelper.makeAjaxUrl(that.ajaxUrl, {
|
2722 |
-
nextendaction: 'importDemo'
|
2723 |
-
}),
|
2724 |
-
data: {
|
2725 |
-
groupID: that.groupID,
|
2726 |
-
key: Base64.encode(href.replace(/^(http(s)?:)?\/\//, '//'))
|
2727 |
-
},
|
2728 |
-
dataType: 'json'
|
2729 |
-
}).fail(function () {
|
2730 |
-
//closeFrame();
|
2731 |
-
});
|
2732 |
-
},
|
2733 |
-
listener = function (e) {
|
2734 |
-
if (e.origin !== "http://smartslider3.com" && e.origin !== "https://smartslider3.com")
|
2735 |
-
return;
|
2736 |
-
var msg = e.data;
|
2737 |
-
switch (msg.key) {
|
2738 |
-
case 'importSlider':
|
2739 |
-
if (typeof nextend.joinCommunity === 'function') {
|
2740 |
-
nextend.joinCommunity(function () {
|
2741 |
-
importSlider(msg.data.href);
|
2742 |
-
});
|
2743 |
-
} else {
|
2744 |
-
importSlider(msg.data.href);
|
2745 |
-
}
|
2746 |
-
|
2747 |
-
return;
|
2748 |
|
2749 |
-
|
2750 |
-
case 'closeWindow':
|
2751 |
-
closeFrame();
|
2752 |
-
}
|
2753 |
-
};
|
2754 |
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
return true;
|
2759 |
-
}, this));
|
2760 |
|
2761 |
-
|
2762 |
};
|
2763 |
|
2764 |
-
scope.NextendSmartSliderCreateSlider = NextendSmartSliderCreateSlider;
|
2765 |
|
2766 |
-
|
2767 |
-
|
|
|
|
|
|
|
2768 |
|
2769 |
-
function
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
this.orderBy = this.sliderPanel.data('orderby') == 'ordering' ? true : false;
|
2776 |
-
this.slidersContainer = this.sliderPanel.find('.n2-ss-sliders-container');
|
2777 |
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
|
|
|
|
|
|
2781 |
}
|
|
|
2782 |
|
2783 |
-
|
|
|
|
|
|
|
|
|
|
|
2784 |
|
2785 |
-
|
|
|
|
|
2786 |
|
2787 |
-
|
|
|
|
|
2788 |
|
2789 |
-
|
2790 |
-
this.initBulk();
|
2791 |
-
}
|
2792 |
|
2793 |
-
|
2794 |
|
2795 |
-
|
2796 |
-
|
|
|
|
|
|
|
|
|
2797 |
|
2798 |
-
sliders.prototype.initSliders = function () {
|
2799 |
-
var previousLength = this.sliders.length;
|
2800 |
-
var sliderNodes = this.slidersContainer.find('.n2-ss-box-slider'),
|
2801 |
-
sliders = [];
|
2802 |
-
for (var i = 0; i < sliderNodes.length; i++) {
|
2803 |
-
var slider = sliderNodes.eq(i).data('slider');
|
2804 |
-
sliders.push(slider);
|
2805 |
}
|
2806 |
-
|
2807 |
-
this
|
2808 |
-
$(window).triggerHandler('SmartSliderSidebarSlidersChanged');
|
2809 |
};
|
2810 |
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
stop: $.proxy(this.saveOrder, this),
|
2823 |
-
placeholder: 'n2-box-sortable-placeholder',
|
2824 |
-
distance: 10
|
2825 |
-
});
|
2826 |
}
|
2827 |
};
|
2828 |
|
2829 |
-
|
2830 |
-
if (this.
|
2831 |
-
this.
|
2832 |
-
this.preventSort = false;
|
2833 |
-
return;
|
2834 |
}
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2843 |
}
|
2844 |
-
|
2845 |
-
|
|
|
|
|
2846 |
}
|
|
|
2847 |
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
|
|
2861 |
}
|
2862 |
-
|
2863 |
-
|
2864 |
}
|
2865 |
};
|
2866 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2867 |
|
2868 |
-
|
2869 |
-
|
2870 |
-
this.menu = $('#n2-ss-slider-menu').detach().addClass('n2-inited');
|
2871 |
|
2872 |
-
|
2873 |
-
|
2874 |
-
e.
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2892 |
}
|
|
|
2893 |
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
});
|
2903 |
}
|
2904 |
-
}, this));
|
2905 |
-
}
|
2906 |
|
|
|
2907 |
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2911 |
}
|
2912 |
|
2913 |
-
|
2914 |
-
if (this.
|
2915 |
-
this.
|
2916 |
}
|
2917 |
-
this.menu.detach();
|
2918 |
}
|
2919 |
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
if (sliders.length > 1) {
|
2924 |
-
title += ' and ' + (sliders.length - 1) + ' more';
|
2925 |
}
|
2926 |
-
NextendDeleteModal('slider-delete', title, $.proxy(function () {
|
2927 |
-
NextendAjaxHelper.ajax({
|
2928 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
2929 |
-
nextendcontroller: 'sliders',
|
2930 |
-
nextendaction: 'delete'
|
2931 |
-
}),
|
2932 |
-
type: 'POST',
|
2933 |
-
data: {
|
2934 |
-
sliders: ids
|
2935 |
-
}
|
2936 |
-
}).done($.proxy(function () {
|
2937 |
-
for (var i = 0; i < sliders.length; i++) {
|
2938 |
-
sliders[i].deleted();
|
2939 |
-
}
|
2940 |
-
this.initSliders();
|
2941 |
-
this.leaveBulk();
|
2942 |
-
}, this));
|
2943 |
-
}, this));
|
2944 |
-
};
|
2945 |
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
|
|
|
|
|
|
|
|
|
|
2952 |
}
|
2953 |
}
|
2954 |
-
};
|
2955 |
|
2956 |
-
|
2957 |
|
2958 |
-
|
2959 |
-
nextendcontroller: 'sliders',
|
2960 |
-
nextendaction: 'exportAll'
|
2961 |
-
}) + '&' + $.param({sliders: ids, currentGroupID: this.groupID}));
|
2962 |
};
|
2963 |
|
|
|
2964 |
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
var selects = $('.n2-bulk-select').find('a');
|
2972 |
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
slider.select();
|
2978 |
-
});
|
2979 |
-
}, this));
|
2980 |
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
});
|
2987 |
-
}, this));
|
2988 |
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
|
|
|
|
2992 |
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
break;
|
3006 |
}
|
3007 |
-
}
|
3008 |
-
};
|
3009 |
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
|
|
|
|
3013 |
}
|
3014 |
-
this.selection.push(slider);
|
3015 |
}
|
3016 |
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
|
|
|
|
|
|
3021 |
}
|
3022 |
}
|
3023 |
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3027 |
}
|
3028 |
-
}
|
3029 |
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
ids.push(slider.getId());
|
3037 |
}
|
3038 |
-
});
|
3039 |
-
if (ids.length) {
|
3040 |
-
this[action](ids, sliders);
|
3041 |
-
this.leaveBulk();
|
3042 |
} else {
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
nextend.notificationCenter.notice('Please select one or more sliders or groups for the action!');
|
3047 |
}
|
3048 |
}
|
3049 |
-
}
|
3050 |
|
3051 |
-
|
3052 |
-
if (
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3056 |
}
|
3057 |
-
|
|
|
|
|
|
|
|
|
3058 |
}
|
3059 |
-
}
|
3060 |
|
3061 |
-
|
3062 |
-
if (this.
|
3063 |
-
|
3064 |
-
|
|
|
3065 |
}
|
3066 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3067 |
|
3068 |
-
|
3069 |
-
|
3070 |
}
|
3071 |
-
this.selection = [];
|
3072 |
-
this.isBulkSelection = false;
|
3073 |
}
|
3074 |
-
}
|
3075 |
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3090 |
}
|
3091 |
-
this.
|
3092 |
-
|
|
|
|
|
3093 |
}
|
3094 |
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3099 |
-
nextendaction: 'addToGroup'
|
3100 |
-
}),
|
3101 |
-
data: {
|
3102 |
-
currentGroupID: this.groupID,
|
3103 |
-
groupID: groupID,
|
3104 |
-
action: action,
|
3105 |
-
sliders: sliders
|
3106 |
-
},
|
3107 |
-
dataType: 'json'
|
3108 |
-
}).done($.proxy(function (response) {
|
3109 |
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
|
|
3114 |
|
3115 |
-
|
3116 |
-
|
|
|
|
|
|
|
|
|
3117 |
|
3118 |
-
|
3119 |
-
groupCounter.html(parseInt(groupCounter.html()) + sliders.length);
|
3120 |
-
}, this));
|
3121 |
-
};
|
3122 |
|
3123 |
-
|
3124 |
-
var groups = null;
|
3125 |
-
var that = this;
|
3126 |
-
var ajaxUrl = this.ajaxUrl;
|
3127 |
|
3128 |
-
|
3129 |
-
|
3130 |
-
size: [
|
3131 |
-
350,
|
3132 |
-
220
|
3133 |
-
],
|
3134 |
-
title: n2_('Add to group'),
|
3135 |
-
back: false,
|
3136 |
-
close: true,
|
3137 |
-
content: '<form class="n2-form"></form>',
|
3138 |
-
controls: [
|
3139 |
-
'<div class="n2-button n2-button-with-actions n2-button-l n2-button-green n2-radius-s n2-h4"><a class="n2-button-inner" href="#" data-action="move">' + n2_('Move') + '</a>' +
|
3140 |
-
'<div class="n2-button-menu-open"><i class="n2-i n2-i-buttonarrow"></i><div class="n2-button-menu"><div class="n2-button-menu-inner n2-border-radius">' +
|
3141 |
-
'<a class="n2-h4" href="#" data-action="copy">' + n2_('Copy') + '</a>' +
|
3142 |
-
'<a class="n2-h4" href="#" data-action="link">' + n2_('Link') + '</a>' +
|
3143 |
-
'</div></div></div></div>',
|
3144 |
-
],
|
3145 |
-
fn: {
|
3146 |
-
show: function () {
|
3147 |
|
3148 |
-
|
|
|
|
|
3149 |
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
|
|
3155 |
|
3156 |
-
|
3157 |
|
3158 |
-
|
3159 |
|
3160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3162 |
e.preventDefault();
|
|
|
3163 |
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
|
|
|
|
|
|
|
|
|
|
3168 |
|
3169 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3170 |
}
|
3171 |
}
|
3172 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
3173 |
});
|
|
|
3174 |
|
|
|
|
|
|
|
3175 |
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
nextendaction: 'listGroups'
|
3181 |
-
}),
|
3182 |
-
dataType: 'json'
|
3183 |
-
}).done($.proxy(function (response) {
|
3184 |
-
groups = response.data;
|
3185 |
-
if (typeof groups[this.groupID] !== 'undefined') {
|
3186 |
-
delete groups[this.groupID];
|
3187 |
-
}
|
3188 |
-
if ($.isEmptyObject(groups)) {
|
3189 |
-
$('body').on({
|
3190 |
-
'groupAdded.addToGroup': $.proxy(function () {
|
3191 |
-
$('body').off('.addToGroup');
|
3192 |
-
NextendAjaxHelper.ajax({
|
3193 |
-
type: "POST",
|
3194 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3195 |
-
nextendcontroller: 'sliders',
|
3196 |
-
nextendaction: 'listGroups'
|
3197 |
-
}),
|
3198 |
-
dataType: 'json'
|
3199 |
-
}).done($.proxy(function (response) {
|
3200 |
-
groups = response.data;
|
3201 |
-
if (typeof groups[this.groupID] !== 'undefined') {
|
3202 |
-
delete groups[this.groupID];
|
3203 |
-
}
|
3204 |
-
addToGroupModal.show();
|
3205 |
-
}, this));
|
3206 |
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
|
|
|
|
|
|
3212 |
|
3213 |
-
|
|
|
3214 |
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
|
|
|
|
|
|
|
|
|
|
3218 |
}, this));
|
|
|
|
|
|
|
3219 |
};
|
3220 |
|
3221 |
-
|
|
|
|
|
|
|
|
|
3222 |
|
3223 |
-
|
3224 |
-
(function ($, scope) {
|
3225 |
-
function slider(manager, box) {
|
3226 |
-
this.selected = false;
|
3227 |
-
this.manager = manager;
|
3228 |
|
3229 |
-
|
3230 |
-
|
|
|
3231 |
|
3232 |
-
|
|
|
|
|
|
|
3233 |
|
3234 |
-
this.
|
3235 |
-
.
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
this.manager.hideMenu();
|
3240 |
-
}, this))
|
3241 |
-
.on('click.n2-slider', $.proxy(this.goToEdit, this));
|
3242 |
|
3243 |
-
|
3244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3245 |
e.preventDefault();
|
|
|
3246 |
|
3247 |
-
|
|
|
|
|
|
|
|
|
3248 |
}, this));
|
3249 |
-
};
|
3250 |
|
3251 |
-
|
3252 |
-
|
3253 |
-
};
|
3254 |
|
3255 |
-
|
3256 |
-
|
3257 |
-
if (
|
3258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3259 |
} else {
|
3260 |
-
|
3261 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3262 |
};
|
3263 |
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3271 |
};
|
3272 |
|
|
|
3273 |
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3288 |
}, this));
|
3289 |
-
return deferred;
|
3290 |
-
};
|
3291 |
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3300 |
|
3301 |
-
slider.prototype.invertSelection = function (e) {
|
3302 |
-
if (e) {
|
3303 |
-
e.preventDefault();
|
3304 |
-
}
|
3305 |
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
|
|
|
|
|
|
|
|
|
|
3310 |
}
|
3311 |
};
|
3312 |
|
3313 |
-
|
3314 |
-
if (
|
3315 |
-
this.
|
3316 |
-
|
3317 |
-
this.
|
3318 |
}
|
3319 |
};
|
3320 |
|
3321 |
-
|
3322 |
-
if (this.
|
3323 |
-
this.
|
3324 |
-
|
3325 |
-
this.
|
3326 |
}
|
3327 |
};
|
3328 |
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
function NextendElementAnimationManager(id, managerIdentifier) {
|
3335 |
-
this.element = $('#' + id);
|
3336 |
-
this.managerIdentifier = managerIdentifier;
|
3337 |
|
3338 |
-
|
3339 |
-
|
3340 |
|
3341 |
-
|
3342 |
-
|
|
|
|
|
3343 |
|
3344 |
-
|
3345 |
|
3346 |
-
|
3347 |
|
3348 |
-
|
3349 |
-
|
|
|
|
|
|
|
|
|
|
|
3350 |
|
|
|
|
|
3351 |
|
3352 |
-
|
3353 |
-
|
3354 |
|
|
|
|
|
3355 |
|
3356 |
-
|
3357 |
-
|
3358 |
-
nextend[this.managerIdentifier].show(this.element.val(), $.proxy(this.save, this));
|
3359 |
-
};
|
3360 |
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
this.val('');
|
3365 |
-
};
|
3366 |
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
|
|
|
|
|
|
|
|
|
|
3370 |
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
|
|
3376 |
|
3377 |
-
|
3378 |
-
|
|
|
|
|
|
|
|
|
|
|
3379 |
|
3380 |
-
this.
|
3381 |
|
3382 |
-
this.
|
3383 |
-
};
|
3384 |
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
}
|
3389 |
-
value = n2_('Multiple animations')
|
3390 |
-
} else {
|
3391 |
-
value = n2_('Single animation');
|
3392 |
-
}
|
3393 |
-
this.name.val(value);
|
3394 |
-
};
|
3395 |
|
3396 |
-
|
3397 |
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
|
|
|
|
|
|
|
|
|
|
3401 |
|
|
|
3402 |
|
3403 |
-
|
3404 |
-
NextendElementPostAnimationManager.prototype.constructor = NextendElementPostAnimationManager;
|
3405 |
|
3406 |
-
NextendElementPostAnimationManager.prototype.clear = function (e) {
|
3407 |
-
e.preventDefault();
|
3408 |
-
e.stopPropagation();
|
3409 |
-
var data = this.element.val().split('|*|');
|
3410 |
-
data[2] = '';
|
3411 |
-
this.val(data.join('|*|'));
|
3412 |
-
};
|
3413 |
-
NextendElementPostAnimationManager.prototype.updateName = function (value) {
|
3414 |
-
var data = value.split('|*|');
|
3415 |
-
value = data[2];
|
3416 |
-
if (value == '') {
|
3417 |
-
value = n2_('Disabled');
|
3418 |
-
} else if (value.split('||').length > 1) {
|
3419 |
-
value = n2_('Multiple animations');
|
3420 |
-
} else {
|
3421 |
-
value = n2_('Single animation');
|
3422 |
-
}
|
3423 |
-
this.name.val(value);
|
3424 |
-
};
|
3425 |
|
3426 |
-
|
|
|
|
|
|
|
|
|
|
|
3427 |
|
3428 |
-
|
3429 |
-
;
|
3430 |
-
|
3431 |
|
3432 |
-
|
3433 |
-
this
|
3434 |
-
|
|
|
|
|
|
|
|
|
3435 |
|
3436 |
-
this.$
|
|
|
|
|
|
|
|
|
|
|
3437 |
|
3438 |
-
this.
|
3439 |
-
this.setValue(value);
|
3440 |
-
this.options = this.panel.find('.n2-subform-image-option').on('click', $.proxy(this.selectOption, this));
|
3441 |
|
3442 |
-
this.
|
3443 |
|
3444 |
-
|
3445 |
-
};
|
3446 |
|
3447 |
-
|
3448 |
-
NextendElementBackground.prototype.constructor = NextendElementBackground;
|
3449 |
|
3450 |
-
NextendElementBackground.prototype.selectOption = function (e) {
|
3451 |
-
var index = this.getIndex(e.currentTarget);
|
3452 |
-
if (index != this.active) {
|
3453 |
|
3454 |
-
|
3455 |
-
|
|
|
|
|
3456 |
|
3457 |
-
|
|
|
|
|
|
|
3458 |
|
3459 |
-
var value = $(e.currentTarget).data('value');
|
3460 |
-
this.insideChange(value);
|
3461 |
-
this.setValue(value);
|
3462 |
|
3463 |
-
|
3464 |
-
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
|
3471 |
-
|
3472 |
-
this.element.val(value);
|
3473 |
|
3474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3475 |
};
|
3476 |
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
|
|
|
|
|
|
|
|
3480 |
|
3481 |
-
|
|
|
3482 |
|
3483 |
-
|
3484 |
-
|
3485 |
-
(function ($, scope) {
|
3486 |
|
3487 |
-
|
3488 |
-
INITIALIZED: 0,
|
3489 |
-
PICK_PARENT: 1,
|
3490 |
-
PICK_CHILD: 2,
|
3491 |
-
PICK_PARENT_ALIGN: 3,
|
3492 |
-
PICK_CHILD_ALIGN: 4/*,
|
3493 |
-
UNDER_PICK_PARENT: 1,
|
3494 |
-
UNDER_PICK_CHILD: 2*/
|
3495 |
-
},
|
3496 |
-
OVERLAYS = '<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="top" />' +
|
3497 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="top" style="left:33%;top:0;" />' +
|
3498 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="top" style="left:66%;top:0;width:34%;" />' +
|
3499 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="middle" style="left:0;top:33%;" />' +
|
3500 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="middle" style="left:33%;top:33%; " />' +
|
3501 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="middle" style="left:66%;top:33%;width:34%;" />' +
|
3502 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="bottom" style="left:0;top:66%;height:34%;" />' +
|
3503 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="bottom" style="left:33%;top:66%;height:34%;" />' +
|
3504 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="bottom" style="left:66%;top:66%;width:34%;height:34%;" />';
|
3505 |
|
3506 |
-
|
3507 |
-
|
3508 |
-
|
3509 |
-
|
3510 |
-
|
|
|
3511 |
|
3512 |
-
|
|
|
3513 |
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
|
3518 |
-
|
|
|
|
|
3519 |
});
|
|
|
|
|
3520 |
|
|
|
|
|
|
|
3521 |
|
3522 |
-
|
3523 |
-
|
3524 |
-
|
3525 |
|
3526 |
-
|
3527 |
-
|
|
|
3528 |
|
3529 |
-
|
3530 |
-
if (
|
3531 |
-
|
3532 |
-
|
3533 |
}
|
3534 |
-
|
3535 |
-
this.data = {
|
3536 |
-
parent: null,
|
3537 |
-
parentVAlign: null,
|
3538 |
-
parentHAlign: null,
|
3539 |
-
child: null,
|
3540 |
-
childVAlign: null,
|
3541 |
-
childHAlign: null,
|
3542 |
-
};
|
3543 |
-
|
3544 |
-
$('body').on('mousedown.n2-ss-parent-linker', $.proxy(function (e) {
|
3545 |
-
var el = $(e.target),
|
3546 |
-
parent = el.parent();
|
3547 |
-
if (!el.hasClass('n2-ss-picker-overlay') && !el.hasClass('n2-ss-picker-overlay-tile')) {
|
3548 |
-
this.destroy();
|
3549 |
-
}
|
3550 |
-
}, this));
|
3551 |
|
3552 |
-
|
3553 |
-
|
3554 |
-
return false;
|
3555 |
-
}, this));
|
3556 |
|
3557 |
-
|
3558 |
-
} else {
|
3559 |
-
this.data = null;
|
3560 |
-
this.change('');
|
3561 |
-
this.destroy();
|
3562 |
-
}
|
3563 |
}
|
3564 |
|
3565 |
-
|
3566 |
-
var
|
3567 |
-
|
3568 |
-
|
3569 |
-
this.destroy();
|
3570 |
-
} else {
|
3571 |
-
|
3572 |
-
this.status = STATUS.PICK_PARENT;
|
3573 |
-
nextend.tooltipMouse.show('Pick the parent layer!', e);
|
3574 |
|
3575 |
-
|
3576 |
-
.on(
|
3577 |
-
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3581 |
|
3582 |
-
|
|
|
|
|
|
|
3583 |
|
3584 |
-
|
3585 |
-
|
|
|
3586 |
|
3587 |
-
|
3588 |
-
|
3589 |
}
|
3590 |
|
3591 |
-
|
3592 |
-
this.
|
3593 |
-
|
3594 |
|
3595 |
-
var
|
3596 |
-
.on('click', $.proxy(function (e) {
|
3597 |
-
e.preventDefault();
|
3598 |
-
e.stopPropagation();
|
3599 |
|
3600 |
-
|
3601 |
-
this.data.parentHAlign = $currentTarget.data('align');
|
3602 |
-
this.data.parentVAlign = $currentTarget.data('valign');
|
3603 |
-
$currentTarget.off('click').addClass('n2-active');
|
3604 |
|
3605 |
-
|
3606 |
-
this.pickChild(e);
|
3607 |
-
}, this));
|
3608 |
-
}
|
3609 |
|
3610 |
-
|
3611 |
-
|
3612 |
-
|
3613 |
|
3614 |
-
|
3615 |
-
|
|
|
|
|
|
|
3616 |
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
var pID = layer.data('layerObject').getProperty(false, 'parentid');
|
3623 |
-
if (pID && pID != '') {
|
3624 |
-
recursiveRemoveParents($('#' + pID));
|
3625 |
}
|
3626 |
-
|
3627 |
-
};
|
3628 |
|
3629 |
-
|
|
|
3630 |
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
|
|
|
|
|
|
|
|
|
|
3635 |
}
|
|
|
3636 |
|
3637 |
-
|
3638 |
-
.on('click', $.proxy(function (e) {
|
3639 |
-
e.preventDefault();
|
3640 |
-
e.stopPropagation();
|
3641 |
-
var $layer = $(e.currentTarget).parent(),
|
3642 |
-
layer = $layer.data('layerObject');
|
3643 |
|
3644 |
-
|
|
|
3645 |
|
3646 |
-
|
3647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3648 |
|
3649 |
-
|
3650 |
-
|
3651 |
|
3652 |
-
|
3653 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3654 |
|
3655 |
-
|
|
|
|
|
|
|
|
|
3656 |
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
e.stopPropagation();
|
3661 |
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
|
3666 |
-
|
|
|
|
|
|
|
3667 |
|
3668 |
-
|
|
|
|
|
3669 |
}
|
3670 |
|
3671 |
-
|
3672 |
-
$('
|
3673 |
-
$('
|
|
|
3674 |
}
|
3675 |
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
|
3680 |
-
|
|
|
|
|
3681 |
|
3682 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3683 |
}
|
3684 |
|
3685 |
-
|
|
|
|
|
|
|
|
|
|
|
3686 |
|
3687 |
-
this.data.child.data('layerObject').parentPicked(this.data.parent.data('layerObject'), this.data.parentHAlign, this.data.parentVAlign, this.data.childHAlign, this.data.childVAlign);
|
3688 |
-
this.destroy();
|
3689 |
}
|
3690 |
|
3691 |
-
|
3692 |
-
this.element.val(value).trigger('change');
|
3693 |
-
this._setValue(value);
|
3694 |
-
this.triggerOutsideChange();
|
3695 |
-
};
|
3696 |
|
3697 |
-
|
3698 |
-
|
3699 |
-
|
|
|
3700 |
|
3701 |
-
|
3702 |
-
|
|
|
|
|
3703 |
|
3704 |
-
|
3705 |
-
if (value && value != '') {
|
3706 |
-
this.$container.css('display', '');
|
3707 |
-
} else {
|
3708 |
-
this.$container.css('display', 'none');
|
3709 |
-
}
|
3710 |
-
};
|
3711 |
|
3712 |
-
|
|
|
3713 |
|
3714 |
-
|
3715 |
-
;
|
3716 |
-
(function ($, scope) {
|
3717 |
|
3718 |
-
|
3719 |
-
|
|
|
3720 |
|
3721 |
-
this.
|
|
|
|
|
|
|
|
|
3722 |
|
3723 |
-
this.element.on('nextendChange', $.proxy(this.setAttribute, this));
|
3724 |
-
};
|
3725 |
|
3726 |
-
|
|
|
|
|
|
|
|
|
3727 |
|
3728 |
-
$('#n2-admin').attr('data-slider-type', this.element.val());
|
3729 |
|
3730 |
-
|
3731 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3732 |
}
|
3733 |
-
|
|
|
|
|
|
|
3734 |
|
3735 |
-
|
|
|
|
|
3736 |
|
3737 |
-
|
3738 |
-
|
3739 |
-
|
3740 |
-
(function ($, scope) {
|
3741 |
|
3742 |
-
function
|
3743 |
-
this.
|
|
|
|
|
|
|
3744 |
|
3745 |
-
|
|
|
|
|
3746 |
|
3747 |
-
|
|
|
|
|
|
|
3748 |
|
3749 |
-
this.areas.on('click', $.proxy(this.chooseArea, this));
|
3750 |
|
3751 |
-
|
3752 |
-
|
|
|
|
|
3753 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3754 |
|
3755 |
-
|
3756 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3757 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3758 |
|
3759 |
-
|
3760 |
-
var
|
|
|
|
|
3761 |
|
3762 |
-
|
3763 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3764 |
|
3765 |
-
|
3766 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3767 |
|
3768 |
-
|
3769 |
-
|
3770 |
-
|
3771 |
-
|
3772 |
|
3773 |
-
|
3774 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3775 |
|
3776 |
-
|
3777 |
-
|
3778 |
-
|
3779 |
-
|
|
|
|
|
3780 |
|
3781 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3782 |
|
3783 |
-
|
3784 |
-
|
3785 |
-
|
3786 |
-
|
3787 |
-
function NextendElementWidgetPosition(id) {
|
3788 |
|
3789 |
-
this.
|
3790 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3791 |
|
3792 |
-
this.
|
3793 |
|
3794 |
-
|
|
|
|
|
3795 |
|
3796 |
-
|
3797 |
-
};
|
3798 |
|
3799 |
-
|
3800 |
-
|
|
|
3801 |
|
3802 |
-
|
3803 |
-
|
3804 |
-
|
3805 |
-
|
3806 |
-
this.tabs.eq(1).css('display', '');
|
3807 |
-
this.tabs.eq(2).css('display', 'none');
|
3808 |
-
}
|
3809 |
-
};
|
3810 |
|
3811 |
-
|
|
|
|
|
3812 |
|
3813 |
-
|
3814 |
-
|
3815 |
-
(
|
3816 |
-
|
3817 |
-
function Generator() {
|
3818 |
-
this._refreshTimeout = null;
|
3819 |
-
this.modal = false;
|
3820 |
-
this.group = 0;
|
3821 |
-
smartSlider.generator = this;
|
3822 |
-
var variables = smartSlider.$currentSlideElement.data('variables');
|
3823 |
-
if (variables) {
|
3824 |
-
this.variables = variables;
|
3825 |
|
3826 |
-
|
3827 |
-
|
3828 |
-
|
3829 |
-
}
|
3830 |
-
}
|
3831 |
|
3832 |
-
|
3833 |
-
|
3834 |
-
this.registerField = this.generatorRegisterField;
|
3835 |
|
3836 |
-
this.button = $('<a href="#" class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-blue n2-h5 n2-uc" style="position:absolute;right: -2px;top: -18px;">Variable</a>')
|
3837 |
-
.on('click', $.proxy(function (e) {
|
3838 |
-
e.preventDefault();
|
3839 |
-
this.showModal();
|
3840 |
-
}, this));
|
3841 |
-
this.registerField($('#layerclass'));
|
3842 |
-
this.registerField($('#slidetitle'));
|
3843 |
-
this.registerField($('#slidedescription'));
|
3844 |
-
this.registerField($('#slidethumbnail'));
|
3845 |
-
this.registerField($('#slidebackgroundImage'));
|
3846 |
-
this.registerField($('#slidebackgroundAlt'));
|
3847 |
-
this.registerField($('#slidebackgroundTitle'));
|
3848 |
-
this.registerField($('#slidebackgroundVideoMp4'));
|
3849 |
-
this.registerField($('#slidebackgroundVideoWebm'));
|
3850 |
-
this.registerField($('#slidebackgroundVideoOgg'));
|
3851 |
-
this.registerField($('#linkslidelink_0'));
|
3852 |
-
this.registerField($('#layergenerator-visible'));
|
3853 |
-
this.registerField($('#layergroup-generator-visible'));
|
3854 |
|
3855 |
-
|
3856 |
-
//this.showModal();
|
3857 |
-
}
|
3858 |
|
3859 |
-
|
3860 |
-
} else {
|
3861 |
-
this.variables = null;
|
3862 |
-
}
|
3863 |
-
};
|
3864 |
|
3865 |
-
|
3866 |
-
|
3867 |
-
}
|
3868 |
|
3869 |
-
|
3870 |
-
|
3871 |
-
var currentToken = "";
|
3872 |
-
var nestingLevel = 0;
|
3873 |
-
for (var i = 0; i < input.length; i++) {
|
3874 |
-
var currentChar = input[i];
|
3875 |
-
if (currentChar === "," && nestingLevel === 0) {
|
3876 |
-
tokens.push(currentToken);
|
3877 |
-
currentToken = "";
|
3878 |
-
} else {
|
3879 |
-
currentToken += currentChar;
|
3880 |
-
if (currentChar === "(") {
|
3881 |
-
nestingLevel++;
|
3882 |
-
}
|
3883 |
-
else if (currentChar === ")") {
|
3884 |
-
nestingLevel--;
|
3885 |
-
}
|
3886 |
-
}
|
3887 |
-
}
|
3888 |
-
if (currentToken.length) {
|
3889 |
-
tokens.push(currentToken);
|
3890 |
-
}
|
3891 |
-
return tokens;
|
3892 |
}
|
3893 |
|
3894 |
-
|
3895 |
-
|
3896 |
-
}
|
3897 |
|
3898 |
-
|
3899 |
-
|
3900 |
-
}
|
3901 |
|
3902 |
-
|
3903 |
-
|
3904 |
|
3905 |
-
|
3906 |
-
for (var i = 0; i < args.length; i++) {
|
3907 |
-
args[i] = this.parseVariable(args[i]);
|
3908 |
-
}
|
3909 |
-
return this[functionName].apply(this, args);
|
3910 |
-
} else {
|
3911 |
-
return this.parseVariable(variable);
|
3912 |
-
}
|
3913 |
-
};
|
3914 |
|
3915 |
-
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
3919 |
-
}
|
3920 |
|
3921 |
-
|
3922 |
-
|
3923 |
-
|
3924 |
-
} else {
|
3925 |
-
var variableMatch = variable.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);
|
3926 |
-
if (variableMatch) {
|
3927 |
-
var index = variableMatch[3];
|
3928 |
-
if (typeof index == 'undefined') {
|
3929 |
-
index = 0;
|
3930 |
-
} else {
|
3931 |
-
var i = parseInt(index);
|
3932 |
-
if (!isNaN(i)) {
|
3933 |
-
index = Math.max(index, 1) - 1;
|
3934 |
-
}
|
3935 |
-
}
|
3936 |
-
if (typeof this.variables[index] != 'undefined' && typeof this.variables[index][variableMatch[1]] != 'undefined') {
|
3937 |
-
return this.variables[index][variableMatch[1]];
|
3938 |
-
}
|
3939 |
-
return '';
|
3940 |
-
}
|
3941 |
-
return variable;
|
3942 |
-
}
|
3943 |
-
};
|
3944 |
|
3945 |
-
|
3946 |
-
|
3947 |
-
|
3948 |
-
}
|
3949 |
-
return variable;
|
3950 |
-
};
|
3951 |
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
|
|
|
|
3955 |
|
3956 |
-
|
3957 |
-
return $('<div>' + variable + '</div>').text();
|
3958 |
-
};
|
3959 |
|
3960 |
-
|
3961 |
-
|
3962 |
-
|
|
|
|
|
3963 |
|
3964 |
-
|
3965 |
-
|
3966 |
-
|
3967 |
-
|
3968 |
-
posEnd = Math.max(0, length > len ? len : s.indexOf(' ', length));
|
3969 |
-
if(posEnd == 0 && length <= len) posEnd = len;
|
3970 |
-
return s.substr(posStart, posEnd);
|
3971 |
-
};
|
3972 |
|
3973 |
-
|
3974 |
-
|
3975 |
-
|
3976 |
-
|
3977 |
-
|
|
|
|
|
|
|
3978 |
|
3979 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3980 |
|
3981 |
-
|
3982 |
-
|
3983 |
-
|
3984 |
-
} else if (typeof tmp[6] != 'undefined') {
|
3985 |
-
r.push(tmp[6]);
|
3986 |
-
}
|
3987 |
-
}
|
3988 |
|
3989 |
-
|
3990 |
-
|
3991 |
-
|
3992 |
-
|
3993 |
-
|
3994 |
-
|
3995 |
-
} else {
|
3996 |
-
return '';
|
3997 |
-
}
|
3998 |
-
};
|
3999 |
|
4000 |
-
|
4001 |
-
|
4002 |
-
|
4003 |
-
r = [],
|
4004 |
-
tmp = null;
|
4005 |
|
4006 |
-
|
4007 |
|
4008 |
-
|
4009 |
-
|
4010 |
-
|
|
|
4011 |
}
|
4012 |
-
}
|
|
|
4013 |
|
4014 |
-
|
4015 |
-
|
4016 |
-
|
|
|
|
|
4017 |
} else {
|
4018 |
-
|
4019 |
}
|
4020 |
-
}
|
4021 |
-
return '';
|
4022 |
-
}
|
4023 |
};
|
4024 |
|
4025 |
-
|
4026 |
-
var s = String(variable),
|
4027 |
-
re = /<a href=\"(.*?)\">(.*?)<\/a>/g;
|
4028 |
|
4029 |
-
|
|
|
|
|
|
|
4030 |
};
|
4031 |
|
4032 |
-
Generator.prototype.registerField = function (field) {
|
4033 |
-
};
|
4034 |
|
4035 |
-
|
4036 |
-
|
4037 |
-
|
4038 |
-
|
4039 |
-
|
4040 |
-
|
4041 |
-
|
4042 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4043 |
};
|
4044 |
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
4050 |
-
|
4051 |
-
|
4052 |
-
|
4053 |
-
|
4054 |
-
|
4055 |
-
|
4056 |
-
|
4057 |
-
|
4058 |
-
|
4059 |
-
|
4060 |
-
|
4061 |
-
|
4062 |
-
|
4063 |
-
|
4064 |
-
|
4065 |
-
}
|
4066 |
-
if (active.findLink) {
|
4067 |
-
variable = 'findlink(' + variable + ',' + Math.max(1, active.findLinkIndex) + ')';
|
4068 |
-
}
|
4069 |
-
if (active.removeVarLink) {
|
4070 |
-
variable = 'removevarlink(' + variable + ')';
|
4071 |
-
}
|
4072 |
-
if (active.filter != 'no') {
|
4073 |
-
variable = active.filter + '(' + variable + ')';
|
4074 |
-
}
|
4075 |
-
if (active.split != 'no' && active.splitStart >= 0 && active.splitLength > 0) {
|
4076 |
-
variable = active.split + '(' + variable + ',' + active.splitStart + ',' + active.splitLength + ')';
|
4077 |
-
}
|
4078 |
-
return '{' + variable + '}';
|
4079 |
-
},
|
4080 |
-
resultContainer = $('<div class="n2-generator-result-container" />'),
|
4081 |
-
updateResult = function () {
|
4082 |
-
resultContainer.html($('<div/>').text(that.fill(getVariableString())).html());
|
4083 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4084 |
|
4085 |
-
|
4086 |
-
|
4087 |
-
|
4088 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4089 |
|
|
|
4090 |
|
4091 |
-
|
4092 |
-
var groupContainer = $('<div class="n2-group-container" />').appendTo(content);
|
4093 |
|
|
|
|
|
4094 |
|
4095 |
-
|
4096 |
-
var variableContainer = $('<div class="n2-variable-container" />').appendTo(content);
|
4097 |
|
4098 |
-
|
4099 |
-
|
4100 |
-
.appendTo($('<div class="n2-form" />').appendTo(content));
|
4101 |
|
4102 |
-
|
4103 |
-
|
4104 |
|
|
|
|
|
|
|
|
|
4105 |
|
4106 |
-
|
4107 |
-
|
4108 |
-
var
|
4109 |
-
|
4110 |
-
|
4111 |
-
|
4112 |
-
|
|
|
4113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4114 |
|
4115 |
-
|
4116 |
-
|
4117 |
-
|
4118 |
-
|
4119 |
-
|
4120 |
-
|
4121 |
-
|
4122 |
-
|
4123 |
-
|
4124 |
-
|
4125 |
-
|
4126 |
-
|
4127 |
-
|
4128 |
-
|
4129 |
-
|
4130 |
-
|
4131 |
-
}
|
|
|
|
|
|
|
|
|
4132 |
|
|
|
|
|
|
|
4133 |
|
4134 |
-
|
4135 |
-
.appendTo(functionsContainer);
|
4136 |
|
4137 |
-
|
4138 |
-
|
4139 |
-
|
4140 |
-
updateResult();
|
4141 |
-
}, this));
|
4142 |
-
var findImageIndex = functionsContainer.find('#n2-generator-function-findimage-index');
|
4143 |
-
findImageIndex.on('change', $.proxy(function () {
|
4144 |
-
active.findImageIndex = parseInt(findImageIndex.val());
|
4145 |
-
updateResult();
|
4146 |
-
}, this));
|
4147 |
|
|
|
4148 |
|
4149 |
-
|
4150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4151 |
|
4152 |
-
|
4153 |
-
|
4154 |
-
|
4155 |
-
updateResult();
|
4156 |
-
}, this));
|
4157 |
-
var findLinkIndex = functionsContainer.find('#n2-generator-function-findlink-index');
|
4158 |
-
findLinkIndex.on('change', $.proxy(function () {
|
4159 |
-
active.findLinkIndex = parseInt(findLinkIndex.val());
|
4160 |
-
updateResult();
|
4161 |
-
}, this));
|
4162 |
|
|
|
4163 |
|
4164 |
-
|
4165 |
-
|
4166 |
|
4167 |
-
|
4168 |
-
removeVarLink.on('nextendChange', $.proxy(function () {
|
4169 |
-
active.removeVarLink = parseInt(removeVarLink.val());
|
4170 |
-
updateResult();
|
4171 |
-
}, this));
|
4172 |
-
var removeVarLinkIndex = functionsContainer.find('#n2-generator-function-removevarlink-index');
|
4173 |
-
removeVarLinkIndex.on('change', $.proxy(function () {
|
4174 |
-
active.removeVarLinkIndex = parseInt(removeVarLinkIndex.val());
|
4175 |
-
updateResult();
|
4176 |
-
}, this));
|
4177 |
|
4178 |
-
|
4179 |
-
$('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">' + k + '</a>')
|
4180 |
-
.on('click', $.proxy(function (key, e) {
|
4181 |
-
e.preventDefault();
|
4182 |
-
variables.removeClass('n2-active');
|
4183 |
-
$(e.currentTarget).addClass('n2-active');
|
4184 |
-
active.key = key;
|
4185 |
-
updateResult();
|
4186 |
-
}, this, k))
|
4187 |
-
.appendTo(variableContainer);
|
4188 |
-
}
|
4189 |
|
4190 |
-
variables = variableContainer.find('a');
|
4191 |
-
variables.eq(0).trigger('click');
|
4192 |
|
4193 |
-
|
4194 |
-
groupHeader.css('display', 'none');
|
4195 |
-
groupContainer.css('display', 'none');
|
4196 |
-
}
|
4197 |
-
for (var i = 0; i < group; i++) {
|
4198 |
-
$('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">' + (i + 1) + '</a>')
|
4199 |
-
.on('click', $.proxy(function (groupIndex, e) {
|
4200 |
-
e.preventDefault();
|
4201 |
-
groups.removeClass('n2-active');
|
4202 |
-
$(e.currentTarget).addClass('n2-active');
|
4203 |
-
active.group = groupIndex + 1;
|
4204 |
-
updateResult();
|
4205 |
-
}, this, i))
|
4206 |
-
.appendTo(groupContainer);
|
4207 |
-
}
|
4208 |
-
groups = groupContainer.find('a');
|
4209 |
-
groups.eq(0).trigger('click');
|
4210 |
|
4211 |
-
|
|
|
4212 |
|
4213 |
-
|
4214 |
-
|
4215 |
-
|
4216 |
-
|
4217 |
-
|
4218 |
-
|
4219 |
-
|
4220 |
-
|
4221 |
-
|
4222 |
-
|
4223 |
-
|
4224 |
-
|
4225 |
-
|
4226 |
-
|
4227 |
-
|
4228 |
-
|
4229 |
-
|
4230 |
-
|
4231 |
-
|
4232 |
-
|
4233 |
-
|
4234 |
-
|
4235 |
-
|
4236 |
-
|
4237 |
-
|
4238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4239 |
}
|
4240 |
-
},
|
|
|
|
|
4241 |
|
4242 |
-
|
|
|
|
|
|
|
|
|
|
|
4243 |
}
|
4244 |
-
return this.modal;
|
4245 |
};
|
4246 |
|
4247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4248 |
|
4249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4250 |
};
|
4251 |
|
4252 |
-
|
4253 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4254 |
};
|
4255 |
|
4256 |
-
|
4257 |
|
4258 |
-
var name = $('#slidetitle').on('nextendChange', $.proxy(function () {
|
4259 |
-
this.variables.slide.name = name.val();
|
4260 |
-
this.refresh();
|
4261 |
-
}, this));
|
4262 |
|
4263 |
-
|
4264 |
-
this.variables.slide.description = description.val();
|
4265 |
-
this.refresh();
|
4266 |
-
}, this));
|
4267 |
|
|
|
4268 |
};
|
4269 |
|
|
|
|
|
|
|
4270 |
|
4271 |
-
|
4272 |
-
if (
|
4273 |
-
|
4274 |
-
this.
|
|
|
|
|
|
|
4275 |
}
|
4276 |
-
this._refreshTimeout = setTimeout($.proxy(this._refresh, this), 100);
|
4277 |
-
};
|
4278 |
|
4279 |
-
|
4280 |
-
|
4281 |
-
|
4282 |
-
|
4283 |
-
|
4284 |
-
|
4285 |
}
|
4286 |
}
|
4287 |
-
};
|
4288 |
-
|
4289 |
|
4290 |
-
|
|
|
4291 |
|
4292 |
-
|
4293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4294 |
|
4295 |
-
|
4296 |
-
this.ajaxUrl = ajaxUrl;
|
4297 |
|
4298 |
-
|
4299 |
-
};
|
4300 |
|
4301 |
-
|
4302 |
-
e.preventDefault();
|
4303 |
-
NextendAjaxHelper.ajax({
|
4304 |
-
type: "POST",
|
4305 |
-
url: this.ajaxUrl,
|
4306 |
-
data: $("#smartslider-form").serialize(),
|
4307 |
-
dataType: "json"
|
4308 |
-
}).done(function (response) {
|
4309 |
-
var modal = new NextendModal({
|
4310 |
-
zero: {
|
4311 |
-
size: [
|
4312 |
-
1300,
|
4313 |
-
700
|
4314 |
-
],
|
4315 |
-
title: "Records",
|
4316 |
-
content: response.data.html
|
4317 |
-
}
|
4318 |
-
}, true);
|
4319 |
-
modal.content.css('overflow', 'auto');
|
4320 |
-
}).error(function (response) {
|
4321 |
-
if (response.status == 200) {
|
4322 |
-
var modal = new NextendModal({
|
4323 |
-
zero: {
|
4324 |
-
size: [
|
4325 |
-
1300,
|
4326 |
-
700
|
4327 |
-
],
|
4328 |
-
title: "Response",
|
4329 |
-
content: response.responseText
|
4330 |
-
}
|
4331 |
-
}, true);
|
4332 |
-
modal.content.css('overflow', 'auto');
|
4333 |
-
}
|
4334 |
-
});
|
4335 |
-
};
|
4336 |
|
4337 |
-
|
4338 |
-
})(n2, window);
|
4339 |
-
(function (smartSlider, $, scope, undefined) {
|
4340 |
|
4341 |
-
|
4342 |
-
|
4343 |
-
this
|
4344 |
-
this.itemEditor = itemEditor;
|
4345 |
|
4346 |
-
this.
|
4347 |
-
|
|
|
4348 |
|
4349 |
-
|
4350 |
-
|
|
|
|
|
4351 |
}
|
4352 |
-
|
4353 |
-
|
4354 |
-
this.parser = new scope['NextendSmartSliderItemParser_' + this.type](this, itemEditor.getItemType(this.type));
|
4355 |
-
} else {
|
4356 |
-
this.parser = new scope['NextendSmartSliderItemParser'](this);
|
4357 |
}
|
4358 |
-
this.item.data('item', this);
|
4359 |
|
4360 |
-
if (
|
4361 |
-
|
4362 |
-
|
4363 |
-
|
4364 |
-
this.layer.items[createPosition].item.before(this.item);
|
4365 |
-
}
|
4366 |
}
|
4367 |
|
4368 |
-
if (
|
4369 |
-
this.layer.
|
4370 |
-
} else {
|
4371 |
-
this.
|
4372 |
}
|
4373 |
|
4374 |
-
if (
|
4375 |
-
this.
|
4376 |
}
|
4377 |
|
4378 |
-
|
4379 |
-
|
4380 |
-
.addClass('ui-helper ui-item-overlay')
|
4381 |
-
.css('zIndex', 89)
|
4382 |
-
.appendTo(this.item);
|
4383 |
-
|
4384 |
-
$(window).trigger('ItemCreated');
|
4385 |
-
};
|
4386 |
-
|
4387 |
-
Item.prototype.changeValue = function (property, value) {
|
4388 |
-
if (this == this.itemEditor.activeItem) {
|
4389 |
-
$('#item_' + this.type + property).data('field')
|
4390 |
-
.insideChange(value);
|
4391 |
-
} else {
|
4392 |
-
this.values[property] = value;
|
4393 |
}
|
4394 |
-
};
|
4395 |
|
4396 |
-
|
4397 |
-
if (
|
4398 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4399 |
}
|
4400 |
-
};
|
4401 |
-
|
4402 |
-
Item.prototype.deActivate = function () {
|
4403 |
-
this.parser.deActivate();
|
4404 |
-
};
|
4405 |
|
4406 |
-
|
4407 |
-
this.layer.layer.triggerHandler('itemRender');
|
4408 |
-
this.item.html(this.parser.render(html, data));
|
4409 |
|
4410 |
-
|
4411 |
-
this.
|
4412 |
|
4413 |
-
|
4414 |
-
|
4415 |
-
.css('zIndex', 89)
|
4416 |
-
.appendTo(this.item);
|
4417 |
|
4418 |
-
|
4419 |
-
|
4420 |
-
layerName = this.type;
|
4421 |
-
} else {
|
4422 |
-
layerName = layerName.replace(/[<>]/gi, '');
|
4423 |
-
}
|
4424 |
-
this.layer.rename(layerName, false);
|
4425 |
|
4426 |
-
this.layer.
|
4427 |
-
|
4428 |
|
4429 |
-
|
|
|
4430 |
|
4431 |
-
|
4432 |
-
|
4433 |
-
form = itemEditor.getItemType(this.type),
|
4434 |
-
html = form.template;
|
4435 |
|
4436 |
-
|
4437 |
-
data[name] = this.values[name];
|
4438 |
-
//$.extend(data, this.parser.parse(name, data[name]));
|
4439 |
-
}
|
4440 |
|
4441 |
-
|
4442 |
|
4443 |
-
|
4444 |
|
4445 |
-
this.
|
4446 |
-
this.values
|
4447 |
|
4448 |
-
|
4449 |
-
|
4450 |
-
html = html.replace(reg, data[k]);
|
4451 |
-
}
|
4452 |
|
4453 |
-
this.
|
4454 |
-
|
4455 |
|
4456 |
-
|
4457 |
-
|
4458 |
-
};
|
4459 |
|
4460 |
-
|
4461 |
-
this.
|
4462 |
-
this.item.remove();
|
4463 |
|
4464 |
-
if (this.
|
4465 |
-
|
4466 |
}
|
4467 |
|
4468 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4469 |
|
4470 |
-
Item.prototype.getHTML = function (base64) {
|
4471 |
-
var item = '';
|
4472 |
-
if (base64) {
|
4473 |
|
4474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4475 |
} else {
|
4476 |
-
|
4477 |
-
|
4478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4479 |
}
|
4480 |
-
return item;
|
4481 |
-
};
|
4482 |
-
|
4483 |
-
Item.prototype.getData = function () {
|
4484 |
-
return {
|
4485 |
-
type: this.type,
|
4486 |
-
values: this.values
|
4487 |
-
};
|
4488 |
-
};
|
4489 |
|
4490 |
|
4491 |
-
|
4492 |
-
switch (
|
4493 |
-
case '
|
4494 |
-
|
4495 |
-
|
4496 |
-
|
|
|
|
|
|
|
|
|
4497 |
break;
|
4498 |
}
|
4499 |
-
};
|
4500 |
|
4501 |
-
|
4502 |
-
})(nextend.smartSlider, n2, window);
|
4503 |
-
(function (smartSlider, $, scope, undefined) {
|
4504 |
-
|
4505 |
-
function ItemManager(layerEditor) {
|
4506 |
-
this.suppressChange = false;
|
4507 |
-
|
4508 |
-
this.activeItemOriginalData = null;
|
4509 |
-
|
4510 |
-
this.layerEditor = layerEditor;
|
4511 |
-
|
4512 |
-
this._initInstalledItems();
|
4513 |
-
|
4514 |
-
this.form = {};
|
4515 |
-
this.activeForm = {
|
4516 |
-
form: $('<div></div>')
|
4517 |
-
};
|
4518 |
}
|
4519 |
|
4520 |
-
ItemManager.prototype.setActiveItem = function (item, context, force) {
|
4521 |
-
if (item != this.activeItem || force) {
|
4522 |
-
this.activeItemOriginalData = null;
|
4523 |
-
|
4524 |
-
var type = item.type,
|
4525 |
-
values = item.values;
|
4526 |
|
4527 |
-
|
|
|
4528 |
|
4529 |
-
|
4530 |
-
|
4531 |
-
|
4532 |
-
this.activeItem.deActivate();
|
4533 |
-
}
|
4534 |
|
4535 |
-
this.activeItem = item;
|
4536 |
|
4537 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4538 |
|
4539 |
-
|
4540 |
-
|
4541 |
-
|
4542 |
-
|
4543 |
-
|
|
|
|
|
4544 |
}
|
|
|
|
|
4545 |
|
4546 |
-
this.
|
4547 |
-
|
4548 |
-
|
4549 |
-
|
4550 |
-
|
4551 |
-
|
4552 |
-
|
4553 |
-
|
4554 |
-
|
4555 |
-
|
4556 |
-
|
4557 |
-
var field = this.activeForm.fields.eq(0).data('field');
|
4558 |
-
if (nextend.smartSlider.generator.isDynamicSlide() && field.connectedField && field.connectedField instanceof NextendElementImage) {
|
4559 |
|
4560 |
-
|
4561 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4562 |
}
|
|
|
|
|
4563 |
}
|
4564 |
|
4565 |
-
|
4566 |
|
4567 |
-
|
4568 |
-
.on('click', $.proxy(function (e) {
|
4569 |
-
this.createLayerItem(this.layerEditor.getActiveGroup(), $(e.currentTarget).data('item'), 'click');
|
4570 |
-
}, this));
|
4571 |
};
|
4572 |
|
4573 |
-
|
4574 |
|
4575 |
-
|
|
|
4576 |
|
4577 |
-
|
4578 |
-
layer = this.layerEditor.createLayer(group, $('.n2-ss-core-item-' + type).data('layerproperties'));
|
4579 |
|
4580 |
-
|
4581 |
-
.addClass('n2-ss-item n2-ss-item-' + type);
|
4582 |
|
4583 |
-
|
4584 |
-
|
4585 |
-
layer.layer.trigger('mousedown', ['create']).trigger('mouseup', ['create']).trigger('click', ['create']);
|
4586 |
-
} else {
|
4587 |
-
layer.activate();
|
4588 |
-
}
|
4589 |
|
4590 |
-
|
4591 |
|
4592 |
-
|
4593 |
-
return [this, 'createLayer', 'create', 'delete', [group, item, type]];
|
4594 |
-
}, this));
|
4595 |
|
4596 |
-
|
4597 |
-
};
|
4598 |
|
4599 |
-
|
4600 |
-
|
4601 |
-
|
4602 |
-
|
4603 |
-
|
4604 |
-
|
4605 |
-
|
4606 |
-
|
4607 |
-
var form = $('#smartslider-slide-toolbox-item-type-' + type),
|
4608 |
-
formData = {
|
4609 |
-
form: form,
|
4610 |
-
template: form.data('itemtemplate'),
|
4611 |
-
values: form.data('itemvalues'),
|
4612 |
-
fields: form.find('[name^="item_' + type + '"]'),
|
4613 |
-
fieldNameRegexp: new RegExp('item_' + type + "\\[(.*?)\\]", "")
|
4614 |
-
};
|
4615 |
-
formData.fields.on({
|
4616 |
-
nextendChange: $.proxy(this.updateCurrentItem, this),
|
4617 |
-
keydown: $.proxy(this.updateCurrentItemDeBounced, this)
|
4618 |
-
});
|
4619 |
|
4620 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4621 |
}
|
4622 |
-
return this.form[type];
|
4623 |
};
|
|
|
4624 |
|
4625 |
-
/**
|
4626 |
-
* This function renders the current item with the current values of the related form field.
|
4627 |
-
*/
|
4628 |
-
ItemManager.prototype.updateCurrentItem = function (e) {
|
4629 |
-
if (!this.suppressChange) {
|
4630 |
-
if (this.activeItemOriginalData === null) {
|
4631 |
-
this.activeItemOriginalData = $.extend({}, this.activeItem.values);
|
4632 |
-
}
|
4633 |
-
var data = {},
|
4634 |
-
originalData = {},
|
4635 |
-
form = this.form[this.activeItem.type],
|
4636 |
-
html = form.template,
|
4637 |
-
parser = this.activeItem.parser;
|
4638 |
-
|
4639 |
-
// Get the current values of the fields
|
4640 |
-
// Run through the related item filter
|
4641 |
-
// Replace the variables in the template of the item type
|
4642 |
-
form.fields.each($.proxy(function (i, field) {
|
4643 |
-
var field = $(field),
|
4644 |
-
name = field.attr('name').match(form.fieldNameRegexp)[1];
|
4645 |
-
|
4646 |
-
originalData[name] = data[name] = field.val();
|
4647 |
|
4648 |
-
|
|
|
|
|
|
|
4649 |
|
4650 |
-
data = $.extend({}, parser.getDefault(), data);
|
4651 |
|
4652 |
-
|
4653 |
-
|
4654 |
-
|
4655 |
-
|
|
|
|
|
|
|
|
|
4656 |
}
|
4657 |
-
|
4658 |
-
|
4659 |
-
|
4660 |
-
}, this));
|
4661 |
|
4662 |
-
|
4663 |
-
}
|
4664 |
-
this.activeItem.render($(html), data, originalData);
|
4665 |
}
|
4666 |
-
};
|
4667 |
-
|
4668 |
-
ItemManager.prototype.updateCurrentItemDeBounced = NextendDeBounce(function (e) {
|
4669 |
-
this.updateCurrentItem(e);
|
4670 |
-
}, 100);
|
4671 |
|
4672 |
-
|
4673 |
-
|
4674 |
-
|
4675 |
-
|
4676 |
-
|
4677 |
-
|
4678 |
-
|
4679 |
-
break;
|
4680 |
-
case 'create':
|
4681 |
-
var item = this.createLayerItem(other[0], other[2]);
|
4682 |
-
smartSlider.history.changeFuture(other[1].layer, item.layer);
|
4683 |
-
smartSlider.history.changeFuture(other[1], item);
|
4684 |
-
break;
|
4685 |
-
}
|
4686 |
-
break;
|
4687 |
}
|
4688 |
-
};
|
4689 |
|
4690 |
-
|
|
|
|
|
4691 |
|
4692 |
-
|
4693 |
-
|
4694 |
-
|
4695 |
-
|
4696 |
-
|
4697 |
-
|
4698 |
-
|
4699 |
-
|
4700 |
-
|
4701 |
-
|
4702 |
-
|
4703 |
-
|
4704 |
-
|
4705 |
-
|
4706 |
-
|
4707 |
-
|
4708 |
-
|
4709 |
-
};
|
4710 |
-
|
4711 |
-
ItemParser.prototype.added = function () {
|
4712 |
-
|
4713 |
-
};
|
4714 |
-
|
4715 |
-
ItemParser.prototype.addedFont = function (mode, name) {
|
4716 |
-
var $input = $('#item_' + this.item.type + name);
|
4717 |
-
if ($input.length) {
|
4718 |
-
this.fonts.push({
|
4719 |
-
mode: mode,
|
4720 |
-
name: name,
|
4721 |
-
field: $input.data('field'),
|
4722 |
-
def: this.formData.values[name]
|
4723 |
-
});
|
4724 |
-
$.when(nextend.fontManager.addVisualUsage(mode, this.item.values[name], this.pre))
|
4725 |
-
.done($.proxy(function (existsFont) {
|
4726 |
-
if (!existsFont) {
|
4727 |
-
this.item.changeValue(name, '');
|
4728 |
-
}
|
4729 |
-
}, this));
|
4730 |
-
}
|
4731 |
-
};
|
4732 |
-
|
4733 |
-
ItemParser.prototype.addedStyle = function (mode, name) {
|
4734 |
-
var $input = $('#item_' + this.item.type + name);
|
4735 |
-
if ($input.length) {
|
4736 |
-
this.styles.push({
|
4737 |
-
mode: mode,
|
4738 |
-
name: name,
|
4739 |
-
field: $input.data('field'),
|
4740 |
-
def: this.formData.values[name]
|
4741 |
-
});
|
4742 |
-
|
4743 |
-
$.when(nextend.styleManager.addVisualUsage(mode, this.item.values[name], this.pre))
|
4744 |
-
.done($.proxy(function (existsStyle) {
|
4745 |
-
if (!existsStyle) {
|
4746 |
-
this.item.changeValue(name, '');
|
4747 |
-
}
|
4748 |
-
}, this));
|
4749 |
-
}
|
4750 |
-
|
4751 |
-
};
|
4752 |
-
|
4753 |
-
ItemParser.prototype.parseAll = function (data, item) {
|
4754 |
-
|
4755 |
-
for (var i = 0; i < this.fonts.length; i++) {
|
4756 |
-
data[this.fonts[i].name + 'class'] = nextend.fontManager.getClass(data[this.fonts[i].name], this.fonts[i].mode) + ' ';
|
4757 |
-
}
|
4758 |
-
|
4759 |
-
for (var i = 0; i < this.styles.length; i++) {
|
4760 |
-
data[this.styles[i].name + 'class'] = nextend.styleManager.getClass(data[this.styles[i].name], this.styles[i].mode) + ' ';
|
4761 |
-
}
|
4762 |
-
|
4763 |
-
for (var i = 0; i < this.needFill.length; i++) {
|
4764 |
-
if (typeof data[this.needFill[i]] !== 'undefined') {
|
4765 |
-
data[this.needFill[i]] = nextend.smartSlider.generator.fill(data[this.needFill[i]] + '');
|
4766 |
-
}
|
4767 |
-
}
|
4768 |
-
};
|
4769 |
-
|
4770 |
-
ItemParser.prototype.render = function (node, data) {
|
4771 |
-
return node;
|
4772 |
-
};
|
4773 |
-
|
4774 |
-
ItemParser.prototype.getName = function (data) {
|
4775 |
-
return false;
|
4776 |
-
};
|
4777 |
-
|
4778 |
-
ItemParser.prototype.resizeLayerToImage = function (item, image) {
|
4779 |
-
$("<img/>")
|
4780 |
-
.attr("src", image)
|
4781 |
-
.load(function () {
|
4782 |
-
var slideSize = item.layer.layerEditor.slideSize;
|
4783 |
-
var maxWidth = slideSize.width,
|
4784 |
-
maxHeight = slideSize.height;
|
4785 |
-
|
4786 |
-
if (this.width > 0 && this.height > 0) {
|
4787 |
-
maxWidth = parseInt(Math.min(this.width, maxWidth));
|
4788 |
-
maxHeight = parseInt(Math.min(this.height, maxHeight));
|
4789 |
-
nextend.smartSlider.history.off();
|
4790 |
-
if (slideSize.width / slideSize.height <= maxWidth / maxHeight) {
|
4791 |
-
item.layer.setProperty('width', maxWidth);
|
4792 |
-
item.layer.setProperty('height', this.height * maxWidth / this.width);
|
4793 |
-
} else {
|
4794 |
-
var width = Math.min(this.width * slideSize.height / this.height, maxWidth);
|
4795 |
-
item.layer.setProperty('width', width);
|
4796 |
-
item.layer.setProperty('height', this.height * width / this.width);
|
4797 |
-
}
|
4798 |
-
nextend.smartSlider.history.on();
|
4799 |
-
}
|
4800 |
-
});
|
4801 |
-
};
|
4802 |
-
|
4803 |
-
ItemParser.prototype.fitLayer = function (item) {
|
4804 |
-
return false;
|
4805 |
-
};
|
4806 |
-
|
4807 |
-
ItemParser.prototype.activate = function () {
|
4808 |
-
nextend.basicCSS.activate('ss3item' + this.item.type, this.item.values, {
|
4809 |
-
font: this.fonts,
|
4810 |
-
style: this.styles
|
4811 |
-
});
|
4812 |
-
}
|
4813 |
-
|
4814 |
-
ItemParser.prototype.deActivate = function () {
|
4815 |
-
nextend.basicCSS.deActivate();
|
4816 |
-
}
|
4817 |
-
|
4818 |
-
scope.NextendSmartSliderItemParser = ItemParser;
|
4819 |
-
|
4820 |
-
})(n2, window);
|
4821 |
-
(function ($, scope, undefined) {
|
4822 |
-
|
4823 |
-
function ItemParserButton() {
|
4824 |
-
NextendSmartSliderItemParser.apply(this, arguments);
|
4825 |
-
};
|
4826 |
-
|
4827 |
-
ItemParserButton.prototype = Object.create(NextendSmartSliderItemParser.prototype);
|
4828 |
-
ItemParserButton.prototype.constructor = ItemParserButton;
|
4829 |
-
|
4830 |
-
ItemParserButton.prototype.added = function () {
|
4831 |
-
this.needFill = ['content', 'url'];
|
4832 |
-
this.addedFont('link', 'font');
|
4833 |
-
this.addedStyle('button', 'style');
|
4834 |
-
|
4835 |
-
nextend.smartSlider.generator.registerField($('#item_buttoncontent'));
|
4836 |
-
nextend.smartSlider.generator.registerField($('#linkitem_buttonlink_0'));
|
4837 |
-
};
|
4838 |
-
|
4839 |
-
ItemParserButton.prototype.getName = function (data) {
|
4840 |
-
return data.content;
|
4841 |
-
};
|
4842 |
-
|
4843 |
-
ItemParserButton.prototype.parseAll = function (data) {
|
4844 |
-
var link = data.link.split('|*|');
|
4845 |
-
data.url = link[0];
|
4846 |
-
data.target = link[1];
|
4847 |
-
delete data.link;
|
4848 |
-
|
4849 |
-
if (data.fullwidth | 0) {
|
4850 |
-
data.display = 'block;';
|
4851 |
-
} else {
|
4852 |
-
data.display = 'inline-block;';
|
4853 |
-
}
|
4854 |
-
|
4855 |
-
data.extrastyle = data.nowrap | 0 ? 'white-space: nowrap;' : '';
|
4856 |
-
|
4857 |
-
NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
|
4858 |
-
};
|
4859 |
-
|
4860 |
-
scope.NextendSmartSliderItemParser_button = ItemParserButton;
|
4861 |
-
})(n2, window);
|
4862 |
-
(function ($, scope, undefined) {
|
4863 |
-
|
4864 |
-
function ItemParserHeading() {
|
4865 |
-
NextendSmartSliderItemParser.apply(this, arguments);
|
4866 |
-
};
|
4867 |
-
|
4868 |
-
ItemParserHeading.prototype = Object.create(NextendSmartSliderItemParser.prototype);
|
4869 |
-
ItemParserHeading.prototype.constructor = ItemParserHeading;
|
4870 |
-
|
4871 |
-
ItemParserHeading.prototype.getDefault = function () {
|
4872 |
-
return {
|
4873 |
-
link: '#|*|_self',
|
4874 |
-
font: '',
|
4875 |
-
style: ''
|
4876 |
-
}
|
4877 |
-
};
|
4878 |
-
|
4879 |
-
ItemParserHeading.prototype.added = function () {
|
4880 |
-
this.needFill = ['heading', 'url'];
|
4881 |
-
|
4882 |
-
this.addedFont('hover', 'font');
|
4883 |
-
this.addedStyle('heading', 'style');
|
4884 |
-
|
4885 |
-
nextend.smartSlider.generator.registerField($('#item_headingheading'));
|
4886 |
-
nextend.smartSlider.generator.registerField($('#linkitem_headinglink_0'));
|
4887 |
-
|
4888 |
-
};
|
4889 |
-
|
4890 |
-
ItemParserHeading.prototype.getName = function (data) {
|
4891 |
-
return data.heading;
|
4892 |
-
};
|
4893 |
-
|
4894 |
-
ItemParserHeading.prototype.parseAll = function (data) {
|
4895 |
-
|
4896 |
-
data.uid = $.fn.uid();
|
4897 |
-
|
4898 |
-
var link = data.link.split('|*|');
|
4899 |
-
data.url = link[0];
|
4900 |
-
data.target = link[1];
|
4901 |
-
delete data.link;
|
4902 |
-
|
4903 |
-
|
4904 |
-
if (data.fullwidth | 0) {
|
4905 |
-
data.display = 'block;';
|
4906 |
-
} else {
|
4907 |
-
data.display = 'inline-block;';
|
4908 |
-
}
|
4909 |
-
|
4910 |
-
data.extrastyle = data.nowrap | 0 ? 'white-space: nowrap;' : '';
|
4911 |
-
|
4912 |
-
data.heading = $('<div>' + data.heading + '</div>').text().replace(/\n/g, '<br />');
|
4913 |
-
data.priority = 2;
|
4914 |
-
data.class = '';
|
4915 |
-
|
4916 |
-
|
4917 |
-
NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
|
4918 |
-
|
4919 |
-
if (data['url'] == '#' || data['url'] == '') {
|
4920 |
-
data['afontclass'] = '';
|
4921 |
-
data['astyleclass'] = '';
|
4922 |
-
} else {
|
4923 |
-
data['afontclass'] = data['fontclass'];
|
4924 |
-
data['fontclass'] = '';
|
4925 |
-
data['astyleclass'] = data['styleclass'];
|
4926 |
-
data['styleclass'] = '';
|
4927 |
-
}
|
4928 |
-
};
|
4929 |
-
|
4930 |
-
ItemParserHeading.prototype.render = function (node, data) {
|
4931 |
-
if (data['url'] == '#' || data['url'] == '') {
|
4932 |
-
var a = node.find('a');
|
4933 |
-
a.parent().html(a.html());
|
4934 |
-
}
|
4935 |
-
return node;
|
4936 |
-
}
|
4937 |
-
|
4938 |
-
scope.NextendSmartSliderItemParser_heading = ItemParserHeading;
|
4939 |
-
})(n2, window);
|
4940 |
-
(function ($, scope, undefined) {
|
4941 |
-
|
4942 |
-
function ItemParserImage() {
|
4943 |
-
NextendSmartSliderItemParser.apply(this, arguments);
|
4944 |
-
};
|
4945 |
-
|
4946 |
-
ItemParserImage.prototype = Object.create(NextendSmartSliderItemParser.prototype);
|
4947 |
-
ItemParserImage.prototype.constructor = ItemParserImage;
|
4948 |
-
|
4949 |
-
ItemParserImage.prototype.getDefault = function () {
|
4950 |
-
return {
|
4951 |
-
size: '100%|*|auto',
|
4952 |
-
link: '#|*|_self',
|
4953 |
-
style: ''
|
4954 |
-
}
|
4955 |
-
};
|
4956 |
-
|
4957 |
-
ItemParserImage.prototype.added = function () {
|
4958 |
-
this.needFill = ['image', 'url'];
|
4959 |
-
|
4960 |
-
this.addedStyle('box', 'style');
|
4961 |
-
|
4962 |
-
nextend.smartSlider.generator.registerField($('#item_imageimage'));
|
4963 |
-
nextend.smartSlider.generator.registerField($('#item_imagealt'));
|
4964 |
-
nextend.smartSlider.generator.registerField($('#item_imagetitle'));
|
4965 |
-
nextend.smartSlider.generator.registerField($('#linkitem_imagelink_0'));
|
4966 |
-
};
|
4967 |
-
|
4968 |
-
ItemParserImage.prototype.getName = function (data) {
|
4969 |
-
return data.image.split('/').pop();
|
4970 |
-
};
|
4971 |
-
|
4972 |
-
ItemParserImage.prototype.parseAll = function (data, item) {
|
4973 |
-
var size = data.size.split('|*|');
|
4974 |
-
data.width = size[0];
|
4975 |
-
data.height = size[1];
|
4976 |
-
delete data.size;
|
4977 |
-
|
4978 |
-
var link = data.link.split('|*|');
|
4979 |
-
data.url = link[0];
|
4980 |
-
data.target = link[1];
|
4981 |
-
delete data.link;
|
4982 |
-
|
4983 |
-
NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
|
4984 |
-
|
4985 |
-
if (item && item.values.image == '$system$/images/placeholder/image.png' && data.image != item.values.image) {
|
4986 |
-
data.image = nextend.imageHelper.fixed(data.image);
|
4987 |
-
this.resizeLayerToImage(item, data.image);
|
4988 |
-
} else {
|
4989 |
-
data.image = nextend.imageHelper.fixed(data.image);
|
4990 |
-
}
|
4991 |
-
|
4992 |
-
};
|
4993 |
-
|
4994 |
-
ItemParserImage.prototype.fitLayer = function (item) {
|
4995 |
-
this.resizeLayerToImage(item, nextend.imageHelper.fixed(item.values.image));
|
4996 |
-
return true;
|
4997 |
-
};
|
4998 |
-
|
4999 |
-
ItemParserImage.prototype.render = function (node, data) {
|
5000 |
-
if (data['url'] == '#') {
|
5001 |
-
node.html(node.children('a').html());
|
5002 |
-
}
|
5003 |
-
return node;
|
5004 |
-
};
|
5005 |
-
|
5006 |
-
scope.NextendSmartSliderItemParser_image = ItemParserImage;
|
5007 |
-
})(n2, window);
|
5008 |
-
|
5009 |
-
(function ($, scope, undefined) {
|
5010 |
-
|
5011 |
-
function ItemParserText() {
|
5012 |
-
NextendSmartSliderItemParser.apply(this, arguments);
|
5013 |
-
};
|
5014 |
-
|
5015 |
-
ItemParserText.prototype = Object.create(NextendSmartSliderItemParser.prototype);
|
5016 |
-
ItemParserText.prototype.constructor = ItemParserText;
|
5017 |
-
|
5018 |
-
ItemParserText.prototype.getDefault = function () {
|
5019 |
-
return {
|
5020 |
-
contentmobile: '',
|
5021 |
-
contenttablet: '',
|
5022 |
-
font: '',
|
5023 |
-
style: ''
|
5024 |
-
}
|
5025 |
-
};
|
5026 |
-
|
5027 |
-
ItemParserText.prototype.added = function () {
|
5028 |
-
this.needFill = ['content', 'contenttablet', 'contentmobile'];
|
5029 |
-
|
5030 |
-
this.addedFont('paragraph', 'font');
|
5031 |
-
this.addedStyle('heading', 'style');
|
5032 |
-
|
5033 |
-
nextend.smartSlider.generator.registerField($('#item_textcontent'));
|
5034 |
-
nextend.smartSlider.generator.registerField($('#item_textcontenttablet'));
|
5035 |
-
nextend.smartSlider.generator.registerField($('#item_textcontentmobile'));
|
5036 |
-
};
|
5037 |
-
|
5038 |
-
ItemParserText.prototype.getName = function (data) {
|
5039 |
-
return data.content;
|
5040 |
-
};
|
5041 |
-
|
5042 |
-
ItemParserText.prototype.parseAll = function (data) {
|
5043 |
-
NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
|
5044 |
-
|
5045 |
-
data['p'] = _wp_Autop(data['content']);
|
5046 |
-
data['ptablet'] = _wp_Autop(data['contenttablet']);
|
5047 |
-
data['pmobile'] = _wp_Autop(data['contentmobile']);
|
5048 |
-
};
|
5049 |
-
ItemParserText.prototype.render = function (node, data) {
|
5050 |
-
if (data['contenttablet'] == '') {
|
5051 |
-
node = node.filter(':not(.n2-ss-tablet)');
|
5052 |
-
node.filter('.n2-ss-desktop').addClass('n2-ss-tablet');
|
5053 |
-
}
|
5054 |
-
if (data['contentmobile'] == '') {
|
5055 |
-
node = node.filter(':not(.n2-ss-mobile)');
|
5056 |
-
node.filter('.n2-ss-tablet, .n2-ss-desktop').last().addClass('n2-ss-mobile');
|
5057 |
-
}
|
5058 |
-
|
5059 |
-
node.find('p').addClass(data['fontclass'] + ' ' + data['styleclass']);
|
5060 |
-
node.find('a').on('click', function (e) {
|
5061 |
-
e.preventDefault();
|
5062 |
-
});
|
5063 |
-
return node;
|
5064 |
-
};
|
5065 |
-
|
5066 |
-
scope.NextendSmartSliderItemParser_text = ItemParserText;
|
5067 |
-
|
5068 |
-
function _wp_Autop(pee) {
|
5069 |
-
var preserve_linebreaks = false,
|
5070 |
-
preserve_br = false,
|
5071 |
-
blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
|
5072 |
-
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' +
|
5073 |
-
'|article|aside|hgroup|header|footer|nav|figure|details|menu|summary';
|
5074 |
-
|
5075 |
-
if (pee.indexOf('<object') !== -1) {
|
5076 |
-
pee = pee.replace(/<object[\s\S]+?<\/object>/g, function (a) {
|
5077 |
-
return a.replace(/[\r\n]+/g, '');
|
5078 |
-
});
|
5079 |
-
}
|
5080 |
-
|
5081 |
-
pee = pee.replace(/<[^<>]+>/g, function (a) {
|
5082 |
-
return a.replace(/[\r\n]+/g, ' ');
|
5083 |
-
});
|
5084 |
-
|
5085 |
-
// Protect pre|script tags
|
5086 |
-
if (pee.indexOf('<pre') !== -1 || pee.indexOf('<script') !== -1) {
|
5087 |
-
preserve_linebreaks = true;
|
5088 |
-
pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function (a) {
|
5089 |
-
return a.replace(/(\r\n|\n)/g, '<wp-line-break>');
|
5090 |
-
});
|
5091 |
-
}
|
5092 |
-
|
5093 |
-
// keep <br> tags inside captions and convert line breaks
|
5094 |
-
if (pee.indexOf('[caption') !== -1) {
|
5095 |
-
preserve_br = true;
|
5096 |
-
pee = pee.replace(/\[caption[\s\S]+?\[\/caption\]/g, function (a) {
|
5097 |
-
// keep existing <br>
|
5098 |
-
a = a.replace(/<br([^>]*)>/g, '<wp-temp-br$1>');
|
5099 |
-
// no line breaks inside HTML tags
|
5100 |
-
a = a.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function (b) {
|
5101 |
-
return b.replace(/[\r\n\t]+/, ' ');
|
5102 |
-
});
|
5103 |
-
// convert remaining line breaks to <br>
|
5104 |
-
return a.replace(/\s*\n\s*/g, '<wp-temp-br />');
|
5105 |
-
});
|
5106 |
-
}
|
5107 |
-
|
5108 |
-
pee = pee + '\n\n';
|
5109 |
-
pee = pee.replace(/<br \/>\s*<br \/>/gi, '\n\n');
|
5110 |
-
pee = pee.replace(new RegExp('(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi'), '\n$1');
|
5111 |
-
pee = pee.replace(new RegExp('(</(?:' + blocklist + ')>)', 'gi'), '$1\n\n');
|
5112 |
-
pee = pee.replace(/<hr( [^>]*)?>/gi, '<hr$1>\n\n'); // hr is self closing block element
|
5113 |
-
pee = pee.replace(/\r\n|\r/g, '\n');
|
5114 |
-
pee = pee.replace(/\n\s*\n+/g, '\n\n');
|
5115 |
-
pee = pee.replace(/([\s\S]+?)\n\n/g, '<p>$1</p>\n');
|
5116 |
-
pee = pee.replace(/<p>\s*?<\/p>/gi, '');
|
5117 |
-
pee = pee.replace(new RegExp('<p>\\s*(</?(?:' + blocklist + ')(?: [^>]*)?>)\\s*</p>', 'gi'), '$1');
|
5118 |
-
pee = pee.replace(/<p>(<li.+?)<\/p>/gi, '$1');
|
5119 |
-
pee = pee.replace(/<p>\s*<blockquote([^>]*)>/gi, '<blockquote$1><p>');
|
5120 |
-
pee = pee.replace(/<\/blockquote>\s*<\/p>/gi, '</p></blockquote>');
|
5121 |
-
pee = pee.replace(new RegExp('<p>\\s*(</?(?:' + blocklist + ')(?: [^>]*)?>)', 'gi'), '$1');
|
5122 |
-
pee = pee.replace(new RegExp('(</?(?:' + blocklist + ')(?: [^>]*)?>)\\s*</p>', 'gi'), '$1');
|
5123 |
-
pee = pee.replace(/\s*\n/gi, '<br />\n');
|
5124 |
-
pee = pee.replace(new RegExp('(</?(?:' + blocklist + ')[^>]*>)\\s*<br />', 'gi'), '$1');
|
5125 |
-
pee = pee.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi, '$1');
|
5126 |
-
pee = pee.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi, '[caption$1[/caption]');
|
5127 |
-
|
5128 |
-
pee = pee.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g, function (a, b, c) {
|
5129 |
-
if (c.match(/<p( [^>]*)?>/)) {
|
5130 |
-
return a;
|
5131 |
-
}
|
5132 |
-
|
5133 |
-
return b + '<p>' + c + '</p>';
|
5134 |
-
});
|
5135 |
-
|
5136 |
-
// put back the line breaks in pre|script
|
5137 |
-
if (preserve_linebreaks) {
|
5138 |
-
pee = pee.replace(/<wp-line-break>/g, '\n');
|
5139 |
-
}
|
5140 |
-
|
5141 |
-
if (preserve_br) {
|
5142 |
-
pee = pee.replace(/<wp-temp-br([^>]*)>/g, '<br$1>');
|
5143 |
-
}
|
5144 |
-
|
5145 |
-
return pee;
|
5146 |
-
};
|
5147 |
-
})(n2, window);
|
5148 |
-
(function ($, scope, undefined) {
|
5149 |
|
5150 |
-
function
|
5151 |
-
|
|
|
|
|
|
|
|
|
5152 |
};
|
5153 |
|
5154 |
-
|
5155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5156 |
|
5157 |
-
|
5158 |
-
this.
|
|
|
5159 |
|
5160 |
-
|
|
|
5161 |
};
|
5162 |
|
5163 |
-
|
5164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5165 |
};
|
5166 |
|
5167 |
-
|
5168 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5169 |
|
5170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5171 |
|
5172 |
-
|
5173 |
-
|
|
|
|
|
|
|
|
|
5174 |
}
|
|
|
5175 |
|
5176 |
-
data.image = nextend.imageHelper.fixed(data.image);
|
5177 |
|
5178 |
-
|
5179 |
-
|
5180 |
-
|
|
|
|
|
|
|
|
|
5181 |
|
5182 |
-
|
5183 |
-
|
5184 |
-
|
5185 |
-
|
5186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5187 |
}
|
5188 |
|
5189 |
-
|
5190 |
-
|
5191 |
-
|
5192 |
-
|
5193 |
-
|
5194 |
-
|
5195 |
-
|
5196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5197 |
}
|
|
|
5198 |
}
|
|
|
|
|
5199 |
};
|
5200 |
|
5201 |
-
|
5202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5203 |
};
|
5204 |
|
5205 |
-
|
5206 |
-
|
5207 |
-
|
5208 |
-
|
5209 |
-
function
|
5210 |
-
|
5211 |
-
|
5212 |
-
|
5213 |
-
|
5214 |
-
|
5215 |
-
|
5216 |
-
|
5217 |
-
|
5218 |
-
|
5219 |
-
|
5220 |
-
|
5221 |
-
|
5222 |
-
};
|
5223 |
-
|
5224 |
-
ItemParserYouTube.prototype.getName = function (data) {
|
5225 |
-
return data.youtubeurl;
|
5226 |
-
};
|
5227 |
-
|
5228 |
-
ItemParserYouTube.prototype.parseAll = function (data, item) {
|
5229 |
-
|
5230 |
-
var youTubeChanged = item.values.youtubeurl != data.youtubeurl;
|
5231 |
-
|
5232 |
-
NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
|
5233 |
-
|
5234 |
-
if (data.image == '') {
|
5235 |
-
data.image = '$system$/images/placeholder/video.png';
|
5236 |
-
}
|
5237 |
-
|
5238 |
-
data.image = nextend.imageHelper.fixed(data.image);
|
5239 |
-
|
5240 |
-
if (youTubeChanged) {
|
5241 |
-
var youtubeRegexp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,
|
5242 |
-
youtubeMatch = data.youtubeurl.match(youtubeRegexp);
|
5243 |
-
|
5244 |
-
if (youtubeMatch) {
|
5245 |
-
NextendAjaxHelper.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + encodeURI(youtubeMatch[2]) + '&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM').done($.proxy(function (_data) {
|
5246 |
-
if (_data.items.length) {
|
5247 |
-
|
5248 |
-
var thumbnails = _data.items[0].snippet.thumbnails,
|
5249 |
-
thumbnail = thumbnails.maxres || thumbnails.standard || thumbnails.high || thumbnails.medium || thumbnails.default,
|
5250 |
-
url = thumbnail.url;
|
5251 |
-
if (item.values.youtubeurl == '{video_url}') {
|
5252 |
-
url = url.replace(youtubeMatch[2], '{video_id}');
|
5253 |
-
}
|
5254 |
-
$('#item_youtubeimage').val(url).trigger('change');
|
5255 |
-
}
|
5256 |
-
}, this)).fail(function (data) {
|
5257 |
-
nextend.notificationCenter.error(data.error.errors[0].message);
|
5258 |
-
});
|
5259 |
-
} else {
|
5260 |
-
nextend.notificationCenter.error('The provided URL does not match any known YouTube url or code!');
|
5261 |
-
}
|
5262 |
-
}
|
5263 |
-
};
|
5264 |
-
|
5265 |
-
ItemParserYouTube.prototype.fitLayer = function (item) {
|
5266 |
-
return true;
|
5267 |
-
};
|
5268 |
-
|
5269 |
-
ItemParserYouTube.prototype.render = function (node, data) {
|
5270 |
-
if (!parseInt(data.playbutton)) {
|
5271 |
-
node.find('.n2-video-play').remove();
|
5272 |
-
}
|
5273 |
-
return node;
|
5274 |
-
}
|
5275 |
-
|
5276 |
-
scope.NextendSmartSliderItemParser_youtube = ItemParserYouTube;
|
5277 |
-
})(n2, window);
|
5278 |
-
(function (smartSlider, $, scope, undefined) {
|
5279 |
-
function LayerDataStorage() {
|
5280 |
-
this.property = {};
|
5281 |
-
this.deviceProperty = {};
|
5282 |
}
|
5283 |
|
5284 |
-
|
5285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5286 |
};
|
|
|
|
|
|
|
5287 |
|
5288 |
-
|
|
|
|
|
|
|
5289 |
|
5290 |
-
|
5291 |
-
|
5292 |
-
|
5293 |
-
|
5294 |
-
|
5295 |
-
|
5296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5297 |
}
|
5298 |
}
|
5299 |
-
return this.property[name];
|
5300 |
};
|
5301 |
|
5302 |
-
|
|
|
|
|
5303 |
|
5304 |
-
|
5305 |
-
this.
|
5306 |
-
|
5307 |
-
|
5308 |
-
|
5309 |
-
|
5310 |
-
|
5311 |
-
|
5312 |
-
|
5313 |
-
smartSlider.history.add($.proxy(function () {
|
5314 |
-
return [this, 'store', value, oldValue, [this.layer, deviceBased, name, this.getMode()]];
|
5315 |
-
}, this));
|
5316 |
}
|
5317 |
|
5318 |
-
|
5319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5320 |
}
|
5321 |
-
}
|
5322 |
|
5323 |
-
|
5324 |
-
this.property[name] = value;
|
5325 |
-
var mode = this.getMode();
|
5326 |
|
5327 |
-
|
5328 |
-
|
5329 |
-
|
5330 |
-
this.deviceProperty[mode][name] = value;
|
5331 |
|
5332 |
-
|
5333 |
-
|
5334 |
-
}
|
5335 |
}
|
5336 |
|
5337 |
-
|
5338 |
-
|
|
|
5339 |
};
|
5340 |
|
5341 |
-
|
5342 |
-
this
|
5343 |
-
}
|
5344 |
|
5345 |
-
|
5346 |
-
|
5347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5348 |
}
|
5349 |
-
return false;
|
5350 |
};
|
5351 |
|
5352 |
-
|
5353 |
-
|
5354 |
-
|
5355 |
-
|
5356 |
-
|
5357 |
-
|
5358 |
-
|
5359 |
-
|
5360 |
-
|
5361 |
-
this.
|
5362 |
-
|
5363 |
-
|
5364 |
-
|
5365 |
-
|
5366 |
-
switch (other[1]) {
|
5367 |
-
case 'width':
|
5368 |
-
case 'left':
|
5369 |
-
ratio = this.layerEditor.getResponsiveRatio('h');
|
5370 |
-
break;
|
5371 |
-
case 'height':
|
5372 |
-
case 'top':
|
5373 |
-
ratio = this.layerEditor.getResponsiveRatio('v');
|
5374 |
-
break;
|
5375 |
-
}
|
5376 |
-
if (other[2] == mode) {
|
5377 |
-
this[method](other[1], value, ratio, true);
|
5378 |
-
} else {
|
5379 |
-
this.deviceProperty[other[2]][other[1]] = value;
|
5380 |
-
}
|
5381 |
-
this._renderModeProperties(true);
|
5382 |
-
break;
|
5383 |
}
|
5384 |
};
|
5385 |
|
5386 |
-
|
5387 |
-
|
5388 |
-
(
|
5389 |
-
|
5390 |
-
|
|
|
5391 |
|
5392 |
-
|
5393 |
-
zIndexList: [],
|
5394 |
-
reIndexLayers: function () {
|
5395 |
|
|
|
|
|
|
|
|
|
5396 |
}
|
5397 |
};
|
5398 |
|
5399 |
-
function
|
5400 |
-
|
5401 |
-
|
5402 |
-
}
|
5403 |
-
this.layerEditor = layerEditor;
|
5404 |
-
if (!group) {
|
5405 |
-
group = fakeGroup;
|
5406 |
-
}
|
5407 |
-
this.group = group;
|
5408 |
|
5409 |
-
|
5410 |
|
5411 |
-
this.
|
|
|
5412 |
|
5413 |
-
this
|
|
|
5414 |
|
5415 |
-
|
|
|
|
|
|
|
5416 |
|
5417 |
-
|
|
|
|
|
5418 |
|
5419 |
-
|
|
|
5420 |
|
5421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5422 |
|
5423 |
-
this.
|
5424 |
-
|
5425 |
-
|
5426 |
-
|
5427 |
-
|
5428 |
-
|
5429 |
-
|
5430 |
-
|
5431 |
-
|
5432 |
-
|
5433 |
-
|
5434 |
-
|
5435 |
-
}
|
|
|
|
|
5436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5437 |
}
|
5438 |
|
5439 |
-
|
5440 |
-
this.
|
5441 |
}
|
5442 |
|
5443 |
-
|
5444 |
|
|
|
|
|
5445 |
|
5446 |
-
|
5447 |
-
|
5448 |
-
|
5449 |
-
|
5450 |
-
}
|
5451 |
-
|
5452 |
-
/**
|
5453 |
-
* This is a fix for the editor load. The layers might not in the z-index order on the load,
|
5454 |
-
* so we have to "mess up" the array and let the algorithm to fix it.
|
5455 |
-
*/
|
5456 |
-
if (typeof this.group.zIndexList[this.zIndex] === 'undefined') {
|
5457 |
-
this.group.zIndexList[this.zIndex] = this;
|
5458 |
-
} else {
|
5459 |
-
this.group.zIndexList.splice(this.zIndex, 0, this);
|
5460 |
-
}
|
5461 |
|
5462 |
-
this.
|
5463 |
|
5464 |
-
if (this.layers.length > 0) {
|
5465 |
-
this.reIndexLayers();
|
5466 |
-
}
|
5467 |
}
|
5468 |
|
5469 |
-
|
5470 |
-
this.layer.find('> div').each($.proxy(function (i, el) {
|
5471 |
-
var $el = $(el);
|
5472 |
-
switch ($el.data('type')) {
|
5473 |
-
case 'group':
|
5474 |
-
var newGroup = new NextendSmartSliderLayerGroup(this.layerEditor, this, $el, []);
|
5475 |
-
newGroup.lateInit();
|
5476 |
-
newGroup.startWithExistingNodes();
|
5477 |
-
break;
|
5478 |
-
case 'layer':
|
5479 |
-
var layer = new NextendSmartSliderLayer(this.layerEditor, this, $el, this.layerEditor.itemEditor);
|
5480 |
-
this.layers.push(layer);
|
5481 |
-
break;
|
5482 |
-
}
|
5483 |
-
}, this));
|
5484 |
-
if (this.layers.length > 0) {
|
5485 |
-
this.reIndexLayers();
|
5486 |
-
}
|
5487 |
-
}
|
5488 |
|
5489 |
-
|
5490 |
-
|
5491 |
-
|
5492 |
-
if (this.zIndexList[i] instanceof NextendSmartSliderLayer) {
|
5493 |
-
if (nodeOnly) {
|
5494 |
-
layers.push(this.zIndexList[i].layer[0]);
|
5495 |
-
} else {
|
5496 |
-
layers.push(this.zIndexList[i]);
|
5497 |
-
}
|
5498 |
-
} else {
|
5499 |
-
layers.push.apply(layers, this.zIndexList[i].getChildLayersRecursive(nodeOnly));
|
5500 |
-
}
|
5501 |
}
|
5502 |
-
return layers;
|
5503 |
}
|
5504 |
|
5505 |
-
|
5506 |
-
|
5507 |
-
this.moveLayersToGroup([layer], [newZIndex]);
|
5508 |
}
|
5509 |
|
|
|
|
|
|
|
|
|
5510 |
|
5511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5512 |
|
5513 |
-
|
5514 |
-
|
5515 |
-
var layer = layers[i],
|
5516 |
-
originalGroup = layer.group;
|
5517 |
|
5518 |
-
|
|
|
5519 |
|
5520 |
-
|
|
|
|
|
|
|
5521 |
|
5522 |
-
|
5523 |
-
|
5524 |
-
|
5525 |
-
|
5526 |
-
|
5527 |
-
|
5528 |
-
|
|
|
|
|
|
|
5529 |
|
5530 |
-
|
5531 |
-
originalGroups.push(originalGroup);
|
5532 |
-
}
|
5533 |
-
}
|
5534 |
-
}
|
5535 |
-
for (var i = 0; i < originalGroups.length; i++) {
|
5536 |
-
originalGroups[i].reIndexLayers();
|
5537 |
-
}
|
5538 |
-
this.reIndexLayers();
|
5539 |
}
|
5540 |
|
5541 |
-
|
5542 |
-
|
5543 |
-
return item != undefined
|
5544 |
-
});
|
5545 |
-
for (var i = this.zIndexList.length - 1; i >= 0; i--) {
|
5546 |
-
this.zIndexList[i].setZIndex(i);
|
5547 |
-
}
|
5548 |
-
};
|
5549 |
|
5550 |
-
|
5551 |
-
|
5552 |
-
|
5553 |
-
ui.item.data("startindex", ui.item.index());
|
5554 |
-
};
|
5555 |
|
5556 |
-
LayerContainerAbstract.prototype.layersSortableStop = function (event, ui) {
|
5557 |
-
var newContainer = ui.item.parent().data('container');
|
5558 |
-
if (newContainer instanceof NextendSmartSliderLayerGroup && ui.item.hasClass("n2-ss-layer-group-row")) {
|
5559 |
-
this.layersItemsUlElement.sortable("cancel");
|
5560 |
-
} else {
|
5561 |
-
var startIndex = this.zIndexList.length - $(ui.item).data("startindex") - 1,
|
5562 |
-
newIndex = newContainer.zIndexList.length - $(ui.item).index() - 1;
|
5563 |
|
5564 |
-
|
5565 |
-
newIndex++;
|
5566 |
-
var layer = this.zIndexList[startIndex];
|
5567 |
-
newContainer.moveLayerToGroup(layer, newIndex);
|
5568 |
|
5569 |
-
|
5570 |
-
|
5571 |
-
}, this));
|
5572 |
|
5573 |
-
|
5574 |
-
|
5575 |
-
|
5576 |
-
newContainer.reIndexLayers();
|
5577 |
|
5578 |
-
|
5579 |
-
|
5580 |
-
|
5581 |
-
|
5582 |
}
|
5583 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5584 |
|
5585 |
-
|
5586 |
|
5587 |
-
|
5588 |
-
|
5589 |
-
|
5590 |
-
|
|
|
|
|
5591 |
}
|
5592 |
|
5593 |
-
|
5594 |
-
|
5595 |
-
|
5596 |
-
|
5597 |
-
this.layers.splice(i, 1);
|
5598 |
-
break;
|
5599 |
-
}
|
5600 |
-
}
|
5601 |
|
5602 |
-
|
5603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5604 |
|
|
|
5605 |
|
5606 |
-
|
5607 |
-
|
5608 |
-
case 'changeZIndex':
|
5609 |
-
var fromZIndex = value[0],
|
5610 |
-
targetZIndex = value[1];
|
5611 |
-
this.zIndexList.splice(targetZIndex, 0, this.zIndexList.splice(fromZIndex, 1)[0]);
|
5612 |
-
this.reIndexLayers();
|
5613 |
-
break;
|
5614 |
-
case 'changeZIndexWithContainer':
|
5615 |
-
var layer = value[0],
|
5616 |
-
fromContainer = value[2],
|
5617 |
-
targetZIndex = value[1],
|
5618 |
-
targetContainer = value[3];
|
5619 |
-
targetContainer.moveLayerToGroup(layer, targetZIndex);
|
5620 |
-
break;
|
5621 |
-
case 'createGroup':
|
5622 |
-
switch (value) {
|
5623 |
-
case 'create':
|
5624 |
-
var zIndex = other[0],
|
5625 |
-
group = new NextendSmartSliderLayerGroup(this.layerEditor, this.layerEditor.mainLayerGroup, false);
|
5626 |
|
5627 |
-
|
|
|
5628 |
|
5629 |
-
|
|
|
|
|
5630 |
|
5631 |
-
|
5632 |
-
|
5633 |
-
|
5634 |
-
|
5635 |
-
|
5636 |
-
|
5637 |
-
|
5638 |
-
|
5639 |
-
case 'create':
|
5640 |
-
var group = new NextendSmartSliderLayerGroup(this.layerEditor, this.layerEditor.mainLayerGroup, false, {data: $.extend(true, {}, other[0])});
|
5641 |
-
group.lateInit();
|
5642 |
-
smartSlider.history.changeFuture(this, group);
|
5643 |
-
this.layerEditor.fixActiveLayer();
|
5644 |
-
break;
|
5645 |
-
case 'delete':
|
5646 |
-
this.delete();
|
5647 |
-
break;
|
5648 |
-
}
|
5649 |
-
break;
|
5650 |
}
|
5651 |
-
}
|
5652 |
|
5653 |
-
|
5654 |
-
|
5655 |
-
|
5656 |
|
5657 |
-
|
5658 |
-
|
5659 |
-
window.nextendPreventClick = false;
|
5660 |
-
var preventActivation = false;
|
5661 |
|
5662 |
-
|
5663 |
-
rAFShim = (function () {
|
5664 |
-
var timeLast = 0;
|
5665 |
|
5666 |
-
|
5667 |
-
var timeCurrent = (new Date()).getTime(),
|
5668 |
-
timeDelta;
|
5669 |
|
5670 |
-
|
5671 |
-
|
5672 |
-
|
5673 |
-
|
|
|
|
|
5674 |
|
5675 |
-
|
5676 |
-
|
5677 |
-
|
5678 |
-
|
5679 |
-
})
|
5680 |
-
|
5681 |
-
raf: false,
|
5682 |
-
ratios: null,
|
5683 |
-
isThrottled: false,
|
5684 |
-
layers: []
|
5685 |
-
},
|
5686 |
-
requestRender = function () {
|
5687 |
-
if (resizeCollection.raf === false) {
|
5688 |
-
resizeCollection.raf = true;
|
5689 |
-
rAFShim(function () {
|
5690 |
-
for (var i = 0; i < resizeCollection.layers.length; i++) {
|
5691 |
-
if (!resizeCollection.layers[i].isDeleted) {
|
5692 |
-
resizeCollection.layers[i].doTheResize(resizeCollection.ratios, true, resizeCollection.isThrottled);
|
5693 |
-
}
|
5694 |
-
}
|
5695 |
-
resizeCollection = {
|
5696 |
-
raf: false,
|
5697 |
-
ratios: null,
|
5698 |
-
isThrottled: false,
|
5699 |
-
layers: []
|
5700 |
-
};
|
5701 |
-
});
|
5702 |
-
}
|
5703 |
-
};
|
5704 |
|
5705 |
-
|
5706 |
-
|
5707 |
-
|
5708 |
-
|
5709 |
-
HIDDEN: 3
|
5710 |
-
},
|
5711 |
-
LAYER_STATUS_INV = {
|
5712 |
-
0: 'UNDEFINED',
|
5713 |
-
1: 'NORMAL',
|
5714 |
-
2: 'LOCKED',
|
5715 |
-
3: 'HIDDEN'
|
5716 |
-
};
|
5717 |
|
|
|
|
|
5718 |
|
5719 |
-
|
5720 |
-
this.
|
|
|
|
|
|
|
5721 |
|
5722 |
-
this.isDeleted = false;
|
5723 |
-
//this.resize = NextendDeBounce(this.resize, 200);
|
5724 |
-
//this.triggerLayerResized = NextendThrottle(this.triggerLayerResized, 30);
|
5725 |
-
this._triggerLayerResizedThrottled = NextendThrottle(this._triggerLayerResized, 30);
|
5726 |
-
//this.doThrottledTheResize = NextendThrottle(this.doTheResize, 16.6666);
|
5727 |
-
this.doThrottledTheResize = this.doTheResize;
|
5728 |
-
this.parent = false;
|
5729 |
-
this.parentIsVisible = true;
|
5730 |
|
5731 |
-
this
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5732 |
|
5733 |
-
|
5734 |
-
this.group = group;
|
5735 |
|
5736 |
-
|
5737 |
-
this.
|
5738 |
-
|
5739 |
-
|
5740 |
-
|
5741 |
-
this.property = $.extend({
|
5742 |
-
id: null,
|
5743 |
-
class: '',
|
5744 |
-
parentid: null,
|
5745 |
-
parentalign: 'center',
|
5746 |
-
parentvalign: 'middle',
|
5747 |
-
name: 'New layer',
|
5748 |
-
nameSynced: 1,
|
5749 |
-
crop: 'visible',
|
5750 |
-
rotation: 0,
|
5751 |
-
inneralign: 'left',
|
5752 |
-
parallax: 0,
|
5753 |
-
align: 'center',
|
5754 |
-
valign: 'middle',
|
5755 |
-
fontsize: 100,
|
5756 |
-
adaptivefont: 0,
|
5757 |
-
generatorvisible: '',
|
5758 |
-
desktopPortrait: 1,
|
5759 |
-
desktopLandscape: 1,
|
5760 |
-
tabletPortrait: 1,
|
5761 |
-
tabletLandscape: 1,
|
5762 |
-
mobilePortrait: 1,
|
5763 |
-
mobileLandscape: 1,
|
5764 |
-
left: 0,
|
5765 |
-
top: 0,
|
5766 |
-
responsiveposition: 1,
|
5767 |
-
width: 'auto',
|
5768 |
-
height: 'auto',
|
5769 |
-
responsivesize: 1,
|
5770 |
-
mouseenter: UNDEFINED,
|
5771 |
-
click: UNDEFINED,
|
5772 |
-
mouseleave: UNDEFINED,
|
5773 |
-
play: UNDEFINED,
|
5774 |
-
pause: UNDEFINED,
|
5775 |
-
stop: UNDEFINED
|
5776 |
-
}, properties);
|
5777 |
-
} else {
|
5778 |
-
this.property = {
|
5779 |
-
id: layer.attr('id'),
|
5780 |
-
class: layer.data('class'),
|
5781 |
-
parentid: layer.data('parentid'),
|
5782 |
-
parentalign: layer.data('desktopportraitparentalign'),
|
5783 |
-
parentvalign: layer.data('desktopportraitparentvalign'),
|
5784 |
-
name: layer.data('name') + '',
|
5785 |
-
nameSynced: layer.data('namesynced'),
|
5786 |
-
crop: layer.data('crop'),
|
5787 |
-
rotation: layer.data('rotation'),
|
5788 |
-
inneralign: layer.data('inneralign'),
|
5789 |
-
parallax: layer.data('parallax'),
|
5790 |
-
align: layer.data('desktopportraitalign'),
|
5791 |
-
valign: layer.data('desktopportraitvalign'),
|
5792 |
-
fontsize: layer.data('desktopportraitfontsize'),
|
5793 |
-
adaptivefont: layer.data('adaptivefont'),
|
5794 |
-
generatorvisible: layer.data('generatorvisible') || '',
|
5795 |
-
desktopPortrait: parseFloat(layer.data('desktopportrait')),
|
5796 |
-
desktopLandscape: parseFloat(layer.data('desktoplandscape')),
|
5797 |
-
tabletPortrait: parseFloat(layer.data('tabletportrait')),
|
5798 |
-
tabletLandscape: parseFloat(layer.data('tabletlandscape')),
|
5799 |
-
mobilePortrait: parseFloat(layer.data('mobileportrait')),
|
5800 |
-
mobileLandscape: parseFloat(layer.data('mobilelandscape')),
|
5801 |
-
left: parseInt(layer.data('desktopportraitleft')),
|
5802 |
-
top: parseInt(layer.data('desktopportraittop')),
|
5803 |
-
responsiveposition: parseInt(layer.data('responsiveposition')),
|
5804 |
-
responsivesize: parseInt(layer.data('responsivesize')),
|
5805 |
-
mouseenter: layer.data('mouseenter'),
|
5806 |
-
click: layer.data('click'),
|
5807 |
-
mouseleave: layer.data('mouseleave'),
|
5808 |
-
play: layer.data('play'),
|
5809 |
-
pause: layer.data('pause'),
|
5810 |
-
stop: layer.data('stop')
|
5811 |
-
};
|
5812 |
|
5813 |
-
|
5814 |
-
|
5815 |
-
|
5816 |
-
|
5817 |
-
this.property.width = parseInt(width);
|
5818 |
-
}
|
5819 |
|
5820 |
-
|
5821 |
-
|
5822 |
-
|
5823 |
-
|
5824 |
-
this.property.height = parseInt(height);
|
5825 |
}
|
5826 |
}
|
5827 |
-
this.layer = layer;
|
5828 |
|
5829 |
-
|
5830 |
-
|
5831 |
-
|
5832 |
|
5833 |
-
this.
|
5834 |
-
|
5835 |
-
this.subscribeParent();
|
5836 |
-
} else {
|
5837 |
-
this.property.parentid = null;
|
5838 |
-
}
|
5839 |
|
5840 |
-
|
5841 |
-
|
5842 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5843 |
|
5844 |
-
|
5845 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5846 |
}
|
5847 |
|
5848 |
-
|
5849 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5850 |
}
|
|
|
|
|
|
|
5851 |
|
5852 |
-
|
5853 |
-
|
|
|
|
|
5854 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5855 |
|
5856 |
-
|
5857 |
-
|
5858 |
-
|
|
|
|
|
|
|
|
|
5859 |
|
5860 |
-
|
5861 |
-
|
5862 |
-
|
|
|
|
|
|
|
|
|
|
|
5863 |
|
5864 |
-
|
5865 |
-
this
|
5866 |
-
}
|
|
|
5867 |
|
5868 |
-
|
5869 |
-
|
5870 |
-
}
|
5871 |
|
5872 |
-
if (
|
5873 |
-
|
5874 |
-
|
|
|
|
|
|
|
|
|
5875 |
|
5876 |
-
|
5877 |
-
|
5878 |
-
}
|
5879 |
|
5880 |
-
|
5881 |
-
this.property.adaptivefont = 0;
|
5882 |
}
|
5883 |
|
5884 |
-
|
5885 |
-
|
5886 |
-
}
|
5887 |
|
5888 |
-
|
5889 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5890 |
}
|
5891 |
-
layer.attr('data-align', this.property.align);
|
5892 |
-
layer.attr('data-valign', this.property.valign);
|
5893 |
|
5894 |
-
layer.
|
5895 |
-
|
5896 |
|
5897 |
-
|
5898 |
-
|
5899 |
-
|
5900 |
-
}
|
5901 |
|
5902 |
-
|
5903 |
-
|
5904 |
-
|
5905 |
-
|
5906 |
-
|
5907 |
-
height: this.property.height,
|
5908 |
-
align: this.property.align,
|
5909 |
-
valign: this.property.valign,
|
5910 |
-
parentalign: this.property.parentalign,
|
5911 |
-
parentvalign: this.property.parentvalign,
|
5912 |
-
fontsize: this.property.fontsize
|
5913 |
-
},
|
5914 |
-
desktopLandscape: {
|
5915 |
-
left: layer.data('desktoplandscapeleft'),
|
5916 |
-
top: layer.data('desktoplandscapetop'),
|
5917 |
-
width: layer.data('desktoplandscapewidth'),
|
5918 |
-
height: layer.data('desktoplandscapeheight'),
|
5919 |
-
align: layer.data('desktoplandscapealign'),
|
5920 |
-
valign: layer.data('desktoplandscapevalign'),
|
5921 |
-
parentalign: layer.data('desktoplandscapeparentalign'),
|
5922 |
-
parentvalign: layer.data('desktoplandscapeparentvalign'),
|
5923 |
-
fontsize: layer.data('desktoplandscapefontsize')
|
5924 |
-
},
|
5925 |
-
tabletPortrait: {
|
5926 |
-
left: layer.data('tabletportraitleft'),
|
5927 |
-
top: layer.data('tabletportraittop'),
|
5928 |
-
width: layer.data('tabletportraitwidth'),
|
5929 |
-
height: layer.data('tabletportraitheight'),
|
5930 |
-
align: layer.data('tabletportraitalign'),
|
5931 |
-
valign: layer.data('tabletportraitvalign'),
|
5932 |
-
parentalign: layer.data('tabletportraitparentalign'),
|
5933 |
-
parentvalign: layer.data('tabletportraitparentvalign'),
|
5934 |
-
fontsize: layer.data('tabletportraitfontsize')
|
5935 |
-
},
|
5936 |
-
tabletLandscape: {
|
5937 |
-
left: layer.data('tabletlandscapeleft'),
|
5938 |
-
top: layer.data('tabletlandscapetop'),
|
5939 |
-
width: layer.data('tabletlandscapewidth'),
|
5940 |
-
height: layer.data('tabletlandscapeheight'),
|
5941 |
-
align: layer.data('tabletlandscapealign'),
|
5942 |
-
valign: layer.data('tabletlandscapevalign'),
|
5943 |
-
parentalign: layer.data('tabletlandscapeparentalign'),
|
5944 |
-
parentvalign: layer.data('tabletlandscapeparentvalign'),
|
5945 |
-
fontsize: layer.data('tabletlandscapefontsize')
|
5946 |
-
},
|
5947 |
-
mobilePortrait: {
|
5948 |
-
left: layer.data('mobileportraitleft'),
|
5949 |
-
top: layer.data('mobileportraittop'),
|
5950 |
-
width: layer.data('mobileportraitwidth'),
|
5951 |
-
height: layer.data('mobileportraitheight'),
|
5952 |
-
align: layer.data('mobileportraitalign'),
|
5953 |
-
valign: layer.data('mobileportraitvalign'),
|
5954 |
-
parentalign: layer.data('mobileportraitparentalign'),
|
5955 |
-
parentvalign: layer.data('mobileportraitparentvalign'),
|
5956 |
-
fontsize: layer.data('mobileportraitfontsize')
|
5957 |
-
},
|
5958 |
-
mobileLandscape: {
|
5959 |
-
left: layer.data('mobilelandscapeleft'),
|
5960 |
-
top: layer.data('mobilelandscapetop'),
|
5961 |
-
width: layer.data('mobilelandscapewidth'),
|
5962 |
-
height: layer.data('mobilelandscapeheight'),
|
5963 |
-
align: layer.data('mobilelandscapealign'),
|
5964 |
-
valign: layer.data('mobilelandscapevalign'),
|
5965 |
-
parentalign: layer.data('mobilelandscapeparentalign'),
|
5966 |
-
parentvalign: layer.data('mobilelandscapeparentvalign'),
|
5967 |
-
fontsize: layer.data('mobilelandscapefontsize')
|
5968 |
-
}
|
5969 |
-
};
|
5970 |
|
5971 |
-
|
|
|
|
|
|
|
5972 |
|
5973 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5974 |
|
5975 |
-
this.
|
|
|
5976 |
|
5977 |
-
|
5978 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5979 |
}
|
|
|
5980 |
|
5981 |
-
|
5982 |
-
|
|
|
5983 |
}
|
|
|
5984 |
|
5985 |
-
|
5986 |
-
|
5987 |
-
|
|
|
|
|
|
|
|
|
5988 |
|
5989 |
-
|
5990 |
-
|
5991 |
-
|
5992 |
-
mouseenter: $.proxy(function () {
|
5993 |
-
$lastParent = $('#' + this.getProperty(false, 'parentid')).addClass('n2-highlight');
|
5994 |
-
}, this),
|
5995 |
-
mouseleave: $.proxy(function () {
|
5996 |
-
if ($lastParent) {
|
5997 |
-
$lastParent.removeClass('n2-highlight');
|
5998 |
-
$lastParent = null;
|
5999 |
}
|
6000 |
-
|
6001 |
-
}).appendTo(this.layer);
|
6002 |
-
|
6003 |
|
6004 |
-
|
6005 |
-
|
6006 |
|
6007 |
-
|
6008 |
-
|
6009 |
-
* so we have to "mess up" the array and let the algorithm to fix it.
|
6010 |
-
*/
|
6011 |
-
if (typeof this.group.zIndexList[this.zIndex] === 'undefined') {
|
6012 |
-
this.group.zIndexList[this.zIndex] = this;
|
6013 |
} else {
|
6014 |
-
|
6015 |
}
|
|
|
|
|
6016 |
|
|
|
|
|
|
|
|
|
6017 |
|
6018 |
-
|
6019 |
-
|
6020 |
|
6021 |
-
|
6022 |
-
|
6023 |
-
|
6024 |
-
dblclick: $.proxy(function () {
|
6025 |
-
$('[data-tab="item"]').trigger('click');
|
6026 |
-
this.items[0].itemEditor.focusFirst('dblclick');
|
6027 |
-
}, this)
|
6028 |
-
});
|
6029 |
|
6030 |
-
|
6031 |
-
if (
|
6032 |
-
this.
|
6033 |
-
} else {
|
6034 |
-
this.changeStatus(LAYER_STATUS.NORMAL);
|
6035 |
}
|
|
|
6036 |
|
6037 |
-
|
6038 |
-
|
6039 |
-
|
6040 |
-
this.layer.css('visibility', '');
|
6041 |
-
}
|
6042 |
-
}, this), 300);
|
6043 |
-
};
|
6044 |
|
6045 |
-
|
6046 |
-
|
|
|
|
|
|
|
|
|
|
|
6047 |
|
6048 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6049 |
|
6050 |
-
|
6051 |
-
group.layerContainerElement.append(this.layer);
|
6052 |
|
6053 |
-
this.
|
|
|
6054 |
|
6055 |
-
this.
|
|
|
6056 |
|
|
|
|
|
|
|
6057 |
|
6058 |
-
|
6059 |
-
|
6060 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6061 |
/**
|
6062 |
-
*
|
6063 |
-
* so we have to "mess up" the array and let the algorithm to fix it.
|
6064 |
*/
|
6065 |
-
|
6066 |
-
|
6067 |
-
|
6068 |
-
group.zIndexList.splice(newZIndex, 0, this);
|
6069 |
-
}
|
6070 |
-
};
|
6071 |
-
|
6072 |
-
Layer.prototype.getIndex = function () {
|
6073 |
-
return this.layerEditor.layerList.indexOf(this);
|
6074 |
-
};
|
6075 |
|
6076 |
-
|
6077 |
-
return $('#' + this.getProperty(false, 'parentid')).data('layerObject');
|
6078 |
-
};
|
6079 |
|
6080 |
-
|
6081 |
-
var id = this.getProperty(false, 'id');
|
6082 |
-
if (!id) {
|
6083 |
-
id = $.fn.uid();
|
6084 |
-
this.setProperty('id', id, 'layer');
|
6085 |
-
}
|
6086 |
-
return id;
|
6087 |
-
};
|
6088 |
|
6089 |
-
|
6090 |
-
var dblClickInterval = 300,
|
6091 |
-
timeout = null,
|
6092 |
-
status = $('<div class="n2-ss-layer-status"></div>'),
|
6093 |
-
remove = $('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="' + n2_('Delete layer') + '"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on('click', $.proxy(this.delete, this)),
|
6094 |
-
duplicate = $('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="' + n2_('Duplicate layer') + '"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on('click', $.proxy(function () {
|
6095 |
-
this.duplicate(true, false)
|
6096 |
-
}, this));
|
6097 |
|
6098 |
-
|
6099 |
-
e.preventDefault();
|
6100 |
-
if (this.status == LAYER_STATUS.HIDDEN || this.status == LAYER_STATUS.LOCKED) {
|
6101 |
-
this.setStatusNormal();
|
6102 |
-
} else {
|
6103 |
-
this.changeStatus(LAYER_STATUS.HIDDEN);
|
6104 |
-
}
|
6105 |
-
}, this));
|
6106 |
|
6107 |
-
|
6108 |
-
.data('layer', this)
|
6109 |
-
.on({
|
6110 |
-
mouseenter: $.proxy(function () {
|
6111 |
-
this.layer.addClass('n2-highlight');
|
6112 |
-
}, this),
|
6113 |
-
mouseleave: $.proxy(function (e) {
|
6114 |
-
this.layer.removeClass('n2-highlight');
|
6115 |
-
}, this),
|
6116 |
-
mousedown: $.proxy(nextend.context.setMouseDownArea, nextend.context, 'layerRowClicked')
|
6117 |
-
})
|
6118 |
-
.appendTo(this.group.layersItemsUlElement);
|
6119 |
|
6120 |
-
|
6121 |
-
mouseup: $.proxy(function (e) {
|
6122 |
-
if (timeout) {
|
6123 |
-
clearTimeout(timeout);
|
6124 |
-
timeout = null;
|
6125 |
-
this.editName();
|
6126 |
-
} else {
|
6127 |
-
this.activate(e);
|
6128 |
-
timeout = setTimeout($.proxy(function () {
|
6129 |
-
timeout = null;
|
6130 |
-
}, this), dblClickInterval);
|
6131 |
-
}
|
6132 |
-
}, this)
|
6133 |
-
});
|
6134 |
|
6135 |
-
|
6136 |
-
.append(this.layerTitleSpan)
|
6137 |
-
.append($('<div class="n2-actions-left"></div>').append(status))
|
6138 |
-
.append($('<div class="n2-actions"></div>').append(duplicate).append(remove))
|
6139 |
-
.appendTo(this.layerRow)
|
6140 |
-
.on({
|
6141 |
-
mouseup: $.proxy(function (e) {
|
6142 |
-
if (e.target.tagName === 'DIV') {
|
6143 |
-
this.activate(e);
|
6144 |
-
}
|
6145 |
-
}, this)
|
6146 |
-
});
|
6147 |
|
6148 |
-
|
6149 |
-
}
|
6150 |
|
6151 |
-
|
6152 |
-
|
|
|
6153 |
|
6154 |
-
|
6155 |
-
valueChanged: $.proxy(function (e, newName) {
|
6156 |
-
this.rename(newName, true);
|
6157 |
-
this.layerTitleSpan.css('display', 'inline');
|
6158 |
-
}, this),
|
6159 |
-
cancel: $.proxy(function () {
|
6160 |
-
this.layerTitleSpan.css('display', 'inline');
|
6161 |
-
}, this)
|
6162 |
-
});
|
6163 |
|
6164 |
-
|
6165 |
-
input.injectNode(this.layerTitle, this.property.name);
|
6166 |
|
|
|
6167 |
};
|
6168 |
|
6169 |
-
|
|
|
6170 |
|
6171 |
-
|
|
|
|
|
6172 |
|
6173 |
-
|
6174 |
-
|
6175 |
-
|
6176 |
|
6177 |
-
|
6178 |
-
if (force) {
|
6179 |
-
this.property.nameSynced = 1;
|
6180 |
-
if (this.items.length) {
|
6181 |
-
this.items[0].reRender();
|
6182 |
-
return false;
|
6183 |
-
}
|
6184 |
-
}
|
6185 |
-
newName = 'Layer #' + (this.layerEditor.layerList.length + 1);
|
6186 |
-
}
|
6187 |
-
newName = newName.substr(0, 35);
|
6188 |
-
if (this.property.name != newName) {
|
6189 |
-
this.property.name = newName;
|
6190 |
-
this.layerTitleSpan.html(newName);
|
6191 |
|
6192 |
-
|
6193 |
-
}
|
6194 |
-
}
|
6195 |
-
};
|
6196 |
|
6197 |
-
|
6198 |
-
this.zIndex = targetIndex;
|
6199 |
-
this.layer.css('zIndex', targetIndex);
|
6200 |
-
this.group.layersItemsUlElement.append(this.layerRow);
|
6201 |
-
this.$.trigger('layerIndexed', targetIndex);
|
6202 |
};
|
6203 |
|
6204 |
-
|
6205 |
-
this.layerEditor.selectLayer(this, true);
|
6206 |
-
};
|
6207 |
|
6208 |
-
Layer.prototype.positionSidebar = function () {
|
6209 |
-
this.layerEditor.panel.show(this, this.layer);
|
6210 |
}
|
6211 |
|
6212 |
-
|
6213 |
-
this.layerEditor.panel._show();
|
6214 |
}
|
6215 |
|
6216 |
-
/**
|
6217 |
-
*
|
6218 |
-
* @param item {optional}
|
6219 |
-
*/
|
6220 |
-
Layer.prototype.activate = function (e, context, preventExitFromSelection) {
|
6221 |
|
6222 |
-
|
6223 |
-
if (document.activeElement) {
|
6224 |
-
document.activeElement.blur();
|
6225 |
-
}
|
6226 |
-
if (e && (e.ctrlKey || e.metaKey) && this.layerEditor.layerList[this.layerEditor.activeLayerIndex]) {
|
6227 |
-
this.select();
|
6228 |
-
return;
|
6229 |
-
} else {
|
6230 |
-
if (e && e.which == 3 && this.layerEditor.selectMode) {
|
6231 |
-
return;
|
6232 |
-
}
|
6233 |
|
6234 |
-
|
6235 |
-
this.layerEditor.exitSelectMode();
|
6236 |
-
}
|
6237 |
-
}
|
6238 |
|
6239 |
-
|
6240 |
-
this.positionSidebar();
|
6241 |
-
}
|
6242 |
|
6243 |
-
|
6244 |
-
console.error('The layer do not have item on it!');
|
6245 |
-
} else {
|
6246 |
-
this.items[0].activate(null, context);
|
6247 |
-
}
|
6248 |
|
6249 |
-
|
6250 |
-
|
6251 |
-
|
6252 |
-
|
6253 |
-
this.layer.addClass('n2-active');
|
6254 |
-
this.layer.triggerHandler('n2-ss-activate');
|
6255 |
-
this.layerEditor.changeActiveLayer(currentIndex, preventExitFromSelection);
|
6256 |
-
nextend.activeLayer = this.layer;
|
6257 |
|
6258 |
|
6259 |
-
|
|
|
|
|
|
|
6260 |
}
|
6261 |
-
};
|
6262 |
|
6263 |
-
|
6264 |
-
this.layer.removeClass('n2-active');
|
6265 |
-
this.layerRow.removeClass('n2-active');
|
6266 |
-
this.layer.triggerHandler('n2-ss-deactivate');
|
6267 |
-
};
|
6268 |
|
6269 |
-
|
6270 |
-
|
|
|
|
|
6271 |
|
6272 |
-
|
6273 |
-
|
6274 |
|
6275 |
-
|
6276 |
-
var resized = false;
|
6277 |
-
for (var i = 0; i < this.items.length; i++) {
|
6278 |
-
resized = this.items[i].parser.fitLayer(this.items[i]);
|
6279 |
-
if (resized) {
|
6280 |
-
break;
|
6281 |
-
}
|
6282 |
-
}
|
6283 |
-
if (!resized) {
|
6284 |
-
this.setProperty('width', 'auto', 'layer');
|
6285 |
-
this.setProperty('height', 'auto', 'layer');
|
6286 |
|
6287 |
-
|
6288 |
-
|
6289 |
-
|
6290 |
-
|
6291 |
-
}
|
6292 |
-
}
|
6293 |
-
};
|
6294 |
-
/*
|
6295 |
-
Layer.prototype.switchToAnimation = function () {
|
6296 |
-
smartSlider.sidebarManager.switchTab('animations');
|
6297 |
-
};
|
6298 |
-
*/
|
6299 |
-
Layer.prototype.hide = function (targetMode) {
|
6300 |
-
this.store(false, (targetMode ? targetMode : this.getMode()), 0, true);
|
6301 |
-
};
|
6302 |
|
6303 |
-
|
6304 |
-
this.
|
6305 |
-
};
|
6306 |
|
|
|
6307 |
|
6308 |
-
|
6309 |
|
6310 |
-
|
6311 |
-
status = LAYER_STATUS.NORMAL;
|
6312 |
-
}
|
6313 |
|
6314 |
-
|
6315 |
-
case LAYER_STATUS.HIDDEN:
|
6316 |
-
this.layer.css('visibility', '');
|
6317 |
-
this.layerRow.removeClass('n2-ss-layer-status-hidden');
|
6318 |
-
break;
|
6319 |
-
case LAYER_STATUS.LOCKED:
|
6320 |
-
this.layer.nextenddraggable("enable");
|
6321 |
-
this.layer.nextendResizable("enable");
|
6322 |
-
this.layer.removeClass('n2-ss-layer-locked');
|
6323 |
-
this.layerRow.removeClass('n2-ss-layer-status-locked');
|
6324 |
-
break;
|
6325 |
-
}
|
6326 |
-
this.status = status;
|
6327 |
|
6328 |
-
|
6329 |
-
|
6330 |
-
|
6331 |
-
this.layerRow.addClass('n2-ss-layer-status-hidden');
|
6332 |
-
break;
|
6333 |
-
case LAYER_STATUS.LOCKED:
|
6334 |
-
this.layer.nextenddraggable("disable");
|
6335 |
-
this.layer.nextendResizable("disable");
|
6336 |
-
this.layer.addClass('n2-ss-layer-locked');
|
6337 |
-
this.layerRow.addClass('n2-ss-layer-status-locked');
|
6338 |
-
break;
|
6339 |
}
|
6340 |
-
}
|
6341 |
|
6342 |
-
Layer.prototype.setStatusNormal = function () {
|
6343 |
-
this.changeStatus(LAYER_STATUS.NORMAL);
|
6344 |
-
};
|
6345 |
|
6346 |
-
|
6347 |
-
|
6348 |
-
|
|
|
6349 |
|
6350 |
-
|
6351 |
-
|
6352 |
-
|
6353 |
-
|
|
|
|
|
6354 |
};
|
6355 |
|
6356 |
-
|
6357 |
-
|
|
|
|
|
|
|
|
|
6358 |
|
6359 |
-
|
6360 |
-
if (
|
6361 |
-
|
6362 |
-
layer.attr('id', id);
|
6363 |
}
|
|
|
|
|
6364 |
|
6365 |
-
|
6366 |
-
|
|
|
|
|
|
|
|
|
6367 |
}
|
|
|
6368 |
|
6369 |
-
|
6370 |
-
|
6371 |
-
|
|
|
|
|
|
|
|
|
6372 |
}
|
|
|
|
|
|
|
|
|
|
|
6373 |
|
6374 |
-
|
|
|
|
|
6375 |
|
6376 |
-
|
6377 |
-
|
6378 |
-
} else {
|
6379 |
-
newLayers.push(newLayer);
|
6380 |
-
}
|
6381 |
|
6382 |
-
|
|
|
6383 |
|
6384 |
-
|
|
|
|
|
|
|
6385 |
|
6386 |
-
|
6387 |
-
|
|
|
|
|
|
|
6388 |
}
|
|
|
6389 |
|
|
|
6390 |
|
6391 |
-
|
6392 |
-
|
6393 |
-
|
6394 |
-
}, this));
|
6395 |
-
}
|
6396 |
};
|
6397 |
|
6398 |
-
|
6399 |
-
|
6400 |
-
if (this.layerEditor.getSelectedLayer() == this) {
|
6401 |
-
this.layerEditor.panel.hide();
|
6402 |
-
}
|
6403 |
|
6404 |
-
|
6405 |
-
return [this, 'deleteLayer', 'delete', 'create', [this.group, this.getData({
|
6406 |
-
layersIncluded: true,
|
6407 |
-
itemsIncluded: true
|
6408 |
-
})]];
|
6409 |
-
}, this));
|
6410 |
|
6411 |
-
this.
|
6412 |
|
6413 |
-
|
6414 |
-
|
6415 |
-
}
|
6416 |
|
6417 |
-
|
|
|
|
|
6418 |
|
6419 |
-
|
6420 |
-
|
6421 |
-
this.unSubscribeParent(true);
|
6422 |
}
|
6423 |
-
|
6424 |
-
this.layer.trigger('mouseup');
|
6425 |
|
6426 |
-
|
|
|
|
|
6427 |
|
6428 |
-
|
6429 |
-
if (typeof oldLayers === 'undefined') {
|
6430 |
-
oldLayers = [];
|
6431 |
} else {
|
6432 |
-
|
|
|
|
|
6433 |
}
|
6434 |
-
|
6435 |
-
|
6436 |
-
this.layerRow.remove();
|
6437 |
-
|
6438 |
-
|
6439 |
-
this.$.trigger('layerDeleted');
|
6440 |
|
6441 |
-
|
6442 |
-
|
6443 |
-
|
|
|
|
|
6444 |
};
|
6445 |
|
6446 |
-
Layer.prototype.getHTML = function (itemsIncluded, base64) {
|
6447 |
-
var layer = $('<div class="n2-ss-layer"></div>')
|
6448 |
-
.attr('style', this.getStyleText());
|
6449 |
|
6450 |
-
|
6451 |
-
|
6452 |
-
|
6453 |
-
}
|
6454 |
-
}
|
6455 |
|
6456 |
-
|
6457 |
-
for (var k2 in this.deviceProperty[k]) {
|
6458 |
-
layer.attr('data-' + k.toLowerCase() + k2, this.deviceProperty[k][k2]);
|
6459 |
-
}
|
6460 |
-
}
|
6461 |
|
6462 |
-
|
6463 |
-
position: 'absolute',
|
6464 |
-
zIndex: this.zIndex + 1
|
6465 |
-
});
|
6466 |
|
6467 |
-
|
6468 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6469 |
}
|
|
|
6470 |
|
6471 |
-
|
6472 |
-
|
6473 |
-
|
6474 |
-
|
6475 |
-
|
6476 |
-
|
6477 |
-
|
6478 |
-
|
6479 |
-
|
6480 |
|
6481 |
-
|
6482 |
-
|
|
|
|
|
|
|
|
|
6483 |
}
|
6484 |
|
6485 |
-
return layer;
|
6486 |
};
|
6487 |
|
6488 |
-
|
6489 |
-
var layer = {
|
6490 |
-
zIndex: (this.zIndex + 1)
|
6491 |
-
};
|
6492 |
|
6493 |
-
|
6494 |
-
|
6495 |
-
}
|
6496 |
-
for (var k in this.property) {
|
6497 |
-
switch (k) {
|
6498 |
-
case 'width':
|
6499 |
-
case 'height':
|
6500 |
-
case 'left':
|
6501 |
-
case 'top':
|
6502 |
-
case 'align':
|
6503 |
-
case 'valign':
|
6504 |
-
case 'parentalign':
|
6505 |
-
case 'parentvalign':
|
6506 |
-
case 'fontsize':
|
6507 |
-
break;
|
6508 |
-
default:
|
6509 |
-
layer[k.toLowerCase()] = this.property[k];
|
6510 |
-
}
|
6511 |
}
|
6512 |
|
6513 |
-
|
6514 |
-
|
6515 |
-
for (var property in this.deviceProperty[device]) {
|
6516 |
-
var value = this.deviceProperty[device][property];
|
6517 |
-
if (typeof value === 'undefined') {
|
6518 |
-
continue;
|
6519 |
-
}
|
6520 |
-
if (!(property == 'width' && this.isDimensionPropertyAccepted(value)) && !(property == 'height' && this.isDimensionPropertyAccepted(value)) && property != 'align' && property != 'valign' && property != 'parentalign' && property != 'parentvalign') {
|
6521 |
-
value = parseFloat(value);
|
6522 |
-
}
|
6523 |
-
layer[device.toLowerCase() + property] = value;
|
6524 |
-
}
|
6525 |
}
|
6526 |
|
6527 |
-
|
6528 |
-
|
6529 |
-
|
6530 |
-
layer.items.push(this.items[i].getData());
|
6531 |
}
|
6532 |
}
|
6533 |
-
return layer;
|
6534 |
};
|
6535 |
|
6536 |
-
|
6537 |
-
|
6538 |
-
layersIncluded: true,
|
6539 |
-
itemsIncluded: true
|
6540 |
-
}));
|
6541 |
-
this.layer.triggerHandler('LayerGetDataWithChildren', [layers]);
|
6542 |
-
return layers;
|
6543 |
};
|
6544 |
|
6545 |
-
|
6546 |
-
|
6547 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6548 |
|
6549 |
-
|
6550 |
-
|
6551 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6552 |
};
|
6553 |
|
6554 |
-
|
6555 |
-
|
6556 |
-
item.appendTo(this.layer);
|
6557 |
-
}
|
6558 |
-
new NextendSmartSliderItem(item, this, this.itemEditor);
|
6559 |
};
|
6560 |
-
/*
|
6561 |
-
Layer.prototype.editName = function () {
|
6562 |
-
var input = new NextendSmartSliderAdminInlineField();
|
6563 |
|
6564 |
-
|
6565 |
-
|
6566 |
-
|
6567 |
-
|
6568 |
-
}, this),
|
6569 |
-
cancel: $.proxy(function () {
|
6570 |
-
this.layerTitleSpan.css('display', '');
|
6571 |
-
}, this)
|
6572 |
-
});
|
6573 |
|
6574 |
-
|
6575 |
-
|
6576 |
|
6577 |
-
|
6578 |
-
*/
|
6579 |
-
Layer.prototype.rename = function (newName, force) {
|
6580 |
|
6581 |
-
|
6582 |
|
6583 |
-
|
6584 |
-
this.property.nameSynced = 0;
|
6585 |
-
}
|
6586 |
|
6587 |
-
|
6588 |
-
|
6589 |
-
|
6590 |
-
|
6591 |
-
|
6592 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6593 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6594 |
}
|
6595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6596 |
}
|
6597 |
-
newName = newName.substr(0, 35);
|
6598 |
-
if (this.property.name != newName) {
|
6599 |
-
this.property.name = newName;
|
6600 |
-
this.layerTitleSpan.html(newName);
|
6601 |
|
6602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6603 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
6604 |
}
|
|
|
|
|
6605 |
};
|
6606 |
|
6607 |
-
|
6608 |
-
|
6609 |
-
|
6610 |
-
|
6611 |
-
|
6612 |
-
|
6613 |
-
|
6614 |
-
|
6615 |
-
|
6616 |
-
|
6617 |
-
|
6618 |
-
|
6619 |
-
|
6620 |
-
|
6621 |
-
|
6622 |
-
|
6623 |
-
|
6624 |
-
|
6625 |
-
|
6626 |
-
|
6627 |
-
|
6628 |
-
|
6629 |
-
|
6630 |
-
|
6631 |
-
|
6632 |
-
|
6633 |
-
|
6634 |
-
|
6635 |
-
|
6636 |
-
|
6637 |
-
|
6638 |
-
|
6639 |
-
|
6640 |
-
|
6641 |
-
|
6642 |
|
6643 |
-
|
6644 |
-
|
6645 |
-
|
6646 |
-
if (v != value) {
|
6647 |
-
this.$.trigger('propertyChanged', [name, v]);
|
6648 |
-
}
|
6649 |
-
}
|
6650 |
-
this.storeWithModifier(name, v, ratioSizeH, true);
|
6651 |
-
this._resize(false);
|
6652 |
-
break;
|
6653 |
-
case 'height':
|
6654 |
-
var ratioSizeV = this.layerEditor.getResponsiveRatio('v')
|
6655 |
-
if (!parseInt(this.getProperty(false, 'responsivesize'))) {
|
6656 |
-
ratioSizeV = 1;
|
6657 |
-
}
|
6658 |
|
6659 |
-
|
6660 |
-
|
6661 |
-
v = ~~value;
|
6662 |
-
if (v != value) {
|
6663 |
-
this.$.trigger('propertyChanged', [name, v]);
|
6664 |
-
}
|
6665 |
-
}
|
6666 |
|
6667 |
-
|
6668 |
-
this._resize(false);
|
6669 |
-
break;
|
6670 |
-
case 'left':
|
6671 |
-
var ratioPositionH = this.layerEditor.getResponsiveRatio('h')
|
6672 |
-
if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
|
6673 |
-
ratioPositionH = 1;
|
6674 |
-
}
|
6675 |
|
6676 |
-
|
6677 |
-
|
6678 |
-
|
6679 |
-
|
|
|
6680 |
|
6681 |
-
|
6682 |
-
break;
|
6683 |
-
case 'top':
|
6684 |
-
var ratioPositionV = this.layerEditor.getResponsiveRatio('v')
|
6685 |
-
if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
|
6686 |
-
ratioPositionV = 1;
|
6687 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6688 |
|
6689 |
-
var v = ~~value;
|
6690 |
-
if (v != value) {
|
6691 |
-
this.$.trigger('propertyChanged', [name, v]);
|
6692 |
-
}
|
6693 |
|
6694 |
-
|
6695 |
-
|
6696 |
-
|
6697 |
-
|
6698 |
-
|
6699 |
-
|
6700 |
-
|
6701 |
-
|
6702 |
-
|
6703 |
-
this.store(false, 'tabletPortrait', parseInt(value), true);
|
6704 |
-
break;
|
6705 |
-
case 'showFieldTabletLandscape':
|
6706 |
-
this.store(false, 'tabletLandscape', parseInt(value), true);
|
6707 |
-
break;
|
6708 |
-
case 'showFieldMobilePortrait':
|
6709 |
-
this.store(false, 'mobilePortrait', parseInt(value), true);
|
6710 |
-
break;
|
6711 |
-
case 'showFieldMobileLandscape':
|
6712 |
-
this.store(false, 'mobileLandscape', parseInt(value), true);
|
6713 |
-
break;
|
6714 |
-
}
|
6715 |
|
6716 |
-
|
6717 |
-
|
6718 |
-
|
6719 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6720 |
};
|
6721 |
|
6722 |
-
|
6723 |
-
|
6724 |
-
|
|
|
|
|
|
|
|
|
6725 |
|
6726 |
-
|
6727 |
-
|
6728 |
-
|
6729 |
} else {
|
6730 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6731 |
}
|
6732 |
};
|
6733 |
|
6734 |
-
|
6735 |
-
this.
|
6736 |
-
|
6737 |
-
if (value && value != '') {
|
6738 |
-
this.layer.addClass(value);
|
6739 |
}
|
6740 |
-
|
|
|
6741 |
|
6742 |
-
|
6743 |
-
|
6744 |
-
|
6745 |
-
|
6746 |
-
this.layer.attr('id', value);
|
6747 |
}
|
6748 |
-
|
|
|
6749 |
|
6750 |
-
|
6751 |
-
var
|
6752 |
-
|
6753 |
-
|
6754 |
-
|
6755 |
-
},
|
6756 |
-
LayerParent: function () {
|
6757 |
-
that.layer.addClass('n2-ss-layer-parent');
|
6758 |
-
that.layer.triggerHandler('LayerParent');
|
6759 |
-
},
|
6760 |
-
LayerUnParent: function () {
|
6761 |
-
that.layer.removeClass('n2-ss-layer-parent');
|
6762 |
-
that.layer.triggerHandler('LayerUnParent');
|
6763 |
-
},
|
6764 |
-
LayerDeleted: function (e, deleteChild, oldLayers) {
|
6765 |
-
if (deleteChild) {
|
6766 |
-
that.delete(deleteChild, oldLayers);
|
6767 |
-
} else {
|
6768 |
-
that.setProperty('parentid', '', 'layer');
|
6769 |
-
}
|
6770 |
-
},
|
6771 |
-
LayerDuplicated: function (e, newParentId, newLayers) {
|
6772 |
-
that.duplicate(false, newParentId, newLayers);
|
6773 |
-
},
|
6774 |
-
LayerShowChange: function (e, mode, value) {
|
6775 |
-
if (that.getMode() == mode) {
|
6776 |
-
that.parentIsVisible = value;
|
6777 |
-
}
|
6778 |
-
},
|
6779 |
-
'n2-ss-activate': function () {
|
6780 |
-
that.layerRow.addClass('n2-parent-active');
|
6781 |
-
},
|
6782 |
-
'n2-ss-deactivate': function () {
|
6783 |
-
that.layerRow.removeClass('n2-parent-active');
|
6784 |
-
},
|
6785 |
-
'LayerGetDataWithChildren': function (e, layers) {
|
6786 |
-
that.getDataWithChildren(layers);
|
6787 |
}
|
6788 |
-
};
|
6789 |
-
this.parent = n2('#' + this.property.parentid).on(this.subscribeParentCallbacks);
|
6790 |
-
this.layer.addClass('n2-ss-layer-has-parent');
|
6791 |
-
};
|
6792 |
-
|
6793 |
-
Layer.prototype.unSubscribeParent = function (isDelete) {
|
6794 |
-
this.layerRow.removeClass('n2-parent-active');
|
6795 |
-
this.layer.removeClass('n2-ss-layer-has-parent');
|
6796 |
-
if (this.parent) {
|
6797 |
-
this.parent.off(this.subscribeParentCallbacks);
|
6798 |
-
}
|
6799 |
-
this.parent = false;
|
6800 |
-
this.subscribeParentCallbacks = {};
|
6801 |
-
if (!isDelete) {
|
6802 |
-
var position = this.layer.position();
|
6803 |
-
this.setPosition(position.left, position.top);
|
6804 |
}
|
6805 |
-
};
|
6806 |
|
6807 |
-
|
6808 |
-
if (e) e.preventDefault();
|
6809 |
-
this.setProperty('parentid', '', 'layer');
|
6810 |
-
};
|
6811 |
|
6812 |
-
|
6813 |
-
|
|
|
|
|
6814 |
|
6815 |
-
|
6816 |
-
|
6817 |
-
this.setProperty('parentalign', parentAlign, 'layer');
|
6818 |
-
this.setProperty('parentvalign', parentValign, 'layer');
|
6819 |
|
6820 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6821 |
|
6822 |
-
|
6823 |
-
for (var device in this.deviceProperty) {
|
6824 |
-
if (device == 'desktopPortrait') continue;
|
6825 |
-
this.deviceProperty[device].left = undef;
|
6826 |
-
this.deviceProperty[device].top = undef;
|
6827 |
-
this.deviceProperty[device].valign = undef;
|
6828 |
-
this.deviceProperty[device].align = undef;
|
6829 |
}
|
|
|
6830 |
};
|
6831 |
|
6832 |
-
|
6833 |
-
|
6834 |
-
|
6835 |
-
|
6836 |
-
|
6837 |
-
if (
|
6838 |
-
this.
|
6839 |
-
} else {
|
6840 |
-
this.layer.attr('data-parentid', value).addClass('n2-ss-layer-has-parent');
|
6841 |
-
this.subscribeParent();
|
6842 |
-
this.setPosition(this.layer.position().left, this.layer.position().top);
|
6843 |
}
|
6844 |
-
|
6845 |
-
|
|
|
|
|
|
|
|
|
|
|
6846 |
|
6847 |
-
|
6848 |
-
|
6849 |
-
|
6850 |
-
|
6851 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6852 |
}
|
6853 |
};
|
6854 |
|
6855 |
-
|
6856 |
-
|
6857 |
-
|
6858 |
-
|
6859 |
-
|
|
|
6860 |
}
|
6861 |
-
}
|
6862 |
|
6863 |
-
|
6864 |
-
this.
|
6865 |
-
};
|
6866 |
|
6867 |
-
|
6868 |
-
|
6869 |
-
|
6870 |
-
}
|
6871 |
|
6872 |
-
|
6873 |
-
|
6874 |
-
|
6875 |
-
|
6876 |
-
mask = $("<div class='n2-ss-layer-mask'></div>").appendTo(this.layer);
|
6877 |
-
var rotationMask = this.layer.find('.n2-ss-layer-rotation');
|
6878 |
-
if (rotationMask.length) {
|
6879 |
-
rotationMask.appendTo(mask);
|
6880 |
-
} else {
|
6881 |
-
for (var i = 0; i < this.items.length; i++) {
|
6882 |
-
mask.append(this.items[i].item);
|
6883 |
-
}
|
6884 |
-
}
|
6885 |
-
}
|
6886 |
-
} else {
|
6887 |
-
if (mask.length) {
|
6888 |
-
var rotationMask = this.layer.find('.n2-ss-layer-rotation');
|
6889 |
-
if (rotationMask.length) {
|
6890 |
-
rotationMask.appendTo(this.layer);
|
6891 |
-
} else {
|
6892 |
-
for (var i = 0; i < this.items.length; i++) {
|
6893 |
-
this.layer.append(this.items[i].item);
|
6894 |
-
}
|
6895 |
-
}
|
6896 |
-
mask.remove();
|
6897 |
-
}
|
6898 |
-
}
|
6899 |
-
this.layer.css('overflow', value);
|
6900 |
-
};
|
6901 |
|
6902 |
-
|
|
|
|
|
|
|
6903 |
|
6904 |
-
|
6905 |
-
|
6906 |
-
|
6907 |
-
|
6908 |
-
|
6909 |
-
|
6910 |
-
|
6911 |
-
|
6912 |
-
|
6913 |
-
|
6914 |
-
|
6915 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6916 |
} else {
|
6917 |
-
if (
|
6918 |
-
|
6919 |
-
|
6920 |
-
|
6921 |
-
|
6922 |
-
|
6923 |
-
NextendTween.set(rotationMask, {
|
6924 |
-
rotationZ: 0
|
6925 |
-
});
|
6926 |
}
|
6927 |
-
this.layer.data('rotation', 0);
|
6928 |
}
|
6929 |
-
};
|
6930 |
|
6931 |
-
|
|
|
|
|
|
|
6932 |
|
6933 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6934 |
|
6935 |
-
|
6936 |
-
|
6937 |
-
this.setPosition(this.layer.position().left, this.layer.position().top);
|
6938 |
}
|
6939 |
-
this.
|
|
|
6940 |
};
|
6941 |
|
6942 |
-
|
6943 |
-
|
6944 |
-
|
|
|
6945 |
}
|
6946 |
-
this.layer.
|
|
|
|
|
6947 |
};
|
6948 |
|
6949 |
-
|
6950 |
-
|
6951 |
-
|
|
|
|
|
|
|
6952 |
|
6953 |
-
|
6954 |
-
|
6955 |
-
};
|
6956 |
|
6957 |
-
|
6958 |
-
|
6959 |
-
|
6960 |
-
|
6961 |
-
|
6962 |
-
|
6963 |
-
|
6964 |
-
|
6965 |
-
|
6966 |
-
|
6967 |
-
|
6968 |
-
|
6969 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6970 |
|
6971 |
-
Layer.prototype._syncgeneratorvisible = function (value) {
|
6972 |
};
|
6973 |
|
6974 |
-
|
6975 |
-
|
6976 |
-
|
6977 |
-
|
6978 |
-
|
6979 |
-
|
6980 |
-
right: -value + 'px'
|
6981 |
-
});
|
6982 |
-
break;
|
6983 |
-
case 'center':
|
6984 |
-
this.layer.css({
|
6985 |
-
left: (this.layer.parent().width() / 2 + value - this.layer.width() / 2) + 'px',
|
6986 |
-
right: 'auto'
|
6987 |
-
});
|
6988 |
-
break;
|
6989 |
-
default:
|
6990 |
-
this.layer.css({
|
6991 |
-
left: value + 'px',
|
6992 |
-
right: 'auto'
|
6993 |
-
});
|
6994 |
-
}
|
6995 |
-
} else {
|
6996 |
-
var position = this.parent.position(),
|
6997 |
-
align = this.getProperty(true, 'align'),
|
6998 |
-
parentAlign = this.getProperty(true, 'parentalign'),
|
6999 |
-
left = 0;
|
7000 |
-
switch (parentAlign) {
|
7001 |
-
case 'right':
|
7002 |
-
left = position.left + this.parent.width();
|
7003 |
-
break;
|
7004 |
-
case 'center':
|
7005 |
-
left = position.left + this.parent.width() / 2;
|
7006 |
-
break;
|
7007 |
-
default:
|
7008 |
-
left = position.left;
|
7009 |
}
|
7010 |
|
7011 |
-
|
7012 |
-
|
7013 |
-
this.
|
7014 |
-
|
7015 |
-
|
7016 |
-
|
7017 |
-
|
7018 |
-
case 'center':
|
7019 |
-
this.layer.css({
|
7020 |
-
left: (left + value - this.layer.width() / 2) + 'px',
|
7021 |
-
right: 'auto'
|
7022 |
-
});
|
7023 |
-
break;
|
7024 |
-
default:
|
7025 |
-
this.layer.css({
|
7026 |
-
left: (left + value) + 'px',
|
7027 |
-
right: 'auto'
|
7028 |
-
});
|
7029 |
}
|
|
|
|
|
|
|
|
|
7030 |
|
|
|
|
|
7031 |
}
|
7032 |
-
|
7033 |
-
this.triggerLayerResized();
|
7034 |
};
|
7035 |
|
7036 |
-
|
7037 |
-
|
7038 |
-
|
7039 |
-
|
7040 |
-
this.layer.css({
|
7041 |
-
top: 'auto',
|
7042 |
-
bottom: -value + 'px'
|
7043 |
-
});
|
7044 |
-
break;
|
7045 |
-
case 'middle':
|
7046 |
-
this.layer.css({
|
7047 |
-
top: (this.layer.parent().height() / 2 + value - this.layer.height() / 2) + 'px',
|
7048 |
-
bottom: 'auto'
|
7049 |
-
});
|
7050 |
-
break;
|
7051 |
-
default:
|
7052 |
-
this.layer.css({
|
7053 |
-
top: value + 'px',
|
7054 |
-
bottom: 'auto'
|
7055 |
-
});
|
7056 |
-
}
|
7057 |
-
} else {
|
7058 |
-
var position = this.parent.position(),
|
7059 |
-
valign = this.getProperty(true, 'valign'),
|
7060 |
-
parentVAlign = this.getProperty(true, 'parentvalign'),
|
7061 |
-
top = 0;
|
7062 |
-
switch (parentVAlign) {
|
7063 |
-
case 'bottom':
|
7064 |
-
top = position.top + this.parent.height();
|
7065 |
-
break;
|
7066 |
-
case 'middle':
|
7067 |
-
top = position.top + this.parent.height() / 2;
|
7068 |
-
break;
|
7069 |
-
default:
|
7070 |
-
top = position.top;
|
7071 |
-
}
|
7072 |
|
7073 |
-
|
7074 |
-
case 'bottom':
|
7075 |
-
this.layer.css({
|
7076 |
-
top: 'auto',
|
7077 |
-
bottom: (this.layer.parent().height() - top - value) + 'px'
|
7078 |
-
});
|
7079 |
-
break;
|
7080 |
-
case 'middle':
|
7081 |
-
this.layer.css({
|
7082 |
-
top: (top + value - this.layer.height() / 2) + 'px',
|
7083 |
-
bottom: 'auto'
|
7084 |
-
});
|
7085 |
-
break;
|
7086 |
-
default:
|
7087 |
-
this.layer.css({
|
7088 |
-
top: (top + value) + 'px',
|
7089 |
-
bottom: 'auto'
|
7090 |
-
});
|
7091 |
-
}
|
7092 |
-
}
|
7093 |
|
7094 |
-
|
7095 |
-
};
|
7096 |
|
7097 |
-
|
7098 |
-
this.
|
7099 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7100 |
|
7101 |
-
|
7102 |
-
this.layer.css('
|
|
|
|
|
7103 |
};
|
7104 |
|
7105 |
-
|
7106 |
-
|
|
|
|
|
|
|
|
|
7107 |
};
|
7108 |
|
7109 |
-
Layer.prototype._syncresponsivesize = function (value) {
|
7110 |
-
this._resize(false);
|
7111 |
-
};
|
7112 |
|
7113 |
-
|
|
|
7114 |
this.__syncShowOnDevice('desktopPortrait', value);
|
7115 |
};
|
7116 |
|
7117 |
-
|
|
|
7118 |
this.__syncShowOnDevice('desktopLandscape', value);
|
7119 |
};
|
7120 |
|
7121 |
-
|
|
|
7122 |
this.__syncShowOnDevice('tabletPortrait', value);
|
7123 |
};
|
7124 |
|
7125 |
-
|
|
|
7126 |
this.__syncShowOnDevice('tabletLandscape', value);
|
7127 |
};
|
7128 |
|
7129 |
-
|
|
|
7130 |
this.__syncShowOnDevice('mobilePortrait', value);
|
7131 |
};
|
7132 |
|
7133 |
-
|
|
|
7134 |
this.__syncShowOnDevice('mobileLandscape', value);
|
7135 |
};
|
7136 |
|
7137 |
-
|
7138 |
if (this.getMode() == mode) {
|
7139 |
var value = parseInt(value);
|
7140 |
if (value) {
|
@@ -7143,3038 +10434,3355 @@ if (!Array.prototype.filter) {
|
|
7143 |
this._hide();
|
7144 |
}
|
7145 |
this.layer.triggerHandler('LayerShowChange', [mode, value]);
|
7146 |
-
this.triggerLayerResized
|
7147 |
}
|
7148 |
};
|
7149 |
|
7150 |
-
|
7151 |
-
|
7152 |
-
|
7153 |
-
|
7154 |
-
Layer.prototype._syncpause =
|
7155 |
-
Layer.prototype._syncstop = function () {
|
7156 |
-
};
|
7157 |
|
7158 |
-
|
7159 |
-
|
7160 |
-
this.
|
7161 |
-
};
|
7162 |
|
7163 |
-
|
7164 |
|
7165 |
-
|
7166 |
-
|
7167 |
-
|
7168 |
-
|
7169 |
-
|
7170 |
-
|
7171 |
-
|
7172 |
-
|
7173 |
-
|
7174 |
-
|
7175 |
-
|
7176 |
-
|
7177 |
-
|
7178 |
-
|
7179 |
-
|
7180 |
-
|
7181 |
-
|
7182 |
-
|
7183 |
-
|
7184 |
-
|
7185 |
-
|
7186 |
-
|
7187 |
-
|
7188 |
-
|
7189 |
-
|
7190 |
-
|
7191 |
-
|
7192 |
-
|
7193 |
-
|
7194 |
-
|
7195 |
-
|
7196 |
-
|
7197 |
-
|
7198 |
-
|
7199 |
-
|
7200 |
-
|
7201 |
-
|
7202 |
-
|
7203 |
-
|
7204 |
-
|
7205 |
-
|
7206 |
-
|
7207 |
-
|
7208 |
-
|
7209 |
-
|
7210 |
-
|
7211 |
-
|
7212 |
-
|
7213 |
-
|
7214 |
-
|
7215 |
-
|
7216 |
-
|
7217 |
-
|
7218 |
-
|
7219 |
-
|
7220 |
-
|
7221 |
-
|
7222 |
-
|
7223 |
-
|
7224 |
-
|
7225 |
-
|
7226 |
-
|
7227 |
-
|
7228 |
-
|
7229 |
-
|
7230 |
-
|
7231 |
-
|
7232 |
-
|
7233 |
-
|
7234 |
-
|
7235 |
-
|
7236 |
-
|
7237 |
-
|
7238 |
-
|
7239 |
-
|
7240 |
-
|
7241 |
-
|
7242 |
-
|
7243 |
-
|
7244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7245 |
};
|
7246 |
|
7247 |
-
|
7248 |
-
|
7249 |
-
|
7250 |
-
|
7251 |
-
|
7252 |
-
if (this._resizableJustClick) {
|
7253 |
-
this._resizableJustClick = false;
|
7254 |
-
}
|
7255 |
-
this.____makeLayerResizeableResize(event, ui);
|
7256 |
-
this.layerEditor.positionDisplay.addClass('n2-active');
|
7257 |
};
|
7258 |
|
7259 |
-
|
7260 |
-
|
7261 |
-
|
7262 |
-
|
7263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7264 |
})
|
7265 |
-
.
|
7266 |
-
this.triggerLayerResized();
|
7267 |
-
};
|
7268 |
|
7269 |
-
|
7270 |
-
|
7271 |
-
|
7272 |
-
|
7273 |
-
|
7274 |
-
|
7275 |
-
|
|
|
|
|
|
|
7276 |
|
7277 |
-
|
7278 |
-
|
7279 |
-
|
7280 |
-
|
7281 |
-
|
7282 |
-
|
7283 |
-
|
7284 |
-
|
|
|
|
|
|
|
7285 |
|
7286 |
-
|
7287 |
-
|
7288 |
-
|
7289 |
-
if (this.isDimensionPropertyAccepted(currentValue)) {
|
7290 |
-
isAutoHeight = true;
|
7291 |
-
this['_syncheight'](currentValue);
|
7292 |
-
}
|
7293 |
-
}
|
7294 |
-
this.setPosition(ui.position.left, ui.position.top);
|
7295 |
|
|
|
|
|
|
|
|
|
7296 |
|
7297 |
-
|
7298 |
-
ratioSizeV = this.layerEditor.getResponsiveRatio('v');
|
7299 |
|
7300 |
-
|
7301 |
-
ratioSizeH = ratioSizeV = 1;
|
7302 |
-
}
|
7303 |
|
7304 |
-
|
7305 |
-
|
7306 |
-
|
7307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7308 |
}
|
7309 |
-
if (
|
7310 |
-
|
7311 |
-
|
7312 |
-
this
|
7313 |
}
|
7314 |
-
this.triggerLayerResized();
|
7315 |
|
7316 |
-
this.layer.
|
7317 |
|
7318 |
-
|
|
|
|
|
7319 |
|
7320 |
-
|
7321 |
-
|
7322 |
-
}, 80);
|
7323 |
|
7324 |
-
//this.layerEditor.panel.positionMenu(this.layer);
|
7325 |
-
};
|
7326 |
-
//</editor-fold>
|
7327 |
|
7328 |
-
|
|
|
7329 |
|
7330 |
-
|
7331 |
-
* Add draggable handles to the specified layer
|
7332 |
-
* @param layer
|
7333 |
-
* @private
|
7334 |
-
*/
|
7335 |
-
Layer.prototype.___makeLayerDraggable = function () {
|
7336 |
|
7337 |
-
this.
|
7338 |
-
|
7339 |
-
|
7340 |
-
|
7341 |
-
stop: $.proxy(this.____makeLayerDraggableStop, this),
|
7342 |
-
smartguides: $.proxy(function () {
|
7343 |
-
this.layer.triggerHandler('LayerParent');
|
7344 |
-
return this.layerEditor.getSnap();
|
7345 |
-
}, this),
|
7346 |
-
tolerance: 5
|
7347 |
-
});
|
7348 |
-
};
|
7349 |
|
7350 |
-
|
7351 |
-
preventActivation = true;
|
7352 |
-
this.draggableDeferred = $.Deferred();
|
7353 |
-
this.layerEditor.panel.hideWithDeferred(this.draggableDeferred);
|
7354 |
-
$('body').addClass('n2-ss-move-layer');
|
7355 |
|
7356 |
-
this.
|
|
|
7357 |
|
7358 |
-
this
|
7359 |
-
this.layerEditor.positionDisplay.addClass('n2-active');
|
7360 |
|
7361 |
-
|
7362 |
-
|
7363 |
-
|
|
|
|
|
|
|
|
|
7364 |
}
|
|
|
|
|
|
|
|
|
7365 |
|
7366 |
-
var
|
7367 |
-
if (
|
7368 |
-
this
|
7369 |
}
|
7370 |
-
};
|
7371 |
|
7372 |
-
|
7373 |
-
this.
|
7374 |
-
.css({
|
7375 |
-
left: e.pageX + 10,
|
7376 |
-
top: e.pageY + 10
|
7377 |
-
})
|
7378 |
-
.html('L: ' + parseInt(ui.position.left | 0) + 'px<br />T: ' + parseInt(ui.position.top | 0) + 'px');
|
7379 |
-
this.triggerLayerResized();
|
7380 |
|
7381 |
-
this.
|
7382 |
-
|
7383 |
|
7384 |
-
|
7385 |
-
window.nextendPreventClick = true;
|
7386 |
-
setTimeout(function () {
|
7387 |
-
window.nextendPreventClick = false;
|
7388 |
-
}, 50);
|
7389 |
-
$('body').removeClass('n2-ss-move-layer');
|
7390 |
-
this.draggableDeferred.resolve();
|
7391 |
|
7392 |
-
this.setPosition(ui.position.left, ui.position.top);
|
7393 |
|
7394 |
-
|
7395 |
-
if (this.isDimensionPropertyAccepted(currentValue)) {
|
7396 |
-
this['_syncwidth'](currentValue);
|
7397 |
-
}
|
7398 |
|
7399 |
-
|
7400 |
-
|
7401 |
-
this
|
7402 |
}
|
7403 |
|
7404 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7405 |
|
7406 |
-
this.layer.triggerHandler('LayerUnParent');
|
7407 |
-
this.layerEditor.positionDisplay.removeClass('n2-active');
|
7408 |
|
|
|
7409 |
|
7410 |
-
|
7411 |
-
if (!inMultipleSelection) {
|
7412 |
-
preventActivation = false;
|
7413 |
-
this.activate(event);
|
7414 |
-
} else {
|
7415 |
-
setTimeout(function () {
|
7416 |
-
preventActivation = false;
|
7417 |
-
}, 80);
|
7418 |
|
7419 |
-
|
7420 |
|
7421 |
-
|
7422 |
-
|
|
|
|
|
|
|
7423 |
|
7424 |
-
|
7425 |
-
this.
|
7426 |
-
|
7427 |
-
this.triggerLayerResized();
|
7428 |
-
};
|
7429 |
|
7430 |
-
|
7431 |
-
this.
|
7432 |
-
|
7433 |
-
this.triggerLayerResized();
|
7434 |
-
};
|
7435 |
|
7436 |
-
|
|
|
7437 |
|
7438 |
-
|
7439 |
-
|
|
|
7440 |
|
7441 |
-
if (
|
7442 |
-
|
7443 |
}
|
|
|
|
|
7444 |
|
7445 |
-
|
|
|
|
|
7446 |
|
7447 |
-
|
7448 |
-
|
7449 |
-
|
7450 |
-
leftMultiplier: 1,
|
7451 |
-
top: 0,
|
7452 |
-
topMultiplier: 1
|
7453 |
-
};
|
7454 |
-
if (!parent || !parent.is(':visible')) {
|
7455 |
-
parent = this.layer.parent();
|
7456 |
|
|
|
|
|
7457 |
|
7458 |
-
|
7459 |
-
case 'center':
|
7460 |
-
p.left += parent.width() / 2;
|
7461 |
-
break;
|
7462 |
-
case 'right':
|
7463 |
-
p.left += parent.width();
|
7464 |
-
break;
|
7465 |
-
}
|
7466 |
|
7467 |
-
|
7468 |
-
|
7469 |
-
|
7470 |
-
|
7471 |
-
|
7472 |
-
|
7473 |
-
break;
|
7474 |
-
}
|
7475 |
} else {
|
7476 |
-
var
|
7477 |
-
|
7478 |
-
|
7479 |
-
|
7480 |
-
|
7481 |
-
|
7482 |
-
|
7483 |
-
|
7484 |
-
|
7485 |
-
|
7486 |
-
|
7487 |
-
switch (this.getProperty(true, 'parentvalign')) {
|
7488 |
-
case 'bottom':
|
7489 |
-
p.top = position.top + parent.height();
|
7490 |
-
break;
|
7491 |
-
case 'middle':
|
7492 |
-
p.top = position.top + parent.height() / 2;
|
7493 |
-
break;
|
7494 |
-
default:
|
7495 |
-
p.top = position.top;
|
7496 |
}
|
7497 |
}
|
|
|
7498 |
|
|
|
|
|
|
|
|
|
|
|
7499 |
|
7500 |
-
|
7501 |
-
switch (this.getProperty(true, 'align')) {
|
7502 |
-
case 'left':
|
7503 |
-
left = -Math.round((p.left - left) * (1 / ratioH));
|
7504 |
-
break;
|
7505 |
-
case 'center':
|
7506 |
-
left = -Math.round((p.left - left - this.layer.width() / 2) * (1 / ratioH))
|
7507 |
-
break;
|
7508 |
-
case 'right':
|
7509 |
-
left = -Math.round((p.left - left - this.layer.width()) * (1 / ratioH));
|
7510 |
-
needRender = true;
|
7511 |
-
break;
|
7512 |
-
}
|
7513 |
-
this.storeWithModifier('left', left, ratioH, needRender);
|
7514 |
-
this.$.trigger('propertyChanged', ['left', left]);
|
7515 |
|
7516 |
-
|
7517 |
-
|
7518 |
-
|
7519 |
-
top = -Math.round((p.top - top) * (1 / ratioV));
|
7520 |
-
break;
|
7521 |
-
case 'middle':
|
7522 |
-
top = -Math.round((p.top - top - this.layer.height() / 2) * (1 / ratioV));
|
7523 |
-
break;
|
7524 |
-
case 'bottom':
|
7525 |
-
top = -Math.round((p.top - top - this.layer.height()) * (1 / ratioV));
|
7526 |
-
needRender = true;
|
7527 |
-
break;
|
7528 |
}
|
7529 |
-
this.
|
7530 |
-
this
|
7531 |
-
}
|
7532 |
|
7533 |
-
|
7534 |
-
|
7535 |
-
|
7536 |
-
|
7537 |
-
|
7538 |
-
|
7539 |
-
|
|
|
7540 |
}
|
7541 |
-
};
|
7542 |
-
//</editor-fold
|
7543 |
|
7544 |
-
|
7545 |
-
this.layer.nextendResizable("option", "smartguides", $.proxy(function () {
|
7546 |
-
this.layer.triggerHandler('LayerParent');
|
7547 |
-
return this.layerEditor.getSnap();
|
7548 |
-
}, this));
|
7549 |
-
this.layer.nextenddraggable("option", "smartguides", $.proxy(function () {
|
7550 |
-
this.layer.triggerHandler('LayerParent');
|
7551 |
-
return this.layerEditor.getSnap();
|
7552 |
-
}, this));
|
7553 |
};
|
7554 |
|
7555 |
-
|
7556 |
-
|
7557 |
-
|
7558 |
-
|
7559 |
-
|
7560 |
-
this._hide();
|
7561 |
}
|
|
|
|
|
7562 |
|
7563 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7564 |
|
7565 |
-
|
|
|
7566 |
};
|
7567 |
|
7568 |
-
|
7569 |
-
|
7570 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7571 |
|
7572 |
-
|
7573 |
-
|
7574 |
-
|
7575 |
|
7576 |
-
|
7577 |
-
|
7578 |
-
|
7579 |
-
|
7580 |
-
|
7581 |
-
}
|
7582 |
}
|
7583 |
-
|
|
|
|
|
|
|
|
|
7584 |
|
7585 |
-
|
7586 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7587 |
|
7588 |
-
|
|
|
7589 |
|
7590 |
-
|
7591 |
-
|
|
|
7592 |
}
|
7593 |
}
|
7594 |
-
};
|
7595 |
|
7596 |
-
|
|
|
|
|
|
|
|
|
7597 |
|
7598 |
-
for (var k in this.
|
7599 |
-
this.
|
7600 |
-
this.$.trigger('propertyChanged', [k, this.property[k]]);
|
7601 |
}
|
7602 |
|
7603 |
-
|
7604 |
-
|
|
|
|
|
|
|
7605 |
|
7606 |
-
|
7607 |
-
this.layer.attr('data-valign', this.property.valign);
|
7608 |
-
if (isReset) {
|
7609 |
-
this._resize(true);
|
7610 |
}
|
7611 |
|
7612 |
-
|
|
|
|
|
|
|
7613 |
|
7614 |
-
|
7615 |
-
|
7616 |
-
this.deviceProperty[to] = $.extend({}, this.deviceProperty[to], this.deviceProperty[from]);
|
7617 |
}
|
7618 |
-
};
|
7619 |
|
7620 |
-
|
7621 |
-
this.resize({
|
7622 |
-
slideW: this.layerEditor.getResponsiveRatio('h'),
|
7623 |
-
slideH: this.layerEditor.getResponsiveRatio('v')
|
7624 |
-
}, isForced);
|
7625 |
};
|
7626 |
|
7627 |
-
|
7628 |
-
this.
|
7629 |
-
};
|
7630 |
|
7631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7632 |
|
7633 |
-
if (!this.parent || isForced) {
|
7634 |
-
//this.doThrottledTheResize(ratios, false);
|
7635 |
-
this.addToResizeCollection(this, ratios, false);
|
7636 |
}
|
7637 |
-
};
|
7638 |
|
7639 |
-
|
7640 |
-
var ratioPositionH = ratios.slideW,
|
7641 |
-
ratioSizeH = ratioPositionH,
|
7642 |
-
ratioPositionV = ratios.slideH,
|
7643 |
-
ratioSizeV = ratioPositionV;
|
7644 |
|
7645 |
-
|
7646 |
-
|
|
|
|
|
7647 |
}
|
7648 |
|
7649 |
-
|
7650 |
-
//this.storeWithModifier('width', this.isDimensionPropertyAccepted(width) ? width : Math.round(width), ratioSizeH, true);
|
7651 |
-
//var height = this.getProperty(true, 'height');
|
7652 |
-
//this.storeWithModifier('height', this.isDimensionPropertyAccepted(height) ? height : Math.round(height), ratioSizeV, true);
|
7653 |
-
this.renderWithModifier('width', this.getProperty(true, 'width'), ratioSizeH);
|
7654 |
-
this.renderWithModifier('height', this.getProperty(true, 'height'), ratioSizeV);
|
7655 |
|
7656 |
-
|
7657 |
-
ratioPositionH = ratioPositionV = 1;
|
7658 |
-
}
|
7659 |
-
//this.storeWithModifier('left', Math.round(this.getProperty(true, 'left')), ratioPositionH, true);
|
7660 |
-
//this.storeWithModifier('top', Math.round(this.getProperty(true, 'top')), ratioPositionV, true);
|
7661 |
-
this.renderWithModifier('left', this.getProperty(true, 'left'), ratioPositionH);
|
7662 |
-
this.renderWithModifier('top', this.getProperty(true, 'top'), ratioPositionV);
|
7663 |
-
if (!isLinear) {
|
7664 |
-
this.triggerLayerResized(isThrottled, ratios);
|
7665 |
-
}
|
7666 |
};
|
7667 |
|
7668 |
-
|
7669 |
-
|
7670 |
-
|
7671 |
-
};
|
7672 |
|
7673 |
-
|
7674 |
-
|
7675 |
-
|
7676 |
-
|
7677 |
-
|
7678 |
-
|
7679 |
-
|
|
|
7680 |
}
|
7681 |
}
|
7682 |
-
|
7683 |
|
7684 |
-
|
7685 |
-
this.
|
7686 |
-
}
|
7687 |
|
7688 |
-
|
7689 |
-
var
|
|
|
7690 |
|
7691 |
-
if (
|
7692 |
-
var
|
7693 |
-
|
7694 |
-
|
7695 |
-
} else {
|
7696 |
-
left = this.layer.parent().width() / 2;
|
7697 |
-
}
|
7698 |
-
var ratio = this.layerEditor.getResponsiveRatio('h');
|
7699 |
-
if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
|
7700 |
-
ratio = 1;
|
7701 |
}
|
7702 |
-
this.layer.css('left', (left - this.layer.width() / 2 + this.getProperty(true, 'left') * ratio));
|
7703 |
}
|
|
|
7704 |
|
7705 |
-
|
7706 |
-
|
7707 |
-
|
7708 |
-
|
7709 |
-
|
7710 |
-
|
7711 |
-
|
7712 |
-
|
7713 |
-
|
7714 |
-
|
7715 |
-
|
7716 |
-
this.
|
7717 |
}
|
7718 |
-
this.triggerLayerResized();
|
7719 |
-
};
|
7720 |
|
7721 |
-
|
7722 |
-
|
7723 |
-
this.
|
7724 |
-
} else {
|
7725 |
-
this._triggerLayerResizedThrottled(true, ratios);
|
7726 |
}
|
7727 |
-
};
|
7728 |
|
7729 |
-
|
7730 |
-
|
7731 |
-
|
7732 |
-
|
7733 |
-
|
7734 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7735 |
}
|
7736 |
-
|
7737 |
|
7738 |
-
|
7739 |
-
|
7740 |
-
var crop = this.property.crop;
|
7741 |
-
if (crop == 'auto' || crop == 'mask') {
|
7742 |
-
crop = 'hidden';
|
7743 |
}
|
7744 |
|
7745 |
-
|
7746 |
-
style += 'text-align:' + this.property.inneralign + ';';
|
7747 |
-
return style;
|
7748 |
-
};
|
7749 |
|
7750 |
-
|
7751 |
-
|
7752 |
-
|
7753 |
-
|
7754 |
-
|
7755 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7756 |
}
|
|
|
|
|
|
|
|
|
|
|
7757 |
}
|
7758 |
|
7759 |
-
|
7760 |
-
var
|
7761 |
-
|
7762 |
-
|
7763 |
-
|
7764 |
-
|
7765 |
-
|
7766 |
-
|
7767 |
-
|
7768 |
-
|
7769 |
-
|
7770 |
-
|
7771 |
-
|
7772 |
-
|
7773 |
-
|
7774 |
-
|
7775 |
-
|
7776 |
-
|
7777 |
-
this.layerEditor._zIndexOffset = -1;
|
7778 |
-
this.layerEditor._idTranslation = {};
|
7779 |
-
var layer = this.layerEditor.loadSingleData(data, group);
|
7780 |
-
smartSlider.history.changeFuture(this, layer);
|
7781 |
-
smartSlider.history.changeFuture(this.items[0], layer.items[0]);
|
7782 |
-
this.group.reIndexLayers();
|
7783 |
-
this.layerEditor.refreshMode();
|
7784 |
-
break;
|
7785 |
-
case 'delete':
|
7786 |
-
this.delete();
|
7787 |
-
break;
|
7788 |
-
}
|
7789 |
-
break;
|
7790 |
-
case 'createLayer':
|
7791 |
-
switch (value) {
|
7792 |
-
case 'add':
|
7793 |
-
var group = other[0],
|
7794 |
-
data = $.extend(true, {}, other[1]);
|
7795 |
-
this.layerEditor._zIndexOffset = -1;
|
7796 |
-
this.layerEditor._idTranslation = {};
|
7797 |
-
var layer = this.layerEditor.loadSingleData(data, group);
|
7798 |
-
smartSlider.history.changeFuture(this, layer);
|
7799 |
-
smartSlider.history.changeFuture(this.items[0], layer.items[0]);
|
7800 |
-
this.group.reIndexLayers();
|
7801 |
-
this.layerEditor.refreshMode();
|
7802 |
-
break;
|
7803 |
-
case 'delete':
|
7804 |
-
this.delete();
|
7805 |
-
break;
|
7806 |
}
|
7807 |
-
|
7808 |
-
|
7809 |
-
|
7810 |
-
case '
|
7811 |
-
|
7812 |
-
|
7813 |
-
for (var i = 0; i < newLayers.length; i++) {
|
7814 |
-
smartSlider.history.changeFuture(context.oldLayers[i], newLayers[i]);
|
7815 |
-
smartSlider.history.changeFuture(context.oldLayers[i].items[0], newLayers[i].items[0]);
|
7816 |
}
|
7817 |
-
context.oldLayers = [];
|
7818 |
-
break;
|
7819 |
-
case 'delete':
|
7820 |
-
var oldLayers = [];
|
7821 |
-
other[0].delete(true, oldLayers);
|
7822 |
-
context.oldLayers = oldLayers;
|
7823 |
-
break;
|
7824 |
-
}
|
7825 |
-
break;
|
7826 |
-
case 'deleteLayer':
|
7827 |
-
switch (value) {
|
7828 |
-
case 'create':
|
7829 |
-
var group = other[0],
|
7830 |
-
data = $.extend(true, {}, other[1]);
|
7831 |
-
this.layerEditor._zIndexOffset = -1;
|
7832 |
-
this.layerEditor._idTranslation = {};
|
7833 |
-
var layer = this.layerEditor.loadSingleData(data, group);
|
7834 |
-
smartSlider.history.changeFuture(this, layer);
|
7835 |
-
smartSlider.history.changeFuture(this.items[0], layer.items[0]);
|
7836 |
-
group.reIndexLayers();
|
7837 |
-
this.layerEditor.refreshMode();
|
7838 |
break;
|
7839 |
-
case '
|
7840 |
-
|
7841 |
-
|
7842 |
-
|
7843 |
-
|
7844 |
-
|
7845 |
-
break;
|
7846 |
-
case 'resetMode':
|
7847 |
-
switch (value) {
|
7848 |
-
case 'reset':
|
7849 |
-
this.resetMode(other[0], this.layerEditor.getMode());
|
7850 |
-
break;
|
7851 |
-
case 'restore':
|
7852 |
-
this.restoreMode(other[0], this.layerEditor.getMode(), other[1]);
|
7853 |
break;
|
7854 |
}
|
7855 |
-
|
|
|
|
|
|
|
|
|
|
|
7856 |
}
|
|
|
|
|
7857 |
};
|
7858 |
|
7859 |
-
|
|
|
7860 |
}
|
7861 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7862 |
|
7863 |
-
|
7864 |
-
|
7865 |
-
|
7866 |
-
}
|
7867 |
|
7868 |
-
|
7869 |
-
return this.group.zIndex >= layer.group.zIndex;
|
7870 |
-
}
|
7871 |
|
7872 |
-
if (
|
7873 |
-
|
7874 |
}
|
|
|
|
|
|
|
7875 |
|
7876 |
-
|
7877 |
-
|
|
|
|
|
7878 |
}
|
|
|
7879 |
|
7880 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7881 |
}
|
7882 |
|
7883 |
-
|
7884 |
-
|
7885 |
-
|
7886 |
-
|
7887 |
-
var preventActivation = false;
|
7888 |
|
7889 |
-
function
|
7890 |
-
|
7891 |
-
|
7892 |
-
return value;
|
7893 |
}
|
7894 |
|
7895 |
-
function LayerGroup(layerEditor, grou
|
1 |
+
N2Require('ContextMenu', [], [], function ($, scope, undefined) {
|
2 |
+
|
3 |
+
function ContextMenu($el, parameters) {
|
4 |
+
this.isActive = false;
|
5 |
+
this.$el = $el.data('nextendcontextmenu', this);
|
6 |
+
this.parameters = $.extend({
|
7 |
+
selector: false,
|
8 |
+
onShow: function () {
|
9 |
+
}
|
10 |
+
}, parameters);
|
11 |
+
|
12 |
+
this.$menu = $('<div class="n2-context-menu"></div>').on('mousedown', function () {
|
13 |
+
nextend.context.setMouseDownArea('context-menu');
|
14 |
+
}).appendTo('body');
|
15 |
+
if (this.parameters.selector) {
|
16 |
+
this.$el.on('contextmenu', this.parameters.selector, $.proxy(this.onShowContextMenu, this));
|
17 |
+
} else {
|
18 |
+
this.$el.on('contextmenu', $.proxy(this.onShowContextMenu, this));
|
19 |
+
}
|
20 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
ContextMenu.prototype.onShowContextMenu = function (e) {
|
23 |
+
e.preventDefault();
|
24 |
+
this.clearItems();
|
25 |
+
this.parameters.onShow.call(this, e, this);
|
26 |
+
if (this.hasItems) {
|
27 |
+
e.stopPropagation();
|
28 |
+
this.isActive = true;
|
29 |
+
this.$menu.css({
|
30 |
+
left: e.pageX,
|
31 |
+
top: e.pageY
|
32 |
+
});
|
33 |
|
34 |
+
$('html').on('mouseleave.nextendcontextmenu, click.nextendcontextmenu', $.proxy(this.onHide, this));
|
35 |
+
}
|
36 |
+
this.$menu.toggleClass('n2-active', this.hasItems);
|
37 |
+
}
|
38 |
|
39 |
+
ContextMenu.prototype.onHide = function () {
|
40 |
+
$('html').off('.nextendcontextmenu');
|
41 |
+
this.$menu.removeClass('n2-active');
|
42 |
+
this.isActive = false;
|
43 |
+
}
|
44 |
|
45 |
+
ContextMenu.prototype.clearItems = function () {
|
46 |
+
if (this.isActive) {
|
47 |
+
this.onHide();
|
48 |
+
}
|
49 |
+
this.hasItems = false;
|
50 |
+
this.$menu.html('');
|
51 |
+
}
|
|
|
52 |
|
53 |
+
ContextMenu.prototype.addItem = function (label, icon, action) {
|
54 |
+
this.hasItems = true;
|
55 |
+
this.$menu.append($('<div><i class="n2-i ' + icon + '"></i><span>' + label + '</span></div>').on('click', action));
|
56 |
+
}
|
57 |
|
58 |
+
$.fn.nextendContextMenu = function (parameters) {
|
59 |
+
return this.each(function () {
|
60 |
+
new ContextMenu($(this), parameters);
|
61 |
+
});
|
62 |
};
|
63 |
|
64 |
+
return ContextMenu;
|
65 |
+
});
|
|
|
66 |
|
67 |
+
N2Require('Zoom', [], [], function ($, scope, undefined) {
|
|
|
68 |
|
69 |
+
var zoom = null;
|
70 |
+
nextend['ssBeforeResponsive'] = function () {
|
71 |
+
zoom = new Zoom(this);
|
72 |
+
nextend['ssBeforeResponsive'] = function () {
|
73 |
+
zoom.add(this);
|
74 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
};
|
76 |
|
77 |
+
function Zoom(responsive) {
|
|
|
78 |
|
79 |
+
this.key = 'n2-ss-editor-device-lock-mode';
|
80 |
+
this.devices = {
|
81 |
+
unknownUnknown: $('<div />')
|
82 |
+
};
|
83 |
+
this.responsives = [responsive];
|
84 |
+
responsive.setOrientation('portrait');
|
85 |
+
responsive.parameters.onResizeEnabled = 0;
|
86 |
+
responsive.parameters.forceFull = 0; // We should disable force full feature on admin dashboard as it won't render before the sidebar
|
87 |
+
responsive._getDevice = responsive._getDeviceZoom;
|
88 |
|
89 |
+
this.lock = $('#n2-ss-lock').on('click', $.proxy(this.switchLock, this));
|
|
|
|
|
90 |
|
91 |
+
var desktopWidth = responsive.parameters.sliderWidthToDevice['desktopPortrait'];
|
|
|
|
|
92 |
|
93 |
+
this.container = responsive.containerElement.closest('.n2-ss-container-device').addBack();
|
94 |
+
this.container.width(desktopWidth);
|
95 |
+
this.containerWidth = desktopWidth;
|
96 |
|
97 |
+
this.initZoom();
|
98 |
|
99 |
+
var tr = $('#n2-ss-devices .n2-tr'),
|
100 |
+
modes = responsive.parameters.deviceModes;
|
|
|
101 |
|
102 |
+
this.devices.desktopPortrait = $('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-desktop"></i></div>').prependTo(tr);
|
103 |
+
if (modes.desktopLandscape) {
|
104 |
+
this.devices.desktopLandscape = $('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-desktop-landscape"></i></div>').prependTo(tr);
|
105 |
+
} else {
|
106 |
+
this.devices.desktopLandscape = this.devices.desktopPortrait;
|
|
|
|
|
107 |
}
|
|
|
108 |
|
109 |
+
if (modes.tabletPortrait) {
|
110 |
+
this.devices.tabletPortrait = $('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-tablet"></i></div>').prependTo(tr);
|
111 |
+
} else {
|
112 |
+
this.devices.tabletPortrait = this.devices.desktopPortrait;
|
113 |
+
}
|
114 |
+
if (modes.tabletLandscape) {
|
115 |
+
this.devices.tabletLandscape = $('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-tablet-landscape"></i></div>').prependTo(tr);
|
116 |
+
} else {
|
117 |
+
this.devices.tabletLandscape = this.devices.desktopLandscape;
|
118 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
+
if (modes.mobilePortrait) {
|
121 |
+
this.devices.mobilePortrait = $('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-mobile"></i></div>').prependTo(tr);
|
122 |
+
} else {
|
123 |
+
this.devices.mobilePortrait = this.devices.tabletPortrait;
|
124 |
+
}
|
125 |
+
if (modes.mobileLandscape) {
|
126 |
+
this.devices.mobileLandscape = $('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-mobile-landscape"></i></div>').prependTo(tr);
|
127 |
+
} else {
|
128 |
+
this.devices.mobileLandscape = this.devices.tabletLandscape;
|
129 |
+
}
|
130 |
|
131 |
+
this.deviceOptions = $('#n2-ss-devices .n2-panel-option');
|
|
|
132 |
|
133 |
+
//$('#n2-ss-devices').css('width', (this.deviceOptions.length * 62) + 'px');
|
|
|
|
|
134 |
|
135 |
+
this.deviceOptions.each($.proxy(function (i, el) {
|
136 |
+
$(el).on({
|
137 |
+
mousedown: $.proxy(nextend.context.setMouseDownArea, nextend.context, 'zoomDeviceClicked'),
|
138 |
+
click: $.proxy(this.setDeviceMode, this)
|
139 |
+
});
|
140 |
+
}, this));
|
141 |
|
142 |
+
responsive.sliderElement.on('SliderDeviceOrientation', $.proxy(this.onDeviceOrientationChange, this));
|
143 |
+
};
|
144 |
|
145 |
+
Zoom.prototype.add = function (responsive) {
|
146 |
|
147 |
+
this.responsives.push(responsive);
|
148 |
+
responsive.setOrientation('portrait');
|
149 |
+
responsive.parameters.onResizeEnabled = 0;
|
150 |
+
responsive.parameters.forceFull = 0; // We should disable force full feature on admin dashboard as it won't render before the sidebar
|
151 |
+
responsive._getDevice = responsive._getDeviceZoom;
|
152 |
|
153 |
+
//responsive.sliderElement.on('SliderDeviceOrientation', $.proxy(this.onDeviceOrientationChange, this));
|
154 |
+
}
|
|
|
155 |
|
156 |
+
Zoom.prototype.onDeviceOrientationChange = function (e, modes) {
|
157 |
+
$('#n2-admin').removeClass('n2-ss-mode-' + modes.lastDevice + modes.lastOrientation)
|
158 |
+
.addClass('n2-ss-mode-' + modes.device + modes.orientation);
|
159 |
+
this.devices[modes.lastDevice + modes.lastOrientation].removeClass('n2-active');
|
160 |
+
this.devices[modes.device + modes.orientation].addClass('n2-active');
|
|
|
161 |
};
|
162 |
|
163 |
+
Zoom.prototype.setDeviceMode = function (e) {
|
164 |
+
var el = $(e.currentTarget);
|
165 |
+
if ((e.ctrlKey || e.metaKey) && nextend.smartSlider.canvasManager) {
|
166 |
+
var orientation = el.data('orientation');
|
167 |
+
nextend.smartSlider.canvasManager.copyOrResetMode(el.data('device') + orientation[0].toUpperCase() + orientation.substr(1));
|
168 |
+
} else {
|
169 |
+
for (var i = 0; i < this.responsives.length; i++) {
|
170 |
+
this.responsives[i].setOrientation(el.data('orientation'));
|
171 |
+
this.responsives[i].setMode(el.data('device'), this.responsives[i]);
|
172 |
+
}
|
173 |
}
|
|
|
174 |
};
|
175 |
|
176 |
+
Zoom.prototype.switchLock = function (e) {
|
177 |
+
e.preventDefault();
|
178 |
+
this.lock.toggleClass('n2-active');
|
179 |
+
if (this.lock.hasClass('n2-active')) {
|
180 |
+
this.setZoomSyncMode();
|
181 |
+
this.zoomChange(e, this.zoom.slider("value"), 'sync', false);
|
182 |
+
|
183 |
+
$.jStorage.set(this.key, 'sync');
|
184 |
+
} else {
|
185 |
+
this.setZoomFixMode();
|
186 |
+
$.jStorage.set(this.key, 'fix');
|
187 |
}
|
188 |
};
|
189 |
|
190 |
+
Zoom.prototype.initZoom = function () {
|
191 |
+
var zoom = $("#n2-ss-slider-zoom");
|
192 |
+
if (zoom.length > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
+
if (typeof zoom[0].slide !== 'undefined') {
|
195 |
+
zoom[0].slide = null;
|
196 |
+
}
|
197 |
|
198 |
+
this.zoom =
|
199 |
+
zoom.removeAttr('slide').prop('slide', false).slider({
|
200 |
+
range: "min",
|
201 |
+
step: 1,
|
202 |
+
value: 1,
|
203 |
+
min: 0,
|
204 |
+
max: 102
|
205 |
+
});
|
206 |
|
207 |
+
this.responsives[0].sliderElement.on('SliderResize', $.proxy(this.sliderResize, this));
|
|
|
|
|
|
|
208 |
|
209 |
+
if ($.jStorage.get(this.key, 'sync') == 'fix') {
|
210 |
+
this.setZoomFixMode();
|
211 |
+
} else {
|
212 |
+
this.setZoomSyncMode();
|
213 |
+
this.lock.addClass('n2-active');
|
|
|
|
|
214 |
}
|
215 |
}
|
|
|
|
|
216 |
};
|
|
|
|
|
217 |
|
218 |
+
Zoom.prototype.sliderResize = function (e, ratios) {
|
219 |
+
this.setZoom();
|
220 |
+
};
|
221 |
|
222 |
+
Zoom.prototype.setZoomFixMode = function () {
|
223 |
+
this.zoom.off('.n2-ss-zoom')
|
224 |
.on({
|
225 |
+
'slide.n2-ss-zoom': $.proxy(this.zoomChangeFixMode, this),
|
226 |
+
'slidechange.n2-ss-zoom': $.proxy(this.zoomChangeFixMode, this)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
};
|
229 |
|
230 |
+
Zoom.prototype.setZoomSyncMode = function () {
|
|
|
|
|
|
|
|
|
|
|
231 |
|
232 |
+
this.zoom.off('.n2-ss-zoom')
|
233 |
+
.on({
|
234 |
+
'slide.n2-ss-zoom': $.proxy(this.zoomChangeSyncMode, this),
|
235 |
+
'slidechange.n2-ss-zoom': $.proxy(this.zoomChangeSyncMode, this)
|
236 |
+
});
|
237 |
};
|
238 |
|
239 |
+
Zoom.prototype.zoomChangeFixMode = function (event, ui) {
|
240 |
+
this.zoomChange(event, ui.value, 'fix', ui);
|
|
|
241 |
};
|
242 |
|
243 |
+
Zoom.prototype.zoomChangeSyncMode = function (event, ui) {
|
244 |
+
this.zoomChange(event, ui.value, 'sync', ui);
|
245 |
+
};
|
246 |
|
247 |
+
Zoom.prototype.zoomChange = function (event, value, mode, ui) {
|
248 |
+
var width;
|
249 |
+
if (event.originalEvent !== undefined) {
|
250 |
+
var ratio = 1;
|
251 |
+
if (value < 50) {
|
252 |
+
ratio = nextend.smallestZoom / this.containerWidth + Math.max(value / 50, 0) * (1 - nextend.smallestZoom / this.containerWidth);
|
253 |
+
} else if (value > 52) {
|
254 |
+
ratio = 1 + (value - 52) / 50;
|
255 |
+
}
|
256 |
+
width = parseInt(ratio * this.containerWidth);
|
257 |
+
this.container.width(width);
|
258 |
|
259 |
+
for (var i = 1; i < this.responsives.length; i++) {
|
260 |
+
this.responsives[i].containerElement.width(width);
|
261 |
+
}
|
262 |
|
263 |
+
for (var i = 0; i < this.responsives.length; i++) {
|
264 |
+
switch (mode) {
|
265 |
+
case 'sync':
|
266 |
+
this.responsives[i].doResize();
|
267 |
+
break;
|
268 |
+
default:
|
269 |
+
this.responsives[i].doResize(true);
|
270 |
+
break;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
} else {
|
274 |
+
width = this.container.last().width();
|
275 |
+
this.container.width(width);
|
276 |
+
}
|
277 |
+
if (ui) {
|
278 |
+
ui.handle.innerHTML = width + 'px';
|
279 |
+
}
|
280 |
+
};
|
281 |
|
282 |
+
Zoom.prototype.setZoom = function () {
|
283 |
+
var ratio = this.responsives[0].containerElement.width() / this.containerWidth;
|
284 |
+
var v = 50;
|
285 |
+
if (ratio < 1) {
|
286 |
+
v = (ratio - nextend.smallestZoom / this.containerWidth) / (1 - nextend.smallestZoom / this.containerWidth) * 50;
|
287 |
+
} else if (ratio > 1) {
|
288 |
+
v = (ratio - 1) * 50 + 52;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
+
var oldValue = this.zoom.slider('value');
|
291 |
+
this.zoom.slider('value', v);
|
|
|
|
|
|
|
|
|
292 |
};
|
293 |
|
294 |
+
return Zoom;
|
295 |
+
});
|
296 |
+
N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
297 |
|
298 |
+
function CreateSlider(groupID, ajaxUrl) {
|
299 |
+
this.addToGroupModal = null;
|
300 |
+
this.groupID = groupID;
|
301 |
+
this.ajaxUrl = ajaxUrl;
|
302 |
+
$('.n2-ss-create-slider').click($.proxy(function (e) {
|
303 |
e.preventDefault();
|
304 |
+
e.stopImmediatePropagation();
|
305 |
+
this.showModal();
|
306 |
+
|
307 |
+
}, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
|
309 |
+
this.notificationStack = new NextendNotificationCenterStackModal($('body'));
|
310 |
+
$('.n2-ss-add-sample-slider').click($.proxy(function (e) {
|
311 |
e.preventDefault();
|
312 |
+
e.stopImmediatePropagation();
|
313 |
+
this.showDemoSliders();
|
314 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
|
316 |
+
}, this));
|
317 |
|
318 |
+
if (window.location.hash.substring(1) == 'createslider') {
|
319 |
+
this.showModal();
|
|
|
320 |
}
|
321 |
+
}
|
322 |
|
323 |
+
CreateSlider.prototype.showModal = function () {
|
324 |
+
if (!this.createSliderModal) {
|
325 |
+
var that = this;
|
326 |
+
var ajaxUrl = this.ajaxUrl;
|
327 |
+
var presets = [];
|
|
|
|
|
|
|
328 |
|
329 |
+
presets.push({
|
330 |
+
key: 'default',
|
331 |
+
name: n2_('Default'),
|
332 |
+
image: '$ss$/admin/images/sliderpresets/default.png'
|
333 |
+
});
|
334 |
+
presets.push({
|
335 |
+
key: 'fullwidth',
|
336 |
+
name: n2_('Full width'),
|
337 |
+
image: '$ss$/admin/images/sliderpresets/fullwidth.png'
|
338 |
+
});
|
339 |
+
presets.push({
|
340 |
+
key: 'thumbnailhorizontal',
|
341 |
+
name: n2_('Thumbnail - horizontal'),
|
342 |
+
image: '$ss$/admin/images/sliderpresets/thumbnailhorizontal.png'
|
343 |
+
});
|
344 |
+
this.createSliderModal = new NextendModal({
|
345 |
+
zero: {
|
346 |
+
size: [
|
347 |
+
N2SSPRO ? 750 : 550,
|
348 |
+
N2SSPRO ? 630 : 390 + 130
|
349 |
+
],
|
350 |
+
title: n2_('Create Slider'),
|
351 |
+
back: false,
|
352 |
+
close: true,
|
353 |
+
content: '<form class="n2-form"></form>',
|
354 |
+
controls: [
|
355 |
+
'<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">' + n2_('Create') + '</a>'
|
356 |
+
],
|
357 |
+
fn: {
|
358 |
+
show: function () {
|
359 |
|
360 |
+
var button = this.controls.find('.n2-button-green'),
|
361 |
+
form = this.content.find('.n2-form').on('submit', function (e) {
|
362 |
+
e.preventDefault();
|
363 |
+
button.trigger('click');
|
364 |
+
});
|
|
|
365 |
|
366 |
+
form.append(this.createInput(n2_('Slider name'), 'createslidertitle', 'width: 240px;'));
|
367 |
+
form.append(this.createInputUnit(n2_('Width'), 'createsliderwidth', 'px', 'width: 30px;'));
|
368 |
+
form.append(this.createInputUnit(n2_('Height'), 'createsliderheight', 'px', 'width: 30px;'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
|
370 |
+
new N2Classes.FormElementAutocompleteSimple("createsliderwidth", ["1920", "1200", "1000", "800", "600", "400"]);
|
371 |
+
new N2Classes.FormElementAutocompleteSimple("createsliderheight", ["800", "600", "500", "400", "300", "200"]);
|
372 |
|
373 |
+
var sliderTitle = $('#createslidertitle').val(n2_('Slider')).focus(),
|
374 |
+
sliderWidth = $('#createsliderwidth').val(1200),
|
375 |
+
sliderHeight = $('#createsliderheight').val(500);
|
376 |
|
377 |
+
sliderWidth.parent().addClass('n2-form-element-autocomplete ui-front');
|
378 |
+
sliderHeight.parent().addClass('n2-form-element-autocomplete ui-front');
|
379 |
|
380 |
+
this.createHeading(n2_('Preset')).appendTo(this.content);
|
381 |
|
382 |
+
var imageRadio = this.createImageRadio(presets)
|
383 |
+
.css('height', N2SSPRO ? 360 : 100)
|
384 |
+
.appendTo(this.content),
|
385 |
+
sliderPreset = imageRadio.find('input');
|
386 |
+
imageRadio.css('overflow', 'hidden');
|
387 |
+
this.createHeading(n2_('Import Sample Sliders')).appendTo(this.content);
|
388 |
+
$('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample1.png') + '\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample2.png') + '\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample3.png') + '\')"></div>')
|
389 |
+
.on('click', $.proxy(function () {
|
390 |
+
this.hide();
|
391 |
+
that.showDemoSliders();
|
392 |
+
}, this))
|
393 |
+
.appendTo(this.content);
|
394 |
+
|
395 |
|
396 |
+
button.on('click', $.proxy(function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
|
|
|
|
|
|
|
|
|
398 |
NextendAjaxHelper.ajax({
|
399 |
type: "POST",
|
400 |
+
url: NextendAjaxHelper.makeAjaxUrl(ajaxUrl, {
|
401 |
+
nextendaction: 'create'
|
402 |
+
}),
|
403 |
+
data: {
|
404 |
+
groupID: that.groupID,
|
405 |
+
sliderTitle: sliderTitle.val(),
|
406 |
+
sliderSizeWidth: sliderWidth.val(),
|
407 |
+
sliderSizeHeight: sliderHeight.val(),
|
408 |
+
preset: sliderPreset.val()
|
409 |
+
},
|
410 |
+
dataType: 'json'
|
411 |
+
}).done($.proxy(function (response) {
|
412 |
+
NextendAjaxHelper.startLoading();
|
|
|
|
|
|
|
413 |
}, this));
|
414 |
+
|
415 |
+
}, this));
|
416 |
+
}
|
417 |
}
|
418 |
}
|
419 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
}
|
421 |
+
this.createSliderModal.show();
|
|
|
|
|
422 |
};
|
423 |
|
424 |
+
CreateSlider.prototype.showDemoSliders = function () {
|
425 |
+
var that = this;
|
426 |
+
$('body').css('overflow', 'hidden');
|
427 |
+
var pro = 0;
|
428 |
+
var frame = $('<iframe src="//smartslider3.com/demo-import/?pro=' + pro + '&version=' + N2SS3VERSION + '&utm_campaign=' + N2SS3C + '&utm_source=import-slider-frame&utm_medium=smartslider-' + N2PLATFORM + '-' + (pro ? 'pro' : 'free') + '" frameborder="0"></iframe>').css({
|
429 |
+
position: 'fixed',
|
430 |
+
zIndex: 100000,
|
431 |
+
left: 0,
|
432 |
+
top: 0,
|
433 |
+
width: '100%',
|
434 |
+
height: '100%'
|
435 |
+
}).appendTo('body'),
|
436 |
+
closeFrame = function () {
|
437 |
+
$('body').css('overflow', '');
|
438 |
+
frame.remove();
|
439 |
+
window.removeEventListener("message", listener, false);
|
440 |
+
that.notificationStack.popStack();
|
441 |
+
},
|
442 |
+
importSlider = function (href) {
|
443 |
+
NextendAjaxHelper.ajax({
|
444 |
+
type: "POST",
|
445 |
+
url: NextendAjaxHelper.makeAjaxUrl(that.ajaxUrl, {
|
446 |
+
nextendaction: 'importDemo'
|
447 |
+
}),
|
448 |
+
data: {
|
449 |
+
groupID: that.groupID,
|
450 |
+
key: Base64.encode(href.replace(/^(http(s)?:)?\/\//, '//'))
|
451 |
+
},
|
452 |
+
dataType: 'json'
|
453 |
+
}).fail(function () {
|
454 |
+
//closeFrame();
|
455 |
+
});
|
456 |
+
},
|
457 |
+
listener = function (e) {
|
458 |
+
if (e.origin !== "http://smartslider3.com" && e.origin !== "https://smartslider3.com")
|
459 |
+
return;
|
460 |
+
var msg = e.data;
|
461 |
+
switch (msg.key) {
|
462 |
+
case 'importSlider':
|
463 |
+
if (typeof nextend.joinCommunity === 'function') {
|
464 |
+
nextend.joinCommunity(function () {
|
465 |
+
importSlider(msg.data.href);
|
466 |
+
});
|
467 |
+
} else {
|
468 |
+
importSlider(msg.data.href);
|
469 |
+
}
|
470 |
+
|
471 |
+
return;
|
472 |
|
473 |
+
break;
|
474 |
+
case 'closeWindow':
|
475 |
+
closeFrame();
|
476 |
+
}
|
477 |
+
};
|
|
|
|
|
|
|
|
|
478 |
|
479 |
+
this.notificationStack.enableStack();
|
480 |
+
NextendEsc.add($.proxy(function () {
|
481 |
+
closeFrame();
|
482 |
+
return true;
|
483 |
+
}, this));
|
484 |
|
485 |
+
window.addEventListener("message", listener, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
};
|
487 |
|
488 |
+
return CreateSlider;
|
489 |
+
});
|
490 |
+
N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
|
492 |
+
function ManageSliders(groupID, ajaxUrl) {
|
493 |
+
this.preventSort = false;
|
494 |
+
this.groupID = groupID;
|
495 |
+
this.ajaxUrl = ajaxUrl;
|
496 |
+
this.sliders = [];
|
497 |
+
this.sliderPanel = $('#n2-ss-slider-container');
|
498 |
+
this.orderBy = this.sliderPanel.data('orderby') == 'ordering' ? true : false;
|
499 |
+
this.slidersContainer = this.sliderPanel.find('.n2-ss-sliders-container');
|
500 |
|
501 |
+
var sliders = this.slidersContainer.find('.n2-ss-box-slider');
|
502 |
+
for (var i = 0; i < sliders.length; i++) {
|
503 |
+
this.sliders.push(new scope.Slider(this, sliders.eq(i)));
|
504 |
+
}
|
505 |
|
506 |
+
this.changed();
|
507 |
|
508 |
+
this.initMenu();
|
|
|
509 |
|
510 |
+
this.initOrderable();
|
|
|
|
|
|
|
|
|
511 |
|
512 |
+
this.create = new scope.CreateSlider(groupID, ajaxUrl);
|
513 |
+
this.initBulk();
|
514 |
+
}
|
515 |
|
516 |
+
ManageSliders.prototype.changed = function () {
|
|
|
|
|
|
|
|
|
517 |
|
518 |
+
$('html').attr('data-sliders', this.sliders.length);
|
519 |
+
};
|
520 |
|
521 |
+
ManageSliders.prototype.initSliders = function () {
|
522 |
+
var previousLength = this.sliders.length;
|
523 |
+
var sliderNodes = this.slidersContainer.find('.n2-ss-box-slider'),
|
524 |
+
sliders = [];
|
525 |
+
for (var i = 0; i < sliderNodes.length; i++) {
|
526 |
+
var slider = sliderNodes.eq(i).data('slider');
|
527 |
+
sliders.push(slider);
|
|
|
|
|
|
|
|
|
528 |
}
|
529 |
+
this.sliders = sliders;
|
530 |
+
this.changed();
|
531 |
+
$(window).triggerHandler('SmartSliderSidebarSlidersChanged');
|
532 |
+
};
|
|
|
|
|
|
|
|
|
533 |
|
534 |
+
ManageSliders.prototype.initOrderable = function () {
|
535 |
+
if (this.orderBy) {
|
536 |
+
this.slidersContainer.sortable({
|
537 |
+
helper: 'clone',
|
538 |
+
forcePlaceholderSize: false,
|
539 |
+
tolerance: "pointer",
|
540 |
+
connectWith: '.n2-ss-box-slider-group',
|
541 |
+
items: ".n2-ss-box-slider",
|
542 |
+
start: function (event, ui) {
|
543 |
+
ui.item.show();
|
544 |
+
},
|
545 |
+
stop: $.proxy(this.saveOrder, this),
|
546 |
+
placeholder: 'n2-box-sortable-placeholder',
|
547 |
+
distance: 10
|
548 |
+
});
|
549 |
+
}
|
550 |
+
};
|
551 |
|
552 |
+
ManageSliders.prototype.saveOrder = function (e) {
|
553 |
+
if (this.preventSort) {
|
554 |
+
this.slidersContainer.sortable("cancel");
|
555 |
+
this.preventSort = false;
|
556 |
+
return;
|
557 |
+
}
|
558 |
+
var sliderNodes = this.slidersContainer.find('.n2-ss-box-slider'),
|
559 |
+
sliders = [],
|
560 |
+
ids = [],
|
561 |
+
originalIds = [];
|
562 |
+
for (var i = 0; i < sliderNodes.length; i++) {
|
563 |
+
var slider = sliderNodes.eq(i).data('slider');
|
564 |
+
sliders.push(slider);
|
565 |
+
ids.push(slider.getId());
|
566 |
+
}
|
567 |
+
for (var i = 0; i < this.sliders.length; i++) {
|
568 |
+
originalIds.push(this.sliders[i].getId());
|
569 |
}
|
|
|
570 |
|
571 |
+
if (JSON.stringify(originalIds) != JSON.stringify(ids)) {
|
572 |
+
$(window).triggerHandler('SmartSliderSidebarSlidersOrderChanged');
|
573 |
+
var queries = {
|
574 |
+
nextendcontroller: 'sliders',
|
575 |
+
nextendaction: 'order'
|
576 |
+
};
|
577 |
+
NextendAjaxHelper.ajax({
|
578 |
+
type: 'POST',
|
579 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, queries),
|
580 |
+
data: {
|
581 |
+
groupID: this.groupID,
|
582 |
+
sliderorder: ids,
|
583 |
+
isReversed: (this.sliderPanel.data('orderbydirection') == 'DESC' ? 1 : 0)
|
584 |
+
}
|
585 |
+
});
|
586 |
+
this.sliders = sliders;
|
587 |
}
|
588 |
+
};
|
|
|
589 |
|
|
|
|
|
|
|
|
|
590 |
|
591 |
+
ManageSliders.prototype.initMenu = function () {
|
592 |
+
this.slider = null;
|
593 |
+
this.menu = $('#n2-ss-slider-menu').detach().addClass('n2-inited');
|
594 |
|
595 |
+
this.menuActions = {
|
596 |
+
addToGroup: this.menu.find('.n2-ss-add-to-group').on('click', $.proxy(function (e) {
|
597 |
+
e.stopPropagation();
|
598 |
+
e.preventDefault();
|
599 |
+
this.addToGroup([this.slider.getId()]);
|
600 |
+
}, this)),
|
601 |
+
removeFromGroup: this.menu.find('.n2-ss-remove-from-group').on('click', $.proxy(function (e) {
|
602 |
+
e.stopPropagation();
|
603 |
+
e.preventDefault();
|
604 |
+
this.removeFromGroup([this.slider.getId()]);
|
605 |
+
}, this)),
|
606 |
+
duplicate: this.menu.find('.n2-ss-duplicate').on('click', $.proxy(function (e) {
|
607 |
+
this.slider.duplicate(e);
|
608 |
+
}, this)),
|
609 |
+
'delete': this.menu.find('.n2-ss-delete').on('click', $.proxy(function (e) {
|
610 |
+
this.slider.delete(e);
|
611 |
+
}, this)),
|
612 |
+
preview: this.menu.find('.n2-ss-preview').on('click', $.proxy(function (e) {
|
613 |
+
this.slider.preview(e);
|
614 |
+
}, this)),
|
615 |
}
|
616 |
|
617 |
+
this.menu.find('.n2-button').on('click', $.proxy(function (e) {
|
618 |
+
e.preventDefault();
|
619 |
+
e.stopPropagation();
|
620 |
+
if (this.menu.hasClass('n2-active')) {
|
621 |
+
this.menu.removeClass('n2-active').off('mouseleave');
|
622 |
+
} else {
|
623 |
+
this.menu.addClass('n2-active').on('mouseleave', function () {
|
624 |
+
$(this).removeClass('n2-active');
|
625 |
+
});
|
626 |
}
|
627 |
+
}, this));
|
|
|
628 |
}
|
629 |
|
630 |
+
|
631 |
+
ManageSliders.prototype.showMenu = function (slider) {
|
632 |
+
this.slider = slider;
|
633 |
+
this.menu.appendTo(slider.box);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
}
|
635 |
|
636 |
+
ManageSliders.prototype.hideMenu = function () {
|
637 |
+
if (this.menu.hasClass('n2-active')) {
|
638 |
+
this.menu.removeClass('n2-active').off('mouseleave');
|
639 |
+
}
|
640 |
+
this.menu.detach();
|
641 |
+
}
|
642 |
|
643 |
+
ManageSliders.prototype.deleteSliders = function (ids, sliders) {
|
644 |
+
this.hideMenu();
|
645 |
+
var title = sliders[0].box.find('.n2-box-placeholder-title a').text();
|
646 |
+
if (sliders.length > 1) {
|
647 |
+
title += ' and ' + (sliders.length - 1) + ' more';
|
648 |
+
}
|
649 |
+
NextendDeleteModal('slider-delete', title, $.proxy(function () {
|
650 |
+
NextendAjaxHelper.ajax({
|
651 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
652 |
+
nextendcontroller: 'sliders',
|
653 |
+
nextendaction: 'delete'
|
654 |
+
}),
|
655 |
+
type: 'POST',
|
656 |
+
data: {
|
657 |
+
sliders: ids
|
658 |
}
|
659 |
+
}).done($.proxy(function () {
|
660 |
+
for (var i = 0; i < sliders.length; i++) {
|
661 |
+
sliders[i].deleted();
|
|
|
|
|
|
|
662 |
}
|
663 |
+
this.initSliders();
|
664 |
+
this.leaveBulk();
|
665 |
+
}, this));
|
666 |
+
}, this));
|
667 |
+
};
|
|
|
|
|
668 |
|
669 |
+
ManageSliders.prototype.duplicateSliders = function (ids, slides) {
|
670 |
+
for (var i = 0; i < this.sliders.length; i++) {
|
671 |
+
if (this.sliders[i].selected) {
|
672 |
+
this.sliders[i].duplicate($.Event("click", {
|
673 |
+
currentTarget: null
|
674 |
+
}));
|
675 |
+
}
|
676 |
+
}
|
677 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
678 |
|
679 |
+
ManageSliders.prototype.exportSliders = function (ids, sliders) {
|
|
|
|
|
|
|
680 |
|
681 |
+
window.location.href = (NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl, {
|
682 |
+
nextendcontroller: 'sliders',
|
683 |
+
nextendaction: 'exportAll'
|
684 |
+
}) + '&' + $.param({sliders: ids, currentGroupID: this.groupID}));
|
685 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
|
|
|
|
|
|
|
|
|
|
|
|
|
687 |
|
688 |
+
ManageSliders.prototype.initBulk = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
|
690 |
+
this.selection = [];
|
691 |
|
692 |
+
this.isBulkSelection = false;
|
|
|
|
|
|
|
|
|
693 |
|
694 |
+
var selects = $('.n2-bulk-select').find('a');
|
695 |
+
|
696 |
+
//Select all
|
697 |
+
selects.eq(0).on('click', $.proxy(function (e) {
|
698 |
+
e.preventDefault();
|
699 |
+
this.bulkSelect(function (slider) {
|
700 |
+
slider.select();
|
701 |
+
});
|
702 |
+
}, this));
|
703 |
+
|
704 |
+
//Select none
|
705 |
+
selects.eq(1).on('click', $.proxy(function (e) {
|
706 |
+
e.preventDefault();
|
707 |
+
this.bulkSelect(function (slider) {
|
708 |
+
slider.deSelect();
|
709 |
+
});
|
710 |
+
}, this));
|
711 |
+
|
712 |
+
var actions = $('.n2-bulk-actions').find('a')
|
713 |
+
.on('click', $.proxy(function (e) {
|
714 |
e.preventDefault();
|
715 |
+
|
716 |
+
switch ($(e.currentTarget).data('action')) {
|
717 |
+
case 'duplicate':
|
718 |
+
this.bulkAction('duplicateSliders', false);
|
719 |
+
break;
|
720 |
+
case 'delete':
|
721 |
+
this.bulkAction('deleteSliders', false);
|
722 |
+
break;
|
723 |
+
case 'export':
|
724 |
+
this.bulkAction('exportSliders', false);
|
725 |
+
break;
|
726 |
+
case 'addToGroup':
|
727 |
+
this.bulkAction('addToGroup', true);
|
728 |
+
break;
|
729 |
}
|
730 |
}, this));
|
731 |
+
};
|
732 |
|
733 |
+
ManageSliders.prototype.addSelection = function (slider) {
|
734 |
+
if (this.selection.length == 0) {
|
735 |
+
this.enterBulk();
|
|
|
736 |
}
|
737 |
+
this.selection.push(slider);
|
|
|
|
|
|
|
|
|
738 |
}
|
739 |
|
740 |
+
ManageSliders.prototype.removeSelection = function (slider) {
|
741 |
+
this.selection.splice($.inArray(slider, this.selection), 1);
|
742 |
+
if (this.selection.length == 0) {
|
743 |
+
this.leaveBulk();
|
744 |
+
}
|
745 |
}
|
746 |
|
747 |
+
ManageSliders.prototype.bulkSelect = function (cb) {
|
748 |
+
for (var i = 0; i < this.sliders.length; i++) {
|
749 |
+
cb(this.sliders[i]);
|
750 |
+
}
|
751 |
+
};
|
752 |
|
753 |
+
ManageSliders.prototype.bulkAction = function (action, skipGroups) {
|
754 |
+
var sliders = [],
|
755 |
+
ids = [];
|
756 |
+
this.bulkSelect(function (slider) {
|
757 |
+
if (slider.selected && (!skipGroups || !slider.isGroup)) {
|
758 |
+
sliders.push(slider);
|
759 |
+
ids.push(slider.getId());
|
760 |
+
}
|
761 |
+
});
|
762 |
+
if (ids.length) {
|
763 |
+
this[action](ids, sliders);
|
764 |
+
this.leaveBulk();
|
765 |
+
} else {
|
766 |
+
if (skipGroups) {
|
767 |
+
nextend.notificationCenter.notice('Please select one or more sliders for the action!');
|
768 |
+
} else {
|
769 |
+
nextend.notificationCenter.notice('Please select one or more sliders or groups for the action!');
|
770 |
+
}
|
771 |
+
}
|
772 |
+
};
|
773 |
|
774 |
+
ManageSliders.prototype.enterBulk = function () {
|
775 |
+
if (!this.isBulkSelection) {
|
776 |
+
this.isBulkSelection = true;
|
777 |
+
if (this.orderBy) {
|
778 |
+
this.slidersContainer.sortable('option', 'disabled', true);
|
779 |
+
}
|
780 |
+
$('#n2-admin').addClass('n2-ss-has-box-selection');
|
781 |
+
}
|
782 |
+
};
|
783 |
|
784 |
+
ManageSliders.prototype.leaveBulk = function () {
|
785 |
+
if (this.isBulkSelection) {
|
786 |
+
if (this.orderBy) {
|
787 |
+
this.slidersContainer.sortable('option', 'disabled', false);
|
788 |
+
}
|
789 |
+
$('#n2-admin').removeClass('n2-ss-has-box-selection');
|
790 |
|
791 |
+
for (var i = 0; i < this.sliders.length; i++) {
|
792 |
+
this.sliders[i].deSelect();
|
793 |
+
}
|
794 |
+
this.selection = [];
|
795 |
+
this.isBulkSelection = false;
|
796 |
+
}
|
797 |
+
};
|
798 |
|
799 |
+
ManageSliders.prototype.removeFromGroup = function (sliders) {
|
800 |
+
return NextendAjaxHelper.ajax({
|
801 |
+
type: "POST",
|
802 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
803 |
+
nextendaction: 'removeFromGroup'
|
804 |
+
}),
|
805 |
+
data: {
|
806 |
+
currentGroupID: this.groupID,
|
807 |
+
sliders: sliders
|
808 |
+
},
|
809 |
+
dataType: 'json'
|
810 |
+
}).done($.proxy(function (response) {
|
811 |
+
for (var i = 0; i < sliders.length; i++) {
|
812 |
+
$('[data-sliderid="' + sliders[i] + '"]').data('slider').deleted();
|
813 |
+
}
|
814 |
+
this.initSliders();
|
815 |
+
}, this));
|
816 |
}
|
817 |
|
818 |
+
ManageSliders.prototype._addToGroup = function (action, groupID, sliders) {
|
819 |
+
return NextendAjaxHelper.ajax({
|
820 |
+
type: "POST",
|
821 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
822 |
+
nextendaction: 'addToGroup'
|
823 |
+
}),
|
824 |
+
data: {
|
825 |
+
currentGroupID: this.groupID,
|
826 |
+
groupID: groupID,
|
827 |
+
action: action,
|
828 |
+
sliders: sliders
|
829 |
+
},
|
830 |
+
dataType: 'json'
|
831 |
+
}).done($.proxy(function (response) {
|
832 |
|
833 |
+
if (action == 'move') {
|
834 |
+
for (var i = 0; i < sliders.length; i++) {
|
835 |
+
$('[data-sliderid="' + sliders[i] + '"]').data('slider').deleted();
|
836 |
+
}
|
837 |
|
838 |
+
this.initSliders();
|
839 |
+
}
|
|
|
|
|
840 |
|
841 |
+
var groupCounter = $('[data-sliderid="' + groupID + '"] .n2-box-placeholder-buttons .n2-button-grey');
|
842 |
+
groupCounter.html(parseInt(groupCounter.html()) + sliders.length);
|
843 |
+
}, this));
|
844 |
+
};
|
845 |
|
846 |
+
ManageSliders.prototype.addToGroup = function (sliders) {
|
847 |
+
var groups = null;
|
848 |
+
var that = this;
|
849 |
+
var ajaxUrl = this.ajaxUrl;
|
850 |
|
851 |
+
var addToGroupModal = new NextendModal({
|
852 |
+
zero: {
|
853 |
+
size: [
|
854 |
+
350,
|
855 |
+
220
|
856 |
+
],
|
857 |
+
title: n2_('Add to group'),
|
858 |
+
back: false,
|
859 |
+
close: true,
|
860 |
+
content: '<form class="n2-form"></form>',
|
861 |
+
controls: [
|
862 |
+
'<div class="n2-button n2-button-with-actions n2-button-l n2-button-green n2-radius-s n2-h4"><a class="n2-button-inner" href="#" data-action="move">' + n2_('Move') + '</a>' +
|
863 |
+
'<div class="n2-button-menu-open"><i class="n2-i n2-i-buttonarrow"></i><div class="n2-button-menu"><div class="n2-button-menu-inner n2-border-radius">' +
|
864 |
+
'<a class="n2-h4" href="#" data-action="copy">' + n2_('Copy') + '</a>' +
|
865 |
+
'<a class="n2-h4" href="#" data-action="link">' + n2_('Link') + '</a>' +
|
866 |
+
'</div></div></div></div>',
|
867 |
+
],
|
868 |
+
fn: {
|
869 |
+
show: function () {
|
870 |
|
871 |
+
this.controls.find(".n2-button-menu-open").n2opener();
|
|
|
|
|
|
|
872 |
|
873 |
+
var button = this.controls.find('a'),
|
874 |
+
form = this.content.find('.n2-form').on('submit', function (e) {
|
875 |
+
e.preventDefault();
|
876 |
+
button.eq(0).trigger('click');
|
877 |
+
});
|
878 |
|
879 |
+
form.append(this.createSelect(n2_('Group'), 'choosegroup', groups, 'width:300px;'));
|
|
|
|
|
880 |
|
881 |
+
var choosegroup = $('#choosegroup');
|
|
|
|
|
|
|
882 |
|
883 |
+
button.on('click', $.proxy(function (e) {
|
884 |
|
885 |
+
e.preventDefault();
|
|
|
886 |
|
887 |
+
that._addToGroup($(e.currentTarget).data('action'), choosegroup.val(), sliders)
|
888 |
+
.done($.proxy(function () {
|
889 |
+
this.hide(e);
|
890 |
+
}, this));
|
|
|
|
|
|
|
|
|
|
|
891 |
|
892 |
+
}, this));
|
893 |
+
}
|
894 |
+
}
|
895 |
+
}
|
896 |
+
});
|
897 |
|
|
|
898 |
|
899 |
+
NextendAjaxHelper.ajax({
|
900 |
+
type: "POST",
|
901 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
902 |
+
nextendcontroller: 'sliders',
|
903 |
+
nextendaction: 'listGroups'
|
904 |
+
}),
|
905 |
+
dataType: 'json'
|
906 |
+
}).done($.proxy(function (response) {
|
907 |
+
groups = response.data;
|
908 |
+
if (typeof groups[this.groupID] !== 'undefined') {
|
909 |
+
delete groups[this.groupID];
|
910 |
+
}
|
911 |
+
if ($.isEmptyObject(groups)) {
|
912 |
+
$('body').on({
|
913 |
+
'groupAdded.addToGroup': $.proxy(function () {
|
914 |
+
$('body').off('.addToGroup');
|
915 |
+
NextendAjaxHelper.ajax({
|
916 |
+
type: "POST",
|
917 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
918 |
+
nextendcontroller: 'sliders',
|
919 |
+
nextendaction: 'listGroups'
|
920 |
+
}),
|
921 |
+
dataType: 'json'
|
922 |
+
}).done($.proxy(function (response) {
|
923 |
+
groups = response.data;
|
924 |
+
if (typeof groups[this.groupID] !== 'undefined') {
|
925 |
+
delete groups[this.groupID];
|
926 |
+
}
|
927 |
+
addToGroupModal.show();
|
928 |
+
}, this));
|
929 |
|
930 |
+
}, this),
|
931 |
+
'groupAddCanceled.addToGroup': $.proxy(function () {
|
932 |
+
$('body').off('.addToGroup');
|
933 |
+
}, this)
|
934 |
+
});
|
935 |
|
936 |
+
this.createGroup.showModal();
|
|
|
|
|
937 |
|
938 |
+
} else {
|
939 |
+
addToGroupModal.show();
|
940 |
+
}
|
941 |
+
}, this));
|
942 |
+
};
|
943 |
|
944 |
+
return ManageSliders;
|
945 |
+
});
|
946 |
+
N2Require('Slider', [], [], function ($, scope, undefined) {
|
947 |
+
function Slider(manager, box) {
|
948 |
+
this.selected = false;
|
949 |
+
this.manager = manager;
|
950 |
|
951 |
+
this.box = box.data('slider', this)
|
952 |
+
.addClass('n2-clickable');
|
|
|
|
|
|
|
|
|
|
|
|
|
953 |
|
954 |
+
this.isGroup = this.box.hasClass('n2-ss-box-slider-group');
|
|
|
|
|
|
|
955 |
|
956 |
+
this.box
|
957 |
+
.on('mouseenter', $.proxy(function () {
|
958 |
+
this.manager.showMenu(this);
|
959 |
+
}, this))
|
960 |
+
.on('mouseleave', $.proxy(function () {
|
961 |
+
this.manager.hideMenu();
|
962 |
+
}, this))
|
963 |
+
.on('click.n2-slider', $.proxy(this.goToEdit, this));
|
|
|
|
|
|
|
964 |
|
965 |
+
this.box.find('.n2-ss-box-select').on('click', $.proxy(function (e) {
|
966 |
+
e.stopPropagation();
|
967 |
+
e.preventDefault();
|
968 |
|
969 |
+
this.invertSelection();
|
970 |
+
}, this));
|
971 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
|
973 |
+
Slider.prototype.getId = function () {
|
974 |
+
return this.box.data('sliderid');
|
975 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
976 |
|
977 |
+
Slider.prototype.goToEdit = function (e, isBlank) {
|
978 |
+
var editUrl = this.box.data('editurl');
|
979 |
+
if (typeof isBlank !== 'undefined' && isBlank) {
|
980 |
+
window.open(editUrl, '_blank');
|
981 |
+
} else {
|
982 |
+
window.location = editUrl;
|
983 |
}
|
984 |
};
|
985 |
|
986 |
+
Slider.prototype.preview = function (e) {
|
987 |
+
e.stopPropagation();
|
988 |
+
e.preventDefault();
|
989 |
+
window.open(NextendAjaxHelper.makeFallbackUrl(this.box.data('editurl'), {
|
990 |
+
nextendcontroller: 'preview',
|
991 |
+
nextendaction: 'index'
|
992 |
+
}), '_blank');
|
993 |
+
};
|
994 |
+
|
995 |
|
996 |
+
Slider.prototype.duplicate = function (e) {
|
997 |
+
e.stopPropagation();
|
998 |
+
e.preventDefault();
|
999 |
+
var deferred = $.Deferred();
|
1000 |
+
NextendAjaxHelper.ajax({
|
1001 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.box.data('editurl'), {
|
1002 |
+
nextendcontroller: 'slider',
|
1003 |
+
nextendaction: 'duplicate'
|
1004 |
+
})
|
1005 |
+
}).done($.proxy(function (response) {
|
1006 |
+
var box = $(response.data).insertAfter(this.box);
|
1007 |
+
var newSlider = new Slider(this.manager, box);
|
1008 |
+
this.manager.initSliders();
|
1009 |
+
deferred.resolve(newSlider);
|
1010 |
+
}, this));
|
1011 |
+
return deferred;
|
1012 |
};
|
1013 |
|
1014 |
+
Slider.prototype.delete = function (e) {
|
1015 |
+
e.stopPropagation();
|
1016 |
+
e.preventDefault();
|
1017 |
+
this.manager.deleteSliders([this.getId()], [this]);
|
1018 |
+
};
|
1019 |
+
Slider.prototype.deleted = function () {
|
1020 |
+
this.box.remove();
|
|
|
|
|
|
|
|
|
|
|
|
|
1021 |
};
|
1022 |
|
1023 |
+
Slider.prototype.invertSelection = function (e) {
|
1024 |
+
if (e) {
|
1025 |
+
e.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1026 |
}
|
1027 |
|
1028 |
+
if (!this.selected) {
|
1029 |
+
this.select();
|
1030 |
+
} else {
|
1031 |
+
this.deSelect();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1032 |
}
|
1033 |
};
|
1034 |
|
1035 |
+
Slider.prototype.select = function () {
|
1036 |
+
if (!this.selected) {
|
1037 |
+
this.selected = true;
|
1038 |
+
this.box.addClass('n2-selected');
|
1039 |
+
this.manager.addSelection(this);
|
|
|
|
|
1040 |
}
|
|
|
|
|
|
|
|
|
|
|
1041 |
};
|
1042 |
|
1043 |
+
Slider.prototype.deSelect = function () {
|
1044 |
+
if (this.selected) {
|
1045 |
+
this.selected = false;
|
1046 |
+
this.box.removeClass('n2-selected');
|
1047 |
+
this.manager.removeSelection(this);
|
1048 |
}
|
|
|
1049 |
};
|
1050 |
|
1051 |
+
return Slider;
|
1052 |
+
});
|
1053 |
+
N2Require('FormElementAnimationManager', ['FormElement'], [], function ($, scope, undefined) {
|
|
|
1054 |
|
1055 |
+
function FormElementAnimationManager(id, managerIdentifier) {
|
1056 |
+
this.element = $('#' + id);
|
1057 |
+
this.managerIdentifier = managerIdentifier;
|
1058 |
|
1059 |
+
this.element.parent()
|
1060 |
+
.on('click', $.proxy(this.show, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1061 |
|
1062 |
+
this.element.siblings('.n2-form-element-clear')
|
1063 |
+
.on('click', $.proxy(this.clear, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
|
1065 |
+
this.name = this.element.siblings('input');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1066 |
|
1067 |
+
this.updateName(this.element.val());
|
|
|
1068 |
|
1069 |
+
scope.FormElement.prototype.constructor.apply(this, arguments);
|
1070 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
1071 |
|
|
|
|
|
|
|
|
|
1072 |
|
1073 |
+
FormElementAnimationManager.prototype = Object.create(scope.FormElement.prototype);
|
1074 |
+
FormElementAnimationManager.prototype.constructor = FormElementAnimationManager;
|
1075 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1076 |
|
1077 |
+
FormElementAnimationManager.prototype.show = function (e) {
|
1078 |
+
e.preventDefault();
|
1079 |
+
nextend[this.managerIdentifier].show(this.element.val(), $.proxy(this.save, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1080 |
};
|
1081 |
|
1082 |
+
FormElementAnimationManager.prototype.clear = function (e) {
|
1083 |
+
e.preventDefault();
|
1084 |
+
e.stopPropagation();
|
1085 |
+
this.val('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1086 |
};
|
1087 |
|
1088 |
+
FormElementAnimationManager.prototype.save = function (e, value) {
|
1089 |
+
this.val(value);
|
1090 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1091 |
|
1092 |
+
FormElementAnimationManager.prototype.val = function (value) {
|
1093 |
+
this.element.val(value);
|
1094 |
+
this.updateName(value);
|
1095 |
+
this.triggerOutsideChange();
|
1096 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
|
1098 |
+
FormElementAnimationManager.prototype.insideChange = function (value) {
|
1099 |
+
this.element.val(value);
|
|
|
|
|
|
|
1100 |
|
1101 |
+
this.updateName(value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1102 |
|
1103 |
+
this.triggerInsideChange();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1104 |
};
|
1105 |
|
1106 |
+
FormElementAnimationManager.prototype.updateName = function (value) {
|
1107 |
+
if (value == '') {
|
1108 |
+
value = n2_('Disabled');
|
1109 |
+
} else if (value.split('||').length > 1) {
|
1110 |
+
value = n2_('Multiple animations')
|
1111 |
+
} else {
|
1112 |
+
value = n2_('Single animation');
|
1113 |
}
|
1114 |
+
this.name.val(value);
|
1115 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1116 |
|
1117 |
+
return FormElementAnimationManager;
|
1118 |
+
});
|
1119 |
+
N2Require('FormElementBackground', ['FormElement'], [], function ($, scope, undefined) {
|
1120 |
+
|
1121 |
+
function FormElementBackground(id, value) {
|
1122 |
+
this.value = '';
|
1123 |
+
this.element = $('#' + id);
|
1124 |
+
|
1125 |
+
this.$container = this.element.closest('.n2-form-tab');
|
1126 |
+
|
1127 |
+
this.panel = $('#' + id + '-panel');
|
1128 |
+
this.setValue(value);
|
1129 |
+
this.options = this.panel.find('.n2-subform-image-option').on('click', $.proxy(this.selectOption, this));
|
1130 |
+
|
1131 |
+
this.active = this.getIndex(this.options.filter('.n2-active').get(0));
|
1132 |
+
|
1133 |
+
this.element.on('change', $.proxy(function () {
|
1134 |
+
this.insideChange(this.element.val());
|
1135 |
}, this));
|
1136 |
+
|
1137 |
+
scope.FormElement.prototype.constructor.apply(this, arguments);
|
1138 |
};
|
1139 |
|
1140 |
+
FormElementBackground.prototype = Object.create(scope.FormElement.prototype);
|
1141 |
+
FormElementBackground.prototype.constructor = FormElementBackground;
|
1142 |
|
1143 |
+
FormElementBackground.prototype.selectOption = function (e) {
|
1144 |
+
var index = this.getIndex(e.currentTarget);
|
1145 |
+
if (index != this.active) {
|
1146 |
|
1147 |
+
this.options.eq(index).addClass('n2-active');
|
1148 |
+
this.options.eq(this.active).removeClass('n2-active');
|
1149 |
|
1150 |
+
this.active = index;
|
1151 |
|
1152 |
+
var value = $(e.currentTarget).data('value');
|
1153 |
+
this.insideChange(value);
|
1154 |
+
}
|
1155 |
+
};
|
1156 |
+
FormElementBackground.prototype.setValue = function (newValue) {
|
1157 |
+
this.$container.removeClass('n2-ss-background-type-' + this.value);
|
1158 |
+
this.value = newValue;
|
1159 |
+
this.$container.addClass('n2-ss-background-type-' + this.value);
|
1160 |
+
}
|
1161 |
|
1162 |
+
FormElementBackground.prototype.insideChange = function (value) {
|
1163 |
+
this.setValue(value);
|
|
|
|
|
|
|
|
|
|
|
1164 |
|
1165 |
+
this.element.val(value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1166 |
|
1167 |
+
this.options.removeClass('n2-active');
|
1168 |
+
this.options.filter('[data-value="' + value + '"]').addClass('n2-active');
|
1169 |
+
this.triggerInsideChange();
|
1170 |
+
};
|
1171 |
+
|
1172 |
+
FormElementBackground.prototype.getIndex = function (option) {
|
1173 |
+
return $.inArray(option, this.options);
|
1174 |
+
};
|
1175 |
+
|
1176 |
+
return FormElementBackground;
|
1177 |
+
});
|
1178 |
+
|
1179 |
+
N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefined) {
|
1180 |
+
|
1181 |
+
function FormElementColumns(id) {
|
1182 |
+
this.denominators = {
|
1183 |
+
1: 100,
|
1184 |
+
2: 100,
|
1185 |
+
3: 144,
|
1186 |
+
4: 100,
|
1187 |
+
5: 100,
|
1188 |
+
6: 144
|
1189 |
+
};
|
1190 |
+
this.element = $('#' + id);
|
1191 |
+
scope.FormElement.prototype.constructor.apply(this, arguments);
|
1192 |
+
this.$c = $('#' + id).parent();
|
1193 |
+
this.$container = this.$c.find('.n2-ss-columns-element-container');
|
1194 |
+
this.containerWidth = 284;
|
1195 |
+
this.maxWidth = 0;
|
1196 |
+
|
1197 |
+
|
1198 |
+
this.$container.sortable({
|
1199 |
+
axis: 'x',
|
1200 |
+
tolerance: 'pointer',
|
1201 |
+
items: '.n2-ss-columns-element-column',
|
1202 |
+
helper: 'clone',
|
1203 |
+
start: $.proxy(function (e, ui) {
|
1204 |
+
this.$container.addClass('n2-sortable-currently-sorted');
|
1205 |
+
ui.placeholder.css('width', ui.item.width());
|
1206 |
+
|
1207 |
+
var $columns = this.$container.find('.n2-ss-columns-element-column');
|
1208 |
+
ui.item.data('index', $columns.index(ui.item));
|
1209 |
+
|
1210 |
+
}, this),
|
1211 |
+
stop: $.proxy(function (e, ui) {
|
1212 |
+
var $columns = this.$container.find('.n2-ss-columns-element-column');
|
1213 |
+
var oldIndex = ui.item.data('index'),
|
1214 |
+
newIndex = $columns.index(ui.item);
|
1215 |
+
if (oldIndex != newIndex) {
|
1216 |
+
|
1217 |
+
this.currentRow.moveCol(oldIndex, newIndex);
|
1218 |
+
|
1219 |
+
ui.item.data('index', null);
|
1220 |
}
|
1221 |
+
this.makeResizable();
|
1222 |
+
this.$container.removeClass('n2-sortable-currently-sorted');
|
1223 |
+
}, this)
|
1224 |
+
});
|
1225 |
|
1226 |
+
this.$c.find('.n2-ss-columns-element-add-col').on({
|
1227 |
+
click: $.proxy(function () {
|
1228 |
+
this.currentRow.createCol();
|
1229 |
+
}, this)
|
1230 |
+
});
|
1231 |
+
}
|
1232 |
|
1233 |
+
FormElementColumns.prototype = Object.create(scope.FormElement.prototype);
|
1234 |
+
FormElementColumns.prototype.constructor = FormElementColumns;
|
|
|
|
|
|
|
1235 |
|
|
|
|
|
|
|
|
|
|
|
1236 |
|
1237 |
+
FormElementColumns.prototype.getDenominator = function (i) {
|
1238 |
+
if (this.denominators[i] === undefined) {
|
1239 |
+
this.denominators[i] = i * 15;
|
1240 |
+
}
|
1241 |
+
return this.denominators[i];
|
1242 |
+
},
|
1243 |
|
1244 |
+
FormElementColumns.prototype.setRow = function (row) {
|
1245 |
+
this.currentRow = row;
|
1246 |
+
this.insideChange(row.getColumnsOrdered());
|
1247 |
+
}
|
|
|
|
|
1248 |
|
1249 |
+
FormElementColumns.prototype.setValue = function (newValue) {
|
1250 |
+
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
FormElementColumns.prototype.insideChange = function (value) {
|
1254 |
+
this.start(value);
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
FormElementColumns.prototype.activateColumn = function (e) {
|
1258 |
+
var clickedColIndex = this.$container.find('.n2-ss-columns-element-column').index(e.currentTarget);
|
1259 |
+
this.currentRow.activateColumn(clickedColIndex, e);
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
FormElementColumns.prototype.start = function (value) {
|
1263 |
+
this.percentages = [];
|
1264 |
+
|
1265 |
+
var columnWidths = value.split('+');
|
1266 |
+
for (var i = 0; i < columnWidths.length; i++) {
|
1267 |
+
this.percentages.push(new Fraction(columnWidths[i]));
|
1268 |
}
|
1269 |
+
|
1270 |
+
this.refreshMaxWidth();
|
1271 |
+
|
1272 |
+
this.$container.empty();
|
1273 |
+
|
1274 |
+
for (var i = 0; i < this.percentages.length; i++) {
|
1275 |
+
this.updateColumn($('<div class="n2-ss-columns-element-column">')
|
1276 |
+
.on('click', $.proxy(this.activateColumn, this))
|
1277 |
+
.appendTo(this.$container), this.percentages[i]);
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
this.makeResizable();
|
1281 |
+
|
1282 |
}
|
1283 |
|
1284 |
+
FormElementColumns.prototype.refreshMaxWidth = function () {
|
1285 |
+
this.maxWidth = this.containerWidth - (this.percentages.length - 1) * 15;
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
FormElementColumns.prototype.updateColumn = function ($col, fraction) {
|
1289 |
+
$col.css('width', (this.maxWidth * fraction.valueOf()) + 'px')
|
1290 |
+
.html(Math.round(fraction.valueOf() * 100 * 10) / 10 + '%');
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
FormElementColumns.prototype.makeResizable = function () {
|
1294 |
+
if (this.handles) {
|
1295 |
+
this.handles.remove();
|
1296 |
}
|
1297 |
+
this.$columns = this.$container.find('.n2-ss-columns-element-column');
|
1298 |
+
$('<div class="n2-ss-columns-element-handle"><div class="n2-i n2-i-more"></div></div>').insertAfter(this.$columns.not(this.$columns.last()));
|
1299 |
+
|
1300 |
+
this.handles = this.$container.find('.n2-ss-columns-element-handle')
|
1301 |
+
.on('mousedown', $.proxy(this._resizeStart, this));
|
1302 |
}
|
1303 |
|
1304 |
+
FormElementColumns.prototype._resizeStart = function (e) {
|
1305 |
+
var index = this.handles.index(e.currentTarget),
|
1306 |
+
cLeft = this.$container.offset().left + 8;
|
1307 |
+
|
1308 |
+
this.resizeContext = {
|
1309 |
+
index: index,
|
1310 |
+
cLeft: cLeft,
|
1311 |
+
$currentCol: this.$columns.eq(index),
|
1312 |
+
$nextCol: this.$columns.eq(index + 1),
|
1313 |
+
startX: Math.max(0, Math.min(e.clientX - cLeft, this.containerWidth)),
|
1314 |
}
|
|
|
1315 |
|
1316 |
+
this._resizeMove(e);
|
1317 |
+
|
1318 |
+
$('html').off('.resizecol').on({
|
1319 |
+
'mousemove.resizecol': $.proxy(this._resizeMove, this),
|
1320 |
+
'mouseup.resizecol mouseleave.resizecol': $.proxy(this._resizeStop, this)
|
|
|
|
|
|
|
1321 |
});
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
FormElementColumns.prototype._resizeMove = function (e) {
|
1325 |
+
e.preventDefault();
|
1326 |
+
var currentX = Math.max(0, Math.min(e.clientX - this.resizeContext.cLeft, this.containerWidth)),
|
1327 |
+
currentDenominator = this.getDenominator(this.percentages.length),
|
1328 |
+
fractionDifference = new Fraction(Math.round((currentX - this.resizeContext.startX) / (this.maxWidth / currentDenominator)), currentDenominator);
|
1329 |
+
if (fractionDifference.compare(this.percentages[this.resizeContext.index].clone().mul(-1)) < 0) {
|
1330 |
+
fractionDifference = this.percentages[this.resizeContext.index].clone().mul(-1);
|
1331 |
+
}
|
1332 |
+
if (fractionDifference.compare(this.percentages[this.resizeContext.index + 1]) > 0) {
|
1333 |
+
fractionDifference = this.percentages[this.resizeContext.index + 1].clone();
|
1334 |
+
}
|
1335 |
+
var currentP = this.percentages[this.resizeContext.index].add(fractionDifference),
|
1336 |
+
nextP = this.percentages[this.resizeContext.index + 1].sub(fractionDifference);
|
1337 |
+
|
1338 |
+
this.updateColumn(this.resizeContext.$currentCol, currentP);
|
1339 |
+
this.updateColumn(this.resizeContext.$nextCol, nextP);
|
1340 |
+
|
1341 |
+
var _percentages = $.extend([], this.percentages);
|
1342 |
+
_percentages[this.resizeContext.index] = currentP;
|
1343 |
+
_percentages[this.resizeContext.index + 1] = nextP;
|
1344 |
+
|
1345 |
+
this.onColumnWidthChange(_percentages);
|
1346 |
+
|
1347 |
+
return [currentP, nextP];
|
1348 |
+
}
|
1349 |
+
|
1350 |
+
FormElementColumns.prototype._resizeStop = function (e) {
|
1351 |
+
var ret = this._resizeMove(e);
|
1352 |
+
this.percentages[this.resizeContext.index] = ret[0];
|
1353 |
+
this.percentages[this.resizeContext.index + 1] = ret[1];
|
1354 |
+
$('html').off('.resizecol');
|
1355 |
+
delete this.resizeContext;
|
1356 |
+
|
1357 |
+
this.currentRow.setRealColsWidth(this.percentages);
|
1358 |
+
}
|
1359 |
+
|
1360 |
+
FormElementColumns.prototype.onColumnWidthChange = function (_percentages) {
|
1361 |
+
var percentages = [];
|
1362 |
+
for (var i = 0; i < _percentages.length; i++) {
|
1363 |
+
percentages.push(_percentages[i].valueOf());
|
1364 |
+
}
|
1365 |
+
this.currentRow.updateColumnWidth(percentages);
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
return FormElementColumns;
|
1369 |
+
});
|
1370 |
+
|
1371 |
+
/**
|
1372 |
+
* @license Fraction.js v3.3.1 09/09/2015
|
1373 |
+
* http://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
1374 |
+
*
|
1375 |
+
* Copyright (c) 2015, Robert Eisele (robert@xarg.org)
|
1376 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
1377 |
+
**/
|
1378 |
+
|
1379 |
+
|
1380 |
+
/**
|
1381 |
+
*
|
1382 |
+
* This class offers the possibility to calculate fractions.
|
1383 |
+
* You can pass a fraction in different formats. Either as array, as double, as string or as an integer.
|
1384 |
+
*
|
1385 |
+
* Array/Object form
|
1386 |
+
* [ 0 => <nominator>, 1 => <denominator> ]
|
1387 |
+
* [ n => <nominator>, d => <denominator> ]
|
1388 |
+
*
|
1389 |
+
* Integer form
|
1390 |
+
* - Single integer value
|
1391 |
+
*
|
1392 |
+
* Double form
|
1393 |
+
* - Single double value
|
1394 |
+
*
|
1395 |
+
* String form
|
1396 |
+
* 123.456 - a simple double
|
1397 |
+
* 123/456 - a string fraction
|
1398 |
+
* 123.'456' - a double with repeating decimal places
|
1399 |
+
* 123.(456) - synonym
|
1400 |
+
* 123.45'6' - a double with repeating last place
|
1401 |
+
* 123.45(6) - synonym
|
1402 |
+
*
|
1403 |
+
* Example:
|
1404 |
+
*
|
1405 |
+
* var f = new Fraction("9.4'31'");
|
1406 |
+
* f.mul([-4, 3]).div(4.9);
|
1407 |
+
*
|
1408 |
+
*/
|
1409 |
+
|
1410 |
+
(function (root) {
|
1411 |
+
|
1412 |
+
"use strict";
|
1413 |
+
|
1414 |
+
// Maximum search depth for cyclic rational numbers. 2000 should be more than enough.
|
1415 |
+
// Example: 1/7 = 0.(142857) has 6 repeating decimal places.
|
1416 |
+
// If MAX_CYCLE_LEN gets reduced, long cycles will not be detected and toString() only gets the first 10 digits
|
1417 |
+
var MAX_CYCLE_LEN = 2000;
|
1418 |
+
|
1419 |
+
// Parsed data to avoid calling "new" all the time
|
1420 |
+
var P = {
|
1421 |
+
"s": 1,
|
1422 |
+
"n": 0,
|
1423 |
+
"d": 1
|
1424 |
};
|
1425 |
|
1426 |
+
function assign(n, s) {
|
1427 |
+
|
1428 |
+
if (isNaN(n = parseInt(n, 10))) {
|
1429 |
+
throwInvalidParam();
|
|
|
1430 |
}
|
1431 |
+
return n * s;
|
1432 |
+
}
|
1433 |
|
1434 |
+
function throwInvalidParam() {
|
1435 |
+
throw "Invalid Param";
|
1436 |
+
}
|
|
|
1437 |
|
1438 |
+
var parse = function (p1, p2) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1439 |
|
1440 |
+
var n = 0, d = 1, s = 1;
|
1441 |
+
var v = 0, w = 0, x = 0, y = 1, z = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1442 |
|
1443 |
+
var A = 0, B = 1;
|
1444 |
+
var C = 1, D = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1445 |
|
1446 |
+
var N = 10000000;
|
1447 |
+
var M;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1448 |
|
1449 |
+
if (p1 === undefined || p1 === null) {
|
1450 |
+
/* void */
|
1451 |
+
} else if (p2 !== undefined) {
|
1452 |
+
n = p1;
|
1453 |
+
d = p2;
|
1454 |
+
s = n * d;
|
1455 |
+
} else
|
1456 |
+
switch (typeof p1) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1457 |
|
1458 |
+
case "object": {
|
1459 |
+
if ("d" in p1 && "n" in p1) {
|
1460 |
+
n = p1["n"];
|
1461 |
+
d = p1["d"];
|
1462 |
+
if ("s" in p1)
|
1463 |
+
n *= p1["s"];
|
1464 |
+
} else if (0 in p1) {
|
1465 |
+
n = p1[0];
|
1466 |
+
if (1 in p1)
|
1467 |
+
d = p1[1];
|
1468 |
+
} else {
|
1469 |
+
throwInvalidParam();
|
1470 |
+
}
|
1471 |
+
s = n * d;
|
1472 |
+
break;
|
1473 |
+
}
|
1474 |
+
case "number": {
|
1475 |
+
if (p1 < 0) {
|
1476 |
+
s = p1;
|
1477 |
+
p1 = -p1;
|
1478 |
+
}
|
1479 |
|
1480 |
+
if (p1 % 1 === 0) {
|
1481 |
+
n = p1;
|
1482 |
+
} else if (p1 > 0) { // check for != 0, scale would become NaN (log(0)), which converges really slow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1483 |
|
1484 |
+
if (p1 >= 1) {
|
1485 |
+
z = Math.pow(10, Math.floor(1 + Math.log(p1) / Math.LN10));
|
1486 |
+
p1 /= z;
|
1487 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1488 |
|
1489 |
+
// Using Farey Sequences
|
1490 |
+
// http://www.johndcook.com/blog/2010/10/20/best-rational-approximation/
|
1491 |
|
1492 |
+
while (B <= N && D <= N) {
|
1493 |
+
M = (A + C) / (B + D);
|
|
|
|
|
1494 |
|
1495 |
+
if (p1 === M) {
|
1496 |
+
if (B + D <= N) {
|
1497 |
+
n = A + C;
|
1498 |
+
d = B + D;
|
1499 |
+
} else if (D > B) {
|
1500 |
+
n = C;
|
1501 |
+
d = D;
|
1502 |
+
} else {
|
1503 |
+
n = A;
|
1504 |
+
d = B;
|
1505 |
+
}
|
1506 |
+
break;
|
1507 |
|
1508 |
+
} else {
|
1509 |
|
1510 |
+
if (p1 > M) {
|
1511 |
+
A += C;
|
1512 |
+
B += D;
|
1513 |
+
} else {
|
1514 |
+
C += A;
|
1515 |
+
D += B;
|
1516 |
+
}
|
1517 |
|
1518 |
+
if (B > N) {
|
1519 |
+
n = C;
|
1520 |
+
d = D;
|
1521 |
+
} else {
|
1522 |
+
n = A;
|
1523 |
+
d = B;
|
1524 |
+
}
|
1525 |
+
}
|
1526 |
+
}
|
1527 |
+
n *= z;
|
1528 |
+
} else if (isNaN(p1) || isNaN(p2)) {
|
1529 |
+
d = n = NaN;
|
1530 |
+
}
|
1531 |
+
break;
|
1532 |
+
}
|
1533 |
+
case "string": {
|
1534 |
+
B = p1.match(/\d+|./g);
|
1535 |
+
|
1536 |
+
if (B[A] === '-') {// Check for minus sign at the beginning
|
1537 |
+
s = -1;
|
1538 |
+
A++;
|
1539 |
+
} else if (B[A] === '+') {// Check for plus sign at the beginning
|
1540 |
+
A++;
|
1541 |
+
}
|
1542 |
|
1543 |
+
if (B.length === A + 1) { // Check if it's just a simple number "1234"
|
1544 |
+
w = assign(B[A++], s);
|
1545 |
+
} else if (B[A + 1] === '.' || B[A] === '.') { // Check if it's a decimal number
|
|
|
|
|
|
|
|
|
|
|
1546 |
|
1547 |
+
if (B[A] !== '.') { // Handle 0.5 and .5
|
1548 |
+
v = assign(B[A++], s);
|
1549 |
+
}
|
1550 |
+
A++;
|
1551 |
|
1552 |
+
// Check for decimal places
|
1553 |
+
if (A + 1 === B.length || B[A + 1] === '(' && B[A + 3] === ')' || B[A + 1] === "'" && B[A + 3] === "'") {
|
1554 |
+
w = assign(B[A], s);
|
1555 |
+
y = Math.pow(10, B[A].length);
|
1556 |
+
A++;
|
1557 |
+
}
|
1558 |
|
1559 |
+
// Check for repeating places
|
1560 |
+
if (B[A] === '(' && B[A + 2] === ')' || B[A] === "'" && B[A + 2] === "'") {
|
1561 |
+
x = assign(B[A + 1], s);
|
1562 |
+
z = Math.pow(10, B[A + 1].length) - 1;
|
1563 |
+
A += 3;
|
1564 |
+
}
|
1565 |
|
1566 |
+
} else if (B[A + 1] === '/' || B[A + 1] === ':') { // Check for a simple fraction "123/456" or "123:456"
|
1567 |
+
w = assign(B[A], s);
|
1568 |
+
y = assign(B[A + 2], 1);
|
1569 |
+
A += 3;
|
1570 |
+
} else if (B[A + 3] === '/' && B[A + 1] === ' ') { // Check for a complex fraction "123 1/2"
|
1571 |
+
v = assign(B[A], s);
|
1572 |
+
w = assign(B[A + 2], s);
|
1573 |
+
y = assign(B[A + 4], 1);
|
1574 |
+
A += 5;
|
1575 |
+
}
|
1576 |
+
|
1577 |
+
if (B.length <= A) { // Check for more tokens on the stack
|
1578 |
+
d = y * z;
|
1579 |
+
s = /* void */
|
1580 |
+
n = x + d * v + z * w;
|
1581 |
+
break;
|
1582 |
+
}
|
1583 |
+
|
1584 |
+
/* Fall through on error */
|
1585 |
+
}
|
1586 |
+
default:
|
1587 |
+
throwInvalidParam();
|
1588 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1589 |
|
1590 |
+
if (d === 0) {
|
1591 |
+
throw "DIV/0";
|
|
|
|
|
|
|
|
|
|
|
1592 |
}
|
|
|
1593 |
|
1594 |
+
P["s"] = s < 0 ? -1 : 1;
|
1595 |
+
P["n"] = Math.abs(n);
|
1596 |
+
P["d"] = Math.abs(d);
|
1597 |
};
|
1598 |
|
1599 |
+
var modpow = function (b, e, m) {
|
|
|
|
|
1600 |
|
1601 |
+
for (var r = 1; e > 0; b = (b * b) % m, e >>= 1) {
|
|
|
|
|
1602 |
|
1603 |
+
if (e & 1) {
|
1604 |
+
r = (r * b) % m;
|
1605 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1606 |
}
|
1607 |
+
return r;
|
1608 |
};
|
1609 |
|
1610 |
+
var cycleLen = function (n, d) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1611 |
|
1612 |
+
for (; d % 2 === 0;
|
1613 |
+
d /= 2) {
|
|
|
1614 |
}
|
1615 |
|
1616 |
+
for (; d % 5 === 0;
|
1617 |
+
d /= 5) {
|
|
|
|
|
1618 |
}
|
|
|
1619 |
|
1620 |
+
if (d === 1) // Catch non-cyclic numbers
|
1621 |
+
return 0;
|
1622 |
+
|
1623 |
+
// If we would like to compute really large numbers quicker, we could make use of Fermat's little theorem:
|
1624 |
+
// 10^(d-1) % d == 1
|
1625 |
+
// However, we don't need such large numbers and MAX_CYCLE_LEN should be the capstone,
|
1626 |
+
// as we want to translate the numbers to strings.
|
1627 |
+
|
1628 |
+
var rem = 10 % d;
|
1629 |
+
|
1630 |
+
for (var t = 1; rem !== 1; t++) {
|
1631 |
+
rem = rem * 10 % d;
|
1632 |
+
|
1633 |
+
if (t > MAX_CYCLE_LEN)
|
1634 |
+
return 0; // Returning 0 here means that we don't print it as a cyclic number. It's likely that the answer is `d-1`
|
1635 |
}
|
1636 |
+
return t;
|
1637 |
};
|
1638 |
|
1639 |
+
var cycleStart = function (n, d, len) {
|
1640 |
+
|
1641 |
+
var rem1 = 1;
|
1642 |
+
var rem2 = modpow(10, len, d);
|
1643 |
+
|
1644 |
+
for (var t = 0; t < 300; t++) { // s < ~log10(Number.MAX_VALUE)
|
1645 |
+
// Solve 10^s == 10^(s+t) (mod d)
|
1646 |
+
|
1647 |
+
if (rem1 === rem2)
|
1648 |
+
return t;
|
1649 |
+
|
1650 |
+
rem1 = rem1 * 10 % d;
|
1651 |
+
rem2 = rem2 * 10 % d;
|
1652 |
}
|
1653 |
+
return 0;
|
1654 |
};
|
1655 |
|
1656 |
+
var gcd = function (a, b) {
|
1657 |
|
1658 |
+
if (!a) return b;
|
1659 |
+
if (!b) return a;
|
1660 |
|
1661 |
+
while (1) {
|
1662 |
+
a %= b;
|
1663 |
+
if (!a) return b;
|
1664 |
+
b %= a;
|
1665 |
+
if (!b) return a;
|
1666 |
+
}
|
1667 |
+
};
|
1668 |
|
1669 |
+
/**
|
1670 |
+
* Module constructor
|
1671 |
+
*
|
1672 |
+
* @constructor
|
1673 |
+
* @param {number|Fraction} a
|
1674 |
+
* @param {number=} b
|
1675 |
+
*/
|
1676 |
+
function Fraction(a, b) {
|
1677 |
|
1678 |
+
if (!(this instanceof Fraction)) {
|
1679 |
+
return new Fraction(a, b);
|
1680 |
+
}
|
1681 |
|
1682 |
+
parse(a, b);
|
1683 |
+
|
1684 |
+
if (Fraction['REDUCE']) {
|
1685 |
+
a = gcd(P["d"], P["n"]); // Abuse a
|
1686 |
+
} else {
|
1687 |
+
a = 1;
|
1688 |
}
|
1689 |
|
1690 |
+
this["s"] = P["s"];
|
1691 |
+
this["n"] = P["n"] / a;
|
1692 |
+
this["d"] = P["d"] / a;
|
1693 |
+
}
|
1694 |
|
1695 |
+
/**
|
1696 |
+
* Boolean global variable to be able to disable automatic reduction of the fraction
|
1697 |
+
*
|
1698 |
+
*/
|
1699 |
+
Fraction['REDUCE'] = 1;
|
1700 |
|
1701 |
+
Fraction.prototype = {
|
|
|
|
|
|
|
1702 |
|
1703 |
+
"s": 1,
|
1704 |
+
"n": 0,
|
1705 |
+
"d": 1,
|
1706 |
|
1707 |
+
/**
|
1708 |
+
* Calculates the absolute value
|
1709 |
+
*
|
1710 |
+
* Ex: new Fraction(-4).abs() => 4
|
1711 |
+
**/
|
1712 |
+
"abs": function () {
|
1713 |
|
1714 |
+
return new Fraction(this["n"], this["d"]);
|
1715 |
+
},
|
|
|
1716 |
|
1717 |
+
/**
|
1718 |
+
* Inverts the sign of the current fraction
|
1719 |
+
*
|
1720 |
+
* Ex: new Fraction(-4).neg() => 4
|
1721 |
+
**/
|
1722 |
+
"neg": function () {
|
1723 |
|
1724 |
+
return new Fraction(-this["s"] * this["n"], this["d"]);
|
1725 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
1726 |
|
1727 |
+
/**
|
1728 |
+
* Adds two rational numbers
|
1729 |
+
*
|
1730 |
+
* Ex: new Fraction({n: 2, d: 3}).add("14.9") => 467 / 30
|
1731 |
+
**/
|
1732 |
+
"add": function (a, b) {
|
1733 |
+
|
1734 |
+
parse(a, b);
|
1735 |
+
return new Fraction(
|
1736 |
+
this["s"] * this["n"] * P["d"] + P["s"] * this["d"] * P["n"],
|
1737 |
+
this["d"] * P["d"]
|
1738 |
+
);
|
1739 |
+
},
|
1740 |
|
1741 |
+
/**
|
1742 |
+
* Subtracts two rational numbers
|
1743 |
+
*
|
1744 |
+
* Ex: new Fraction({n: 2, d: 3}).add("14.9") => -427 / 30
|
1745 |
+
**/
|
1746 |
+
"sub": function (a, b) {
|
1747 |
+
|
1748 |
+
parse(a, b);
|
1749 |
+
return new Fraction(
|
1750 |
+
this["s"] * this["n"] * P["d"] - P["s"] * this["d"] * P["n"],
|
1751 |
+
this["d"] * P["d"]
|
1752 |
+
);
|
1753 |
+
},
|
1754 |
|
1755 |
+
/**
|
1756 |
+
* Multiplies two rational numbers
|
1757 |
+
*
|
1758 |
+
* Ex: new Fraction("-17.(345)").mul(3) => 5776 / 111
|
1759 |
+
**/
|
1760 |
+
"mul": function (a, b) {
|
1761 |
+
|
1762 |
+
parse(a, b);
|
1763 |
+
return new Fraction(
|
1764 |
+
this["s"] * P["s"] * this["n"] * P["n"],
|
1765 |
+
this["d"] * P["d"]
|
1766 |
+
);
|
1767 |
+
},
|
1768 |
|
1769 |
+
/**
|
1770 |
+
* Divides two rational numbers
|
1771 |
+
*
|
1772 |
+
* Ex: new Fraction("-17.(345)").inverse().div(3)
|
1773 |
+
**/
|
1774 |
+
"div": function (a, b) {
|
1775 |
+
|
1776 |
+
parse(a, b);
|
1777 |
+
return new Fraction(
|
1778 |
+
this["s"] * P["s"] * this["n"] * P["d"],
|
1779 |
+
this["d"] * P["n"]
|
1780 |
+
);
|
1781 |
+
},
|
1782 |
|
1783 |
+
/**
|
1784 |
+
* Clones the actual object
|
1785 |
+
*
|
1786 |
+
* Ex: new Fraction("-17.(345)").clone()
|
1787 |
+
**/
|
1788 |
+
"clone": function () {
|
1789 |
+
return new Fraction(this);
|
1790 |
+
},
|
1791 |
|
1792 |
+
/**
|
1793 |
+
* Calculates the modulo of two rational numbers - a more precise fmod
|
1794 |
+
*
|
1795 |
+
* Ex: new Fraction('4.(3)').mod([7, 8]) => (13/3) % (7/8) = (5/6)
|
1796 |
+
**/
|
1797 |
+
"mod": function (a, b) {
|
1798 |
+
|
1799 |
+
if (isNaN(this['n']) || isNaN(this['d'])) {
|
1800 |
+
return new Fraction(NaN);
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
if (a === undefined) {
|
1804 |
+
return new Fraction(this["s"] * this["n"] % this["d"], 1);
|
1805 |
+
}
|
1806 |
+
|
1807 |
+
parse(a, b);
|
1808 |
+
if (0 === P["n"] && 0 === this["d"]) {
|
1809 |
+
Fraction(0, 0); // Throw div/0
|
1810 |
+
}
|
1811 |
+
|
1812 |
+
/*
|
1813 |
+
* First silly attempt, kinda slow
|
1814 |
+
*
|
1815 |
+
return that["sub"]({
|
1816 |
+
"n": num["n"] * Math.floor((this.n / this.d) / (num.n / num.d)),
|
1817 |
+
"d": num["d"],
|
1818 |
+
"s": this["s"]
|
1819 |
+
});*/
|
1820 |
+
|
1821 |
+
/*
|
1822 |
+
* New attempt: a1 / b1 = a2 / b2 * q + r
|
1823 |
+
* => b2 * a1 = a2 * b1 * q + b1 * b2 * r
|
1824 |
+
* => (b2 * a1 % a2 * b1) / (b1 * b2)
|
1825 |
+
*/
|
1826 |
+
return new Fraction(
|
1827 |
+
(this["s"] * P["d"] * this["n"]) % (P["n"] * this["d"]),
|
1828 |
+
P["d"] * this["d"]
|
1829 |
+
);
|
1830 |
+
},
|
1831 |
|
1832 |
+
/**
|
1833 |
+
* Calculates the fractional gcd of two rational numbers
|
1834 |
+
*
|
1835 |
+
* Ex: new Fraction(5,8).gcd(3,7) => 1/56
|
1836 |
+
*/
|
1837 |
+
"gcd": function (a, b) {
|
1838 |
|
1839 |
+
parse(a, b);
|
1840 |
|
1841 |
+
// gcd(a / b, c / d) = gcd(a, c) / lcm(b, d)
|
|
|
|
|
|
|
|
|
1842 |
|
1843 |
+
return new Fraction(gcd(P["n"], this["n"]), P["d"] * this["d"] / gcd(P["d"], this["d"]));
|
1844 |
+
},
|
|
|
1845 |
|
1846 |
+
/**
|
1847 |
+
* Calculates the fractional lcm of two rational numbers
|
1848 |
+
*
|
1849 |
+
* Ex: new Fraction(5,8).lcm(3,7) => 15
|
1850 |
+
*/
|
1851 |
+
"lcm": function (a, b) {
|
|
|
1852 |
|
1853 |
+
parse(a, b);
|
|
|
|
|
|
|
|
|
|
|
1854 |
|
1855 |
+
// lcm(a / b, c / d) = lcm(a, c) / gcd(b, d)
|
1856 |
|
1857 |
+
if (P["n"] === 0 && this["n"] === 0) {
|
1858 |
+
return new Fraction;
|
1859 |
+
}
|
1860 |
+
return new Fraction(P["n"] * this["n"] / gcd(P["n"], this["n"]), gcd(P["d"], this["d"]));
|
1861 |
+
},
|
1862 |
|
1863 |
+
/**
|
1864 |
+
* Calculates the ceil of a rational number
|
1865 |
+
*
|
1866 |
+
* Ex: new Fraction('4.(3)').ceil() => (5 / 1)
|
1867 |
+
**/
|
1868 |
+
"ceil": function (places) {
|
1869 |
|
1870 |
+
places = Math.pow(10, places || 0);
|
1871 |
|
1872 |
+
if (isNaN(this["n"]) || isNaN(this["d"])) {
|
1873 |
+
return new Fraction(NaN);
|
1874 |
+
}
|
1875 |
+
return new Fraction(Math.ceil(places * this["s"] * this["n"] / this["d"]), places);
|
1876 |
+
},
|
1877 |
|
1878 |
+
/**
|
1879 |
+
* Calculates the floor of a rational number
|
1880 |
+
*
|
1881 |
+
* Ex: new Fraction('4.(3)').floor() => (4 / 1)
|
1882 |
+
**/
|
1883 |
+
"floor": function (places) {
|
1884 |
|
1885 |
+
places = Math.pow(10, places || 0);
|
|
|
1886 |
|
1887 |
+
if (isNaN(this["n"]) || isNaN(this["d"])) {
|
1888 |
+
return new Fraction(NaN);
|
1889 |
+
}
|
1890 |
+
return new Fraction(Math.floor(places * this["s"] * this["n"] / this["d"]), places);
|
1891 |
+
},
|
1892 |
|
1893 |
+
/**
|
1894 |
+
* Rounds a rational numbers
|
1895 |
+
*
|
1896 |
+
* Ex: new Fraction('4.(3)').round() => (4 / 1)
|
1897 |
+
**/
|
1898 |
+
"round": function (places) {
|
1899 |
+
|
1900 |
+
places = Math.pow(10, places || 0);
|
1901 |
+
|
1902 |
+
if (isNaN(this["n"]) || isNaN(this["d"])) {
|
1903 |
+
return new Fraction(NaN);
|
1904 |
}
|
1905 |
+
return new Fraction(Math.round(places * this["s"] * this["n"] / this["d"]), places);
|
1906 |
+
},
|
1907 |
|
1908 |
+
/**
|
1909 |
+
* Gets the inverse of the fraction, means numerator and denumerator are exchanged
|
1910 |
+
*
|
1911 |
+
* Ex: new Fraction([-3, 4]).inverse() => -4 / 3
|
1912 |
+
**/
|
1913 |
+
"inverse": function () {
|
1914 |
|
1915 |
+
return new Fraction(this["s"] * this["d"], this["n"]);
|
1916 |
+
},
|
1917 |
|
1918 |
+
/**
|
1919 |
+
* Calculates the fraction to some integer exponent
|
1920 |
+
*
|
1921 |
+
* Ex: new Fraction(-1,2).pow(-3) => -8
|
1922 |
+
*/
|
1923 |
+
"pow": function (m) {
|
1924 |
|
1925 |
+
if (m < 0) {
|
1926 |
+
return new Fraction(Math.pow(this['s'] * this["d"], -m), Math.pow(this["n"], -m));
|
1927 |
+
} else {
|
1928 |
+
return new Fraction(Math.pow(this['s'] * this["n"], m), Math.pow(this["d"], m));
|
1929 |
+
}
|
1930 |
+
},
|
|
|
|
|
|
|
1931 |
|
1932 |
+
/**
|
1933 |
+
* Check if two rational numbers are the same
|
1934 |
+
*
|
1935 |
+
* Ex: new Fraction(19.6).equals([98, 5]);
|
1936 |
+
**/
|
1937 |
+
"equals": function (a, b) {
|
1938 |
+
|
1939 |
+
parse(a, b);
|
1940 |
+
return this["s"] * this["n"] * P["d"] === P["s"] * P["n"] * this["d"]; // Same as compare() === 0
|
1941 |
+
},
|
1942 |
|
1943 |
+
/**
|
1944 |
+
* Check if two rational numbers are the same
|
1945 |
+
*
|
1946 |
+
* Ex: new Fraction(19.6).equals([98, 5]);
|
1947 |
+
**/
|
1948 |
+
"compare": function (a, b) {
|
1949 |
+
|
1950 |
+
parse(a, b);
|
1951 |
+
var t = (this["s"] * this["n"] * P["d"] - P["s"] * P["n"] * this["d"]);
|
1952 |
+
return (0 < t) - (t < 0);
|
1953 |
+
},
|
1954 |
|
1955 |
+
/**
|
1956 |
+
* Check if two rational numbers are divisible
|
1957 |
+
*
|
1958 |
+
* Ex: new Fraction(19.6).divisible(1.5);
|
1959 |
+
*/
|
1960 |
+
"divisible": function (a, b) {
|
1961 |
|
1962 |
+
parse(a, b);
|
1963 |
+
return !(!(P["n"] * this["d"]) || ((this["n"] * P["d"]) % (P["n"] * this["d"])));
|
1964 |
+
},
|
1965 |
|
1966 |
+
/**
|
1967 |
+
* Returns a decimal representation of the fraction
|
1968 |
+
*
|
1969 |
+
* Ex: new Fraction("100.'91823'").valueOf() => 100.91823918239183
|
1970 |
+
**/
|
1971 |
+
'valueOf': function () {
|
1972 |
|
1973 |
+
return this["s"] * this["n"] / this["d"];
|
1974 |
+
},
|
|
|
1975 |
|
1976 |
+
/**
|
1977 |
+
* Returns a string-fraction representation of a Fraction object
|
1978 |
+
*
|
1979 |
+
* Ex: new Fraction("1.'3'").toFraction() => "4 1/3"
|
1980 |
+
**/
|
1981 |
+
'toFraction': function (excludeWhole) {
|
1982 |
|
1983 |
+
var whole, str = "";
|
1984 |
+
var n = this["n"];
|
1985 |
+
var d = this["d"];
|
1986 |
+
if (this["s"] < 0) {
|
1987 |
+
str += '-';
|
1988 |
+
}
|
1989 |
|
1990 |
+
if (d === 1) {
|
1991 |
+
str += n;
|
1992 |
+
} else {
|
1993 |
|
1994 |
+
if (excludeWhole && (whole = Math.floor(n / d)) > 0) {
|
1995 |
+
str += whole;
|
1996 |
+
str += " ";
|
1997 |
+
n %= d;
|
1998 |
+
}
|
1999 |
|
2000 |
+
str += n;
|
2001 |
+
str += '/';
|
2002 |
+
str += d;
|
2003 |
+
}
|
2004 |
+
return str;
|
2005 |
+
},
|
2006 |
|
2007 |
+
/**
|
2008 |
+
* Returns a latex representation of a Fraction object
|
2009 |
+
*
|
2010 |
+
* Ex: new Fraction("1.'3'").toLatex() => "\frac{4}{3}"
|
2011 |
+
**/
|
2012 |
+
'toLatex': function (excludeWhole) {
|
2013 |
|
2014 |
+
var whole, str = "";
|
2015 |
+
var n = this["n"];
|
2016 |
+
var d = this["d"];
|
2017 |
+
if (this["s"] < 0) {
|
2018 |
+
str += '-';
|
2019 |
}
|
|
|
2020 |
|
2021 |
+
if (d === 1) {
|
2022 |
+
str += n;
|
2023 |
+
} else {
|
2024 |
|
2025 |
+
if (excludeWhole && (whole = Math.floor(n / d)) > 0) {
|
2026 |
+
str += whole;
|
2027 |
+
n %= d;
|
2028 |
+
}
|
2029 |
|
2030 |
+
str += "\\frac{";
|
2031 |
+
str += n;
|
2032 |
+
str += '}{';
|
2033 |
+
str += d;
|
2034 |
+
str += '}';
|
2035 |
+
}
|
2036 |
+
return str;
|
2037 |
+
},
|
|
|
2038 |
|
2039 |
+
/**
|
2040 |
+
* Returns an array of continued fraction elements
|
2041 |
+
*
|
2042 |
+
* Ex: new Fraction("7/8").toContinued() => [0,1,7]
|
2043 |
+
*/
|
2044 |
+
'toContinued': function () {
|
2045 |
|
2046 |
+
var t;
|
2047 |
+
var a = this['n'];
|
2048 |
+
var b = this['d'];
|
2049 |
+
var res = [];
|
2050 |
|
2051 |
+
do {
|
2052 |
+
res.push(Math.floor(a / b));
|
2053 |
+
t = a % b;
|
2054 |
+
a = b;
|
2055 |
+
b = t;
|
2056 |
+
} while (a !== 1);
|
|
|
|
|
|
|
|
|
2057 |
|
2058 |
+
return res;
|
2059 |
+
},
|
2060 |
|
2061 |
+
/**
|
2062 |
+
* Creates a string representation of a fraction with all digits
|
2063 |
+
*
|
2064 |
+
* Ex: new Fraction("100.'91823'").toString() => "100.(91823)"
|
2065 |
+
**/
|
2066 |
+
'toString': function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
2067 |
|
2068 |
+
var g;
|
2069 |
+
var N = this["n"];
|
2070 |
+
var D = this["d"];
|
|
|
|
|
2071 |
|
2072 |
+
if (isNaN(N) || isNaN(D)) {
|
2073 |
+
return "NaN";
|
2074 |
+
}
|
2075 |
|
2076 |
+
if (!Fraction['REDUCE']) {
|
2077 |
+
g = gcd(N, D);
|
2078 |
+
N /= g;
|
2079 |
+
D /= g;
|
2080 |
+
}
|
2081 |
+
|
2082 |
+
var p = String(N).split(""); // Numerator chars
|
2083 |
+
var t = 0; // Tmp var
|
2084 |
+
|
2085 |
+
var ret = [~this["s"] ? "" : "-", "", ""]; // Return array, [0] is zero sign, [1] before comma, [2] after
|
2086 |
+
var zeros = ""; // Collection variable for zeros
|
2087 |
+
|
2088 |
+
var cycLen = cycleLen(N, D); // Cycle length
|
2089 |
+
var cycOff = cycleStart(N, D, cycLen); // Cycle start
|
2090 |
+
|
2091 |
+
var j = -1;
|
2092 |
+
var n = 1; // str index
|
2093 |
+
|
2094 |
+
// rough estimate to fill zeros
|
2095 |
+
var length = 15 + cycLen + cycOff + p.length; // 15 = decimal places when no repitation
|
2096 |
+
|
2097 |
+
for (var i = 0; i < length; i++, t *= 10) {
|
2098 |
+
|
2099 |
+
if (i < p.length) {
|
2100 |
+
t += Number(p[i]);
|
2101 |
+
} else {
|
2102 |
+
n = 2;
|
2103 |
+
j++; // Start now => after comma
|
2104 |
+
}
|
2105 |
+
|
2106 |
+
if (cycLen > 0) { // If we have a repeating part
|
2107 |
+
if (j === cycOff) {
|
2108 |
+
ret[n] += zeros + "(";
|
2109 |
+
zeros = "";
|
2110 |
+
} else if (j === cycLen + cycOff) {
|
2111 |
+
ret[n] += zeros + ")";
|
2112 |
+
break;
|
2113 |
+
}
|
2114 |
+
}
|
2115 |
+
|
2116 |
+
if (t >= D) {
|
2117 |
+
ret[n] += zeros + ((t / D) | 0); // Flush zeros, Add current digit
|
2118 |
+
zeros = "";
|
2119 |
+
t = t % D;
|
2120 |
+
} else if (n > 1) { // Add zeros to the zero buffer
|
2121 |
+
zeros += "0";
|
2122 |
+
} else if (ret[n]) { // If before comma, add zero only if already something was added
|
2123 |
+
ret[n] += "0";
|
2124 |
+
}
|
2125 |
+
}
|
2126 |
+
|
2127 |
+
// If it's empty, it's a leading zero only
|
2128 |
+
ret[0] += ret[1] || "0";
|
2129 |
+
|
2130 |
+
// If there is something after the comma, add the comma sign
|
2131 |
+
if (ret[2]) {
|
2132 |
+
return ret[0] + "." + ret[2];
|
2133 |
+
}
|
2134 |
+
return ret[0];
|
2135 |
+
}
|
2136 |
};
|
2137 |
+
root['Fraction'] = Fraction;
|
2138 |
|
2139 |
+
})(this);
|
2140 |
+
N2Require('FormElementLayerPicker', ['FormElement'], [], function ($, scope, undefined) {
|
2141 |
|
2142 |
+
var STATUS = {
|
2143 |
+
INITIALIZED: 0,
|
2144 |
+
PICK_PARENT: 1,
|
2145 |
+
PICK_CHILD: 2,
|
2146 |
+
PICK_PARENT_ALIGN: 3,
|
2147 |
+
PICK_CHILD_ALIGN: 4
|
2148 |
+
},
|
2149 |
+
OVERLAYS = '<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="top" />' +
|
2150 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="top" style="left:33%;top:0;" />' +
|
2151 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="top" style="left:66%;top:0;width:34%;" />' +
|
2152 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="middle" style="left:0;top:33%;" />' +
|
2153 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="middle" style="left:33%;top:33%; " />' +
|
2154 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="middle" style="left:66%;top:33%;width:34%;" />' +
|
2155 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="bottom" style="left:0;top:66%;height:34%;" />' +
|
2156 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="bottom" style="left:33%;top:66%;height:34%;" />' +
|
2157 |
+
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="bottom" style="left:66%;top:66%;width:34%;height:34%;" />';
|
2158 |
|
2159 |
+
function FormElementLayerPicker(id) {
|
2160 |
+
this.status = 0;
|
2161 |
+
this.element = $('#' + id);
|
2162 |
+
this.$container = $('.n2-ss-parent-picker');
|
2163 |
+
this.overlays = null;
|
2164 |
+
|
2165 |
+
this.aligns = this.element.parent().parent().siblings();
|
2166 |
+
|
2167 |
+
this.picker = this.element.siblings('.n2-ss-layer-picker')
|
2168 |
+
.on({
|
2169 |
+
click: $.proxy(function () {
|
2170 |
+
this.change('');
|
2171 |
+
}, this)
|
2172 |
+
});
|
2173 |
+
|
2174 |
+
|
2175 |
+
scope.FormElement.prototype.constructor.apply(this, arguments);
|
2176 |
+
};
|
2177 |
+
|
2178 |
+
|
2179 |
+
FormElementLayerPicker.prototype = Object.create(scope.FormElement.prototype);
|
2180 |
+
FormElementLayerPicker.prototype.constructor = FormElementLayerPicker;
|
2181 |
+
|
2182 |
+
FormElementLayerPicker.prototype.click = function (e) {
|
2183 |
+
if (!$('#n2-admin').hasClass('n2-ss-mode-desktopPortrait')) {
|
2184 |
+
nextend.notificationCenter.notice(n2_('To chain layers together, please switch to desktop portrait mode!'));
|
2185 |
+
return;
|
2186 |
+
}
|
2187 |
+
if (this.status == STATUS.INITIALIZED) {
|
2188 |
+
this.data = {
|
2189 |
+
parent: null,
|
2190 |
+
parentVAlign: null,
|
2191 |
+
parentHAlign: null,
|
2192 |
+
child: null,
|
2193 |
+
childVAlign: null,
|
2194 |
+
childHAlign: null,
|
2195 |
+
};
|
2196 |
+
|
2197 |
+
$('body').on('mousedown.n2-ss-parent-linker', $.proxy(function (e) {
|
2198 |
+
var $el = $(e.target);
|
2199 |
+
if (!$el.hasClass('n2-ss-picker-overlay') && !$el.hasClass('n2-ss-picker-overlay-tile')) {
|
2200 |
+
this.destroy();
|
2201 |
+
}
|
2202 |
+
}, this));
|
2203 |
+
|
2204 |
+
NextendEsc.add($.proxy(function () {
|
2205 |
+
this.destroy();
|
2206 |
+
return false;
|
2207 |
+
}, this));
|
2208 |
+
|
2209 |
+
this.pickParent(e);
|
2210 |
+
} else {
|
2211 |
+
this.data = null;
|
2212 |
+
this.change('');
|
2213 |
+
this.destroy();
|
2214 |
+
}
|
2215 |
+
}
|
2216 |
+
|
2217 |
+
FormElementLayerPicker.prototype.getAbsoluteLayers = function (container) {
|
2218 |
+
var layers = [],
|
2219 |
+
_layers = container.getSortedLayers();
|
2220 |
+
for (var i = 0; i < _layers.length; i++) {
|
2221 |
+
switch (_layers[i].placement.getType()) {
|
2222 |
+
case 'absolute':
|
2223 |
+
layers.push(_layers[i].layer[0]);
|
2224 |
+
break;
|
2225 |
+
case 'group':
|
2226 |
+
layers.push.apply(layers, this.getAbsoluteLayers(_layers[i].container));
|
2227 |
+
break;
|
2228 |
+
}
|
2229 |
+
}
|
2230 |
+
|
2231 |
+
return layers;
|
2232 |
+
}
|
2233 |
+
|
2234 |
+
FormElementLayerPicker.prototype.pickParent = function (e) {
|
2235 |
+
var canvasManager = nextend.smartSlider.canvasManager,
|
2236 |
+
layers = $(this.getAbsoluteLayers(canvasManager.mainContainer.container));
|
2237 |
+
this.tempLayers = layers;
|
2238 |
+
if (layers.length == 0) {
|
2239 |
+
this.destroy();
|
2240 |
+
} else {
|
2241 |
+
|
2242 |
+
this.status = STATUS.PICK_PARENT;
|
2243 |
+
nextend.tooltipMouse.show(n2_('Pick the parent layer!'), e);
|
2244 |
+
|
2245 |
+
var overlays = $('<div class="n2-ss-picker-overlay"></div>').appendTo(layers)
|
2246 |
+
.on('click', $.proxy(function (e) {
|
2247 |
+
e.preventDefault();
|
2248 |
+
e.stopPropagation();
|
2249 |
+
var $layer = $(e.currentTarget).parent(),
|
2250 |
+
layer = $layer.data('layerObject');
|
2251 |
+
|
2252 |
+
this.data.parent = $layer;
|
2253 |
+
|
2254 |
+
this._destroy();
|
2255 |
+
this.pickParentAlign(e);
|
2256 |
+
|
2257 |
+
}, this));
|
2258 |
+
}
|
2259 |
+
}
|
2260 |
+
|
2261 |
+
FormElementLayerPicker.prototype.pickParentAlign = function (e) {
|
2262 |
+
this.status = STATUS.PICK_PARENT_ALIGN;
|
2263 |
+
nextend.tooltipMouse.show(n2_('Pick the align point of the parent layer!'), e);
|
2264 |
+
|
2265 |
+
var overlays = $(OVERLAYS).appendTo(this.data.parent)
|
2266 |
+
.on('click', $.proxy(function (e) {
|
2267 |
+
e.preventDefault();
|
2268 |
+
e.stopPropagation();
|
2269 |
+
|
2270 |
+
var $currentTarget = $(e.currentTarget);
|
2271 |
+
this.data.parentHAlign = $currentTarget.data('align');
|
2272 |
+
this.data.parentVAlign = $currentTarget.data('valign');
|
2273 |
+
$currentTarget.off('click').addClass('n2-active');
|
2274 |
+
|
2275 |
+
overlays.not($currentTarget).remove();
|
2276 |
+
this.pickChild(e);
|
2277 |
+
}, this));
|
2278 |
+
}
|
2279 |
+
|
2280 |
+
FormElementLayerPicker.prototype.pickChild = function (e) {
|
2281 |
+
this.status = STATUS.PICK_CHILD;
|
2282 |
+
nextend.tooltipMouse.show(n2_('Pick the child layer!'), e);
|
2283 |
+
|
2284 |
+
var layers = this.tempLayers.not(this.data.parent);
|
2285 |
+
delete this.tempLayers;
|
2286 |
+
|
2287 |
+
/**
|
2288 |
+
* Parent layers can not be child of one of their child layers.
|
2289 |
+
* @param layer
|
2290 |
+
*/
|
2291 |
+
var recursiveRemoveParents = function (layer) {
|
2292 |
+
var pID = layer.data('layerObject').getProperty('parentid');
|
2293 |
+
if (pID && pID != '') {
|
2294 |
+
recursiveRemoveParents($('#' + pID));
|
2295 |
+
}
|
2296 |
+
layers = layers.not(layer);
|
2297 |
+
};
|
2298 |
+
|
2299 |
+
// Possible parent layers of the selected parent layer can't be the child of the selected parent :)
|
2300 |
+
recursiveRemoveParents(this.data.parent);
|
2301 |
+
|
2302 |
+
if (!layers.length) {
|
2303 |
+
nextend.notificationCenter.error(n2_('There is not any layer available to be child of the selected layer!'));
|
2304 |
+
this.destroy();
|
2305 |
+
return;
|
2306 |
+
}
|
2307 |
+
|
2308 |
+
var overlays = $('<div class="n2-ss-picker-overlay"></div>').appendTo(layers)
|
2309 |
+
.on('click', $.proxy(function (e) {
|
2310 |
+
e.preventDefault();
|
2311 |
+
e.stopPropagation();
|
2312 |
+
var $layer = $(e.currentTarget).parent(),
|
2313 |
+
layer = $layer.data('layerObject');
|
2314 |
+
|
2315 |
+
this.data.child = $layer;
|
2316 |
+
|
2317 |
+
overlays.remove();
|
2318 |
+
this.pickChildAlign(e);
|
2319 |
+
|
2320 |
+
}, this));
|
2321 |
+
}
|
2322 |
+
|
2323 |
+
FormElementLayerPicker.prototype.pickChildAlign = function (e) {
|
2324 |
+
this.status = STATUS.PICK_CHILD_ALIGN;
|
2325 |
+
|
2326 |
+
nextend.tooltipMouse.show(n2_('Pick the align point of the child layer!'), e);
|
2327 |
+
|
2328 |
+
var overlays = $(OVERLAYS).appendTo(this.data.child)
|
2329 |
+
.on('click', $.proxy(function (e) {
|
2330 |
+
e.preventDefault();
|
2331 |
+
e.stopPropagation();
|
2332 |
+
|
2333 |
+
var $currentTarget = $(e.currentTarget);
|
2334 |
+
this.data.childHAlign = $currentTarget.data('align');
|
2335 |
+
this.data.childVAlign = $currentTarget.data('valign');
|
2336 |
+
|
2337 |
+
this.done();
|
2338 |
+
|
2339 |
+
}, this));
|
2340 |
+
}
|
2341 |
+
|
2342 |
+
FormElementLayerPicker.prototype._destroy = function () {
|
2343 |
+
$('.n2-ss-picker-overlay').remove();
|
2344 |
+
$('.n2-ss-picker-overlay-tile').remove();
|
2345 |
+
}
|
2346 |
+
|
2347 |
+
FormElementLayerPicker.prototype.destroy = function () {
|
2348 |
+
nextend.tooltipMouse.hide();
|
2349 |
+
this._destroy();
|
2350 |
+
$('body').off('.n2-ss-parent-linker');
|
2351 |
+
NextendEsc.pop();
|
2352 |
+
|
2353 |
+
this.status = STATUS.INITIALIZED;
|
2354 |
+
}
|
2355 |
+
|
2356 |
+
FormElementLayerPicker.prototype.done = function () {
|
2357 |
+
|
2358 |
+
this.data.child.data('layerObject').placement.current
|
2359 |
+
.parentPicked(this.data.parent.data('layerObject'), this.data.parentHAlign, this.data.parentVAlign, this.data.childHAlign, this.data.childVAlign);
|
2360 |
+
this.destroy();
|
2361 |
+
}
|
2362 |
+
|
2363 |
+
FormElementLayerPicker.prototype.change = function (value) {
|
2364 |
+
this.element.val(value).trigger('change');
|
2365 |
+
this._setValue(value);
|
2366 |
+
this.triggerOutsideChange();
|
2367 |
+
};
|
2368 |
+
|
2369 |
+
FormElementLayerPicker.prototype.insideChange = function (value) {
|
2370 |
+
this.element.val(value);
|
2371 |
+
this._setValue(value);
|
2372 |
+
|
2373 |
+
this.triggerInsideChange();
|
2374 |
+
};
|
2375 |
+
|
2376 |
+
FormElementLayerPicker.prototype._setValue = function (value) {
|
2377 |
+
if (value && value != '') {
|
2378 |
+
this.$container.css('display', '');
|
2379 |
+
} else {
|
2380 |
+
this.$container.css('display', 'none');
|
2381 |
+
}
|
2382 |
+
};
|
2383 |
+
|
2384 |
+
return FormElementLayerPicker;
|
2385 |
+
});
|
2386 |
+
N2Require('FormElementPostAnimationManager', ['FormElementAnimationManager'], [], function ($, scope, undefined) {
|
2387 |
+
|
2388 |
+
function FormElementPostAnimationManager() {
|
2389 |
+
scope.FormElementAnimationManager.prototype.constructor.apply(this, arguments);
|
2390 |
+
};
|
2391 |
+
|
2392 |
+
FormElementPostAnimationManager.prototype = Object.create(scope.FormElementAnimationManager.prototype);
|
2393 |
+
FormElementPostAnimationManager.prototype.constructor = FormElementPostAnimationManager;
|
2394 |
+
|
2395 |
+
FormElementPostAnimationManager.prototype.clear = function (e) {
|
2396 |
+
e.preventDefault();
|
2397 |
+
e.stopPropagation();
|
2398 |
+
var data = this.element.val().split('|*|');
|
2399 |
+
data[2] = '';
|
2400 |
+
this.val(data.join('|*|'));
|
2401 |
+
};
|
2402 |
+
FormElementPostAnimationManager.prototype.updateName = function (value) {
|
2403 |
+
var data = value.split('|*|');
|
2404 |
+
value = data[2];
|
2405 |
+
if (value == '') {
|
2406 |
+
value = n2_('Disabled');
|
2407 |
+
} else if (value.split('||').length > 1) {
|
2408 |
+
value = n2_('Multiple animations');
|
2409 |
+
} else {
|
2410 |
+
value = n2_('Single animation');
|
2411 |
+
}
|
2412 |
+
this.name.val(value);
|
2413 |
+
};
|
2414 |
+
|
2415 |
+
return FormElementPostAnimationManager;
|
2416 |
+
});
|
2417 |
+
N2Require('FormElementSliderType', [], [], function ($, scope, undefined) {
|
2418 |
+
|
2419 |
+
function FormElementSliderType(id) {
|
2420 |
+
this.element = $('#' + id);
|
2421 |
+
|
2422 |
+
this.setAttribute();
|
2423 |
+
|
2424 |
+
this.element.on('nextendChange', $.proxy(this.setAttribute, this));
|
2425 |
+
};
|
2426 |
+
|
2427 |
+
FormElementSliderType.prototype.setAttribute = function () {
|
2428 |
+
|
2429 |
+
$('#n2-admin').attr('data-slider-type', this.element.val());
|
2430 |
+
|
2431 |
+
if (this.element.val() == 'block') {
|
2432 |
+
$('.n2-fm-shadow').trigger('click');
|
2433 |
+
}
|
2434 |
+
};
|
2435 |
+
|
2436 |
+
return FormElementSliderType;
|
2437 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2438 |
|
2439 |
+
N2Require('FormElementSliderWidgetArea', ['FormElement'], [], function ($, scope, undefined) {
|
2440 |
+
|
2441 |
+
function FormElementSliderWidgetArea(id) {
|
2442 |
+
this.element = $('#' + id);
|
2443 |
+
|
2444 |
+
this.area = $('#' + id + '_area');
|
2445 |
+
|
2446 |
+
this.areas = this.area.find('.n2-area');
|
2447 |
+
|
2448 |
+
this.areas.on('click', $.proxy(this.chooseArea, this));
|
2449 |
+
|
2450 |
+
scope.FormElement.prototype.constructor.apply(this, arguments);
|
2451 |
+
};
|
2452 |
+
|
2453 |
+
|
2454 |
+
FormElementSliderWidgetArea.prototype = Object.create(scope.FormElement.prototype);
|
2455 |
+
FormElementSliderWidgetArea.prototype.constructor = FormElementSliderWidgetArea;
|
2456 |
+
|
2457 |
+
|
2458 |
+
FormElementSliderWidgetArea.prototype.chooseArea = function (e) {
|
2459 |
+
var value = parseInt($(e.target).data('area'));
|
2460 |
+
|
2461 |
+
this.element.val(value);
|
2462 |
+
this.setSelected(value);
|
2463 |
+
|
2464 |
+
this.triggerOutsideChange();
|
2465 |
+
};
|
2466 |
+
|
2467 |
+
FormElementSliderWidgetArea.prototype.insideChange = function (value) {
|
2468 |
+
value = parseInt(value);
|
2469 |
+
this.element.val(value);
|
2470 |
+
this.setSelected(value);
|
2471 |
+
|
2472 |
+
this.triggerInsideChange();
|
2473 |
+
};
|
2474 |
+
|
2475 |
+
FormElementSliderWidgetArea.prototype.setSelected = function (index) {
|
2476 |
+
this.areas.removeClass('n2-active');
|
2477 |
+
this.areas.eq(index - 1).addClass('n2-active');
|
2478 |
+
};
|
2479 |
+
|
2480 |
+
return FormElementSliderWidgetArea;
|
2481 |
+
});
|
2482 |
|
2483 |
+
N2Require('FormElementWidgetPosition', [], [], function ($, scope, undefined) {
|
2484 |
+
|
2485 |
+
function FormElementWidgetPosition(id) {
|
2486 |
+
|
2487 |
+
this.element = $('#' + id + '-mode');
|
2488 |
+
this.container = this.element.closest('.n2-form-element-mixed');
|
2489 |
+
|
2490 |
+
this.tabs = this.container.find('> .n2-mixed-group');
|
2491 |
+
|
2492 |
+
this.element.on('nextendChange', $.proxy(this.onChange, this));
|
2493 |
+
|
2494 |
+
this.onChange();
|
2495 |
+
};
|
2496 |
+
|
2497 |
+
FormElementWidgetPosition.prototype.onChange = function () {
|
2498 |
+
var value = this.element.val();
|
2499 |
+
|
2500 |
+
if (value == 'advanced') {
|
2501 |
+
this.tabs.eq(2).css('display', '');
|
2502 |
+
this.tabs.eq(1).css('display', 'none');
|
2503 |
+
} else {
|
2504 |
+
this.tabs.eq(1).css('display', '');
|
2505 |
+
this.tabs.eq(2).css('display', 'none');
|
2506 |
+
}
|
2507 |
+
};
|
2508 |
+
|
2509 |
+
return FormElementWidgetPosition;
|
2510 |
+
});
|
2511 |
|
2512 |
+
N2Require('SmartSliderGeneratorRecords', [], [], function ($, scope, undefined) {
|
2513 |
+
|
2514 |
+
function SmartSliderGeneratorRecords(ajaxUrl) {
|
2515 |
+
this.ajaxUrl = ajaxUrl;
|
2516 |
+
|
2517 |
+
$("#generatorrecord-viewer").on("click", $.proxy(this.showRecords, this));
|
2518 |
+
};
|
2519 |
+
|
2520 |
+
SmartSliderGeneratorRecords.prototype.showRecords = function (e) {
|
2521 |
+
e.preventDefault();
|
2522 |
+
NextendAjaxHelper.ajax({
|
2523 |
+
type: "POST",
|
2524 |
+
url: this.ajaxUrl,
|
2525 |
+
data: $("#smartslider-form").serialize(),
|
2526 |
+
dataType: "json"
|
2527 |
+
}).done(function (response) {
|
2528 |
+
var modal = new NextendModal({
|
2529 |
+
zero: {
|
2530 |
+
size: [
|
2531 |
+
1300,
|
2532 |
+
700
|
2533 |
+
],
|
2534 |
+
title: "Records",
|
2535 |
+
content: response.data.html
|
2536 |
+
}
|
2537 |
+
}, true);
|
2538 |
+
modal.content.css('overflow', 'auto');
|
2539 |
+
}).error(function (response) {
|
2540 |
+
if (response.status == 200) {
|
2541 |
+
var modal = new NextendModal({
|
2542 |
+
zero: {
|
2543 |
+
size: [
|
2544 |
+
1300,
|
2545 |
+
700
|
2546 |
+
],
|
2547 |
+
title: "Response",
|
2548 |
+
content: response.responseText
|
2549 |
+
}
|
2550 |
+
}, true);
|
2551 |
+
modal.content.css('overflow', 'auto');
|
2552 |
+
}
|
2553 |
+
});
|
2554 |
+
};
|
2555 |
+
|
2556 |
+
return SmartSliderGeneratorRecords;
|
2557 |
+
});
|
2558 |
+
N2Require('QuickSlides', [], [], function ($, scope, undefined) {
|
2559 |
+
|
2560 |
+
function QuickSlides(ajaxUrl) {
|
2561 |
+
|
2562 |
+
var button = $('#n2-quick-slides-edit');
|
2563 |
+
if (button.length < 1) {
|
2564 |
+
return;
|
2565 |
+
}
|
2566 |
+
|
2567 |
+
this.ajaxUrl = ajaxUrl;
|
2568 |
+
|
2569 |
+
button.on('click', $.proxy(this.openEdit, this));
|
2570 |
+
};
|
2571 |
+
|
2572 |
+
QuickSlides.prototype.openEdit = function (e) {
|
2573 |
+
e.preventDefault();
|
2574 |
+
var slides = $('#n2-ss-slides .n2-box-slide');
|
2575 |
+
|
2576 |
+
var that = this;
|
2577 |
+
this.modal = new NextendModal({
|
2578 |
+
zero: {
|
2579 |
+
fit: true,
|
2580 |
+
fitX: false,
|
2581 |
+
overflow: 'auto',
|
2582 |
+
size: [
|
2583 |
+
1200,
|
2584 |
+
700
|
2585 |
+
],
|
2586 |
+
title: n2_('Quick Edit - Slides'),
|
2587 |
+
back: false,
|
2588 |
+
close: true,
|
2589 |
+
content: '<form class="n2-form"><table></table></form>',
|
2590 |
+
controls: [
|
2591 |
+
'<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">' + n2_('Save') + '</a>'
|
2592 |
+
],
|
2593 |
+
fn: {
|
2594 |
+
show: function () {
|
2595 |
+
|
2596 |
+
var button = this.controls.find('.n2-button-green'),
|
2597 |
+
form = this.content.find('.n2-form').on('submit', function (e) {
|
2598 |
+
e.preventDefault();
|
2599 |
+
button.trigger('click');
|
2600 |
+
}),
|
2601 |
+
table = form.find('table');
|
2602 |
+
|
2603 |
+
slides.each($.proxy(function (i, el) {
|
2604 |
+
var slide = $(el),
|
2605 |
+
tr = $('<tr />').appendTo(table),
|
2606 |
+
id = slide.data('slideid');
|
2607 |
+
tr.append($('<td />').append('<img src="' + slide.data('image') + '" style="width:100px;"/>'));
|
2608 |
+
tr.append($('<td />').append(that.createInput('Name', 'title-' + id, slide.data('title'), 'width: 240px;')));
|
2609 |
+
tr.append($('<td />').append(that.createTextarea('Description', 'description-' + id, slide.data('description'), 'width: 330px;height:24px;')));
|
2610 |
+
var link = slide.data('link').split('|*|');
|
2611 |
+
tr.append($('<td />').append(that.createLink('Link', 'link-' + id, link[0], 'width: 180px;')));
|
2612 |
+
tr.append($('<td />').append(that.createTarget('Target', 'target-' + id, link.length > 1 ? link[1] : '_self', '')));
|
2613 |
+
|
2614 |
+
new N2Classes.FormElementUrl('link-' + id, nextend.NextendElementUrlParams);
|
2615 |
+
|
2616 |
+
}, this));
|
2617 |
+
|
2618 |
+
|
2619 |
+
button.on('click', $.proxy(function (e) {
|
2620 |
+
|
2621 |
+
var changed = {};
|
2622 |
+
slides.each($.proxy(function (i, el) {
|
2623 |
+
var slide = $(el),
|
2624 |
+
id = slide.data('slideid'),
|
2625 |
+
name = $('#title-' + id).val(),
|
2626 |
+
description = $('#description-' + id).val(),
|
2627 |
+
link = $('#link-' + id).val() + '|*|' + $('#target-' + id).val();
|
2628 |
+
|
2629 |
+
if (name != slide.data('title') || description != slide.data('description') || link != slide.data('link')) {
|
2630 |
+
changed[id] = {
|
2631 |
+
name: name,
|
2632 |
+
description: description,
|
2633 |
+
link: link
|
2634 |
+
};
|
2635 |
+
}
|
2636 |
+
}, this));
|
2637 |
+
|
2638 |
+
if (jQuery.isEmptyObject(changed)) {
|
2639 |
+
this.hide(e);
|
2640 |
+
} else {
|
2641 |
+
this.hide(e);
|
2642 |
+
NextendAjaxHelper.ajax({
|
2643 |
+
type: "POST",
|
2644 |
+
url: NextendAjaxHelper.makeAjaxUrl(that.ajaxUrl),
|
2645 |
+
data: {changed: Base64.encode(JSON.stringify(changed))},
|
2646 |
+
dataType: 'json'
|
2647 |
+
}).done($.proxy(function (response) {
|
2648 |
+
var slides = response.data;
|
2649 |
+
for (var slideID in slides) {
|
2650 |
+
var slideBox = $('.n2-box-slide[data-slideid="' + slideID + '"]');
|
2651 |
+
slideBox.find('.n2-box-placeholder a.n2-h4').html(slides[slideID].title);
|
2652 |
+
|
2653 |
+
slideBox.attr('data-title', slides[slideID].rawTitle);
|
2654 |
+
slideBox.data('title', slides[slideID].rawTitle);
|
2655 |
+
slideBox.attr('data-description', slides[slideID].rawDescription);
|
2656 |
+
slideBox.data('description', slides[slideID].rawDescription);
|
2657 |
+
slideBox.attr('data-link', slides[slideID].rawLink);
|
2658 |
+
slideBox.data('link', slides[slideID].rawLink);
|
2659 |
+
}
|
2660 |
+
}, this));
|
2661 |
+
}
|
2662 |
+
}, this));
|
2663 |
+
}
|
2664 |
+
}
|
2665 |
+
}
|
2666 |
+
});
|
2667 |
+
|
2668 |
+
this.modal.setCustomClass('n2-ss-quick-slides-edit-modal');
|
2669 |
+
this.modal.show();
|
2670 |
+
|
2671 |
+
};
|
2672 |
+
|
2673 |
+
QuickSlides.prototype.createInput = function (label, id, value) {
|
2674 |
+
var style = '';
|
2675 |
+
if (arguments.length == 4) {
|
2676 |
+
style = arguments[3];
|
2677 |
+
}
|
2678 |
+
var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="' + id + '" class="n2-h5" autocomplete="off" style="' + style + '"></div></div></div></div>');
|
2679 |
+
nodes.find('input').val(value);
|
2680 |
+
return nodes;
|
2681 |
+
};
|
2682 |
+
|
2683 |
+
QuickSlides.prototype.createTextarea = function (label, id, value) {
|
2684 |
+
var style = '';
|
2685 |
+
if (arguments.length == 4) {
|
2686 |
+
style = arguments[3];
|
2687 |
+
}
|
2688 |
+
var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="' + id + '" class="n2-h5" autocomplete="off" style="resize:y;' + style + '"></textarea></div></div></div></div>');
|
2689 |
+
nodes.find('textarea').val(value);
|
2690 |
+
return nodes;
|
2691 |
+
};
|
2692 |
+
|
2693 |
+
QuickSlides.prototype.createLink = function (label, id, value) {
|
2694 |
+
var style = '';
|
2695 |
+
if (arguments.length == 4) {
|
2696 |
+
style = arguments[3];
|
2697 |
+
}
|
2698 |
+
var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="' + id + '" class="n2-h5" autocomplete="off" style="' + style + '"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="' + id + '_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');
|
2699 |
+
nodes.find('input').val(value);
|
2700 |
+
return nodes;
|
2701 |
+
};
|
2702 |
+
|
2703 |
+
|
2704 |
+
QuickSlides.prototype.createTarget = function (label, id, value) {
|
2705 |
+
var style = '';
|
2706 |
+
if (arguments.length == 4) {
|
2707 |
+
style = arguments[3];
|
2708 |
+
}
|
2709 |
+
var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="' + id + '" autocomplete="off" style="' + style + '"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');
|
2710 |
+
nodes.find('select').val(value);
|
2711 |
+
return nodes;
|
2712 |
+
};
|
2713 |
+
|
2714 |
+
return QuickSlides;
|
2715 |
+
});
|
2716 |
+
N2Require('Slide', [], [], function ($, scope, undefined) {
|
2717 |
+
function Slide(manager, box) {
|
2718 |
+
this.selected = false;
|
2719 |
+
this.manager = manager;
|
2720 |
+
|
2721 |
+
this.box = box.data('slide', this)
|
2722 |
+
.addClass('n2-clickable');
|
2723 |
+
|
2724 |
+
this.box
|
2725 |
+
.on('mouseenter', $.proxy(function () {
|
2726 |
+
this.manager.showMenu(this);
|
2727 |
+
}, this))
|
2728 |
+
.on('mouseleave', $.proxy(function () {
|
2729 |
+
this.manager.hideMenu();
|
2730 |
+
}, this))
|
2731 |
+
.on('click.n2-slide', $.proxy(this.goToEdit, this));
|
2732 |
+
|
2733 |
+
this.publishElement = this.box.find('.n2-slide-published')
|
2734 |
+
.on('click', $.proxy(this.switchPublished, this));
|
2735 |
+
|
2736 |
+
this.box.find('.n2-ss-box-select').on('click', $.proxy(function (e) {
|
2737 |
+
e.stopPropagation();
|
2738 |
+
e.preventDefault();
|
2739 |
+
|
2740 |
+
this.invertSelection();
|
2741 |
+
}, this));
|
2742 |
+
};
|
2743 |
+
|
2744 |
+
Slide.prototype.getId = function () {
|
2745 |
+
return this.box.data('slideid');
|
2746 |
+
};
|
2747 |
+
|
2748 |
+
Slide.prototype.setFirst = function (e) {
|
2749 |
+
e.stopPropagation();
|
2750 |
+
e.preventDefault();
|
2751 |
+
NextendAjaxHelper.ajax({
|
2752 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl, {
|
2753 |
+
nextendaction: 'first'
|
2754 |
+
}),
|
2755 |
+
type: 'POST',
|
2756 |
+
data: {
|
2757 |
+
id: this.getId()
|
2758 |
+
}
|
2759 |
+
}).done($.proxy(function () {
|
2760 |
+
this.manager.unsetFirst();
|
2761 |
+
this.box.addClass('n2-slide-state-first');
|
2762 |
+
}, this));
|
2763 |
+
};
|
2764 |
+
|
2765 |
+
Slide.prototype.unsetFirst = function () {
|
2766 |
+
this.box.removeClass('n2-slide-state-first');
|
2767 |
+
};
|
2768 |
+
|
2769 |
+
Slide.prototype.switchPublished = function (e) {
|
2770 |
+
e.stopPropagation();
|
2771 |
+
e.preventDefault();
|
2772 |
+
if (this.isPublished()) {
|
2773 |
+
this.manager.unPublishSlides([this.getId()], [this]);
|
2774 |
+
} else {
|
2775 |
+
this.manager.publishSlides([this.getId()], [this]);
|
2776 |
+
}
|
2777 |
+
};
|
2778 |
+
|
2779 |
+
Slide.prototype.isPublished = function () {
|
2780 |
+
return this.box.hasClass('n2-slide-state-published');
|
2781 |
+
};
|
2782 |
+
|
2783 |
+
Slide.prototype.published = function () {
|
2784 |
+
this.box.addClass('n2-slide-state-published');
|
2785 |
+
};
|
2786 |
+
|
2787 |
+
Slide.prototype.unPublished = function () {
|
2788 |
+
this.box.removeClass('n2-slide-state-published');
|
2789 |
+
};
|
2790 |
+
|
2791 |
+
Slide.prototype.goToEdit = function (e, isBlank) {
|
2792 |
+
if (this.manager.isBulkSelection) {
|
2793 |
+
this.invertSelection();
|
2794 |
+
e.preventDefault();
|
2795 |
+
} else {
|
2796 |
+
var editUrl = this.box.data('editurl');
|
2797 |
+
if (typeof isBlank !== 'undefined' && isBlank) {
|
2798 |
+
window.open(editUrl, '_blank');
|
2799 |
+
} else if (editUrl == location.href) {
|
2800 |
+
n2("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible");
|
2801 |
+
} else {
|
2802 |
+
window.location = editUrl;
|
2803 |
+
}
|
2804 |
+
}
|
2805 |
+
};
|
2806 |
+
|
2807 |
+
Slide.prototype.duplicate = function (e) {
|
2808 |
+
e.stopPropagation();
|
2809 |
+
e.preventDefault();
|
2810 |
+
var deferred = $.Deferred();
|
2811 |
+
NextendAjaxHelper.ajax({
|
2812 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.box.data('editurl'), {
|
2813 |
+
nextendaction: 'duplicate'
|
2814 |
+
})
|
2815 |
+
}).done($.proxy(function (response) {
|
2816 |
+
var box = $(response.data).insertAfter(this.box);
|
2817 |
+
var newSlide = new Slide(this.manager, box);
|
2818 |
+
this.manager.initSlides();
|
2819 |
+
deferred.resolve(newSlide);
|
2820 |
+
}, this));
|
2821 |
+
return deferred;
|
2822 |
+
};
|
2823 |
+
|
2824 |
+
Slide.prototype.delete = function (e) {
|
2825 |
+
e.stopPropagation();
|
2826 |
+
e.preventDefault();
|
2827 |
+
this.manager.deleteSlides([this.getId()], [this]);
|
2828 |
+
};
|
2829 |
+
Slide.prototype.deleted = function () {
|
2830 |
+
this.box.remove();
|
2831 |
+
};
|
2832 |
+
|
2833 |
+
Slide.prototype.invertSelection = function (e) {
|
2834 |
+
if (e) {
|
2835 |
+
e.preventDefault();
|
2836 |
+
}
|
2837 |
+
|
2838 |
+
if (!this.selected) {
|
2839 |
+
this.select();
|
2840 |
+
} else {
|
2841 |
+
this.deSelect();
|
2842 |
+
}
|
2843 |
+
};
|
2844 |
+
|
2845 |
+
Slide.prototype.select = function () {
|
2846 |
+
if (!this.selected) {
|
2847 |
+
this.selected = true;
|
2848 |
+
this.box.addClass('n2-selected');
|
2849 |
+
this.manager.addSelection(this);
|
2850 |
+
}
|
2851 |
+
};
|
2852 |
+
|
2853 |
+
Slide.prototype.deSelect = function () {
|
2854 |
+
if (this.selected) {
|
2855 |
+
this.selected = false;
|
2856 |
+
this.box.removeClass('n2-selected');
|
2857 |
+
this.manager.removeSelection(this);
|
2858 |
+
}
|
2859 |
+
};
|
2860 |
+
|
2861 |
+
Slide.prototype.publish = function (e) {
|
2862 |
+
this.switchPublished(e);
|
2863 |
+
}
|
2864 |
+
|
2865 |
+
Slide.prototype.unpublish = function (e) {
|
2866 |
+
this.switchPublished(e);
|
2867 |
+
}
|
2868 |
+
|
2869 |
+
Slide.prototype.generator = function (e) {
|
2870 |
+
window.location = this.box.data('generator');
|
2871 |
+
}
|
2872 |
+
|
2873 |
+
Slide.prototype.copy = function (e) {
|
2874 |
+
this.manager.showSliderSelector(n2_('Copy slide to ...'), $.proxy(function (sliderID) {
|
2875 |
+
NextendAjaxHelper.ajax({
|
2876 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.box.data('editurl'), {
|
2877 |
+
nextendaction: 'copy',
|
2878 |
+
targetSliderID: sliderID
|
2879 |
+
})
|
2880 |
+
});
|
2881 |
+
}, this));
|
2882 |
+
}
|
2883 |
+
|
2884 |
+
return Slide;
|
2885 |
+
});
|
2886 |
+
N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
2887 |
+
|
2888 |
+
function SlidesManager(ajaxUrl, contentAjaxUrl, parameters, isUploadDisabled, uploadUrl, uploadDir) {
|
2889 |
+
this.quickPostModal = null;
|
2890 |
+
this.quickVideoModal = null;
|
2891 |
+
this.parameters = parameters;
|
2892 |
+
this.slides = [];
|
2893 |
+
this.ajaxUrl = ajaxUrl;
|
2894 |
+
this.contentAjaxUrl = contentAjaxUrl;
|
2895 |
+
this.slidesPanel = $('#n2-ss-slides-container');
|
2896 |
+
this.slidesContainer = this.slidesPanel.find('.n2-ss-slides-container');
|
2897 |
+
|
2898 |
+
this.initMenu();
|
2899 |
+
|
2900 |
+
this.initSlidesOrderable();
|
2901 |
+
|
2902 |
+
var slides = this.slidesContainer.find('.n2-box-slide');
|
2903 |
+
for (var i = 0; i < slides.length; i++) {
|
2904 |
+
this.slides.push(new scope.Slide(this, slides.eq(i)));
|
2905 |
+
}
|
2906 |
+
|
2907 |
+
$('html').attr('data-slides', this.slides.length);
|
2908 |
+
|
2909 |
+
$('.n2-add-quick-image, .n2-box-slide-dummy').on('click', $.proxy(this.addQuickImage, this));
|
2910 |
+
$('.n2-add-quick-video').on('click', $.proxy(this.addQuickVideo, this));
|
2911 |
+
$('.n2-add-quick-post').on('click', $.proxy(this.addQuickPost, this));
|
2912 |
+
|
2913 |
+
this.initBulk();
|
2914 |
+
|
2915 |
+
|
2916 |
+
if (!isUploadDisabled) {
|
2917 |
+
var images = [];
|
2918 |
+
this.slidesContainer.fileupload({
|
2919 |
+
url: uploadUrl,
|
2920 |
+
pasteZone: false,
|
2921 |
+
dataType: 'json',
|
2922 |
+
paramName: 'image',
|
2923 |
+
dropZone: typeof nextend.smartSlider == 'undefined' ? $(document) : $('.n2-ss-slides-outer-container'),
|
2924 |
+
|
2925 |
+
add: $.proxy(function (e, data) {
|
2926 |
+
data.formData = {path: '/' + uploadDir};
|
2927 |
+
data.submit();
|
2928 |
+
}, this),
|
2929 |
+
|
2930 |
+
done: $.proxy(function (e, data) {
|
2931 |
+
var response = data.result;
|
2932 |
+
if (response.data && response.data.name) {
|
2933 |
+
images.push({
|
2934 |
+
title: response.data.name,
|
2935 |
+
description: '',
|
2936 |
+
image: response.data.url
|
2937 |
+
});
|
2938 |
+
} else {
|
2939 |
+
NextendAjaxHelper.notification(response);
|
2940 |
+
}
|
2941 |
+
|
2942 |
+
}, this),
|
2943 |
+
|
2944 |
+
fail: $.proxy(function (e, data) {
|
2945 |
+
NextendAjaxHelper.notification(data.jqXHR.responseJSON);
|
2946 |
+
}, this),
|
2947 |
+
|
2948 |
+
start: function () {
|
2949 |
+
NextendAjaxHelper.startLoading();
|
2950 |
+
},
|
2951 |
+
|
2952 |
+
stop: $.proxy(function () {
|
2953 |
+
if (images.length) {
|
2954 |
+
this._addQuickImages(images);
|
2955 |
+
} else {
|
2956 |
+
setTimeout(function () {
|
2957 |
+
NextendAjaxHelper.stopLoading();
|
2958 |
+
}, 100);
|
2959 |
+
}
|
2960 |
+
images = [];
|
2961 |
+
}, this)
|
2962 |
+
});
|
2963 |
+
|
2964 |
+
var timeout = null;
|
2965 |
+
this.slidesContainer.on('dragover', $.proxy(function (e) {
|
2966 |
+
if (timeout !== null) {
|
2967 |
+
clearTimeout(timeout);
|
2968 |
+
timeout = null;
|
2969 |
+
} else {
|
2970 |
+
this.slidesContainer.addClass('n2-drag-over');
|
2971 |
+
}
|
2972 |
+
timeout = setTimeout($.proxy(function () {
|
2973 |
+
this.slidesContainer.removeClass('n2-drag-over');
|
2974 |
+
timeout = null;
|
2975 |
+
}, this), 400);
|
2976 |
+
|
2977 |
+
}, this));
|
2978 |
+
}
|
2979 |
+
};
|
2980 |
+
|
2981 |
+
SlidesManager.prototype.changed = function () {
|
2982 |
+
|
2983 |
+
};
|
2984 |
+
|
2985 |
+
SlidesManager.prototype.initSlidesOrderable = function () {
|
2986 |
+
this.slidesContainer.sortable({
|
2987 |
+
helper: 'clone',
|
2988 |
+
forcePlaceholderSize: false,
|
2989 |
+
tolerance: "pointer",
|
2990 |
+
items: ".n2-box-slide",
|
2991 |
+
start: function (event, ui) {
|
2992 |
+
ui.item.show();
|
2993 |
+
},
|
2994 |
+
stop: $.proxy(this.saveSlideOrder, this),
|
2995 |
+
placeholder: 'n2-box-sortable-placeholder n2-box-sortable-placeholder-small',
|
2996 |
+
distance: 10
|
2997 |
+
});
|
2998 |
+
};
|
2999 |
+
|
3000 |
+
SlidesManager.prototype.saveSlideOrder = function (e) {
|
3001 |
+
var slideNodes = this.slidesContainer.find('.n2-box-slide'),
|
3002 |
+
slides = [],
|
3003 |
+
ids = [],
|
3004 |
+
originalIds = [];
|
3005 |
+
for (var i = 0; i < slideNodes.length; i++) {
|
3006 |
+
var slide = slideNodes.eq(i).data('slide');
|
3007 |
+
slides.push(slide);
|
3008 |
+
ids.push(slide.getId());
|
3009 |
+
}
|
3010 |
+
for (var i = 0; i < this.slides.length; i++) {
|
3011 |
+
originalIds.push(this.slides[i].getId());
|
3012 |
+
}
|
3013 |
+
|
3014 |
+
if (JSON.stringify(originalIds) != JSON.stringify(ids)) {
|
3015 |
+
$(window).triggerHandler('SmartSliderSidebarSlidesOrderChanged');
|
3016 |
+
var queries = {
|
3017 |
+
nextendcontroller: 'slides',
|
3018 |
+
nextendaction: 'order'
|
3019 |
+
};
|
3020 |
+
NextendAjaxHelper.ajax({
|
3021 |
+
type: 'POST',
|
3022 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, queries),
|
3023 |
+
data: {
|
3024 |
+
slideorder: ids
|
3025 |
+
}
|
3026 |
+
});
|
3027 |
+
this.slides = slides;
|
3028 |
+
this.changed();
|
3029 |
+
}
|
3030 |
+
};
|
3031 |
+
|
3032 |
+
SlidesManager.prototype.initSlides = function () {
|
3033 |
+
var previousLength = this.slides.length;
|
3034 |
+
var slideNodes = this.slidesContainer.find('.n2-box-slide'),
|
3035 |
+
slides = [];
|
3036 |
+
for (var i = 0; i < slideNodes.length; i++) {
|
3037 |
+
var slide = slideNodes.eq(i).data('slide');
|
3038 |
+
slides.push(slide);
|
3039 |
+
}
|
3040 |
+
this.slides = slides;
|
3041 |
+
this.changed();
|
3042 |
+
$(window).triggerHandler('SmartSliderSidebarSlidesChanged');
|
3043 |
+
|
3044 |
+
$('html').attr('data-slides', this.slides.length);
|
3045 |
+
};
|
3046 |
+
|
3047 |
+
SlidesManager.prototype.unsetFirst = function () {
|
3048 |
+
for (var i = 0; i < this.slides.length; i++) {
|
3049 |
+
this.slides[i].unsetFirst();
|
3050 |
+
}
|
3051 |
+
this.changed();
|
3052 |
+
};
|
3053 |
+
|
3054 |
+
SlidesManager.prototype.addQuickImage = function (e) {
|
3055 |
+
e.preventDefault();
|
3056 |
+
nextend.imageHelper.openMultipleLightbox($.proxy(this._addQuickImages, this));
|
3057 |
+
};
|
3058 |
+
|
3059 |
+
SlidesManager.prototype.addBoxes = function (boxes) {
|
3060 |
+
|
3061 |
+
boxes.insertBefore(this.slidesContainer.find('.n2-clear'));
|
3062 |
+
boxes.addClass('n2-ss-box-just-added').each($.proxy(function (i, el) {
|
3063 |
+
new scope.Slide(this, $(el));
|
3064 |
+
}, this));
|
3065 |
+
this.initSlides();
|
3066 |
+
setTimeout(function () {
|
3067 |
+
boxes.removeClass('n2-ss-box-just-added');
|
3068 |
+
}, 200);
|
3069 |
+
}
|
3070 |
+
|
3071 |
+
SlidesManager.prototype._addQuickImages = function (images) {
|
3072 |
+
NextendAjaxHelper.ajax({
|
3073 |
+
type: 'POST',
|
3074 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3075 |
+
nextendaction: 'quickImages'
|
3076 |
+
}),
|
3077 |
+
data: {
|
3078 |
+
images: Base64.encode(JSON.stringify(images))
|
3079 |
+
}
|
3080 |
+
}).done($.proxy(function (response) {
|
3081 |
+
this.addBoxes($(response.data));
|
3082 |
+
}, this));
|
3083 |
+
};
|
3084 |
+
|
3085 |
+
SlidesManager.prototype.addQuickVideo = function (e) {
|
3086 |
+
e.preventDefault();
|
3087 |
+
var manager = this;
|
3088 |
+
if (!this.quickVideoModal) {
|
3089 |
+
this.quickVideoModal = new NextendModal({
|
3090 |
+
zero: {
|
3091 |
+
size: [
|
3092 |
+
500,
|
3093 |
+
350
|
3094 |
+
],
|
3095 |
+
title: n2_('Add video'),
|
3096 |
+
back: false,
|
3097 |
+
close: true,
|
3098 |
+
content: '<form class="n2-form"></form>',
|
3099 |
+
controls: ['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">' + n2_('Add video') + '</a>'],
|
3100 |
+
fn: {
|
3101 |
+
show: function () {
|
3102 |
+
var button = this.controls.find('.n2-button'),
|
3103 |
+
form = this.content.find('.n2-form').on('submit', function (e) {
|
3104 |
+
e.preventDefault();
|
3105 |
+
button.trigger('click');
|
3106 |
+
}).append(this.createInput(n2_('Video url'), 'n2-slide-video-url', 'width: 446px;')),
|
3107 |
+
videoUrlField = this.content.find('#n2-slide-video-url').focus();
|
3108 |
+
|
3109 |
+
this.content.append(this.createHeading(n2_('Examples')));
|
3110 |
+
this.content.append(this.createTable([['YouTube', 'https://www.youtube.com/watch?v=lsq09izc1H4'], ['Vimeo', 'https://vimeo.com/144598279']], ['', '']));
|
3111 |
+
|
3112 |
+
button.on('click', $.proxy($.proxy(function (e) {
|
3113 |
+
e.preventDefault();
|
3114 |
+
var video = videoUrlField.val(),
|
3115 |
+
youtubeRegexp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,
|
3116 |
+
youtubeMatch = video.match(youtubeRegexp),
|
3117 |
+
vimeoRegexp = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,
|
3118 |
+
vimeoMatch = video.match(vimeoRegexp),
|
3119 |
+
html5Video = video.match(/\.(mp4)/i);
|
3120 |
+
|
3121 |
+
if (youtubeMatch) {
|
3122 |
+
NextendAjaxHelper.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + encodeURI(youtubeMatch[2]) + '&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM').done($.proxy(function (data) {
|
3123 |
+
if (data.items.length) {
|
3124 |
+
var snippet = data.items[0].snippet;
|
3125 |
+
|
3126 |
+
var thumbnails = data.items[0].snippet.thumbnails,
|
3127 |
+
thumbnail = thumbnails.maxres || thumbnails.standard || thumbnails.high || thumbnails.medium || thumbnails.default;
|
3128 |
+
|
3129 |
+
manager._addQuickVideo(this, {
|
3130 |
+
type: 'youtube',
|
3131 |
+
title: snippet.title,
|
3132 |
+
description: snippet.description,
|
3133 |
+
image: thumbnail.url,
|
3134 |
+
video: video
|
3135 |
+
});
|
3136 |
+
}
|
3137 |
+
}, this)).fail(function (data) {
|
3138 |
+
nextend.notificationCenter.error(data.error.errors[0].message);
|
3139 |
+
});
|
3140 |
+
} else if (vimeoMatch) {
|
3141 |
+
NextendAjaxHelper.getJSON('https://vimeo.com/api/v2/video/' + vimeoMatch[3] + '.json').done($.proxy(function (data) {
|
3142 |
+
manager._addQuickVideo(this, {
|
3143 |
+
type: 'vimeo',
|
3144 |
+
title: data[0].title,
|
3145 |
+
description: data[0].description,
|
3146 |
+
video: vimeoMatch[3],
|
3147 |
+
image: data[0].thumbnail_large
|
3148 |
+
});
|
3149 |
+
}, this)).fail(function (data) {
|
3150 |
+
nextend.notificationCenter.error(data.responseText);
|
3151 |
+
});
|
3152 |
+
|
3153 |
+
} else if (html5Video) {
|
3154 |
+
nextend.notificationCenter.error('This video url is not supported!');
|
3155 |
+
|
3156 |
+
} else {
|
3157 |
+
nextend.notificationCenter.error('This video url is not supported!');
|
3158 |
+
}
|
3159 |
+
}, this)));
|
3160 |
+
}
|
3161 |
+
}
|
3162 |
+
}
|
3163 |
+
});
|
3164 |
+
}
|
3165 |
+
this.quickVideoModal.show();
|
3166 |
+
};
|
3167 |
+
|
3168 |
+
SlidesManager.prototype._addQuickVideo = function (modal, video) {
|
3169 |
+
NextendAjaxHelper.ajax({
|
3170 |
+
type: 'POST',
|
3171 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3172 |
+
nextendaction: 'quickVideo'
|
3173 |
+
}),
|
3174 |
+
data: {
|
3175 |
+
video: Base64.encode(encodeURIComponent(JSON.stringify(video)))
|
3176 |
+
}
|
3177 |
+
}).done($.proxy(function (response) {
|
3178 |
+
this.addBoxes($(response.data));
|
3179 |
+
|
3180 |
+
this.initSlides();
|
3181 |
+
}, this));
|
3182 |
+
modal.hide();
|
3183 |
+
};
|
3184 |
+
|
3185 |
+
SlidesManager.prototype.addQuickPost = function (e) {
|
3186 |
+
e.preventDefault();
|
3187 |
+
if (!this.quickPostModal) {
|
3188 |
+
var manager = this,
|
3189 |
+
cache = {},
|
3190 |
+
getContent = $.proxy(function (search) {
|
3191 |
+
if (typeof cache[search] == 'undefined') {
|
3192 |
+
cache[search] = NextendAjaxHelper.ajax({
|
3193 |
+
type: "POST",
|
3194 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),
|
3195 |
+
data: {
|
3196 |
+
keyword: search
|
3197 |
+
},
|
3198 |
+
dataType: 'json'
|
3199 |
+
});
|
3200 |
+
}
|
3201 |
+
return cache[search];
|
3202 |
+
}, this);
|
3203 |
+
|
3204 |
+
this.quickPostModal = new NextendModal({
|
3205 |
+
zero: {
|
3206 |
+
size: [
|
3207 |
+
600,
|
3208 |
+
430
|
3209 |
+
],
|
3210 |
+
title: n2_('Add post'),
|
3211 |
+
back: false,
|
3212 |
+
close: true,
|
3213 |
+
content: '<div class="n2-form"></div>',
|
3214 |
+
fn: {
|
3215 |
+
show: function () {
|
3216 |
+
|
3217 |
+
this.content.find('.n2-form').append(this.createInput(n2_('Keyword'), 'n2-ss-keyword', 'width:546px;'));
|
3218 |
+
var search = $('#n2-ss-keyword'),
|
3219 |
+
heading = this.createHeading('').appendTo(this.content),
|
3220 |
+
result = this.createResult().appendTo(this.content),
|
3221 |
+
searchString = '';
|
3222 |
+
|
3223 |
+
search.on('keyup', $.proxy(function () {
|
3224 |
+
searchString = search.val();
|
3225 |
+
getContent(searchString).done($.proxy(function (r) {
|
3226 |
+
if (search.val() == searchString) {
|
3227 |
+
if (searchString == '') {
|
3228 |
+
heading.html(n2_('No search term specified. Showing recent items.'));
|
3229 |
+
} else {
|
3230 |
+
heading.html(n2_printf(n2_('Showing items match for "%s"'), searchString));
|
3231 |
+
}
|
3232 |
+
|
3233 |
+
var rows = r.data,
|
3234 |
+
data = [],
|
3235 |
+
modal = this;
|
3236 |
+
for (var i = 0; i < rows.length; i++) {
|
3237 |
+
data.push([rows[i].title, rows[i].info, $('<div class="n2-button n2-button-normal n2-button-xs n2-button-green n2-radius-s n2-uc n2-h5">' + n2_('Select') + '</div>')
|
3238 |
+
.on('click', {post: rows[i]}, function (e) {
|
3239 |
+
manager._addQuickPost(modal, e.data.post);
|
3240 |
+
})]);
|
3241 |
+
}
|
3242 |
+
result.html('');
|
3243 |
+
this.createTable(data, ['width:100%;', '', '']).appendTo(this.createTableWrap().appendTo(result));
|
3244 |
+
}
|
3245 |
+
}, this));
|
3246 |
+
}, this))
|
3247 |
+
.trigger('keyup').focus();
|
3248 |
+
}
|
3249 |
+
}
|
3250 |
+
}
|
3251 |
+
});
|
3252 |
+
}
|
3253 |
+
this.quickPostModal.show();
|
3254 |
+
};
|
3255 |
+
|
3256 |
+
SlidesManager.prototype._addQuickPost = function (modal, post) {
|
3257 |
+
if (!post.image) {
|
3258 |
+
post.image = '';
|
3259 |
+
}
|
3260 |
+
NextendAjaxHelper.ajax({
|
3261 |
+
type: 'POST',
|
3262 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3263 |
+
nextendaction: 'quickPost'
|
3264 |
+
}),
|
3265 |
+
data: {
|
3266 |
+
post: post
|
3267 |
+
}
|
3268 |
+
}).done($.proxy(function (response) {
|
3269 |
+
this.addBoxes($(response.data));
|
3270 |
+
|
3271 |
+
this.initSlides();
|
3272 |
+
}, this));
|
3273 |
+
modal.hide();
|
3274 |
+
};
|
3275 |
+
|
3276 |
+
SlidesManager.prototype.initBulk = function () {
|
3277 |
+
|
3278 |
+
this.selection = [];
|
3279 |
+
|
3280 |
+
this.isBulkSelection = false;
|
3281 |
+
|
3282 |
+
var selects = $('.n2-bulk-select').find('a');
|
3283 |
+
|
3284 |
+
//Select all
|
3285 |
+
selects.eq(0).on('click', $.proxy(function (e) {
|
3286 |
+
e.preventDefault();
|
3287 |
+
this.bulkSelect(function (slide) {
|
3288 |
+
slide.select();
|
3289 |
+
});
|
3290 |
+
}, this));
|
3291 |
+
|
3292 |
+
//Select none
|
3293 |
+
selects.eq(1).on('click', $.proxy(function (e) {
|
3294 |
+
e.preventDefault();
|
3295 |
+
this.bulkSelect(function (slide) {
|
3296 |
+
slide.deSelect();
|
3297 |
+
});
|
3298 |
+
}, this));
|
3299 |
+
|
3300 |
+
//Select published
|
3301 |
+
selects.eq(2).on('click', $.proxy(function (e) {
|
3302 |
+
e.preventDefault();
|
3303 |
+
this.bulkSelect(function (slide) {
|
3304 |
+
if (slide.box.hasClass('n2-slide-state-published')) {
|
3305 |
+
slide.select();
|
3306 |
+
} else {
|
3307 |
+
slide.deSelect();
|
3308 |
+
}
|
3309 |
+
});
|
3310 |
+
}, this));
|
3311 |
+
|
3312 |
+
//Select unpublished
|
3313 |
+
selects.eq(3).on('click', $.proxy(function (e) {
|
3314 |
+
e.preventDefault();
|
3315 |
+
this.bulkSelect(function (slide) {
|
3316 |
+
if (slide.box.hasClass('n2-slide-state-published')) {
|
3317 |
+
slide.deSelect();
|
3318 |
+
} else {
|
3319 |
+
slide.select();
|
3320 |
+
}
|
3321 |
+
});
|
3322 |
+
}, this));
|
3323 |
+
|
3324 |
+
$('.n2-bulk-actions a').on('click', $.proxy(function (e) {
|
3325 |
+
var action = $(e.currentTarget).data('action');
|
3326 |
+
if (action) {
|
3327 |
+
e.preventDefault();
|
3328 |
+
this.bulkAction(action);
|
3329 |
+
}
|
3330 |
+
}, this));
|
3331 |
+
};
|
3332 |
+
|
3333 |
+
SlidesManager.prototype.addSelection = function (slide) {
|
3334 |
+
if (this.selection.length == 0) {
|
3335 |
+
this.enterBulk();
|
3336 |
+
}
|
3337 |
+
this.selection.push(slide);
|
3338 |
+
}
|
3339 |
+
|
3340 |
+
SlidesManager.prototype.removeSelection = function (slide) {
|
3341 |
+
this.selection.splice($.inArray(slide, this.selection), 1);
|
3342 |
+
if (this.selection.length == 0) {
|
3343 |
+
this.leaveBulk();
|
3344 |
+
}
|
3345 |
+
}
|
3346 |
+
|
3347 |
+
SlidesManager.prototype.bulkSelect = function (cb) {
|
3348 |
+
for (var i = 0; i < this.slides.length; i++) {
|
3349 |
+
cb(this.slides[i]);
|
3350 |
+
}
|
3351 |
+
};
|
3352 |
+
|
3353 |
+
SlidesManager.prototype.bulkAction = function (action) {
|
3354 |
+
var slides = [],
|
3355 |
+
ids = [];
|
3356 |
+
this.bulkSelect(function (slide) {
|
3357 |
+
if (slide.selected) {
|
3358 |
+
slides.push(slide);
|
3359 |
+
ids.push(slide.getId());
|
3360 |
+
}
|
3361 |
+
});
|
3362 |
+
if (ids.length) {
|
3363 |
+
this[action](ids, slides);
|
3364 |
+
} else {
|
3365 |
+
nextend.notificationCenter.notice('Please select one or more slides for the action!');
|
3366 |
+
}
|
3367 |
+
};
|
3368 |
+
|
3369 |
+
SlidesManager.prototype.enterBulk = function () {
|
3370 |
+
if (!this.isBulkSelection) {
|
3371 |
+
this.isBulkSelection = true;
|
3372 |
+
this.slidesContainer.sortable('option', 'disabled', true);
|
3373 |
+
$('#n2-admin').addClass('n2-ss-has-box-selection');
|
3374 |
+
}
|
3375 |
+
};
|
3376 |
+
|
3377 |
+
SlidesManager.prototype.leaveBulk = function () {
|
3378 |
+
if (this.isBulkSelection) {
|
3379 |
+
this.slidesContainer.sortable('option', 'disabled', false);
|
3380 |
+
$('#n2-admin').removeClass('n2-ss-has-box-selection');
|
3381 |
+
|
3382 |
+
for (var i = 0; i < this.slides.length; i++) {
|
3383 |
+
this.slides[i].deSelect();
|
3384 |
+
}
|
3385 |
+
this.selection = [];
|
3386 |
+
this.isBulkSelection = false;
|
3387 |
+
}
|
3388 |
+
};
|
3389 |
+
|
3390 |
+
SlidesManager.prototype.deleteSlides = function (ids, slides) {
|
3391 |
+
this.hideMenu();
|
3392 |
+
var title = slides[0].box.find('.n2-box-placeholder-title a').text();
|
3393 |
+
if (slides.length > 1) {
|
3394 |
+
title += ' and ' + (slides.length - 1) + ' more';
|
3395 |
+
}
|
3396 |
+
NextendDeleteModal('slide-delete', title, $.proxy(function () {
|
3397 |
+
NextendAjaxHelper.ajax({
|
3398 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3399 |
+
nextendaction: 'delete'
|
3400 |
+
}),
|
3401 |
+
type: 'POST',
|
3402 |
+
data: {
|
3403 |
+
slides: ids
|
3404 |
+
}
|
3405 |
+
}).done($.proxy(function () {
|
3406 |
+
for (var i = 0; i < slides.length; i++) {
|
3407 |
+
slides[i].deleted();
|
3408 |
+
}
|
3409 |
+
this.initSlides();
|
3410 |
+
this.leaveBulk();
|
3411 |
+
}, this));
|
3412 |
+
}, this));
|
3413 |
+
};
|
3414 |
+
|
3415 |
+
SlidesManager.prototype.duplicateSlides = function (ids, slides) {
|
3416 |
+
for (var i = 0; i < this.slides.length; i++) {
|
3417 |
+
if (this.slides[i].selected) {
|
3418 |
+
this.slides[i].duplicate($.Event("click", {
|
3419 |
+
currentTarget: null
|
3420 |
+
}));
|
3421 |
+
}
|
3422 |
+
}
|
3423 |
+
};
|
3424 |
+
|
3425 |
+
SlidesManager.prototype.copySlides = function (ids, slides) {
|
3426 |
+
this.showSliderSelector(n2_('Copy slide to ...'), $.proxy(function (sliderID) {
|
3427 |
+
NextendAjaxHelper.ajax({
|
3428 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3429 |
+
nextendaction: 'copySlides',
|
3430 |
+
targetSliderID: sliderID
|
3431 |
+
}),
|
3432 |
+
type: 'POST',
|
3433 |
+
data: {
|
3434 |
+
slides: ids
|
3435 |
+
}
|
3436 |
+
});
|
3437 |
+
}, this));
|
3438 |
+
};
|
3439 |
+
|
3440 |
+
SlidesManager.prototype.publishSlides = function (ids, slides) {
|
3441 |
+
NextendAjaxHelper.ajax({
|
3442 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3443 |
+
nextendaction: 'publish'
|
3444 |
+
}),
|
3445 |
+
type: 'POST',
|
3446 |
+
data: {
|
3447 |
+
slides: ids
|
3448 |
+
}
|
3449 |
+
}).done($.proxy(function () {
|
3450 |
+
for (var i = 0; i < slides.length; i++) {
|
3451 |
+
slides[i].published();
|
3452 |
+
}
|
3453 |
+
this.changed();
|
3454 |
+
}, this));
|
3455 |
+
};
|
3456 |
+
|
3457 |
+
SlidesManager.prototype.unPublishSlides = function (ids, slides) {
|
3458 |
+
NextendAjaxHelper.ajax({
|
3459 |
+
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3460 |
+
nextendaction: 'unpublish'
|
3461 |
+
}),
|
3462 |
+
type: 'POST',
|
3463 |
+
data: {
|
3464 |
+
slides: ids
|
3465 |
+
}
|
3466 |
+
}).done($.proxy(function () {
|
3467 |
+
for (var i = 0; i < slides.length; i++) {
|
3468 |
+
slides[i].unPublished();
|
3469 |
+
}
|
3470 |
+
this.changed();
|
3471 |
+
}, this));
|
3472 |
+
};
|
3473 |
+
|
3474 |
+
SlidesManager.prototype.initMenu = function () {
|
3475 |
+
this.slide = null;
|
3476 |
+
this.menu = $('#n2-ss-slide-menu').detach().addClass('n2-inited');
|
3477 |
+
|
3478 |
+
this.menu.find('li').on('click', $.proxy(function (e) {
|
3479 |
+
e.stopPropagation();
|
3480 |
+
var action = $(e.currentTarget).data('action');
|
3481 |
+
if (action && typeof this.slide[action] === 'function') {
|
3482 |
+
this.slide[action](e);
|
3483 |
+
}
|
3484 |
+
}, this));
|
3485 |
+
|
3486 |
+
this.menu.find('.n2-button').on('click', $.proxy(function (e) {
|
3487 |
+
e.preventDefault();
|
3488 |
+
e.stopPropagation();
|
3489 |
+
if (this.menu.hasClass('n2-active')) {
|
3490 |
+
this.menu.removeClass('n2-active').off('mouseleave');
|
3491 |
+
} else {
|
3492 |
+
this.menu.addClass('n2-active').on('mouseleave', function () {
|
3493 |
+
$(this).removeClass('n2-active');
|
3494 |
+
});
|
3495 |
+
}
|
3496 |
+
}, this));
|
3497 |
+
}
|
3498 |
+
|
3499 |
+
|
3500 |
+
SlidesManager.prototype.showMenu = function (slide) {
|
3501 |
+
this.slide = slide;
|
3502 |
+
this.menu.appendTo(slide.box);
|
3503 |
+
}
|
3504 |
+
|
3505 |
+
SlidesManager.prototype.hideMenu = function () {
|
3506 |
+
this.menu.detach();
|
3507 |
+
}
|
3508 |
+
|
3509 |
+
SlidesManager.prototype.showSliderSelector = function (title, cb) {
|
3510 |
+
var url = NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl, {
|
3511 |
+
nextendcontroller: 'sliders',
|
3512 |
+
nextendaction: 'choose'
|
3513 |
+
});
|
3514 |
+
this.sliderSelectorModal = new NextendModal({
|
3515 |
+
zero: {
|
3516 |
+
size: [
|
3517 |
+
970,
|
3518 |
+
600
|
3519 |
+
],
|
3520 |
+
title: title,
|
3521 |
+
back: false,
|
3522 |
+
close: true,
|
3523 |
+
content: '',
|
3524 |
+
fn: {
|
3525 |
+
show: function () {
|
3526 |
+
var iframe = $('<iframe src="' + url + '" width="970" height="540" style="margin: 0 -20px 0 -20px;"></iframe>').appendTo(this.content);
|
3527 |
+
|
3528 |
+
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
3529 |
+
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", $.proxy(function (e) {
|
3530 |
+
if (e.source == (iframe[0].contentWindow || iframe[0].contentDocument)) {
|
3531 |
+
var data = e[e.message ? "message" : "data"];
|
3532 |
+
cb(data);
|
3533 |
+
this.hide();
|
3534 |
+
}
|
3535 |
+
}, this), false);
|
3536 |
+
|
3537 |
+
},
|
3538 |
+
destroy: function () {
|
3539 |
+
this.destroy();
|
3540 |
+
}
|
3541 |
+
}
|
3542 |
+
}
|
3543 |
+
}, true);
|
3544 |
+
}
|
3545 |
+
|
3546 |
+
return SlidesManager;
|
3547 |
+
});
|
3548 |
+
N2Require('SlideAdmin', [], [], function ($, scope, undefined) {
|
3549 |
+
function SlideAdmin() {
|
3550 |
+
/** @type {LayerAnimationManager} */
|
3551 |
+
this.layerAnimationManager = null;
|
3552 |
+
/** @type {SlideEditManager} */
|
3553 |
+
this.slideEditManager = null;
|
3554 |
+
/** @type {NextendSmartSliderAbstract} */
|
3555 |
+
this.frontend = null;
|
3556 |
+
/** @type {Generator} */
|
3557 |
+
this.generator = null;
|
3558 |
+
/** @type {CanvasManager} */
|
3559 |
+
this.canvasManager = null;
|
3560 |
+
/** @type {NextendSmartSliderSlideEditorHistory} */
|
3561 |
+
this.history = null;
|
3562 |
+
|
3563 |
+
this.$currentSlideElement = null;
|
3564 |
+
};
|
3565 |
+
|
3566 |
+
|
3567 |
+
SlideAdmin.prototype.startEditor = function (sliderElementID, slideContentElementID, options) {
|
3568 |
+
if (this.slideEditManager === null) {
|
3569 |
+
this.slideEditManager = new scope.SlideEditManager(sliderElementID, slideContentElementID, options);
|
3570 |
+
}
|
3571 |
+
return this.slideEditManager;
|
3572 |
+
};
|
3573 |
+
|
3574 |
+
window.nextend.pre = 'div#n2-ss-0 ';
|
3575 |
+
window.nextend.smartSlider = new SlideAdmin();
|
3576 |
+
|
3577 |
+
return SlideAdmin;
|
3578 |
+
})
|
3579 |
+
N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
3580 |
+
"use strict";
|
3581 |
+
|
3582 |
+
function SlideEditManager(sliderElementID, slideContentElementID, options) {
|
3583 |
+
this.readyDeferred = $.Deferred();
|
3584 |
+
|
3585 |
+
this.options = $.extend({
|
3586 |
+
slideAsFile: 0,
|
3587 |
+
isUploadDisabled: true,
|
3588 |
+
uploadUrl: '',
|
3589 |
+
uploadDir: ''
|
3590 |
+
}, options);
|
3591 |
+
|
3592 |
+
|
3593 |
+
this.warnInternetExplorerUsers();
|
3594 |
+
|
3595 |
+
this.$slideContentElement = $('#' + slideContentElementID);
|
3596 |
+
this.slideStartValue = this.$slideContentElement.val();
|
3597 |
+
|
3598 |
+
|
3599 |
+
window[sliderElementID].started($.proxy(this.sliderStarted, this));
|
3600 |
+
if (options.isAddSample) {
|
3601 |
+
this.startSampleSlides();
|
3602 |
+
}
|
3603 |
+
};
|
3604 |
+
|
3605 |
+
SlideEditManager.prototype.startSampleSlides = function () {
|
3606 |
+
var sampleSlidesUrl = 'https://smartslider3.com/slides/' + window.N2SS3VERSION + '/free/';
|
3607 |
+
|
3608 |
+
|
3609 |
+
var that = this,
|
3610 |
+
eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
3611 |
+
|
3612 |
+
var $iframe = $('<iframe src="' + sampleSlidesUrl + '"></iframe>').prependTo('.n2-ss-sample-slides-container'),
|
3613 |
+
iframe = $iframe[0];
|
3614 |
+
|
3615 |
+
$('html, body').scrollTop($iframe.offset().top - $('#wpadminbar').height());
|
3616 |
+
|
3617 |
+
var $settings = $('.n2-ss-sample-slide-settings');
|
3618 |
+
|
3619 |
+
var $backgroundImage = $('#slidebackgroundImage'),
|
3620 |
+
$sampleBackgroundImage = $('#n2-ss-sample-slide-setting-background-image')
|
3621 |
+
.on('click', function () {
|
3622 |
+
$backgroundImage.parent().find('.n2-form-element-button').trigger('click');
|
3623 |
+
}),
|
3624 |
+
cbUpdateBackgroundImage = function () {
|
3625 |
+
var image = $backgroundImage.val();
|
3626 |
+
if (image === '') {
|
3627 |
+
$settings.removeClass('n2-ss-has-image');
|
3628 |
+
$sampleBackgroundImage.css('background-image', 'url(//nextenddev.no-ip.org/roland/wordpress1/wp-content/plugins/nextend-smart-slider3-pro/nextend/media/images/placeholder/image.png)');
|
3629 |
+
$('#slidebackground-type').val('color').trigger('change');
|
3630 |
+
} else {
|
3631 |
+
$settings.addClass('n2-ss-has-image');
|
3632 |
+
$('#slidebackground-type').val('image').trigger('change');
|
3633 |
+
$sampleBackgroundImage.css('background-image', 'url(' + nextend.imageHelper.fixed(image) + ')');
|
3634 |
+
}
|
3635 |
+
};
|
3636 |
+
|
3637 |
+
$sampleBackgroundImage.find('.n2-i-close').on('click', function (e) {
|
3638 |
+
e.stopPropagation();
|
3639 |
+
$backgroundImage.parent().find('.n2-form-element-clear').trigger('click');
|
3640 |
+
});
|
3641 |
+
|
3642 |
+
$backgroundImage.on('nextendChange', cbUpdateBackgroundImage);
|
3643 |
+
cbUpdateBackgroundImage();
|
3644 |
+
|
3645 |
+
var $opacityField = $('#slidebackgroundImageOpacity'),
|
3646 |
+
$opacitySlider = $('#n2-ss-sample-slide-setting-opacity-slider').removeAttr('slide').prop('slide', false).slider({
|
3647 |
+
min: 0,
|
3648 |
+
max: 100,
|
3649 |
+
step: 1,
|
3650 |
+
slide: function (event, ui) {
|
3651 |
+
$opacityField.data('field').insideChange(ui.value);
|
3652 |
+
}
|
3653 |
+
}),
|
3654 |
+
cb = function (e) {
|
3655 |
+
$opacitySlider.slider('value', $opacityField.val());
|
3656 |
+
};
|
3657 |
+
|
3658 |
+
$opacityField.on('nextendChange', cb);
|
3659 |
+
cb();
|
3660 |
+
|
3661 |
+
var $blurField = $('#slidebackgroundImageBlur'),
|
3662 |
+
$blurSlider = $('#n2-ss-sample-slide-setting-blur-slider').removeAttr('slide').prop('slide', false).slider({
|
3663 |
+
min: 0,
|
3664 |
+
max: 40,
|
3665 |
+
step: 1,
|
3666 |
+
slide: function (event, ui) {
|
3667 |
+
$blurField.data('field').insideChange(ui.value);
|
3668 |
+
}
|
3669 |
+
}),
|
3670 |
+
cb2 = function (e) {
|
3671 |
+
$blurSlider.slider('value', $blurField.val());
|
3672 |
+
};
|
3673 |
+
|
3674 |
+
$blurField.on('nextendChange', cb2);
|
3675 |
+
cb2();
|
3676 |
+
|
3677 |
+
var $colorField = $('#slidebackgroundColor'),
|
3678 |
+
$color = $('#n2-ss-sample-slide-setting-color')
|
3679 |
+
.n2spectrum({
|
3680 |
+
showAlpha: 1,
|
3681 |
+
preferredFormat: "hex8",
|
3682 |
+
showInput: false,
|
3683 |
+
showButtons: false,
|
3684 |
+
move: function () {
|
3685 |
+
var value = $color.n2spectrum("get").toHexString8();
|
3686 |
+
$color.val(value);
|
3687 |
+
$colorField.data('field').insideChange(value);
|
3688 |
+
},
|
3689 |
+
showSelectionPalette: true,
|
3690 |
+
showPalette: true,
|
3691 |
+
maxSelectionSize: 6,
|
3692 |
+
localStorageKey: 'color',
|
3693 |
+
palette: [
|
3694 |
+
['000000', '55aa39', '357cbd', 'bb4a28', '8757b2', '000000CC'],
|
3695 |
+
['81898d', '5cba3c', '4594e1', 'd85935', '9e74c2', '00000080'],
|
3696 |
+
['ced3d5', '27ae60', '01add3', 'e79d19', 'e264af', 'FFFFFFCC'],
|
3697 |
+
['ffffff', '2ecc71', '00c1c4', 'ecc31f', 'ec87c0', 'FFFFFF80']
|
3698 |
+
]
|
3699 |
+
}),
|
3700 |
+
cb3 = function (e) {
|
3701 |
+
var color = $colorField.val();
|
3702 |
+
if (color != $color.val()) {
|
3703 |
+
$color.n2spectrum("set", color);
|
3704 |
+
}
|
3705 |
+
};
|
3706 |
+
$colorField.on('nextendChange', cb3);
|
3707 |
+
cb3();
|
3708 |
+
|
3709 |
+
|
3710 |
+
var $gradientDir = $('#slidebackgroundGradient'),
|
3711 |
+
cb4 = function () {
|
3712 |
+
if ($gradientDir.val() == 'off') {
|
3713 |
+
$settings.removeClass('n2-ss-has-gradient');
|
3714 |
+
} else {
|
3715 |
+
$settings.addClass('n2-ss-has-gradient');
|
3716 |
+
}
|
3717 |
+
};
|
3718 |
+
$gradientDir.on('nextendChange', cb4);
|
3719 |
+
cb4();
|
3720 |
+
|
3721 |
+
var $gradientField = $('#slidebackgroundColorEnd'),
|
3722 |
+
gradient = $('#n2-ss-sample-slide-setting-gradient')
|
3723 |
+
.n2spectrum({
|
3724 |
+
showAlpha: 1,
|
3725 |
+
preferredFormat: "hex8",
|
3726 |
+
showInput: false,
|
3727 |
+
showButtons: false,
|
3728 |
+
move: function () {
|
3729 |
+
var value = gradient.n2spectrum("get").toHexString8();
|
3730 |
+
$gradientField.data('field').insideChange(value);
|
3731 |
+
},
|
3732 |
+
showSelectionPalette: true,
|
3733 |
+
showPalette: true,
|
3734 |
+
maxSelectionSize: 6,
|
3735 |
+
localStorageKey: 'color',
|
3736 |
+
palette: [
|
3737 |
+
['000000', '55aa39', '357cbd', 'bb4a28', '8757b2', '000000CC'],
|
3738 |
+
['81898d', '5cba3c', '4594e1', 'd85935', '9e74c2', '00000080'],
|
3739 |
+
['ced3d5', '27ae60', '01add3', 'e79d19', 'e264af', 'FFFFFFCC'],
|
3740 |
+
['ffffff', '2ecc71', '00c1c4', 'ecc31f', 'ec87c0', 'FFFFFF80']
|
3741 |
+
]
|
3742 |
+
}),
|
3743 |
+
cb5 = function (e) {
|
3744 |
+
gradient.n2spectrum("set", $gradientField.val());
|
3745 |
+
};
|
3746 |
+
$gradientField.on('outsideChange', cb5);
|
3747 |
+
cb5();
|
3748 |
+
|
3749 |
+
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
|
3750 |
+
if (e.source == (iframe.contentWindow || iframe.contentDocument)) {
|
3751 |
+
var a = e[e.message ? "message" : "data"];
|
3752 |
+
if (a.key) {
|
3753 |
+
switch (a.key) {
|
3754 |
+
case 'sampleSlide':
|
3755 |
+
var slide = JSON.parse(a.data);
|
3756 |
+
that.settings.setData(slide.data, true);
|
3757 |
+
|
3758 |
+
that.canvasManager.mainContainer.replaceLayers(slide.layers);
|
3759 |
+
|
3760 |
+
if (that.canvasManager.currentEditorMode != 'content' && that.canvasManager.mainContent != undefined) {
|
3761 |
+
that.canvasManager.updateEditorMode('content');
|
3762 |
+
}
|
3763 |
+
break;
|
3764 |
+
|
3765 |
+
case 'ready':
|
3766 |
+
(iframe.contentWindow || iframe.contentDocument).postMessage({
|
3767 |
+
key: 'ackReady'
|
3768 |
+
}, "*");
|
3769 |
+
if (that.options.isAddSample) {
|
3770 |
+
(iframe.contentWindow || iframe.contentDocument).postMessage({
|
3771 |
+
key: 'create'
|
3772 |
+
}, "*");
|
3773 |
+
that.options.isAddSample = false;
|
3774 |
+
}
|
3775 |
+
break;
|
3776 |
+
}
|
3777 |
+
}
|
3778 |
+
}
|
3779 |
+
}, false);
|
3780 |
+
}
|
3781 |
+
|
3782 |
+
SlideEditManager.prototype.sliderStarted = function () {
|
3783 |
+
|
3784 |
+
smartSlider.history = new scope.History();
|
3785 |
+
|
3786 |
+
smartSlider.frontend = window["n2-ss-0"];
|
3787 |
+
smartSlider.frontend.visible(function () {
|
3788 |
+
$('body').addClass('n2-ss-slider-visible');
|
3789 |
+
var el = $("#n2-ss-slide-canvas-container"),
|
3790 |
+
tinyscrollbar = el
|
3791 |
+
.tinyscrollbar({
|
3792 |
+
axis: "x",
|
3793 |
+
wheel: false,
|
3794 |
+
wheelLock: false
|
3795 |
+
})
|
3796 |
+
.data('plugin_tinyscrollbar');
|
3797 |
+
if (typeof el.get(0).move === 'function') {
|
3798 |
+
el.get(0).move = null;
|
3799 |
+
}
|
3800 |
+
|
3801 |
+
this.sliderElement.on('SliderResize', function () {
|
3802 |
+
tinyscrollbar.update("relative");
|
3803 |
+
});
|
3804 |
+
});
|
3805 |
+
|
3806 |
+
smartSlider.$currentSlideElement = smartSlider.frontend.adminGetCurrentSlideElement();
|
3807 |
+
|
3808 |
+
new scope.Generator();
|
3809 |
+
|
3810 |
+
smartSlider.$currentSlideElement.addClass('n2-ss-currently-edited-slide');
|
3811 |
+
|
3812 |
+
var staticSlide = smartSlider.frontend.parameters.isStaticEdited;
|
3813 |
+
|
3814 |
+
this.settings = new scope.SlideSettings(staticSlide);
|
3815 |
+
|
3816 |
+
this.canvasManager = new scope.CanvasManager(this, staticSlide, this.options);
|
3817 |
+
|
3818 |
+
this.readyDeferred.resolve();
|
3819 |
+
|
3820 |
+
$('#smartslider-form').on({
|
3821 |
+
checkChanged: $.proxy(this.prepareFormForCheck, this),
|
3822 |
+
submit: $.proxy(this.onSlideSubmit, this)
|
3823 |
+
});
|
3824 |
+
}
|
3825 |
+
|
3826 |
+
SlideEditManager.prototype.ready = function (fn) {
|
3827 |
+
this.readyDeferred.done(fn);
|
3828 |
+
};
|
3829 |
+
|
3830 |
+
SlideEditManager.prototype.prepareFormForCheck = function () {
|
3831 |
+
var data = JSON.stringify(this.canvasManager.getData()),
|
3832 |
+
startData = JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));
|
3833 |
+
|
3834 |
+
this.$slideContentElement.val(startData == data ? this.slideStartValue : Base64.encode(data));
|
3835 |
+
};
|
3836 |
+
|
3837 |
+
SlideEditManager.prototype.onSlideSubmit = function (e) {
|
3838 |
+
if (!nextend.isPreview) {
|
3839 |
+
this.prepareForm();
|
3840 |
+
e.preventDefault();
|
3841 |
+
|
3842 |
+
nextend.askToSave = false;
|
3843 |
+
|
3844 |
+
//$('#n2-admin').removeClass('n2-ss-add-slide-with-sample');
|
3845 |
+
|
3846 |
+
if (this.options.slideAsFile && typeof window.FormData !== undefined && typeof window.File !== 'undefined') {
|
3847 |
+
var fd = new FormData();
|
3848 |
+
var data = $('#smartslider-form').serializeArray();
|
3849 |
+
$.each(data, function (key, input) {
|
3850 |
+
if (input.name == 'slide[slide]') {
|
3851 |
+
try {
|
3852 |
+
fd.append('slide', new File([input.value], "slide.txt"));
|
3853 |
+
} catch (e) {
|
3854 |
+
fd.append('slide', new Blob([input.value]));
|
3855 |
+
}
|
3856 |
+
} else {
|
3857 |
+
fd.append(input.name, input.value);
|
3858 |
+
}
|
3859 |
+
});
|
3860 |
+
|
3861 |
+
NextendAjaxHelper.ajax({
|
3862 |
+
url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
|
3863 |
+
type: 'POST',
|
3864 |
+
data: fd,
|
3865 |
+
contentType: false,
|
3866 |
+
processData: false
|
3867 |
+
}).done($.proxy(this.afterSave, this));
|
3868 |
+
} else {
|
3869 |
+
NextendAjaxHelper.ajax({
|
3870 |
+
type: 'POST',
|
3871 |
+
url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
|
3872 |
+
data: $('#smartslider-form').serialize(),
|
3873 |
+
dataType: 'json'
|
3874 |
+
}).done($.proxy(this.afterSave, this));
|
3875 |
+
}
|
3876 |
+
}
|
3877 |
+
};
|
3878 |
+
|
3879 |
+
SlideEditManager.prototype.afterSave = function () {
|
3880 |
+
nextend.askToSave = true;
|
3881 |
+
$('#smartslider-form').trigger('saved');
|
3882 |
+
|
3883 |
+
$('.n2-ss-edit-slide-top-details .n2-h1').html($('#slidetitle').val());
|
3884 |
+
};
|
3885 |
+
|
3886 |
+
SlideEditManager.prototype.prepareForm = function () {
|
3887 |
+
if (smartSlider.ruler) {
|
3888 |
+
$('#slideguides').val(Base64.encode(JSON.stringify(smartSlider.ruler.toArray())));
|
3889 |
+
}
|
3890 |
+
|
3891 |
+
this.$slideContentElement.val(Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.canvasManager.getData()))));
|
3892 |
+
};
|
3893 |
+
|
3894 |
+
/**
|
3895 |
+
* Warn old version IE users that the editor may fail to work in their browser.
|
3896 |
+
* @private
|
3897 |
+
*/
|
3898 |
+
SlideEditManager.prototype.warnInternetExplorerUsers = function () {
|
3899 |
+
var ie = this.isInternetExplorer();
|
3900 |
+
if (ie && ie < 10) {
|
3901 |
+
alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser);
|
3902 |
+
}
|
3903 |
+
};
|
3904 |
+
|
3905 |
+
/**
|
3906 |
+
* @returns Internet Explorer version number or false
|
3907 |
+
* @private
|
3908 |
+
*/
|
3909 |
+
SlideEditManager.prototype.isInternetExplorer = function () {
|
3910 |
+
var myNav = navigator.userAgent.toLowerCase();
|
3911 |
+
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
|
3912 |
+
};
|
3913 |
+
|
3914 |
+
SlideEditManager.prototype.getLayout = function () {
|
3915 |
+
var propertiesRaw = $('#smartslider-form').serializeArray(),
|
3916 |
+
properties = {};
|
3917 |
+
|
3918 |
+
for (var i = 0; i < propertiesRaw.length; i++) {
|
3919 |
+
var m = propertiesRaw[i].name.match(/slide\[(.*?)\]/);
|
3920 |
+
if (m) {
|
3921 |
+
properties[m[1]] = propertiesRaw[i].value;
|
3922 |
+
}
|
3923 |
+
}
|
3924 |
+
delete properties['generator'];
|
3925 |
+
delete properties['published'];
|
3926 |
+
delete properties['publishdates'];
|
3927 |
+
delete properties['record-start'];
|
3928 |
+
delete properties['record-slides'];
|
3929 |
+
delete properties['slide'];
|
3930 |
+
|
3931 |
+
properties['slide'] = this.canvasManager.getData();
|
3932 |
+
return properties;
|
3933 |
+
};
|
3934 |
+
|
3935 |
+
SlideEditManager.prototype.loadLayout = function (properties, slideDataOverwrite, layerOverwrite) {
|
3936 |
+
// we are working on references!
|
3937 |
+
var slide = properties['slide'];
|
3938 |
+
delete properties['slide'];
|
3939 |
+
if (layerOverwrite) {
|
3940 |
+
this.canvasManager.importLayers(slide, true);
|
3941 |
+
} else {
|
3942 |
+
this.canvasManager.importLayers(slide, false);
|
3943 |
+
}
|
3944 |
+
if (slideDataOverwrite) {
|
3945 |
+
for (var k in properties) {
|
3946 |
+
$('#slide' + k).val(properties[k]).trigger('change');
|
3947 |
+
}
|
3948 |
+
}
|
3949 |
+
properties['slide'] = slide;
|
3950 |
+
};
|
3951 |
+
|
3952 |
+
SlideEditManager.prototype.getSelf = function () {
|
3953 |
+
return this;
|
3954 |
+
}
|
3955 |
+
|
3956 |
+
SlideEditManager.prototype.copySlide = function () {
|
3957 |
+
var slide = {
|
3958 |
+
data: this.settings.getBackgroundData(),
|
3959 |
+
layers: this.canvasManager.getData()
|
3960 |
+
};
|
3961 |
+
$.jStorage.set('copiedSlide', JSON.stringify(slide));
|
3962 |
+
}
|
3963 |
+
|
3964 |
+
SlideEditManager.prototype.pasteSlide = function () {
|
3965 |
+
var slide = $.jStorage.get('copiedSlide');
|
3966 |
+
if (slide) {
|
3967 |
+
slide = JSON.parse(slide);
|
3968 |
+
this.settings.setData(slide.data);
|
3969 |
+
|
3970 |
+
this.canvasManager.mainContainer.replaceLayers(slide.layers);
|
3971 |
+
}
|
3972 |
+
}
|
3973 |
+
SlideEditManager.prototype.hasCopiedSlide = function () {
|
3974 |
+
var slide = $.jStorage.get('copiedSlide');
|
3975 |
+
if (slide) {
|
3976 |
+
return true;
|
3977 |
+
}
|
3978 |
+
return false;
|
3979 |
+
}
|
3980 |
+
|
3981 |
+
return SlideEditManager;
|
3982 |
+
});
|
3983 |
+
N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
3984 |
+
"use strict";
|
3985 |
+
function Generator() {
|
3986 |
+
this._refreshTimeout = null;
|
3987 |
+
this.modal = false;
|
3988 |
+
this.group = 0;
|
3989 |
+
smartSlider.generator = this;
|
3990 |
+
var variables = smartSlider.$currentSlideElement.data('variables');
|
3991 |
+
if (variables) {
|
3992 |
+
this.variables = variables;
|
3993 |
+
|
3994 |
+
for (var i in this.variables) {
|
3995 |
+
if (!isNaN(parseFloat(i)) && isFinite(i)) {
|
3996 |
+
this.group = Math.max(this.group, parseInt(i) + 1);
|
3997 |
+
}
|
3998 |
+
}
|
3999 |
+
|
4000 |
+
this.fill = this.generatorFill;
|
4001 |
+
if (this.group > 0) {
|
4002 |
+
this.registerField = this.generatorRegisterField;
|
4003 |
+
|
4004 |
+
this.button = $('<a href="#" class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-blue n2-h5 n2-uc" style="position:absolute;right: -2px;top: -18px;">Variable</a>')
|
4005 |
+
.on('click', $.proxy(function (e) {
|
4006 |
+
e.preventDefault();
|
4007 |
+
this.showModal();
|
4008 |
+
}, this));
|
4009 |
+
this.registerField($('#slidetitle'));
|
4010 |
+
this.registerField($('#slidedescription'));
|
4011 |
+
this.registerField($('#slidethumbnail'));
|
4012 |
+
this.registerField($('#slidebackgroundImage'));
|
4013 |
+
this.registerField($('#slidebackgroundAlt'));
|
4014 |
+
this.registerField($('#slidebackgroundTitle'));
|
4015 |
+
this.registerField($('#slidebackgroundVideoMp4'));
|
4016 |
+
this.registerField($('#linkslidelink_0'));
|
4017 |
+
this.registerField($('#layergenerator-visible'));
|
4018 |
+
this.registerField($('#layergroup-generator-visible'));
|
4019 |
+
|
4020 |
+
$('body').addClass('n2-ss-dynamic-slide');
|
4021 |
+
//this.showModal();
|
4022 |
+
}
|
4023 |
+
|
4024 |
+
this.initSlideDataRefresh();
|
4025 |
+
} else {
|
4026 |
+
this.variables = null;
|
4027 |
+
}
|
4028 |
+
};
|
4029 |
+
|
4030 |
+
Generator.prototype.isDynamicSlide = function () {
|
4031 |
+
return this.group > 0;
|
4032 |
+
};
|
4033 |
+
|
4034 |
+
Generator.prototype.splitTokens = function (input) {
|
4035 |
+
var tokens = [];
|
4036 |
+
var currentToken = "";
|
4037 |
+
var nestingLevel = 0;
|
4038 |
+
for (var i = 0; i < input.length; i++) {
|
4039 |
+
var currentChar = input[i];
|
4040 |
+
if (currentChar === "," && nestingLevel === 0) {
|
4041 |
+
tokens.push(currentToken);
|
4042 |
+
currentToken = "";
|
4043 |
+
} else {
|
4044 |
+
currentToken += currentChar;
|
4045 |
+
if (currentChar === "(") {
|
4046 |
+
nestingLevel++;
|
4047 |
+
}
|
4048 |
+
else if (currentChar === ")") {
|
4049 |
+
nestingLevel--;
|
4050 |
+
}
|
4051 |
+
}
|
4052 |
+
}
|
4053 |
+
if (currentToken.length) {
|
4054 |
+
tokens.push(currentToken);
|
4055 |
+
}
|
4056 |
+
return tokens;
|
4057 |
+
}
|
4058 |
+
|
4059 |
+
Generator.prototype.fill = function (value) {
|
4060 |
+
return value;
|
4061 |
+
};
|
4062 |
+
|
4063 |
+
Generator.prototype.generatorFill = function (value) {
|
4064 |
+
return value.replace(/{((([a-z]+)\(([^}]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g, $.proxy(this.parseFunction, this));
|
4065 |
+
};
|
4066 |
+
|
4067 |
+
Generator.prototype.parseFunction = function (s, s2, s3, functionName, argumentString, variable) {
|
4068 |
+
if (typeof variable == 'undefined') {
|
4069 |
+
|
4070 |
+
var args = this.splitTokens(argumentString);
|
4071 |
+
for (var i = 0; i < args.length; i++) {
|
4072 |
+
args[i] = this.parseVariable(args[i]);
|
4073 |
+
}
|
4074 |
+
return this[functionName].apply(this, args);
|
4075 |
+
} else {
|
4076 |
+
return this.parseVariable(variable);
|
4077 |
+
}
|
4078 |
+
};
|
4079 |
+
|
4080 |
+
Generator.prototype.parseVariable = function (variable) {
|
4081 |
+
var _string = variable.match(/^("|')(.*)("|')$/);
|
4082 |
+
if (_string) {
|
4083 |
+
return _string[2];
|
4084 |
+
}
|
4085 |
+
|
4086 |
+
var functionMatch = variable.match(/((([a-z]+)\(([^}]+)\)))/);
|
4087 |
+
if (functionMatch) {
|
4088 |
+
return this.parseFunction.apply(this, functionMatch);
|
4089 |
+
} else {
|
4090 |
+
var variableMatch = variable.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);
|
4091 |
+
if (variableMatch) {
|
4092 |
+
var index = variableMatch[3];
|
4093 |
+
if (typeof index == 'undefined') {
|
4094 |
+
index = 0;
|
4095 |
+
} else {
|
4096 |
+
var i = parseInt(index);
|
4097 |
+
if (!isNaN(i)) {
|
4098 |
+
index = Math.max(index, 1) - 1;
|
4099 |
+
}
|
4100 |
+
}
|
4101 |
+
if (typeof this.variables[index] != 'undefined' && typeof this.variables[index][variableMatch[1]] != 'undefined') {
|
4102 |
+
return this.variables[index][variableMatch[1]];
|
4103 |
+
}
|
4104 |
+
return '';
|
4105 |
+
}
|
4106 |
+
return variable;
|
4107 |
+
}
|
4108 |
+
};
|
4109 |
+
|
4110 |
+
Generator.prototype.fallback = function (variable, def) {
|
4111 |
+
if (variable == '') {
|
4112 |
+
return def;
|
4113 |
+
}
|
4114 |
+
return variable;
|
4115 |
+
};
|
4116 |
+
|
4117 |
+
Generator.prototype.cleanhtml = function (variable) {
|
4118 |
+
return this.stripTags(variable, '<p><a><b><br /><br/><i>');
|
4119 |
+
};
|
4120 |
+
|
4121 |
+
Generator.prototype.stripTags = function (input, allowed) {
|
4122 |
+
allowed = (((allowed || '') + '')
|
4123 |
+
.toLowerCase()
|
4124 |
+
.match(/<[a-z][a-z0-9]*>/g) || [])
|
4125 |
+
.join(''); // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
|
4126 |
+
var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
|
4127 |
+
commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
|
4128 |
+
return input.replace(commentsAndPhpTags, '')
|
4129 |
+
.replace(tags, function ($0, $1) {
|
4130 |
+
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
|
4131 |
+
});
|
4132 |
+
}
|
4133 |
+
|
4134 |
+
Generator.prototype.removehtml = function (variable) {
|
4135 |
+
return $('<div>' + variable + '</div>').text();
|
4136 |
+
};
|
4137 |
+
|
4138 |
+
Generator.prototype.splitbychars = function (s, start, length) {
|
4139 |
+
return s.substr(start, length);
|
4140 |
+
};
|
4141 |
+
|
4142 |
+
Generator.prototype.splitbywords = function (variable, start, length) {
|
4143 |
+
var s = variable,
|
4144 |
+
len = s.length,
|
4145 |
+
posStart = Math.max(0, start == 0 ? 0 : s.indexOf(' ', start)),
|
4146 |
+
posEnd = Math.max(0, length > len ? len : s.indexOf(' ', length));
|
4147 |
+
if (posEnd == 0 && length <= len) posEnd = len;
|
4148 |
+
return s.substr(posStart, posEnd);
|
4149 |
+
};
|
4150 |
+
|
4151 |
+
Generator.prototype.findimage = function (variable, index) {
|
4152 |
+
var s = variable,
|
4153 |
+
re = /(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,
|
4154 |
+
r = [],
|
4155 |
+
tmp = null;
|
4156 |
+
|
4157 |
+
index = typeof index != 'undefined' ? parseInt(index) - 1 : 0;
|
4158 |
+
|
4159 |
+
while (tmp = re.exec(s)) {
|
4160 |
+
if (typeof tmp[2] != 'undefined') {
|
4161 |
+
r.push(tmp[2]);
|
4162 |
+
} else if (typeof tmp[6] != 'undefined') {
|
4163 |
+
r.push(tmp[6]);
|
4164 |
+
}
|
4165 |
+
}
|
4166 |
+
|
4167 |
+
if (r.length) {
|
4168 |
+
if (r.length > index) {
|
4169 |
+
return r[index];
|
4170 |
+
} else {
|
4171 |
+
return r[r.length - 1];
|
4172 |
+
}
|
4173 |
+
} else {
|
4174 |
+
return '';
|
4175 |
+
}
|
4176 |
+
};
|
4177 |
+
|
4178 |
+
Generator.prototype.findlink = function (variable, index) {
|
4179 |
+
var s = variable,
|
4180 |
+
re = /href=["\']?([^"\'>]+)["\']?/gi,
|
4181 |
+
r = [],
|
4182 |
+
tmp = null;
|
4183 |
+
|
4184 |
+
index = typeof index != 'undefined' ? parseInt(index) - 1 : 0;
|
4185 |
+
|
4186 |
+
while (tmp = re.exec(s)) {
|
4187 |
+
if (typeof tmp[1] != 'undefined') {
|
4188 |
+
r.push(tmp[1]);
|
4189 |
+
}
|
4190 |
+
}
|
4191 |
+
|
4192 |
+
if (r.length) {
|
4193 |
+
if (r.length > index) {
|
4194 |
+
return r[index];
|
4195 |
+
} else {
|
4196 |
+
return r[r.length - 1];
|
4197 |
+
}
|
4198 |
+
} else {
|
4199 |
+
return '';
|
4200 |
+
}
|
4201 |
+
};
|
4202 |
+
|
4203 |
+
Generator.prototype.removevarlink = function (variable) {
|
4204 |
+
var s = String(variable),
|
4205 |
+
re = /<a href=\"(.*?)\">(.*?)<\/a>/g;
|
4206 |
+
|
4207 |
+
return s.replace(re, '');
|
4208 |
+
};
|
4209 |
+
|
4210 |
+
Generator.prototype.registerField = function (field) {
|
4211 |
+
};
|
4212 |
+
|
4213 |
+
Generator.prototype.generatorRegisterField = function (field) {
|
4214 |
+
var parent = field.parent();
|
4215 |
+
parent.on({
|
4216 |
+
mouseenter: $.proxy(function () {
|
4217 |
+
this.activeField = field;
|
4218 |
+
this.button.prependTo(parent);
|
4219 |
+
}, this)
|
4220 |
+
});
|
4221 |
+
};
|
4222 |
+
|
4223 |
+
Generator.prototype.getModal = function () {
|
4224 |
+
var that = this;
|
4225 |
+
if (!this.modal) {
|
4226 |
+
var active = {
|
4227 |
+
key: '',
|
4228 |
+
group: 1,
|
4229 |
+
filter: 'no',
|
4230 |
+
split: 'no',
|
4231 |
+
splitStart: 0,
|
4232 |
+
splitLength: 300,
|
4233 |
+
findImage: 0,
|
4234 |
+
findImageIndex: 1,
|
4235 |
+
findLink: 0,
|
4236 |
+
findLinkIndex: 1,
|
4237 |
+
removeVarLink: 0
|
4238 |
+
},
|
4239 |
+
getVariableString = function () {
|
4240 |
+
var variable = active.key + '/' + active.group;
|
4241 |
+
if (active.findImage) {
|
4242 |
+
variable = 'findimage(' + variable + ',' + Math.max(1, active.findImageIndex) + ')';
|
4243 |
+
}
|
4244 |
+
if (active.findLink) {
|
4245 |
+
variable = 'findlink(' + variable + ',' + Math.max(1, active.findLinkIndex) + ')';
|
4246 |
+
}
|
4247 |
+
if (active.removeVarLink) {
|
4248 |
+
variable = 'removevarlink(' + variable + ')';
|
4249 |
+
}
|
4250 |
+
if (active.filter != 'no') {
|
4251 |
+
variable = active.filter + '(' + variable + ')';
|
4252 |
+
}
|
4253 |
+
if (active.split != 'no' && active.splitStart >= 0 && active.splitLength > 0) {
|
4254 |
+
variable = active.split + '(' + variable + ',' + active.splitStart + ',' + active.splitLength + ')';
|
4255 |
+
}
|
4256 |
+
return '{' + variable + '}';
|
4257 |
+
},
|
4258 |
+
resultContainer = $('<div class="n2-generator-result-container" />'),
|
4259 |
+
updateResult = function () {
|
4260 |
+
resultContainer.html($('<div/>').text(that.fill(getVariableString())).html());
|
4261 |
+
};
|
4262 |
+
|
4263 |
+
var group = that.group,
|
4264 |
+
variables = null,
|
4265 |
+
groups = null,
|
4266 |
+
content = $('<div class="n2-generator-insert-variable"/>');
|
4267 |
+
|
4268 |
+
|
4269 |
+
var groupHeader = NextendModal.prototype.createHeading(n2_('Choose the group')).appendTo(content);
|
4270 |
+
var groupContainer = $('<div class="n2-group-container" />').appendTo(content);
|
4271 |
+
|
4272 |
+
|
4273 |
+
content.append(NextendModal.prototype.createHeading(n2_('Choose the variable')));
|
4274 |
+
var variableContainer = $('<div class="n2-variable-container" />').appendTo(content);
|
4275 |
+
|
4276 |
+
//content.append(NextendModal.prototype.createHeading('Functions'));
|
4277 |
+
var functionsContainer = $('<div class="n2-generator-functions-container n2-form-element-mixed" />')
|
4278 |
+
.appendTo($('<div class="n2-form" />').appendTo(content));
|
4279 |
+
|
4280 |
+
content.append(NextendModal.prototype.createHeading(n2_('Result')));
|
4281 |
+
resultContainer.appendTo(content);
|
4282 |
+
|
4283 |
+
|
4284 |
+
$('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Filter') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="filter" id="n2-generator-function-filter"><option selected="selected" value="no">' + n2_('No') + '</option><option value="cleanhtml">' + n2_('Clean HTML') + '</option><option value="removehtml">' + n2_('Remove HTML') + '</option></select></div></div></div>')
|
4285 |
+
.appendTo(functionsContainer);
|
4286 |
+
var filter = functionsContainer.find('#n2-generator-function-filter');
|
4287 |
+
filter.on('change', $.proxy(function () {
|
4288 |
+
active.filter = filter.val();
|
4289 |
+
updateResult();
|
4290 |
+
}, this));
|
4291 |
+
|
4292 |
+
|
4293 |
+
$('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Split by chars') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="split" id="n2-generator-function-split"><option selected="selected" value="no">' + n2_('No') + '</option><option value="splitbychars">' + n2_('Strict') + '</option><option value="splitbywords">' + n2_('Respect words') + '</option></select></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Start') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="0" id="n2-generator-function-split-start"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Length') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="300" id="n2-generator-function-split-length"></div></div></div>')
|
4294 |
+
.appendTo(functionsContainer);
|
4295 |
+
var split = functionsContainer.find('#n2-generator-function-split');
|
4296 |
+
split.on('change', $.proxy(function () {
|
4297 |
+
active.split = split.val();
|
4298 |
+
updateResult();
|
4299 |
+
}, this));
|
4300 |
+
var splitStart = functionsContainer.find('#n2-generator-function-split-start');
|
4301 |
+
splitStart.on('change', $.proxy(function () {
|
4302 |
+
active.splitStart = parseInt(splitStart.val());
|
4303 |
+
updateResult();
|
4304 |
+
}, this));
|
4305 |
+
var splitLength = functionsContainer.find('#n2-generator-function-split-length');
|
4306 |
+
splitLength.on('change', $.proxy(function () {
|
4307 |
+
active.splitLength = parseInt(splitLength.val());
|
4308 |
+
updateResult();
|
4309 |
+
}, this));
|
4310 |
+
|
4311 |
+
|
4312 |
+
$('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Find image') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findimage"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Index') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findimage-index"></div></div></div>')
|
4313 |
+
.appendTo(functionsContainer);
|
4314 |
+
|
4315 |
+
var findImage = functionsContainer.find('#n2-generator-function-findimage');
|
4316 |
+
findImage.on('nextendChange', $.proxy(function () {
|
4317 |
+
active.findImage = parseInt(findImage.val());
|
4318 |
+
updateResult();
|
4319 |
+
}, this));
|
4320 |
+
var findImageIndex = functionsContainer.find('#n2-generator-function-findimage-index');
|
4321 |
+
findImageIndex.on('change', $.proxy(function () {
|
4322 |
+
active.findImageIndex = parseInt(findImageIndex.val());
|
4323 |
+
updateResult();
|
4324 |
+
}, this));
|
4325 |
+
|
4326 |
+
|
4327 |
+
$('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Find link') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findlink"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Index') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findlink-index"></div></div></div>')
|
4328 |
+
.appendTo(functionsContainer);
|
4329 |
+
|
4330 |
+
var findLink = functionsContainer.find('#n2-generator-function-findlink');
|
4331 |
+
findLink.on('nextendChange', $.proxy(function () {
|
4332 |
+
active.findLink = parseInt(findLink.val());
|
4333 |
+
updateResult();
|
4334 |
+
}, this));
|
4335 |
+
var findLinkIndex = functionsContainer.find('#n2-generator-function-findlink-index');
|
4336 |
+
findLinkIndex.on('change', $.proxy(function () {
|
4337 |
+
active.findLinkIndex = parseInt(findLinkIndex.val());
|
4338 |
+
updateResult();
|
4339 |
+
}, this));
|
4340 |
+
|
4341 |
+
|
4342 |
+
$('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Remove links') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-removevarlink"></div></div></div>')
|
4343 |
+
.appendTo(functionsContainer);
|
4344 |
+
|
4345 |
+
var removeVarLink = functionsContainer.find('#n2-generator-function-removevarlink');
|
4346 |
+
removeVarLink.on('nextendChange', $.proxy(function () {
|
4347 |
+
active.removeVarLink = parseInt(removeVarLink.val());
|
4348 |
+
updateResult();
|
4349 |
+
}, this));
|
4350 |
+
var removeVarLinkIndex = functionsContainer.find('#n2-generator-function-removevarlink-index');
|
4351 |
+
removeVarLinkIndex.on('change', $.proxy(function () {
|
4352 |
+
active.removeVarLinkIndex = parseInt(removeVarLinkIndex.val());
|
4353 |
+
updateResult();
|
4354 |
+
}, this));
|
4355 |
+
|
4356 |
+
for (var k in this.variables[0]) {
|
4357 |
+
$('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">' + k + '</a>')
|
4358 |
+
.on('click', $.proxy(function (key, e) {
|
4359 |
+
e.preventDefault();
|
4360 |
+
variables.removeClass('n2-active');
|
4361 |
+
$(e.currentTarget).addClass('n2-active');
|
4362 |
+
active.key = key;
|
4363 |
+
updateResult();
|
4364 |
+
}, this, k))
|
4365 |
+
.appendTo(variableContainer);
|
4366 |
+
}
|
4367 |
+
|
4368 |
+
variables = variableContainer.find('a');
|
4369 |
+
variables.eq(0).trigger('click');
|
4370 |
+
|
4371 |
+
if (group == 1) {
|
4372 |
+
groupHeader.css('display', 'none');
|
4373 |
+
groupContainer.css('display', 'none');
|
4374 |
+
}
|
4375 |
+
for (var i = 0; i < group; i++) {
|
4376 |
+
$('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">' + (i + 1) + '</a>')
|
4377 |
+
.on('click', $.proxy(function (groupIndex, e) {
|
4378 |
+
e.preventDefault();
|
4379 |
+
groups.removeClass('n2-active');
|
4380 |
+
$(e.currentTarget).addClass('n2-active');
|
4381 |
+
active.group = groupIndex + 1;
|
4382 |
+
updateResult();
|
4383 |
+
}, this, i))
|
4384 |
+
.appendTo(groupContainer);
|
4385 |
+
}
|
4386 |
+
groups = groupContainer.find('a');
|
4387 |
+
groups.eq(0).trigger('click');
|
4388 |
+
|
4389 |
+
var inited = false;
|
4390 |
+
|
4391 |
+
this.modal = new NextendModal({
|
4392 |
+
zero: {
|
4393 |
+
size: [
|
4394 |
+
1000,
|
4395 |
+
group > 1 ? 560 : 490
|
4396 |
+
],
|
4397 |
+
title: n2_('Insert variable'),
|
4398 |
+
back: false,
|
4399 |
+
close: true,
|
4400 |
+
content: content,
|
4401 |
+
controls: ['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green">' + n2_('Insert') + '</a>'],
|
4402 |
+
fn: {
|
4403 |
+
show: function () {
|
4404 |
+
if (!inited) {
|
4405 |
+
new N2Classes.FormElementOnoff("n2-generator-function-findimage");
|
4406 |
+
new N2Classes.FormElementOnoff("n2-generator-function-findlink");
|
4407 |
+
new N2Classes.FormElementOnoff("n2-generator-function-removevarlink");
|
4408 |
+
inited = true;
|
4409 |
+
}
|
4410 |
+
this.controls.find('.n2-button').on('click', $.proxy(function (e) {
|
4411 |
+
e.preventDefault();
|
4412 |
+
that.insert(getVariableString());
|
4413 |
+
this.hide(e);
|
4414 |
+
}, this));
|
4415 |
+
}
|
4416 |
+
}
|
4417 |
+
}
|
4418 |
+
}, false);
|
4419 |
+
|
4420 |
+
this.modal.setCustomClass('n2-ss-generator-modal');
|
4421 |
+
}
|
4422 |
+
return this.modal;
|
4423 |
+
};
|
4424 |
+
|
4425 |
+
Generator.prototype.showModal = function () {
|
4426 |
+
|
4427 |
+
this.getModal().show();
|
4428 |
+
};
|
4429 |
+
|
4430 |
+
Generator.prototype.insert = function (value) {
|
4431 |
+
this.activeField.val(value).trigger('change');
|
4432 |
+
};
|
4433 |
+
|
4434 |
+
Generator.prototype.initSlideDataRefresh = function () {
|
4435 |
+
|
4436 |
+
var name = $('#slidetitle').on('nextendChange', $.proxy(function () {
|
4437 |
+
this.variables.slide.name = name.val();
|
4438 |
+
this.refresh();
|
4439 |
+
}, this));
|
4440 |
+
|
4441 |
+
var description = $('#slidedescription').on('nextendChange', $.proxy(function () {
|
4442 |
+
this.variables.slide.description = description.val();
|
4443 |
+
this.refresh();
|
4444 |
+
}, this));
|
4445 |
+
|
4446 |
+
};
|
4447 |
+
|
4448 |
+
|
4449 |
+
Generator.prototype.refresh = function () {
|
4450 |
+
if (this._refreshTimeout) {
|
4451 |
+
clearTimeout(this._refreshTimeout);
|
4452 |
+
this._refreshTimeout = null;
|
4453 |
+
}
|
4454 |
+
this._refreshTimeout = setTimeout($.proxy(this._refresh, this), 100);
|
4455 |
+
};
|
4456 |
+
|
4457 |
+
Generator.prototype._refresh = function () {
|
4458 |
+
var layers = smartSlider.canvasManager.mainContainer.container.getAllLayers();
|
4459 |
+
for (var j = 0; j < layers.length; j++) {
|
4460 |
+
if (layers[j].type == 'layer') {
|
4461 |
+
layers[j].item.reRender();
|
4462 |
+
}
|
4463 |
+
}
|
4464 |
+
};
|
4465 |
+
|
4466 |
+
return Generator;
|
4467 |
+
});
|
4468 |
+
N2Require('History', [], [], function ($, scope, undefined) {
|
4469 |
+
"use strict";
|
4470 |
+
|
4471 |
+
function History() {
|
4472 |
+
this.historyStates = 50;
|
4473 |
+
this.enabled = this.historyStates != 0;
|
4474 |
+
this.historyAddAllowed = true;
|
4475 |
+
this.isBatched = false;
|
4476 |
+
this.currentBatch = this;
|
4477 |
+
this.index = -1;
|
4478 |
+
this.stackedOff = [];
|
4479 |
+
|
4480 |
+
/**
|
4481 |
+
@type {Array.<Array.<Task>>}
|
4482 |
+
*/
|
4483 |
+
this.tasks = [];
|
4484 |
+
|
4485 |
+
this.preventUndoRedo = false;
|
4486 |
+
|
4487 |
+
this.undoBTN = $('#n2-ss-undo').on({
|
4488 |
+
click: $.proxy(this.undo, this),
|
4489 |
+
mousedown: function (e) {
|
4490 |
+
nextend.context.setMouseDownArea('undo', e);
|
4491 |
+
}
|
4492 |
+
});
|
4493 |
+
this.redoBTN = $('#n2-ss-redo').on({
|
4494 |
+
click: $.proxy(this.redo, this),
|
4495 |
+
mousedown: function (e) {
|
4496 |
+
nextend.context.setMouseDownArea('redo', e);
|
4497 |
+
}
|
4498 |
+
});
|
4499 |
+
this.updateUI();
|
4500 |
+
};
|
4501 |
+
|
4502 |
+
History.prototype.updateUI = function () {
|
4503 |
+
if (this.index == 0 || this.tasks.length == 0) {
|
4504 |
+
this.undoBTN.removeClass('n2-active');
|
4505 |
+
} else {
|
4506 |
+
this.undoBTN.addClass('n2-active');
|
4507 |
+
}
|
4508 |
+
|
4509 |
+
if (this.index == -1 || this.index >= this.tasks.length) {
|
4510 |
+
this.redoBTN.removeClass('n2-active');
|
4511 |
+
} else {
|
4512 |
+
this.redoBTN.addClass('n2-active');
|
4513 |
+
}
|
4514 |
+
};
|
4515 |
+
|
4516 |
+
History.prototype.throttleUndoRedo = function () {
|
4517 |
+
if (!this.preventUndoRedo) {
|
4518 |
+
this.preventUndoRedo = true;
|
4519 |
+
setTimeout($.proxy(function () {
|
4520 |
+
this.preventUndoRedo = false;
|
4521 |
+
}, this), 100);
|
4522 |
+
return false;
|
4523 |
+
}
|
4524 |
+
return true;
|
4525 |
+
};
|
4526 |
+
|
4527 |
+
History.prototype.isEnabled = function () {
|
4528 |
+
return this.enabled && this.historyAddAllowed;
|
4529 |
+
}
|
4530 |
+
|
4531 |
+
/**
|
4532 |
+
*
|
4533 |
+
* @returns {Batch}
|
4534 |
+
*/
|
4535 |
+
History.prototype.startBatch = function () {
|
4536 |
+
if (this.isEnabled()) {
|
4537 |
+
var batch = new Batch(this.currentBatch);
|
4538 |
+
this.currentBatch._add(batch);
|
4539 |
+
this.currentBatch = batch;
|
4540 |
+
return batch;
|
4541 |
+
}
|
4542 |
+
return false;
|
4543 |
+
}
|
4544 |
+
|
4545 |
+
History.prototype.endBatch = function () {
|
4546 |
+
if (this.isEnabled()) {
|
4547 |
+
if (this.currentBatch.parent == undefined) {
|
4548 |
+
debugger;
|
4549 |
+
}
|
4550 |
+
this.currentBatch = this.currentBatch.parent;
|
4551 |
+
}
|
4552 |
+
}
|
4553 |
+
|
4554 |
+
History.prototype.addControl = function (mode) {
|
4555 |
+
return this.currentBatch._add(new Control(mode));
|
4556 |
+
}
|
4557 |
+
|
4558 |
+
History.prototype.addSimple = function (that, undoAction, redoAction, context) {
|
4559 |
+
if (this.isEnabled()) {
|
4560 |
+
return this.currentBatch._add(new Task(that, undoAction, redoAction, context));
|
4561 |
+
}
|
4562 |
+
return false;
|
4563 |
+
}
|
4564 |
+
|
4565 |
+
/**
|
4566 |
+
*
|
4567 |
+
* @param that
|
4568 |
+
* @param action
|
4569 |
+
* @param undoValue
|
4570 |
+
* @param redoValue
|
4571 |
+
* @param context
|
4572 |
+
* @returns {TaskValue}
|
4573 |
+
*/
|
4574 |
+
History.prototype.addValue = function (that, action, context) {
|
4575 |
+
if (this.isEnabled()) {
|
4576 |
+
if (this.isBatched || this.currentBatch != this) {
|
4577 |
+
var currentBatch = this.getCurrentBatchStack();
|
4578 |
+
for (var i = 0; i < currentBatch.length; i++) {
|
4579 |
+
if (currentBatch[i].isEqual(that, action, context)) {
|
4580 |
+
currentBatch.push(currentBatch.splice(i, 1)[0]);
|
4581 |
+
return currentBatch[currentBatch.length - 1];
|
4582 |
+
}
|
4583 |
+
}
|
4584 |
+
}
|
4585 |
+
return this.currentBatch._add(new TaskValue(that, action, action, context));
|
4586 |
+
}
|
4587 |
+
return false;
|
4588 |
+
}
|
4589 |
+
|
4590 |
+
History.prototype.getCurrentBatchStack = function () {
|
4591 |
+
if (this.currentBatch != this) {
|
4592 |
+
return this.currentBatch.tasks;
|
4593 |
+
}
|
4594 |
+
return this.tasks[this.tasks.length - 1];
|
4595 |
+
}
|
4596 |
+
|
4597 |
+
/**
|
4598 |
+
*
|
4599 |
+
* @param {Task} task
|
4600 |
+
* @returns {Task}
|
4601 |
+
*/
|
4602 |
+
History.prototype._add = function (task) {
|
4603 |
+
if (this.index != -1) {
|
4604 |
+
this.tasks.splice(this.index, this.tasks.length);
|
4605 |
+
}
|
4606 |
+
this.index = -1;
|
4607 |
+
if (!this.isBatched) {
|
4608 |
+
this.tasks.push([task]);
|
4609 |
+
this.isBatched = true;
|
4610 |
+
setTimeout($.proxy(function () {
|
4611 |
+
this.isBatched = false;
|
4612 |
+
}, this), 100);
|
4613 |
+
} else {
|
4614 |
+
this.tasks[this.tasks.length - 1].push(task);
|
4615 |
+
}
|
4616 |
+
|
4617 |
+
if (this.tasks.length > this.historyStates) {
|
4618 |
+
this.tasks.unshift();
|
4619 |
+
}
|
4620 |
+
this.updateUI();
|
4621 |
+
return task;
|
4622 |
+
};
|
4623 |
+
|
4624 |
+
History.prototype.off = function () {
|
4625 |
+
this.historyAddAllowed = false;
|
4626 |
+
this.stackedOff.push(1);
|
4627 |
+
};
|
4628 |
+
|
4629 |
+
History.prototype.on = function () {
|
4630 |
+
this.stackedOff.pop();
|
4631 |
+
if (this.stackedOff.length == 0) {
|
4632 |
+
this.historyAddAllowed = true;
|
4633 |
+
}
|
4634 |
+
};
|
4635 |
+
|
4636 |
+
History.prototype.undo = function (e) {
|
4637 |
+
if (e) {
|
4638 |
+
e.preventDefault();
|
4639 |
+
}
|
4640 |
+
if (this.throttleUndoRedo()) {
|
4641 |
+
return false;
|
4642 |
+
}
|
4643 |
+
this.off();
|
4644 |
+
if (this.index == -1) {
|
4645 |
+
this.index = this.tasks.length - 1;
|
4646 |
+
} else {
|
4647 |
+
this.index--;
|
4648 |
+
}
|
4649 |
+
if (this.index >= 0) {
|
4650 |
+
var tasks = this.tasks[this.index];
|
4651 |
+
|
4652 |
+
for (var i = tasks.length - 1; i >= 0; i--) {
|
4653 |
+
if (!tasks[i].undo()) {
|
4654 |
+
break;
|
4655 |
+
}
|
4656 |
+
}
|
4657 |
+
} else {
|
4658 |
+
this.index = 0;
|
4659 |
+
// No more undo
|
4660 |
+
}
|
4661 |
+
this.on();
|
4662 |
+
this.updateUI();
|
4663 |
+
return true;
|
4664 |
+
};
|
4665 |
+
|
4666 |
+
History.prototype.redo = function (e) {
|
4667 |
+
if (e) {
|
4668 |
+
e.preventDefault();
|
4669 |
+
}
|
4670 |
+
if (this.throttleUndoRedo()) {
|
4671 |
+
return false;
|
4672 |
+
}
|
4673 |
+
this.off();
|
4674 |
+
if (this.index != -1) {
|
4675 |
+
if (this.index < this.tasks.length) {
|
4676 |
+
var tasks = this.tasks[this.index];
|
4677 |
+
this.index++;
|
4678 |
+
for (var i = 0; i < tasks.length; i++) {
|
4679 |
+
if (!tasks[i].redo()) {
|
4680 |
+
break;
|
4681 |
+
}
|
4682 |
+
}
|
4683 |
+
} else {
|
4684 |
+
// No more redo
|
4685 |
+
}
|
4686 |
+
} else {
|
4687 |
+
// No redo
|
4688 |
+
}
|
4689 |
+
this.on();
|
4690 |
+
this.updateUI();
|
4691 |
+
return true;
|
4692 |
+
};
|
4693 |
+
|
4694 |
+
function Batch(parent) {
|
4695 |
+
this.parent = parent;
|
4696 |
+
this.tasks = [];
|
4697 |
+
}
|
4698 |
+
|
4699 |
+
Batch.prototype._add = function (task) {
|
4700 |
+
this.tasks.push(task);
|
4701 |
+
return task;
|
4702 |
+
}
|
4703 |
+
|
4704 |
+
Batch.prototype.invertUndo = function () {
|
4705 |
+
this.undo = function () {
|
4706 |
+
for (var i = this.tasks.length - 1; i >= 0; i--) {
|
4707 |
+
if (!this.tasks[i].undo()) {
|
4708 |
+
break;
|
4709 |
+
}
|
4710 |
+
}
|
4711 |
+
return true;
|
4712 |
+
}
|
4713 |
+
return this;
|
4714 |
+
}
|
4715 |
+
|
4716 |
+
Batch.prototype.undo = function () {
|
4717 |
+
for (var i = 0; i < this.tasks.length; i++) {
|
4718 |
+
if (!this.tasks[i].undo()) {
|
4719 |
+
break;
|
4720 |
+
}
|
4721 |
+
}
|
4722 |
+
return true;
|
4723 |
+
}
|
4724 |
+
|
4725 |
+
Batch.prototype.redo = function () {
|
4726 |
+
for (var i = 0; i < this.tasks.length; i++) {
|
4727 |
+
if (!this.tasks[i].redo()) {
|
4728 |
+
break;
|
4729 |
+
}
|
4730 |
+
}
|
4731 |
+
return true;
|
4732 |
+
}
|
4733 |
+
|
4734 |
+
Batch.prototype.isEqual = function () {
|
4735 |
+
return false;
|
4736 |
+
}
|
4737 |
+
|
4738 |
+
function Control(mode) {
|
4739 |
+
switch (mode) {
|
4740 |
+
case 'skipForwardUndos':
|
4741 |
+
this.undo = function () {
|
4742 |
+
return false;
|
4743 |
+
}
|
4744 |
+
break;
|
4745 |
+
}
|
4746 |
+
}
|
4747 |
+
|
4748 |
+
|
4749 |
+
Control.prototype.undo = function () {
|
4750 |
+
return true;
|
4751 |
+
}
|
4752 |
+
|
4753 |
+
Control.prototype.redo = function () {
|
4754 |
+
return true;
|
4755 |
+
}
|
4756 |
+
|
4757 |
+
Control.prototype.isEqual = function () {
|
4758 |
+
return false;
|
4759 |
+
}
|
4760 |
+
|
4761 |
+
function Task(that, undoAction, redoAction, context) {
|
4762 |
+
this.that = that;
|
4763 |
+
this.undoAction = undoAction;
|
4764 |
+
this.redoAction = redoAction;
|
4765 |
+
this.context = context || [];
|
4766 |
+
}
|
4767 |
+
|
4768 |
+
|
4769 |
+
Task.prototype.undo = function () {
|
4770 |
+
this.undoAction.apply(this.that.getSelf(), this.context);
|
4771 |
+
return true;
|
4772 |
+
}
|
4773 |
+
|
4774 |
+
Task.prototype.redo = function () {
|
4775 |
+
this.redoAction.apply(this.that.getSelf(), this.context);
|
4776 |
+
return true;
|
4777 |
+
}
|
4778 |
+
|
4779 |
+
Task.prototype.isEqual = function () {
|
4780 |
+
return false;
|
4781 |
+
}
|
4782 |
+
|
4783 |
+
function TaskValue() {
|
4784 |
+
Task.prototype.constructor.apply(this, arguments);
|
4785 |
+
}
|
4786 |
+
|
4787 |
+
TaskValue.prototype = Object.create(Task.prototype);
|
4788 |
+
TaskValue.prototype.constructor = TaskValue;
|
4789 |
+
|
4790 |
+
TaskValue.prototype.setValues = function (undoValue, redoValue) {
|
4791 |
+
this.undoValue = undoValue;
|
4792 |
+
this.redoValue = redoValue;
|
4793 |
+
}
|
4794 |
+
|
4795 |
+
TaskValue.prototype.undo = function () {
|
4796 |
+
this.context.unshift(this.undoValue)
|
4797 |
+
this.undoAction.apply(this.that.getSelf(), this.context);
|
4798 |
+
this.context.shift();
|
4799 |
+
return true;
|
4800 |
+
}
|
4801 |
+
|
4802 |
+
TaskValue.prototype.redo = function () {
|
4803 |
+
this.context.unshift(this.redoValue)
|
4804 |
+
this.redoAction.apply(this.that.getSelf(), this.context);
|
4805 |
+
this.context.shift();
|
4806 |
+
return true;
|
4807 |
+
}
|
4808 |
+
|
4809 |
+
TaskValue.prototype.isEqual = function (that, action, context) {
|
4810 |
+
if (that == this.that && action == this.undoAction) {
|
4811 |
+
for (var i = 0; i < context.length; i++) {
|
4812 |
+
if (context[i] != this.context[i]) {
|
4813 |
+
return false;
|
4814 |
+
}
|
4815 |
+
}
|
4816 |
+
this.setValues = function (undoValue, redoValue) {
|
4817 |
+
this.redoValue = redoValue;
|
4818 |
+
}
|
4819 |
+
return true;
|
4820 |
+
}
|
4821 |
+
return false;
|
4822 |
+
}
|
4823 |
+
|
4824 |
+
return History;
|
4825 |
+
});
|
4826 |
|
4827 |
+
N2Require('InlineField', [], [], function ($, scope, undefined) {
|
4828 |
+
|
4829 |
+
function InlineField() {
|
4830 |
+
|
4831 |
+
this.$input = $('<input type="text" name="name" />')
|
4832 |
+
.on({
|
4833 |
+
mouseup: function (e) {
|
4834 |
+
e.stopPropagation();
|
4835 |
+
},
|
4836 |
+
keyup: $.proxy(function (e) {
|
4837 |
+
if (e.keyCode == 27) {
|
4838 |
+
this.cancel();
|
4839 |
+
}
|
4840 |
+
}, this),
|
4841 |
+
blur: $.proxy(this.save, this)
|
4842 |
+
});
|
4843 |
+
|
4844 |
+
this.$form = $('<form class="n2-inline-form"></form>')
|
4845 |
+
.append(this.$input)
|
4846 |
+
.on('submit', $.proxy(this.save, this));
|
4847 |
+
}
|
4848 |
+
|
4849 |
+
InlineField.prototype.injectNode = function ($targetNode, value) {
|
4850 |
+
this.$input.val(value);
|
4851 |
+
$targetNode.append(this.$form);
|
4852 |
+
this.$input.focus();
|
4853 |
+
};
|
4854 |
+
|
4855 |
+
InlineField.prototype.save = function (e) {
|
4856 |
+
e.preventDefault();
|
4857 |
+
this.$input.trigger('valueChanged', [this.$input.val()]);
|
4858 |
+
this.$input.off('blur');
|
4859 |
+
this.destroy();
|
4860 |
+
};
|
4861 |
+
|
4862 |
+
InlineField.prototype.cancel = function () {
|
4863 |
+
this.$input.trigger('cancel');
|
4864 |
+
this.destroy();
|
4865 |
+
};
|
4866 |
+
|
4867 |
+
InlineField.prototype.destroy = function () {
|
4868 |
+
this.$input.off('blur')
|
4869 |
+
this.$form.remove();
|
4870 |
+
};
|
4871 |
+
|
4872 |
+
return InlineField;
|
4873 |
+
});
|
4874 |
+
N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
4875 |
+
"use strict";
|
4876 |
+
|
4877 |
+
function SlideSettings(isStatic) {
|
4878 |
+
this.isStatic = isStatic;
|
4879 |
+
|
4880 |
+
var $fields = $('#smartslider-form').find('input[id][name^="slide"], textarea[id][name^="slide"]'),
|
4881 |
+
fields = {};
|
4882 |
+
$fields.each($.proxy(function (i, el) {
|
4883 |
+
var $field = $(el),
|
4884 |
+
name = $field.attr('name').match(/slide\[(.*)\]/)[1];
|
4885 |
+
fields[name] = $field.on('nextendChange', $.proxy(this.onChange, this, name));
|
4886 |
+
}, this));
|
4887 |
+
|
4888 |
+
this.fields = fields;
|
4889 |
+
|
4890 |
+
this.slideBackground = smartSlider.$currentSlideElement.data('slideBackground');
|
4891 |
+
|
4892 |
+
if (!isStatic) {
|
4893 |
+
|
4894 |
+
this.backgroundImageElement = smartSlider.$currentSlideElement.find('.nextend-slide-bg');
|
4895 |
+
this.canvas = smartSlider.$currentSlideElement.find('.n2-ss-slide-background');
|
4896 |
|
4897 |
+
this.currentBackgroundType = this.fields['background-type'].val();
|
4898 |
+
|
4899 |
+
// Auto fill thumbnail if empty
|
4900 |
+
var thumbnail = $('#slidethumbnail');
|
4901 |
+
if (thumbnail.val() == '') {
|
4902 |
+
var itemImage = $('#item_imageimage'),
|
4903 |
+
cb = $.proxy(function (image) {
|
4904 |
+
if (image != '' && image != '$system$/images/placeholder/image.png') {
|
4905 |
+
thumbnail.val(image).trigger('change');
|
4906 |
+
this.fields.backgroundImage.off('.slidethumbnail');
|
4907 |
+
itemImage.off('.slidethumbnail');
|
4908 |
+
}
|
4909 |
+
}, this);
|
4910 |
+
this.fields.backgroundImage.on('nextendChange.slidethumbnail', $.proxy(function () {
|
4911 |
+
cb(this.fields.backgroundImage.val());
|
4912 |
+
}, this));
|
4913 |
+
itemImage.on('nextendChange.slidethumbnail', $.proxy(function () {
|
4914 |
+
cb(itemImage.val());
|
4915 |
+
}, this));
|
4916 |
+
}
|
4917 |
+
}
|
4918 |
+
|
4919 |
+
this.createHistory();
|
4920 |
+
}
|
4921 |
+
|
4922 |
+
SlideSettings.prototype.createHistory = function () {
|
4923 |
+
this.values = {};
|
4924 |
+
$('#smartslider-form').find('input[id][name^="slide"], textarea[id][name^="slide"]').not('#slideslide').each($.proxy(function (i, el) {
|
4925 |
+
var $input = $(el),
|
4926 |
+
field = $input.data('field'),
|
4927 |
+
id = $input.attr('id');
|
4928 |
+
this.values[id] = $input.val();
|
4929 |
+
$input.on('nextendChange', $.proxy(function () {
|
4930 |
+
var newValue = $input.val();
|
4931 |
+
|
4932 |
+
var task = smartSlider.history.addValue(this, this.historyUpdateSlideValue, [field]);
|
4933 |
+
if (task) {
|
4934 |
+
task.setValues(this.values[id], newValue);
|
4935 |
+
}
|
4936 |
+
|
4937 |
+
this.values[id] = newValue;
|
4938 |
+
}, this));
|
4939 |
+
}, this));
|
4940 |
+
}
|
4941 |
+
|
4942 |
+
SlideSettings.prototype.getSelf = function () {
|
4943 |
+
return this;
|
4944 |
+
}
|
4945 |
+
|
4946 |
+
SlideSettings.prototype.historyUpdateSlideValue = function (value, field) {
|
4947 |
+
field.insideChange(value);
|
4948 |
+
}
|
4949 |
+
|
4950 |
+
SlideSettings.prototype.getAllData = function () {
|
4951 |
+
|
4952 |
+
var data = {};
|
4953 |
+
|
4954 |
+
for (var k in this.fields) {
|
4955 |
+
data[k] = this.fields[k].val();
|
4956 |
+
}
|
4957 |
+
|
4958 |
+
return data;
|
4959 |
+
}
|
4960 |
+
|
4961 |
+
var backgroundFields = ['thumbnail', 'background-type', 'backgroundColor', 'backgroundGradient', 'backgroundColorEnd', 'backgroundImage', 'backgroundImageOpacity', 'backgroundImageBlur', 'backgroundFocusX', 'backgroundFocusY', 'backgroundMode'];
|
4962 |
+
|
4963 |
+
SlideSettings.prototype.getBackgroundData = function () {
|
4964 |
+
|
4965 |
+
var data = {};
|
4966 |
+
|
4967 |
+
for (var i = 0; i < backgroundFields.length; i++) {
|
4968 |
+
data[backgroundFields[i]] = this.fields[backgroundFields[i]].val();
|
4969 |
+
}
|
4970 |
+
|
4971 |
+
return data;
|
4972 |
+
}
|
4973 |
+
|
4974 |
+
SlideSettings.prototype.setData = function (data, disableVisualLoad) {
|
4975 |
+
|
4976 |
+
if (disableVisualLoad) {
|
4977 |
+
this.slideBackground.setVisualLoad(false);
|
4978 |
+
}
|
4979 |
+
|
4980 |
+
for (var k in data) {
|
4981 |
+
this.fields[k].val(data[k]).trigger('change');
|
4982 |
+
}
|
4983 |
+
|
4984 |
+
if (disableVisualLoad) {
|
4985 |
+
this.slideBackground.setVisualLoad(false);
|
4986 |
+
}
|
4987 |
+
}
|
4988 |
+
|
4989 |
+
SlideSettings.prototype.onChange = function (name, e) {
|
4990 |
+
if (typeof this['sync_' + name] === 'function') {
|
4991 |
+
this['sync_' + name].call(this);
|
4992 |
+
}
|
4993 |
+
}
|
4994 |
+
|
4995 |
+
SlideSettings.prototype.sync_backgroundColor =
|
4996 |
+
SlideSettings.prototype.sync_backgroundGradient =
|
4997 |
+
SlideSettings.prototype.sync_backgroundColorEnd = function () {
|
4998 |
+
this.updateBackgroundColor();
|
4999 |
+
}
|
5000 |
+
|
5001 |
+
SlideSettings.prototype.updateBackgroundColor = function () {
|
5002 |
+
var backgroundColor = this.fields.backgroundColor.val(),
|
5003 |
+
gradient = this.fields.backgroundGradient.val();
|
5004 |
+
if (gradient != 'off') {
|
5005 |
+
var backgroundColorEnd = this.fields.backgroundColorEnd.val(),
|
5006 |
+
canvas = this.canvas.css({background: '', filter: ''});
|
5007 |
+
|
5008 |
+
switch (gradient) {
|
5009 |
+
case 'horizontal':
|
5010 |
+
canvas
|
5011 |
+
.css('background', '#' + backgroundColor.substr(0, 6))
|
5012 |
+
.css('background', '-moz-linear-gradient(left, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5013 |
+
.css('background', ' -webkit-linear-gradient(left, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5014 |
+
.css('background', 'linear-gradient(to right, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5015 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + backgroundColor.substr(0, 6) + '\', endColorstr=\'#' + backgroundColorEnd.substr(0, 6) + '\',GradientType=1)');
|
5016 |
+
break;
|
5017 |
+
case 'vertical':
|
5018 |
+
canvas
|
5019 |
+
.css('background', '#' + backgroundColor.substr(0, 6))
|
5020 |
+
.css('background', '-moz-linear-gradient(top, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5021 |
+
.css('background', ' -webkit-linear-gradient(top, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5022 |
+
.css('background', 'linear-gradient(to bottom, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5023 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + backgroundColor.substr(0, 6) + '\', endColorstr=\'#' + backgroundColorEnd.substr(0, 6) + '\',GradientType=0)');
|
5024 |
+
break;
|
5025 |
+
case 'diagonal1':
|
5026 |
+
canvas
|
5027 |
+
.css('background', '#' + backgroundColor.substr(0, 6))
|
5028 |
+
.css('background', '-moz-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5029 |
+
.css('background', ' -webkit-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5030 |
+
.css('background', 'linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5031 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + backgroundColor.substr(0, 6) + '\', endColorstr=\'#' + backgroundColorEnd.substr(0, 6) + '\',GradientType=1)');
|
5032 |
+
break;
|
5033 |
+
case 'diagonal2':
|
5034 |
+
canvas
|
5035 |
+
.css('background', '#' + backgroundColor.substr(0, 6))
|
5036 |
+
.css('background', '-moz-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5037 |
+
.css('background', ' -webkit-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5038 |
+
.css('background', 'linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(backgroundColor) + ' 0%,' + N2Color.hex2rgbaCSS(backgroundColorEnd) + ' 100%)')
|
5039 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + backgroundColor.substr(0, 6) + '\', endColorstr=\'#' + backgroundColorEnd.substr(0, 6) + '\',GradientType=1)');
|
5040 |
+
break;
|
5041 |
+
}
|
5042 |
+
|
5043 |
+
|
5044 |
+
} else {
|
5045 |
+
if (backgroundColor.substr(6, 8) == '00') {
|
5046 |
+
this.canvas.css('background', '');
|
5047 |
+
} else {
|
5048 |
+
this.canvas.css('background', '#' + backgroundColor.substr(0, 6))
|
5049 |
+
.css('background', N2Color.hex2rgbaCSS(backgroundColor));
|
5050 |
+
}
|
5051 |
+
}
|
5052 |
+
};
|
5053 |
+
|
5054 |
+
SlideSettings.prototype.sync_backgroundImage = function () {
|
5055 |
+
this['sync_background-type']();
|
5056 |
+
}
|
5057 |
+
|
5058 |
+
SlideSettings.prototype['sync_background-type'] = function () {
|
5059 |
+
var type = this.fields['background-type'].val();
|
5060 |
+
if (type == 'color') {
|
5061 |
+
this.slideBackground.setDesktopSrc('');
|
5062 |
+
} else {
|
5063 |
+
this.slideBackground.setDesktopSrc(smartSlider.generator.fill(this.fields.backgroundImage.val()));
|
5064 |
+
}
|
5065 |
+
}
|
5066 |
+
|
5067 |
+
SlideSettings.prototype.sync_backgroundMode = function () {
|
5068 |
+
this.slideBackground.setMode(this.fields.backgroundMode.val());
|
5069 |
+
}
|
5070 |
+
|
5071 |
+
SlideSettings.prototype.sync_backgroundFocusY = function () {
|
5072 |
+
this.slideBackground.setFocus(this.fields.backgroundFocusX.val(), this.fields.backgroundFocusY.val());
|
5073 |
+
}
|
5074 |
+
|
5075 |
+
SlideSettings.prototype.sync_backgroundFocusX = function () {
|
5076 |
+
this.slideBackground.setFocus(this.fields.backgroundFocusX.val(), this.fields.backgroundFocusY.val());
|
5077 |
+
}
|
5078 |
+
|
5079 |
+
SlideSettings.prototype.sync_backgroundImageOpacity = function () {
|
5080 |
+
this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val() / 100);
|
5081 |
+
};
|
5082 |
+
|
5083 |
+
SlideSettings.prototype.sync_backgroundImageBlur = function () {
|
5084 |
+
this.slideBackground.setBlur(this.fields.backgroundImageBlur.val());
|
5085 |
+
};
|
5086 |
+
|
5087 |
+
return SlideSettings;
|
5088 |
+
});
|
5089 |
+
N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
5090 |
+
"use strict";
|
5091 |
+
|
5092 |
+
function LayerContainer(component, $ul, allowedPlacementMode, childrenSelector, allowedChildren) {
|
5093 |
+
this.component = component;
|
5094 |
+
this.$ul = $ul
|
5095 |
+
.data('container', this);
|
5096 |
+
|
5097 |
+
this.allowedPlacementMode = allowedPlacementMode;
|
5098 |
+
this.childrenSelector = childrenSelector;
|
5099 |
+
this.allowedChildren = allowedChildren;
|
5100 |
+
|
5101 |
+
this.layerContainerElement = component.layer;
|
5102 |
+
}
|
5103 |
+
|
5104 |
+
LayerContainer.prototype.setLayerContainerElement = function ($layerContainerElement) {
|
5105 |
+
this.layerContainerElement = $layerContainerElement;
|
5106 |
+
}
|
5107 |
+
|
5108 |
+
LayerContainer.prototype.startWithExistingNodes = function () {
|
5109 |
+
var nodes = this.layerContainerElement.find(this.childrenSelector);
|
5110 |
+
for (var i = 0; i < nodes.length; i++) {
|
5111 |
+
this._loadNode(nodes.eq(i), false);
|
5112 |
+
}
|
5113 |
+
this.component.onChildCountChange();
|
5114 |
+
}
|
5115 |
+
|
5116 |
+
LayerContainer.prototype.isChildAllowed = function (type) {
|
5117 |
+
return $.inArray(type, this.allowedChildren) !== -1;
|
5118 |
+
}
|
5119 |
+
|
5120 |
+
LayerContainer.prototype._loadNode = function ($el, needSync) {
|
5121 |
+
var type = $el.data('type');
|
5122 |
+
if (this.isChildAllowed(type)) {
|
5123 |
+
var component;
|
5124 |
+
switch (type) {
|
5125 |
+
case 'layer':
|
5126 |
+
component = new scope.Layer(this.component.canvasManager, this.component);
|
5127 |
+
break;
|
5128 |
+
case 'content':
|
5129 |
+
component = new scope.Content(this.component.canvasManager, this.component);
|
5130 |
+
break;
|
5131 |
+
case 'row':
|
5132 |
+
component = new scope.Row(this.component.canvasManager, this.component);
|
5133 |
+
break;
|
5134 |
+
case 'col':
|
5135 |
+
component = new scope.Col(this.component.canvasManager, this.component);
|
5136 |
+
break;
|
5137 |
+
case 'group':
|
5138 |
+
break;
|
5139 |
+
}
|
5140 |
+
|
5141 |
+
if (component) {
|
5142 |
+
component.load($el);
|
5143 |
+
if (needSync) {
|
5144 |
+
component.sync();
|
5145 |
+
}
|
5146 |
+
return component;
|
5147 |
+
}
|
5148 |
+
} else {
|
5149 |
+
console.error(type + ' is not allowed in ' + this.component.label);
|
5150 |
+
}
|
5151 |
+
return false;
|
5152 |
+
}
|
5153 |
+
|
5154 |
+
LayerContainer.prototype.getLayerCount = function () {
|
5155 |
+
return this.layerContainerElement.find(this.childrenSelector).length;
|
5156 |
+
}
|
5157 |
+
|
5158 |
+
LayerContainer.prototype.getLayerIndex = function ($layer) {
|
5159 |
+
return this.layerContainerElement.find(this.childrenSelector).index($layer);
|
5160 |
+
}
|
5161 |
+
|
5162 |
+
LayerContainer.prototype.getSortedLayers = function () {
|
5163 |
+
var layers = [];
|
5164 |
+
this.layerContainerElement.find(this.childrenSelector).each(function (i, el) {
|
5165 |
+
var layer = $(el).data('layerObject');
|
5166 |
+
if (layer !== undefined) {
|
5167 |
+
layers.push(layer);
|
5168 |
+
}
|
5169 |
+
});
|
5170 |
+
return layers;
|
5171 |
+
}
|
5172 |
+
|
5173 |
+
LayerContainer.prototype.append = function ($layer) {
|
5174 |
+
$layer.appendTo(this.layerContainerElement);
|
5175 |
+
var layer = this._loadNode($layer, true);
|
5176 |
+
this.component.onChildCountChange();
|
5177 |
+
return layer;
|
5178 |
+
}
|
5179 |
+
|
5180 |
+
LayerContainer.prototype.insertAt = function ($layer, index) {
|
5181 |
+
|
5182 |
+
var layers = this.getSortedLayers();
|
5183 |
+
if (index >= layers.length) {
|
5184 |
+
$layer.appendTo(this.layerContainerElement);
|
5185 |
+
} else {
|
5186 |
+
$layer.insertBefore(layers[index].layer);
|
5187 |
+
}
|
5188 |
+
|
5189 |
+
var layer = this._loadNode($layer, true);
|
5190 |
+
this.component.onChildCountChange();
|
5191 |
+
return layer;
|
5192 |
+
}
|
5193 |
+
|
5194 |
+
LayerContainer.prototype.insert = function (layer) {
|
5195 |
+
layer.getRootElement().appendTo(this.layerContainerElement);
|
5196 |
+
}
|
5197 |
+
|
5198 |
+
LayerContainer.prototype.insertLayerAt = function (layer, index) {
|
5199 |
+
|
5200 |
+
var layers = this.getSortedLayers();
|
5201 |
+
|
5202 |
+
var layerIndex = $.inArray(layer, layers);
|
5203 |
+
if (layerIndex != '-1' && layerIndex < index) {
|
5204 |
+
// we have to readjust the target index of the layer
|
5205 |
+
index++;
|
5206 |
+
}
|
5207 |
+
|
5208 |
+
if (index >= layers.length) {
|
5209 |
+
layer.getRootElement().appendTo(this.layerContainerElement);
|
5210 |
+
} else {
|
5211 |
+
layer.getRootElement().insertBefore(layers[index].getRootElement());
|
5212 |
+
}
|
5213 |
+
|
5214 |
+
this.syncLayerRow(layer);
|
5215 |
+
}
|
5216 |
+
|
5217 |
+
LayerContainer.prototype.syncLayerRow = function (layer) {
|
5218 |
+
var relatedLayer,
|
5219 |
+
isReversed = (this.allowedPlacementMode == 'absolute');
|
5220 |
+
if (isReversed) {
|
5221 |
+
relatedLayer = layer.getRootElement().prevAll('.n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer').first().data('layerObject');
|
5222 |
+
} else {
|
5223 |
+
relatedLayer = layer.getRootElement().nextAll('.n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer').first().data('layerObject');
|
5224 |
+
}
|
5225 |
+
|
5226 |
+
if (relatedLayer !== undefined) {
|
5227 |
+
layer.layerRow.insertBefore(relatedLayer.layerRow);
|
5228 |
+
} else {
|
5229 |
+
this.$ul.append(layer.layerRow);
|
5230 |
+
}
|
5231 |
+
|
5232 |
+
if (layer.animations) {
|
5233 |
+
layer.animations.syncRow(relatedLayer, isReversed);
|
5234 |
+
}
|
5235 |
+
}
|
5236 |
+
|
5237 |
+
LayerContainer.prototype.getChildLayersRecursive = function (nodeOnly) {
|
5238 |
+
var _layers = this.getSortedLayers();
|
5239 |
+
var layers = [];
|
5240 |
+
for (var i = 0; i < _layers.length; i++) {
|
5241 |
+
if (nodeOnly) {
|
5242 |
+
layers.push(_layers[i].layer[0]);
|
5243 |
+
} else {
|
5244 |
+
layers.push(_layers[i]);
|
5245 |
+
}
|
5246 |
+
if (_layers[i].container) {
|
5247 |
+
layers.push.apply(layers, _layers[i].container.getChildLayersRecursive(nodeOnly));
|
5248 |
+
}
|
5249 |
+
}
|
5250 |
+
return layers;
|
5251 |
+
}
|
5252 |
+
|
5253 |
+
LayerContainer.prototype.moveLayerToGroup = function (layer, newLocalIndex) {
|
5254 |
+
this.moveLayersToGroup([layer], [newLocalIndex]);
|
5255 |
+
}
|
5256 |
+
|
5257 |
+
LayerContainer.prototype.moveLayersToGroup = function (layers, newLocalIndexs) {
|
5258 |
+
newLocalIndexs = newLocalIndexs || [];
|
5259 |
+
|
5260 |
+
var originalGroups = [];
|
5261 |
+
for (var i = 0; i < layers.length; i++) {
|
5262 |
+
var layer = layers[i],
|
5263 |
+
originalGroup = layer.group;
|
5264 |
+
|
5265 |
+
var originalIndex = layer.getIndex();
|
5266 |
+
if (typeof newLocalIndexs[i] != 'undefined') {
|
5267 |
+
this.insertLayerAt(layer, newLocalIndexs[i]);
|
5268 |
+
} else {
|
5269 |
+
this.insert(layer);
|
5270 |
+
}
|
5271 |
+
layer.changeGroup(originalIndex, this.component);
|
5272 |
+
|
5273 |
+
if (this != originalGroup) {
|
5274 |
+
if ($.inArray(originalGroup, originalGroups) == -1) {
|
5275 |
+
originalGroups.push(originalGroup);
|
5276 |
+
}
|
5277 |
+
}
|
5278 |
+
}
|
5279 |
+
|
5280 |
+
for (var i = 0; i < originalGroups.length; i++) {
|
5281 |
+
originalGroups[i].update();
|
5282 |
+
}
|
5283 |
+
}
|
5284 |
+
|
5285 |
+
LayerContainer.prototype.activateFirst = function () {
|
5286 |
+
var layers = this.getSortedLayers();
|
5287 |
+
if (layers.length > 0) {
|
5288 |
+
layers[layers.length - 1].activate(); //Do not show editor on load!
|
5289 |
+
}
|
5290 |
+
}
|
5291 |
+
|
5292 |
+
LayerContainer.prototype.resetModes = function (mode) {
|
5293 |
+
var layers = this.getSortedLayers();
|
5294 |
+
for (var i = 0; i < layers.length; i++) {
|
5295 |
+
layers[i].resetMode(mode);
|
5296 |
+
if (layers[i].container != undefined) {
|
5297 |
+
layers[i].container.resetModes(mode);
|
5298 |
+
}
|
5299 |
+
}
|
5300 |
+
}
|
5301 |
+
|
5302 |
+
LayerContainer.prototype.copyModes = function (mode, currentMode) {
|
5303 |
+
var layers = this.getSortedLayers();
|
5304 |
+
for (var i = 0; i < layers.length; i++) {
|
5305 |
+
layers[i].copyMode(mode, currentMode);
|
5306 |
+
if (layers[i].container != undefined) {
|
5307 |
+
layers[i].container.copyModes(mode, currentMode);
|
5308 |
+
}
|
5309 |
+
}
|
5310 |
+
}
|
5311 |
+
|
5312 |
+
LayerContainer.prototype.changeEditorModes = function (mode) {
|
5313 |
+
var layers = this.getSortedLayers();
|
5314 |
+
for (var i = 0; i < layers.length; i++) {
|
5315 |
+
layers[i].changeEditorMode(mode);
|
5316 |
+
if (layers[i].container != undefined) {
|
5317 |
+
layers[i].container.changeEditorModes(mode);
|
5318 |
+
}
|
5319 |
+
}
|
5320 |
+
}
|
5321 |
+
|
5322 |
+
LayerContainer.prototype.renderModeProperties = function () {
|
5323 |
+
var layers = this.getSortedLayers();
|
5324 |
+
for (var i = 0; i < layers.length; i++) {
|
5325 |
+
layers[i].renderModeProperties();
|
5326 |
+
if (layers[i].container != undefined) {
|
5327 |
+
layers[i].container.renderModeProperties();
|
5328 |
+
}
|
5329 |
+
}
|
5330 |
+
}
|
5331 |
+
|
5332 |
+
LayerContainer.prototype.getAllLayers = function (layers) {
|
5333 |
+
layers = layers || [];
|
5334 |
+
var sortedLayers = this.getSortedLayers();
|
5335 |
+
for (var i = 0; i < sortedLayers.length; i++) {
|
5336 |
+
layers.push(sortedLayers[i]);
|
5337 |
+
if (sortedLayers[i].container != undefined) {
|
5338 |
+
sortedLayers[i].container.getAllLayers(layers);
|
5339 |
+
}
|
5340 |
+
}
|
5341 |
+
return layers;
|
5342 |
+
}
|
5343 |
+
|
5344 |
+
LayerContainer.prototype.getData = function (params) {
|
5345 |
+
params = $.extend({
|
5346 |
+
layersIncluded: true,
|
5347 |
+
itemsIncluded: true
|
5348 |
+
}, params);
|
5349 |
+
var layers = [];
|
5350 |
+
|
5351 |
+
var sortedLayers = this.getSortedLayers();
|
5352 |
+
if (this.allowedPlacementMode == 'absolute') {
|
5353 |
+
for (var i = sortedLayers.length - 1; i >= 0; i--) {
|
5354 |
+
layers.push(sortedLayers[i].getData(params));
|
5355 |
+
}
|
5356 |
+
} else {
|
5357 |
+
for (var i = 0; i < sortedLayers.length; i++) {
|
5358 |
+
layers.push(sortedLayers[i].getData(params));
|
5359 |
+
}
|
5360 |
+
}
|
5361 |
+
|
5362 |
+
return layers;
|
5363 |
+
}
|
5364 |
+
|
5365 |
+
LayerContainer.prototype.getHTML = function (base64) {
|
5366 |
+
var layers = this.getSortedLayers(),
|
5367 |
+
nodes = [];
|
5368 |
+
for (var i = 0; i < layers.length; i++) {
|
5369 |
+
nodes.push(layers[i].getHTML(base64));
|
5370 |
+
}
|
5371 |
+
return nodes;
|
5372 |
+
}
|
5373 |
+
|
5374 |
+
/**
|
5375 |
+
* Used for layer editor
|
5376 |
+
* @param exclude
|
5377 |
+
* @returns {Array}
|
5378 |
+
*/
|
5379 |
+
LayerContainer.prototype.getDroppables = function (exclude) {
|
5380 |
+
var droppables = [],
|
5381 |
+
layers = this.getSortedLayers();
|
5382 |
+
|
5383 |
+
for (var i = 0; i < layers.length; i++) {
|
5384 |
+
if (layers[i] != exclude) {
|
5385 |
+
var droppable = layers[i].getDroppable();
|
5386 |
+
if (droppable) {
|
5387 |
+
droppables.push(droppable);
|
5388 |
+
}
|
5389 |
+
if (layers[i].container) {
|
5390 |
+
droppables.push.apply(droppables, layers[i].container.getDroppables(exclude));
|
5391 |
+
}
|
5392 |
+
}
|
5393 |
+
}
|
5394 |
+
|
5395 |
+
return droppables;
|
5396 |
+
}
|
5397 |
+
|
5398 |
+
/**
|
5399 |
+
* Used for Layer List
|
5400 |
+
* @param layer
|
5401 |
+
* @returns {Array}
|
5402 |
+
*/
|
5403 |
+
LayerContainer.prototype.getLLDroppables = function (layer) {
|
5404 |
+
var droppables = [];
|
5405 |
+
|
5406 |
+
var droppable = this.component.getLLDroppable(layer);
|
5407 |
+
if (droppable) {
|
5408 |
+
droppables.push(droppable);
|
5409 |
+
}
|
5410 |
+
|
5411 |
+
var layers = this.getSortedLayers();
|
5412 |
+
for (var i = 0; i < layers.length; i++) {
|
5413 |
+
if (!layers[i].container || layers[i] == layer) continue;
|
5414 |
+
|
5415 |
+
droppables.push.apply(droppables, layers[i].container.getLLDroppables(layer));
|
5416 |
+
}
|
5417 |
+
|
5418 |
+
return droppables;
|
5419 |
+
}
|
5420 |
+
|
5421 |
+
return LayerContainer;
|
5422 |
+
});
|
5423 |
+
N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
5424 |
+
"use strict";
|
5425 |
+
|
5426 |
+
function LayerDataStorage() {
|
5427 |
+
this.isDeviceProp = {};
|
5428 |
+
this.propertyScope = {};
|
5429 |
+
this.property = {};
|
5430 |
+
this.deviceProperty = {
|
5431 |
+
desktopPortrait: {},
|
5432 |
+
desktopLandscape: {},
|
5433 |
+
tabletPortrait: {},
|
5434 |
+
tabletLandscape: {},
|
5435 |
+
mobilePortrait: {},
|
5436 |
+
mobileLandscape: {}
|
5437 |
};
|
5438 |
+
}
|
5439 |
|
5440 |
+
LayerDataStorage.prototype.getMode = function () {
|
5441 |
+
return this.canvasManager.getMode();
|
5442 |
+
};
|
5443 |
|
5444 |
+
LayerDataStorage.prototype.getRawProperty = function (name) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5445 |
|
5446 |
+
if (this.isDeviceProp[name]) {
|
5447 |
+
var mode = this.getMode(),
|
5448 |
+
properties = this.deviceProperty[mode];
|
5449 |
+
if (properties[name] !== undefined) {
|
5450 |
+
return properties[name];
|
5451 |
+
}
|
5452 |
+
return undefined;
|
5453 |
+
}
|
5454 |
+
return this.property[name];
|
5455 |
+
}
|
5456 |
|
5457 |
+
LayerDataStorage.prototype.getProperty = function (name) {
|
5458 |
|
5459 |
+
if (this.isDeviceProp[name]) {
|
5460 |
+
var mode = this.getMode(),
|
5461 |
+
properties = this.deviceProperty[mode],
|
5462 |
+
fallbackProperties = this.deviceProperty['desktopPortrait'];
|
5463 |
+
if (typeof properties[name] !== 'undefined') {
|
5464 |
+
return properties[name];
|
5465 |
+
} else if (typeof fallbackProperties[name] !== 'undefined') {
|
5466 |
+
return fallbackProperties[name];
|
5467 |
+
}
|
5468 |
+
}
|
5469 |
+
return this.property[name];
|
5470 |
+
};
|
5471 |
|
5472 |
+
LayerDataStorage.prototype.historyStore = function (value, name, mode) {
|
5473 |
+
if (!this.isDeleteStarted) {
|
5474 |
+
var currentMode = this.getMode();
|
5475 |
+
if (!this.isDeviceProp[name] || mode == currentMode) {
|
5476 |
+
this.store(name, value, true, 'history');
|
5477 |
+
this.$.trigger('propertyChanged', [name, this.getProperty(name)]);
|
5478 |
+
} else {
|
5479 |
+
this.deviceProperty[mode][name] = value;
|
5480 |
+
this.render(name);
|
5481 |
+
}
|
5482 |
+
}
|
5483 |
+
}
|
5484 |
|
5485 |
+
LayerDataStorage.prototype.store = function (name, value, needRender, from) {
|
|
|
5486 |
|
5487 |
+
var mode = this.getMode(),
|
5488 |
+
oldValue,
|
5489 |
+
oldValueFilled;
|
5490 |
+
if (this.isDeviceProp[name]) {
|
5491 |
+
oldValue = this.deviceProperty[mode][name];
|
5492 |
+
oldValueFilled = this.getProperty(name);
|
5493 |
} else {
|
5494 |
+
oldValueFilled = oldValue = this.property[name];
|
5495 |
+
}
|
5496 |
+
var task = smartSlider.history.addValue(this, this.historyStore, [name, mode]);
|
5497 |
+
if (task) {
|
5498 |
+
task.setValues(oldValue, value);
|
5499 |
}
|
5500 |
|
5501 |
+
this.property[name] = value;
|
5502 |
+
|
5503 |
+
if (this.isDeviceProp[name]) {
|
5504 |
+
this.deviceProperty[mode][name] = value;
|
5505 |
}
|
5506 |
+
|
5507 |
+
if (needRender) {
|
5508 |
+
this.render(name, oldValueFilled, from);
|
5509 |
+
}
|
5510 |
+
}
|
5511 |
+
|
5512 |
+
LayerDataStorage.prototype.render = function (name, oldValue, from) {
|
5513 |
+
this.propertyScope[name]['_sync' + name](oldValue, from);
|
5514 |
+
};
|
5515 |
+
|
5516 |
+
LayerDataStorage.prototype.isDimensionPropertyAccepted = function (value) {
|
5517 |
+
if ((value + '').match(/[0-9]+%/) || value == 'auto') {
|
5518 |
+
return true;
|
5519 |
+
}
|
5520 |
+
return false;
|
5521 |
+
};
|
5522 |
+
|
5523 |
+
LayerDataStorage.prototype.changeEditorMode = function (mode) {
|
5524 |
+
var value = parseInt(this.property[mode]);
|
5525 |
+
if (value) {
|
5526 |
+
this._show();
|
5527 |
} else {
|
5528 |
+
this._hide();
|
5529 |
}
|
5530 |
|
5531 |
+
this.layer.triggerHandler('LayerShowChange', [mode, value]);
|
5532 |
+
|
5533 |
+
this.renderModeProperties(false);
|
5534 |
+
};
|
5535 |
+
|
5536 |
+
LayerDataStorage.prototype.renderModeProperties = function () {
|
5537 |
+
for (var k in this.property) {
|
5538 |
+
this.property[k] = this.getProperty(k);
|
5539 |
+
this.$.trigger('propertyChanged', [k, this.property[k]]);
|
5540 |
+
}
|
5541 |
+
}
|
5542 |
+
|
5543 |
+
LayerDataStorage.prototype.historyResetMode = function (value, mode) {
|
5544 |
+
|
5545 |
+
this.deviceProperty[mode] = $.extend({}, value);
|
5546 |
+
|
5547 |
+
if (mode == this.canvasManager.getMode()) {
|
5548 |
+
this.renderModeProperties(true);
|
5549 |
+
}
|
5550 |
+
}
|
5551 |
+
|
5552 |
+
LayerDataStorage.prototype.resetMode = function (mode) {
|
5553 |
+
if (mode != 'desktopPortrait') {
|
5554 |
+
var undefined;
|
5555 |
+
|
5556 |
+
var task = smartSlider.history.addValue(this, this.historyResetMode, [mode]);
|
5557 |
+
if (task) {
|
5558 |
+
task.setValues($.extend({}, this.deviceProperty[mode]), {});
|
5559 |
+
}
|
5560 |
+
|
5561 |
+
for (var k in this.deviceProperty[mode]) {
|
5562 |
+
this.deviceProperty[mode][k] = undefined;
|
5563 |
+
}
|
5564 |
+
if (mode == this.canvasManager.getMode()) {
|
5565 |
+
this.renderModeProperties(true);
|
5566 |
+
}
|
5567 |
+
}
|
5568 |
+
};
|
5569 |
+
|
5570 |
+
LayerDataStorage.prototype.copyMode = function (from, to) {
|
5571 |
+
if (from != to) {
|
5572 |
+
var originalValues = this.deviceProperty[to];
|
5573 |
+
|
5574 |
+
this.deviceProperty[to] = $.extend({}, this.deviceProperty[to], this.deviceProperty[from]);
|
5575 |
+
|
5576 |
+
var task = smartSlider.history.addValue(this, this.historyResetMode, [to]);
|
5577 |
+
if (task) {
|
5578 |
+
task.setValues(originalValues, this.deviceProperty[to]);
|
5579 |
+
}
|
5580 |
+
}
|
5581 |
+
};
|
5582 |
+
|
5583 |
+
LayerDataStorage.prototype._getDefault = function (name, def) {
|
5584 |
+
if (this.originalProperties[name] !== undefined) {
|
5585 |
+
return this.originalProperties[name];
|
5586 |
+
}
|
5587 |
+
return def;
|
5588 |
+
}
|
5589 |
+
|
5590 |
+
LayerDataStorage.prototype.createProperty = function (name, def, $layer, scope) {
|
5591 |
+
this.isDeviceProp[name] = false;
|
5592 |
+
this.propertyScope[name] = scope || this;
|
5593 |
+
if ($layer) {
|
5594 |
+
this.property[name] = $layer.data(name.toLowerCase());
|
5595 |
+
if (this.property[name] === undefined) {
|
5596 |
+
this.property[name] = this._getDefault(name, def);
|
5597 |
+
}
|
5598 |
} else {
|
5599 |
+
this.property[name] = this._getDefault(name, def);
|
5600 |
}
|
5601 |
+
}
|
5602 |
+
|
5603 |
+
LayerDataStorage.prototype.createDeviceProperty = function (name, def, $layer, scope) {
|
5604 |
+
this.isDeviceProp[name] = true;
|
5605 |
+
this.propertyScope[name] = scope || this;
|
5606 |
+
if ($layer) {
|
5607 |
+
for (var k in this.deviceProperty) {
|
5608 |
+
this.deviceProperty[k][name] = $layer.data(k.toLowerCase() + name.toLowerCase());
|
5609 |
+
if (this.deviceProperty[k][name] === "") {
|
5610 |
+
this.deviceProperty[k][name] = undefined;
|
5611 |
+
}
|
5612 |
+
}
|
5613 |
+
for (var k in this.deviceProperty) {
|
5614 |
+
if (this.deviceProperty[k][name] === undefined || this.deviceProperty[k][name] === "") {
|
5615 |
+
var defaultValue = this._getDefault(k.toLowerCase() + name.toLowerCase());
|
5616 |
+
if (defaultValue !== undefined) {
|
5617 |
+
this.deviceProperty[k][name] = defaultValue;
|
5618 |
+
}
|
5619 |
+
}
|
5620 |
+
}
|
5621 |
+
for (var k in def) {
|
5622 |
+
if (this.deviceProperty[k][name] === undefined || this.deviceProperty[k][name] === "") {
|
5623 |
+
this.deviceProperty[k][name] = def[k];
|
5624 |
+
}
|
5625 |
+
}
|
5626 |
} else {
|
5627 |
+
//Create layer
|
5628 |
+
for (var k in def) {
|
5629 |
+
this.deviceProperty[k][name] = def[k];
|
5630 |
+
}
|
5631 |
+
for (var k in this.deviceProperty) {
|
5632 |
+
var defaultValue = this._getDefault(k.toLowerCase() + name.toLowerCase());
|
5633 |
+
if (defaultValue !== undefined) {
|
5634 |
+
this.deviceProperty[k][name] = defaultValue;
|
5635 |
+
}
|
5636 |
+
}
|
5637 |
}
|
5638 |
+
this.property[name] = this.deviceProperty.desktopPortrait[name];
|
5639 |
+
}
|
5640 |
|
5641 |
+
LayerDataStorage.prototype.removeProperty = function (name) {
|
5642 |
+
delete this.property[name];
|
5643 |
+
this.layer.removeData(name.toLowerCase())
|
5644 |
+
.removeAttr('data-' + name.toLowerCase());
|
5645 |
|
5646 |
+
if (this.isDeviceProp[name]) {
|
5647 |
+
for (var k in this.deviceProperty) {
|
5648 |
+
delete this.deviceProperty[k][name];
|
5649 |
+
this.layer.removeData(k.toLowerCase() + name.toLowerCase())
|
5650 |
+
.removeAttr('data-' + k.toLowerCase() + name.toLowerCase());
|
5651 |
+
}
|
5652 |
+
}
|
5653 |
+
delete this.isDeviceProp[name];
|
5654 |
+
delete this.propertyScope[name];
|
5655 |
+
}
|
5656 |
|
5657 |
+
LayerDataStorage.prototype.removeProperties = function (properties) {
|
5658 |
+
for (var i = 0; i < properties.length; i++) {
|
5659 |
+
this.removeProperty(properties[i]);
|
5660 |
+
}
|
5661 |
+
}
|
5662 |
+
|
5663 |
+
LayerDataStorage.prototype.getPropertiesData = function (properties) {
|
5664 |
+
var data = {};
|
5665 |
+
for (var i = 0; i < properties.length; i++) {
|
5666 |
+
var name = properties[i];
|
5667 |
+
if (this.property[name] !== undefined) {
|
5668 |
+
data[name] = this.property[name];
|
5669 |
+
}
|
5670 |
+
if (this.isDeviceProp[name]) {
|
5671 |
+
for (var k in this.deviceProperty) {
|
5672 |
+
if (this.deviceProperty[k][name] !== undefined) {
|
5673 |
+
data[k.toLowerCase() + name] = this.deviceProperty[k][name];
|
5674 |
+
}
|
5675 |
+
}
|
5676 |
+
}
|
5677 |
+
}
|
5678 |
+
return data;
|
5679 |
+
}
|
5680 |
+
|
5681 |
+
LayerDataStorage.prototype.setProperty = function (name, value, from) {
|
5682 |
+
if (this.propertyScope[name] !== undefined) {
|
5683 |
+
if (typeof this.propertyScope[name]['setProperty' + name] == 'function') {
|
5684 |
+
this.propertyScope[name]['setProperty' + name](name, value, from);
|
5685 |
+
} else {
|
5686 |
+
this._setProperty(name, value, from);
|
5687 |
+
}
|
5688 |
+
}
|
5689 |
+
}
|
5690 |
+
|
5691 |
+
LayerDataStorage.prototype._setProperty = function (name, value, from) {
|
5692 |
+
|
5693 |
+
this.store(name, value, true, from);
|
5694 |
+
|
5695 |
+
if (from != 'manager') {
|
5696 |
+
this.$.trigger('propertyChanged', [name, this.getProperty(name)]);
|
5697 |
+
}
|
5698 |
+
}
|
5699 |
+
|
5700 |
+
return LayerDataStorage;
|
5701 |
+
});
|
5702 |
+
N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
5703 |
+
"use strict";
|
5704 |
+
var layerClass = '.n2-ss-layer',
|
5705 |
+
keys = {
|
5706 |
+
16: 0,
|
5707 |
+
38: 0,
|
5708 |
+
40: 0,
|
5709 |
+
37: 0,
|
5710 |
+
39: 0
|
5711 |
+
},
|
5712 |
+
horizontalAlign = {
|
5713 |
+
97: 'left',
|
5714 |
+
98: 'center',
|
5715 |
+
99: 'right',
|
5716 |
+
100: 'left',
|
5717 |
+
101: 'center',
|
5718 |
+
102: 'right',
|
5719 |
+
103: 'left',
|
5720 |
+
104: 'center',
|
5721 |
+
105: 'right'
|
5722 |
+
},
|
5723 |
+
verticalAlign = {
|
5724 |
+
97: 'bottom',
|
5725 |
+
98: 'bottom',
|
5726 |
+
99: 'bottom',
|
5727 |
+
100: 'middle',
|
5728 |
+
101: 'middle',
|
5729 |
+
102: 'middle',
|
5730 |
+
103: 'top',
|
5731 |
+
104: 'top',
|
5732 |
+
105: 'top'
|
5733 |
+
},
|
5734 |
+
SELECT_MODE = {
|
5735 |
+
OFF: 0,
|
5736 |
+
ON: 1,
|
5737 |
+
GROUP: 2
|
5738 |
+
},
|
5739 |
+
SELECT_MODE_INV = {
|
5740 |
+
0: 'OFF',
|
5741 |
+
1: 'ON',
|
5742 |
+
2: 'GROUP'
|
5743 |
+
};
|
5744 |
+
|
5745 |
+
function CanvasManager(slideEditManager, isStatic, options) {
|
5746 |
+
this.mode = 'desktopPortrait';
|
5747 |
+
this.slideEditManager = slideEditManager;
|
5748 |
+
this.isStatic = isStatic;
|
5749 |
+
this.ready = $.Deferred();
|
5750 |
+
|
5751 |
+
this.shouldPreventActivationBubble = false;
|
5752 |
+
|
5753 |
+
this.$ = $(this);
|
5754 |
+
|
5755 |
+
smartSlider.canvasManager = this;
|
5756 |
+
|
5757 |
+
this.$highlight = $('<div class="n2-ss-layer-highlight n2-ss-layer-highlight-n" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-e" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-s" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-w" />');
|
5758 |
+
|
5759 |
+
this.initSelectMode();
|
5760 |
+
|
5761 |
+
this.layerWindow = new scope.LayerWindow(this);
|
5762 |
+
|
5763 |
+
this.layerOptions = new scope.ComponentSettings(this);
|
5764 |
+
|
5765 |
+
this.ui = new scope.CanvasUserInterface(this);
|
5766 |
+
|
5767 |
+
this.mainContainer = new scope.MainContainer(this);
|
5768 |
+
|
5769 |
+
this.itemEditor = new scope.ItemManager(this, options);
|
5770 |
+
|
5771 |
+
this.mainContainer.lateInit();
|
5772 |
+
|
5773 |
+
this._initDeviceModeChange();
|
5774 |
+
|
5775 |
+
this.canvasSettings = new scope.CanvasSettings(this);
|
5776 |
+
|
5777 |
+
this.layerOptions.startFeatures();
|
5778 |
+
|
5779 |
+
this.hotkeys();
|
5780 |
+
|
5781 |
+
this.addContextMenu();
|
5782 |
+
|
5783 |
+
this.mainContainer.refreshHasLayers();
|
5784 |
+
|
5785 |
+
var editorModes = $('#n2-ss-editor-mode .n2-radio-option'),
|
5786 |
+
updateEditorModeSync = $.proxy(function (mode) {
|
5787 |
+
this.updateEditorMode(mode);
|
5788 |
+
switch (mode) {
|
5789 |
+
case 'content':
|
5790 |
+
editorModes.eq(0).addClass('n2-active');
|
5791 |
+
editorModes.eq(1).removeClass('n2-active');
|
5792 |
+
break;
|
5793 |
+
case 'canvas':
|
5794 |
+
editorModes.eq(0).removeClass('n2-active');
|
5795 |
+
editorModes.eq(1).addClass('n2-active');
|
5796 |
+
break;
|
5797 |
+
}
|
5798 |
+
}, this);
|
5799 |
+
|
5800 |
+
if (this.mainContent && this.mainContent.container.getLayerCount()) {
|
5801 |
+
updateEditorModeSync('content');
|
5802 |
+
} else {
|
5803 |
+
var layers = this.mainContainer.container.getSortedLayers();
|
5804 |
+
if (this.mainContent && layers.length > 1 || !this.mainContent && layers.length > 0) {
|
5805 |
+
updateEditorModeSync('canvas');
|
5806 |
+
} else {
|
5807 |
+
var stored = $.jStorage.get('editormode');
|
5808 |
+
if (!stored) {
|
5809 |
+
stored = 'content';
|
5810 |
+
$.jStorage.set('editormode', stored);
|
5811 |
+
}
|
5812 |
+
updateEditorModeSync(stored);
|
5813 |
+
}
|
5814 |
+
}
|
5815 |
+
|
5816 |
+
editorModes.on('click', $.proxy(function (e) {
|
5817 |
+
editorModes.removeClass('n2-active');
|
5818 |
+
var $el = $(e.currentTarget),
|
5819 |
+
mode = $el.data('mode');
|
5820 |
+
$el.addClass('n2-active');
|
5821 |
+
if (mode != this.currentEditorMode) {
|
5822 |
+
this.updateEditorMode(mode);
|
5823 |
+
|
5824 |
+
$.jStorage.set('editormode', mode);
|
5825 |
+
}
|
5826 |
}, this));
|
5827 |
|
5828 |
+
this.isMultiDrag = false;
|
5829 |
+
|
5830 |
+
};
|
5831 |
+
|
5832 |
+
CanvasManager.prototype.updateEditorMode = function (mode) {
|
5833 |
+
this.currentEditorMode = mode;
|
5834 |
+
$('body').attr('data-editormode', this.currentEditorMode);
|
5835 |
};
|
5836 |
|
5837 |
+
CanvasManager.prototype.getMode = function () {
|
5838 |
+
return this.mode;
|
5839 |
+
};
|
5840 |
+
|
5841 |
+
CanvasManager.prototype.getResponsiveRatio = function (axis) {
|
5842 |
+
if (axis == 'h') {
|
5843 |
+
return smartSlider.frontend.responsive.lastRatios.slideW;
|
5844 |
+
} else if (axis == 'v') {
|
5845 |
+
return smartSlider.frontend.responsive.lastRatios.slideH;
|
5846 |
+
}
|
5847 |
+
return 0;
|
5848 |
+
};
|
5849 |
+
|
5850 |
+
CanvasManager.prototype.setMainContent = function (layer) {
|
5851 |
+
this.mainContent = layer;
|
5852 |
+
}
|
5853 |
+
|
5854 |
+
CanvasManager.prototype.isGroup = function (layer) {
|
5855 |
+
return false;
|
5856 |
+
|
5857 |
+
}
|
5858 |
+
|
5859 |
+
CanvasManager.prototype.isRow = function (layer) {
|
5860 |
+
return layer instanceof scope.Row;
|
5861 |
+
}
|
5862 |
+
|
5863 |
+
CanvasManager.prototype.isCol = function (layer) {
|
5864 |
+
return layer instanceof scope.Col;
|
5865 |
+
}
|
5866 |
|
5867 |
+
CanvasManager.prototype.isLayer = function (layer) {
|
5868 |
+
return layer instanceof scope.Layer;
|
5869 |
+
}
|
|
|
|
|
5870 |
|
5871 |
+
CanvasManager.prototype.isContent = function (layer) {
|
5872 |
+
return layer instanceof scope.Content;
|
5873 |
}
|
5874 |
|
5875 |
+
//<editor-fold desc="Initialize the device mode changer">
|
|
|
|
|
|
|
|
|
|
|
5876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5877 |
|
5878 |
+
CanvasManager.prototype._initDeviceModeChange = function () {
|
5879 |
+
var resetButton = $('#layerresettodesktop').on('click', $.proxy(this.__onResetToDesktopClick, this));
|
5880 |
+
this.resetToDesktopTRElement = resetButton.closest('tr');
|
5881 |
+
this.resetToDesktopGlobalElement = $('#n2-ss-layer-reset-to-desktop').on('click', $.proxy(function () {
|
5882 |
+
if (this.resetToDesktopTRElement.css('display') == 'block') {
|
5883 |
+
resetButton.trigger('click');
|
5884 |
+
}
|
5885 |
+
}, this));
|
5886 |
|
5887 |
+
var showOn = $('#n2-ss-layer-show-on'),
|
5888 |
+
showOnShortCuts = {},
|
5889 |
+
deviceModes = smartSlider.frontend.responsive.parameters.deviceModes;
|
5890 |
+
for (var k in deviceModes) {
|
5891 |
+
if (deviceModes[k]) {
|
5892 |
+
showOnShortCuts[k] = $('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-' + k + '"></i></div>').on('click', $.proxy(function (mode) {
|
5893 |
+
this.layerOptions.currentForm[mode]
|
5894 |
+
.data('field')
|
5895 |
+
.onoff.trigger('click');
|
5896 |
+
}, this, k)).appendTo(showOn);
|
5897 |
+
}
|
5898 |
}
|
|
|
5899 |
|
5900 |
+
showOn.children().first().addClass('n2-first');
|
5901 |
+
showOn.children().last().addClass('n2-last');
|
|
|
5902 |
|
5903 |
+
|
5904 |
+
this.globalShowOnDeviceCB = function (mode) {
|
5905 |
+
if (typeof showOnShortCuts[mode] !== 'undefined') {
|
5906 |
+
showOnShortCuts[mode].toggleClass('n2-active', this.layerOptions.currentForm[mode].val() == 1);
|
5907 |
}
|
5908 |
+
};
|
5909 |
|
5910 |
+
this.layerOptions.forms.global.desktopPortrait.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'desktopPortrait'));
|
5911 |
+
this.layerOptions.forms.global.desktopLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'desktopLandscape'));
|
5912 |
+
this.layerOptions.forms.global.tabletPortrait.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'tabletPortrait'));
|
5913 |
+
this.layerOptions.forms.global.tabletLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'tabletLandscape'));
|
5914 |
+
this.layerOptions.forms.global.mobilePortrait.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'mobilePortrait'));
|
5915 |
+
this.layerOptions.forms.global.mobileLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'mobileLandscape'));
|
|
|
|
|
5916 |
|
5917 |
+
$('#layershow').data('field').setAvailableDevices(deviceModes);
|
5918 |
+
$('#layergroup-show').data('field').setAvailableDevices(deviceModes);
|
5919 |
|
5920 |
+
this.__onChangeDeviceOrientation();
|
5921 |
+
smartSlider.frontend.sliderElement.on('SliderDeviceOrientation', $.proxy(function () {
|
5922 |
+
this.__onChangeDeviceOrientation();
|
5923 |
+
}, this));
|
|
|
|
|
5924 |
|
5925 |
+
this.ready.resolve();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5926 |
|
|
|
|
|
5927 |
};
|
5928 |
|
5929 |
+
/**
|
5930 |
+
* Refresh the current responsive mode. Example: you are in tablet view and unpublish a layer for tablet, then you should need a refresh on the mode.
|
5931 |
+
*/
|
5932 |
+
CanvasManager.prototype.refreshMode = function () {
|
|
|
|
|
|
|
5933 |
|
5934 |
+
this.__onChangeDeviceOrientation();
|
5935 |
|
5936 |
+
smartSlider.frontend.responsive.reTriggerSliderDeviceOrientation();
|
|
|
|
|
|
|
|
|
5937 |
};
|
5938 |
|
5939 |
+
/**
|
5940 |
+
* When the device mode changed we have to change the slider
|
5941 |
+
* @param mode
|
5942 |
+
* @private
|
5943 |
+
*/
|
5944 |
+
CanvasManager.prototype.__onChangeDeviceOrientation = function () {
|
5945 |
|
5946 |
+
this.mode = smartSlider.frontend.responsive.getNormalizedModeString();
|
5947 |
+
//this.globalShowOnDeviceCB(this.mode);
|
|
|
5948 |
|
5949 |
+
this.resetToDesktopTRElement.css('display', (this.mode == 'desktopPortrait' ? 'none' : ''));
|
5950 |
+
this.resetToDesktopGlobalElement.css('display', (this.mode == 'desktopPortrait' ? 'none' : ''));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5951 |
|
5952 |
+
this.mainContainer.container.changeEditorModes(this.mode);
|
5953 |
+
};
|
|
|
5954 |
|
5955 |
+
/**
|
5956 |
+
* Reset the custom values of the current mode on the current layer to the desktop values.
|
5957 |
+
* @private
|
5958 |
+
*/
|
5959 |
+
CanvasManager.prototype.__onResetToDesktopClick = function () {
|
5960 |
+
if (this.mainContainer.getSelectedLayer()) {
|
5961 |
+
var mode = this.getMode();
|
5962 |
+
this.mainContainer.getSelectedLayer().resetMode(mode);
|
|
|
|
|
|
|
|
|
5963 |
}
|
5964 |
};
|
5965 |
|
5966 |
+
CanvasManager.prototype.copyOrResetMode = function (mode) {
|
5967 |
+
var currentMode = this.getMode();
|
5968 |
+
if (currentMode == 'desktopPortrait') {
|
5969 |
+
if (mode != 'desktopPortrait') {
|
5970 |
+
this.mainContainer.container.resetModes(mode);
|
5971 |
+
}
|
5972 |
+
} else {
|
5973 |
+
if (mode == currentMode) {
|
5974 |
+
this.mainContainer.container.resetModes(mode);
|
5975 |
+
} else {
|
5976 |
+
this.mainContainer.container.copyModes(currentMode, mode);
|
5977 |
+
}
|
5978 |
}
|
|
|
|
|
5979 |
};
|
|
|
|
|
|
|
5980 |
|
5981 |
+
//</editor-fold>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5982 |
|
5983 |
+
CanvasManager.prototype.getSnap = function () {
|
5984 |
+
if (this.canvasSettings.get("n2-ss-snap-to-enabled")) {
|
5985 |
+
if (this.isStatic) {
|
5986 |
+
return $('.n2-ss-static-slide .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide');
|
5987 |
+
}
|
5988 |
+
return $('.n2-ss-slide.n2-ss-slide-active .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide');
|
5989 |
+
}
|
5990 |
+
return false;
|
5991 |
+
};
|
5992 |
|
5993 |
+
/**
|
5994 |
+
* Get the HTML code of the whole slide
|
5995 |
+
* @returns {string} HTML
|
5996 |
+
*/
|
5997 |
+
CanvasManager.prototype.getHTML = function () {
|
5998 |
+
var node = $('<div></div>');
|
5999 |
|
6000 |
+
var list = this.mainContainer.container.getAllLayers();
|
6001 |
+
for (var i = 0; i < list.length; i++) {
|
6002 |
+
node.append(list[i].getHTML(true));
|
6003 |
}
|
|
|
6004 |
|
6005 |
+
return node.html();
|
6006 |
+
};
|
|
|
|
|
|
|
6007 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6008 |
|
6009 |
+
CanvasManager.prototype.getData = function () {
|
6010 |
+
return this.mainContainer.container.getData();
|
6011 |
+
};
|
|
|
|
|
6012 |
|
6013 |
+
CanvasManager.prototype.importLayers = function (data, overwrite) {
|
6014 |
+
var group = this.mainContainer;
|
|
|
6015 |
|
6016 |
+
var layers = $.extend(true, [], data);
|
6017 |
+
if (overwrite) {
|
6018 |
+
this.mainContainer.deleteLayers();
|
6019 |
+
}
|
6020 |
|
6021 |
+
this._idTranslation = {};
|
|
|
|
|
6022 |
|
6023 |
+
var layerNodes = this.dataToLayers(layers);
|
|
|
6024 |
|
6025 |
+
for (var i = 0; i < layerNodes.length; i++) {
|
6026 |
+
this.mainContainer.container.append(layerNodes[i]);
|
6027 |
+
}
|
6028 |
|
6029 |
+
this.refreshMode();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6030 |
|
|
|
6031 |
|
6032 |
+
if (!this.mainContainer.getSelectedLayer()) {
|
6033 |
+
var layers = this.mainContainer.container.getSortedLayers();
|
6034 |
+
if (layers.length > 0) {
|
6035 |
+
layers[0].activate();
|
6036 |
+
}
|
6037 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6038 |
|
6039 |
+
};
|
6040 |
+
|
6041 |
+
CanvasManager.prototype.loadComponentWithNode = function (group, $component, needHistory, refresh) {
|
6042 |
+
|
6043 |
+
var component = group.container.append($component);
|
6044 |
+
|
6045 |
+
if (refresh) {
|
6046 |
+
this.refreshMode();
|
6047 |
}
|
6048 |
+
|
6049 |
+
return component;
|
6050 |
};
|
6051 |
|
6052 |
+
CanvasManager.prototype.insertComponentWithNode = function (group, $component, index, needHistory, refresh) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6053 |
|
6054 |
+
var component = group.container.insertAt($component, index);
|
|
|
|
|
|
|
|
|
6055 |
|
6056 |
+
if (refresh) {
|
6057 |
+
this.refreshMode();
|
6058 |
+
}
|
|
|
|
|
6059 |
|
6060 |
+
return component;
|
6061 |
};
|
6062 |
|
|
|
6063 |
|
6064 |
+
/**
|
6065 |
+
* getter for the currently selected layer
|
6066 |
+
* @returns {jQuery|boolean} layer element in jQuery representation or false
|
6067 |
+
* @private
|
6068 |
+
*/
|
6069 |
|
6070 |
+
CanvasManager.prototype.fixActiveLayer = function () {
|
6071 |
+
var selectedLayer = this.mainContainer.getSelectedLayer();
|
6072 |
+
if (selectedLayer == false || selectedLayer.isDeleted) {
|
6073 |
+
this.resetActiveLayer();
|
6074 |
+
}
|
6075 |
+
};
|
|
|
|
|
6076 |
|
6077 |
+
CanvasManager.prototype.resetActiveLayer = function () {
|
6078 |
+
var layers = this.mainContainer.container.getSortedLayers();
|
6079 |
+
if (layers.length) {
|
6080 |
+
layers[layers.length - 1].activate();
|
6081 |
+
} else {
|
6082 |
+
this.changeActiveLayer(null);
|
6083 |
}
|
6084 |
+
};
|
6085 |
|
6086 |
+
CanvasManager.prototype.changeActiveLayer = function (nextActiveLayer, preventExitFromSelection) {
|
6087 |
+
var layer = this.mainContainer.getSelectedLayer();
|
6088 |
+
if (layer && !layer.isDeleted) {
|
6089 |
+
// There is a chance that the layer already deleted
|
6090 |
+
layer.$.off('propertyChanged.editor')
|
6091 |
+
.off('.active');
|
6092 |
|
6093 |
+
layer.deActivate();
|
6094 |
+
}
|
6095 |
+
this.mainContainer.activeLayer = nextActiveLayer;
|
6096 |
|
6097 |
+
if (!preventExitFromSelection) {
|
6098 |
+
this.exitSelectMode();
|
6099 |
+
}
|
6100 |
|
6101 |
+
if (nextActiveLayer) {
|
|
|
|
|
6102 |
|
6103 |
+
this.layerOptions.changeActiveComponent(nextActiveLayer, nextActiveLayer.type, nextActiveLayer.placement.getType(), nextActiveLayer.property);
|
6104 |
|
6105 |
+
nextActiveLayer.$.on({
|
6106 |
+
'propertyChanged.editor': $.proxy(this.layerOptions.onUpdateField, this.layerOptions),
|
6107 |
+
'placementChanged.active': $.proxy(function (e, current, last) {
|
6108 |
+
this.layerOptions.changeActiveComponentPlacement(current, nextActiveLayer.property);
|
6109 |
+
}, this)
|
6110 |
+
});
|
6111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6112 |
}
|
6113 |
+
|
6114 |
+
this.$.trigger('activeLayerChanged');
|
|
|
6115 |
};
|
6116 |
|
6117 |
+
CanvasManager.prototype.highlight = function (layer) {
|
6118 |
+
this.$highlight.appendTo(layer.layer);
|
6119 |
+
}
|
6120 |
+
|
6121 |
+
CanvasManager.prototype.deHighlight = function (layer) {
|
6122 |
+
this.$highlight.detach();
|
6123 |
+
}
|
6124 |
+
|
6125 |
+
CanvasManager.prototype.delete = function () {
|
6126 |
+
if (this.mainContainer.getSelectedLayer()) {
|
6127 |
+
this.doActionOnActiveLayer('delete');
|
|
|
|
|
|
|
|
|
6128 |
}
|
6129 |
};
|
6130 |
|
6131 |
+
CanvasManager.prototype.duplicate = function () {
|
6132 |
+
if (this.mainContainer.getSelectedLayer()) {
|
6133 |
+
this.doActionOnActiveLayer('duplicate', [this.selectMode == SELECT_MODE.ON ? false : true, false]);
|
|
|
|
|
6134 |
}
|
6135 |
+
};
|
6136 |
+
|
6137 |
+
CanvasManager.prototype.copy = function (clickedLayer) {
|
6138 |
+
var requestedLayers;
|
6139 |
+
if (clickedLayer == undefined) {
|
6140 |
+
if (this.selectMode == 1) {
|
6141 |
+
requestedLayers = this.selectedLayers;
|
6142 |
+
} else {
|
6143 |
+
var activeLayer = this.mainContainer.getSelectedLayer();
|
6144 |
+
if (activeLayer) {
|
6145 |
+
requestedLayers = [activeLayer];
|
6146 |
+
}
|
6147 |
+
}
|
6148 |
+
} else {
|
6149 |
+
if (this.isCol(clickedLayer) || this.isContent(clickedLayer)) {
|
6150 |
+
requestedLayers = clickedLayer.container.getSortedLayers()
|
6151 |
+
} else {
|
6152 |
+
requestedLayers = [clickedLayer];
|
6153 |
+
}
|
6154 |
}
|
6155 |
+
|
6156 |
+
var layers = this.mainContainer.getLayerData(requestedLayers);
|
6157 |
+
if (layers.length) {
|
6158 |
+
$.jStorage.set('ss3layersclipboard', JSON.stringify(layers))
|
6159 |
}
|
6160 |
+
};
|
6161 |
|
6162 |
+
CanvasManager.prototype.paste = function (target) {
|
6163 |
+
var clipboard = $.jStorage.get('ss3layersclipboard');
|
6164 |
+
if (clipboard) {
|
6165 |
+
var layers = JSON.parse(clipboard);
|
6166 |
+
if (layers.length) {
|
6167 |
+
var targetGroup;
|
6168 |
+
if (target === undefined || !target) {
|
6169 |
+
targetGroup = this.mainContainer.getActiveGroup();
|
6170 |
+
} else {
|
6171 |
+
if (this.isCol(target) || this.isContent(target)) {
|
6172 |
+
targetGroup = target;
|
6173 |
+
} else {
|
6174 |
+
targetGroup = target.group;
|
6175 |
+
}
|
6176 |
}
|
6177 |
+
this.mainContainer.addLayers(layers, targetGroup);
|
6178 |
+
}
|
6179 |
}
|
6180 |
};
|
6181 |
|
6182 |
+
CanvasManager.prototype.hasLayersOnClipboard = function () {
|
6183 |
+
if ($.jStorage.get('ss3layersclipboard')) {
|
6184 |
+
return true;
|
6185 |
+
}
|
6186 |
+
return false;
|
6187 |
+
}
|
6188 |
|
6189 |
+
CanvasManager.prototype.addContextMenu = function () {
|
6190 |
+
var canvasManager = this;
|
|
|
6191 |
|
6192 |
+
$('#n2-ss-0 .n2-ss-currently-edited-slide').nextendContextMenu({
|
6193 |
+
onShow: $.proxy(function (e, contextMenu) {
|
6194 |
+
var $target = $(e.target);
|
6195 |
+
|
6196 |
+
var $closestLayer = $target.closest('.n2-ss-layer'),
|
6197 |
+
closestLayer = $closestLayer.data('layerObject');
|
6198 |
+
if (!closestLayer) {
|
6199 |
+
closestLayer = this.mainContainer.getSelectedLayer();
|
6200 |
+
}
|
6201 |
+
|
6202 |
+
if (closestLayer) {
|
6203 |
+
if (this.isCol(closestLayer) || this.isContent(closestLayer)) {
|
6204 |
+
contextMenu.addItem('Copy child layers', 'n2-i-copy', $.proxy(function () {
|
6205 |
+
this.copy(closestLayer);
|
6206 |
+
}, this));
|
6207 |
+
} else {
|
6208 |
+
contextMenu.addItem('Copy layer', 'n2-i-copy', $.proxy(function () {
|
6209 |
+
if (this.selectMode == SELECT_MODE.ON) {
|
6210 |
+
this.copy();
|
6211 |
+
} else {
|
6212 |
+
this.copy(closestLayer);
|
6213 |
+
}
|
6214 |
+
}, this));
|
6215 |
+
}
|
6216 |
+
}
|
6217 |
+
|
6218 |
+
if (this.hasLayersOnClipboard()) {
|
6219 |
+
contextMenu.addItem('Paste layer(s)', 'n2-i-paste', $.proxy(function () {
|
6220 |
+
this.paste(closestLayer);
|
6221 |
+
}, this));
|
6222 |
+
}
|
6223 |
+
|
6224 |
+
contextMenu.addItem('Copy slide', 'n2-i-copy', $.proxy(function () {
|
6225 |
+
this.slideEditManager.copySlide();
|
6226 |
+
}, this));
|
6227 |
+
if (this.slideEditManager.hasCopiedSlide()) {
|
6228 |
+
contextMenu.addItem('Paste slide', 'n2-i-paste', $.proxy(function () {
|
6229 |
+
this.slideEditManager.pasteSlide();
|
6230 |
+
}, this));
|
6231 |
+
}
|
6232 |
+
}, this)
|
6233 |
+
});
|
6234 |
+
};
|
6235 |
+
|
6236 |
+
|
6237 |
+
CanvasManager.prototype.initSelectMode = function () {
|
6238 |
+
this.selectMode = SELECT_MODE.OFF;
|
6239 |
+
this.selectedLayers = [];
|
6240 |
+
|
6241 |
+
$('.n2-ss-layer-list-top-bar .n2-button').on('mousedown', $.proxy(function (e) {
|
6242 |
+
e.preventDefault();
|
6243 |
+
switch ($(e.currentTarget).data('action')) {
|
6244 |
+
case 'delete':
|
6245 |
+
this.delete();
|
6246 |
+
break;
|
6247 |
+
case 'duplicate':
|
6248 |
+
this.duplicate();
|
6249 |
+
break;
|
6250 |
+
case 'group':
|
6251 |
+
this.createGroupFromSelected();
|
6252 |
+
break;
|
6253 |
+
case 'cancel':
|
6254 |
+
this.exitSelectMode();
|
6255 |
+
break;
|
6256 |
+
}
|
6257 |
+
}, this))
|
6258 |
+
}
|
6259 |
+
|
6260 |
+
CanvasManager.prototype.startSelection = function (isGroupMode) {
|
6261 |
+
if (isGroupMode) {
|
6262 |
+
if (this.selectMode == SELECT_MODE.ON) {
|
6263 |
+
this.exitSelectMode();
|
6264 |
+
}
|
6265 |
+
this.changeSelectMode(SELECT_MODE.GROUP);
|
6266 |
+
} else {
|
6267 |
+
this.changeSelectMode(SELECT_MODE.ON);
|
6268 |
}
|
6269 |
+
}
|
6270 |
|
6271 |
+
CanvasManager.prototype.changeSelectMode = function (targetMode) {
|
6272 |
+
var lastMode = this.selectMode;
|
6273 |
+
if (lastMode != targetMode) {
|
6274 |
+
|
6275 |
+
if (lastMode == SELECT_MODE.ON) {
|
6276 |
+
$('#n2-admin').removeClass('n2-ss-select-layer-mode-on');
|
6277 |
+
} else if (lastMode == SELECT_MODE.GROUP) {
|
6278 |
+
$('#n2-admin').removeClass('n2-ss-select-layer-mode-group');
|
|
|
6279 |
}
|
|
|
|
|
6280 |
|
6281 |
+
this.selectMode = targetMode;
|
6282 |
|
6283 |
+
if (lastMode == SELECT_MODE.GROUP && targetMode == SELECT_MODE.ON) {
|
6284 |
+
this.selectedLayers[0].activate(null, null, true);
|
6285 |
+
}
|
6286 |
+
|
6287 |
+
if (targetMode == SELECT_MODE.OFF) {
|
6288 |
+
$('#n2-admin').removeClass('n2-ss-select-layer-mode');
|
6289 |
+
} else {
|
6290 |
+
$('#n2-admin').addClass('n2-ss-select-layer-mode');
|
6291 |
+
if (targetMode == SELECT_MODE.ON) {
|
6292 |
+
$('#n2-admin').addClass('n2-ss-select-layer-mode-on');
|
6293 |
+
} else if (targetMode == SELECT_MODE.GROUP) {
|
6294 |
+
$('#n2-admin').addClass('n2-ss-select-layer-mode-group');
|
6295 |
+
}
|
6296 |
+
}
|
6297 |
+
|
6298 |
+
if (this.selectMode == SELECT_MODE.OFF) {
|
6299 |
+
$('body').off('.n2-ss-selection');
|
6300 |
+
} else {
|
6301 |
+
$('body').on('mousedown.n2-ss-selection', $.proxy(function (e) {
|
6302 |
+
if (event.which != 3 && nextend.context.getCurrentWindow() == 'main') {
|
6303 |
+
if (nextend.context.mouseDownArea === false) {
|
6304 |
+
this.exitSelectMode();
|
6305 |
+
}
|
6306 |
+
}
|
6307 |
+
}, this));
|
6308 |
+
}
|
6309 |
+
}
|
6310 |
}
|
6311 |
|
6312 |
+
CanvasManager.prototype.endSelection = function (isGroupMode) {
|
6313 |
+
if (isGroupMode && this.selectMode == SELECT_MODE.GROUP) {
|
6314 |
+
this.exitSelectMode();
|
6315 |
}
|
|
|
6316 |
}
|
6317 |
|
6318 |
+
CanvasManager.prototype.selectLayer = function (layer, addActive) {
|
6319 |
+
if (layer.type != 'layer') {
|
6320 |
+
return true;
|
|
|
|
|
6321 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6322 |
|
6323 |
+
if (this.selectMode != SELECT_MODE.ON) {
|
6324 |
+
|
6325 |
+
var activeLayer = this.mainContainer.getSelectedLayer();
|
6326 |
+
if (activeLayer.type == 'layer') {
|
6327 |
+
this.startSelection(false);
|
6328 |
+
if (addActive) {
|
6329 |
+
this.selectedLayers.push(activeLayer);
|
6330 |
+
}
|
6331 |
+
} else {
|
6332 |
+
layer.activate(null);
|
6333 |
+
return true;
|
6334 |
}
|
6335 |
}
|
|
|
6336 |
|
6337 |
+
this._selectLayer(layer);
|
6338 |
|
6339 |
+
return true;
|
|
|
|
|
|
|
6340 |
};
|
6341 |
|
6342 |
+
CanvasManager.prototype._selectLayer = function (layer) {
|
6343 |
|
6344 |
+
var index = $.inArray(layer, this.selectedLayers);
|
6345 |
+
if (index != -1) {
|
6346 |
+
if (this.selectMode == SELECT_MODE.ON && this.selectedLayers.length <= 1) {
|
6347 |
+
this.exitSelectMode();
|
6348 |
+
return false;
|
6349 |
+
}
|
|
|
6350 |
|
6351 |
+
var deSelectedLayer = this.selectedLayers[index];
|
6352 |
+
this.selectedLayers.splice(index, 1);
|
6353 |
+
layer.layerRow.removeClass('n2-selected');
|
6354 |
+
layer.layer.removeClass('n2-ss-layer-selected');
|
|
|
|
|
|
|
6355 |
|
6356 |
+
if (this.selectMode == SELECT_MODE.ON && this.selectedLayers.length <= 1) {
|
6357 |
+
this.selectedLayers[0].activate();
|
6358 |
+
this.exitSelectMode();
|
6359 |
+
return false;
|
6360 |
+
}
|
|
|
|
|
6361 |
|
6362 |
+
// As the active layer removed from the selection,
|
6363 |
+
// change the active layer to the first of the current selection
|
6364 |
+
if (deSelectedLayer === this.mainContainer.getSelectedLayer()) {
|
6365 |
+
this.selectedLayers[0].activate(false, null, true);
|
6366 |
+
}
|
6367 |
|
6368 |
+
} else {
|
6369 |
+
var pushToIndex = this.selectedLayers.length;
|
6370 |
+
/*for (var i = 0; i < this.selectedLayers.length; i++) {
|
6371 |
+
if (this.selectedLayers[i].placement.doAction('indexCompare', layer)) {
|
6372 |
+
pushToIndex = i;
|
6373 |
+
break;
|
6374 |
+
}
|
6375 |
+
}*/
|
6376 |
+
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6377 |
+
if (layer.layer.add(this.selectedLayers[i].layer).index(this.selectedLayers[i].layer) > 0) {
|
6378 |
+
pushToIndex = i;
|
6379 |
+
break;
|
|
|
6380 |
}
|
6381 |
+
}
|
|
|
6382 |
|
6383 |
+
this.selectedLayers.splice(pushToIndex, 0, layer);
|
6384 |
+
}
|
6385 |
+
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6386 |
+
this.selectedLayers[i].layerRow.addClass('n2-selected');
|
6387 |
+
this.selectedLayers[i].layer.addClass('n2-ss-layer-selected');
|
6388 |
}
|
|
|
6389 |
}
|
6390 |
|
6391 |
+
CanvasManager.prototype.addSelection = function (layers, isGroupSelected) {
|
6392 |
+
if (!isGroupSelected) {
|
6393 |
+
this.changeSelectMode(SELECT_MODE.ON);
|
6394 |
+
}
|
6395 |
+
|
6396 |
+
for (var i = 0; i < layers.length; i++) {
|
6397 |
+
this._selectLayer(layers[i], false);
|
6398 |
}
|
6399 |
}
|
6400 |
|
6401 |
+
CanvasManager.prototype.exitSelectMode = function () {
|
6402 |
+
if (this.selectMode) {
|
6403 |
+
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6404 |
+
if (this.selectedLayers[i] != this.mainContainer.getSelectedLayer()) {
|
6405 |
+
this.selectedLayers[i].layerRow.removeClass('n2-active');
|
6406 |
+
}
|
6407 |
+
this.selectedLayers[i].layerRow.removeClass('n2-selected');
|
6408 |
+
this.selectedLayers[i].layer.removeClass('n2-ss-layer-selected');
|
6409 |
+
}
|
6410 |
+
$('#n2-admin').removeClass('n2-ss-select-layer-mode');
|
6411 |
+
this.selectedLayers = [];
|
6412 |
+
this.changeSelectMode(SELECT_MODE.OFF);
|
6413 |
}
|
6414 |
+
}
|
6415 |
|
6416 |
+
CanvasManager.prototype.doActionOnActiveLayer = function (action, args) {
|
6417 |
+
if (this.selectMode == SELECT_MODE.ON) {
|
6418 |
+
|
6419 |
+
var selectedLayers = $.extend([], this.selectedLayers);
|
6420 |
+
for (var i = 0; i < selectedLayers.length; i++) {
|
6421 |
+
selectedLayers[i][action].apply(selectedLayers[i], args);
|
|
|
6422 |
}
|
|
|
|
|
|
|
|
|
6423 |
} else {
|
6424 |
+
var selectedLayer = this.mainContainer.getSelectedLayer();
|
6425 |
+
if (selectedLayer) {
|
6426 |
+
selectedLayer[action].apply(selectedLayer, args);
|
|
|
6427 |
}
|
6428 |
}
|
6429 |
+
}
|
6430 |
|
6431 |
+
CanvasManager.prototype.canvasDragStart = function (e, ui) {
|
6432 |
+
if (this.selectMode && this.currentEditorMode == 'canvas' && ui.mode == 'absolute') {
|
6433 |
+
|
6434 |
+
var targetFoundInSelection = false;
|
6435 |
+
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6436 |
+
var selectedLayer = this.selectedLayers[i],
|
6437 |
+
$selectedLayer = selectedLayer.layer;
|
6438 |
+
|
6439 |
+
if ($selectedLayer[0] != ui.layer.layer[0]) {
|
6440 |
+
|
6441 |
+
var display = $selectedLayer.css('display');
|
6442 |
+
if (display == 'none') {
|
6443 |
+
$selectedLayer.css('display', '');
|
6444 |
+
}
|
6445 |
+
|
6446 |
+
selectedLayer._originalPosition = $selectedLayer.position();
|
6447 |
+
|
6448 |
+
|
6449 |
+
if (display == 'none') {
|
6450 |
+
$selectedLayer.css('display', 'none');
|
6451 |
+
}
|
6452 |
+
} else {
|
6453 |
+
targetFoundInSelection = true;
|
6454 |
+
}
|
6455 |
}
|
6456 |
+
if (!targetFoundInSelection) {
|
6457 |
+
this.exitSelectMode();
|
6458 |
+
}
|
6459 |
+
|
6460 |
+
this.isMultiDrag = true;
|
6461 |
}
|
6462 |
+
}
|
6463 |
|
6464 |
+
CanvasManager.prototype.canvasDragMove = function (e, ui) {
|
6465 |
+
if (this.isMultiDrag === true) {
|
6466 |
+
var movement = {
|
6467 |
+
left: ui.position.left + ui.canvasOffset.left - ui.originalOffset.left,
|
6468 |
+
top: ui.position.top + ui.canvasOffset.top - ui.originalOffset.top
|
6469 |
}
|
6470 |
+
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6471 |
+
var selectedLayer = this.selectedLayers[i];
|
6472 |
+
if (!this.isGroup(selectedLayer)) {
|
6473 |
+
var $selectedLayer = selectedLayer.layer;
|
6474 |
+
if ($selectedLayer[0] != ui.layer.layer[0]) {
|
6475 |
+
|
6476 |
+
$selectedLayer.css({
|
6477 |
+
left: selectedLayer._originalPosition.left + movement.left,
|
6478 |
+
top: selectedLayer._originalPosition.top + movement.top,
|
6479 |
+
bottom: 'auto',
|
6480 |
+
right: 'auto'
|
6481 |
+
});
|
6482 |
+
selectedLayer.placement.doAction('triggerLayerResized');
|
6483 |
|
6484 |
+
}
|
6485 |
+
}
|
6486 |
}
|
|
|
|
|
6487 |
}
|
6488 |
+
}
|
6489 |
|
6490 |
+
CanvasManager.prototype.canvasDragStop = function (e, ui) {
|
6491 |
+
if (this.isMultiDrag === true) {
|
6492 |
+
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6493 |
+
var selectedLayer = this.selectedLayers[i];
|
6494 |
+
if (!this.isGroup(selectedLayer)) {
|
6495 |
+
var $selectedLayer = selectedLayer.layer;
|
6496 |
+
if ($selectedLayer[0] != ui.layer.layer[0]) {
|
6497 |
+
var display = $selectedLayer.css('display');
|
6498 |
+
if (display == 'none') {
|
6499 |
+
$selectedLayer.css('display', 'block');
|
6500 |
+
}
|
6501 |
+
var left = parseInt(selectedLayer.layer.css('left')),
|
6502 |
+
top = parseInt(selectedLayer.layer.css('top'));
|
6503 |
+
selectedLayer.placement.current.setPosition(left, top);
|
6504 |
+
|
6505 |
+
selectedLayer.placement.doAction('triggerLayerResized');
|
6506 |
+
|
6507 |
+
if (display == 'none') {
|
6508 |
+
$selectedLayer.css('display', "none");
|
6509 |
+
}
|
6510 |
+
}
|
6511 |
+
}
|
6512 |
}
|
6513 |
+
this.isMultiDrag = false;
|
6514 |
+
return true;
|
6515 |
+
}
|
6516 |
+
return false;
|
6517 |
}
|
6518 |
|
6519 |
+
CanvasManager.prototype.historyDeleteGroup = function (historicalGroup) {
|
6520 |
+
historicalGroup.getSelf().delete();
|
6521 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6522 |
|
6523 |
+
CanvasManager.prototype.historyCreateGroup = function (historicalGroup) {
|
6524 |
+
var group = new scope.Group(this, this.mainContainer, {}, null);
|
6525 |
+
group.create();
|
6526 |
+
historicalGroup.setSelf(group);
|
6527 |
+
}
|
6528 |
|
6529 |
+
CanvasManager.prototype.createGroupFromSelected = function () {
|
6530 |
+
var group;
|
6531 |
+
switch (this.selectMode) {
|
6532 |
+
case SELECT_MODE.ON:
|
6533 |
+
group = new scope.Group(this, this.mainContainer, {}, null);
|
6534 |
+
group.create();
|
6535 |
|
6536 |
+
smartSlider.history.addSimple(this, this.historyDeleteGroup, this.historyCreateGroup, [group]);
|
|
|
|
|
|
|
6537 |
|
6538 |
+
group.addLayers(this.selectedLayers);
|
|
|
|
|
|
|
6539 |
|
6540 |
+
this.exitSelectMode();
|
6541 |
+
group.activate();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6542 |
|
6543 |
+
break;
|
6544 |
+
case SELECT_MODE.OFF:
|
6545 |
+
var activeLayer = this.mainContainer.getSelectedLayer();
|
6546 |
|
6547 |
+
// If the single layer is already in a group, we just activate that group
|
6548 |
+
if (activeLayer.group instanceof scope.Group) {
|
6549 |
+
activeLayer.group.activate();
|
6550 |
+
} else {
|
6551 |
+
group = new scope.Group(this, this.mainContainer, {}, null);
|
6552 |
+
group.create();
|
6553 |
|
6554 |
+
smartSlider.history.addSimple(this, this.historyDeleteGroup, this.historyCreateGroup, [group]);
|
6555 |
|
6556 |
+
group.addLayers([activeLayer]);
|
6557 |
|
6558 |
+
group.activate();
|
6559 |
+
}
|
6560 |
+
break;
|
6561 |
+
case SELECT_MODE.GROUP:
|
6562 |
+
break;
|
6563 |
+
}
|
6564 |
+
}
|
6565 |
+
|
6566 |
+
CanvasManager.prototype.createRow = function (group) {
|
6567 |
+
var layer = new scope.Row(this, group, {});
|
6568 |
+
layer.create();
|
6569 |
+
layer.hightlightStructure();
|
6570 |
+
return {
|
6571 |
+
layer: layer
|
6572 |
+
};
|
6573 |
+
}
|
6574 |
+
|
6575 |
+
CanvasManager.prototype.createCol = function (group) {
|
6576 |
+
var activeGroup = group,
|
6577 |
+
layer = null;
|
6578 |
+
if (this.isCol(activeGroup)) {
|
6579 |
+
layer = activeGroup.group.createCol();
|
6580 |
+
} else if (this.isRow(activeGroup)) {
|
6581 |
+
layer = activeGroup.createCol();
|
6582 |
+
} else if (this.isCol(activeGroup.group)) {
|
6583 |
+
layer = activeGroup.group.group.createCol();
|
6584 |
+
} else {
|
6585 |
+
return this.createRow(group);
|
6586 |
+
}
|
6587 |
+
layer.activate(null);
|
6588 |
+
return {
|
6589 |
+
layer: layer
|
6590 |
+
};
|
6591 |
+
}
|
6592 |
+
|
6593 |
+
CanvasManager.prototype.preventActivationBubbling = function () {
|
6594 |
+
if (!this.shouldPreventActivationBubble) {
|
6595 |
+
this.shouldPreventActivationBubble = true;
|
6596 |
+
return true;
|
6597 |
+
}
|
6598 |
+
return false;
|
6599 |
+
}
|
6600 |
+
|
6601 |
+
CanvasManager.prototype.allowActivation = function () {
|
6602 |
+
this.shouldPreventActivationBubble = false;
|
6603 |
+
}
|
6604 |
|
6605 |
+
CanvasManager.prototype.hotkeys = function () {
|
6606 |
+
$(window).on({
|
6607 |
+
keydown: $.proxy(function (e) {
|
6608 |
+
if (e.target.tagName != 'TEXTAREA' && e.target.tagName != 'INPUT' && (!smartSlider.layerAnimationManager || !smartSlider.layerAnimationManager.timelineControl || !smartSlider.layerAnimationManager.timelineControl.isActivated())) {
|
6609 |
+
var hasSelectedLayer = this.mainContainer.getSelectedLayer(),
|
6610 |
+
keyCode = e.keyCode;
|
6611 |
+
|
6612 |
+
if (keyCode >= 49 && keyCode <= 57) {
|
6613 |
+
var location = e.originalEvent.location || e.originalEvent.keyLocation || 0;
|
6614 |
+
// Fix OSX Chrome numeric keycodes
|
6615 |
+
if (location == 3) {
|
6616 |
+
keyCode += 48;
|
6617 |
+
}
|
6618 |
+
}
|
6619 |
+
|
6620 |
+
if (hasSelectedLayer) {
|
6621 |
+
|
6622 |
+
if (keyCode == 46 || keyCode == 8) {
|
6623 |
+
this.delete();
|
6624 |
+
e.preventDefault();
|
6625 |
+
} else if (keyCode == 35) {
|
6626 |
+
this.duplicate();
|
6627 |
+
e.preventDefault();
|
6628 |
+
} else if (keyCode == 16) {
|
6629 |
+
keys[keyCode] = 1;
|
6630 |
+
} else if (keyCode == 38) {
|
6631 |
+
if (!keys[keyCode]) {
|
6632 |
+
var fn = $.proxy(function () {
|
6633 |
+
this.doActionOnActiveLayer('moveY', [-1 * (keys[16] ? 10 : 1)]);
|
6634 |
+
}, this);
|
6635 |
+
fn();
|
6636 |
+
keys[keyCode] = setInterval(fn, 100);
|
6637 |
+
}
|
6638 |
+
e.preventDefault();
|
6639 |
+
} else if (keyCode == 40) {
|
6640 |
+
if (!keys[keyCode]) {
|
6641 |
+
var fn = $.proxy(function () {
|
6642 |
+
this.doActionOnActiveLayer('moveY', [(keys[16] ? 10 : 1)]);
|
6643 |
+
}, this);
|
6644 |
+
fn();
|
6645 |
+
keys[keyCode] = setInterval(fn, 100);
|
6646 |
+
}
|
6647 |
+
e.preventDefault();
|
6648 |
+
} else if (keyCode == 37) {
|
6649 |
+
if (!keys[keyCode]) {
|
6650 |
+
var fn = $.proxy(function () {
|
6651 |
+
this.doActionOnActiveLayer('moveX', [-1 * (keys[16] ? 10 : 1)]);
|
6652 |
+
}, this);
|
6653 |
+
fn();
|
6654 |
+
keys[keyCode] = setInterval(fn, 100);
|
6655 |
+
}
|
6656 |
+
e.preventDefault();
|
6657 |
+
} else if (keyCode == 39) {
|
6658 |
+
if (!keys[keyCode]) {
|
6659 |
+
var fn = $.proxy(function () {
|
6660 |
+
this.doActionOnActiveLayer('moveX', [keys[16] ? 10 : 1]);
|
6661 |
+
}, this);
|
6662 |
+
fn();
|
6663 |
+
keys[keyCode] = setInterval(fn, 100);
|
6664 |
+
}
|
6665 |
e.preventDefault();
|
6666 |
+
} else if (keyCode >= 97 && keyCode <= 105) {
|
6667 |
|
6668 |
+
var hAlign = horizontalAlign[keyCode],
|
6669 |
+
vAlign = verticalAlign[keyCode],
|
6670 |
+
toZero = false;
|
6671 |
+
if (this.layerOptions.forms.placement.absolute.align.val() == hAlign && this.layerOptions.forms.placement.absolute.valign.val() == vAlign) {
|
6672 |
+
toZero = true;
|
6673 |
+
}
|
6674 |
+
// numeric pad
|
6675 |
+
this.layerOptions.layerFeatures.horizontalAlign(hAlign, toZero);
|
6676 |
+
this.layerOptions.layerFeatures.verticalAlign(vAlign, toZero);
|
6677 |
|
6678 |
+
} else if (keyCode == 65) {
|
6679 |
+
e.preventDefault();
|
6680 |
+
var selectedLayer = this.mainContainer.getSelectedLayer();
|
6681 |
+
if (selectedLayer && selectedLayer.placement.getType() == 'absolute') {
|
6682 |
+
selectedLayer.placement.current.fit();
|
6683 |
+
}
|
6684 |
+
}
|
6685 |
+
}
|
6686 |
+
|
6687 |
+
if (e.ctrlKey || e.metaKey) {
|
6688 |
+
if (keyCode == 90) {
|
6689 |
+
if (e.shiftKey) {
|
6690 |
+
if (smartSlider.history.redo()) {
|
6691 |
+
e.preventDefault();
|
6692 |
+
}
|
6693 |
+
} else {
|
6694 |
+
if (smartSlider.history.undo()) {
|
6695 |
+
e.preventDefault();
|
6696 |
+
}
|
6697 |
+
}
|
6698 |
+
} else if (keyCode == 71) {
|
6699 |
+
this.createGroupFromSelected();
|
6700 |
+
e.preventDefault();
|
6701 |
+
} else if (keyCode == 68) {
|
6702 |
+
e.preventDefault();
|
6703 |
+
this.slideEditManager.copySlide();
|
6704 |
+
} else if (keyCode == 70) {
|
6705 |
+
e.preventDefault();
|
6706 |
+
this.slideEditManager.pasteSlide();
|
6707 |
+
} else if (keyCode == 67) {
|
6708 |
+
this.copy();
|
6709 |
+
} else if (keyCode == 86) {
|
6710 |
+
this.paste();
|
6711 |
+
}
|
6712 |
}
|
6713 |
}
|
6714 |
+
}, this),
|
6715 |
+
keyup: $.proxy(function (e) {
|
6716 |
+
if (typeof keys[e.keyCode] !== 'undefined' && keys[e.keyCode]) {
|
6717 |
+
clearInterval(keys[e.keyCode]);
|
6718 |
+
keys[e.keyCode] = 0;
|
6719 |
+
}
|
6720 |
+
}, this)
|
6721 |
});
|
6722 |
+
}
|
6723 |
|
6724 |
+
CanvasManager.prototype.getSelf = function () {
|
6725 |
+
return this;
|
6726 |
+
}
|
6727 |
|
6728 |
+
return CanvasManager;
|
6729 |
+
});
|
6730 |
+
N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
6731 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6732 |
|
6733 |
+
function CanvasUserInterface(canvasManager) {
|
6734 |
+
this.canvasManager = canvasManager;
|
6735 |
+
this.isShown = !$.jStorage.get('ssLayersShown', false);
|
6736 |
+
this.tlHeight = $.jStorage.get('ssLayersHeight') || 200;
|
6737 |
+
|
6738 |
+
this.$container = $('#n2-ss-layers');
|
6739 |
+
this.fixScroll();
|
6740 |
+
this.switchLayerList();
|
6741 |
|
6742 |
+
this.topBar = $('.n2-ss-layer-list-top-bar')
|
6743 |
+
.on('mousedown', $.proxy(this.resizeStart, this));
|
6744 |
|
6745 |
+
this.topBar.find('.n2-ss-layer-list-opener').on('click', $.proxy(function (e) {
|
6746 |
+
e.preventDefault();
|
6747 |
+
this.switchLayerList();
|
6748 |
+
}, this));
|
6749 |
+
|
6750 |
+
$('.n2-ss-slide-show-layers').on('click', $.proxy(function (e) {
|
6751 |
+
e.preventDefault();
|
6752 |
+
this.switchLayerList();
|
6753 |
}, this));
|
6754 |
+
|
6755 |
+
this.onResize();
|
6756 |
+
$(window).on('resize', $.proxy(this.onResize, this));
|
6757 |
};
|
6758 |
|
6759 |
+
CanvasUserInterface.prototype.onResize = function () {
|
6760 |
+
var h = this.$container.height();
|
6761 |
+
this.paneLeft.height(h - 48);
|
6762 |
+
this.paneRight.height(h - 48);
|
6763 |
+
}
|
6764 |
|
6765 |
+
CanvasUserInterface.prototype.onActivateLayer = function (layer) {
|
|
|
|
|
|
|
|
|
6766 |
|
6767 |
+
var scrollTop = this.paneLeft.scrollTop(),
|
6768 |
+
top = 0,
|
6769 |
+
currentLayer = layer;
|
6770 |
|
6771 |
+
do {
|
6772 |
+
top += currentLayer.layerRow.get(0).offsetTop;
|
6773 |
+
currentLayer = currentLayer.group;
|
6774 |
+
} while (currentLayer !== this.canvasManager.mainContainer);
|
6775 |
|
6776 |
+
if (top < scrollTop || top > scrollTop + this.paneLeft.height() - 40) {
|
6777 |
+
this.paneLeft.scrollTop(top);
|
6778 |
+
this.paneRight.scrollTop(top);
|
6779 |
+
}
|
6780 |
+
}
|
|
|
|
|
|
|
6781 |
|
6782 |
+
CanvasUserInterface.prototype.fixScroll = function () {
|
6783 |
+
|
6784 |
+
this.paneLeft = $('.n2-ss-layers-sidebar-rows');
|
6785 |
+
this.paneRight = $('.n2-ss-timeline-content-layers-container');
|
6786 |
+
|
6787 |
+
var cb = $.proxy(function (e) {
|
6788 |
+
var top = this.paneLeft.scrollTop();
|
6789 |
+
if (e.originalEvent.deltaY > 0) {
|
6790 |
+
top += 40;
|
6791 |
+
} else {
|
6792 |
+
top -= 40;
|
6793 |
+
}
|
6794 |
+
top = Math.round(top / 40) * 40;
|
6795 |
+
this.paneLeft.scrollTop(top);
|
6796 |
+
this.paneRight.scrollTop(top);
|
6797 |
e.preventDefault();
|
6798 |
+
}, this);
|
6799 |
|
6800 |
+
this.paneLeft.on('mousewheel', cb);
|
6801 |
+
this.paneLeft.on('scroll', $.proxy(function (e) {
|
6802 |
+
var top = this.paneLeft.scrollTop();
|
6803 |
+
this.paneRight.scrollTop(top);
|
6804 |
+
e.preventDefault();
|
6805 |
}, this));
|
|
|
6806 |
|
6807 |
+
this.paneRight.on('mousewheel', cb);
|
6808 |
+
}
|
|
|
6809 |
|
6810 |
+
CanvasUserInterface.prototype.resizeStart = function (e) {
|
6811 |
+
if (!this.isShown) return;
|
6812 |
+
if (e.target == this.topBar[0] || $(e.target).hasClass('n2-h2')) {
|
6813 |
+
e.preventDefault();
|
6814 |
+
this.startY = e.clientY;
|
6815 |
+
this.height = this.$container.height();
|
6816 |
+
$('body').on({
|
6817 |
+
'mousemove.n2-ss-tl-resize': $.proxy(this.resizeMove, this),
|
6818 |
+
'mouseup.n2-ss-tl-resize': $.proxy(this.resizeStop, this),
|
6819 |
+
'mouseleave.n2-ss-tl-resize': $.proxy(this.resizeStop, this)
|
6820 |
+
});
|
6821 |
+
}
|
6822 |
+
}
|
6823 |
+
|
6824 |
+
CanvasUserInterface.prototype.resizeMove = function (e) {
|
6825 |
+
e.preventDefault();
|
6826 |
+
this.setTLHeight(this._calculateDesiredHeight(e));
|
6827 |
+
}
|
6828 |
+
|
6829 |
+
CanvasUserInterface.prototype.resizeStop = function (e) {
|
6830 |
+
e.preventDefault();
|
6831 |
+
$('body').off('.n2-ss-tl-resize');
|
6832 |
+
var h = this._calculateDesiredHeight(e);
|
6833 |
+
this.setTLHeight(h);
|
6834 |
+
|
6835 |
+
this.tlHeight = h;
|
6836 |
+
$.jStorage.set('ssLayersHeight', h);
|
6837 |
+
$('#n2-admin').triggerHandler('resize');
|
6838 |
+
}
|
6839 |
+
|
6840 |
+
CanvasUserInterface.prototype._calculateDesiredHeight = function (e) {
|
6841 |
+
var h = this.startY - e.clientY + this.height - 48;
|
6842 |
+
return this.__calculateDesiredHeight(h);
|
6843 |
+
}
|
6844 |
+
|
6845 |
+
CanvasUserInterface.prototype.__calculateDesiredHeight = function (h) {
|
6846 |
+
return Math.round(Math.min(Math.max(40, h), (window.innerHeight || document.documentElement.clientHeight) / 2) / 40) * 40 + 48;
|
6847 |
+
}
|
6848 |
+
|
6849 |
+
|
6850 |
+
CanvasUserInterface.prototype.switchLayerList = function () {
|
6851 |
+
this.isShown = !this.isShown;
|
6852 |
+
this.$container.toggleClass('n2-active', this.isShown);
|
6853 |
+
if (this.isShown) {
|
6854 |
+
this.setTLHeight(this.tlHeight);
|
6855 |
} else {
|
6856 |
+
this.setTLHeight(48);
|
6857 |
}
|
6858 |
+
$.jStorage.set('ssLayersShown', this.isShown);
|
6859 |
+
}
|
6860 |
+
|
6861 |
+
CanvasUserInterface.prototype.setTLHeight = function (h) {
|
6862 |
+
h = Math.max(48, h);
|
6863 |
+
this.$container.height(h);
|
6864 |
+
h = this.$container.height();
|
6865 |
+
this.paneLeft.height(h - 48);
|
6866 |
+
this.paneRight.height(h - 48);
|
6867 |
+
|
6868 |
+
nextend.triggerResize();
|
6869 |
+
}
|
6870 |
+
|
6871 |
+
CanvasUserInterface.prototype.activateAdd = function (x, y) {
|
6872 |
+
this.$add.css({
|
6873 |
+
left: x,
|
6874 |
+
top: y
|
6875 |
+
}).appendTo(this.$container);
|
6876 |
+
}
|
6877 |
+
|
6878 |
+
return CanvasUserInterface;
|
6879 |
+
});
|
6880 |
+
N2Require('LayerFeatures', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
6881 |
+
"use strict";
|
6882 |
+
|
6883 |
+
var nameToIndex = {
|
6884 |
+
left: 0,
|
6885 |
+
center: 1,
|
6886 |
+
right: 2,
|
6887 |
+
top: 0,
|
6888 |
+
middle: 1,
|
6889 |
+
bottom: 2
|
6890 |
};
|
6891 |
|
6892 |
+
function LayerFeatures(fields, canvasManager) {
|
6893 |
+
this.fields = fields;
|
6894 |
+
this.canvasManager = canvasManager;
|
6895 |
+
|
6896 |
+
this.initParentLinker();
|
6897 |
+
this.initAlign();
|
6898 |
+
this.initEvents();
|
6899 |
+
}
|
6900 |
+
|
6901 |
+
LayerFeatures.prototype.initParentLinker = function () {
|
6902 |
+
var field = this.fields.parentid.data('field'),
|
6903 |
+
parentLinker = $('#n2-ss-layer-parent-linker').on({
|
6904 |
+
click: function (e) {
|
6905 |
+
field.click(e);
|
6906 |
+
}
|
6907 |
+
});
|
6908 |
};
|
6909 |
|
6910 |
+
LayerFeatures.prototype.initAlign = function () {
|
6911 |
|
6912 |
+
this.layerDefault = {
|
6913 |
+
align: null,
|
6914 |
+
valign: null
|
6915 |
+
};
|
6916 |
+
|
6917 |
+
var hAlignButton = $('#n2-ss-layer-horizontal-align .n2-radio-option'),
|
6918 |
+
vAlignButton = $('#n2-ss-layer-vertical-align .n2-radio-option');
|
6919 |
+
|
6920 |
+
hAlignButton.add(vAlignButton).on('click', $.proxy(function (e) {
|
6921 |
+
if (e.ctrlKey || e.metaKey) {
|
6922 |
+
var $el = $(e.currentTarget),
|
6923 |
+
isActive = $el.hasClass('n2-sub-active'),
|
6924 |
+
align = $el.data('align');
|
6925 |
+
switch (align) {
|
6926 |
+
case 'left':
|
6927 |
+
case 'center':
|
6928 |
+
case 'right':
|
6929 |
+
hAlignButton.removeClass('n2-sub-active');
|
6930 |
+
if (isActive) {
|
6931 |
+
$.jStorage.set('ss-item-horizontal-align', null);
|
6932 |
+
this.layerDefault.align = null;
|
6933 |
+
} else {
|
6934 |
+
$.jStorage.set('ss-item-horizontal-align', align);
|
6935 |
+
this.layerDefault.align = align;
|
6936 |
+
$el.addClass('n2-sub-active');
|
6937 |
+
}
|
6938 |
+
break;
|
6939 |
+
case 'top':
|
6940 |
+
case 'middle':
|
6941 |
+
case 'bottom':
|
6942 |
+
vAlignButton.removeClass('n2-sub-active');
|
6943 |
+
if (isActive) {
|
6944 |
+
$.jStorage.set('ss-item-vertical-align', null);
|
6945 |
+
this.layerDefault.valign = null;
|
6946 |
+
} else {
|
6947 |
+
$.jStorage.set('ss-item-vertical-align', align);
|
6948 |
+
this.layerDefault.valign = align;
|
6949 |
+
$el.addClass('n2-sub-active');
|
6950 |
+
}
|
6951 |
+
break;
|
6952 |
+
}
|
6953 |
+
} else if (this.canvasManager.mainContainer.getSelectedLayer()) {
|
6954 |
+
var align = $(e.currentTarget).data('align');
|
6955 |
+
switch (align) {
|
6956 |
+
case 'left':
|
6957 |
+
case 'center':
|
6958 |
+
case 'right':
|
6959 |
+
this.horizontalAlign(align, true);
|
6960 |
+
break;
|
6961 |
+
case 'top':
|
6962 |
+
case 'middle':
|
6963 |
+
case 'bottom':
|
6964 |
+
this.verticalAlign(align, true);
|
6965 |
+
break;
|
6966 |
+
}
|
6967 |
+
}
|
6968 |
}, this));
|
|
|
|
|
6969 |
|
6970 |
+
this.fields.align.on('nextendChange', $.proxy(function () {
|
6971 |
+
hAlignButton.removeClass('n2-active');
|
6972 |
+
switch (this.fields.align.val()) {
|
6973 |
+
case 'left':
|
6974 |
+
hAlignButton.eq(0).addClass('n2-active');
|
6975 |
+
break;
|
6976 |
+
case 'center':
|
6977 |
+
hAlignButton.eq(1).addClass('n2-active');
|
6978 |
+
break;
|
6979 |
+
case 'right':
|
6980 |
+
hAlignButton.eq(2).addClass('n2-active');
|
6981 |
+
break;
|
6982 |
+
}
|
6983 |
+
}, this));
|
6984 |
+
this.fields.valign.on('nextendChange', $.proxy(function () {
|
6985 |
+
vAlignButton.removeClass('n2-active');
|
6986 |
+
switch (this.fields.valign.val()) {
|
6987 |
+
case 'top':
|
6988 |
+
vAlignButton.eq(0).addClass('n2-active');
|
6989 |
+
break;
|
6990 |
+
case 'middle':
|
6991 |
+
vAlignButton.eq(1).addClass('n2-active');
|
6992 |
+
break;
|
6993 |
+
case 'bottom':
|
6994 |
+
vAlignButton.eq(2).addClass('n2-active');
|
6995 |
+
break;
|
6996 |
+
}
|
6997 |
+
}, this));
|
6998 |
|
|
|
|
|
|
|
|
|
6999 |
|
7000 |
+
var hAlign = $.jStorage.get('ss-item-horizontal-align', null),
|
7001 |
+
vAlign = $.jStorage.get('ss-item-vertical-align', null);
|
7002 |
+
if (hAlign != null) {
|
7003 |
+
hAlignButton.eq(nameToIndex[hAlign]).addClass('n2-sub-active');
|
7004 |
+
this.layerDefault.align = hAlign;
|
7005 |
+
}
|
7006 |
+
if (vAlign != null) {
|
7007 |
+
vAlignButton.eq(nameToIndex[vAlign]).addClass('n2-sub-active');
|
7008 |
+
this.layerDefault.valign = vAlign;
|
7009 |
}
|
7010 |
};
|
7011 |
|
7012 |
+
LayerFeatures.prototype.horizontalAlign = function (align, toZero) {
|
7013 |
+
if (this.fields.align.val() != align) {
|
7014 |
+
this.fields.align.data('field').options.eq(nameToIndex[align]).trigger('click');
|
7015 |
+
} else if (toZero) {
|
7016 |
+
this.fields.left.val(0).trigger('change');
|
7017 |
}
|
7018 |
};
|
7019 |
|
7020 |
+
LayerFeatures.prototype.verticalAlign = function (align, toZero) {
|
7021 |
+
if (this.fields.valign.val() != align) {
|
7022 |
+
this.fields.valign.data('field').options.eq(nameToIndex[align]).trigger('click');
|
7023 |
+
} else if (toZero) {
|
7024 |
+
this.fields.top.val(0).trigger('change');
|
7025 |
}
|
7026 |
};
|
7027 |
|
7028 |
+
LayerFeatures.prototype.initEvents = function () {
|
7029 |
+
var parent = $('#n2-tab-events'),
|
7030 |
+
heading = parent.find('.n2-h3'),
|
7031 |
+
headingLabel = heading.html(),
|
7032 |
+
row = $('<div class="n2-editor-header n2-h2 n2-uc"><span>' + headingLabel + '</span></div>');
|
|
|
|
|
|
|
7033 |
|
7034 |
+
heading.replaceWith(row);
|
7035 |
+
}
|
7036 |
|
7037 |
+
return LayerFeatures;
|
7038 |
+
});
|
7039 |
+
N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
7040 |
+
"use strict";
|
7041 |
|
7042 |
+
var menuHideTimeout = false;
|
7043 |
|
7044 |
+
function LayerWindow(canvasManager) {
|
7045 |
|
7046 |
+
this.isMinimized = false;
|
7047 |
+
this.detachedPosition = {
|
7048 |
+
left: $.jStorage.get('ssPanelLeft') || 100,
|
7049 |
+
top: $.jStorage.get('ssPanelTop') || 100,
|
7050 |
+
height: $.jStorage.get('ssPanelHeight') || 400
|
7051 |
+
}
|
7052 |
+
this.autoPosition = $.jStorage.get('ssPanelAutoPosition', 1);
|
7053 |
|
7054 |
+
this.hasBreadcrumb = false;
|
7055 |
+
this.lastHeight = this.detachedPosition.height;
|
7056 |
|
7057 |
+
this.admin = $('#n2-admin');
|
7058 |
+
this.sidebar = $('#n2-ss-layer-window').on('mousedown', $.proxy(nextend.context.setMouseDownArea, nextend.context, 'sidebarClicked'));
|
7059 |
|
7060 |
+
this.title = this.sidebar.find('.n2-ss-layer-window-title-inner');
|
7061 |
+
this.sidebarTD = this.sidebar.parent();
|
7062 |
|
7063 |
+
this.canvasManager = canvasManager;
|
7064 |
+
smartSlider.layerWindow = this;
|
|
|
|
|
7065 |
|
7066 |
+
this.viewPanes = {
|
7067 |
+
layerEdit: $('#n2-tabbed-slide-editor-settings > .n2-tabs').addClass('n2-scrollable')
|
7068 |
+
};
|
|
|
|
|
7069 |
|
7070 |
+
for (var k in this.viewPanes) {
|
7071 |
+
this.viewPanes[k].on('DOMMouseScroll mousewheel', function (e) {
|
7072 |
+
var up = false;
|
7073 |
+
if (e.originalEvent) {
|
7074 |
+
if (e.originalEvent.wheelDelta) up = e.originalEvent.wheelDelta / -1 < 0;
|
7075 |
+
if (e.originalEvent.deltaY) up = e.originalEvent.deltaY < 0;
|
7076 |
+
if (e.originalEvent.detail) up = e.originalEvent.detail < 0;
|
7077 |
+
}
|
7078 |
|
7079 |
+
var prevent = function () {
|
7080 |
+
e.stopPropagation();
|
7081 |
+
e.preventDefault();
|
7082 |
+
e.returnValue = false;
|
7083 |
+
return false;
|
7084 |
+
}
|
7085 |
|
7086 |
+
if (!up && this.scrollHeight <= $(this).innerHeight() + this.scrollTop + 1) {
|
7087 |
+
return prevent();
|
7088 |
+
} else if (up && 0 >= this.scrollTop - 1) {
|
7089 |
+
return prevent();
|
7090 |
+
}
|
7091 |
+
});
|
7092 |
+
}
|
7093 |
|
7094 |
+
this.panelHeading = $('#n2-tabbed-slide-editor-settings').find('.n2-sidebar-tab-switcher .n2-td');
|
7095 |
|
7096 |
+
var left = this.sidebar.find('.n2-ss-layer-window-title-nav-left');
|
|
|
7097 |
|
7098 |
+
$('<a href="#"><i class="n2-i n2-i-minimize n2-i-grey-opacity"></i></a>').on('click', $.proxy(function (e) {
|
7099 |
+
e.preventDefault();
|
7100 |
+
this.toggleMinimize();
|
7101 |
+
}, this)).appendTo(left);
|
|
|
|
|
|
|
|
|
|
|
|
|
7102 |
|
7103 |
+
var right = this.sidebar.find('.n2-ss-layer-window-title-nav-right');
|
7104 |
|
7105 |
+
this.magnet = $('<a href="#"><i class="n2-i n2-i-magnet n2-i-grey-opacity" data-n2tip="Auto position layer window"></i></a>').on('click', $.proxy(function (e) {
|
7106 |
+
e.preventDefault();
|
7107 |
+
this.magnetize();
|
7108 |
+
}, this)).css('display', 'none').appendTo(right);
|
7109 |
+
$('<a href="#"><i class="n2-i n2-i-closewindow n2-i-grey-opacity"></i></a>').on('click', $.proxy(function (e) {
|
7110 |
+
e.preventDefault();
|
7111 |
+
this.hide();
|
7112 |
+
}, this)).appendTo(right);
|
7113 |
|
7114 |
+
nextend.tooltip.add(right);
|
7115 |
|
7116 |
+
this.$breadcrumb = $('<div class="n2-ss-layer-window-breadcrumb"></div>').insertAfter('#n2-tabbed-slide-editor-settings > .n2-sidebar-tab-switcher');
|
|
|
7117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7118 |
|
7119 |
+
var $verticalBar = $('#n2-ss-add-sidebar');
|
7120 |
+
$('.n2-ss-add-layer-button').on('click', function (e) {
|
7121 |
+
e.preventDefault();
|
7122 |
+
$('#n2-ss-layers-switcher > .n2-labels .n2-td').eq(0).trigger('click');
|
7123 |
+
$verticalBar.toggleClass('n2-active');
|
7124 |
+
})
|
7125 |
|
7126 |
+
$('.n2-ss-core-item').on('click', function (e) {
|
7127 |
+
$verticalBar.removeClass('n2-active');
|
7128 |
+
});
|
7129 |
|
7130 |
+
var topOffset = $('#wpadminbar, .navbar-fixed-top').height() + $('.n2-top-bar').height();
|
7131 |
+
this.$verticalBarInner = $('.n2-ss-add-sidebar-inner').each(function () {
|
7132 |
+
var bar = $(this);
|
7133 |
+
bar.fixTo(bar.parent(), {
|
7134 |
+
top: topOffset
|
7135 |
+
});
|
7136 |
+
});
|
7137 |
|
7138 |
+
this.$resizeInnerContainer = $('#n2-ss-layers-switcher_0, #n2-ss-layers-switcher_1');
|
7139 |
+
this.extraHeightToRemove = 60;
|
7140 |
+
if (!this.$resizeInnerContainer.length) {
|
7141 |
+
this.extraHeightToRemove = 0;
|
7142 |
+
this.$resizeInnerContainer = this.$verticalBarInner;
|
7143 |
+
}
|
7144 |
|
7145 |
+
this.$resizeInnerContainer.css('overflow', 'auto');
|
|
|
|
|
7146 |
|
7147 |
+
this.detach();
|
7148 |
|
7149 |
+
$('#n2-admin').on('resize', $.proxy(this.resizeVerticalBar, this))
|
|
|
7150 |
|
7151 |
+
$(window).on('resize', $.proxy(this.onResize, this));
|
|
|
7152 |
|
|
|
|
|
|
|
7153 |
|
7154 |
+
$('.n2-ss-slide-duplicate-layer').on('click', $.proxy(function (e) {
|
7155 |
+
e.preventDefault();
|
7156 |
+
this.duplicate();
|
7157 |
+
}, this.canvasManager));
|
7158 |
|
7159 |
+
$('.n2-ss-slide-delete-layer').on('click', $.proxy(function (e) {
|
7160 |
+
e.preventDefault();
|
7161 |
+
this.delete();
|
7162 |
+
}, this.canvasManager));
|
7163 |
|
|
|
|
|
|
|
7164 |
|
7165 |
+
$('body').on('mousedown', $.proxy(function (e) {
|
7166 |
+
if (nextend.context.getCurrentWindow() == 'main') {
|
7167 |
+
if (nextend.context.mouseDownArea === false) {
|
7168 |
+
this.hide();
|
7169 |
+
}
|
7170 |
+
}
|
7171 |
+
}, this));
|
7172 |
|
7173 |
+
var $devicespecific = $('<div id="n2-ss-devicespecific-settings"></div>')
|
|
|
7174 |
|
7175 |
+
var modes = nextend.smartSlider.frontend.responsive.parameters.deviceModes;
|
7176 |
+
for (var k in modes) {
|
7177 |
+
if (modes[k]) {
|
7178 |
+
var mode = k.replace(/([A-Z])/g, ' $1').split(' '),
|
7179 |
+
device = mode[0],
|
7180 |
+
orientation = mode[1].toLowerCase();
|
7181 |
+
$devicespecific.append('<i class="n2-i n2-it n2-i-mini-' + device + '-' + orientation + '" data-device="' + device + '" data-orientation="' + orientation + '"></i>');
|
7182 |
+
}
|
7183 |
+
}
|
7184 |
+
var cb = {
|
7185 |
+
'mouseenter': $.proxy(function (e) {
|
7186 |
+
$devicespecific.appendTo(e.currentTarget);
|
7187 |
+
}, this),
|
7188 |
+
'mouseleave': $.proxy(function (e) {
|
7189 |
+
$devicespecific.detach();
|
7190 |
+
}, this)
|
7191 |
+
};
|
7192 |
+
this.sidebar.find('[data-devicespecific] label').prepend('<span class="n2-i n2-i-mini-desktop-portrait"></span>');
|
7193 |
+
this.sidebar.find('[data-devicespecific] label').on(cb);
|
7194 |
+
$devicespecific.find('.n2-i').on({
|
7195 |
+
'click': $.proxy(function (e) {
|
7196 |
+
//e.stopImmediatePropagation();
|
7197 |
+
e.preventDefault();
|
7198 |
+
var $target = $(e.currentTarget);
|
7199 |
+
$('#n2-ss-devices').find('[data-device="' + $target.data('device') + '"][data-orientation="' + $target.data('orientation') + '"]').trigger('click')
|
7200 |
+
}, this)
|
7201 |
+
});
|
7202 |
};
|
7203 |
|
7204 |
+
LayerWindow.prototype.toggleMinimize = function () {
|
7205 |
+
this.isMinimized = !this.isMinimized;
|
7206 |
+
this.sidebar.toggleClass('n2-ss-layer-window-minized', this.isMinimized);
|
7207 |
+
if (!this.isMinimized) {
|
7208 |
+
this.onResize();
|
7209 |
+
}
|
7210 |
+
}
|
7211 |
|
7212 |
+
LayerWindow.prototype.magnetize = function () {
|
7213 |
+
if (!this.autoPosition) {
|
7214 |
|
7215 |
+
this.autoPosition = 1;
|
7216 |
+
$.jStorage.set('ssPanelAutoPosition', 1);
|
|
|
7217 |
|
7218 |
+
this.magnet.css('display', 'none');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7219 |
|
7220 |
+
var activeLayer = this.canvasManager.mainContainer.getSelectedLayer();
|
7221 |
+
if (activeLayer) {
|
7222 |
+
activeLayer.positionSidebar();
|
7223 |
+
}
|
7224 |
+
}
|
7225 |
+
}
|
7226 |
|
7227 |
+
LayerWindow.prototype.show = function (layer, of) {
|
7228 |
+
this.setTitle(layer);
|
7229 |
|
7230 |
+
$('body').addClass('n2-ss-layer-edit-visible');
|
7231 |
+
if (this.autoPosition) {
|
7232 |
+
this.sidebar.position({
|
7233 |
+
my: 'left top',
|
7234 |
+
at: 'right+10 top',
|
7235 |
+
collision: "flipfit",
|
7236 |
+
of: of.is(':visible') ? of : '#n2-ss-layer-list'
|
7237 |
});
|
7238 |
+
}
|
7239 |
+
}
|
7240 |
|
7241 |
+
LayerWindow.prototype._show = function () {
|
7242 |
+
$('body').addClass('n2-ss-layer-edit-visible');
|
7243 |
+
}
|
7244 |
|
7245 |
+
LayerWindow.prototype.hide = function () {
|
7246 |
+
$('body').removeClass('n2-ss-layer-edit-visible');
|
7247 |
+
}
|
7248 |
|
7249 |
+
LayerWindow.prototype.isVisible = function () {
|
7250 |
+
return $('body').hasClass('n2-ss-layer-edit-visible');
|
7251 |
+
}
|
7252 |
|
7253 |
+
LayerWindow.prototype.hideWithDeferred = function (deferred) {
|
7254 |
+
if ($('body').hasClass('n2-ss-layer-edit-visible')) {
|
7255 |
+
this.hide();
|
7256 |
+
deferred.done($.proxy(this._show, this));
|
7257 |
}
|
7258 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7259 |
|
7260 |
+
LayerWindow.prototype.setTitle = function (layer) {
|
7261 |
+
this.title.html(layer.getName());
|
|
|
|
|
7262 |
|
7263 |
+
this.updateGroupTitle(layer);
|
|
|
|
|
|
|
|
|
|
|
7264 |
}
|
7265 |
|
7266 |
+
LayerWindow.prototype.updateGroupTitle = function (layer) {
|
7267 |
+
var i;
|
7268 |
+
this.$breadcrumb.html('');
|
7269 |
+
for (i = 0; i < 5; i++) {
|
|
|
|
|
|
|
|
|
|
|
7270 |
|
7271 |
+
$('<span class="n2-window-title-structure-nav"><span>' + layer.label + '</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>')
|
7272 |
+
.on({
|
7273 |
+
mouseenter: $.proxy(function () {
|
7274 |
+
this.canvasManager.highlight(this);
|
7275 |
+
}, layer),
|
7276 |
+
mouseleave: $.proxy(function () {
|
7277 |
+
this.canvasManager.deHighlight(this);
|
7278 |
+
}, layer),
|
7279 |
+
click: $.proxy(function (e) {
|
7280 |
+
this.canvasManager.deHighlight(this);
|
7281 |
+
this.activate(e);
|
7282 |
+
}, layer)
|
7283 |
+
})
|
7284 |
+
.prependTo(this.$breadcrumb);
|
7285 |
+
if (layer.group && layer.group !== this.canvasManager.mainContainer) {
|
7286 |
+
layer = layer.group;
|
7287 |
+
} else {
|
7288 |
+
break;
|
7289 |
+
}
|
7290 |
+
}
|
7291 |
|
7292 |
+
this.hasBreadcrumb = i > 0;
|
7293 |
+
this.$breadcrumb.toggleClass('n2-has-breadcrumb', this.hasBreadcrumb)
|
7294 |
+
this.onResize();
|
7295 |
+
}
|
7296 |
|
7297 |
+
LayerWindow.prototype.getLayerEditExcludedHeight = function () {
|
7298 |
+
return 85 + (this.hasBreadcrumb ? 23 : 0);
|
7299 |
+
};
|
7300 |
|
7301 |
+
LayerWindow.prototype.resizeVerticalBar = function () {
|
7302 |
+
this.$resizeInnerContainer.height((window.innerHeight || document.documentElement.clientHeight) - ($('#n2-ss-layers').is(':visible') && $('#n2-ss-layers').hasClass('n2-active') ? $('#n2-ss-layers').height() : 0) - $('#wpadminbar, .navbar-fixed-top').height() - $('.n2-top-bar').height() - this.extraHeightToRemove);
|
7303 |
}
|
7304 |
|
7305 |
+
LayerWindow.prototype.onResize = function () {
|
7306 |
+
this.sidebar.css('display', 'block');
|
7307 |
+
this.resizeVerticalBar();
|
7308 |
|
7309 |
+
var windowHeight = (window.innerHeight || document.documentElement.clientHeight);
|
|
|
|
|
|
|
7310 |
|
7311 |
+
var targetHeight = this.sidebar.height() - this.getLayerEditExcludedHeight();
|
|
|
|
|
|
|
7312 |
|
7313 |
+
this.viewPanes['layerEdit'].height(targetHeight);
|
|
|
|
|
|
|
7314 |
|
7315 |
+
var properties = {},
|
7316 |
+
windowWidth = (window.innerWidth || document.documentElement.clientWidth);
|
7317 |
+
var bounding = this.sidebar[0].getBoundingClientRect();
|
7318 |
|
7319 |
+
if (bounding.left < 0) {
|
7320 |
+
properties.left = 0;
|
7321 |
+
} else if (bounding.left + bounding.width > windowWidth) {
|
7322 |
+
properties.left = Math.max(0, windowWidth - bounding.width);
|
7323 |
+
}
|
7324 |
|
7325 |
+
if (bounding.height > windowHeight - bounding.top) {
|
7326 |
+
properties.top = windowHeight - bounding.top - bounding.height + bounding.top;
|
7327 |
+
if (properties.top < 0) {
|
7328 |
+
this.lastHeight = properties.height = bounding.height + properties.top;
|
7329 |
+
properties.top = 0;
|
|
|
|
|
|
|
7330 |
}
|
7331 |
+
}
|
|
|
7332 |
|
7333 |
+
this.sidebar.css(properties);
|
7334 |
+
this.sidebar.css('display', '');
|
7335 |
|
7336 |
+
}
|
7337 |
+
|
7338 |
+
LayerWindow.prototype.detach = function () {
|
7339 |
+
if (this.autoPosition) {
|
7340 |
+
this.sidebar.css('height', this.detachedPosition.height);
|
7341 |
+
this.magnet.css('display', 'none');
|
7342 |
+
} else {
|
7343 |
+
this.sidebar.css(this.detachedPosition);
|
7344 |
+
this.magnet.css('display', 'inline-block');
|
7345 |
}
|
7346 |
+
this.sidebar.appendTo(this.admin);
|
7347 |
|
7348 |
+
this.admin.addClass('n2-sidebar-hidden');
|
|
|
|
|
|
|
|
|
|
|
7349 |
|
7350 |
+
$(window).off('.n2-ss-panel');
|
7351 |
+
this.sidebar.removeClass("n2-sidebar-fixed");
|
7352 |
|
7353 |
+
this.sidebar
|
7354 |
+
.draggable({
|
7355 |
+
distance: 5,
|
7356 |
+
handle: ".n2-ss-layer-window-title",
|
7357 |
+
containment: 'window',
|
7358 |
+
stop: $.proxy(function (event, ui) {
|
7359 |
+
this.sidebar.css('height', this.lastHeight);
|
7360 |
+
var bounding = this.sidebar[0].getBoundingClientRect();
|
7361 |
+
this.detachedPosition.left = bounding.left;
|
7362 |
+
this.detachedPosition.top = bounding.top;
|
7363 |
|
7364 |
+
$.jStorage.set('ssPanelLeft', bounding.left);
|
7365 |
+
$.jStorage.set('ssPanelTop', bounding.top);
|
7366 |
|
7367 |
+
this.autoPosition = 0;
|
7368 |
+
$.jStorage.set('ssPanelAutoPosition', 0);
|
7369 |
+
this.magnet.css('display', 'inline-block');
|
7370 |
+
}, this),
|
7371 |
+
scroll: false
|
7372 |
+
})
|
7373 |
+
.resizable({
|
7374 |
+
distance: 5,
|
7375 |
+
handles: "s",
|
7376 |
+
stop: $.proxy(function (event, ui) {
|
7377 |
+
this.lastHeight = this.detachedPosition.height = this.sidebar.height();
|
7378 |
+
$.jStorage.set('ssPanelHeight', this.detachedPosition.height);
|
7379 |
|
7380 |
+
}, this),
|
7381 |
+
create: $.proxy(function (e, ui) {
|
7382 |
+
var handle = $(e.target).find('.ui-resizable-handle').addClass('n2-ss-layer-window-resizer');
|
7383 |
+
}, this)
|
7384 |
+
});
|
7385 |
|
7386 |
+
this.onResize();
|
7387 |
+
nextend.triggerResize();
|
7388 |
+
}
|
|
|
7389 |
|
7390 |
+
LayerWindow.prototype.switchTab = function (tabName) {
|
7391 |
+
this.panelHeading.filter('[data-tab="' + tabName + '"]').trigger('click');
|
7392 |
+
};
|
7393 |
|
7394 |
+
return LayerWindow;
|
7395 |
+
});
|
7396 |
+
N2Require('PositionDisplay', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
7397 |
+
"use strict";
|
7398 |
|
7399 |
+
function PositionDisplay() {
|
7400 |
+
this.currentSource = '';
|
7401 |
+
$(window).ready($.proxy(this.ready, this));
|
7402 |
}
|
7403 |
|
7404 |
+
PositionDisplay.prototype.ready = function () {
|
7405 |
+
this.$body = $('body');
|
7406 |
+
this.$el = $('<div class="n2 n2-ss-position-display"/>')
|
7407 |
+
.appendTo('body');
|
7408 |
}
|
7409 |
|
7410 |
+
PositionDisplay.prototype.show = function (source) {
|
7411 |
+
if (this.currentSource == '') {
|
7412 |
+
this.currentSource = source;
|
7413 |
+
this.$el.addClass('n2-active');
|
7414 |
+
this.$body.addClass('n2-position-display-active');
|
7415 |
+
}
|
7416 |
+
}
|
7417 |
|
7418 |
+
PositionDisplay.prototype.update = function (e, source, html) {
|
7419 |
+
if (this.currentSource == source) {
|
7420 |
+
this.$el.html(html)
|
7421 |
+
.css({
|
7422 |
+
left: e.pageX + 10,
|
7423 |
+
top: e.pageY + 10
|
7424 |
+
});
|
7425 |
+
}
|
7426 |
}
|
7427 |
|
7428 |
+
PositionDisplay.prototype.hide = function (source) {
|
7429 |
+
if (this.currentSource == source || source === undefined) {
|
7430 |
+
this.$body.removeClass('n2-position-display-active');
|
7431 |
+
this.$el.removeClass('n2-active');
|
7432 |
+
this.currentSource = '';
|
7433 |
+
}
|
7434 |
|
|
|
|
|
7435 |
}
|
7436 |
|
7437 |
+
smartSlider.positionDisplay = new PositionDisplay();
|
|
|
|
|
|
|
|
|
7438 |
|
7439 |
+
return PositionDisplay;
|
7440 |
+
});
|
7441 |
+
N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
7442 |
+
"use strict";
|
7443 |
|
7444 |
+
function Ruler(stored) {
|
7445 |
+
this.showGuides = 1;
|
7446 |
+
this.guides = [];
|
7447 |
+
this.container = $('<div class="n2-ruler-container" />').appendTo('#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container');
|
7448 |
|
7449 |
+
this.scale = 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
7450 |
|
7451 |
+
this.vertical = $('<div class="n2-ruler n2-ruler-vertical unselectable"></div>').appendTo('.n2-ss-slider-real-container');
|
7452 |
+
this.horizontal = $('<div class="n2-ruler n2-ruler-horizontal unselectable"></div>').appendTo(this.container);
|
7453 |
|
7454 |
+
this.verticalSpans = $();
|
7455 |
+
this.horizontalSpans = $();
|
|
|
7456 |
|
7457 |
+
this.onResize();
|
7458 |
+
nextend.smartSlider.frontend.sliderElement.on('SliderResize', $.proxy(this.onSliderResize, this))
|
7459 |
+
$(window).on('resize', $.proxy(this.onResize, this));
|
7460 |
|
7461 |
+
this.horizontal.on('mousedown', $.proxy(function (e) {
|
7462 |
+
if (this.showGuides) {
|
7463 |
+
new GuideHorizontal(this, this.horizontal, e);
|
7464 |
+
}
|
7465 |
+
}, this));
|
7466 |
|
|
|
|
|
7467 |
|
7468 |
+
this.vertical.on('mousedown', $.proxy(function (e) {
|
7469 |
+
if (this.showGuides) {
|
7470 |
+
new GuideVertical(this, this.vertical, e);
|
7471 |
+
}
|
7472 |
+
}, this));
|
7473 |
|
|
|
7474 |
|
7475 |
+
try {
|
7476 |
+
stored = $.extend({vertical: [], horizontal: []}, JSON.parse(Base64.decode(stored)));
|
7477 |
+
for (var i = 0; i < stored.horizontal.length; i++) {
|
7478 |
+
var guide = new GuideHorizontal(this, this.horizontal);
|
7479 |
+
guide.setPosition(stored.horizontal[i]);
|
7480 |
+
}
|
7481 |
+
for (var i = 0; i < stored.vertical.length; i++) {
|
7482 |
+
var guide = new GuideVertical(this, this.vertical);
|
7483 |
+
guide.setPosition(stored.vertical[i]);
|
7484 |
+
}
|
7485 |
+
} catch (e) {
|
7486 |
}
|
7487 |
+
nextend.ruler = this;
|
7488 |
+
this.measureToolVertical();
|
7489 |
+
this.measureToolHorizontal();
|
7490 |
+
}
|
7491 |
|
7492 |
+
Ruler.prototype.addGuide = function (guide) {
|
7493 |
+
this.guides.push(guide);
|
7494 |
+
}
|
7495 |
|
7496 |
+
Ruler.prototype.removeGuide = function (guide) {
|
7497 |
+
this.guides.splice($.inArray(guide, this.guides), 1);
|
7498 |
+
}
|
|
|
7499 |
|
7500 |
+
Ruler.prototype.clearGuides = function () {
|
7501 |
+
for (var i = this.guides.length - 1; i >= 0; i--) {
|
7502 |
+
this.guides[i].delete();
|
7503 |
+
}
|
7504 |
+
}
|
7505 |
|
7506 |
+
Ruler.prototype.onSliderResize = function (e, ratios) {
|
7507 |
+
this.onResize();
|
7508 |
+
}
|
7509 |
|
7510 |
+
Ruler.prototype.onResize = function () {
|
7511 |
+
var dimensions = nextend.smartSlider.frontend.responsive.responsiveDimensions,
|
7512 |
+
width = Math.max(dimensions.slider.width, $('#n2-ss-slide-canvas-container').outerWidth(true) - 40),
|
7513 |
+
height = Math.max(dimensions.slider.height, $('#n2-ss-slide-canvas-container').outerHeight(true));
|
7514 |
|
|
|
7515 |
|
7516 |
+
this.container.css({
|
7517 |
+
width: width + 40,
|
7518 |
+
height: height + 40
|
7519 |
+
});
|
7520 |
|
7521 |
+
for (var i = this.horizontalSpans.length - 3; i < width / this.scale; i++) {
|
7522 |
+
var mark = $('<span />').appendTo(this.horizontal);
|
7523 |
+
if (i % 10 == 0) {
|
7524 |
+
mark.addClass('n2-ss-ruler-mark-large').append('<span>' + ((i / 10) * 100) + '</span>');
|
7525 |
+
} else if (i % 2 == 0) {
|
7526 |
+
mark.addClass('n2-ss-ruler-mark-medium');
|
7527 |
+
}
|
7528 |
+
this.horizontalSpans = this.horizontalSpans.add(mark);
|
7529 |
+
}
|
7530 |
|
7531 |
+
for (var i = this.verticalSpans.length - 3; i < height / this.scale; i++) {
|
7532 |
+
var mark = $('<span />').appendTo(this.vertical);
|
7533 |
+
if (i % 10 == 0) {
|
7534 |
+
mark.addClass('n2-ss-ruler-mark-large').append('<span>' + ((i / 10) * 100) + '</span>');
|
7535 |
+
} else if (i % 2 == 0) {
|
7536 |
+
mark.addClass('n2-ss-ruler-mark-medium');
|
7537 |
+
}
|
7538 |
+
this.verticalSpans = this.verticalSpans.add(mark);
|
7539 |
+
}
|
7540 |
+
}
|
7541 |
|
7542 |
+
Ruler.prototype.toArray = function () {
|
7543 |
+
var data = {
|
7544 |
+
horizontal: [],
|
7545 |
+
vertical: []
|
7546 |
+
};
|
7547 |
+
for (var i = 0; i < this.guides.length; i++) {
|
7548 |
+
if (this.guides[i] instanceof GuideHorizontal) {
|
7549 |
+
data.horizontal.push(this.guides[i].position);
|
7550 |
+
} else if (this.guides[i] instanceof GuideVertical) {
|
7551 |
+
data.vertical.push(this.guides[i].position);
|
7552 |
+
}
|
7553 |
+
}
|
7554 |
+
return data;
|
7555 |
+
}
|
7556 |
|
7557 |
+
Ruler.prototype.measureToolVertical = function () {
|
7558 |
+
var guide = $('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>')
|
7559 |
+
.css('display', 'none')
|
7560 |
+
.appendTo(this.vertical);
|
7561 |
|
7562 |
+
var guideVisible = false,
|
7563 |
+
showGuide = $.proxy(function () {
|
7564 |
+
if (!guideVisible) {
|
7565 |
+
guideVisible = true;
|
7566 |
+
guide.css('display', '');
|
7567 |
+
smartSlider.positionDisplay.show('Guide');
|
7568 |
+
}
|
7569 |
+
}, this),
|
7570 |
+
hideGuide = $.proxy(function () {
|
7571 |
+
if (guideVisible) {
|
7572 |
+
guideVisible = false;
|
7573 |
+
guide.css('display', 'none');
|
7574 |
+
smartSlider.positionDisplay.hide('Guide');
|
7575 |
+
}
|
7576 |
+
}, this);
|
7577 |
+
this.vertical.on({
|
7578 |
+
mouseenter: $.proxy(function (e) {
|
7579 |
+
if (!this.showGuides) return;
|
7580 |
+
var lastY = 0,
|
7581 |
+
offset = Math.round(this.vertical.offset().top);
|
7582 |
+
showGuide();
|
7583 |
|
7584 |
+
this.vertical.on('mousemove.n2-ruler-measure-tool', $.proxy(function (e) {
|
7585 |
+
if ($(e.target).hasClass('n2-ruler-guide-border') && $(e.target).parent()[0] != guide[0]) {
|
7586 |
+
hideGuide();
|
7587 |
+
} else {
|
7588 |
+
showGuide();
|
7589 |
+
if (lastY != e.pageY) {
|
7590 |
+
var pos = e.pageY - offset;
|
7591 |
+
guide.css('top', pos);
|
7592 |
+
smartSlider.positionDisplay.update(e, 'Guide', (pos - 40) + 'px');
|
7593 |
+
lastY = e.pageY;
|
7594 |
+
}
|
7595 |
+
}
|
7596 |
+
}, this));
|
7597 |
+
}, this),
|
7598 |
+
mouseleave: $.proxy(function () {
|
7599 |
+
this.vertical.off('.n2-ruler-measure-tool');
|
7600 |
+
hideGuide();
|
7601 |
+
}, this)
|
7602 |
+
});
|
7603 |
+
}
|
7604 |
|
7605 |
+
Ruler.prototype.measureToolHorizontal = function () {
|
7606 |
+
var guide = $('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>')
|
7607 |
+
.css('display', 'none')
|
7608 |
+
.appendTo(this.horizontal);
|
7609 |
|
7610 |
+
var guideVisible = false,
|
7611 |
+
showGuide = $.proxy(function () {
|
7612 |
+
if (!guideVisible) {
|
7613 |
+
guideVisible = true;
|
7614 |
+
guide.css('display', '');
|
7615 |
+
smartSlider.positionDisplay.show('Guide');
|
7616 |
+
}
|
7617 |
+
}, this),
|
7618 |
+
hideGuide = $.proxy(function () {
|
7619 |
+
if (guideVisible) {
|
7620 |
+
guideVisible = false;
|
7621 |
+
guide.css('display', 'none');
|
7622 |
+
smartSlider.positionDisplay.hide('Guide');
|
7623 |
+
}
|
7624 |
+
}, this);
|
7625 |
|
7626 |
+
this.horizontal.on({
|
7627 |
+
mouseenter: $.proxy(function (e) {
|
7628 |
+
if (!this.showGuides) return;
|
7629 |
+
var lastX = 0,
|
7630 |
+
offset = Math.round(this.horizontal.offset().left);
|
7631 |
+
showGuide();
|
7632 |
|
7633 |
+
this.horizontal.on('mousemove.n2-ruler-measure-tool', $.proxy(function (e) {
|
7634 |
+
if ($(e.target).hasClass('n2-ruler-guide-border') && $(e.target).parent()[0] != guide[0]) {
|
7635 |
+
hideGuide();
|
7636 |
+
} else {
|
7637 |
+
showGuide();
|
7638 |
+
if (lastX != e.pageX) {
|
7639 |
+
var pos = Math.max(e.pageX - offset, 40);
|
7640 |
+
guide.css('left', pos);
|
7641 |
+
smartSlider.positionDisplay.update(e, 'Guide', (pos - 40) + 'px');
|
7642 |
+
lastX = e.pageX;
|
7643 |
+
}
|
7644 |
+
}
|
7645 |
+
}, this));
|
7646 |
+
}, this),
|
7647 |
+
mouseleave: $.proxy(function () {
|
7648 |
+
this.horizontal.off('.n2-ruler-measure-tool');
|
7649 |
+
hideGuide();
|
7650 |
+
}, this)
|
7651 |
+
});
|
7652 |
+
}
|
7653 |
|
7654 |
+
function Guide(ruler, container, e) {
|
7655 |
+
this.ruler = ruler;
|
7656 |
+
this.container = container;
|
7657 |
+
this.position = 0;
|
|
|
7658 |
|
7659 |
+
this.guide = $('<div class="n2-ruler-guide n2-ruler-user-guide"><div class="n2-ruler-guide-border"></div><div class="n2-ruler-guide-handle"></div></div>')
|
7660 |
+
.appendTo(container)
|
7661 |
+
.on('mousedown', $.proxy(function (e) {
|
7662 |
+
e.preventDefault();
|
7663 |
+
e.stopPropagation();
|
7664 |
+
if (!nextend.smartSlider.canvasManager.canvasSettings.settings['n2-ss-lock-guides']) {
|
7665 |
+
this.delete();
|
7666 |
+
}
|
7667 |
+
}, this));
|
7668 |
|
7669 |
+
this.ruler.addGuide(this);
|
7670 |
|
7671 |
+
if (e) {
|
7672 |
+
this.create(e);
|
7673 |
+
}
|
7674 |
|
7675 |
+
}
|
|
|
7676 |
|
7677 |
+
Guide.prototype._position = function (position, e) {
|
7678 |
+
return Math.max(0, position);
|
7679 |
+
}
|
7680 |
|
7681 |
+
Guide.prototype.setPosition = function (position) {
|
7682 |
+
this.position = position;
|
7683 |
+
this.refresh();
|
7684 |
+
}
|
|
|
|
|
|
|
|
|
7685 |
|
7686 |
+
Guide.prototype.refresh = function () {
|
7687 |
+
this.positionRender(this.position);
|
7688 |
+
}
|
7689 |
|
7690 |
+
Guide.prototype.delete = function () {
|
7691 |
+
this.ruler.removeGuide(this);
|
7692 |
+
this.guide.remove();
|
7693 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7694 |
|
7695 |
+
function GuideHorizontal() {
|
7696 |
+
Guide.prototype.constructor.apply(this, arguments);
|
7697 |
+
}
|
|
|
|
|
7698 |
|
7699 |
+
GuideHorizontal.prototype = Object.create(Guide.prototype);
|
7700 |
+
GuideHorizontal.prototype.constructor = GuideHorizontal;
|
|
|
7701 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7702 |
|
7703 |
+
GuideHorizontal.prototype.create = function (e) {
|
|
|
|
|
7704 |
|
7705 |
+
var offset = Math.round(this.container.offset().left) + 40;
|
|
|
|
|
|
|
|
|
7706 |
|
7707 |
+
this.position = this._position((e.pageX - offset), e);
|
7708 |
+
this.positionRender(this.position);
|
7709 |
+
}
|
7710 |
|
7711 |
+
GuideHorizontal.prototype.rawPositionRender = function (value) {
|
7712 |
+
this.guide.css('left', Math.max(0, value) + 40);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7713 |
}
|
7714 |
|
7715 |
+
GuideHorizontal.prototype.positionRender = function (value) {
|
7716 |
+
this.guide.css('left', Math.max(0, value) + 40);
|
7717 |
+
}
|
7718 |
|
7719 |
+
function GuideVertical() {
|
7720 |
+
Guide.prototype.constructor.apply(this, arguments);
|
7721 |
+
}
|
7722 |
|
7723 |
+
GuideVertical.prototype = Object.create(Guide.prototype);
|
7724 |
+
GuideVertical.prototype.constructor = GuideVertical;
|
7725 |
|
7726 |
+
GuideVertical.prototype.create = function (e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7727 |
|
7728 |
+
var offset = Math.round(this.container.offset().top) + 40;
|
7729 |
+
this.position = this._position((e.pageY - offset), e);
|
7730 |
+
this.positionRender(this.position);
|
7731 |
+
}
|
|
|
7732 |
|
7733 |
+
GuideVertical.prototype.rawPositionRender = function (value) {
|
7734 |
+
this.guide.css('top', Math.max(0, value) + 40);
|
7735 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7736 |
|
7737 |
+
GuideVertical.prototype.positionRender = function (value) {
|
7738 |
+
this.guide.css('top', Math.max(0, value) + 40);
|
7739 |
+
}
|
|
|
|
|
|
|
7740 |
|
7741 |
+
return Ruler;
|
7742 |
+
});
|
7743 |
+
N2Require('CanvasSettings', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
7744 |
+
"use strict";
|
7745 |
+
function CanvasSettings(canvasManager) {
|
7746 |
|
7747 |
+
this.canvasManager = canvasManager;
|
|
|
|
|
7748 |
|
7749 |
+
this.settings = {}
|
7750 |
+
var $settings = $('#n2-ss-slide-canvas-settings')
|
7751 |
+
.on('mouseleave', $.proxy(function () {
|
7752 |
+
$settings.removeClass('n2-active');
|
7753 |
+
}, this));
|
7754 |
|
7755 |
+
$settings.find('> a').on('click', function (e) {
|
7756 |
+
e.preventDefault();
|
7757 |
+
$settings.toggleClass('n2-active');
|
7758 |
+
});
|
|
|
|
|
|
|
|
|
7759 |
|
7760 |
+
this.$settingsPanel = $settings.find('.n2-ss-settings-panel-inner');
|
7761 |
+
this.snapTo();
|
7762 |
+
this.roundTo();
|
7763 |
+
this.colorScheme();
|
7764 |
+
if (!this.canvasManager.slideEditManager.options.isAddSample) {
|
7765 |
+
this.ruler();
|
7766 |
+
}
|
7767 |
+
}
|
7768 |
|
7769 |
+
CanvasSettings.prototype._addSettings = function (hash, title, _default, cb) {
|
7770 |
+
this.settings[hash] = parseInt($.jStorage.get(hash, _default));
|
7771 |
+
var row = $('<a href="">' + title + '<span class="n2-setting-tick"><i class="n2-i n2-it n2-i-tick2"></i></span></a>').on('click', $.proxy(function (e) {
|
7772 |
+
e.preventDefault();
|
7773 |
+
this.settings[hash] = (this.settings[hash] == 1 ? 0 : 1);
|
7774 |
+
$.jStorage.set(hash, this.settings[hash]);
|
7775 |
+
row.toggleClass('n2-setting-enabled', this.settings[hash] == 1);
|
7776 |
+
cb(this.settings[hash], false);
|
7777 |
+
}, this)).appendTo(this.$settingsPanel);
|
7778 |
|
7779 |
+
row.toggleClass('n2-setting-enabled', this.settings[hash] == 1);
|
7780 |
+
cb(this.settings[hash], true);
|
7781 |
+
}
|
|
|
|
|
|
|
|
|
7782 |
|
7783 |
+
CanvasSettings.prototype._addAction = function (title, cb) {
|
7784 |
+
$('<a href="" class="n2-panel-action">' + title + '</a>').on('click', $.proxy(function (e) {
|
7785 |
+
e.preventDefault();
|
7786 |
+
cb();
|
7787 |
+
}, this)).appendTo(this.$settingsPanel);
|
7788 |
+
}
|
|
|
|
|
|
|
|
|
7789 |
|
7790 |
+
CanvasSettings.prototype.get = function (name) {
|
7791 |
+
return this.settings[name];
|
7792 |
+
}
|
|
|
|
|
7793 |
|
7794 |
+
CanvasSettings.prototype.snapTo = function () {
|
7795 |
|
7796 |
+
this._addSettings("n2-ss-snap-to-enabled", n2_('Smart Snap'), 1, $.proxy(function (value) {
|
7797 |
+
var layers = this.mainContainer.container.getSortedLayers();
|
7798 |
+
for (var i = 0; i < layers.length; i++) {
|
7799 |
+
layers[i].placement.doAction('snap');
|
7800 |
}
|
7801 |
+
}, this.canvasManager));
|
7802 |
+
};
|
7803 |
|
7804 |
+
CanvasSettings.prototype.roundTo = function () {
|
7805 |
+
|
7806 |
+
this._addSettings("n2-ss-round-to-enabled", n2_('Round to 5px'), 1, function (value) {
|
7807 |
+
if (value == 1) {
|
7808 |
+
nextend.roundTo = 5;
|
7809 |
} else {
|
7810 |
+
nextend.roundTo = 1;
|
7811 |
}
|
7812 |
+
});
|
|
|
|
|
7813 |
};
|
7814 |
|
7815 |
+
CanvasSettings.prototype.colorScheme = function () {
|
|
|
|
|
7816 |
|
7817 |
+
var themeElement = $('#n2-ss-slide-canvas-container');
|
7818 |
+
this._addSettings("n2-ss-theme-dark", n2_('Dark Mode'), 0, function (value) {
|
7819 |
+
themeElement.toggleClass('n2-ss-theme-dark', value == 1);
|
7820 |
+
});
|
7821 |
};
|
7822 |
|
|
|
|
|
7823 |
|
7824 |
+
CanvasSettings.prototype.ruler = function () {
|
7825 |
+
smartSlider.ruler = new scope.Ruler($('#slideguides').val());
|
7826 |
+
|
7827 |
+
var editor = $('#n2-ss-slide-canvas-container');
|
7828 |
+
this._addSettings("n2-ss-ruler-enabled", n2_('Ruler'), 1, $.proxy(function (value) {
|
7829 |
+
editor.toggleClass('n2-ss-has-ruler', value == 1);
|
7830 |
+
nextend.triggerResize();
|
7831 |
+
}, this));
|
7832 |
+
|
7833 |
+
|
7834 |
+
this._addSettings("n2-ss-show-guides", n2_('Show Guides'), 1, $.proxy(function (value) {
|
7835 |
+
nextend.ruler.showGuides = value;
|
7836 |
+
editor.toggleClass('n2-ss-show-guides', value == 1);
|
7837 |
+
}, this));
|
7838 |
+
this._addSettings("n2-ss-lock-guides", n2_('Lock Guides'), 0, $.proxy(function (value) {
|
7839 |
+
editor.toggleClass('n2-ss-lock-guides', value == 1);
|
7840 |
+
}, this));
|
7841 |
+
|
7842 |
+
this._addAction('Clear Guides', $.proxy(function () {
|
7843 |
+
nextend.ruler.clearGuides();
|
7844 |
+
}, this))
|
7845 |
};
|
7846 |
|
7847 |
+
return CanvasSettings;
|
7848 |
+
});
|
7849 |
+
N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
7850 |
+
"use strict";
|
7851 |
+
|
7852 |
+
var rAFShim = (function () {
|
7853 |
+
var timeLast = 0;
|
7854 |
+
|
7855 |
+
return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
|
7856 |
+
var timeCurrent = (new Date()).getTime(),
|
7857 |
+
timeDelta;
|
7858 |
+
|
7859 |
+
/* Dynamically set delay on a per-tick basis to match 60fps. */
|
7860 |
+
/* Technique by Erik Moller. MIT license: https://gist.github.com/paulirish/1579671 */
|
7861 |
+
timeDelta = Math.max(0, 16 - (timeCurrent - timeLast));
|
7862 |
+
timeLast = timeCurrent + timeDelta;
|
7863 |
+
|
7864 |
+
return setTimeout(function () {
|
7865 |
+
callback(timeCurrent + timeDelta);
|
7866 |
+
}, timeDelta);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7867 |
};
|
7868 |
+
})(),
|
7869 |
+
resizeCollection = {
|
7870 |
+
raf: false,
|
7871 |
+
ratios: null,
|
7872 |
+
isThrottled: false,
|
7873 |
+
layers: []
|
7874 |
+
},
|
7875 |
+
requestRender = function () {
|
7876 |
+
if (resizeCollection.raf === false) {
|
7877 |
+
resizeCollection.raf = true;
|
7878 |
+
rAFShim(function () {
|
7879 |
+
for (var i = 0; i < resizeCollection.layers.length; i++) {
|
7880 |
+
if (!resizeCollection.layers[i].isDeleted) {
|
7881 |
+
resizeCollection.layers[i].doTheResize(resizeCollection.ratios, true, resizeCollection.isThrottled);
|
7882 |
+
}
|
7883 |
+
}
|
7884 |
+
resizeCollection = {
|
7885 |
+
raf: false,
|
7886 |
+
ratios: null,
|
7887 |
+
isThrottled: false,
|
7888 |
+
layers: []
|
7889 |
+
};
|
7890 |
+
});
|
7891 |
+
}
|
7892 |
+
};
|
7893 |
|
7894 |
+
/**
|
7895 |
+
*
|
7896 |
+
* @alias scope.PlacementAbsolute
|
7897 |
+
* @param placement
|
7898 |
+
* @param layer
|
7899 |
+
* @param canvasManager
|
7900 |
+
* @constructor
|
7901 |
+
*/
|
7902 |
+
function PlacementAbsolute(placement, layer, canvasManager) {
|
7903 |
+
this.type = 'absolute';
|
7904 |
|
7905 |
+
this.transferredProperties = {};
|
7906 |
|
7907 |
+
scope.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
|
|
7908 |
|
7909 |
+
this.doThrottledTheResize = this.doTheResize;
|
7910 |
+
this._triggerLayerResizedThrottled = NextendThrottle(this._triggerLayerResized, 30);
|
7911 |
|
7912 |
+
this.parentIsVisible = true; // Related to parent child layer picker
|
|
|
7913 |
|
7914 |
+
this.children = [];
|
7915 |
+
}
|
|
|
7916 |
|
7917 |
+
PlacementAbsolute.prototype = Object.create(scope.PlacementAbstract.prototype);
|
7918 |
+
PlacementAbsolute.prototype.constructor = PlacementAbsolute;
|
7919 |
|
7920 |
+
PlacementAbsolute.prototype.start = function () {
|
7921 |
+
this.$layer = this.layer.layer;
|
7922 |
+
this.$layerRow = this.layer.layerRow;
|
7923 |
+
}
|
7924 |
|
7925 |
+
PlacementAbsolute.prototype.preActivation = function (lastPlacement) {
|
7926 |
+
if (lastPlacement.type == 'normal') {
|
7927 |
+
var height = this.layer.getProperty('height');
|
7928 |
+
if (height > 0) {
|
7929 |
+
this.transferredProperties.height = height;
|
7930 |
+
}
|
7931 |
+
}
|
7932 |
+
}
|
7933 |
|
7934 |
+
PlacementAbsolute.prototype.activated = function (properties) {
|
7935 |
+
var delayedActivate = false,
|
7936 |
+
parentid = this.$layer.data('parentid');
|
7937 |
+
if (parentid) {
|
7938 |
+
var $parent = $('#' + parentid);
|
7939 |
+
if ($parent.length > 0) {
|
7940 |
+
this.activatedAfterParentReady(properties);
|
7941 |
+
} else {
|
7942 |
+
setTimeout($.proxy(function () {
|
7943 |
+
this.activatedAfterParentReady(properties);
|
7944 |
+
}, this), 300);
|
7945 |
+
}
|
7946 |
+
} else {
|
7947 |
+
this._activated(properties);
|
7948 |
+
}
|
7949 |
+
}
|
7950 |
|
7951 |
+
PlacementAbsolute.prototype.activatedAfterParentReady = function (properties) {
|
7952 |
+
var parentid = this.$layer.data('parentid');
|
7953 |
+
if (parentid) {
|
7954 |
+
var $parent = $('#' + parentid);
|
7955 |
+
if ($parent.length > 0) {
|
7956 |
+
var layerObject = $parent.data('layerObject');
|
7957 |
+
if (layerObject) {
|
7958 |
+
layerObject.readyDeferred.done($.proxy(this._activated, this, properties));
|
7959 |
+
} else {
|
7960 |
+
$parent.on('layerStarted', $.proxy(function (e, layerObject) {
|
7961 |
+
layerObject.readyDeferred.done($.proxy(this._activated, this, properties));
|
7962 |
+
}, this));
|
7963 |
+
}
|
7964 |
+
} else {
|
7965 |
+
this.$layer.data('parentid', '');
|
7966 |
+
this._activated(properties);
|
7967 |
+
}
|
7968 |
+
} else {
|
7969 |
+
this._activated(properties);
|
7970 |
+
}
|
7971 |
+
}
|
7972 |
|
7973 |
+
PlacementAbsolute.prototype._activated = function (properties) {
|
7974 |
+
this.loadProperties($.extend(properties, this.transferredProperties));
|
7975 |
+
this.transferredProperties = {};
|
7976 |
|
7977 |
+
this.$layer.css('zIndex', '');
|
|
|
7978 |
|
7979 |
+
this.___makeLayerAlign();
|
7980 |
+
this.___makeLayerResizeable();
|
7981 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7982 |
|
7983 |
+
PlacementAbsolute.prototype.deActivated = function (newMode) {
|
7984 |
|
7985 |
+
this.$layer
|
7986 |
+
.removeAttr('data-align')
|
7987 |
+
.removeAttr('data-valign')
|
7988 |
+
.css({
|
7989 |
+
left: '',
|
7990 |
+
top: '',
|
7991 |
+
right: '',
|
7992 |
+
bottom: '',
|
7993 |
+
width: '',
|
7994 |
+
height: '',
|
7995 |
+
'text-align': ''
|
7996 |
+
});
|
7997 |
|
7998 |
+
this.alignMarker.remove();
|
7999 |
+
this.$layer.nextendResizable('destroy');
|
8000 |
+
this.$layer.off('.n2-ss-absolute');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8001 |
|
8002 |
+
this.$layer.triggerHandler('LayerUnavailable');
|
8003 |
|
8004 |
+
var properties = ['parentid', 'responsiveposition', 'responsivesize', 'parentalign', 'parentvalign',
|
8005 |
+
'align', 'valign', 'left', 'top', 'width', 'height'];
|
8006 |
|
8007 |
+
var historicalData = this.layer.getPropertiesData(properties);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8008 |
|
8009 |
+
this.layer.removeProperties(properties);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8010 |
|
|
|
|
|
8011 |
|
8012 |
+
this.chainParent.remove();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8013 |
|
8014 |
+
return historicalData;
|
8015 |
+
}
|
8016 |
|
8017 |
+
PlacementAbsolute.prototype.loadProperties = function (options) {
|
8018 |
+
this.layer.createProperty('parentid', null, this.layer.layer, this);
|
8019 |
+
|
8020 |
+
this.layer.createProperty('responsiveposition', 1, this.layer.layer, this);
|
8021 |
+
this.layer.createProperty('responsivesize', 1, this.layer.layer, this);
|
8022 |
+
|
8023 |
+
this.layer.createDeviceProperty('parentalign', {desktopPortrait: 'center'}, this.layer.layer, this);
|
8024 |
+
this.layer.createDeviceProperty('parentvalign', {desktopPortrait: 'middle'}, this.layer.layer, this);
|
8025 |
+
|
8026 |
+
this.layer.createDeviceProperty('align', {desktopPortrait: options.align || 'center'}, this.layer.layer, this);
|
8027 |
+
this.layer.createDeviceProperty('valign', {desktopPortrait: options.valign || 'middle'}, this.layer.layer, this);
|
8028 |
+
|
8029 |
+
this.layer.createDeviceProperty('left', {desktopPortrait: options.left || 0}, this.layer.layer, this);
|
8030 |
+
this.layer.createDeviceProperty('top', {desktopPortrait: options.top || 0}, this.layer.layer, this);
|
8031 |
+
|
8032 |
+
this.layer.createDeviceProperty('width', {desktopPortrait: options.width || 'auto'}, this.layer.layer, this);
|
8033 |
+
this.layer.createDeviceProperty('height', {desktopPortrait: options.height || 'auto'}, this.layer.layer, this);
|
8034 |
+
|
8035 |
+
var $layer = this.layer.layer;
|
8036 |
+
|
8037 |
+
this.subscribeParentCallbacks = {};
|
8038 |
+
if (this.layer.getProperty('parentid')) {
|
8039 |
+
this.subscribeParent();
|
8040 |
+
}
|
8041 |
+
|
8042 |
+
$layer.attr({
|
8043 |
+
'data-align': this.layer.getProperty('align'),
|
8044 |
+
'data-valign': this.layer.getProperty('valign')
|
8045 |
+
});
|
8046 |
+
|
8047 |
+
var $lastParent = null;
|
8048 |
+
this.chainParent = $('<div class="n2-ss-layer-chain-parent n2-button n2-button-icon n2-button-xs n2-radius-s n2-button-blue"><i class="n2-i n2-i-layerunlink"></i></div>').on({
|
8049 |
+
click: $.proxy(this.unlink, this),
|
8050 |
+
mouseenter: $.proxy(function () {
|
8051 |
+
$lastParent = $('#' + this.layer.getProperty('parentid')).addClass('n2-highlight');
|
8052 |
+
}, this),
|
8053 |
+
mouseleave: $.proxy(function () {
|
8054 |
+
if ($lastParent) {
|
8055 |
+
$lastParent.removeClass('n2-highlight');
|
8056 |
+
$lastParent = null;
|
8057 |
}
|
8058 |
+
}, this)
|
8059 |
+
}).appendTo(this.$layer);
|
8060 |
+
}
|
8061 |
|
8062 |
+
|
8063 |
+
PlacementAbsolute.prototype.triggerLayerResized = function (isThrottled, ratios) {
|
8064 |
+
if (isThrottled) {
|
8065 |
+
this._triggerLayerResized(isThrottled, ratios);
|
8066 |
+
} else {
|
8067 |
+
this._triggerLayerResizedThrottled(true, ratios);
|
8068 |
}
|
|
|
8069 |
};
|
8070 |
|
8071 |
+
PlacementAbsolute.prototype._triggerLayerResized = function (isThrottled, ratios) {
|
8072 |
+
if (!this.layer.isDeleted) {
|
8073 |
+
this.$layer.triggerHandler('LayerResized', [ratios || {
|
8074 |
+
slideW: this.canvasManager.getResponsiveRatio('h'),
|
8075 |
+
slideH: this.canvasManager.getResponsiveRatio('v')
|
8076 |
+
}, isThrottled || false]);
|
8077 |
+
}
|
8078 |
+
};
|
8079 |
+
|
8080 |
+
PlacementAbsolute.prototype.___makeLayerAlign = function () {
|
8081 |
+
this.alignMarker = $('<div class="n2-ss-layer-cc" />').appendTo(this.$layer);
|
8082 |
+
};
|
8083 |
+
|
8084 |
+
//<editor-fold desc="Makes layer resizable">
|
8085 |
+
|
8086 |
+
/**
|
8087 |
+
* Add resize handles to the specified layer
|
8088 |
+
* @param {jQuery} layer
|
8089 |
+
* @private
|
8090 |
+
*/
|
8091 |
+
PlacementAbsolute.prototype.___makeLayerResizeable = function () {
|
8092 |
+
this._resizableJustClick = false;
|
8093 |
+
this.$layer.nextendResizable({
|
8094 |
+
handles: 'n, e, s, w, ne, se, sw, nw',
|
8095 |
+
_containment: this.canvasManager.mainContainer.layer,
|
8096 |
+
start: $.proxy(this.____makeLayerResizeableStart, this),
|
8097 |
+
resize: $.proxy(this.____makeLayerResizeableResize, this),
|
8098 |
+
stop: $.proxy(this.____makeLayerResizeableStop, this),
|
8099 |
+
create: $.proxy(function () {
|
8100 |
+
this.$layer.find('.ui-resizable-handle, .n2-ss-layer-cc').on({
|
8101 |
+
mousedown: $.proxy(function (e) {
|
8102 |
+
this._resizableJustClick = [e.clientX, e.clientY];
|
8103 |
+
}, this),
|
8104 |
+
mouseup: $.proxy(function (e) {
|
8105 |
+
if (this._resizableJustClick && Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0] - e.clientX, 2) + Math.pow(this._resizableJustClick[1] - e.clientY, 2))) < 1) {
|
8106 |
+
var $target = $(e.currentTarget),
|
8107 |
+
layerFeatures = this.canvasManager.layerOptions.layerFeatures;
|
8108 |
+
if ($target.hasClass('ui-resizable-nw')) {
|
8109 |
+
layerFeatures.horizontalAlign('left', false);
|
8110 |
+
layerFeatures.verticalAlign('top', false);
|
8111 |
+
} else if ($target.hasClass('ui-resizable-w')) {
|
8112 |
+
layerFeatures.horizontalAlign('left', false);
|
8113 |
+
layerFeatures.verticalAlign('middle', false);
|
8114 |
+
} else if ($target.hasClass('ui-resizable-sw')) {
|
8115 |
+
layerFeatures.horizontalAlign('left', false);
|
8116 |
+
layerFeatures.verticalAlign('bottom', false);
|
8117 |
+
} else if ($target.hasClass('ui-resizable-n')) {
|
8118 |
+
layerFeatures.horizontalAlign('center', false);
|
8119 |
+
layerFeatures.verticalAlign('top', false);
|
8120 |
+
} else if ($target.hasClass('n2-ss-layer-cc')) {
|
8121 |
+
layerFeatures.horizontalAlign('center', false);
|
8122 |
+
layerFeatures.verticalAlign('middle', false);
|
8123 |
+
} else if ($target.hasClass('ui-resizable-s')) {
|
8124 |
+
layerFeatures.horizontalAlign('center', false);
|
8125 |
+
layerFeatures.verticalAlign('bottom', false);
|
8126 |
+
} else if ($target.hasClass('ui-resizable-ne')) {
|
8127 |
+
layerFeatures.horizontalAlign('right', false);
|
8128 |
+
layerFeatures.verticalAlign('top', false);
|
8129 |
+
} else if ($target.hasClass('ui-resizable-e')) {
|
8130 |
+
layerFeatures.horizontalAlign('right', false);
|
8131 |
+
layerFeatures.verticalAlign('middle', false);
|
8132 |
+
} else if ($target.hasClass('ui-resizable-se')) {
|
8133 |
+
layerFeatures.horizontalAlign('right', false);
|
8134 |
+
layerFeatures.verticalAlign('bottom', false);
|
8135 |
+
}
|
8136 |
+
}
|
8137 |
+
this._resizableJustClick = false;
|
8138 |
+
}, this)
|
8139 |
+
});
|
8140 |
+
}, this),
|
8141 |
+
smartguides: $.proxy(function () {
|
8142 |
+
this.$layer.triggerHandler('LayerParent');
|
8143 |
+
return this.canvasManager.getSnap();
|
8144 |
+
}, this),
|
8145 |
+
tolerance: 5
|
8146 |
+
})
|
8147 |
+
.on({
|
8148 |
+
'mousedown.n2-ss-absolute': $.proxy(function (e) {
|
8149 |
+
if (!this.layer.status != scope.ComponentAbstract.STATUS.LOCKED) {
|
8150 |
+
smartSlider.positionDisplay.show('Canvas');
|
8151 |
+
|
8152 |
+
smartSlider.positionDisplay.update(e, 'Canvas', 'W: ' + parseInt(this.$layer.width()) + 'px<br />H: ' + parseInt(this.$layer.height()) + 'px');
|
8153 |
|
8154 |
+
}
|
8155 |
+
if (document.activeElement) {
|
8156 |
+
document.activeElement.blur();
|
8157 |
+
}
|
8158 |
+
}, this),
|
8159 |
+
'mouseup.n2-ss-absolute': $.proxy(function (e) {
|
8160 |
+
smartSlider.positionDisplay.hide('Canvas');
|
8161 |
+
}, this)
|
8162 |
+
});
|
8163 |
};
|
8164 |
|
8165 |
+
PlacementAbsolute.prototype.____makeLayerResizeableStart = function (event, ui) {
|
8166 |
+
this.preventActivation = true;
|
8167 |
+
this.resizableDeferred = $.Deferred();
|
8168 |
+
this.canvasManager.layerWindow.hideWithDeferred(this.resizableDeferred);
|
8169 |
+
$('body').addClass('n2-ss-resize-layer');
|
8170 |
+
if (this._resizableJustClick) {
|
8171 |
+
this._resizableJustClick = false;
|
8172 |
+
}
|
8173 |
+
this.____makeLayerResizeableResize(event, ui);
|
8174 |
+
smartSlider.positionDisplay.show('Canvas');
|
8175 |
};
|
8176 |
|
8177 |
+
PlacementAbsolute.prototype.____makeLayerResizeableResize = function (e, ui) {
|
8178 |
|
|
|
|
|
|
|
|
|
8179 |
|
8180 |
+
smartSlider.positionDisplay.update(e, 'Canvas', 'W: ' + ui.size.width + 'px<br />H: ' + ui.size.height + 'px');
|
|
|
|
|
|
|
8181 |
|
8182 |
+
this.triggerLayerResized();
|
8183 |
};
|
8184 |
|
8185 |
+
PlacementAbsolute.prototype.____makeLayerResizeableStop = function (event, ui) {
|
8186 |
+
$('body').removeClass('n2-ss-resize-layer');
|
8187 |
+
this.resizableDeferred.resolve();
|
8188 |
|
8189 |
+
var isAutoWidth = false;
|
8190 |
+
if (ui.axis == "n" || ui.axis == "s" || ui.originalSize.width == ui.size.width) {
|
8191 |
+
var currentValue = this.layer.getProperty('width');
|
8192 |
+
if (this.layer.isDimensionPropertyAccepted(currentValue)) {
|
8193 |
+
isAutoWidth = true;
|
8194 |
+
this._syncwidth();
|
8195 |
+
}
|
8196 |
}
|
|
|
|
|
8197 |
|
8198 |
+
var isAutoHeight = false;
|
8199 |
+
if (ui.axis == "e" || ui.axis == "w" || ui.originalSize.height == ui.size.height) {
|
8200 |
+
var currentValue = this.layer.getProperty('height');
|
8201 |
+
if (this.layer.isDimensionPropertyAccepted(currentValue)) {
|
8202 |
+
isAutoHeight = true;
|
8203 |
+
this._syncheight();
|
8204 |
}
|
8205 |
}
|
|
|
|
|
8206 |
|
8207 |
+
var ratioSizeH = this.canvasManager.getResponsiveRatio('h'),
|
8208 |
+
ratioSizeV = this.canvasManager.getResponsiveRatio('v');
|
8209 |
|
8210 |
+
if (!parseInt(this.layer.getProperty('responsivesize'))) {
|
8211 |
+
ratioSizeH = ratioSizeV = 1;
|
8212 |
+
}
|
8213 |
+
var width = null;
|
8214 |
+
if (!isAutoWidth) {
|
8215 |
+
width = Math.round(ui.size.width * (1 / ratioSizeH));
|
8216 |
+
}
|
8217 |
+
var height = null;
|
8218 |
+
if (!isAutoHeight) {
|
8219 |
+
height = Math.round(ui.size.height * (1 / ratioSizeV));
|
8220 |
+
}
|
8221 |
|
8222 |
+
this._setPosition(null, null, ui.position.left, ui.position.top, width, height, true);
|
|
|
8223 |
|
8224 |
+
this.triggerLayerResized();
|
|
|
8225 |
|
8226 |
+
this.$layer.triggerHandler('LayerUnParent');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8227 |
|
8228 |
+
smartSlider.positionDisplay.hide('Canvas');
|
|
|
|
|
8229 |
|
8230 |
+
setTimeout($.proxy(function () {
|
8231 |
+
this.preventActivation = false;
|
8232 |
+
}, this), 80);
|
|
|
8233 |
|
8234 |
+
//this.canvasManager.panel.positionMenu(this.$layer);
|
8235 |
+
};
|
8236 |
+
//</editor-fold>
|
8237 |
|
8238 |
+
PlacementAbsolute.prototype._setPosition = function (align, valign, left, top, width, height, isPositionAbsolute) {
|
8239 |
+
var mode = this.layer.getMode();
|
8240 |
+
if (align === null) {
|
8241 |
+
align = this.layer.getProperty('align');
|
8242 |
}
|
8243 |
+
if (valign === null) {
|
8244 |
+
valign = this.layer.getProperty('valign');
|
|
|
|
|
|
|
8245 |
}
|
|
|
8246 |
|
8247 |
+
if (left === null) {
|
8248 |
+
left = this.layer.getProperty('left');
|
8249 |
+
} else if (isPositionAbsolute) {
|
8250 |
+
left = this.calculatePositionLeft(align, left);
|
|
|
|
|
8251 |
}
|
8252 |
|
8253 |
+
if (top === null) {
|
8254 |
+
top = this.layer.getProperty('top');
|
8255 |
+
} else if (isPositionAbsolute) {
|
8256 |
+
top = this.calculatePositionTop(valign, top);
|
8257 |
}
|
8258 |
|
8259 |
+
if (width === null) {
|
8260 |
+
width = this.layer.getProperty('width');
|
8261 |
}
|
8262 |
|
8263 |
+
if (height === null) {
|
8264 |
+
height = this.layer.getProperty('height');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8265 |
}
|
|
|
8266 |
|
8267 |
+
var task = smartSlider.history.addValue(this.layer, this.layer.historyStoreOnPlacement, ['historyStorePosition', mode]);
|
8268 |
+
if (task) {
|
8269 |
+
task.setValues({
|
8270 |
+
align: this.layer.getRawProperty('align'),
|
8271 |
+
valign: this.layer.getRawProperty('valign'),
|
8272 |
+
left: this.layer.getRawProperty('left'),
|
8273 |
+
top: this.layer.getRawProperty('top'),
|
8274 |
+
width: this.layer.getRawProperty('width'),
|
8275 |
+
height: this.layer.getRawProperty('height')
|
8276 |
+
}, {
|
8277 |
+
align: align,
|
8278 |
+
valign: valign,
|
8279 |
+
left: left,
|
8280 |
+
top: top,
|
8281 |
+
width: width,
|
8282 |
+
height: height
|
8283 |
+
});
|
8284 |
}
|
|
|
|
|
|
|
|
|
|
|
8285 |
|
8286 |
+
smartSlider.history.off();
|
|
|
|
|
8287 |
|
8288 |
+
this.layer.store('left', left, true, 'layer');
|
8289 |
+
this.layer.$.trigger('propertyChanged', ['left', left]);
|
8290 |
|
8291 |
+
this.layer.store('top', top, true, 'layer');
|
8292 |
+
this.layer.$.trigger('propertyChanged', ['top', top]);
|
|
|
|
|
8293 |
|
8294 |
+
this.layer.store('width', width, true, 'layer');
|
8295 |
+
this.layer.$.trigger('propertyChanged', ['width', width]);
|
|
|
|
|
|
|
|
|
|
|
8296 |
|
8297 |
+
this.layer.store('height', height, true, 'layer');
|
8298 |
+
this.layer.$.trigger('propertyChanged', ['height', height]);
|
8299 |
|
8300 |
+
this.layer.store('align', align, true, 'layer');
|
8301 |
+
this.layer.$.trigger('propertyChanged', ['align', align]);
|
8302 |
|
8303 |
+
this.layer.store('valign', valign, true, 'layer');
|
8304 |
+
this.layer.$.trigger('propertyChanged', ['valign', valign]);
|
|
|
|
|
8305 |
|
8306 |
+
smartSlider.history.on();
|
|
|
|
|
|
|
8307 |
|
8308 |
+
};
|
8309 |
|
8310 |
+
PlacementAbsolute.prototype.historyStorePosition = function (values, mode) {
|
8311 |
|
8312 |
+
this.layer.historyStore(values.align, 'align', mode);
|
8313 |
+
this.layer.historyStore(values.valign, 'valign', mode);
|
8314 |
|
8315 |
+
this.layer.historyStore(values.width, 'width', mode);
|
8316 |
+
this.layer.historyStore(values.height, 'height', mode);
|
|
|
|
|
8317 |
|
8318 |
+
this.layer.historyStore(values.left, 'left', mode);
|
8319 |
+
this.layer.historyStore(values.top, 'top', mode);
|
8320 |
|
8321 |
+
this.triggerLayerResized();
|
8322 |
+
}
|
|
|
8323 |
|
8324 |
+
PlacementAbsolute.prototype.calculatePositionLeft = function (align, left) {
|
8325 |
+
var ratioH = this.canvasManager.getResponsiveRatio('h');
|
|
|
8326 |
|
8327 |
+
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8328 |
+
ratioH = 1;
|
8329 |
}
|
8330 |
|
8331 |
+
var parent = this.parent,
|
8332 |
+
p = {
|
8333 |
+
left: 0,
|
8334 |
+
leftMultiplier: 1
|
8335 |
+
};
|
8336 |
+
if (!parent || !parent.is(':visible')) {
|
8337 |
+
parent = this.$layer.parent();
|
8338 |
|
|
|
|
|
|
|
8339 |
|
8340 |
+
switch (align) {
|
8341 |
+
case 'center':
|
8342 |
+
p.left += parent.width() / 2;
|
8343 |
+
break;
|
8344 |
+
case 'right':
|
8345 |
+
p.left += parent.width();
|
8346 |
+
break;
|
8347 |
+
}
|
8348 |
} else {
|
8349 |
+
var position = parent.position();
|
8350 |
+
switch (this.layer.getProperty('parentalign')) {
|
8351 |
+
case 'right':
|
8352 |
+
p.left = position.left + parent.width();
|
8353 |
+
break;
|
8354 |
+
case 'center':
|
8355 |
+
p.left = position.left + parent.width() / 2;
|
8356 |
+
break;
|
8357 |
+
default:
|
8358 |
+
p.left = position.left;
|
8359 |
+
}
|
8360 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8361 |
|
8362 |
|
8363 |
+
var left;
|
8364 |
+
switch (align) {
|
8365 |
+
case 'left':
|
8366 |
+
left = -Math.round((p.left - left) * (1 / ratioH));
|
8367 |
+
break;
|
8368 |
+
case 'center':
|
8369 |
+
left = -Math.round((p.left - left - this.$layer.width() / 2) * (1 / ratioH))
|
8370 |
+
break;
|
8371 |
+
case 'right':
|
8372 |
+
left = -Math.round((p.left - left - this.$layer.width()) * (1 / ratioH));
|
8373 |
break;
|
8374 |
}
|
|
|
8375 |
|
8376 |
+
return left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8377 |
}
|
8378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8379 |
|
8380 |
+
PlacementAbsolute.prototype.calculatePositionTop = function (valign, top) {
|
8381 |
+
var ratioV = this.canvasManager.getResponsiveRatio('v');
|
8382 |
|
8383 |
+
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8384 |
+
ratioV = 1;
|
8385 |
+
}
|
|
|
|
|
8386 |
|
|
|
8387 |
|
8388 |
+
var parent = this.parent,
|
8389 |
+
p = {
|
8390 |
+
top: 0,
|
8391 |
+
topMultiplier: 1
|
8392 |
+
};
|
8393 |
+
if (!parent || !parent.is(':visible')) {
|
8394 |
+
parent = this.$layer.parent();
|
8395 |
|
8396 |
+
switch (valign) {
|
8397 |
+
case 'middle':
|
8398 |
+
p.top += parent.height() / 2;
|
8399 |
+
break;
|
8400 |
+
case 'bottom':
|
8401 |
+
p.top += parent.height();
|
8402 |
+
break;
|
8403 |
}
|
8404 |
+
} else {
|
8405 |
+
var position = parent.position();
|
8406 |
|
8407 |
+
switch (this.layer.getProperty('parentvalign')) {
|
8408 |
+
case 'bottom':
|
8409 |
+
p.top = position.top + parent.height();
|
8410 |
+
break;
|
8411 |
+
case 'middle':
|
8412 |
+
p.top = position.top + parent.height() / 2;
|
8413 |
+
break;
|
8414 |
+
default:
|
8415 |
+
p.top = position.top;
|
8416 |
+
}
|
8417 |
+
}
|
|
|
|
|
8418 |
|
8419 |
+
var top;
|
8420 |
+
switch (valign) {
|
8421 |
+
case 'top':
|
8422 |
+
top = -Math.round((p.top - top) * (1 / ratioV));
|
8423 |
+
break;
|
8424 |
+
case 'middle':
|
8425 |
+
top = -Math.round((p.top - top - this.$layer.height() / 2) * (1 / ratioV));
|
8426 |
+
break;
|
8427 |
+
case 'bottom':
|
8428 |
+
top = -Math.round((p.top - top - this.$layer.height()) * (1 / ratioV));
|
8429 |
+
break;
|
8430 |
}
|
8431 |
+
|
8432 |
+
return top;
|
8433 |
}
|
8434 |
|
8435 |
+
PlacementAbsolute.prototype.moveX = function (x) {
|
8436 |
|
8437 |
+
this._setPosition(null, null, this.layer.getProperty('left') + x, null, null, null, false);
|
|
|
|
|
|
|
8438 |
};
|
8439 |
|
8440 |
+
PlacementAbsolute.prototype.moveY = function (y) {
|
8441 |
|
8442 |
+
this._setPosition(null, null, null, this.layer.getProperty('top') + y, null, null, false);
|
8443 |
+
};
|
8444 |
|
8445 |
+
PlacementAbsolute.prototype.setPositionLeft = function (left) {
|
|
|
8446 |
|
8447 |
+
left = this.calculatePositionLeft(this.layer.getProperty('align'), left);
|
|
|
8448 |
|
8449 |
+
this.layer.store('left', left, true);
|
8450 |
+
this.layer.$.trigger('propertyChanged', ['left', left]);
|
|
|
|
|
|
|
|
|
8451 |
|
8452 |
+
}
|
8453 |
|
8454 |
+
PlacementAbsolute.prototype.setPositionTop = function (top) {
|
|
|
|
|
8455 |
|
8456 |
+
top = this.calculatePositionTop(this.layer.getProperty('valign'), top);
|
|
|
8457 |
|
8458 |
+
this.layer.store('top', top, true);
|
8459 |
+
this.layer.$.trigger('propertyChanged', ['top', top]);
|
8460 |
+
}
|
8461 |
+
|
8462 |
+
PlacementAbsolute.prototype.setPosition = function (left, top) {
|
8463 |
+
this.setPositionLeft(left);
|
8464 |
+
this.setPositionTop(top);
|
8465 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8466 |
|
8467 |
+
PlacementAbsolute.prototype.setDeviceBasedAlign = function () {
|
8468 |
+
var mode = this.layer.getMode();
|
8469 |
+
if (typeof this.layer.deviceProperty[mode]['align'] == 'undefined') {
|
8470 |
+
this.layer.setProperty('align', this.layer.getProperty('align'), 'layer');
|
8471 |
+
}
|
8472 |
+
if (typeof this.layer.deviceProperty[mode]['valign'] == 'undefined') {
|
8473 |
+
this.layer.setProperty('valign', this.layer.getProperty('valign'), 'layer');
|
8474 |
}
|
|
|
8475 |
};
|
8476 |
+
//</editor-fold
|
8477 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8478 |
|
8479 |
+
PlacementAbsolute.prototype.setPropertyresponsiveposition =
|
8480 |
+
PlacementAbsolute.prototype.setPropertyresponsivesize = function (name, value, from) {
|
8481 |
+
this.layer._setProperty(name, parseInt(value), from);
|
8482 |
+
}
|
8483 |
|
|
|
8484 |
|
8485 |
+
PlacementAbsolute.prototype.setPropertywidth =
|
8486 |
+
PlacementAbsolute.prototype.setPropertyheight = function (name, value, from) {
|
8487 |
+
var v = value;
|
8488 |
+
if (!this.layer.isDimensionPropertyAccepted(value)) {
|
8489 |
+
v = ~~value;
|
8490 |
+
if (v != value) {
|
8491 |
+
this.layer.$.trigger('propertyChanged', [name, v]);
|
8492 |
+
}
|
8493 |
}
|
8494 |
+
setTimeout($.proxy(function () {
|
8495 |
+
this.onResize(false);
|
8496 |
+
}, this), 50);
|
|
|
8497 |
|
8498 |
+
this.layer._setProperty(name, v, from);
|
|
|
|
|
8499 |
}
|
|
|
|
|
|
|
|
|
|
|
8500 |
|
8501 |
+
PlacementAbsolute.prototype.setPropertyleft =
|
8502 |
+
PlacementAbsolute.prototype.setPropertytop = function (name, value, from) {
|
8503 |
+
var v = ~~value;
|
8504 |
+
if (v != value) {
|
8505 |
+
this.layer.$.trigger('propertyChanged', [name, v]);
|
8506 |
+
}
|
8507 |
+
this.layer._setProperty(name, v, from);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8508 |
}
|
|
|
8509 |
|
8510 |
+
PlacementAbsolute.prototype.render = function (name) {
|
8511 |
+
this['_sync' + name]();
|
8512 |
+
};
|
8513 |
|
8514 |
+
PlacementAbsolute.prototype.renderWithModifier = function (name, value, modifier) {
|
8515 |
+
try {
|
8516 |
+
if ((name == 'width' || name == 'height') && this.layer.isDimensionPropertyAccepted(value)) {
|
8517 |
+
this['_sync' + name](value);
|
8518 |
+
} else {
|
8519 |
+
this['_sync' + name](Math.round(value * modifier));
|
8520 |
+
}
|
8521 |
+
} catch (e) {
|
8522 |
+
console.error('_sync' + name);
|
8523 |
+
}
|
8524 |
+
};
|
8525 |
+
|
8526 |
+
PlacementAbsolute.prototype.onResize = function (isForced) {
|
8527 |
+
this.resize({
|
8528 |
+
slideW: this.canvasManager.getResponsiveRatio('h'),
|
8529 |
+
slideH: this.canvasManager.getResponsiveRatio('v')
|
8530 |
+
}, isForced);
|
8531 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8532 |
|
8533 |
+
PlacementAbsolute.prototype.resize = function (ratios, isForced) {
|
8534 |
+
|
8535 |
+
if (!this.parent || isForced) {
|
8536 |
+
//this.doThrottledTheResize(ratios, false);
|
8537 |
+
this.addToResizeCollection(this, ratios, false);
|
8538 |
+
}
|
8539 |
};
|
8540 |
|
8541 |
+
PlacementAbsolute.prototype.addToResizeCollection = function (layer, ratios, isThrottled) {
|
8542 |
+
resizeCollection.ratios = ratios;
|
8543 |
+
resizeCollection.isThrottled = isThrottled;
|
8544 |
+
for (var i = 0; i < resizeCollection.layers.length; i++) {
|
8545 |
+
if (resizeCollection.layers[i] == this) {
|
8546 |
+
resizeCollection.layers.splice(i, 1);
|
8547 |
+
break;
|
8548 |
+
}
|
8549 |
+
}
|
8550 |
+
resizeCollection.layers.push(layer);
|
8551 |
|
8552 |
+
requestRender();
|
8553 |
+
this.triggerLayerResized(isThrottled, ratios);
|
8554 |
+
};
|
8555 |
|
8556 |
+
PlacementAbsolute.prototype._syncresponsiveposition = function () {
|
8557 |
+
this.onResize(false);
|
8558 |
};
|
8559 |
|
8560 |
+
PlacementAbsolute.prototype._syncwidth = function () {
|
8561 |
+
var value = this.layer.getProperty('width');
|
8562 |
+
|
8563 |
+
if (!this.layer.isDimensionPropertyAccepted(value)) {
|
8564 |
+
if (parseInt(this.layer.getProperty('responsivesize'))) {
|
8565 |
+
var ratio = this.canvasManager.getResponsiveRatio('h');
|
8566 |
+
value = (value * ratio);
|
8567 |
+
}
|
8568 |
+
value += 'px';
|
8569 |
+
}
|
8570 |
+
|
8571 |
+
this.$layer.css('width', value);
|
8572 |
};
|
8573 |
|
8574 |
+
PlacementAbsolute.prototype._syncheight = function () {
|
8575 |
+
var value = this.layer.getProperty('height');
|
8576 |
+
if (!this.layer.isDimensionPropertyAccepted(value)) {
|
8577 |
+
if (parseInt(this.layer.getProperty('responsivesize'))) {
|
8578 |
+
var ratio = this.canvasManager.getResponsiveRatio('v');
|
8579 |
+
value = (value * ratio);
|
8580 |
+
}
|
8581 |
+
value += 'px';
|
8582 |
+
}
|
8583 |
+
|
8584 |
+
this.$layer.css('height', value);
|
8585 |
+
};
|
8586 |
|
8587 |
+
PlacementAbsolute.prototype._syncparentalign = function () {
|
8588 |
+
var value = this.layer.getProperty('parentalign');
|
8589 |
+
this.$layer.data('parentalign', value);
|
8590 |
+
var parent = this.getParent();
|
8591 |
+
if (parent) {
|
8592 |
+
parent.placement.current.onResize(false);
|
8593 |
+
}
|
8594 |
+
};
|
8595 |
|
8596 |
+
PlacementAbsolute.prototype._syncparentvalign = function () {
|
8597 |
+
var value = this.layer.getProperty('parentvalign');
|
8598 |
+
this.$layer.data('parentvalign', value);
|
8599 |
+
var parent = this.getParent();
|
8600 |
+
if (parent) {
|
8601 |
+
parent.placement.current.onResize(false);
|
8602 |
}
|
8603 |
+
};
|
8604 |
|
|
|
8605 |
|
8606 |
+
PlacementAbsolute.prototype._syncleft = function () {
|
8607 |
+
var value = this.layer.getProperty('left');
|
8608 |
+
|
8609 |
+
if (parseInt(this.layer.getProperty('responsiveposition'))) {
|
8610 |
+
var ratio = this.canvasManager.getResponsiveRatio('h');
|
8611 |
+
value = (value * ratio);
|
8612 |
+
}
|
8613 |
|
8614 |
+
if (!this.parent || !this.parentIsVisible) {
|
8615 |
+
switch (this.layer.getProperty('align')) {
|
8616 |
+
case 'right':
|
8617 |
+
this.$layer.css({
|
8618 |
+
left: 'auto',
|
8619 |
+
right: -value + 'px'
|
8620 |
+
});
|
8621 |
+
break;
|
8622 |
+
case 'center':
|
8623 |
+
this.$layer.css({
|
8624 |
+
left: (this.$layer.parent().width() / 2 + value - this.$layer.width() / 2) + 'px',
|
8625 |
+
right: 'auto'
|
8626 |
+
});
|
8627 |
+
break;
|
8628 |
+
default:
|
8629 |
+
this.$layer.css({
|
8630 |
+
left: value + 'px',
|
8631 |
+
right: 'auto'
|
8632 |
+
});
|
8633 |
+
}
|
8634 |
+
} else {
|
8635 |
+
var position = this.parent.position(),
|
8636 |
+
align = this.layer.getProperty('align'),
|
8637 |
+
parentAlign = this.layer.getProperty('parentalign'),
|
8638 |
+
left = 0;
|
8639 |
+
switch (parentAlign) {
|
8640 |
+
case 'right':
|
8641 |
+
left = position.left + this.parent.width();
|
8642 |
+
break;
|
8643 |
+
case 'center':
|
8644 |
+
left = position.left + this.parent.width() / 2;
|
8645 |
+
break;
|
8646 |
+
default:
|
8647 |
+
left = position.left;
|
8648 |
}
|
8649 |
|
8650 |
+
switch (align) {
|
8651 |
+
case 'right':
|
8652 |
+
this.$layer.css({
|
8653 |
+
left: 'auto',
|
8654 |
+
right: (this.$layer.parent().width() - left - value) + 'px'
|
8655 |
+
});
|
8656 |
+
break;
|
8657 |
+
case 'center':
|
8658 |
+
this.$layer.css({
|
8659 |
+
left: (left + value - this.$layer.width() / 2) + 'px',
|
8660 |
+
right: 'auto'
|
8661 |
+
});
|
8662 |
+
break;
|
8663 |
+
default:
|
8664 |
+
this.$layer.css({
|
8665 |
+
left: (left + value) + 'px',
|
8666 |
+
right: 'auto'
|
8667 |
+
});
|
8668 |
}
|
8669 |
+
|
8670 |
}
|
8671 |
+
|
8672 |
+
this.triggerLayerResized();
|
8673 |
};
|
8674 |
|
8675 |
+
PlacementAbsolute.prototype._synctop = function () {
|
8676 |
+
var value = this.layer.getProperty('top');
|
8677 |
+
|
8678 |
+
if (parseInt(this.layer.getProperty('responsiveposition'))) {
|
8679 |
+
var ratio = this.canvasManager.getResponsiveRatio('v');
|
8680 |
+
value = (value * ratio);
|
8681 |
+
}
|
8682 |
+
|
8683 |
+
if (!this.parent || !this.parentIsVisible) {
|
8684 |
+
switch (this.layer.getProperty('valign')) {
|
8685 |
+
case 'bottom':
|
8686 |
+
this.$layer.css({
|
8687 |
+
top: 'auto',
|
8688 |
+
bottom: -value + 'px'
|
8689 |
+
});
|
8690 |
+
break;
|
8691 |
+
case 'middle':
|
8692 |
+
this.$layer.css({
|
8693 |
+
top: (this.$layer.parent().height() / 2 + value - this.$layer.height() / 2) + 'px',
|
8694 |
+
bottom: 'auto'
|
8695 |
+
});
|
8696 |
+
break;
|
8697 |
+
default:
|
8698 |
+
this.$layer.css({
|
8699 |
+
top: value + 'px',
|
8700 |
+
bottom: 'auto'
|
8701 |
+
});
|
8702 |
+
}
|
8703 |
+
} else {
|
8704 |
+
var position = this.parent.position(),
|
8705 |
+
valign = this.layer.getProperty('valign'),
|
8706 |
+
parentVAlign = this.layer.getProperty('parentvalign'),
|
8707 |
+
top = 0;
|
8708 |
+
switch (parentVAlign) {
|
8709 |
+
case 'bottom':
|
8710 |
+
top = position.top + this.parent.height();
|
8711 |
+
break;
|
8712 |
+
case 'middle':
|
8713 |
+
top = position.top + this.parent.height() / 2;
|
8714 |
+
break;
|
8715 |
+
default:
|
8716 |
+
top = position.top;
|
8717 |
+
}
|
8718 |
+
|
8719 |
+
switch (valign) {
|
8720 |
+
case 'bottom':
|
8721 |
+
this.$layer.css({
|
8722 |
+
top: 'auto',
|
8723 |
+
bottom: (this.$layer.parent().height() - top - value) + 'px'
|
8724 |
+
});
|
8725 |
+
break;
|
8726 |
+
case 'middle':
|
8727 |
+
this.$layer.css({
|
8728 |
+
top: (top + value - this.$layer.height() / 2) + 'px',
|
8729 |
+
bottom: 'auto'
|
8730 |
+
});
|
8731 |
+
break;
|
8732 |
+
default:
|
8733 |
+
this.$layer.css({
|
8734 |
+
top: (top + value) + 'px',
|
8735 |
+
bottom: 'auto'
|
8736 |
+
});
|
8737 |
+
}
|
8738 |
+
}
|
8739 |
+
|
8740 |
+
this.triggerLayerResized();
|
8741 |
};
|
8742 |
|
8743 |
+
PlacementAbsolute.prototype._syncresponsivesize = function () {
|
8744 |
+
this.onResize(false);
|
8745 |
+
};
|
8746 |
+
|
8747 |
+
PlacementAbsolute.prototype.historyStoreDoubleProp = function (data, mode, prop, prop2) {
|
8748 |
+
var currentMode = this.layer.getMode();
|
8749 |
+
if (mode == currentMode) {
|
8750 |
+
this.layer._setProperty(prop, data.value, 'history');
|
8751 |
+
this.layer._setProperty(prop2, data.value2, 'history');
|
8752 |
+
} else {
|
8753 |
+
this.layer.deviceProperty[mode][prop] = data.value;
|
8754 |
+
this.layer.deviceProperty[mode][prop2] = data.value2;
|
8755 |
+
this.layer.$.trigger('propertyChanged', [prop, this.layer.getProperty(prop)]);
|
8756 |
+
this.layer.$.trigger('propertyChanged', [prop2, this.layer.getProperty(prop2)]);
|
8757 |
+
this.layer.render(prop, null, 'history');
|
8758 |
+
this.layer.render(prop2, null, 'history');
|
8759 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8760 |
}
|
8761 |
|
8762 |
+
PlacementAbsolute.prototype.setPropertyalign = function (name, value, from) {
|
8763 |
+
var oldValue = this.layer.getProperty(name),
|
8764 |
+
oldLeft = this.layer.getRawProperty('left');
|
8765 |
+
|
8766 |
+
smartSlider.history.off();
|
8767 |
+
this.layer._setProperty(name, value, from);
|
8768 |
+
smartSlider.history.on();
|
8769 |
+
|
8770 |
+
var task = smartSlider.history.addValue(this.layer, this.layer.historyStoreOnPlacement, ['historyStoreDoubleProp', this.layer.getMode(), 'align', 'left']);
|
8771 |
+
if (task) {
|
8772 |
+
task.setValues({
|
8773 |
+
value: oldValue,
|
8774 |
+
value2: oldLeft
|
8775 |
+
}, {
|
8776 |
+
value: value,
|
8777 |
+
value2: this.layer.getRawProperty('left')
|
8778 |
+
});
|
8779 |
+
}
|
8780 |
+
}
|
8781 |
+
|
8782 |
+
PlacementAbsolute.prototype.setPropertyvalign = function (name, value, from) {
|
8783 |
+
var oldValue = this.layer.getProperty(name),
|
8784 |
+
oldTop = this.layer.getRawProperty('top');
|
8785 |
+
|
8786 |
+
smartSlider.history.off();
|
8787 |
+
this.layer._setProperty(name, value, from);
|
8788 |
+
smartSlider.history.on();
|
8789 |
+
|
8790 |
+
var task = smartSlider.history.addValue(this.layer, this.layer.historyStoreOnPlacement, ['historyStoreDoubleProp', this.layer.getMode(), 'valign', 'top']);
|
8791 |
+
if (task) {
|
8792 |
+
task.setValues({
|
8793 |
+
value: oldValue,
|
8794 |
+
value2: oldTop
|
8795 |
+
}, {
|
8796 |
+
value: value,
|
8797 |
+
value2: this.layer.getRawProperty('top')
|
8798 |
+
});
|
8799 |
+
}
|
8800 |
+
}
|
8801 |
+
|
8802 |
+
PlacementAbsolute.prototype._syncalign = function (oldValue, from) {
|
8803 |
+
var value = this.layer.getProperty('align');
|
8804 |
+
this.$layer.attr('data-align', value);
|
8805 |
+
|
8806 |
+
if (from != 'history' && value != oldValue) {
|
8807 |
+
this.setPositionLeft(this.$layer.position().left);
|
8808 |
+
}
|
8809 |
};
|
8810 |
+
PlacementAbsolute.prototype._syncvalign = function (oldValue, from) {
|
8811 |
+
var value = this.layer.getProperty('valign');
|
8812 |
+
this.$layer.attr('data-valign', value);
|
8813 |
|
8814 |
+
if (from != 'history' && value != oldValue) {
|
8815 |
+
this.setPositionTop(this.$layer.position().top);
|
8816 |
+
}
|
8817 |
+
};
|
8818 |
|
8819 |
+
PlacementAbsolute.prototype.fit = function () {
|
8820 |
+
var layer = this.$layer.get(0);
|
8821 |
+
|
8822 |
+
var position = this.$layer.position();
|
8823 |
+
|
8824 |
+
if (layer.scrollWidth > 0 && layer.scrollHeight > 0) {
|
8825 |
+
var resized = false;
|
8826 |
+
if (this.layer.item) {
|
8827 |
+
resized = this.layer.item.fitLayer();
|
8828 |
+
}
|
8829 |
+
if (!resized) {
|
8830 |
+
this.layer.setProperty('width', 'auto', 'layer');
|
8831 |
+
this.layer.setProperty('height', 'auto', 'layer');
|
8832 |
+
|
8833 |
+
var layerWidth = this.$layer.width();
|
8834 |
+
if (Math.abs(this.canvasManager.mainContainer.layer.width() - this.$layer.position().left - layerWidth) < 2) {
|
8835 |
+
this.layer.setProperty('width', layerWidth, 'layer');
|
8836 |
+
}
|
8837 |
}
|
8838 |
}
|
|
|
8839 |
};
|
8840 |
|
8841 |
+
PlacementAbsolute.prototype.hide = function (targetMode) {
|
8842 |
+
this.layer.store((targetMode ? targetMode : this.layer.getMode()), 0, true);
|
8843 |
+
};
|
8844 |
|
8845 |
+
PlacementAbsolute.prototype.show = function (targetMode) {
|
8846 |
+
this.layer.store((targetMode ? targetMode : this.layer.getMode()), 1, true);
|
8847 |
+
};
|
8848 |
+
|
8849 |
+
|
8850 |
+
PlacementAbsolute.prototype.changeStatus = function (oldStatus, newStatus) {
|
8851 |
+
|
8852 |
+
if (oldStatus == scope.ComponentAbstract.STATUS.LOCKED) {
|
8853 |
+
this.layer.nextendResizable("enable");
|
|
|
|
|
|
|
8854 |
}
|
8855 |
|
8856 |
+
|
8857 |
+
if (newStatus == scope.ComponentAbstract.STATUS.LOCKED) {
|
8858 |
+
this.$layer.nextendResizable("disable");
|
8859 |
+
}
|
8860 |
+
}
|
8861 |
+
|
8862 |
+
PlacementAbsolute.prototype.getParent = function () {
|
8863 |
+
return $('#' + this.layer.getProperty('parentid')).data('layerObject');
|
8864 |
+
};
|
8865 |
+
|
8866 |
+
PlacementAbsolute.prototype.subscribeParent = function () {
|
8867 |
+
var that = this;
|
8868 |
+
this.subscribeParentCallbacks = {
|
8869 |
+
LayerResized: function () {
|
8870 |
+
that.resizeParent.apply(that, arguments);
|
8871 |
+
},
|
8872 |
+
LayerParent: function () {
|
8873 |
+
that.$layer.addClass('n2-ss-layer-parent');
|
8874 |
+
that.$layer.triggerHandler('LayerParent');
|
8875 |
+
},
|
8876 |
+
LayerUnParent: function () {
|
8877 |
+
that.$layer.removeClass('n2-ss-layer-parent');
|
8878 |
+
that.$layer.triggerHandler('LayerUnParent');
|
8879 |
+
},
|
8880 |
+
LayerDeleted: function (e) {
|
8881 |
+
|
8882 |
+
that.layer.setProperty('parentid', '', 'layer');
|
8883 |
+
},
|
8884 |
+
LayerUnavailable: function (e) {
|
8885 |
+
|
8886 |
+
that.layer.setProperty('parentid', '', 'layer');
|
8887 |
+
that.layer.setProperty('left', 0, 'layer');
|
8888 |
+
that.layer.setProperty('top', 0, 'layer');
|
8889 |
+
},
|
8890 |
+
LayerShowChange: function (e, mode, value) {
|
8891 |
+
if (that.layer.getMode() == mode) {
|
8892 |
+
that.parentIsVisible = value;
|
8893 |
+
}
|
8894 |
+
},
|
8895 |
+
'n2-ss-activate': function () {
|
8896 |
+
that.$layerRow.addClass('n2-parent-active');
|
8897 |
+
},
|
8898 |
+
'n2-ss-deactivate': function () {
|
8899 |
+
that.$layerRow.removeClass('n2-parent-active');
|
8900 |
+
},
|
8901 |
+
'LayerGetDataWithChildren': function (e, layers) {
|
8902 |
+
that.layer.getDataWithChildren(layers);
|
8903 |
+
}
|
8904 |
+
};
|
8905 |
+
this.parent = $('#' + this.layer.property.parentid).on(this.subscribeParentCallbacks);
|
8906 |
+
this.parent.data('layerObject').placement.current.addChild(this);
|
8907 |
+
this.$layer.addClass('n2-ss-layer-has-parent');
|
8908 |
+
|
8909 |
+
};
|
8910 |
+
|
8911 |
+
PlacementAbsolute.prototype.unSubscribeParent = function (context) {
|
8912 |
+
this.$layerRow.removeClass('n2-parent-active');
|
8913 |
+
this.$layer.removeClass('n2-ss-layer-has-parent');
|
8914 |
+
if (this.parent) {
|
8915 |
+
this.parent.off(this.subscribeParentCallbacks);
|
8916 |
+
}
|
8917 |
+
this.parent = false;
|
8918 |
+
this.subscribeParentCallbacks = {};
|
8919 |
+
if (context != 'delete') {
|
8920 |
+
var position = this.$layer.position();
|
8921 |
+
this._setPosition(null, null, position.left, position.top, null, null, true);
|
8922 |
}
|
|
|
8923 |
|
8924 |
+
};
|
|
|
|
|
8925 |
|
8926 |
+
PlacementAbsolute.prototype.addChild = function (childPlacement) {
|
8927 |
+
this.children.push(childPlacement);
|
8928 |
+
}
|
|
|
8929 |
|
8930 |
+
PlacementAbsolute.prototype.removeChild = function (childPlacement) {
|
8931 |
+
this.children.splice($.inArray(childPlacement, this.children), 1);
|
|
|
8932 |
}
|
8933 |
|
8934 |
+
PlacementAbsolute.prototype.unlink = function (e) {
|
8935 |
+
if (e) e.preventDefault();
|
8936 |
+
this.layer.setProperty('parentid', '', 'layer');
|
8937 |
};
|
8938 |
|
8939 |
+
PlacementAbsolute.prototype.parentPicked = function (parentObject, parentAlign, parentValign, align, valign) {
|
8940 |
+
this.layer.setProperty('parentid', '', 'layer');
|
|
|
8941 |
|
8942 |
+
this.layer.setProperty('align', align, 'layer');
|
8943 |
+
this.layer.setProperty('valign', valign, 'layer');
|
8944 |
+
this.layer.setProperty('parentalign', parentAlign, 'layer');
|
8945 |
+
this.layer.setProperty('parentvalign', parentValign, 'layer');
|
8946 |
+
|
8947 |
+
this.layer.setProperty('parentid', parentObject.requestID(), 'layer');
|
8948 |
+
|
8949 |
+
var undef;
|
8950 |
+
for (var device in this.layer.deviceProperty) {
|
8951 |
+
if (device == 'desktopPortrait') continue;
|
8952 |
+
this.layer.deviceProperty[device].left = undef;
|
8953 |
+
this.layer.deviceProperty[device].top = undef;
|
8954 |
+
this.layer.deviceProperty[device].valign = undef;
|
8955 |
+
this.layer.deviceProperty[device].align = undef;
|
8956 |
}
|
|
|
8957 |
};
|
8958 |
|
8959 |
+
PlacementAbsolute.prototype._syncparentid = function () {
|
8960 |
+
var value = this.layer.getProperty('parentid');
|
8961 |
+
if (!value || value == '') {
|
8962 |
+
this.$layer.removeAttr('data-parentid');
|
8963 |
+
this.unSubscribeParent();
|
8964 |
+
} else {
|
8965 |
+
if ($('#' + value).length == 0) {
|
8966 |
+
this.layer.setProperty('parentid', '', 'layer');
|
8967 |
+
} else {
|
8968 |
+
this.$layer.attr('data-parentid', value).addClass('n2-ss-layer-has-parent');
|
8969 |
+
this.subscribeParent();
|
8970 |
+
var position = this.$layer.position();
|
8971 |
+
this._setPosition(null, null, position.left, position.top, null, null, true);
|
8972 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8973 |
}
|
8974 |
};
|
8975 |
|
8976 |
+
PlacementAbsolute.prototype.snap = function () {
|
8977 |
+
this.$layer.nextendResizable("option", "smartguides", $.proxy(function () {
|
8978 |
+
this.$layer.triggerHandler('LayerParent');
|
8979 |
+
return this.canvasManager.getSnap();
|
8980 |
+
}, this));
|
8981 |
+
};
|
8982 |
|
8983 |
+
PlacementAbsolute.prototype._renderModeProperties = function (isReset) {
|
|
|
|
|
8984 |
|
8985 |
+
this.$layer.attr('data-align', this.layer.property.align);
|
8986 |
+
this.$layer.attr('data-valign', this.layer.property.valign);
|
8987 |
+
if (isReset) {
|
8988 |
+
this.onResize(true);
|
8989 |
}
|
8990 |
};
|
8991 |
|
8992 |
+
PlacementAbsolute.prototype.doLinearResize = function (ratios) {
|
8993 |
+
this.doThrottledTheResize(ratios, true);
|
8994 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
8995 |
|
8996 |
+
PlacementAbsolute.prototype.doTheResize = function (ratios, isLinear, isThrottled) {
|
8997 |
|
8998 |
+
this.render('width');
|
8999 |
+
this.render('height');
|
9000 |
|
9001 |
+
this.render('left');
|
9002 |
+
this.render('top');
|
9003 |
|
9004 |
+
if (!isLinear) {
|
9005 |
+
this.triggerLayerResized(isThrottled, ratios);
|
9006 |
+
}
|
9007 |
+
};
|
9008 |
|
9009 |
+
PlacementAbsolute.prototype.resizeParent = function (e, ratios, isThrottled) {
|
9010 |
+
this.addToResizeCollection(this, ratios, isThrottled);
|
9011 |
+
};
|
9012 |
|
9013 |
+
PlacementAbsolute.prototype.updatePosition = function () {
|
9014 |
+
var parent = this.parent;
|
9015 |
|
9016 |
+
if (this.layer.getProperty('align') == 'center') {
|
9017 |
+
var left = 0;
|
9018 |
+
if (parent) {
|
9019 |
+
left = parent.position().left + parent.width() / 2;
|
9020 |
+
} else {
|
9021 |
+
left = this.$layer.parent().width() / 2;
|
9022 |
+
}
|
9023 |
+
var ratio = this.canvasManager.getResponsiveRatio('h');
|
9024 |
+
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
9025 |
+
ratio = 1;
|
9026 |
+
}
|
9027 |
+
this.$layer.css('left', (left - this.$layer.width() / 2 + this.layer.getProperty('left') * ratio));
|
9028 |
+
}
|
9029 |
|
9030 |
+
if (this.layer.getProperty('valign') == 'middle') {
|
9031 |
+
var top = 0;
|
9032 |
+
if (parent) {
|
9033 |
+
top = parent.position().top + parent.height() / 2;
|
9034 |
+
} else {
|
9035 |
+
top = this.$layer.parent().height() / 2;
|
9036 |
+
}
|
9037 |
+
var ratio = this.canvasManager.getResponsiveRatio('v');
|
9038 |
+
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
9039 |
+
ratio = 1;
|
9040 |
+
}
|
9041 |
+
this.$layer.css('top', (top - this.$layer.height() / 2 + this.layer.getProperty('top') * ratio));
|
9042 |
+
}
|
9043 |
+
this.triggerLayerResized();
|
9044 |
+
};
|
9045 |
|
9046 |
+
PlacementAbsolute.prototype.getIndex = function () {
|
9047 |
+
var index = parseInt(this.$layer.css('zIndex'));
|
9048 |
+
if (isNaN(index)) {
|
9049 |
+
index = 0;
|
9050 |
+
}
|
9051 |
+
return index;
|
9052 |
}
|
9053 |
|
9054 |
+
PlacementAbsolute.prototype.renderIndex = function (index) {
|
9055 |
+
//this.layer.layer.css('zIndex', index + 1);
|
9056 |
}
|
9057 |
|
9058 |
+
PlacementAbsolute.prototype.sync = function () {
|
9059 |
|
9060 |
+
this._syncalign(null, 'history');
|
9061 |
+
this._syncvalign(null, 'history');
|
9062 |
|
9063 |
+
this._syncwidth();
|
9064 |
+
this._syncheight();
|
9065 |
+
this._synctop();
|
9066 |
+
this._syncleft();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9067 |
|
9068 |
+
this._syncparentid();
|
9069 |
|
|
|
|
|
|
|
9070 |
}
|
9071 |
|
9072 |
+
PlacementAbsolute.prototype.delete = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9073 |
|
9074 |
+
var parentId = this.layer.getProperty('parentid');
|
9075 |
+
if (parentId) {
|
9076 |
+
this.unSubscribeParent('delete');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9077 |
}
|
|
|
9078 |
}
|
9079 |
|
9080 |
+
PlacementAbsolute.prototype.isParentOrChild = function () {
|
9081 |
+
return this.parent || this.children.length > 0;
|
|
|
9082 |
}
|
9083 |
|
9084 |
+
return PlacementAbsolute;
|
9085 |
+
});
|
9086 |
+
N2Require('PlacementContent', ['PlacementAbstract'], [], function ($, scope, undefined) {
|
9087 |
+
"use strict";
|
9088 |
|
9089 |
+
/**
|
9090 |
+
*
|
9091 |
+
* @alias scope.PlacementContent
|
9092 |
+
* @param placement
|
9093 |
+
* @param layer
|
9094 |
+
* @param canvasManager
|
9095 |
+
* @constructor
|
9096 |
+
*/
|
9097 |
+
function PlacementContent(placement, layer, canvasManager) {
|
9098 |
+
this.type = 'content';
|
9099 |
|
9100 |
+
scope.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
9101 |
+
}
|
|
|
|
|
9102 |
|
9103 |
+
PlacementContent.prototype = Object.create(scope.PlacementAbstract.prototype);
|
9104 |
+
PlacementContent.prototype.constructor = PlacementContent;
|
9105 |
|
9106 |
+
return PlacementContent;
|
9107 |
+
});
|
9108 |
+
N2Require('PlacementDefault', ['PlacementAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
9109 |
+
"use strict";
|
9110 |
|
9111 |
+
/**
|
9112 |
+
*
|
9113 |
+
* @alias scope.PlacementDefault
|
9114 |
+
* @param placement
|
9115 |
+
* @param layer
|
9116 |
+
* @param canvasManager
|
9117 |
+
* @constructor
|
9118 |
+
*/
|
9119 |
+
function PlacementDefault(placement, layer, canvasManager) {
|
9120 |
+
this.type = 'default';
|
9121 |
|
9122 |
+
scope.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9123 |
}
|
9124 |
|
9125 |
+
PlacementDefault.prototype = Object.create(scope.PlacementAbstract.prototype);
|
9126 |
+
PlacementDefault.prototype.constructor = PlacementDefault;
|
|
|
|
|
|
|
|
|
|
|
|
|
9127 |
|
9128 |
+
PlacementDefault.prototype.start = function () {
|
9129 |
+
this.$layer = this.layer.layer;
|
9130 |
+
}
|
|
|
|
|
9131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9132 |
|
9133 |
+
PlacementDefault.prototype.activated = function (properties) {
|
|
|
|
|
|
|
9134 |
|
9135 |
+
this.startUISizing();
|
9136 |
+
}
|
|
|
9137 |
|
9138 |
+
PlacementDefault.prototype.deActivated = function (newMode) {
|
9139 |
+
this.$layer.nextendNormalSizing('destroy');
|
9140 |
+
}
|
|
|
9141 |
|
9142 |
+
PlacementDefault.prototype.startUISizing = function () {
|
9143 |
+
var needSize = false;
|
9144 |
+
if (this.layer.item && this.layer.item.needSize) {
|
9145 |
+
needSize = true;
|
9146 |
}
|
9147 |
+
this.$layer.nextendNormalSizing({
|
9148 |
+
start: $.proxy(function (e, prop) {
|
9149 |
+
smartSlider.positionDisplay.show('NormalSizing');
|
9150 |
+
if (prop == 'maxwidth') {
|
9151 |
+
this.layer.layer.addClass('n2-ss-has-maxwidth');
|
9152 |
+
}
|
9153 |
+
}, this),
|
9154 |
+
resizeMaxWidth: $.proxy(function (e, ui) {
|
9155 |
|
9156 |
+
smartSlider.positionDisplay.update(e, 'NormalSizing', 'Max-width: ' + (ui.value == 0 ? 'none' : (ui.value + 'px')));
|
9157 |
|
9158 |
+
}, this),
|
9159 |
+
stopMaxWidth: $.proxy(function (e, ui) {
|
9160 |
+
smartSlider.positionDisplay.hide('NormalSizing');
|
9161 |
+
this.layer.setProperty('maxwidth', ui.value);
|
9162 |
+
}, this)
|
9163 |
+
});
|
9164 |
}
|
9165 |
|
9166 |
+
return PlacementDefault;
|
9167 |
+
});
|
9168 |
+
N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
9169 |
+
"use strict";
|
|
|
|
|
|
|
|
|
9170 |
|
9171 |
+
/**
|
9172 |
+
*
|
9173 |
+
* @alias scope.PlacementNormal
|
9174 |
+
* @param placement
|
9175 |
+
* @param layer
|
9176 |
+
* @param canvasManager
|
9177 |
+
* @constructor
|
9178 |
+
*/
|
9179 |
+
function PlacementNormal(placement, layer, canvasManager) {
|
9180 |
+
this.type = 'normal';
|
9181 |
|
9182 |
+
this.transferredProperties = {};
|
9183 |
|
9184 |
+
scope.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
9185 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9186 |
|
9187 |
+
PlacementNormal.prototype = Object.create(scope.PlacementAbstract.prototype);
|
9188 |
+
PlacementNormal.prototype.constructor = PlacementNormal;
|
9189 |
|
9190 |
+
PlacementNormal.prototype.start = function () {
|
9191 |
+
this.$layer = this.layer.layer;
|
9192 |
+
}
|
9193 |
|
9194 |
+
PlacementNormal.prototype.preActivation = function (lastPlacement) {
|
9195 |
+
if (lastPlacement.type == 'absolute' && this.layer.item && this.layer.item.needSize) {
|
9196 |
+
var height = this.layer.getProperty('height');
|
9197 |
+
if (height.match && height.match(/[0-9]+%$/)) {
|
9198 |
+
this.transferredProperties.height = Math.max(100, parseInt(this.$layer.parent().height() * parseInt(height) / 100));
|
9199 |
+
} else if (height > 0) {
|
9200 |
+
this.transferredProperties.height = height;
|
9201 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9202 |
}
|
9203 |
+
}
|
9204 |
|
9205 |
+
PlacementNormal.prototype.activated = function (properties) {
|
9206 |
+
this.loadProperties($.extend(properties, this.transferredProperties));
|
9207 |
+
this.transferredProperties = {};
|
9208 |
|
9209 |
+
this.layer.$.on('baseSizeUpdated.placementnormal', $.proxy(this._syncmargin, this));
|
9210 |
+
this.layer.$.on('baseSizeUpdated.placementnormal', $.proxy(this._syncheight, this));
|
|
|
|
|
9211 |
|
9212 |
+
this.startUISpacing();
|
|
|
|
|
9213 |
|
9214 |
+
this.startUISizing();
|
|
|
|
|
9215 |
|
9216 |
+
this.$layer.on({
|
9217 |
+
mousedown: $.proxy(function (e) {
|
9218 |
+
e.stopPropagation();
|
9219 |
+
})
|
9220 |
+
});
|
9221 |
+
}
|
9222 |
|
9223 |
+
PlacementNormal.prototype.loadProperties = function (options) {
|
9224 |
+
this.layer.createDeviceProperty('margin', {desktopPortrait: '0|*|0|*|0|*|0|*|px+'}, this.layer.layer, this);
|
9225 |
+
this.layer.createDeviceProperty('height', {desktopPortrait: (options.height || 0)}, this.layer.layer, this);
|
9226 |
+
this.layer.createDeviceProperty('maxwidth', {desktopPortrait: 0}, this.layer.layer, this);
|
9227 |
+
this.layer.createDeviceProperty('selfalign', {desktopPortrait: 'inherit'}, this.layer.layer, this);
|
9228 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9229 |
|
9230 |
+
PlacementNormal.prototype.deActivated = function (newMode) {
|
9231 |
+
this.layer.$.off('.placementnormal');
|
9232 |
+
this.$layer.nextendSpacing('destroy');
|
9233 |
+
this.$layer.nextendNormalSizing('destroy');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9234 |
|
9235 |
+
this.layer.layer.removeClass('n2-ss-has-maxwidth');
|
9236 |
+
this.layer.layer.removeAttr('data-cssselfalign');
|
9237 |
|
9238 |
+
var historicalData = this.layer.getPropertiesData(['margin', 'height']);
|
9239 |
+
this.layer.removeProperty('margin');
|
9240 |
+
this.layer.removeProperty('height');
|
9241 |
+
this.layer.removeProperty('maxwidth');
|
9242 |
+
this.layer.removeProperty('selfalign');
|
9243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9244 |
|
9245 |
+
this.layer.layer.css({
|
9246 |
+
position: '',
|
9247 |
+
margin: '',
|
9248 |
+
height: '',
|
9249 |
+
maxWidth: ''
|
9250 |
+
});
|
9251 |
+
return historicalData;
|
9252 |
+
}
|
9253 |
|
9254 |
+
PlacementNormal.prototype._renderModeProperties = function (isReset) {
|
|
|
9255 |
|
9256 |
+
this._syncmargin();
|
9257 |
+
this._syncheight();
|
9258 |
+
this._syncmaxwidth();
|
9259 |
+
this._syncselfalign();
|
9260 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9261 |
|
9262 |
+
PlacementNormal.prototype._syncmargin = function () {
|
9263 |
+
var margin = this.layer.getProperty('margin').split('|*|'),
|
9264 |
+
unit = margin.pop(),
|
9265 |
+
baseSize = this.layer.baseSize;
|
|
|
|
|
9266 |
|
9267 |
+
if (unit == 'px+' && baseSize > 0) {
|
9268 |
+
unit = 'em';
|
9269 |
+
for (var i = 0; i < margin.length; i++) {
|
9270 |
+
margin[i] = parseInt(margin[i]) / baseSize;
|
|
|
9271 |
}
|
9272 |
}
|
|
|
9273 |
|
9274 |
+
var margin = margin.join(unit + ' ') + unit;
|
9275 |
+
this.layer.layer.css('margin', margin);
|
9276 |
+
this.layer.update();
|
9277 |
|
9278 |
+
this.$layer.nextendSpacing('option', 'current', margin);
|
9279 |
+
};
|
|
|
|
|
|
|
|
|
9280 |
|
9281 |
+
PlacementNormal.prototype.startUISpacing = function () {
|
9282 |
+
this.$layer.nextendSpacing({
|
9283 |
+
mode: 'margin',
|
9284 |
+
sync: {
|
9285 |
+
n: 'margin-top',
|
9286 |
+
e: 'margin-right',
|
9287 |
+
s: 'margin-bottom',
|
9288 |
+
w: 'margin-left',
|
9289 |
+
},
|
9290 |
+
handles: 'n, s, e, w',
|
9291 |
+
start: $.proxy(function (e, ui) {
|
9292 |
+
smartSlider.positionDisplay.show('Spacing');
|
9293 |
+
}, this),
|
9294 |
+
spacing: $.proxy(function (e, ui) {
|
9295 |
+
var html = '';
|
9296 |
+
for (var k in ui.changed) {
|
9297 |
+
html += 'Margin ' + k + ': ' + ui.changed[k] + 'px<br>';
|
9298 |
+
}
|
9299 |
+
|
9300 |
+
smartSlider.positionDisplay.update(e, 'Spacing', html);
|
9301 |
+
}, this),
|
9302 |
+
stop: $.proxy(this.onSpacingStop, this),
|
9303 |
+
});
|
9304 |
+
};
|
9305 |
|
9306 |
+
PlacementNormal.prototype.onSpacingStop = function (event, ui) {
|
9307 |
+
smartSlider.positionDisplay.hide('Spacing');
|
9308 |
+
var margin = this.layer.getProperty('margin').split('|*|'),
|
9309 |
+
ratioH = 1,
|
9310 |
+
ratioV = 1;
|
9311 |
+
if (margin[margin.length - 1] == 'px+' && Math.abs(parseFloat(this.$layer.css('fontSize')) - this.layer.baseSize) > 1) {
|
9312 |
+
ratioH = this.canvasManager.getResponsiveRatio('h');
|
9313 |
+
ratioV = this.canvasManager.getResponsiveRatio('v');
|
9314 |
}
|
9315 |
|
9316 |
+
for (var k in ui.changed) {
|
9317 |
+
var value = ui.changed[k];
|
9318 |
+
switch (k) {
|
9319 |
+
case 'top':
|
9320 |
+
margin[0] = Math.round(value / ratioV);
|
9321 |
+
break;
|
9322 |
+
case 'right':
|
9323 |
+
margin[1] = Math.round(value / ratioH);
|
9324 |
+
break;
|
9325 |
+
case 'bottom':
|
9326 |
+
margin[2] = Math.round(value / ratioV);
|
9327 |
+
break;
|
9328 |
+
case 'left':
|
9329 |
+
margin[3] = Math.round(value / ratioH);
|
9330 |
+
break;
|
9331 |
+
}
|
9332 |
}
|
9333 |
+
this.layer.setProperty('margin', margin.join('|*|'));
|
9334 |
+
$('#layernormal-margin').data('field').insideChange(margin.join('|*|'));
|
9335 |
+
};
|
9336 |
|
9337 |
+
PlacementNormal.prototype.startUISizing = function () {
|
9338 |
+
var needSize = false;
|
9339 |
+
if (this.layer.item && this.layer.item.needSize) {
|
9340 |
+
needSize = true;
|
9341 |
}
|
9342 |
+
this.$layer.nextendNormalSizing({
|
9343 |
+
height: needSize,
|
9344 |
+
syncWidth: true,
|
9345 |
+
start: $.proxy(function (e, prop) {
|
9346 |
+
smartSlider.positionDisplay.show('NormalSizing');
|
9347 |
+
if (prop == 'maxwidth') {
|
9348 |
+
this.layer.layer.addClass('n2-ss-has-maxwidth');
|
9349 |
+
}
|
9350 |
+
}, this),
|
9351 |
+
resizeMaxWidth: $.proxy(function (e, ui) {
|
9352 |
+
smartSlider.positionDisplay.update(e, 'NormalSizing', 'Max-width: ' + (ui.value == 0 ? 'none' : (ui.value + 'px')));
|
9353 |
|
9354 |
+
}, this),
|
9355 |
+
stopMaxWidth: $.proxy(function (e, ui) {
|
9356 |
+
smartSlider.positionDisplay.hide('NormalSizing');
|
9357 |
+
this.layer.setProperty('maxwidth', ui.value);
|
9358 |
+
}, this),
|
9359 |
+
resizeHeight: $.proxy(function (e, ui) {
|
9360 |
+
smartSlider.positionDisplay.update(e, 'NormalSizing', 'Height: ' + ui.value + 'px');
|
9361 |
|
9362 |
+
}, this),
|
9363 |
+
stopHeight: $.proxy(function (e, ui) {
|
9364 |
+
smartSlider.positionDisplay.hide('NormalSizing');
|
9365 |
+
var ratio = 1;
|
9366 |
+
if (parseInt(this.$layer.css('fontSize')) != this.layer.baseSize) {
|
9367 |
+
ratio = this.canvasManager.getResponsiveRatio('h');
|
9368 |
+
}
|
9369 |
+
var value = Math.round(value / ratio);
|
9370 |
|
9371 |
+
this.layer.setProperty('height', ui.value);
|
9372 |
+
}, this)
|
9373 |
+
});
|
9374 |
+
}
|
9375 |
|
9376 |
+
PlacementNormal.prototype._syncheight = function () {
|
9377 |
+
var height = parseInt(this.layer.getProperty('height'));
|
|
|
9378 |
|
9379 |
+
if (height > 0) {
|
9380 |
+
var unit = 'px',
|
9381 |
+
baseSize = this.layer.baseSize;
|
9382 |
+
if (baseSize > 0) {
|
9383 |
+
unit = 'em';
|
9384 |
+
height = parseInt(height) / baseSize;
|
9385 |
+
}
|
9386 |
|
9387 |
+
this.layer.layer.css('height', height + unit);
|
9388 |
+
} else {
|
|
|
9389 |
|
9390 |
+
this.layer.layer.css('height', '');
|
|
|
9391 |
}
|
9392 |
|
9393 |
+
this.layer.update();
|
9394 |
+
};
|
|
|
9395 |
|
9396 |
+
PlacementNormal.prototype._syncmaxwidth = function () {
|
9397 |
+
var value = parseInt(this.layer.getProperty('maxwidth'));
|
9398 |
+
if (value <= 0 || isNaN(value)) {
|
9399 |
+
this.layer.layer.css('maxWidth', '')
|
9400 |
+
.removeClass('n2-ss-has-maxwidth');
|
9401 |
+
} else {
|
9402 |
+
this.layer.layer.css('maxWidth', value + 'px')
|
9403 |
+
.addClass('n2-ss-has-maxwidth');
|
9404 |
}
|
|
|
|
|
9405 |
|
9406 |
+
this.layer.update();
|
9407 |
+
};
|
9408 |
|
9409 |
+
PlacementNormal.prototype._syncselfalign = function () {
|
9410 |
+
this.layer.layer.attr('data-cssselfalign', this.layer.getProperty('selfalign'));
|
9411 |
+
}
|
|
|
9412 |
|
9413 |
+
PlacementNormal.prototype.sync = function () {
|
9414 |
+
this._syncmargin();
|
9415 |
+
this._syncheight();
|
9416 |
+
this._syncmaxwidth();
|
9417 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9418 |
|
9419 |
+
return PlacementNormal;
|
9420 |
+
});
|
9421 |
+
N2Require('Placement', [], [], function ($, scope, undefined) {
|
9422 |
+
"use strict";
|
9423 |
|
9424 |
+
/**
|
9425 |
+
* @alias scope.Placement
|
9426 |
+
* @param layer
|
9427 |
+
* @constructor
|
9428 |
+
*/
|
9429 |
+
function Placement(layer) {
|
9430 |
+
this.layer = layer;
|
9431 |
+
this.canvasManager = layer.canvasManager;
|
9432 |
+
this.modes = {};
|
9433 |
+
this.current = null;
|
9434 |
+
this.isTransferHandled = false;
|
9435 |
|
9436 |
+
this.updatePositionThrottled = NextendDeBounce(this.updatePosition, 200);
|
9437 |
+
}
|
9438 |
|
9439 |
+
Placement.prototype.allow = function (mode) {
|
9440 |
+
switch (mode) {
|
9441 |
+
case 'absolute':
|
9442 |
+
this.modes.absolute = new scope.PlacementAbsolute(this, this.layer, this.canvasManager);
|
9443 |
+
break;
|
9444 |
+
case 'normal':
|
9445 |
+
this.modes.normal = new scope.PlacementNormal(this, this.layer, this.canvasManager);
|
9446 |
+
break;
|
9447 |
+
case 'group':
|
9448 |
+
this.modes.absolute = new scope.PlacementGroup(this, this.layer, this.canvasManager);
|
9449 |
+
break;
|
9450 |
+
case 'content':
|
9451 |
+
this.modes.absolute = new scope.PlacementContent(this, this.layer, this.canvasManager);
|
9452 |
+
break;
|
9453 |
+
case 'default':
|
9454 |
+
this.modes['default'] = new scope.PlacementDefault(this, this.layer, this.canvasManager);
|
9455 |
+
break;
|
9456 |
}
|
9457 |
+
}
|
9458 |
|
9459 |
+
Placement.prototype.start = function () {
|
9460 |
+
for (var k in this.modes) {
|
9461 |
+
this.modes[k].start();
|
9462 |
}
|
9463 |
+
}
|
9464 |
|
9465 |
+
Placement.prototype.setMode = function (mode, properties) {
|
9466 |
+
var historicalData = false;
|
9467 |
+
properties = properties || {};
|
9468 |
+
if (typeof this.modes[mode] !== 'undefined') {
|
9469 |
+
if (this.current != this.modes[mode]) {
|
9470 |
+
var lastType;
|
9471 |
+
if (this.current) {
|
9472 |
|
9473 |
+
this.modes[mode].preActivation(this.current);
|
9474 |
+
lastType = this.current.type;
|
9475 |
+
historicalData = this.current.deActivated(this.modes[mode]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9476 |
}
|
9477 |
+
this.current = this.modes[mode];
|
|
|
|
|
9478 |
|
9479 |
+
this.layer.layer.attr('data-pm', this.current.type);
|
9480 |
+
this.current.activated(properties);
|
9481 |
|
9482 |
+
this.layer.$.triggerHandler('placementChanged', [this.current.type, lastType]);
|
9483 |
+
}
|
|
|
|
|
|
|
|
|
9484 |
} else {
|
9485 |
+
throw new Exception('Layer placement(' + mode + ') not allowed for the container', this.layer);
|
9486 |
}
|
9487 |
+
return historicalData;
|
9488 |
+
}
|
9489 |
|
9490 |
+
Placement.prototype.doAction = function (action) {
|
9491 |
+
try {
|
9492 |
+
return this.current[action].apply(this.current, Array.prototype.slice.call(arguments, 1));
|
9493 |
+
} catch (e) {
|
9494 |
|
9495 |
+
}
|
9496 |
+
}
|
9497 |
|
9498 |
+
Placement.prototype.getType = function () {
|
9499 |
+
return this.current.type;
|
9500 |
+
}
|
|
|
|
|
|
|
|
|
|
|
9501 |
|
9502 |
+
Placement.prototype.onResize = function (isForced) {
|
9503 |
+
if (typeof this.current.onResize == 'function') {
|
9504 |
+
this.current.onResize(isForced);
|
|
|
|
|
9505 |
}
|
9506 |
+
}
|
9507 |
|
9508 |
+
Placement.prototype.updatePosition = function () {
|
9509 |
+
this.current.updatePosition();
|
9510 |
+
}
|
|
|
|
|
|
|
|
|
9511 |
|
9512 |
+
Placement.prototype.getIndex = function () {
|
9513 |
+
return this.current.getIndex();
|
9514 |
+
}
|
9515 |
+
|
9516 |
+
Placement.prototype.renderIndex = function (index) {
|
9517 |
+
return this.current.renderIndex(index);
|
9518 |
+
}
|
9519 |
|
9520 |
+
Placement.prototype.doLinearResize = function (ratios) {
|
9521 |
+
this.current.doLinearResize(ratios);
|
9522 |
+
}
|
9523 |
+
|
9524 |
+
Placement.prototype.sync = function () {
|
9525 |
+
this.current.sync();
|
9526 |
+
}
|
9527 |
|
9528 |
+
Placement.prototype.renderModeProperties = function (isReset) {
|
|
|
9529 |
|
9530 |
+
var fontSize = this.layer.getProperty('fontsize');
|
9531 |
+
this.layer.adjustFontSize(this.layer.getProperty('adaptivefont'), fontSize, false);
|
9532 |
|
9533 |
+
this.current._renderModeProperties(isReset);
|
9534 |
+
}
|
9535 |
|
9536 |
+
Placement.prototype.delete = function () {
|
9537 |
+
this.current.delete();
|
9538 |
+
}
|
9539 |
|
9540 |
+
return Placement;
|
9541 |
+
});
|
9542 |
+
N2Require('PlacementAbstract', ['Placement'], [], function ($, scope, undefined) {
|
9543 |
+
"use strict";
|
9544 |
+
|
9545 |
+
/**
|
9546 |
+
* @alias scope.PlacementAbstract
|
9547 |
+
* @param placement
|
9548 |
+
* @param {ComponentAbstract} layer
|
9549 |
+
* @param canvasManager
|
9550 |
+
* @constructor
|
9551 |
+
*/
|
9552 |
+
function PlacementAbstract(placement, layer, canvasManager) {
|
9553 |
+
this.placement = placement;
|
9554 |
/**
|
9555 |
+
* @type {ComponentAbstract}
|
|
|
9556 |
*/
|
9557 |
+
this.layer = layer;
|
9558 |
+
this.canvasManager = canvasManager;
|
9559 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9560 |
|
9561 |
+
PlacementAbstract.prototype.start = function () {
|
|
|
|
|
9562 |
|
9563 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9564 |
|
9565 |
+
PlacementAbstract.prototype.preActivation = function (lastPlacement) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9566 |
|
9567 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9568 |
|
9569 |
+
PlacementAbstract.prototype.activated = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9570 |
|
9571 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9572 |
|
9573 |
+
PlacementAbstract.prototype.deActivated = function (newMode) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9574 |
|
9575 |
+
return false;
|
9576 |
+
}
|
9577 |
|
9578 |
+
PlacementAbstract.prototype.updatePosition = function () {
|
9579 |
+
this.layer.group.update();
|
9580 |
+
}
|
9581 |
|
9582 |
+
PlacementAbstract.prototype._renderModeProperties = function (isReset) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9583 |
|
9584 |
+
}
|
|
|
9585 |
|
9586 |
+
PlacementAbstract.prototype._hide = function () {
|
9587 |
};
|
9588 |
|
9589 |
+
PlacementAbstract.prototype._show = function () {
|
9590 |
+
}
|
9591 |
|
9592 |
+
PlacementAbstract.prototype.snap = function () {
|
9593 |
+
return false;
|
9594 |
+
}
|
9595 |
|
9596 |
+
PlacementAbstract.prototype.getIndex = function () {
|
9597 |
+
return this.layer.layer.index();
|
9598 |
+
}
|
9599 |
|
9600 |
+
PlacementAbstract.prototype.renderIndex = function (index) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9601 |
|
9602 |
+
}
|
|
|
|
|
|
|
9603 |
|
9604 |
+
PlacementAbstract.prototype.doLinearResize = function (ratios) {
|
|
|
|
|
|
|
|
|
9605 |
};
|
9606 |
|
9607 |
+
PlacementAbstract.prototype.sync = function () {
|
|
|
|
|
9608 |
|
|
|
|
|
9609 |
}
|
9610 |
|
9611 |
+
PlacementAbstract.prototype.delete = function () {
|
|
|
9612 |
}
|
9613 |
|
|
|
|
|
|
|
|
|
|
|
9614 |
|
9615 |
+
PlacementAbstract.prototype.triggerLayerResized = function (isThrottled, ratios) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9616 |
|
9617 |
+
}
|
|
|
|
|
|
|
9618 |
|
9619 |
+
PlacementAbstract.prototype.changeStatus = function (oldStatus, newStatus) {
|
|
|
|
|
9620 |
|
9621 |
+
}
|
|
|
|
|
|
|
|
|
9622 |
|
9623 |
+
return PlacementAbstract;
|
9624 |
+
});
|
9625 |
+
N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
9626 |
+
"use strict";
|
|
|
|
|
|
|
|
|
9627 |
|
9628 |
|
9629 |
+
function Item($item, layer, itemEditor) {
|
9630 |
+
|
9631 |
+
if (this.type === undefined) {
|
9632 |
+
this.type = $item.data('item');
|
9633 |
}
|
|
|
9634 |
|
9635 |
+
this.needSize = this.needSize || false;
|
|
|
|
|
|
|
|
|
9636 |
|
9637 |
+
this.self = this;
|
9638 |
+
this.$item = $item;
|
9639 |
+
this.layer = layer;
|
9640 |
+
this.itemEditor = itemEditor;
|
9641 |
|
9642 |
+
this.fonts = [];
|
9643 |
+
this.styles = [];
|
9644 |
|
9645 |
+
this.needFill = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9646 |
|
9647 |
+
this.values = this.$item.data('itemvalues');
|
9648 |
+
if (typeof this.values !== 'object') {
|
9649 |
+
this.values = $.parseJSON(this.values);
|
9650 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9651 |
|
9652 |
+
this.pre = 'div#' + nextend.smartSlider.frontend.sliderElement.attr('id') + ' ';
|
9653 |
+
this.defaultValues = itemEditor.getItemForm(this.type).values;
|
|
|
9654 |
|
9655 |
+
this.added();
|
9656 |
|
9657 |
+
this.$item.data('item', this);
|
9658 |
|
9659 |
+
this.$item.appendTo(this.layer.getContent());
|
|
|
|
|
9660 |
|
9661 |
+
this.layer.item = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9662 |
|
9663 |
+
if (this.$item.children().length === 0) {
|
9664 |
+
// It's create, so render the item
|
9665 |
+
this.layer.readyDeferred.done($.proxy(this.reRender, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9666 |
}
|
|
|
9667 |
|
|
|
|
|
|
|
9668 |
|
9669 |
+
$('<div/>')
|
9670 |
+
.addClass('ui-helper ui-item-overlay')
|
9671 |
+
.css('zIndex', 89)
|
9672 |
+
.appendTo(this.$item);
|
9673 |
|
9674 |
+
this.$item.find('a').on('click', function (e) {
|
9675 |
+
e.preventDefault();
|
9676 |
+
});
|
9677 |
+
|
9678 |
+
|
9679 |
+
$(window).trigger('ItemCreated');
|
9680 |
};
|
9681 |
|
9682 |
+
Item.prototype.setSelf = function (self) {
|
9683 |
+
if (this.self != this) {
|
9684 |
+
this.self.setSelf(self);
|
9685 |
+
}
|
9686 |
+
this.self = self;
|
9687 |
+
}
|
9688 |
|
9689 |
+
Item.prototype.getSelf = function () {
|
9690 |
+
if (this.self != this) {
|
9691 |
+
this.self = this.self.getSelf();
|
|
|
9692 |
}
|
9693 |
+
return this.self;
|
9694 |
+
}
|
9695 |
|
9696 |
+
Item.prototype.changeValue = function (property, value) {
|
9697 |
+
if (this == this.itemEditor.activeItem) {
|
9698 |
+
$('#item_' + this.type + property).data('field')
|
9699 |
+
.insideChange(value);
|
9700 |
+
} else {
|
9701 |
+
this.values[property] = value;
|
9702 |
}
|
9703 |
+
};
|
9704 |
|
9705 |
+
Item.prototype.activate = function (e, context, force) {
|
9706 |
+
if (this.itemEditor.setActiveItem(this, context, force)) {
|
9707 |
+
nextend.basicCSS.activate('ss3item' + this.type, this.values, {
|
9708 |
+
font: this.fonts,
|
9709 |
+
style: this.styles
|
9710 |
+
});
|
9711 |
+
this.itemEditor.lastValues[this.type] = this.values;
|
9712 |
}
|
9713 |
+
};
|
9714 |
+
|
9715 |
+
Item.prototype.deActivate = function () {
|
9716 |
+
nextend.basicCSS.deActivate();
|
9717 |
+
};
|
9718 |
|
9719 |
+
Item.prototype.render = function (data, originalData) {
|
9720 |
+
this.layer.layer.triggerHandler('itemRender');
|
9721 |
+
this.$item.html('')
|
9722 |
|
9723 |
+
this.parseAll(data);
|
9724 |
+
this._render(data);
|
|
|
|
|
|
|
9725 |
|
9726 |
+
// These will be available on the backend render
|
9727 |
+
this.itemEditor.lastValues[this.type] = this.values = originalData;
|
9728 |
|
9729 |
+
$('<div/>')
|
9730 |
+
.addClass('ui-helper ui-item-overlay')
|
9731 |
+
.css('zIndex', 89)
|
9732 |
+
.appendTo(this.$item);
|
9733 |
|
9734 |
+
var layerName = this.getName(data);
|
9735 |
+
if (layerName === false || layerName == '' || layerName == 'Layer') {
|
9736 |
+
layerName = this.type;
|
9737 |
+
} else {
|
9738 |
+
layerName = layerName.replace(/[<>]/gi, '');
|
9739 |
}
|
9740 |
+
this.layer.rename(layerName, false);
|
9741 |
|
9742 |
+
this.layer.update();
|
9743 |
|
9744 |
+
this.$item.find('a').on('click', function (e) {
|
9745 |
+
e.preventDefault();
|
9746 |
+
});
|
|
|
|
|
9747 |
};
|
9748 |
|
9749 |
+
Item.prototype._render = function (data) {
|
9750 |
+
};
|
|
|
|
|
|
|
9751 |
|
9752 |
+
Item.prototype.reRender = function (newData) {
|
|
|
|
|
|
|
|
|
|
|
9753 |
|
9754 |
+
this.values = $.extend({}, this.getDefault(), this.values, newData);
|
9755 |
|
9756 |
+
this.render($.extend({}, this.values), this.values);
|
9757 |
+
};
|
|
|
9758 |
|
9759 |
+
Item.prototype.delete = function () {
|
9760 |
+
this.$item.trigger('mouseleave');
|
9761 |
+
this.$item.remove();
|
9762 |
|
9763 |
+
if (this.itemEditor.activeItem == this) {
|
9764 |
+
this.itemEditor.activeItem = null;
|
|
|
9765 |
}
|
9766 |
+
};
|
|
|
9767 |
|
9768 |
+
Item.prototype.getHTML = function (base64) {
|
9769 |
+
var item = '';
|
9770 |
+
if (base64) {
|
9771 |
|
9772 |
+
item = '[' + this.type + ' values="' + Base64.encode(JSON.stringify(this.values)) + '"]';
|
|
|
|
|
9773 |
} else {
|
9774 |
+
item = $('<div class="n2-ss-item n2-ss-item-' + this.type + '"></div>')
|
9775 |
+
.attr('data-item', this.type)
|
9776 |
+
.attr('data-itemvalues', JSON.stringify(this.values));
|
9777 |
}
|
9778 |
+
return item;
|
9779 |
+
};
|
|
|
|
|
|
|
|
|
9780 |
|
9781 |
+
Item.prototype.getData = function () {
|
9782 |
+
return {
|
9783 |
+
type: this.type,
|
9784 |
+
values: this.values
|
9785 |
+
};
|
9786 |
};
|
9787 |
|
|
|
|
|
|
|
9788 |
|
9789 |
+
Item.prototype.getDefault = function () {
|
9790 |
+
return {};
|
9791 |
+
};
|
|
|
|
|
9792 |
|
9793 |
+
Item.prototype.added = function () {
|
|
|
|
|
|
|
|
|
9794 |
|
9795 |
+
};
|
|
|
|
|
|
|
9796 |
|
9797 |
+
Item.prototype.addedFont = function (mode, name) {
|
9798 |
+
var $input = $('#item_' + this.type + name);
|
9799 |
+
if ($input.length) {
|
9800 |
+
this.fonts.push({
|
9801 |
+
mode: mode,
|
9802 |
+
name: name,
|
9803 |
+
field: $input.data('field'),
|
9804 |
+
def: this.defaultValues[name]
|
9805 |
+
});
|
9806 |
+
$.when(nextend.fontManager.addVisualUsage(mode, this.values[name], this.pre))
|
9807 |
+
.done($.proxy(function (existsFont) {
|
9808 |
+
if (!existsFont) {
|
9809 |
+
this.changeValue(name, '');
|
9810 |
+
}
|
9811 |
+
}, this));
|
9812 |
}
|
9813 |
+
};
|
9814 |
|
9815 |
+
Item.prototype.addedStyle = function (mode, name) {
|
9816 |
+
var $input = $('#item_' + this.type + name);
|
9817 |
+
if ($input.length) {
|
9818 |
+
this.styles.push({
|
9819 |
+
mode: mode,
|
9820 |
+
name: name,
|
9821 |
+
field: $input.data('field'),
|
9822 |
+
def: this.defaultValues[name]
|
9823 |
+
});
|
9824 |
|
9825 |
+
$.when(nextend.styleManager.addVisualUsage(mode, this.values[name], this.pre))
|
9826 |
+
.done($.proxy(function (existsStyle) {
|
9827 |
+
if (!existsStyle) {
|
9828 |
+
this.changeValue(name, '');
|
9829 |
+
}
|
9830 |
+
}, this));
|
9831 |
}
|
9832 |
|
|
|
9833 |
};
|
9834 |
|
9835 |
+
Item.prototype.parseAll = function (data) {
|
|
|
|
|
|
|
9836 |
|
9837 |
+
for (var i = 0; i < this.fonts.length; i++) {
|
9838 |
+
data[this.fonts[i].name + 'class'] = nextend.fontManager.getClass(data[this.fonts[i].name], this.fonts[i].mode) + ' ';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9839 |
}
|
9840 |
|
9841 |
+
for (var i = 0; i < this.styles.length; i++) {
|
9842 |
+
data[this.styles[i].name + 'class'] = nextend.styleManager.getClass(data[this.styles[i].name], this.styles[i].mode) + ' ';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9843 |
}
|
9844 |
|
9845 |
+
for (var i = 0; i < this.needFill.length; i++) {
|
9846 |
+
if (typeof data[this.needFill[i]] !== 'undefined') {
|
9847 |
+
data[this.needFill[i]] = nextend.smartSlider.generator.fill(data[this.needFill[i]] + '');
|
|
|
9848 |
}
|
9849 |
}
|
|
|
9850 |
};
|
9851 |
|
9852 |
+
Item.prototype.getName = function (data) {
|
9853 |
+
return 'Layer';
|
|
|
|
|
|
|
|
|
|
|
9854 |
};
|
9855 |
|
9856 |
+
Item.prototype.resizeLayerToImage = function (image) {
|
9857 |
+
var layer = this.layer;
|
9858 |
+
$("<img/>")
|
9859 |
+
.attr("src", image)
|
9860 |
+
.load(function () {
|
9861 |
+
var slideSize = smartSlider.frontend.dimensions.slide;
|
9862 |
+
var width = this.width,
|
9863 |
+
height = this.height,
|
9864 |
+
maxWidth = slideSize.width,
|
9865 |
+
maxHeight = slideSize.height;
|
9866 |
|
9867 |
+
if (width > 0 && height > 0) {
|
9868 |
+
|
9869 |
+
if (width > maxWidth) {
|
9870 |
+
height = height * maxWidth / width;
|
9871 |
+
width = maxWidth;
|
9872 |
+
}
|
9873 |
+
if (height > maxHeight) {
|
9874 |
+
width = width * maxHeight / height;
|
9875 |
+
height = maxHeight;
|
9876 |
+
}
|
9877 |
+
nextend.smartSlider.history.off();
|
9878 |
+
layer.setProperty('width', width);
|
9879 |
+
layer.setProperty('height', height);
|
9880 |
+
nextend.smartSlider.history.on();
|
9881 |
+
}
|
9882 |
+
});
|
9883 |
};
|
9884 |
|
9885 |
+
Item.prototype.fitLayer = function (item) {
|
9886 |
+
return false;
|
|
|
|
|
|
|
9887 |
};
|
|
|
|
|
|
|
9888 |
|
9889 |
+
return Item;
|
9890 |
+
});
|
9891 |
+
N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
9892 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
9893 |
|
9894 |
+
function ItemManager(canvasManager, options) {
|
9895 |
+
this.suppressChange = false;
|
9896 |
|
9897 |
+
this.activeItemOriginalData = null;
|
|
|
|
|
9898 |
|
9899 |
+
this.canvasManager = canvasManager;
|
9900 |
|
9901 |
+
this.lastValues = {};
|
|
|
|
|
9902 |
|
9903 |
+
this.startItems();
|
9904 |
+
|
9905 |
+
this.forms = {};
|
9906 |
+
this.activeForm = false;
|
9907 |
+
|
9908 |
+
if (!options.isUploadDisabled) {
|
9909 |
+
smartSlider.frontend.sliderElement.fileupload({
|
9910 |
+
url: options.uploadUrl,
|
9911 |
+
pasteZone: false,
|
9912 |
+
dropZone: smartSlider.frontend.sliderElement,
|
9913 |
+
dataType: 'json',
|
9914 |
+
paramName: 'image',
|
9915 |
+
add: function (e, data) {
|
9916 |
+
data.formData = {path: '/' + options.uploadDir};
|
9917 |
+
data.submit();
|
9918 |
+
},
|
9919 |
+
done: $.proxy(function (e, data) {
|
9920 |
+
var response = data.result;
|
9921 |
+
if (response.data && response.data.name) {
|
9922 |
+
var item = this.createLayerItem(false, {item: 'image'});
|
9923 |
+
item.reRender({
|
9924 |
+
image: response.data.url
|
9925 |
+
});
|
9926 |
+
item.activate(null, null, true);
|
9927 |
+
} else {
|
9928 |
+
NextendAjaxHelper.notification(response);
|
9929 |
}
|
9930 |
+
|
9931 |
+
}, this),
|
9932 |
+
fail: function (e, data) {
|
9933 |
+
NextendAjaxHelper.notification(data.jqXHR.responseJSON);
|
9934 |
+
},
|
9935 |
+
|
9936 |
+
start: function () {
|
9937 |
+
NextendAjaxHelper.startLoading();
|
9938 |
+
},
|
9939 |
+
|
9940 |
+
stop: function () {
|
9941 |
+
setTimeout(function () {
|
9942 |
+
NextendAjaxHelper.stopLoading();
|
9943 |
+
}, 100);
|
9944 |
}
|
9945 |
+
});
|
9946 |
+
}
|
9947 |
+
}
|
9948 |
+
|
9949 |
+
ItemManager.prototype.setActiveItem = function (item, context, force) {
|
9950 |
+
// Must be called through scope.Item.activate();
|
9951 |
+
if (item != this.activeItem || force) {
|
9952 |
+
this.activeItemOriginalData = null;
|
9953 |
+
|
9954 |
+
var type = item.type;
|
9955 |
+
|
9956 |
+
if (this.activeForm) {
|
9957 |
+
this.activeForm.form.css('display', 'none');
|
9958 |
}
|
|
|
|
|
|
|
|
|
9959 |
|
9960 |
+
if (this.activeItem) {
|
9961 |
+
this.activeItem.deActivate();
|
9962 |
+
}
|
9963 |
+
|
9964 |
+
this.activeForm = this.getItemForm(type);
|
9965 |
+
|
9966 |
+
var values = $.extend({}, this.activeForm.values, item.values);
|
9967 |
+
|
9968 |
+
this.activeItem = item;
|
9969 |
+
|
9970 |
+
this.suppressChange = true;
|
9971 |
+
|
9972 |
+
for (var key in values) {
|
9973 |
+
var field = $('#item_' + type + key).data('field');
|
9974 |
+
if (field) {
|
9975 |
+
field.insideChange(values[key]);
|
9976 |
+
}
|
9977 |
}
|
9978 |
+
|
9979 |
+
this.suppressChange = false;
|
9980 |
+
|
9981 |
+
this.activeForm.form.css('display', 'block');
|
9982 |
+
this.focusFirst(context);
|
9983 |
+
return true;
|
9984 |
}
|
9985 |
+
//this.focusFirst(context);
|
9986 |
+
return false;
|
9987 |
};
|
9988 |
|
9989 |
+
ItemManager.prototype.focusFirst = function (context) {
|
9990 |
+
var field = this.activeForm.fields.eq(0).data('field');
|
9991 |
+
if (nextend.smartSlider.generator.isDynamicSlide() && field.connectedField && field.connectedField instanceof N2Classes.FormElementImage) {
|
9992 |
+
|
9993 |
+
} else {
|
9994 |
+
this.activeForm.fields.eq(0).data('field').focus(typeof context !== 'undefined' && context);
|
9995 |
+
}
|
9996 |
+
}
|
9997 |
+
|
9998 |
+
ItemManager.prototype.startItems = function () {
|
9999 |
+
|
10000 |
+
$('.n2-ss-core-item').nextendCanvasItem({
|
10001 |
+
canvasUIManager: this.canvasManager.mainContainer.canvasUIManager,
|
10002 |
+
distance: 5,
|
10003 |
+
$layer: function () {
|
10004 |
+
return this.element.clone();
|
10005 |
+
},
|
10006 |
+
onCreate: $.proxy(function (e, itemOptions, targetContainer, targetIndex) {
|
10007 |
+
switch (targetContainer.layer.type) {
|
10008 |
+
case 'content':
|
10009 |
+
case 'col':
|
10010 |
+
smartSlider.history.startBatch();
|
10011 |
+
var item = this.createLayerItem(targetContainer.layer, itemOptions.$layer.data(), 'click');
|
10012 |
+
smartSlider.history.addControl('skipForwardUndos');
|
10013 |
+
|
10014 |
+
targetContainer.layer.container.insertLayerAt(item.layer, targetIndex);
|
10015 |
+
item.layer.changeGroup(false, targetContainer.layer);
|
10016 |
+
|
10017 |
+
smartSlider.history.endBatch();
|
10018 |
+
|
10019 |
+
break;
|
10020 |
+
|
10021 |
+
case 'row':
|
10022 |
+
var col = targetContainer.layer.createCol();
|
10023 |
+
targetContainer.layer.moveCol(col.getIndex(), targetIndex);
|
10024 |
|
10025 |
+
smartSlider.history.startBatch();
|
10026 |
+
var item = this.createLayerItem(col, itemOptions.$layer.data(), 'click');
|
10027 |
+
smartSlider.history.addControl('skipForwardUndos');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10028 |
|
10029 |
+
col.container.insertLayerAt(item.layer, 0);
|
10030 |
+
item.layer.changeGroup(false, col);
|
|
|
|
|
|
|
|
|
|
|
10031 |
|
10032 |
+
smartSlider.history.endBatch();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10033 |
|
10034 |
+
break;
|
10035 |
+
default:
|
10036 |
+
var sliderOffset = nextend.smartSlider.$currentSlideElement.offset(),
|
10037 |
+
item = this.createLayerItem(this.canvasManager.mainContainer, itemOptions.$layer.data(), 'click');
|
10038 |
+
item.layer.placement.current.setPosition(e.pageX - sliderOffset.left - 20, e.pageY - sliderOffset.top - 20);
|
10039 |
|
10040 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
10041 |
}
|
10042 |
+
}, this),
|
10043 |
+
start: function () {
|
10044 |
+
$('#n2-ss-add-sidebar').removeClass('n2-active');
|
10045 |
+
}
|
10046 |
+
}).on('click', $.proxy(function (e) {
|
10047 |
+
this.createLayerItem(this.canvasManager.mainContainer.getActiveGroup(), $(e.currentTarget).data(), 'click');
|
10048 |
+
}, this));
|
10049 |
|
|
|
|
|
|
|
|
|
10050 |
|
10051 |
+
$('[data-itemshortcut]').on({
|
10052 |
+
click: $.proxy(function (e) {
|
10053 |
+
e.preventDefault();
|
10054 |
+
$('.n2-ss-core-item[data-item="' + $(e.currentTarget).data('itemshortcut') + '"]').trigger('click');
|
10055 |
+
}, this),
|
10056 |
+
mousedown: $.proxy(function (e) {
|
10057 |
+
$('.n2-ss-core-item[data-item="' + $(e.currentTarget).data('itemshortcut') + '"]').trigger(e);
|
10058 |
+
}, this)
|
10059 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10060 |
|
10061 |
+
$('[data-structureshortcut]').on({
|
10062 |
+
click: $.proxy(function (e) {
|
10063 |
+
e.preventDefault();
|
10064 |
+
$('.n2-ss-add-layer-button').trigger('click');
|
10065 |
+
$('#n2-ss-layers-switcher > .n2-labels .n2-td').eq(1).trigger('click');
|
10066 |
+
}, this),
|
10067 |
+
mousedown: $.proxy(function (e) {
|
10068 |
+
$('.n2-ss-core-item[data-type="' + $(e.currentTarget).data('structureshortcut') + '"]').trigger(e);
|
10069 |
+
}, this)
|
10070 |
+
});
|
10071 |
};
|
10072 |
|
10073 |
+
ItemManager.prototype.createLayerItem = function (group, data, interaction, props) {
|
10074 |
+
group = group || this.canvasManager.mainContainer.getActiveGroup();
|
10075 |
+
var type = data.item;
|
10076 |
+
if (type == 'structure') {
|
10077 |
+
var layer = new scope.Row(this.canvasManager, group, {});
|
10078 |
+
layer.create(data.type);
|
10079 |
+
layer.hightlightStructure();
|
10080 |
|
10081 |
+
return {
|
10082 |
+
layer: layer
|
10083 |
+
};
|
10084 |
} else {
|
10085 |
+
|
10086 |
+
var itemData = this.getItemForm(type),
|
10087 |
+
$item = $('<div></div>').attr('data-item', type)
|
10088 |
+
.data('itemvalues', $.extend(true, {}, itemData.values, this.getLastValues(type)))
|
10089 |
+
.addClass('n2-ss-item n2-ss-item-' + type),
|
10090 |
+
layer = this._createLayer($item, group, $.extend($('.n2-ss-core-item-' + type).data('layerproperties'), props));
|
10091 |
+
|
10092 |
+
if (interaction && interaction == "click") {
|
10093 |
+
setTimeout(function () {
|
10094 |
+
layer.layer.trigger('mousedown', ['create']).trigger('mouseup', ['create']).trigger('click', ['create']);
|
10095 |
+
}, 500);
|
10096 |
+
} else {
|
10097 |
+
layer.activate();
|
10098 |
+
}
|
10099 |
+
|
10100 |
+
smartSlider.layerWindow.switchTab('item');
|
10101 |
+
|
10102 |
+
smartSlider.history.addSimple(this, this.historyDelete, this.historyCreate, [group, layer, data]);
|
10103 |
+
|
10104 |
+
return layer.item;
|
10105 |
}
|
10106 |
};
|
10107 |
|
10108 |
+
ItemManager.prototype.getLastValues = function (type) {
|
10109 |
+
if (this.lastValues[type] !== undefined) {
|
10110 |
+
return this.lastValues[type];
|
|
|
|
|
10111 |
}
|
10112 |
+
return {};
|
10113 |
+
}
|
10114 |
|
10115 |
+
ItemManager.prototype.getItemClass = function (type) {
|
10116 |
+
var itemClass = 'Item' + type.capitalize();
|
10117 |
+
if (typeof scope[itemClass] === 'undefined') {
|
10118 |
+
return 'Item';
|
|
|
10119 |
}
|
10120 |
+
return itemClass;
|
10121 |
+
}
|
10122 |
|
10123 |
+
ItemManager.prototype._createLayer = function ($item, group, properties) {
|
10124 |
+
var defaultAlign = this.canvasManager.layerOptions.layerFeatures.layerDefault;
|
10125 |
+
for (var k in defaultAlign) {
|
10126 |
+
if (defaultAlign[k] !== null) {
|
10127 |
+
properties[k] = defaultAlign[k];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10128 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10129 |
}
|
|
|
10130 |
|
10131 |
+
var newLayer = new scope.Layer(this.canvasManager, group, properties);
|
|
|
|
|
|
|
10132 |
|
10133 |
+
newLayer.create(function (layer) {
|
10134 |
+
return layer._createLayer()
|
10135 |
+
.append($item);
|
10136 |
+
});
|
10137 |
|
10138 |
+
return newLayer;
|
10139 |
+
};
|
|
|
|
|
10140 |
|
10141 |
+
/**
|
10142 |
+
* Initialize an item type and subscribe the field changes on that type.
|
10143 |
+
* We use event normalization to prevent rendering.
|
10144 |
+
* @param type
|
10145 |
+
* @private
|
10146 |
+
*/
|
10147 |
+
ItemManager.prototype.getItemForm = function (type) {
|
10148 |
+
if (this.forms[type] === undefined) {
|
10149 |
+
var form = $('#smartslider-slide-toolbox-item-type-' + type),
|
10150 |
+
formData = {
|
10151 |
+
form: form,
|
10152 |
+
values: form.data('itemvalues'),
|
10153 |
+
fields: form.find('[name^="item_' + type + '"]'),
|
10154 |
+
fieldNameRegexp: new RegExp('item_' + type + "\\[(.*?)\\]", "")
|
10155 |
+
};
|
10156 |
+
formData.fields.on({
|
10157 |
+
nextendChange: $.proxy(this.updateCurrentItem, this),
|
10158 |
+
keydown: $.proxy(this.updateCurrentItemDeBounced, this)
|
10159 |
+
});
|
10160 |
|
10161 |
+
this.forms[type] = formData;
|
|
|
|
|
|
|
|
|
|
|
|
|
10162 |
}
|
10163 |
+
return this.forms[type];
|
10164 |
};
|
10165 |
|
10166 |
+
/**
|
10167 |
+
* This function renders the current item with the current values of the related form field.
|
10168 |
+
*/
|
10169 |
+
ItemManager.prototype.updateCurrentItem = function (e) {
|
10170 |
+
if (!this.suppressChange) {
|
10171 |
+
if (this.activeItemOriginalData === null) {
|
10172 |
+
this.activeItemOriginalData = $.extend({}, this.activeItem.values);
|
|
|
|
|
|
|
|
|
10173 |
}
|
10174 |
+
var data = {},
|
10175 |
+
originalData = {};
|
10176 |
+
// Get the current values of the fields
|
10177 |
+
// Run through the related item filter
|
10178 |
+
this.activeForm.fields.each($.proxy(function (i, field) {
|
10179 |
+
var field = $(field),
|
10180 |
+
name = field.attr('name').match(this.activeForm.fieldNameRegexp)[1];
|
10181 |
|
10182 |
+
originalData[name] = data[name] = field.val();
|
10183 |
+
|
10184 |
+
}, this));
|
10185 |
+
|
10186 |
+
if (e && e.type == 'nextendChange') {
|
10187 |
+
var task = smartSlider.history.addValue(this, this.historyUpdateCurrentItem, [this.activeItem]);
|
10188 |
+
if (task) {
|
10189 |
+
task.setValues(this.activeItemOriginalData, $.extend({}, originalData));
|
10190 |
+
}
|
10191 |
+
|
10192 |
+
this.activeItemOriginalData = null;
|
10193 |
+
}
|
10194 |
+
|
10195 |
+
this.activeItem.render($.extend({}, this.activeItem.getDefault(), data), originalData);
|
10196 |
}
|
10197 |
};
|
10198 |
|
10199 |
+
ItemManager.prototype.historyUpdateCurrentItem = function (values, historyActiveItem) {
|
10200 |
+
var maybeOldActiveItem = historyActiveItem.getSelf();
|
10201 |
+
maybeOldActiveItem.reRender($.extend(true, {}, values));
|
10202 |
+
maybeOldActiveItem.values = values;
|
10203 |
+
if (this.activeItem == maybeOldActiveItem) {
|
10204 |
+
maybeOldActiveItem.activate(null, null, true);
|
10205 |
}
|
10206 |
+
}
|
10207 |
|
10208 |
+
ItemManager.prototype.updateCurrentItemDeBounced = NextendDeBounce(function (e) {
|
10209 |
+
this.updateCurrentItem(e);
|
10210 |
+
}, 100);
|
10211 |
|
10212 |
+
ItemManager.prototype.historyDelete = function (historyGroup, historyLayer) {
|
10213 |
+
historyLayer.getSelf().delete();
|
10214 |
+
}
|
|
|
10215 |
|
10216 |
+
ItemManager.prototype.historyCreate = function (historyGroup, historyLayer, data) {
|
10217 |
+
var item = this.createLayerItem(historyGroup.getSelf(), data);
|
10218 |
+
historyLayer.setSelf(item.layer);
|
10219 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10220 |
|
10221 |
+
ItemManager.prototype.historyCreateStructure = function (historyGroup, historyLayer, data) {
|
10222 |
+
var obj = this.createLayerItem(historyGroup.getSelf(), data);
|
10223 |
+
historyLayer.setSelf(obj.layer);
|
10224 |
+
}
|
10225 |
|
10226 |
+
ItemManager.prototype.getSelf = function () {
|
10227 |
+
return this;
|
10228 |
+
}
|
10229 |
+
|
10230 |
+
return ItemManager;
|
10231 |
+
});
|
10232 |
+
N2Require('PluginActivatable', [], [], function ($, scope, undefined) {
|
10233 |
+
"use strict";
|
10234 |
+
|
10235 |
+
function PluginActivatable() {
|
10236 |
+
this.isActive = false;
|
10237 |
+
this.preventActivation = false;
|
10238 |
+
}
|
10239 |
+
|
10240 |
+
PluginActivatable.prototype.activate = function (e, context, preventExitFromSelection) {
|
10241 |
+
if (this.preventActivation) return false;
|
10242 |
+
if (document.activeElement) {
|
10243 |
+
document.activeElement.blur();
|
10244 |
+
}
|
10245 |
+
if (e && (e.ctrlKey || e.metaKey) && this.canvasManager.mainContainer.getSelectedLayer()) {
|
10246 |
+
return !this.select();
|
10247 |
} else {
|
10248 |
+
if (e && e.which == 3 && this.canvasManager.selectMode) {
|
10249 |
+
return false;
|
10250 |
+
}
|
10251 |
+
|
10252 |
+
if (!preventExitFromSelection) {
|
10253 |
+
this.canvasManager.exitSelectMode();
|
|
|
|
|
|
|
10254 |
}
|
|
|
10255 |
}
|
|
|
10256 |
|
10257 |
+
if (e) {
|
10258 |
+
this.positionSidebar();
|
10259 |
+
}
|
10260 |
+
|
10261 |
|
10262 |
+
// Set the layer active if it is not active currently
|
10263 |
+
if (this.canvasManager.mainContainer.getSelectedLayer() !== this) {
|
10264 |
+
this.layerRow.addClass('n2-active');
|
10265 |
+
this.layer.addClass('n2-active');
|
10266 |
+
this.layer.triggerHandler('n2-ss-activate');
|
10267 |
+
this.canvasManager.changeActiveLayer(this, preventExitFromSelection);
|
10268 |
+
nextend.activeLayer = this.layer;
|
10269 |
|
10270 |
+
|
10271 |
+
this.canvasManager.ui.onActivateLayer(this);
|
|
|
10272 |
}
|
10273 |
+
this.isActive = true;
|
10274 |
+
return true;
|
10275 |
};
|
10276 |
|
10277 |
+
PluginActivatable.prototype.deActivate = function () {
|
10278 |
+
this.isActive = false;
|
10279 |
+
if (this.layer === undefined) {
|
10280 |
+
console.error();
|
10281 |
}
|
10282 |
+
this.layer.removeClass('n2-active');
|
10283 |
+
this.layerRow.removeClass('n2-active');
|
10284 |
+
this.layer.triggerHandler('n2-ss-deactivate');
|
10285 |
};
|
10286 |
|
10287 |
+
return PluginActivatable;
|
10288 |
+
});
|
10289 |
+
N2Require('PluginEditableName', [], [], function ($, scope, undefined) {
|
10290 |
+
"use strict";
|
10291 |
+
var dblClickInterval = 300,
|
10292 |
+
timeout = null;
|
10293 |
|
10294 |
+
function PluginEditableName() {
|
10295 |
+
}
|
|
|
10296 |
|
10297 |
+
PluginEditableName.prototype.addProperties = function ($layer) {
|
10298 |
+
this.createProperty('name', this.label, $layer);
|
10299 |
+
this.createProperty('nameSynced', 1, $layer);
|
10300 |
+
}
|
10301 |
+
|
10302 |
+
PluginEditableName.prototype.makeNameEditable = function () {
|
10303 |
+
this.layerTitleSpan.on({
|
10304 |
+
mouseup: $.proxy(function (e) {
|
10305 |
+
if (timeout) {
|
10306 |
+
clearTimeout(timeout);
|
10307 |
+
timeout = null;
|
10308 |
+
this.editName();
|
10309 |
+
} else {
|
10310 |
+
this.activate(e);
|
10311 |
+
timeout = setTimeout($.proxy(function () {
|
10312 |
+
timeout = null;
|
10313 |
+
}, this), dblClickInterval);
|
10314 |
+
}
|
10315 |
+
}, this)
|
10316 |
+
})
|
10317 |
+
}
|
10318 |
+
|
10319 |
+
PluginEditableName.prototype.editName = function () {
|
10320 |
+
var input = new scope.InlineField();
|
10321 |
+
|
10322 |
+
input.$input.on({
|
10323 |
+
valueChanged: $.proxy(function (e, newName) {
|
10324 |
+
this.rename(newName, true);
|
10325 |
+
this.layerTitleSpan.css('display', 'inline');
|
10326 |
+
}, this),
|
10327 |
+
cancel: $.proxy(function () {
|
10328 |
+
this.layerTitleSpan.css('display', 'inline');
|
10329 |
+
}, this)
|
10330 |
+
});
|
10331 |
+
|
10332 |
+
this.layerTitleSpan.css('display', 'none');
|
10333 |
+
input.injectNode(this.layerTitle, this.property.name);
|
10334 |
|
|
|
10335 |
};
|
10336 |
|
10337 |
+
PluginEditableName.prototype.rename = function (newName, force) {
|
10338 |
+
|
10339 |
+
if (this.property.nameSynced || force) {
|
10340 |
+
|
10341 |
+
if (force) {
|
10342 |
+
this.property.nameSynced = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10343 |
}
|
10344 |
|
10345 |
+
if (newName == '') {
|
10346 |
+
if (force) {
|
10347 |
+
this.property.nameSynced = 1;
|
10348 |
+
this.item.reRender();
|
10349 |
+
return false;
|
10350 |
+
}
|
10351 |
+
newName = 'Layer #' + (this.group.getLayerCount() + 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10352 |
}
|
10353 |
+
newName = newName.substr(0, 35);
|
10354 |
+
if (this.property.name != newName) {
|
10355 |
+
this.property.name = newName;
|
10356 |
+
this.layerTitleSpan.html(newName);
|
10357 |
|
10358 |
+
this.$.trigger('layerRenamed', newName);
|
10359 |
+
}
|
10360 |
}
|
|
|
|
|
10361 |
};
|
10362 |
|
10363 |
+
return PluginEditableName;
|
10364 |
+
});
|
10365 |
+
N2Require('PluginShowOn', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
10366 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10367 |
|
10368 |
+
function PluginShowOn() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10369 |
|
10370 |
+
}
|
|
|
10371 |
|
10372 |
+
PluginShowOn.prototype.addProperties = function ($layer) {
|
10373 |
+
this.showsOnCurrent = true;
|
10374 |
+
this.createProperty('generatorvisible', '', $layer);
|
10375 |
+
this.createProperty('desktopPortrait', 1, $layer);
|
10376 |
+
this.createProperty('desktopLandscape', 1, $layer);
|
10377 |
+
this.createProperty('tabletPortrait', 1, $layer);
|
10378 |
+
this.createProperty('tabletLandscape', 1, $layer);
|
10379 |
+
this.createProperty('mobilePortrait', 1, $layer);
|
10380 |
+
this.createProperty('mobileLandscape', 1, $layer);
|
10381 |
+
}
|
10382 |
|
10383 |
+
PluginShowOn.prototype._hide = function () {
|
10384 |
+
this.layer.css('display', 'none');
|
10385 |
+
this.showsOnCurrent = false;
|
10386 |
+
this.update();
|
10387 |
};
|
10388 |
|
10389 |
+
PluginShowOn.prototype._show = function () {
|
10390 |
+
if (parseInt(this.property[this.canvasManager.getMode()])) {
|
10391 |
+
this.layer.css('display', '');
|
10392 |
+
this.showsOnCurrent = true;
|
10393 |
+
}
|
10394 |
+
this.update();
|
10395 |
};
|
10396 |
|
|
|
|
|
|
|
10397 |
|
10398 |
+
PluginShowOn.prototype._syncdesktopPortrait = function () {
|
10399 |
+
var value = this.getProperty('desktopPortrait');
|
10400 |
this.__syncShowOnDevice('desktopPortrait', value);
|
10401 |
};
|
10402 |
|
10403 |
+
PluginShowOn.prototype._syncdesktopLandscape = function () {
|
10404 |
+
var value = this.getProperty('desktopLandscape');
|
10405 |
this.__syncShowOnDevice('desktopLandscape', value);
|
10406 |
};
|
10407 |
|
10408 |
+
PluginShowOn.prototype._synctabletPortrait = function () {
|
10409 |
+
var value = this.getProperty('tabletPortrait');
|
10410 |
this.__syncShowOnDevice('tabletPortrait', value);
|
10411 |
};
|
10412 |
|
10413 |
+
PluginShowOn.prototype._synctabletLandscape = function () {
|
10414 |
+
var value = this.getProperty('tabletLandscape');
|
10415 |
this.__syncShowOnDevice('tabletLandscape', value);
|
10416 |
};
|
10417 |
|
10418 |
+
PluginShowOn.prototype._syncmobilePortrait = function () {
|
10419 |
+
var value = this.getProperty('mobilePortrait');
|
10420 |
this.__syncShowOnDevice('mobilePortrait', value);
|
10421 |
};
|
10422 |
|
10423 |
+
PluginShowOn.prototype._syncmobileLandscape = function () {
|
10424 |
+
var value = this.getProperty('mobileLandscape');
|
10425 |
this.__syncShowOnDevice('mobileLandscape', value);
|
10426 |
};
|
10427 |
|
10428 |
+
PluginShowOn.prototype.__syncShowOnDevice = function (mode, value) {
|
10429 |
if (this.getMode() == mode) {
|
10430 |
var value = parseInt(value);
|
10431 |
if (value) {
|
10434 |
this._hide();
|
10435 |
}
|
10436 |
this.layer.triggerHandler('LayerShowChange', [mode, value]);
|
10437 |
+
this.placement.doAction('triggerLayerResized');
|
10438 |
}
|
10439 |
};
|
10440 |
|
10441 |
+
return PluginShowOn;
|
10442 |
+
});
|
10443 |
+
N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
10444 |
+
"use strict";
|
|
|
|
|
|
|
10445 |
|
10446 |
+
function Col(canvasManager, group, properties) {
|
10447 |
+
this.label = 'Col';
|
10448 |
+
this.type = 'col';
|
|
|
10449 |
|
10450 |
+
this.innerContainer = '> .n2-ss-layer-col';
|
10451 |
|
10452 |
+
scope.ContentAbstract.prototype.constructor.call(this, canvasManager, group, properties);
|
10453 |
+
|
10454 |
+
this.placement.allow('default');
|
10455 |
+
}
|
10456 |
+
|
10457 |
+
Col.prototype = Object.create(scope.ContentAbstract.prototype);
|
10458 |
+
Col.prototype.constructor = Col;
|
10459 |
+
|
10460 |
+
Col.prototype._createLayer = function () {
|
10461 |
+
return $('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>')
|
10462 |
+
.attr('data-type', this.type);
|
10463 |
+
}
|
10464 |
+
|
10465 |
+
Col.prototype.addProperties = function ($layer) {
|
10466 |
+
|
10467 |
+
scope.ContentAbstract.prototype.addProperties.call(this, $layer);
|
10468 |
+
|
10469 |
+
this.createProperty('colwidth', '1', $layer);
|
10470 |
+
this.createProperty('borderradius', 0, $layer);
|
10471 |
+
this.createProperty('boxshadow', '0|*|0|*|0|*|0|*|00000080', $layer);
|
10472 |
+
|
10473 |
+
this.createProperty('borderwidth', '1|*|1|*|1|*|1', $layer);
|
10474 |
+
this.createProperty('borderstyle', 'none', $layer);
|
10475 |
+
this.createProperty('bordercolor', 'ffffffff', $layer);
|
10476 |
+
|
10477 |
+
this.createDeviceProperty('order', {desktopPortrait: 0}, $layer);
|
10478 |
+
}
|
10479 |
+
|
10480 |
+
Col.prototype.create = function () {
|
10481 |
+
scope.ContentAbstract.prototype.create.call(this);
|
10482 |
+
|
10483 |
+
this._syncorder();
|
10484 |
+
|
10485 |
+
this._syncborder();
|
10486 |
+
|
10487 |
+
this._syncborderradius();
|
10488 |
+
this._syncboxshadow();
|
10489 |
+
|
10490 |
+
this._onReady();
|
10491 |
+
}
|
10492 |
+
|
10493 |
+
Col.prototype.load = function ($layer) {
|
10494 |
+
|
10495 |
+
scope.ContentAbstract.prototype.load.call(this, $layer);
|
10496 |
+
|
10497 |
+
this._syncorder();
|
10498 |
+
|
10499 |
+
this._syncborder();
|
10500 |
+
this._syncborderradius();
|
10501 |
+
this._syncboxshadow();
|
10502 |
+
|
10503 |
+
this._onReady();
|
10504 |
+
|
10505 |
+
var storedRowColumnWidths = $layer.data('rowcolumns') + ''; //jQuery can convert it to number
|
10506 |
+
if (storedRowColumnWidths != undefined) {
|
10507 |
+
if (this.group.readyDeferred.state() == 'resolved') {
|
10508 |
+
var widths = storedRowColumnWidths.split('+');
|
10509 |
+
for (var i = 0; i < widths.length; i++) {
|
10510 |
+
widths[i] = new Fraction(widths[i]);
|
10511 |
+
}
|
10512 |
+
this.group.setColsWidth(widths);
|
10513 |
+
}
|
10514 |
+
}
|
10515 |
+
}
|
10516 |
+
|
10517 |
+
Col.prototype.createRow = function () {
|
10518 |
+
this.$content = this.layer.find('.n2-ss-layer-content:first');
|
10519 |
+
|
10520 |
+
this.container = new scope.LayerContainer(this, $('<ul class="n2-list n2-h4 n2-list-orderable" />'), 'normal', '> .n2-ss-layer', ['row', 'layer']);
|
10521 |
+
this.container.setLayerContainerElement(this.$content);
|
10522 |
+
|
10523 |
+
var remove = $('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="' + n2_('Delete layer') + '"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on('click', $.proxy(this.delete, this)),
|
10524 |
+
duplicate = $('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="' + n2_('Duplicate layer') + '"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on('click', $.proxy(function () {
|
10525 |
+
this.duplicate(true, false)
|
10526 |
+
}, this));
|
10527 |
+
|
10528 |
+
|
10529 |
+
this._createLayerListRow([
|
10530 |
+
$('<div class="n2-actions"></div>').append(duplicate).append(remove)
|
10531 |
+
]).addClass('n2-ss-layer-content-row');
|
10532 |
+
|
10533 |
+
|
10534 |
+
this.openerElement = $('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan)
|
10535 |
+
.on('click', $.proxy(this.switchOpened, this));
|
10536 |
+
|
10537 |
+
this.container.$ul.appendTo(this.layerRow);
|
10538 |
+
|
10539 |
+
this.readyDeferred.done($.proxy(this._syncopened, this));
|
10540 |
+
}
|
10541 |
+
|
10542 |
+
Col.prototype._start = function (isCreate) {
|
10543 |
+
|
10544 |
+
scope.ContentAbstract.prototype._start.call(this, isCreate);
|
10545 |
+
|
10546 |
+
if (isCreate) {
|
10547 |
+
this.highlight(2000);
|
10548 |
+
}
|
10549 |
+
}
|
10550 |
+
|
10551 |
+
Col.prototype.getRealOrder = function () {
|
10552 |
+
var order = this.getProperty('order');
|
10553 |
+
if (order == 0) {
|
10554 |
+
return 10;
|
10555 |
+
}
|
10556 |
+
return order;
|
10557 |
+
}
|
10558 |
+
|
10559 |
+
Col.prototype._syncorder = function () {
|
10560 |
+
var order = this.getProperty('order');
|
10561 |
+
|
10562 |
+
if (order == 0) {
|
10563 |
+
this.layer.css('order', '');
|
10564 |
+
} else {
|
10565 |
+
this.layer.css('order', order);
|
10566 |
+
}
|
10567 |
+
|
10568 |
+
this.group.refreshUI();
|
10569 |
+
}
|
10570 |
+
|
10571 |
+
Col.prototype._synccolwidth = function () {
|
10572 |
+
this.layer.css('width', ((new Fraction(this.getProperty('colwidth'))).valueOf() * 100) + '%');
|
10573 |
+
this.group.refreshUI();
|
10574 |
+
}
|
10575 |
+
|
10576 |
+
Col.prototype._syncborderradius = function () {
|
10577 |
+
this.$content.css('border-radius', this.getProperty('borderradius') + 'px');
|
10578 |
+
}
|
10579 |
+
|
10580 |
+
Col.prototype._syncborderwidth =
|
10581 |
+
Col.prototype._syncbordercolor =
|
10582 |
+
Col.prototype._syncborderstyle = function () {
|
10583 |
+
this._syncborder();
|
10584 |
+
}
|
10585 |
+
|
10586 |
+
Col.prototype._syncborder = function () {
|
10587 |
+
var borderstyle = this.getProperty('borderstyle');
|
10588 |
+
if (borderstyle != 'none') {
|
10589 |
+
this.$content.css('border-color', N2Color.hex2rgbaCSS(this.getProperty('bordercolor')));
|
10590 |
+
this.$content.css('border-style', this.getProperty('borderstyle'));
|
10591 |
+
var borderWidth = this.getProperty('borderwidth').split('|*|'),
|
10592 |
+
unit = 'px';
|
10593 |
+
|
10594 |
+
this.$content.css('border-width', borderWidth.join(unit + ' ') + unit);
|
10595 |
+
} else {
|
10596 |
+
this.$content.css('border', '');
|
10597 |
+
}
|
10598 |
+
|
10599 |
+
this.update();
|
10600 |
+
}
|
10601 |
+
|
10602 |
+
Col.prototype._syncboxshadow = function () {
|
10603 |
+
var boxShadow = this.getProperty('boxshadow').split('|*|');
|
10604 |
+
if ((boxShadow[0] != 0 || boxShadow[1] != 0 || boxShadow[2] != 0 || boxShadow[3] != 0) && N2Color.hex2alpha(boxShadow[4]) != 0) {
|
10605 |
+
this.$content.css('box-shadow', boxShadow[0] + 'px ' + boxShadow[1] + 'px ' + boxShadow[2] + 'px ' + boxShadow[3] + 'px ' + N2Color.hex2rgbaCSS(boxShadow[4]));
|
10606 |
+
} else {
|
10607 |
+
this.$content.css('box-shadow', '');
|
10608 |
+
}
|
10609 |
+
}
|
10610 |
+
|
10611 |
+
Col.prototype.delete = function () {
|
10612 |
+
if (this.group.container.getLayerCount() > 1) {
|
10613 |
+
this._delete();
|
10614 |
+
} else {
|
10615 |
+
this.group.delete();
|
10616 |
+
}
|
10617 |
+
}
|
10618 |
+
|
10619 |
+
Col.prototype.getHTML = function (base64) {
|
10620 |
+
var layer = scope.ComponentAbstract.prototype.getHTML.call(this, base64);
|
10621 |
+
|
10622 |
+
layer.attr('data-rowcolumns', this.group.getColumns());
|
10623 |
+
return layer;
|
10624 |
+
}
|
10625 |
+
|
10626 |
+
Col.prototype.renderModeProperties = function (isReset) {
|
10627 |
+
this._syncorder();
|
10628 |
+
|
10629 |
+
scope.ContentAbstract.prototype.renderModeProperties.call(this, isReset);
|
10630 |
+
}
|
10631 |
+
|
10632 |
+
Col.prototype.update = function () {
|
10633 |
+
|
10634 |
+
this.group._syncwrapafter();
|
10635 |
+
scope.ComponentAbstract.prototype.update.call(this);
|
10636 |
+
}
|
10637 |
+
|
10638 |
+
return Col;
|
10639 |
+
});
|
10640 |
+
var dependencies = ['LayerDataStorage', 'PluginEditableName'];
|
10641 |
+
N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
10642 |
+
"use strict";
|
10643 |
+
|
10644 |
+
var i = 0;
|
10645 |
+
window.layers = [];
|
10646 |
+
|
10647 |
+
function ComponentAbstract(canvasManager, group, properties) {
|
10648 |
+
|
10649 |
+
this.wraps = {};
|
10650 |
+
this.counter = i++;
|
10651 |
+
window.layers[this.counter] = this;
|
10652 |
+
this.self = this;
|
10653 |
+
this.originalProperties = properties || {};
|
10654 |
+
scope.LayerDataStorage.prototype.constructor.call(this);
|
10655 |
+
this.readyDeferred = $.Deferred();
|
10656 |
+
this.readyDeferred.done($.proxy(this.onReady, this));
|
10657 |
+
this.isDeleteStarted = false;
|
10658 |
+
this.isDeleted = false;
|
10659 |
+
|
10660 |
+
this._lastClasses = false;
|
10661 |
+
|
10662 |
+
this.$ = $(this);
|
10663 |
+
|
10664 |
+
this.proxyRefreshBaseSize = $.proxy(this.refreshBaseSize, this);
|
10665 |
+
|
10666 |
+
this.status = ComponentAbstract.STATUS.UNDEFINED;
|
10667 |
+
|
10668 |
+
this.canvasManager = canvasManager;
|
10669 |
+
this.group = group;
|
10670 |
+
|
10671 |
+
|
10672 |
+
scope.PluginActivatable.prototype.constructor.call(this);
|
10673 |
+
|
10674 |
+
/** @type {Placement} */
|
10675 |
+
this.placement = new scope.Placement(this);
|
10676 |
+
|
10677 |
+
this.readyDeferred.done($.proxy(this.addUILabels, this));
|
10678 |
+
|
10679 |
+
}
|
10680 |
+
|
10681 |
+
ComponentAbstract.STATUS = {
|
10682 |
+
UNDEFINED: 0,
|
10683 |
+
NORMAL: 1,
|
10684 |
+
LOCKED: 2,
|
10685 |
+
HIDDEN: 3
|
10686 |
};
|
10687 |
|
10688 |
+
ComponentAbstract.STATUS_INV = {
|
10689 |
+
0: 'UNDEFINED',
|
10690 |
+
1: 'NORMAL',
|
10691 |
+
2: 'LOCKED',
|
10692 |
+
3: 'HIDDEN'
|
|
|
|
|
|
|
|
|
|
|
10693 |
};
|
10694 |
|
10695 |
+
|
10696 |
+
for (var k in scope.PluginActivatable.prototype) {
|
10697 |
+
ComponentAbstract.prototype[k] = scope.PluginActivatable.prototype[k];
|
10698 |
+
}
|
10699 |
+
|
10700 |
+
for (var k in scope.LayerDataStorage.prototype) {
|
10701 |
+
ComponentAbstract.prototype[k] = scope.LayerDataStorage.prototype[k];
|
10702 |
+
}
|
10703 |
+
|
10704 |
+
for (var k in scope.PluginEditableName.prototype) {
|
10705 |
+
ComponentAbstract.prototype[k] = scope.PluginEditableName.prototype[k];
|
10706 |
+
}
|
10707 |
+
|
10708 |
+
for (var k in scope.PluginShowOn.prototype) {
|
10709 |
+
ComponentAbstract.prototype[k] = scope.PluginShowOn.prototype[k];
|
10710 |
+
}
|
10711 |
+
|
10712 |
+
ComponentAbstract.prototype.addUILabels = function () {
|
10713 |
+
this.markTimer = null;
|
10714 |
+
this.uiLabel = $('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">' + this.getUILabel() + '</div></div>')
|
10715 |
+
.appendTo(this.layer);
|
10716 |
+
|
10717 |
+
nextend.tooltip.addElement($('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-up n2-ss-layer-ui-label-action"><i class="n2-i n2-i-uplevel"/></div>')
|
10718 |
+
.on({
|
10719 |
+
mousedown: function (e) {
|
10720 |
+
e.stopPropagation();
|
10721 |
+
},
|
10722 |
+
click: $.proxy(function (e) {
|
10723 |
+
this.up(e);
|
10724 |
+
}, this)
|
10725 |
})
|
10726 |
+
.appendTo(this.uiLabel), 'Select parent');
|
|
|
|
|
10727 |
|
10728 |
+
$('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-duplicate"/></div>')
|
10729 |
+
.on({
|
10730 |
+
mousedown: function (e) {
|
10731 |
+
e.stopPropagation();
|
10732 |
+
},
|
10733 |
+
click: $.proxy(function () {
|
10734 |
+
this.duplicate();
|
10735 |
+
}, this)
|
10736 |
+
})
|
10737 |
+
.appendTo(this.uiLabel);
|
10738 |
|
10739 |
+
$('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-trash"/></div>')
|
10740 |
+
.on({
|
10741 |
+
mousedown: function (e) {
|
10742 |
+
e.stopPropagation();
|
10743 |
+
},
|
10744 |
+
click: $.proxy(function () {
|
10745 |
+
this.delete();
|
10746 |
+
}, this)
|
10747 |
+
})
|
10748 |
+
.appendTo(this.uiLabel);
|
10749 |
+
}
|
10750 |
|
10751 |
+
ComponentAbstract.prototype.getUILabel = function () {
|
10752 |
+
return this.label;
|
10753 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
10754 |
|
10755 |
+
ComponentAbstract.prototype.up = function (e) {
|
10756 |
+
e.stopImmediatePropagation();
|
10757 |
+
this.group.activate(e);
|
10758 |
+
}
|
10759 |
|
10760 |
+
ComponentAbstract.prototype.addProperties = function ($layer) {
|
|
|
10761 |
|
10762 |
+
this.createProperty('id', null, $layer, this);
|
|
|
|
|
10763 |
|
10764 |
+
this.createProperty('class', '', $layer);
|
10765 |
+
this.createProperty('crop', 'visible', $layer);
|
10766 |
+
this.createProperty('rotation', 0, $layer);
|
10767 |
+
this.createProperty('parallax', 0, $layer);
|
10768 |
+
this.createProperty('adaptivefont', 0, $layer);
|
10769 |
+
|
10770 |
+
this.createDeviceProperty('fontsize', {desktopPortrait: 100}, $layer);
|
10771 |
+
scope.PluginShowOn.prototype.addProperties.call(this, $layer);
|
10772 |
+
scope.PluginEditableName.prototype.addProperties.call(this, $layer);
|
10773 |
+
}
|
10774 |
+
|
10775 |
+
ComponentAbstract.prototype.getRootElement = function () {
|
10776 |
+
return this.layer;
|
10777 |
+
}
|
10778 |
+
|
10779 |
+
ComponentAbstract.prototype.create = function (cb, useCreatedLayerProperties) {
|
10780 |
+
useCreatedLayerProperties = useCreatedLayerProperties || false;
|
10781 |
+
if (!useCreatedLayerProperties) {
|
10782 |
+
this.addProperties(false);
|
10783 |
}
|
10784 |
+
if (typeof cb == 'function') {
|
10785 |
+
this.layer = cb.call(null, this);
|
10786 |
+
} else {
|
10787 |
+
this.layer = this._createLayer();
|
10788 |
}
|
|
|
10789 |
|
10790 |
+
this.layer.addClass('n2-ss-layer-under-creation');
|
10791 |
|
10792 |
+
if (useCreatedLayerProperties) {
|
10793 |
+
this.addProperties(this.layer);
|
10794 |
+
}
|
10795 |
|
10796 |
+
this.layer.data('layerObject', this);
|
10797 |
+
this.layer.triggerHandler('layerStarted', [this]);
|
|
|
10798 |
|
|
|
|
|
|
|
10799 |
|
10800 |
+
this.group.container.insert(this);
|
10801 |
+
this.group.onChildCountChange();
|
10802 |
|
10803 |
+
this.$.triggerHandler('create');
|
|
|
|
|
|
|
|
|
|
|
10804 |
|
10805 |
+
this._start(true);
|
10806 |
+
}
|
10807 |
+
|
10808 |
+
ComponentAbstract.prototype.load = function ($layer) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10809 |
|
10810 |
+
this.addProperties($layer);
|
|
|
|
|
|
|
|
|
10811 |
|
10812 |
+
this.layer = $layer.data('layerObject', this);
|
10813 |
+
this.layer.triggerHandler('layerStarted', [this]);
|
10814 |
|
10815 |
+
this.$.triggerHandler('load');
|
|
|
10816 |
|
10817 |
+
this._start(false);
|
10818 |
+
|
10819 |
+
var status = $layer.data('status');
|
10820 |
+
if (status !== null && typeof status != 'undefined') {
|
10821 |
+
this.changeStatus(status);
|
10822 |
+
} else {
|
10823 |
+
this.changeStatus(ComponentAbstract.STATUS.NORMAL);
|
10824 |
}
|
10825 |
+
}
|
10826 |
+
|
10827 |
+
ComponentAbstract.prototype._start = function (isCreate) {
|
10828 |
+
this.createRow();
|
10829 |
|
10830 |
+
var mask = this.layer.find('> .n2-ss-layer-mask');
|
10831 |
+
if (mask.length) {
|
10832 |
+
this.wraps.mask = mask;
|
10833 |
}
|
|
|
10834 |
|
10835 |
+
this._synccrop();
|
10836 |
+
this._syncrotation();
|
|
|
|
|
|
|
|
|
|
|
|
|
10837 |
|
10838 |
+
this.placement.start();
|
10839 |
+
this.placement.setMode(this.group.container.allowedPlacementMode, this.originalProperties);
|
10840 |
|
10841 |
+
this.setGroup(this.group);
|
|
|
|
|
|
|
|
|
|
|
|
|
10842 |
|
|
|
10843 |
|
10844 |
+
this.canvasManager.$.triggerHandler('layerCreated', this);
|
|
|
|
|
|
|
10845 |
|
10846 |
+
if (isCreate) {
|
10847 |
+
this.refreshBaseSize();
|
10848 |
+
this.$.triggerHandler('created');
|
10849 |
}
|
10850 |
|
10851 |
+
setTimeout($.proxy(function () {
|
10852 |
+
if (!this.isDeleted) {
|
10853 |
+
this.placement.onResize(true);
|
10854 |
+
this.layer.css('visibility', '');
|
10855 |
+
|
10856 |
+
this.layer.removeClass('n2-ss-layer-under-creation');
|
10857 |
+
}
|
10858 |
+
}, this), 300);
|
10859 |
+
}
|
10860 |
|
|
|
|
|
10861 |
|
10862 |
+
ComponentAbstract.prototype._onReady = function () {
|
10863 |
|
10864 |
+
this.originalProperties = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10865 |
|
10866 |
+
this.readyDeferred.resolve();
|
10867 |
|
10868 |
+
this.layer.on({
|
10869 |
+
mouseover: $.proxy(this.markOver, this),
|
10870 |
+
mouseout: $.proxy(this.markOut, this)
|
10871 |
+
});
|
10872 |
+
}
|
10873 |
|
10874 |
+
ComponentAbstract.prototype.isReady = function () {
|
10875 |
+
return this.readyDeferred.state() == 'resolved';
|
10876 |
+
}
|
|
|
|
|
10877 |
|
10878 |
+
ComponentAbstract.prototype.getName = function () {
|
10879 |
+
return this.property.name;
|
10880 |
+
}
|
|
|
|
|
10881 |
|
10882 |
+
ComponentAbstract.prototype.setGroup = function (group) {
|
10883 |
+
this.group.$.off('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10884 |
|
10885 |
+
this.group = group;
|
10886 |
+
this.placement.setMode(group.container.allowedPlacementMode);
|
10887 |
+
group.container.syncLayerRow(this);
|
10888 |
|
10889 |
+
if (this.isReady()) {
|
10890 |
+
this.refreshBaseSize();
|
10891 |
}
|
10892 |
+
this.group.$.on('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10893 |
+
};
|
10894 |
|
10895 |
+
ComponentAbstract.prototype.changeGroup = function (originalIndex, newGroup) {
|
10896 |
+
var originalGroup = this.group;
|
10897 |
+
originalGroup.$.off('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10898 |
|
10899 |
+
this.group = newGroup;
|
10900 |
+
var originalPlacementData = this.placement.setMode(newGroup.container.allowedPlacementMode);
|
10901 |
+
newGroup.container.syncLayerRow(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
10902 |
|
10903 |
+
this.refreshBaseSize();
|
10904 |
+
newGroup.$.on('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10905 |
|
10906 |
+
this.userGroupChange(originalGroup, originalIndex, originalPlacementData, newGroup, this.getIndex());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10907 |
|
10908 |
+
originalGroup.update();
|
10909 |
+
}
|
10910 |
+
|
10911 |
+
ComponentAbstract.prototype.userGroupChange = function (originalGroup, originalIndex, originalPlacementData, newGroup, newIndex) {
|
10912 |
+
if (originalGroup == newGroup) {
|
10913 |
+
this.userIndexChange(originalIndex, newIndex);
|
|
|
|
|
10914 |
} else {
|
10915 |
+
var task = smartSlider.history.addValue(this, this.historyUserGroupChange, []);
|
10916 |
+
|
10917 |
+
if (task) {
|
10918 |
+
task.setValues({
|
10919 |
+
historyGroup: originalGroup,
|
10920 |
+
index: originalIndex,
|
10921 |
+
placementData: originalPlacementData
|
10922 |
+
}, {
|
10923 |
+
historyGroup: newGroup,
|
10924 |
+
index: newIndex
|
10925 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10926 |
}
|
10927 |
}
|
10928 |
+
}
|
10929 |
|
10930 |
+
ComponentAbstract.prototype.historyUserGroupChange = function (data) {
|
10931 |
+
var originalGroup = this.group,
|
10932 |
+
group = data.historyGroup.getSelf(),
|
10933 |
+
index = data.index;
|
10934 |
+
group.container.insertLayerAt(this, index);
|
10935 |
|
10936 |
+
this.group.$.off('baseSizeUpdated', this.proxyRefreshBaseSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10937 |
|
10938 |
+
this.group = group;
|
10939 |
+
if (data.placementData) {
|
10940 |
+
this.layer.data(data.placementData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10941 |
}
|
10942 |
+
this.placement.setMode(group.container.allowedPlacementMode);
|
10943 |
+
group.container.syncLayerRow(this);
|
|
|
10944 |
|
10945 |
+
this.refreshBaseSize();
|
10946 |
+
this.group.$.on('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10947 |
+
|
10948 |
+
|
10949 |
+
group.onChildCountChange();
|
10950 |
+
|
10951 |
+
if (data.placementData) {
|
10952 |
+
this.placement.sync();
|
10953 |
}
|
|
|
|
|
10954 |
|
10955 |
+
originalGroup.update();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10956 |
};
|
10957 |
|
10958 |
+
ComponentAbstract.prototype.userIndexChange = function (originalIndex, newIndex) {
|
10959 |
+
|
10960 |
+
var task = smartSlider.history.addValue(this, this.historyUserIndexChange);
|
10961 |
+
if (task) {
|
10962 |
+
task.setValues(originalIndex, newIndex);
|
|
|
10963 |
}
|
10964 |
+
this.group.container.insertLayerAt(this, newIndex);
|
10965 |
+
}
|
10966 |
|
10967 |
+
ComponentAbstract.prototype.historyUserIndexChange = function (value) {
|
10968 |
+
this.group.container.insertLayerAt(this, value);
|
10969 |
+
}
|
10970 |
+
|
10971 |
+
|
10972 |
+
ComponentAbstract.prototype._createLayerListRow = function (actions) {
|
10973 |
+
this.layerRow = $('<li class="n2-ss-layerlist-row"></li>')
|
10974 |
+
.data('layer', this)
|
10975 |
+
.on({
|
10976 |
+
mousedown: $.proxy(nextend.context.setMouseDownArea, nextend.context, 'layerRowClicked')
|
10977 |
+
})
|
10978 |
+
.appendTo(this.group.container.$ul);
|
10979 |
+
this.layerTitleSpan = $('<span class="n2-ucf">' + this.property.name + '</span>');
|
10980 |
+
|
10981 |
+
this.makeNameEditable();
|
10982 |
+
|
10983 |
+
this.layerTitle = $('<div class="n2-ss-layer-title"></div>')
|
10984 |
+
.on({
|
10985 |
+
mouseenter: $.proxy(function () {
|
10986 |
+
this.canvasManager.highlight(this);
|
10987 |
+
}, this),
|
10988 |
+
mouseleave: $.proxy(function () {
|
10989 |
+
this.canvasManager.deHighlight(this);
|
10990 |
+
}, this),
|
10991 |
+
})
|
10992 |
+
.append(this.layerTitleSpan)
|
10993 |
+
.append(actions)
|
10994 |
+
.appendTo(this.layerRow)
|
10995 |
+
.on({
|
10996 |
+
mouseup: $.proxy(function (e) {
|
10997 |
+
if (!nextend.shouldPreventMouseUp && e.target.tagName === 'DIV') {
|
10998 |
+
this.activate(e);
|
10999 |
+
}
|
11000 |
+
}, this)
|
11001 |
+
});
|
11002 |
+
|
11003 |
+
nextend.tooltip.add(this.layerRow);
|
11004 |
+
|
11005 |
+
this.layerRow.nextendLayerListItem({
|
11006 |
+
UIManager: this.canvasManager.mainContainer.layerListUIManager,
|
11007 |
+
layer: this,
|
11008 |
+
$item: this.layerRow
|
11009 |
+
});
|
11010 |
+
|
11011 |
+
return this.layerRow;
|
11012 |
+
}
|
11013 |
|
11014 |
+
ComponentAbstract.prototype.select = function (e) {
|
11015 |
+
return this.canvasManager.selectLayer(this, true);
|
11016 |
};
|
11017 |
|
11018 |
+
ComponentAbstract.prototype.update = function () {
|
11019 |
+
this.readyDeferred.done($.proxy(this.placement.updatePositionThrottled, this.placement));
|
11020 |
+
//this.placement.updatePositionThrottled();
|
11021 |
+
};
|
11022 |
+
|
11023 |
+
ComponentAbstract.prototype.updateThrottled = function () {
|
11024 |
+
this.placement.updatePositionThrottled();
|
11025 |
+
}
|
11026 |
+
|
11027 |
+
ComponentAbstract.prototype.positionSidebar = function () {
|
11028 |
+
this.canvasManager.layerWindow.show(this, this.layer);
|
11029 |
+
}
|
11030 |
|
11031 |
+
ComponentAbstract.prototype.showEditor = function () {
|
11032 |
+
this.canvasManager.layerWindow._show();
|
11033 |
+
}
|
11034 |
|
11035 |
+
ComponentAbstract.prototype.highlight = function (hideInterval) {
|
11036 |
+
hideInterval = hideInterval || 2000;
|
11037 |
+
if (this.isHighlighted) {
|
11038 |
+
clearTimeout(this.isHighlighted);
|
11039 |
+
this.isHighlighted = false;
|
|
|
11040 |
}
|
11041 |
+
this.layer.addClass('n2-highlight');
|
11042 |
+
this.isHighlighted = setTimeout($.proxy(function () {
|
11043 |
+
this.layer.removeClass('n2-highlight');
|
11044 |
+
}, this), hideInterval);
|
11045 |
+
}
|
11046 |
|
11047 |
+
ComponentAbstract.prototype.setPropertydesktopPortrait =
|
11048 |
+
ComponentAbstract.prototype.setPropertydesktopLandscape =
|
11049 |
+
ComponentAbstract.prototype.setPropertytabletPortrait =
|
11050 |
+
ComponentAbstract.prototype.setPropertytabletLandscape =
|
11051 |
+
ComponentAbstract.prototype.setPropertymobilePortrait =
|
11052 |
+
ComponentAbstract.prototype.setPropertymobileLandscape = function (name, value, from) {
|
11053 |
+
this._setProperty(name, parseInt(value), from);
|
11054 |
+
}
|
11055 |
|
11056 |
+
ComponentAbstract.prototype.getHTML = function (base64) {
|
11057 |
+
var $layer = this._createLayer();
|
11058 |
|
11059 |
+
for (var k in this.property) {
|
11060 |
+
if (k != 'width' && k != 'height' && k != 'left' && k != 'top') {
|
11061 |
+
$layer.attr('data-' + k.toLowerCase(), this.property[k]);
|
11062 |
}
|
11063 |
}
|
|
|
11064 |
|
11065 |
+
for (var k in this.deviceProperty) {
|
11066 |
+
for (var k2 in this.deviceProperty[k]) {
|
11067 |
+
$layer.attr('data-' + k.toLowerCase() + k2, this.deviceProperty[k][k2]);
|
11068 |
+
}
|
11069 |
+
}
|
11070 |
|
11071 |
+
for (var k in this.deviceProperty['desktop']) {
|
11072 |
+
$layer.css(k, this.deviceProperty['desktop'][k] + 'px');
|
|
|
11073 |
}
|
11074 |
|
11075 |
+
if (this.container != undefined) {
|
11076 |
+
var $innerContainer = $layer;
|
11077 |
+
if (this.innerContainer != undefined) {
|
11078 |
+
$innerContainer = $layer.find(this.innerContainer);
|
11079 |
+
}
|
11080 |
|
11081 |
+
$innerContainer.append(this.container.getHTML(base64));
|
|
|
|
|
|
|
11082 |
}
|
11083 |
|
11084 |
+
var id = this.getProperty('id');
|
11085 |
+
if (id && id != '') {
|
11086 |
+
$layer.attr('id', id);
|
11087 |
+
}
|
11088 |
|
11089 |
+
if (this.status > scope.ComponentAbstract.STATUS.NORMAL) {
|
11090 |
+
$layer.attr('data-status', this.status);
|
|
|
11091 |
}
|
|
|
11092 |
|
11093 |
+
return $layer;
|
|
|
|
|
|
|
|
|
11094 |
};
|
11095 |
|
11096 |
+
ComponentAbstract.prototype.duplicate = function (needActivate) {
|
11097 |
+
var $component = this.getHTML(false);
|
|
|
11098 |
|
11099 |
+
if (this.placement.getType() == 'absolute') {
|
11100 |
+
var id = $component.attr('id');
|
11101 |
+
if (id) {
|
11102 |
+
id = $.fn.uid();
|
11103 |
+
$component.attr('id', id);
|
11104 |
+
$component.attr('data-id', id);
|
11105 |
+
}
|
11106 |
+
if ($component.attr('data-parentid')) {
|
11107 |
+
$component.data('desktopportraittop', 0);
|
11108 |
+
$component.data('desktopportraitleft', 0);
|
11109 |
+
} else {
|
11110 |
+
$component.data('desktopportraittop', $component.data('desktopportraittop') + 40);
|
11111 |
+
$component.data('desktopportraitleft', $component.data('desktopportraitleft') + 40);
|
11112 |
+
}
|
11113 |
+
$component.attr('data-parentid', '');
|
11114 |
|
|
|
|
|
|
|
11115 |
}
|
|
|
11116 |
|
11117 |
+
var newComponent = this.canvasManager.insertComponentWithNode(this.group, $component, this.getIndex() + 1, false, true);
|
|
|
|
|
|
|
|
|
11118 |
|
11119 |
+
this.layerRow.trigger('mouseleave');
|
11120 |
+
|
11121 |
+
if (needActivate) {
|
11122 |
+
newComponent.activate();
|
11123 |
}
|
11124 |
|
11125 |
+
smartSlider.history.addSimple(this, this.historyDeleteDuplicated, this.historyDuplicate, [newComponent, newComponent.container ? newComponent.container.getAllLayers() : false]);
|
|
|
|
|
|
|
|
|
|
|
11126 |
|
11127 |
+
return newComponent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11128 |
};
|
11129 |
|
11130 |
+
ComponentAbstract.prototype.historyDeleteDuplicated = function (historicalNewComponent) {
|
11131 |
+
historicalNewComponent.getSelf().delete();
|
11132 |
+
}
|
|
|
11133 |
|
11134 |
+
ComponentAbstract.prototype.historyDuplicate = function (historicalNewComponent, historicalAllLayers) {
|
11135 |
+
var newComponent = this.duplicate(false, false);
|
11136 |
+
historicalNewComponent.setSelf(newComponent);
|
11137 |
+
|
11138 |
+
if (historicalAllLayers) {
|
11139 |
+
var newAllLayers = newComponent.container.getAllLayers();
|
11140 |
+
for (var i = 0; i < newAllLayers.length; i++) {
|
11141 |
+
historicalAllLayers[i].setSelf(newAllLayers[i]);
|
11142 |
}
|
11143 |
}
|
11144 |
+
}
|
11145 |
|
11146 |
+
ComponentAbstract.prototype.historyDelete = function () {
|
11147 |
+
this.delete();
|
11148 |
+
}
|
11149 |
|
11150 |
+
ComponentAbstract.prototype.historyRestore = function ($component, historicalGroup, index, historicalAllLayers) {
|
11151 |
+
var newComponent = this.canvasManager.insertComponentWithNode(this.group.getSelf(), $component.clone(), index, false, true);
|
11152 |
+
this.setSelf(newComponent);
|
11153 |
|
11154 |
+
if (historicalAllLayers) {
|
11155 |
+
var newAllLayers = newComponent.container.getAllLayers();
|
11156 |
+
for (var i = 0; i < newAllLayers.length; i++) {
|
11157 |
+
historicalAllLayers[i].setSelf(newAllLayers[i]);
|
|
|
|
|
|
|
|
|
|
|
|
|
11158 |
}
|
|
|
11159 |
}
|
11160 |
+
}
|
11161 |
|
11162 |
+
ComponentAbstract.prototype.delete = function () {
|
11163 |
+
smartSlider.positionDisplay.hide();
|
11164 |
+
nextend.tooltip.onLeave();
|
11165 |
+
this._delete();
|
11166 |
+
}
|
11167 |
+
|
11168 |
+
ComponentAbstract.prototype._delete = function () {
|
11169 |
+
|
11170 |
+
this.isDeleteStarted = true;
|
11171 |
+
|
11172 |
+
if (this.canvasManager.mainContainer.getSelectedLayer() == this) {
|
11173 |
+
this.canvasManager.layerWindow.hide();
|
11174 |
}
|
|
|
|
|
11175 |
|
11176 |
+
if (this.isHighlighted) {
|
11177 |
+
clearTimeout(this.isHighlighted);
|
11178 |
+
this.isHighlighted = false;
|
|
|
|
|
11179 |
}
|
|
|
11180 |
|
11181 |
+
smartSlider.history.startBatch();
|
11182 |
+
smartSlider.history.addSimple(this, this.historyRestore, this.historyDelete, [this.getHTML(false), this.group, this.getIndex(), this.container ? this.container.getAllLayers() : false]);
|
11183 |
+
|
11184 |
+
this.deActivate();
|
11185 |
+
|
11186 |
+
if (this.container != undefined) {
|
11187 |
+
smartSlider.history.off();
|
11188 |
+
var layers = this.container.getSortedLayers();
|
11189 |
+
for (var i = 0; i < layers.length; i++) {
|
11190 |
+
layers[i]._delete();
|
11191 |
+
}
|
11192 |
+
smartSlider.history.on();
|
11193 |
}
|
11194 |
+
smartSlider.history.endBatch();
|
11195 |
|
11196 |
+
if (this.item != undefined) {
|
11197 |
+
this.item.delete();
|
|
|
|
|
|
|
11198 |
}
|
11199 |
|
11200 |
+
this.placement.delete();
|
|
|
|
|
|
|
11201 |
|
11202 |
+
// If delete happen meanwhile layer dragged or resized, we have to cancel that.
|
11203 |
+
this.layer.trigger('mouseup');
|
11204 |
+
|
11205 |
+
this.isDeleted = true;
|
11206 |
+
|
11207 |
+
this.canvasManager.mainContainer.layerDeleted(this);
|
11208 |
+
|
11209 |
+
this.layer.triggerHandler('LayerDeleted');
|
11210 |
+
this.getRootElement().remove();
|
11211 |
+
this.layerRow.remove();
|
11212 |
+
|
11213 |
+
this.group.update();
|
11214 |
+
|
11215 |
+
|
11216 |
+
this.group.$.off('baseSizeUpdated', this.proxyRefreshBaseSize);
|
11217 |
+
this.$.trigger('layerDeleted');
|
11218 |
+
|
11219 |
+
if (this.markTimer) {
|
11220 |
+
clearTimeout(this.markTimer);
|
11221 |
}
|
11222 |
+
|
11223 |
+
//delete this.canvasManager;
|
11224 |
+
delete this.layer;
|
11225 |
+
delete this.itemEditor;
|
11226 |
+
this.group.onChildCountChange();
|
11227 |
}
|
11228 |
|
11229 |
+
ComponentAbstract.prototype.getData = function (params) {
|
11230 |
+
var data = {
|
11231 |
+
type: this.type
|
11232 |
+
};
|
11233 |
+
|
11234 |
+
if (this.status > scope.ComponentAbstract.STATUS.NORMAL) {
|
11235 |
+
data.status = this.status;
|
11236 |
+
}
|
11237 |
+
|
11238 |
+
var properties = $.extend({}, this.property);
|
11239 |
+
|
11240 |
+
// store the device based properties
|
11241 |
+
for (var device in this.deviceProperty) {
|
11242 |
+
for (var property in this.deviceProperty[device]) {
|
11243 |
+
delete properties[property];
|
11244 |
+
var value = this.deviceProperty[device][property];
|
11245 |
+
if (typeof value === 'undefined') {
|
11246 |
+
continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11247 |
}
|
11248 |
+
|
11249 |
+
switch (property) {
|
11250 |
+
case 'width':
|
11251 |
+
case 'height':
|
11252 |
+
if (!this.isDimensionPropertyAccepted(value)) {
|
11253 |
+
value = parseFloat(value);
|
|
|
|
|
|
|
11254 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11255 |
break;
|
11256 |
+
case 'fontsize':
|
11257 |
+
case 'left':
|
11258 |
+
case 'top':
|
11259 |
+
case 'gutter':
|
11260 |
+
case 'wrap':
|
11261 |
+
value = parseFloat(value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11262 |
break;
|
11263 |
}
|
11264 |
+
data[device.toLowerCase() + property] = value;
|
11265 |
+
}
|
11266 |
+
}
|
11267 |
+
|
11268 |
+
for (var k in properties) {
|
11269 |
+
data[k.toLowerCase()] = properties[k];
|
11270 |
}
|
11271 |
+
|
11272 |
+
return data;
|
11273 |
};
|
11274 |
|
11275 |
+
ComponentAbstract.prototype.onChildCountChange = function () {
|
11276 |
+
|
11277 |
}
|
11278 |
|
11279 |
+
ComponentAbstract.prototype.getDataWithChildren = function (layers) {
|
11280 |
+
layers.push(this.getData({
|
11281 |
+
layersIncluded: true,
|
11282 |
+
itemsIncluded: true
|
11283 |
+
}));
|
11284 |
+
this.layer.triggerHandler('LayerGetDataWithChildren', [layers]);
|
11285 |
+
return layers;
|
11286 |
+
};
|
11287 |
|
11288 |
+
ComponentAbstract.prototype.markOver = function (e) {
|
11289 |
+
this.layer.addClass('n2-ss-mouse-over');
|
11290 |
+
e.stopPropagation();
|
|
|
11291 |
|
11292 |
+
this.group.markEnter();
|
|
|
|
|
11293 |
|
11294 |
+
if (this.markTimer) {
|
11295 |
+
clearTimeout(this.markTimer);
|
11296 |
}
|
11297 |
+
this.layer.addClass('n2-ss-mouse-over-delayed');
|
11298 |
+
this.uiLabel.removeClass('invisible');
|
11299 |
+
}
|
11300 |
|
11301 |
+
ComponentAbstract.prototype.markOut = function (e) {
|
11302 |
+
this.layer.removeClass('n2-ss-mouse-over');
|
11303 |
+
if (e) {
|
11304 |
+
e.stopPropagation();
|
11305 |
}
|
11306 |
+
this.group.markLeave();
|
11307 |
|
11308 |
+
if (this.markTimer) {
|
11309 |
+
clearTimeout(this.markTimer);
|
11310 |
+
}
|
11311 |
+
if (!this.isActive) {
|
11312 |
+
this.uiLabel.addClass('invisible');
|
11313 |
+
}
|
11314 |
+
this.markTimer = setTimeout($.proxy(function () {
|
11315 |
+
this.layer.removeClass('n2-ss-mouse-over-delayed');
|
11316 |
+
this.uiLabel.removeClass('invisible');
|
11317 |
+
this.markTimer = null;
|
11318 |
+
}, this), 10);
|
11319 |
}
|
11320 |
|
11321 |
+
ComponentAbstract.prototype.markEnter = function (e) {
|
11322 |
+
this.layer.addClass('n2-ss-mouse-hover');
|
11323 |
+
this.group.markEnter();
|
11324 |
+
}
|
|
|
11325 |
|
11326 |
+
ComponentAbstract.prototype.markLeave = function (e) {
|
11327 |
+
this.layer.removeClass('n2-ss-mouse-hover');
|
11328 |
+
this.group.markLeave();
|
|
|
11329 |
}
|
11330 |
|
|