Version Description
- 05. June 2018. =
- Feature: SEO title is now available in the free version
- Feature: the autoplay control is now hidden when the autoplay is disabled
- Feature: better Add Slide UI
- Feature: better compatibility with caching plugins
- Feature: better slide background management
- Feature: Content and Canvas layers now have different color in the slide editor
- Feature: Divi 3.1 support
- Feature: dynamic slide templates now use Content mode
- Feature: hover effects (row, col and content)
- Feature: new caching engine
- Feature: new fill mode: Blur fit
- Feature: no more xml files. Wider server compatibility and more flexible interface
- Feature: PHP 7.2 compatibility
- Feature: remove linebreak generator function
- Feature: row link
- Feature: slide background and thumbnail sync
- Feature: Static slide renamed to Static Overlay
- Feature: Thumbnail control: draggable slides
- Feature: Global setting changes are clearing slider cache
- Fix: Row stretch and wrap after fix
- Fix: Chrome video handling improvements
- Fix: Font family loading fixes
Download this release
Release Info
Developer | nextendweb |
Plugin | Smart Slider 3 |
Version | 3.3.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.14 to 3.3.1
- editor/shortcode.js +2 -2
- editor/shortcode.php +6 -9
- images/icon.png +0 -0
- images/icon16x-active.png +0 -0
- images/icon16x.png +0 -0
- editor/icon.png → images/icon20x.png +0 -0
- images/ss3.jpg +0 -0
- includes/iframe.js +88 -0
- includes/integrations/Divi/SmartSlider3Extension.php +80 -0
- includes/integrations/Divi/loader.php +8 -0
- includes/integrations/Divi/modules/FullwidthSmartSlider3/FullwidthSmartSlider3.php +13 -0
- includes/integrations/Divi/modules/SmartSlider3/SmartSlider3.php +99 -0
- includes/integrations/Divi/scripts/builder-bundle.min.js +233 -0
- includes/integrations/Divi/styles/admin/style.min.css +4 -0
- includes/integrations/Divi/styles/style.min.css +4 -0
- includes/integrations/VisualComposer.php +21 -0
- includes/integrations/unyson/smartslider/class-fw-extension-smartslider.php +1 -1
- includes/integrations/unyson/smartslider/{includes → options}/option-types.php +1 -1
- includes/shortcode.php +23 -100
- includes/smartslider3.php +17 -14
- includes/widget.php +24 -27
- library/media/admin/dist/smartslider-backend.css +463 -290
- library/media/admin/dist/smartslider-backend.min.css +1 -1
- library/media/{images → admin/images}/fillmode/center.png +0 -0
- library/media/{images → admin/images}/fillmode/default.png +0 -0
- library/media/{images → admin/images}/fillmode/fill.png +0 -0
- library/media/{images → admin/images}/fillmode/fit.png +0 -0
- library/media/{images → admin/images}/fillmode/fixed.png +0 -0
- library/media/{images → admin/images}/fillmode/stretch.png +0 -0
- library/media/{images → admin/images}/fillmode/tile.png +0 -0
- library/media/admin/images/free/getpro1.jpg +0 -0
- library/media/admin/images/free/getpro2.jpg +0 -0
- library/media/admin/images/free/rate.png +0 -0
- library/media/{plugins/widget/arrow/arrow/disabled.png → admin/images/widgetdisabled.png} +0 -0
- library/media/admin/js/jqueryui/jquery-ui.canvas-item.js +0 -43
- library/media/admin/js/jqueryui/jquery-ui.canvas.js +0 -585
- library/media/admin/js/jqueryui/jquery-ui.columns.js +0 -216
- library/media/admin/js/jqueryui/jquery-ui.layer-list-item.js +0 -35
- library/media/admin/js/jqueryui/jquery-ui.layer-list.js +0 -252
- library/media/dist/smartslider-backend.js +5592 -2268
- library/media/dist/smartslider-backend.min.js +1 -9
editor/shortcode.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
init: function (ed, url) {
|
4 |
ed.addButton('nextend2smartslider3', {
|
5 |
title: 'Smart Slider 3',
|
6 |
-
image: url + '/
|
7 |
onclick: function () {
|
8 |
NextendSmartSliderWPTinyMCEModal(ed);
|
9 |
}
|
@@ -18,7 +18,7 @@
|
|
18 |
author: 'Nextendweb',
|
19 |
authorurl: 'https://smartslider3.com',
|
20 |
infourl: 'https://smartslider3.com',
|
21 |
-
version: "3.
|
22 |
};
|
23 |
}
|
24 |
});
|
3 |
init: function (ed, url) {
|
4 |
ed.addButton('nextend2smartslider3', {
|
5 |
title: 'Smart Slider 3',
|
6 |
+
image: url + '/../images/icon20x.png',
|
7 |
onclick: function () {
|
8 |
NextendSmartSliderWPTinyMCEModal(ed);
|
9 |
}
|
18 |
author: 'Nextendweb',
|
19 |
authorurl: 'https://smartslider3.com',
|
20 |
infourl: 'https://smartslider3.com',
|
21 |
+
version: "3.2"
|
22 |
};
|
23 |
}
|
24 |
});
|
editor/shortcode.php
CHANGED
@@ -23,9 +23,6 @@ class N2SSShortcodeInsert {
|
|
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(
|
@@ -149,9 +146,9 @@ class N2SSShortcodeInsert {
|
|
149 |
callback = function (data) {
|
150 |
var shortcode = false;
|
151 |
if(data.mode === 'id'){
|
152 |
-
shortcode = '<div>[smartslider3 slider=' + data.
|
153 |
}else if(data.mode === 'alias'){
|
154 |
-
shortcode = '<div>[smartslider3 alias="' + data.
|
155 |
}
|
156 |
if(shortcode) {
|
157 |
ed.execCommand('mceInsertContent', false, shortcode);
|
@@ -165,9 +162,9 @@ class N2SSShortcodeInsert {
|
|
165 |
callback = function (data) {
|
166 |
var shortcode = false;
|
167 |
if(data.mode === 'id'){
|
168 |
-
shortcode = '<div>[smartslider3 slider=' + data.
|
169 |
}else if(data.mode === 'alias'){
|
170 |
-
shortcode = '<div>[smartslider3 alias="' + data.
|
171 |
}
|
172 |
if(shortcode) {
|
173 |
QTags.insertContent("\n" + shortcode);
|
@@ -185,9 +182,9 @@ class N2SSShortcodeInsert {
|
|
185 |
|
186 |
var idOrAlias = false;
|
187 |
if(data.mode === 'id'){
|
188 |
-
idOrAlias = data.
|
189 |
}else if(data.mode === 'alias'){
|
190 |
-
idOrAlias = data.
|
191 |
}
|
192 |
|
193 |
if(idOrAlias) {
|
23 |
|
24 |
self::addForced();
|
25 |
|
|
|
|
|
|
|
26 |
if (intval(N2SmartSliderSettings::get('editor-icon', 1))) {
|
27 |
if (get_user_option('rich_editing') == 'true') {
|
28 |
add_filter('mce_external_plugins', array(
|
146 |
callback = function (data) {
|
147 |
var shortcode = false;
|
148 |
if(data.mode === 'id'){
|
149 |
+
shortcode = '<div>[smartslider3 slider=' + data.value + ']</div>';
|
150 |
}else if(data.mode === 'alias'){
|
151 |
+
shortcode = '<div>[smartslider3 alias="' + data.value + '"]</div>';
|
152 |
}
|
153 |
if(shortcode) {
|
154 |
ed.execCommand('mceInsertContent', false, shortcode);
|
162 |
callback = function (data) {
|
163 |
var shortcode = false;
|
164 |
if(data.mode === 'id'){
|
165 |
+
shortcode = '<div>[smartslider3 slider=' + data.value + ']</div>';
|
166 |
}else if(data.mode === 'alias'){
|
167 |
+
shortcode = '<div>[smartslider3 alias="' + data.value + '"]</div>';
|
168 |
}
|
169 |
if(shortcode) {
|
170 |
QTags.insertContent("\n" + shortcode);
|
182 |
|
183 |
var idOrAlias = false;
|
184 |
if(data.mode === 'id'){
|
185 |
+
idOrAlias = data.value;
|
186 |
}else if(data.mode === 'alias'){
|
187 |
+
idOrAlias = data.value;
|
188 |
}
|
189 |
|
190 |
if(idOrAlias) {
|
images/icon.png
DELETED
Binary file
|
images/icon16x-active.png
ADDED
Binary file
|
images/icon16x.png
ADDED
Binary file
|
editor/icon.png → images/icon20x.png
RENAMED
File without changes
|
images/ss3.jpg
DELETED
Binary file
|
includes/iframe.js
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if (typeof window.n2SSIframeLoader != "function") {
|
2 |
+
(function ($) {
|
3 |
+
var frames = [],
|
4 |
+
clientHeight = 0;
|
5 |
+
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
6 |
+
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
|
7 |
+
var sourceFrame = false;
|
8 |
+
for (var i = 0; i < frames.length; i++) {
|
9 |
+
if (e.source == (frames[i].contentWindow || frames[i].contentDocument)) {
|
10 |
+
sourceFrame = frames[i];
|
11 |
+
}
|
12 |
+
}
|
13 |
+
if (sourceFrame) {
|
14 |
+
var data = e[e.message ? "message" : "data"];
|
15 |
+
|
16 |
+
switch (data["key"]) {
|
17 |
+
case "ready":
|
18 |
+
clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
19 |
+
$(sourceFrame).removeData();
|
20 |
+
(sourceFrame.contentWindow || sourceFrame.contentDocument).postMessage({
|
21 |
+
key: "ackReady",
|
22 |
+
clientHeight: clientHeight
|
23 |
+
}, "*");
|
24 |
+
break;
|
25 |
+
case "resize":
|
26 |
+
var $sourceFrame = $(sourceFrame);
|
27 |
+
|
28 |
+
if (data.fullPage) {
|
29 |
+
var resizeFP = $.proxy(function (iframeWindow) {
|
30 |
+
if (clientHeight != document.documentElement.clientHeight || document.body.clientHeight) {
|
31 |
+
clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
32 |
+
iframeWindow.postMessage({
|
33 |
+
key: "update",
|
34 |
+
clientHeight: clientHeight
|
35 |
+
}, "*");
|
36 |
+
}
|
37 |
+
}, this, (sourceFrame.contentWindow || sourceFrame.contentDocument));
|
38 |
+
if ($sourceFrame.data("fullpage") != data.fullPage) {
|
39 |
+
$sourceFrame.data("fullpage", data.fullPage);
|
40 |
+
resizeFP();
|
41 |
+
$(window).on("resize", resizeFP);
|
42 |
+
}
|
43 |
+
}
|
44 |
+
$sourceFrame.css({
|
45 |
+
height: data.height
|
46 |
+
});
|
47 |
+
|
48 |
+
if (data.forceFull && $sourceFrame.data("forcefull") != data.forceFull) {
|
49 |
+
$sourceFrame.data("forcefull", data.forceFull);
|
50 |
+
|
51 |
+
var $container = $('body');
|
52 |
+
$container.css("overflow-x", "hidden");
|
53 |
+
var resizeFF = function () {
|
54 |
+
var customWidth = 0,
|
55 |
+
adjustLeftOffset = 0;
|
56 |
+
var $fullWidthTo = $('.fl-responsive-preview .fl-builder-content');
|
57 |
+
if ($fullWidthTo.length) {
|
58 |
+
customWidth = $fullWidthTo.width();
|
59 |
+
adjustLeftOffset = $fullWidthTo.offset().left;
|
60 |
+
}
|
61 |
+
|
62 |
+
var windowWidth = customWidth > 0 ? customWidth : (document.body.clientWidth || document.documentElement.clientWidth),
|
63 |
+
outerEl = $sourceFrame.parent(),
|
64 |
+
outerElBoundingRect = outerEl[0].getBoundingClientRect(),
|
65 |
+
outerElOffset,
|
66 |
+
isRTL = $("html").attr("dir") == "rtl";
|
67 |
+
if (isRTL) {
|
68 |
+
outerElOffset = windowWidth - (outerElBoundingRect.left + outerEl.outerWidth());
|
69 |
+
} else {
|
70 |
+
outerElOffset = outerElBoundingRect.left;
|
71 |
+
}
|
72 |
+
$sourceFrame.css(isRTL ? 'marginRight' : 'marginLeft', -outerElOffset - parseInt(outerEl.css('paddingLeft')) - parseInt(outerEl.css('borderLeftWidth')) + adjustLeftOffset)
|
73 |
+
.css("maxWidth", "none")
|
74 |
+
.width(windowWidth);
|
75 |
+
};
|
76 |
+
resizeFF();
|
77 |
+
$(window).on("resize", resizeFF);
|
78 |
+
|
79 |
+
}
|
80 |
+
break;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
});
|
84 |
+
window.n2SSIframeLoader = function (iframe) {
|
85 |
+
frames.push(iframe);
|
86 |
+
}
|
87 |
+
})(jQuery);
|
88 |
+
}
|
includes/integrations/Divi/SmartSlider3Extension.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class DiviSmartSlider3Extension extends DiviExtension {
|
4 |
+
|
5 |
+
public $gettext_domain = 'smart-slider-3';
|
6 |
+
|
7 |
+
public $name = 'smart-slider-3';
|
8 |
+
|
9 |
+
public $version = '1.0.0';
|
10 |
+
|
11 |
+
public function __construct($name = 'smart-slider-3', $args = array()) {
|
12 |
+
$this->plugin_dir = plugin_dir_path(__FILE__);
|
13 |
+
$this->plugin_dir_url = plugin_dir_url(__FILE__);
|
14 |
+
|
15 |
+
|
16 |
+
parent::__construct($name, $args);
|
17 |
+
|
18 |
+
add_action('admin_enqueue_scripts', array(
|
19 |
+
$this,
|
20 |
+
'admin_enqueue_scripts'
|
21 |
+
));
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Enqueues minified, production javascript bundles.
|
27 |
+
*
|
28 |
+
* @since 3.1
|
29 |
+
*/
|
30 |
+
protected function _enqueue_bundles() {
|
31 |
+
|
32 |
+
if (et_core_is_fb_enabled()) {
|
33 |
+
// Builder Bundle
|
34 |
+
$bundle_url = "{$this->plugin_dir_url}scripts/builder-bundle.min.js";
|
35 |
+
|
36 |
+
wp_enqueue_script("{$this->name}-builder-bundle", $bundle_url, $this->_bundle_dependencies['builder'], $this->version, true);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Sets initial value of {@see self::$_bundle_dependencies}.
|
42 |
+
*
|
43 |
+
* @since 3.1
|
44 |
+
*/
|
45 |
+
protected function _set_bundle_dependencies() {
|
46 |
+
$this->_bundle_dependencies = array(
|
47 |
+
'builder' => array(
|
48 |
+
'react',
|
49 |
+
'react-dom'
|
50 |
+
)
|
51 |
+
);
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Enqueues the extension's scripts and styles.
|
56 |
+
* {@see 'wp_enqueue_scripts'}
|
57 |
+
*
|
58 |
+
* @since 3.1
|
59 |
+
*/
|
60 |
+
public function wp_hook_enqueue_scripts() {
|
61 |
+
|
62 |
+
if (et_core_is_fb_enabled()) {
|
63 |
+
|
64 |
+
$styles_url = "{$this->plugin_dir_url}styles/style.min.css";
|
65 |
+
|
66 |
+
wp_enqueue_style("{$this->name}-styles", $styles_url, array(), $this->version);
|
67 |
+
}
|
68 |
+
|
69 |
+
$this->_enqueue_bundles();
|
70 |
+
}
|
71 |
+
|
72 |
+
public function admin_enqueue_scripts() {
|
73 |
+
|
74 |
+
$styles_url = "{$this->plugin_dir_url}styles/admin/style.min.css";
|
75 |
+
|
76 |
+
wp_enqueue_style("{$this->name}-admin-styles", $styles_url, array(), $this->version);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
new DiviSmartSlider3Extension;
|
includes/integrations/Divi/loader.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!class_exists('ET_Builder_Element')) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
+
require_once dirname(__FILE__) . '/modules/SmartSlider3/SmartSlider3.php';
|
8 |
+
require_once dirname(__FILE__) . '/modules/FullwidthSmartSlider3/FullwidthSmartSlider3.php';
|
includes/integrations/Divi/modules/FullwidthSmartSlider3/FullwidthSmartSlider3.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Nextend_FullwidthSmartSlider3 extends Nextend_SmartSlider3 {
|
4 |
+
|
5 |
+
public function init() {
|
6 |
+
$this->name = 'Fullwidth Smart Slider 3';
|
7 |
+
$this->slug = 'et_pb_nextend_smart_slider_3_fullwidth';
|
8 |
+
$this->vb_support = 'on';
|
9 |
+
$this->fullwidth = true;
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
new Nextend_FullwidthSmartSlider3();
|
includes/integrations/Divi/modules/SmartSlider3/SmartSlider3.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Nextend_SmartSlider3 extends ET_Builder_Module {
|
4 |
+
|
5 |
+
public $slug = 'et_pb_nextend_smart_slider_3';
|
6 |
+
public $vb_support = 'on';
|
7 |
+
|
8 |
+
protected $module_credits = array(
|
9 |
+
'module_uri' => 'https://smartslider3.com',
|
10 |
+
'author' => 'Nextendweb',
|
11 |
+
'author_uri' => 'https://nextendweb.com',
|
12 |
+
);
|
13 |
+
|
14 |
+
public function init() {
|
15 |
+
$this->name = 'Smart Slider 3';
|
16 |
+
|
17 |
+
|
18 |
+
$this->settings_modal_toggles = array(
|
19 |
+
'general' => array(
|
20 |
+
'toggles' => array(
|
21 |
+
'content' => esc_html__('Content', 'et_builder')
|
22 |
+
),
|
23 |
+
),
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
public function add_styles_scripts() {
|
28 |
+
?>
|
29 |
+
<script type="text/javascript">
|
30 |
+
<?php
|
31 |
+
echo file_get_contents(NEXTEND_SMARTSLIDER_3 . '/includes/iframe.js');
|
32 |
+
?>
|
33 |
+
window.SmartSlider3IframeUrl = <?php echo json_encode(site_url('') . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe'); ?>;
|
34 |
+
</script>
|
35 |
+
<?php
|
36 |
+
}
|
37 |
+
|
38 |
+
public function get_fields() {
|
39 |
+
|
40 |
+
add_action('wp_footer', array(
|
41 |
+
$this,
|
42 |
+
'add_styles_scripts'
|
43 |
+
));
|
44 |
+
|
45 |
+
N2base::getApplication('smartslider')
|
46 |
+
->getApplicationType('backend');
|
47 |
+
N2Loader::import("models.Sliders", "smartslider");
|
48 |
+
|
49 |
+
$slidersModel = new N2SmartsliderSlidersModel();
|
50 |
+
|
51 |
+
$options = array();
|
52 |
+
foreach ($slidersModel->getAll(0) AS $slider) {
|
53 |
+
if ($slider['type'] == 'group') {
|
54 |
+
if (!empty($slider['alias'])) {
|
55 |
+
$options[$slider['alias']] = '[' . strtoupper(n2_('Group')) . '] - ' . $slider['title'] . ' #Alias: ' . $slider['alias'];
|
56 |
+
}
|
57 |
+
$options[$slider['id']] = '[' . strtoupper(n2_('Group')) . '] - ' . $slider['title'] . ' #' . $slider['id'];
|
58 |
+
foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
|
59 |
+
if (!empty($_slider['alias'])) {
|
60 |
+
$options[$_slider['alias']] = '----' . $_slider['title'] . ' #Alias: ' . $_slider['alias'];
|
61 |
+
}
|
62 |
+
$options[$_slider['id']] = '----' . $_slider['title'] . ' #' . $_slider['id'];
|
63 |
+
}
|
64 |
+
} else {
|
65 |
+
if (!empty($slider['alias'])) {
|
66 |
+
$options[$slider['alias']] = $slider['title'] . ' #Alias: ' . $slider['alias'];
|
67 |
+
}
|
68 |
+
$options[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
return array(
|
73 |
+
'slider' => array(
|
74 |
+
'label' => 'Slider',
|
75 |
+
'option_category' => 'basic_option',
|
76 |
+
'type' => 'select',
|
77 |
+
'options' => $options,
|
78 |
+
|
79 |
+
'description' => esc_html__('Here you can create the content that will be used within the module.', 'et_builder'),
|
80 |
+
'is_fb_content' => true,
|
81 |
+
'toggle_slug' => 'content',
|
82 |
+
),
|
83 |
+
);
|
84 |
+
}
|
85 |
+
|
86 |
+
public function render($attrs, $content = null, $render_slug) {
|
87 |
+
if (is_numeric($this->props['slider'])) {
|
88 |
+
return do_shortcode('[smartslider3 slider=' . $this->props['slider'] . ']');
|
89 |
+
}
|
90 |
+
|
91 |
+
return do_shortcode('[smartslider3 alias="' . $this->props['slider'] . '"]');
|
92 |
+
}
|
93 |
+
|
94 |
+
public function get_advanced_fields_config() {
|
95 |
+
return false;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
new Nextend_SmartSlider3;
|
includes/integrations/Divi/scripts/builder-bundle.min.js
ADDED
@@ -0,0 +1,233 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function (e) {
|
2 |
+
var t = {};
|
3 |
+
|
4 |
+
function n(r) {
|
5 |
+
if (t[r]) return t[r].exports;
|
6 |
+
var o = t[r] = {i: r, l: !1, exports: {}};
|
7 |
+
return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports
|
8 |
+
}
|
9 |
+
|
10 |
+
n.m = e, n.c = t, n.d = function (e, t, r) {
|
11 |
+
n.o(e, t) || Object.defineProperty(e, t, {configurable: !1, enumerable: !0, get: r})
|
12 |
+
}, n.n = function (e) {
|
13 |
+
var t = e && e.__esModule ? function () {
|
14 |
+
return e.default
|
15 |
+
} : function () {
|
16 |
+
return e
|
17 |
+
};
|
18 |
+
return n.d(t, "a", t), t
|
19 |
+
}, n.o = function (e, t) {
|
20 |
+
return Object.prototype.hasOwnProperty.call(e, t)
|
21 |
+
}, n.p = "/", n(n.s = 1)
|
22 |
+
}([function (e, t) {
|
23 |
+
}, function (e, t, n) {
|
24 |
+
n(2), e.exports = n(3)
|
25 |
+
}, function (e, t, n) {
|
26 |
+
"use strict"
|
27 |
+
}, function (e, t, n) {
|
28 |
+
"use strict";
|
29 |
+
Object.defineProperty(t, "__esModule", {value: !0});
|
30 |
+
var r = n(4), o = n.n(r), u = n(5);
|
31 |
+
o()(window).on("et_builder_api_ready", function (e, t) {
|
32 |
+
t.registerModules(u.a)
|
33 |
+
})
|
34 |
+
}, function (e, t) {
|
35 |
+
e.exports = jQuery
|
36 |
+
}, function (e, t, n) {
|
37 |
+
"use strict";
|
38 |
+
var r = n(6);
|
39 |
+
t.a = [r.a]
|
40 |
+
}, function (e, t, n) {
|
41 |
+
"use strict";
|
42 |
+
var r = n(7), o = n.n(r), u = n(0);
|
43 |
+
n.n(u);
|
44 |
+
|
45 |
+
function i(e) {
|
46 |
+
return (i = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function (e) {
|
47 |
+
return typeof e
|
48 |
+
} : function (e) {
|
49 |
+
return e && "function" === typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
|
50 |
+
})(e)
|
51 |
+
}
|
52 |
+
|
53 |
+
function c(e, t) {
|
54 |
+
for (var n = 0; n < t.length; n++) {
|
55 |
+
var r = t[n];
|
56 |
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
function a(e, t) {
|
61 |
+
return !t || "object" !== i(t) && "function" !== typeof t ? function (e) {
|
62 |
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
63 |
+
return e
|
64 |
+
}(e) : t
|
65 |
+
}
|
66 |
+
|
67 |
+
var l = function (e) {
|
68 |
+
function t() {
|
69 |
+
return function (e, t) {
|
70 |
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
|
71 |
+
}(this, t), a(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments))
|
72 |
+
}
|
73 |
+
|
74 |
+
var n, u, i;
|
75 |
+
return function (e, t) {
|
76 |
+
if ("function" !== typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
77 |
+
e.prototype = Object.create(t && t.prototype, {
|
78 |
+
constructor: {
|
79 |
+
value: e,
|
80 |
+
enumerable: !1,
|
81 |
+
writable: !0,
|
82 |
+
configurable: !0
|
83 |
+
}
|
84 |
+
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
|
85 |
+
}(t, r["Component"]), n = t, (u = [{
|
86 |
+
key: "render", value: function () {
|
87 |
+
var iframe = o.a.createElement("iframe", {
|
88 |
+
ref: 'frame',
|
89 |
+
className: "n2-ss-slider-frame",
|
90 |
+
style: {
|
91 |
+
width: '100%',
|
92 |
+
display: 'block',
|
93 |
+
border: 0
|
94 |
+
},
|
95 |
+
src: window.SmartSlider3IframeUrl + "&sliderid=" + this.props.slider,
|
96 |
+
frameborder: 0
|
97 |
+
});
|
98 |
+
return o.a.createElement(r.Fragment, null, iframe)
|
99 |
+
}
|
100 |
+
}, {
|
101 |
+
key: "componentDidMount", value: function () {
|
102 |
+
this.refs.frame.addEventListener('load', function (e) {
|
103 |
+
n2SSIframeLoader(e.target);
|
104 |
+
});
|
105 |
+
}
|
106 |
+
}]) && c(n.prototype, u), i && c(n, i), t
|
107 |
+
}();
|
108 |
+
Object.defineProperty(l, "slug", {
|
109 |
+
configurable: !0,
|
110 |
+
enumerable: !0,
|
111 |
+
writable: !0,
|
112 |
+
value: "et_pb_nextend_smart_slider_3"
|
113 |
+
}), t.a = l
|
114 |
+
}, function (e, t) {
|
115 |
+
e.exports = React
|
116 |
+
}]);
|
117 |
+
|
118 |
+
!function (e) {
|
119 |
+
var t = {};
|
120 |
+
|
121 |
+
function n(r) {
|
122 |
+
if (t[r]) return t[r].exports;
|
123 |
+
var o = t[r] = {i: r, l: !1, exports: {}};
|
124 |
+
return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports
|
125 |
+
}
|
126 |
+
|
127 |
+
n.m = e, n.c = t, n.d = function (e, t, r) {
|
128 |
+
n.o(e, t) || Object.defineProperty(e, t, {configurable: !1, enumerable: !0, get: r})
|
129 |
+
}, n.n = function (e) {
|
130 |
+
var t = e && e.__esModule ? function () {
|
131 |
+
return e.default
|
132 |
+
} : function () {
|
133 |
+
return e
|
134 |
+
};
|
135 |
+
return n.d(t, "a", t), t
|
136 |
+
}, n.o = function (e, t) {
|
137 |
+
return Object.prototype.hasOwnProperty.call(e, t)
|
138 |
+
}, n.p = "/", n(n.s = 1)
|
139 |
+
}([function (e, t) {
|
140 |
+
}, function (e, t, n) {
|
141 |
+
n(2), e.exports = n(3)
|
142 |
+
}, function (e, t, n) {
|
143 |
+
"use strict"
|
144 |
+
}, function (e, t, n) {
|
145 |
+
"use strict";
|
146 |
+
Object.defineProperty(t, "__esModule", {value: !0});
|
147 |
+
var r = n(4), o = n.n(r), u = n(5);
|
148 |
+
o()(window).on("et_builder_api_ready", function (e, t) {
|
149 |
+
t.registerModules(u.a)
|
150 |
+
})
|
151 |
+
}, function (e, t) {
|
152 |
+
e.exports = jQuery
|
153 |
+
}, function (e, t, n) {
|
154 |
+
"use strict";
|
155 |
+
var r = n(6);
|
156 |
+
t.a = [r.a]
|
157 |
+
}, function (e, t, n) {
|
158 |
+
"use strict";
|
159 |
+
var r = n(7), o = n.n(r), u = n(0);
|
160 |
+
n.n(u);
|
161 |
+
|
162 |
+
function i(e) {
|
163 |
+
return (i = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function (e) {
|
164 |
+
return typeof e
|
165 |
+
} : function (e) {
|
166 |
+
return e && "function" === typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
|
167 |
+
})(e)
|
168 |
+
}
|
169 |
+
|
170 |
+
function c(e, t) {
|
171 |
+
for (var n = 0; n < t.length; n++) {
|
172 |
+
var r = t[n];
|
173 |
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
function a(e, t) {
|
178 |
+
return !t || "object" !== i(t) && "function" !== typeof t ? function (e) {
|
179 |
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
180 |
+
return e
|
181 |
+
}(e) : t
|
182 |
+
}
|
183 |
+
|
184 |
+
var l = function (e) {
|
185 |
+
function t() {
|
186 |
+
return function (e, t) {
|
187 |
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
|
188 |
+
}(this, t), a(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments))
|
189 |
+
}
|
190 |
+
|
191 |
+
var n, u, i;
|
192 |
+
return function (e, t) {
|
193 |
+
if ("function" !== typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
194 |
+
e.prototype = Object.create(t && t.prototype, {
|
195 |
+
constructor: {
|
196 |
+
value: e,
|
197 |
+
enumerable: !1,
|
198 |
+
writable: !0,
|
199 |
+
configurable: !0
|
200 |
+
}
|
201 |
+
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
|
202 |
+
}(t, r["Component"]), n = t, (u = [{
|
203 |
+
key: "render", value: function () {
|
204 |
+
var iframe = o.a.createElement("iframe", {
|
205 |
+
ref: 'frame',
|
206 |
+
className: "n2-ss-slider-frame",
|
207 |
+
style: {
|
208 |
+
width: '100%',
|
209 |
+
display: 'block',
|
210 |
+
border: 0
|
211 |
+
},
|
212 |
+
src: window.SmartSlider3IframeUrl + "&sliderid=" + this.props.slider,
|
213 |
+
frameborder: 0
|
214 |
+
});
|
215 |
+
return o.a.createElement(r.Fragment, null, iframe)
|
216 |
+
}
|
217 |
+
}, {
|
218 |
+
key: "componentDidMount", value: function () {
|
219 |
+
this.refs.frame.addEventListener('load', function (e) {
|
220 |
+
n2SSIframeLoader(e.target);
|
221 |
+
});
|
222 |
+
}
|
223 |
+
}]) && c(n.prototype, u), i && c(n, i), t
|
224 |
+
}();
|
225 |
+
Object.defineProperty(l, "slug", {
|
226 |
+
configurable: !0,
|
227 |
+
enumerable: !0,
|
228 |
+
writable: !0,
|
229 |
+
value: "et_pb_nextend_smart_slider_3_fullwidth"
|
230 |
+
}), t.a = l
|
231 |
+
}, function (e, t) {
|
232 |
+
e.exports = React
|
233 |
+
}]);
|
includes/integrations/Divi/styles/admin/style.min.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
.et-pb-all-modules .et_pb_nextend_smart_slider_3_fullwidth:before,
|
2 |
+
.et-pb-all-modules .et_pb_nextend_smart_slider_3:before {
|
3 |
+
content: '\53';
|
4 |
+
}
|
includes/integrations/Divi/styles/style.min.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
.et-fb-modules-list .et_fb_nextend_smart_slider_3_fullwidth:before,
|
2 |
+
.et-fb-modules-list .et_fb_nextend_smart_slider_3:before {
|
3 |
+
content: "S";
|
4 |
+
}
|
includes/integrations/VisualComposer.php
CHANGED
@@ -15,6 +15,27 @@ class NextendSmartSlider3VisualComposer {
|
|
15 |
add_action('vc_frontend_editor_render', 'n2_visualcomposer_force_iframe');
|
16 |
add_action('vc_front_load_page_', 'n2_visualcomposer_force_iframe');
|
17 |
add_action('vc_load_shortcode', 'n2_visualcomposer_force_iframe');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
public static function vc_add_element() {
|
15 |
add_action('vc_frontend_editor_render', 'n2_visualcomposer_force_iframe');
|
16 |
add_action('vc_front_load_page_', 'n2_visualcomposer_force_iframe');
|
17 |
add_action('vc_load_shortcode', 'n2_visualcomposer_force_iframe');
|
18 |
+
|
19 |
+
|
20 |
+
add_action('vc_before_init_base', 'NextendSmartSlider3VisualComposer::vc_before_init_base');
|
21 |
+
}
|
22 |
+
|
23 |
+
public static function vc_before_init_base() {
|
24 |
+
add_filter('the_excerpt', 'NextendSmartSlider3VisualComposer::vc_before_the_excerpt', -10000);
|
25 |
+
|
26 |
+
add_filter('the_excerpt', 'NextendSmartSlider3VisualComposer::vc_after_the_excerpt', 10000);
|
27 |
+
}
|
28 |
+
|
29 |
+
public static function vc_before_the_excerpt($output) {
|
30 |
+
add_shortcode('smartslider3', 'N2SS3Shortcode::doNoopShortcode');
|
31 |
+
|
32 |
+
return $output;
|
33 |
+
}
|
34 |
+
|
35 |
+
public static function vc_after_the_excerpt($output) {
|
36 |
+
add_shortcode('smartslider3', 'N2SS3Shortcode::doShortcode');
|
37 |
+
|
38 |
+
return $output;
|
39 |
}
|
40 |
|
41 |
public static function vc_add_element() {
|
includes/integrations/unyson/smartslider/class-fw-extension-smartslider.php
CHANGED
@@ -13,6 +13,6 @@ class FW_Extension_SmartSlider extends FW_Extension {
|
|
13 |
}
|
14 |
|
15 |
public function _action_option_types_init() {
|
16 |
-
require_once dirname(__FILE__) . '/
|
17 |
}
|
18 |
}
|
13 |
}
|
14 |
|
15 |
public function _action_option_types_init() {
|
16 |
+
require_once dirname(__FILE__) . '/options/option-types.php';
|
17 |
}
|
18 |
}
|
includes/integrations/unyson/smartslider/{includes → options}/option-types.php
RENAMED
@@ -54,7 +54,7 @@ class FW_Option_Type_SmartSliderChooser extends FW_Option_Type_Select {
|
|
54 |
'style' => 'vertical-align:middle;',
|
55 |
'class' => 'button button-primary',
|
56 |
'onclick' => SmartSlider3::sliderSelectAction("jQuery('#fw-edit-options-modal-id')") . 'return false;'
|
57 |
-
)) . '<span style="margin: 0 10px;
|
58 |
}
|
59 |
|
60 |
protected function _get_value_from_input($option, $input_value) {
|
54 |
'style' => 'vertical-align:middle;',
|
55 |
'class' => 'button button-primary',
|
56 |
'onclick' => SmartSlider3::sliderSelectAction("jQuery('#fw-edit-options-modal-id')") . 'return false;'
|
57 |
+
)) . '<span style="margin: 0 10px;vertical-align:middle;text-transform: uppercase;">' . n2_('or') . '</span>' . parent::_render($id, $option, $data));
|
58 |
}
|
59 |
|
60 |
protected function _get_value_from_input($option, $input_value) {
|
includes/shortcode.php
CHANGED
@@ -14,8 +14,8 @@ class N2SS3Shortcode {
|
|
14 |
public static function doShortcode($parameters) {
|
15 |
|
16 |
if (!empty($parameters['alias'])) {
|
17 |
-
|
18 |
-
|
19 |
|
20 |
if (self::$iframe) {
|
21 |
if (isset($parameters['slider'])) {
|
@@ -30,84 +30,7 @@ class N2SS3Shortcode {
|
|
30 |
|
31 |
public static function renderIframe($sliderIDorAlias) {
|
32 |
|
33 |
-
$script =
|
34 |
-
(function($){
|
35 |
-
var frames = [],
|
36 |
-
clientHeight = 0;
|
37 |
-
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
38 |
-
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
|
39 |
-
var sourceFrame = false;
|
40 |
-
for(var i = 0; i < frames.length; i++){
|
41 |
-
if(e.source == (frames[i].contentWindow || frames[i].contentDocument)){
|
42 |
-
sourceFrame = frames[i];
|
43 |
-
}
|
44 |
-
}
|
45 |
-
if (sourceFrame) {
|
46 |
-
var data = e[e.message ? "message" : "data"];
|
47 |
-
|
48 |
-
switch(data["key"]){
|
49 |
-
case "ready":
|
50 |
-
clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
51 |
-
$(sourceFrame).removeData();
|
52 |
-
(sourceFrame.contentWindow || sourceFrame.contentDocument).postMessage({
|
53 |
-
key: "ackReady",
|
54 |
-
clientHeight: clientHeight
|
55 |
-
}, "*");
|
56 |
-
break;
|
57 |
-
case "resize":
|
58 |
-
var $sourceFrame = $(sourceFrame);
|
59 |
-
|
60 |
-
if(data.fullPage){
|
61 |
-
var resizeFP = function(){
|
62 |
-
if(clientHeight != document.documentElement.clientHeight || document.body.clientHeight){
|
63 |
-
clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
64 |
-
(sourceFrame.contentWindow || sourceFrame.contentDocument).postMessage({
|
65 |
-
key: "update",
|
66 |
-
clientHeight: clientHeight
|
67 |
-
}, "*");
|
68 |
-
}
|
69 |
-
};
|
70 |
-
if($sourceFrame.data("fullpage") != data.fullPage){
|
71 |
-
$sourceFrame.data("fullpage", data.fullPage);
|
72 |
-
resizeFP();
|
73 |
-
$(window).on("resize", resizeFP);
|
74 |
-
}
|
75 |
-
}
|
76 |
-
$sourceFrame.css({
|
77 |
-
height: data.height
|
78 |
-
});
|
79 |
-
|
80 |
-
if(data.forceFull && $sourceFrame.data("forcefull") != data.forceFull){
|
81 |
-
$sourceFrame.data("forcefull", data.forceFull);
|
82 |
-
$("body").css("overflow-x", "hidden");
|
83 |
-
var resizeFF = function(){
|
84 |
-
var windowWidth = document.body.clientWidth || document.documentElement.clientWidth,
|
85 |
-
outerEl = $sourceFrame.parent(),
|
86 |
-
outerElOffset = outerEl.offset();
|
87 |
-
$sourceFrame.css("maxWidth", "none");
|
88 |
-
|
89 |
-
if ($("html").attr("dir") == "rtl") {
|
90 |
-
var bodyMarginRight = parseInt($(document.body).css("marginRight"));
|
91 |
-
outerElOffset.right = $(window).width() - (outerElOffset.left + outerEl.outerWidth()) - bodyMarginRight;
|
92 |
-
$sourceFrame.css("marginRight", -outerElOffset.right - parseInt(outerEl.css("paddingRight")) - parseInt(outerEl.css("borderRightWidth"))).width(windowWidth);
|
93 |
-
} else {
|
94 |
-
var bodyMarginLeft = parseInt($(document.body).css("marginLeft"));
|
95 |
-
$sourceFrame.css("marginLeft", -outerElOffset.left - parseInt(outerEl.css("paddingLeft")) - parseInt(outerEl.css("borderLeftWidth")) + bodyMarginLeft).width(windowWidth);
|
96 |
-
}
|
97 |
-
};
|
98 |
-
resizeFF();
|
99 |
-
$(window).on("resize", resizeFF);
|
100 |
-
|
101 |
-
}
|
102 |
-
break;
|
103 |
-
}
|
104 |
-
}
|
105 |
-
});
|
106 |
-
window.n2SSIframeLoader = function(iframe){
|
107 |
-
frames.push(iframe);
|
108 |
-
}
|
109 |
-
})(jQuery);
|
110 |
-
}';
|
111 |
|
112 |
$attributes = array(
|
113 |
'class' => "n2-ss-slider-frame",
|
@@ -148,27 +71,27 @@ class N2SS3Shortcode {
|
|
148 |
if (isset($parameters['logged_in'])) {
|
149 |
$logged_in = boolval($parameters['logged_in']);
|
150 |
if (is_user_logged_in() !== $logged_in) {
|
151 |
-
|
152 |
-
|
153 |
}
|
154 |
|
155 |
if (isset($parameters['role']) || isset($parameters['cap'])) {
|
156 |
-
|
157 |
|
158 |
if (isset($parameters['role'])) {
|
159 |
-
|
160 |
if (!in_array($parameters['role'], $current_user_roles)) {
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
|
165 |
if (isset($parameters['cap'])) {
|
166 |
-
|
167 |
if (!isset($current_user_caps[$parameters['cap']]) || !$current_user_caps[$parameters['cap']]) {
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
|
173 |
if (isset($parameters['slide'])) {
|
174 |
$slideTo = intval($parameters['slide']);
|
@@ -218,27 +141,27 @@ class N2SS3Shortcode {
|
|
218 |
}
|
219 |
|
220 |
public static function addShortCode() {
|
221 |
-
|
222 |
}
|
223 |
|
224 |
public static function addNoopShortCode() {
|
225 |
-
|
226 |
-
|
227 |
|
228 |
public static function doNoopShortcode() {
|
229 |
-
|
230 |
-
|
231 |
|
232 |
public static function removeShortcode() {
|
233 |
-
|
234 |
-
|
235 |
}
|
236 |
|
237 |
N2SS3Shortcode::addShortCode();
|
238 |
|
239 |
if (defined('DOING_AJAX') && DOING_AJAX) {
|
240 |
if (isset($_POST['action']) && ($_POST['action'] == 'stpb_preview_builder_item' || $_POST['action'] == 'stpb_load_builder_templates' || $_POST['action'] == 'stpb_load_template')) {
|
241 |
-
|
242 |
}
|
243 |
}
|
244 |
|
14 |
public static function doShortcode($parameters) {
|
15 |
|
16 |
if (!empty($parameters['alias'])) {
|
17 |
+
$parameters['slider'] = $parameters['alias'];
|
18 |
+
}
|
19 |
|
20 |
if (self::$iframe) {
|
21 |
if (isset($parameters['slider'])) {
|
30 |
|
31 |
public static function renderIframe($sliderIDorAlias) {
|
32 |
|
33 |
+
$script = file_get_contents(dirname(__FILE__) . '/iframe.js');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
$attributes = array(
|
36 |
'class' => "n2-ss-slider-frame",
|
71 |
if (isset($parameters['logged_in'])) {
|
72 |
$logged_in = boolval($parameters['logged_in']);
|
73 |
if (is_user_logged_in() !== $logged_in) {
|
74 |
+
return '';
|
75 |
+
}
|
76 |
}
|
77 |
|
78 |
if (isset($parameters['role']) || isset($parameters['cap'])) {
|
79 |
+
$current_user = wp_get_current_user();
|
80 |
|
81 |
if (isset($parameters['role'])) {
|
82 |
+
$current_user_roles = $current_user->roles;
|
83 |
if (!in_array($parameters['role'], $current_user_roles)) {
|
84 |
+
return '';
|
85 |
+
}
|
86 |
+
}
|
87 |
|
88 |
if (isset($parameters['cap'])) {
|
89 |
+
$current_user_caps = $current_user->allcaps;
|
90 |
if (!isset($current_user_caps[$parameters['cap']]) || !$current_user_caps[$parameters['cap']]) {
|
91 |
+
return '';
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
|
96 |
if (isset($parameters['slide'])) {
|
97 |
$slideTo = intval($parameters['slide']);
|
141 |
}
|
142 |
|
143 |
public static function addShortCode() {
|
144 |
+
add_shortcode('smartslider3', 'N2SS3Shortcode::doShortcode');
|
145 |
}
|
146 |
|
147 |
public static function addNoopShortCode() {
|
148 |
+
add_shortcode('smartslider3', 'N2SS3Shortcode::doNoopShortcode');
|
149 |
+
}
|
150 |
|
151 |
public static function doNoopShortcode() {
|
152 |
+
return '';
|
153 |
+
}
|
154 |
|
155 |
public static function removeShortcode() {
|
156 |
+
remove_shortcode('smartslider3');
|
157 |
+
}
|
158 |
}
|
159 |
|
160 |
N2SS3Shortcode::addShortCode();
|
161 |
|
162 |
if (defined('DOING_AJAX') && DOING_AJAX) {
|
163 |
if (isset($_POST['action']) && ($_POST['action'] == 'stpb_preview_builder_item' || $_POST['action'] == 'stpb_load_builder_templates' || $_POST['action'] == 'stpb_load_template')) {
|
164 |
+
N2SS3Shortcode::removeShortcode();
|
165 |
}
|
166 |
}
|
167 |
|
includes/smartslider3.php
CHANGED
@@ -9,11 +9,8 @@ if (!class_exists('N2WP', false)) {
|
|
9 |
class SmartSlider3 {
|
10 |
|
11 |
public static function init() {
|
12 |
-
|
13 |
-
|
14 |
-
} else {
|
15 |
-
add_action('nextend_loaded', 'SmartSlider3::registerApplication');
|
16 |
-
}
|
17 |
|
18 |
add_action('widgets_init', 'SmartSlider3::widgets_init', 11);
|
19 |
add_action('widgets_admin_page', 'SmartSlider3::widgets_admin_page');
|
@@ -28,8 +25,6 @@ class SmartSlider3 {
|
|
28 |
|
29 |
add_action('network_admin_menu', 'SmartSlider3::nextendNetworkAdminInit');
|
30 |
|
31 |
-
register_activation_hook(NEXTEND_SMARTSLIDER_3__FILE__, 'SmartSlider3::install');
|
32 |
-
|
33 |
add_action('upgrader_process_complete', 'SmartSlider3::upgrade', 10, 2);
|
34 |
|
35 |
add_action('wpmu_new_blog', 'SmartSlider3::install_new_blog');
|
@@ -43,7 +38,8 @@ class SmartSlider3 {
|
|
43 |
require_once dirname(__FILE__) . '/integrations/acf.php';
|
44 |
}
|
45 |
|
46 |
-
add_action('et_builder_ready', 'SmartSlider3::
|
|
|
47 |
|
48 |
add_action('vc_after_set_mode', 'SmartSlider3::visualComposer');
|
49 |
|
@@ -63,7 +59,7 @@ class SmartSlider3 {
|
|
63 |
SmartSlider3::motoPressCE();
|
64 |
}
|
65 |
|
66 |
-
if (isset($_GET['pswLoad']) && $_GET['pswLoad'] == 1
|
67 |
N2SS3Shortcode::forceIframe('psw');
|
68 |
}
|
69 |
}
|
@@ -179,12 +175,11 @@ class SmartSlider3 {
|
|
179 |
}
|
180 |
|
181 |
public static function nextendAdminInit() {
|
182 |
-
$icon = NEXTEND_SMARTSLIDER_3_URL . '/
|
183 |
if (isset($_REQUEST['page']) && $_REQUEST['page'] == NEXTEND_SMARTSLIDER_3_URL_PATH) {
|
184 |
-
$icon = NEXTEND_SMARTSLIDER_3_URL . '/
|
185 |
}
|
186 |
|
187 |
-
|
188 |
add_menu_page('Smart Slider', 'Smart Slider', 'smartslider', NEXTEND_SMARTSLIDER_3_URL_PATH, 'SmartSlider3::application', $icon);
|
189 |
|
190 |
function nextend_smart_slider_admin_menu() {
|
@@ -330,8 +325,16 @@ class SmartSlider3 {
|
|
330 |
return false;
|
331 |
}
|
332 |
|
333 |
-
public static function
|
334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
}
|
336 |
|
337 |
public static function visualComposer() {
|
9 |
class SmartSlider3 {
|
10 |
|
11 |
public static function init() {
|
12 |
+
|
13 |
+
SmartSlider3::registerApplication();
|
|
|
|
|
|
|
14 |
|
15 |
add_action('widgets_init', 'SmartSlider3::widgets_init', 11);
|
16 |
add_action('widgets_admin_page', 'SmartSlider3::widgets_admin_page');
|
25 |
|
26 |
add_action('network_admin_menu', 'SmartSlider3::nextendNetworkAdminInit');
|
27 |
|
|
|
|
|
28 |
add_action('upgrader_process_complete', 'SmartSlider3::upgrade', 10, 2);
|
29 |
|
30 |
add_action('wpmu_new_blog', 'SmartSlider3::install_new_blog');
|
38 |
require_once dirname(__FILE__) . '/integrations/acf.php';
|
39 |
}
|
40 |
|
41 |
+
add_action('et_builder_ready', 'SmartSlider3::divi_et_builder_ready');
|
42 |
+
add_action('divi_extensions_init', 'SmartSlider3::divi_extensions_init');
|
43 |
|
44 |
add_action('vc_after_set_mode', 'SmartSlider3::visualComposer');
|
45 |
|
59 |
SmartSlider3::motoPressCE();
|
60 |
}
|
61 |
|
62 |
+
if (isset($_GET['pswLoad']) && $_GET['pswLoad'] == 1) {
|
63 |
N2SS3Shortcode::forceIframe('psw');
|
64 |
}
|
65 |
}
|
175 |
}
|
176 |
|
177 |
public static function nextendAdminInit() {
|
178 |
+
$icon = NEXTEND_SMARTSLIDER_3_URL . '/images/icon16x.png';
|
179 |
if (isset($_REQUEST['page']) && $_REQUEST['page'] == NEXTEND_SMARTSLIDER_3_URL_PATH) {
|
180 |
+
$icon = NEXTEND_SMARTSLIDER_3_URL . '/images/icon16x-active.png';
|
181 |
}
|
182 |
|
|
|
183 |
add_menu_page('Smart Slider', 'Smart Slider', 'smartslider', NEXTEND_SMARTSLIDER_3_URL_PATH, 'SmartSlider3::application', $icon);
|
184 |
|
185 |
function nextend_smart_slider_admin_menu() {
|
325 |
return false;
|
326 |
}
|
327 |
|
328 |
+
public static function divi_et_builder_ready() {
|
329 |
+
if (version_compare(ET_CORE_VERSION, '3.1', '<')) {
|
330 |
+
require_once dirname(__FILE__) . '/integrations/Divi.php';
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
public static function divi_extensions_init() {
|
335 |
+
if (version_compare(ET_CORE_VERSION, '3.1', '>=')) {
|
336 |
+
require_once dirname(__FILE__) . '/integrations/Divi/SmartSlider3Extension.php';
|
337 |
+
}
|
338 |
}
|
339 |
|
340 |
public static function visualComposer() {
|
includes/widget.php
CHANGED
@@ -20,9 +20,6 @@ class N2SS3Widget extends WP_Widget {
|
|
20 |
$this,
|
21 |
'notPreventRender'
|
22 |
), 10000000000);
|
23 |
-
|
24 |
-
// Enable shortcodes for text widgets
|
25 |
-
add_filter('widget_text', 'do_shortcode');
|
26 |
}
|
27 |
|
28 |
public static function register_widget() {
|
@@ -89,30 +86,30 @@ class N2SS3Widget extends WP_Widget {
|
|
89 |
|
90 |
$choices = array();
|
91 |
foreach ($slidersModel->getAll(0) AS $slider) {
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
|
117 |
}
|
118 |
$value = $instance['slider'];
|
20 |
$this,
|
21 |
'notPreventRender'
|
22 |
), 10000000000);
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
public static function register_widget() {
|
86 |
|
87 |
$choices = array();
|
88 |
foreach ($slidersModel->getAll(0) AS $slider) {
|
89 |
+
if ($slider['type'] == 'group') {
|
90 |
+
|
91 |
+
$subChoices = array();
|
92 |
+
if (!empty($slider['alias'])) {
|
93 |
+
$subChoices[$slider['alias']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #Alias: ' . $slider['alias'];
|
94 |
+
}
|
95 |
+
$subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
|
96 |
+
foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
|
97 |
+
if (!empty($_slider['alias'])) {
|
98 |
+
$subChoices[$_slider['alias']] = $_slider['title'] . ' #Alias: ' . $_slider['alias'];
|
99 |
+
}
|
100 |
+
$subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
|
101 |
+
}
|
102 |
+
|
103 |
+
$choices[$slider['id']] = array(
|
104 |
+
'label' => $slider['title'] . ' #' . $slider['id'],
|
105 |
+
'choices' => $subChoices
|
106 |
+
);
|
107 |
+
} else {
|
108 |
+
if (!empty($slider['alias'])) {
|
109 |
+
$choices[$slider['alias']] = $slider['title'] . ' #Alias: ' . $slider['alias'];
|
110 |
+
}
|
111 |
+
$choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
|
112 |
+
}
|
113 |
|
114 |
}
|
115 |
$value = $instance['slider'];
|
library/media/admin/dist/smartslider-backend.css
CHANGED
@@ -21,56 +21,6 @@
|
|
21 |
user-select: none;
|
22 |
}
|
23 |
|
24 |
-
.n2-definition-list dt.n2-ss-slider-ordering {
|
25 |
-
color: #fff;
|
26 |
-
background-color: #212d3a;
|
27 |
-
border: 0;
|
28 |
-
}
|
29 |
-
|
30 |
-
.n2-definition-list dt.n2-ss-slider-ordering > div {
|
31 |
-
padding: 0 30px;
|
32 |
-
}
|
33 |
-
|
34 |
-
.n2-definition-list .n2-ss-slider-ordering .n2-button {
|
35 |
-
min-width: 28px;
|
36 |
-
line-height: 28px;
|
37 |
-
height: 28px;
|
38 |
-
margin-left: 10px;
|
39 |
-
background-color: #54667b;
|
40 |
-
color: #fff;
|
41 |
-
}
|
42 |
-
|
43 |
-
.n2-definition-list .n2-ss-slider-ordering .n2-button.n2-active {
|
44 |
-
background: #0c92df;
|
45 |
-
}
|
46 |
-
|
47 |
-
.n2-definition-list dt.n2-ss-slider-ordering .n2-actions {
|
48 |
-
background-color: #212d3a;
|
49 |
-
padding-top: 16px;
|
50 |
-
}
|
51 |
-
|
52 |
-
.n2-definition-list .n2-ss-slider-ordering > .n2-actions a {
|
53 |
-
display: inline-block;
|
54 |
-
padding: 0;
|
55 |
-
}
|
56 |
-
|
57 |
-
.n2-definition-list .n2-ss-slider-ordering > .n2-actions .n2-i {
|
58 |
-
vertical-align: top;
|
59 |
-
}
|
60 |
-
|
61 |
-
.n2-ss-slide2-list li .n2-actions .n2-i-duplicate,
|
62 |
-
.n2-ss-slide2-list li .n2-actions .n2-i-delete,
|
63 |
-
.n2-ss-slide2-list li .n2-actions .n2-i-star {
|
64 |
-
visibility: hidden;
|
65 |
-
}
|
66 |
-
|
67 |
-
.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-duplicate,
|
68 |
-
.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-delete,
|
69 |
-
.n2-ss-slide2-list li .n2-actions .n2-i-star.n2-active,
|
70 |
-
.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-star {
|
71 |
-
visibility: visible;
|
72 |
-
}
|
73 |
-
|
74 |
/**
|
75 |
Layout
|
76 |
*/
|
@@ -243,6 +193,7 @@ Layout
|
|
243 |
color: #6f653f;
|
244 |
font-size: 12px;
|
245 |
border: 0;
|
|
|
246 |
}
|
247 |
|
248 |
.n2-ss-slider-publish img {
|
@@ -273,7 +224,12 @@ Layout
|
|
273 |
#n2-admin[data-slider-type='block'] .n2-fm-indicator,
|
274 |
#n2-admin[data-slider-type='block'] .n2-fm-bar,
|
275 |
#n2-admin[data-slider-type='block'] .n2-fm-thumbnail {
|
276 |
-
display: none
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
|
279 |
.n2-ss-container-device {
|
@@ -285,30 +241,6 @@ Layout
|
|
285 |
margin-top: 40px;
|
286 |
}
|
287 |
|
288 |
-
.n2-modal.n2-ss-go-pro .n2-modal-window {
|
289 |
-
/*background-color: #fafbff;*/
|
290 |
-
text-align: center;
|
291 |
-
/*color: #6b7989;*/
|
292 |
-
line-height: 2;
|
293 |
-
}
|
294 |
-
|
295 |
-
.n2-modal.n2-ss-go-pro .n2-ss-rate {
|
296 |
-
margin: 50px -20px 0;
|
297 |
-
background: url('../images/free/rate.png');
|
298 |
-
height: 90px;
|
299 |
-
line-height: 90px;
|
300 |
-
color: #ffffff;
|
301 |
-
}
|
302 |
-
|
303 |
-
.n2-modal.n2-ss-go-pro .n2-ss-rate .n2-h3 {
|
304 |
-
display: inline-block;
|
305 |
-
margin-right: 30px;
|
306 |
-
}
|
307 |
-
|
308 |
-
.n2-modal.n2-ss-go-pro .n2-modal-controls {
|
309 |
-
margin-bottom: 40px;
|
310 |
-
}
|
311 |
-
|
312 |
.n2-ss-create-slider-free-sample {
|
313 |
float: left;
|
314 |
height: 70px;
|
@@ -347,6 +279,7 @@ Layout
|
|
347 |
.n2-ss-modal-subscribe .n2-input-button > * {
|
348 |
display: inline-block;
|
349 |
white-space: nowrap;
|
|
|
350 |
}
|
351 |
|
352 |
.n2-input-button input,
|
@@ -362,6 +295,8 @@ Layout
|
|
362 |
border-right: 0;
|
363 |
border-top-left-radius: 3px;
|
364 |
border-bottom-left-radius: 3px;
|
|
|
|
|
365 |
overflow: hidden;
|
366 |
padding: 0 10px;
|
367 |
line-height: 36px;
|
@@ -369,6 +304,7 @@ Layout
|
|
369 |
color: #7b8898;
|
370 |
font-size: 12px;
|
371 |
background: #ffffff;
|
|
|
372 |
}
|
373 |
|
374 |
.n2-input-button .n2-button,
|
@@ -415,13 +351,15 @@ Layout
|
|
415 |
|
416 |
}
|
417 |
|
418 |
-
|
|
|
419 |
margin: 20px 0 0 0;
|
420 |
border-radius: 0;
|
421 |
border: 0;
|
422 |
}
|
423 |
|
424 |
-
|
|
|
425 |
border-radius: 0;
|
426 |
}
|
427 |
|
@@ -453,6 +391,7 @@ Layout
|
|
453 |
|
454 |
.n2-ss-sliders-header > * {
|
455 |
margin: 0 10px;
|
|
|
456 |
}
|
457 |
|
458 |
html[data-sliders='0'] .n2-ss-sliders-header {
|
@@ -470,13 +409,8 @@ html[data-sliders='0'] .n2-ss-sliders-header {
|
|
470 |
|
471 |
#n2-ss-slider-container[data-groupid="0"] .n2-ss-remove-from-group {
|
472 |
display: none;
|
473 |
-
}
|
474 |
-
|
475 |
-
.n2-ss-slider-over-group .n2-box-sortable-placeholder {
|
476 |
-
display: none;
|
477 |
}
|
478 |
-
|
479 |
-
html[data-slides='0'] .n2-ss-create-static-slide {
|
480 |
display: none;
|
481 |
}
|
482 |
|
@@ -572,8 +506,8 @@ html[data-slides='0'] .n2-ss-create-static-slide {
|
|
572 |
box-shadow: none;
|
573 |
}
|
574 |
|
575 |
-
|
576 |
-
|
577 |
display: none;
|
578 |
}
|
579 |
|
@@ -601,10 +535,10 @@ html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-dummy {
|
|
601 |
width: 100%;
|
602 |
height: 100%;
|
603 |
background-color: rgba(32, 41, 52, 0.9);
|
604 |
-
border:
|
605 |
right: 0;
|
606 |
bottom: 0;
|
607 |
-
margin:
|
608 |
vertical-align: bottom;
|
609 |
line-height: 130px;
|
610 |
text-align: center;
|
@@ -615,7 +549,7 @@ html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-dummy {
|
|
615 |
display: block;
|
616 |
}
|
617 |
|
618 |
-
|
619 |
display: none;
|
620 |
}
|
621 |
|
@@ -672,7 +606,7 @@ html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
|
672 |
position: relative;
|
673 |
z-index: 9;
|
674 |
color: #6b7989;
|
675 |
-
margin
|
676 |
}
|
677 |
|
678 |
.n2-ss-bulk-controls {
|
@@ -695,13 +629,13 @@ html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
|
695 |
z-index: 5;
|
696 |
}
|
697 |
|
698 |
-
#n2-ss-slides .n2-box-slide-add > .n2-add-
|
699 |
width: 100%;
|
700 |
height: 135px;
|
701 |
padding: 0;
|
702 |
}
|
703 |
|
704 |
-
#n2-ss-slides .n2-box-slide-add > .n2-add-
|
705 |
display: block;
|
706 |
font-family: 'Nextend' !important;
|
707 |
font-size: 48px;
|
@@ -726,7 +660,7 @@ html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
|
726 |
}
|
727 |
|
728 |
.n2-ss-slides-header > * {
|
729 |
-
vertical-align:
|
730 |
display: inline-block;
|
731 |
}
|
732 |
|
@@ -758,16 +692,98 @@ html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
|
758 |
|
759 |
.n2-ss-block-slides-notice {
|
760 |
display: none;
|
761 |
-
color: #
|
|
|
|
|
|
|
|
|
762 |
}
|
763 |
|
764 |
-
|
765 |
-
|
766 |
}
|
767 |
|
768 |
-
|
769 |
-
display:
|
770 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
/*
|
772 |
MARKINGS
|
773 |
|
@@ -789,8 +805,8 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
789 |
}
|
790 |
|
791 |
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .n2-ss-layer-cc,
|
792 |
-
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .
|
793 |
-
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .
|
794 |
display: none !important;
|
795 |
}
|
796 |
|
@@ -804,14 +820,17 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
804 |
|
805 |
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer {
|
806 |
cursor: move;
|
|
|
|
|
|
|
807 |
background: RGBA(0, 0, 0, 0); /* IE fix, layer empty area doesnt trigger mouseenter when no background */
|
808 |
}
|
809 |
|
810 |
-
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-
|
811 |
cursor: pointer;
|
812 |
}
|
813 |
|
814 |
-
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-
|
815 |
cursor: pointer;
|
816 |
}
|
817 |
|
@@ -829,13 +848,13 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
829 |
cursor: default;
|
830 |
}
|
831 |
|
832 |
-
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .
|
833 |
-
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .
|
834 |
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,
|
835 |
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,
|
836 |
#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
837 |
#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
838 |
-
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-selected .
|
839 |
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-highlight {
|
840 |
display: none !important;
|
841 |
}
|
@@ -859,10 +878,6 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
859 |
width: 1px;
|
860 |
}
|
861 |
|
862 |
-
.n2-sidebar {
|
863 |
-
width: 340px;
|
864 |
-
}
|
865 |
-
|
866 |
.n2-ss-edit-slide-top {
|
867 |
background: #fff;
|
868 |
border-bottom: 1px solid #ccd1d6;
|
@@ -903,6 +918,7 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
903 |
padding: 0 20px;
|
904 |
}
|
905 |
|
|
|
906 |
.n2-ss-edit-slide-top-details .n2-h1 {
|
907 |
color: #606d7b;
|
908 |
margin-bottom: 15px;
|
@@ -910,7 +926,18 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
910 |
line-height: 30px;
|
911 |
}
|
912 |
|
913 |
-
.n2-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
914 |
font-family: 'Nextend' !important;
|
915 |
content: "\e94f";
|
916 |
font-size: 22px;
|
@@ -943,7 +970,7 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
943 |
|
944 |
.n2-ss-edit-slide-top-tabs .n2-button {
|
945 |
border-radius: 0;
|
946 |
-
border-left:
|
947 |
padding: 0 20px;
|
948 |
}
|
949 |
|
@@ -953,15 +980,32 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
953 |
border-left: 2px solid #e0e6ed;
|
954 |
}
|
955 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
.n2-ss-edit-slide-top-tabs .n2-button.n2-last {
|
957 |
border-top-right-radius: 3px;
|
958 |
border-bottom-right-radius: 3px;
|
959 |
}
|
960 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
.n2-ss-edit-slide-top-tabs .n2-button.n2-active {
|
962 |
background: #0c92df;
|
963 |
color: #fff;
|
964 |
-
border-color: #0c92df;
|
965 |
}
|
966 |
|
967 |
.n2-ss-edit-slide-top-tabs .n2-button.n2-active:not(.n2-first) {
|
@@ -981,17 +1025,20 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
981 |
|
982 |
.n2-ss-slider-outer-container {
|
983 |
position: relative;
|
984 |
-
|
985 |
}
|
986 |
|
987 |
.n2-ss-canvas-slider-container {
|
988 |
padding-bottom: 99px;
|
989 |
-
float: left;
|
990 |
margin: 10px;
|
991 |
}
|
992 |
|
993 |
.n2-ss-has-ruler .n2-ss-canvas-slider-container {
|
994 |
-
margin:
|
|
|
|
|
|
|
|
|
995 |
}
|
996 |
|
997 |
.n2-i-desktopPortrait:before {
|
@@ -1044,17 +1091,17 @@ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
|
|
1044 |
background-color: #e9edf0;
|
1045 |
}
|
1046 |
|
1047 |
-
.n2-ss-background-type-image .n2-ss-background-video-param {
|
1048 |
display: none;
|
1049 |
}
|
1050 |
|
1051 |
.n2-ss-background-type-color .n2-ss-background-video-param,
|
1052 |
-
.n2-ss-background-type-color .n2-ss-background-image-param {
|
1053 |
display: none;
|
1054 |
}
|
1055 |
|
1056 |
.n2-ss-background-type-gradient .n2-ss-background-video-param,
|
1057 |
-
.n2-ss-background-type-gradient .n2-ss-background-image-param {
|
1058 |
display: none;
|
1059 |
}
|
1060 |
|
@@ -1187,12 +1234,48 @@ body[data-editormode="content"] #n2-admin .n2-ss-responsive-helper {
|
|
1187 |
|
1188 |
/*for carousel and showcase slide editing*/
|
1189 |
|
1190 |
-
#n2-ss-0 .n2-ss-slide{
|
1191 |
-
opacity:0.3;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1192 |
}
|
1193 |
|
1194 |
-
|
1195 |
-
|
|
|
|
|
1196 |
}
|
1197 |
/*
|
1198 |
MARKINGS
|
@@ -1271,7 +1354,7 @@ body:not(.n2-ss-layer-edit-visible) #n2-ss-layer-window {
|
|
1271 |
width: 100%;
|
1272 |
height: 100%;
|
1273 |
border-radius: 3px;
|
1274 |
-
box-shadow:
|
1275 |
overflow: hidden;
|
1276 |
background: #3c4958;
|
1277 |
z-index: 2;
|
@@ -1504,7 +1587,7 @@ body:not(.n2-ss-layer-edit-visible) #n2-ss-layer-window {
|
|
1504 |
overflow-x: hidden;
|
1505 |
}
|
1506 |
|
1507 |
-
#n2-ss-layer-window .n2-form-element-autocomplete .
|
1508 |
padding-right: 20px;
|
1509 |
}
|
1510 |
|
@@ -1526,7 +1609,7 @@ body:not(.n2-ss-layer-edit-visible) #n2-ss-layer-window {
|
|
1526 |
#n2-tabbed-animations-tabbed .n2-sidebar-tab-switcher .n2-td {
|
1527 |
line-height: 28px;
|
1528 |
height: 28px;
|
1529 |
-
border:
|
1530 |
border-radius: 50px;
|
1531 |
}
|
1532 |
|
@@ -1558,9 +1641,14 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1558 |
text-align: center;
|
1559 |
}
|
1560 |
|
|
|
|
|
|
|
|
|
|
|
1561 |
#n2-ss-add-sidebar .n2-ss-add-sidebar-inner {
|
1562 |
position: relative;
|
1563 |
-
padding-top: 0.
|
1564 |
}
|
1565 |
|
1566 |
#n2-ss-add-sidebar .n2-ss-add-sidebar-inner > * {
|
@@ -1747,43 +1835,43 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1747 |
margin-top: 24px;
|
1748 |
}
|
1749 |
|
1750 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1751 |
content: "\e967";
|
1752 |
}
|
1753 |
|
1754 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1755 |
content: "\e966";
|
1756 |
}
|
1757 |
|
1758 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1759 |
content: "\e961";
|
1760 |
}
|
1761 |
|
1762 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1763 |
content: "\e95f";
|
1764 |
}
|
1765 |
|
1766 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1767 |
content: "\e965";
|
1768 |
}
|
1769 |
|
1770 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1771 |
content: "\e964";
|
1772 |
}
|
1773 |
|
1774 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1775 |
content: "\e963";
|
1776 |
}
|
1777 |
|
1778 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1779 |
content: "\e962";
|
1780 |
}
|
1781 |
|
1782 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1783 |
content: "\e960";
|
1784 |
}
|
1785 |
|
1786 |
-
.n2-ss-core-item[data-item="structure"][data-
|
1787 |
content: "\e95d";
|
1788 |
}
|
1789 |
#n2-ss-toolbar {
|
@@ -1866,7 +1954,7 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1866 |
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner {
|
1867 |
margin-top: 6px;
|
1868 |
min-width: 180px;
|
1869 |
-
box-shadow:
|
1870 |
background-color: #fff;
|
1871 |
border-radius: 3px;
|
1872 |
}
|
@@ -1890,7 +1978,7 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1890 |
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick {
|
1891 |
display: block;
|
1892 |
position: absolute;
|
1893 |
-
right:
|
1894 |
top: 8px;
|
1895 |
border-radius: 3px;
|
1896 |
border: 2px solid #8793a2;
|
@@ -1937,7 +2025,7 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1937 |
}
|
1938 |
|
1939 |
#n2-ss-toolbar .n2-radio-option.n2-first {
|
1940 |
-
border-left-width:
|
1941 |
}
|
1942 |
|
1943 |
#n2-ss-toolbar .n2-radio-option.n2-active {
|
@@ -1945,6 +2033,12 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1945 |
border-color: #0c92df;
|
1946 |
}
|
1947 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1948 |
#n2-ss-toolbar .n2-radio-option.n2-sub-active {
|
1949 |
background-color: #51b82d;
|
1950 |
border-color: #51b82d;
|
@@ -2041,11 +2135,11 @@ html[dir=rtl] .n2-ss-small-more {
|
|
2041 |
|
2042 |
#n2-ss-layers .nextend-sortable-placeholder div {
|
2043 |
position: absolute;
|
2044 |
-
left:
|
2045 |
top: -1px;
|
2046 |
width: 100%;
|
2047 |
height: 0;
|
2048 |
-
box-shadow: 0 0
|
2049 |
}
|
2050 |
|
2051 |
#n2-ss-layers ul .nextend-sortable-placeholder div {
|
@@ -2073,12 +2167,12 @@ html[dir=rtl] .n2-ss-small-more {
|
|
2073 |
}
|
2074 |
|
2075 |
/* Fade out the cloned layer row */
|
2076 |
-
#n2-ss-layers .ui-sortable-helper {
|
2077 |
opacity: 0.5;
|
2078 |
}
|
2079 |
|
2080 |
.n2-list .n2-ss-layer-group-row {
|
2081 |
-
border-bottom:
|
2082 |
}
|
2083 |
|
2084 |
#n2-ss-layers-table .n2-list li {
|
@@ -2204,6 +2298,38 @@ ul > li > ul > li > ul > li > ul > li > ul > li .n2-inline-form {
|
|
2204 |
margin: 0 90px;
|
2205 |
}
|
2206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2207 |
.n2-ss-layerlist-row .n2-inline-form input {
|
2208 |
background: #3c4958 none repeat scroll 0 0;
|
2209 |
color: #b2bfc9;
|
@@ -2247,7 +2373,8 @@ ul > li > ul > li > ul > li > ul > li > ul > li .n2-inline-form {
|
|
2247 |
}
|
2248 |
|
2249 |
html[dir="rtl"] .n2-ss-layer-title .n2-actions-left {
|
2250 |
-
|
|
|
2251 |
}
|
2252 |
|
2253 |
#n2-ss-layer-list .n2-ss-layerlist-row.n2-active > .n2-ss-layer-title,
|
@@ -2493,6 +2620,7 @@ MARKINGS
|
|
2493 |
padding-bottom: 400px;
|
2494 |
padding-bottom: 40vh;
|
2495 |
position: relative;
|
|
|
2496 |
border-top: 1px solid #ccd1d6;
|
2497 |
}
|
2498 |
|
@@ -2510,6 +2638,11 @@ MARKINGS
|
|
2510 |
border-top: 1px solid #ccd1d6;
|
2511 |
}
|
2512 |
|
|
|
|
|
|
|
|
|
|
|
2513 |
.n2-ss-position-display {
|
2514 |
display: none;
|
2515 |
position: absolute;
|
@@ -2566,7 +2699,7 @@ MARKINGS
|
|
2566 |
position: relative;
|
2567 |
height: 0;
|
2568 |
width: 100%;
|
2569 |
-
box-shadow: 0 0
|
2570 |
display: block;
|
2571 |
z-index: 100000;
|
2572 |
}
|
@@ -2598,13 +2731,25 @@ MARKINGS
|
|
2598 |
|
2599 |
/* When resize a layer, it shows other layers to snap too */
|
2600 |
/* When move a layer, it shows other layers to snap too */
|
2601 |
-
.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.
|
2602 |
-
.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.
|
2603 |
-
box-shadow: inset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2604 |
}
|
2605 |
|
2606 |
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over {
|
2607 |
-
box-shadow: inset
|
|
|
|
|
|
|
|
|
|
|
2608 |
}
|
2609 |
|
2610 |
div#n2-ss-0 .n2-ss-layer-ui-label-container {
|
@@ -2624,6 +2769,10 @@ div#n2-ss-0 .n2-ss-layer-ui-label-container {
|
|
2624 |
max-height: 100%;
|
2625 |
}
|
2626 |
|
|
|
|
|
|
|
|
|
2627 |
div#n2-ss-0 .n2-ss-layer-ui-label-container:HOVER {
|
2628 |
|
2629 |
max-width: none;
|
@@ -2647,6 +2796,10 @@ div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-over-delayed > .n2-ss-layer-ui-label-contai
|
|
2647 |
border-left: 1px solid #0b7dbe;
|
2648 |
}
|
2649 |
|
|
|
|
|
|
|
|
|
2650 |
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer > .n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action {
|
2651 |
padding: 0;
|
2652 |
cursor: pointer;
|
@@ -2672,33 +2825,44 @@ div#n2-ss-0 .n2-ss-layer-ui-label-container.invisible {
|
|
2672 |
}
|
2673 |
|
2674 |
/* Outline col when highlighted */
|
2675 |
-
.n2-ss-layer[data-
|
2676 |
-
box-shadow: inset
|
2677 |
}
|
2678 |
|
2679 |
-
div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-
|
2680 |
z-index: 2;
|
2681 |
}
|
2682 |
|
2683 |
/* Outline when the mouse over the editor and component is active */
|
2684 |
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active {
|
2685 |
|
2686 |
-
box-shadow: inset
|
|
|
|
|
|
|
|
|
|
|
|
|
2687 |
}
|
2688 |
|
2689 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER #n2-ss-0 .n2-ss-layer[data-
|
2690 |
|
2691 |
-
box-shadow: inset
|
2692 |
}
|
2693 |
|
2694 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer .n2-ss-layer[data-
|
2695 |
|
2696 |
-
box-shadow: inset
|
|
|
|
|
|
|
|
|
|
|
2697 |
}
|
2698 |
|
2699 |
/* When a normal positioned layer dragged, outline the cols where it can be placed */
|
2700 |
-
.n2-ss-move-layer .n2-ss-layer[data-
|
2701 |
-
box-shadow: inset
|
2702 |
}
|
2703 |
|
2704 |
.n2-ss-move-layer #n2-ss-0 .n2-ss-layer:HOVER {
|
@@ -2707,8 +2871,8 @@ div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-type="col"] {
|
|
2707 |
|
2708 |
/* While dragging a layer with normal position */
|
2709 |
|
2710 |
-
div#n2-ss-0 .n2-ss-layer[data-
|
2711 |
-
div#n2-ss-0 .n2-ss-layer[data-
|
2712 |
/*position: absolute !important;*/
|
2713 |
/*width: 50px !important;
|
2714 |
height: 50px !important;
|
@@ -2721,11 +2885,11 @@ div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
|
2721 |
}
|
2722 |
|
2723 |
/* While dragging a layer with normal position, hide all inside elements */
|
2724 |
-
/*div#n2-ss-0 .n2-ss-layer[data-
|
2725 |
display: none !important;
|
2726 |
}*/
|
2727 |
|
2728 |
-
.
|
2729 |
display: none;
|
2730 |
position: absolute;
|
2731 |
top: 0;
|
@@ -2734,52 +2898,60 @@ div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
|
2734 |
height: 100%;
|
2735 |
}
|
2736 |
|
2737 |
-
.n2-ss-select-layer-mode .n2-ss-layer-selected .
|
2738 |
display: block;
|
2739 |
background-color: RGBA(0, 132, 255, 0.4);
|
2740 |
}
|
2741 |
|
2742 |
-
.n2-ss-item-html .
|
2743 |
.n2-ss-item-iframe .ui-item-overlay {
|
2744 |
display: block;
|
2745 |
}
|
2746 |
|
2747 |
/* RESIZE */
|
2748 |
|
2749 |
-
.n2-ss-layer .n2-ss-layer-cc
|
2750 |
-
.n2-ss-layer .ui-resizable-ne,
|
2751 |
-
.n2-ss-layer .ui-resizable-se,
|
2752 |
-
.n2-ss-layer .ui-resizable-sw,
|
2753 |
-
.n2-ss-layer .ui-resizable-nw {
|
2754 |
opacity: 0;
|
2755 |
}
|
2756 |
|
2757 |
.n2-ss-layer-cc:HOVER,
|
2758 |
-
.
|
2759 |
-
.
|
2760 |
-
.
|
2761 |
-
.
|
2762 |
-
.
|
2763 |
-
.
|
2764 |
-
.
|
2765 |
-
.
|
2766 |
opacity: 1;
|
2767 |
}
|
2768 |
|
2769 |
-
.n2-ss-layer[data-align="left"][data-valign="top"] .
|
2770 |
-
.n2-ss-layer[data-align="left"][data-valign="middle"] .
|
2771 |
-
.n2-ss-layer[data-align="left"][data-valign="bottom"] .
|
2772 |
-
.n2-ss-layer[data-align="center"][data-valign="top"] .
|
2773 |
.n2-ss-layer[data-align="center"][data-valign="middle"] .n2-ss-layer-cc,
|
2774 |
-
.n2-ss-layer[data-align="center"][data-valign="bottom"] .
|
2775 |
-
.n2-ss-layer[data-align="right"][data-valign="top"] .
|
2776 |
-
.n2-ss-layer[data-align="right"][data-valign="middle"] .
|
2777 |
-
.n2-ss-layer[data-align="right"][data-valign="bottom"] .
|
2778 |
background: #0c92df;
|
2779 |
opacity: 1;
|
2780 |
border: 1px solid #fff;
|
2781 |
}
|
2782 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2783 |
.n2-ss-layer-cc {
|
2784 |
position: absolute;
|
2785 |
font-size: 0.1px;
|
@@ -2787,14 +2959,14 @@ div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
|
2787 |
z-index: 92;
|
2788 |
}
|
2789 |
|
2790 |
-
.n2-ss-layer .
|
2791 |
-
.n2-ss-layer .
|
2792 |
border-radius: 50px;
|
2793 |
}
|
2794 |
|
2795 |
.n2-ss-layer .n2-ss-layer-cc,
|
2796 |
-
.n2-ss-layer .
|
2797 |
-
.n2-ss-layer .
|
2798 |
display: none !important;
|
2799 |
background-image: none;
|
2800 |
border: 1px solid #0c92df;
|
@@ -2803,6 +2975,12 @@ div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
|
2803 |
background: #fff;
|
2804 |
}
|
2805 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2806 |
.n2-ss-layer .ui-column-width-handle {
|
2807 |
display: none !important;
|
2808 |
position: absolute;
|
@@ -2823,7 +3001,15 @@ div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
|
2823 |
background: RGBA(12, 146, 223, 1);
|
2824 |
}
|
2825 |
|
2826 |
-
.n2-ss-layer .ui-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2827 |
display: none !important;
|
2828 |
opacity: 1;
|
2829 |
z-index: 89;
|
@@ -2832,128 +3018,132 @@ div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
|
2832 |
overflow: hidden;
|
2833 |
}
|
2834 |
|
2835 |
-
.n2-ss-layer .
|
2836 |
-
|
|
|
|
|
|
|
|
|
2837 |
opacity: 0.8;
|
2838 |
}
|
2839 |
|
2840 |
-
.n2-ss-layer .
|
2841 |
left: 50%;
|
2842 |
top: -4px;
|
2843 |
margin-left: -4px;
|
2844 |
}
|
2845 |
|
2846 |
-
.n2-ss-layer .
|
2847 |
min-height: 5px;
|
2848 |
cursor: s-resize;
|
2849 |
}
|
2850 |
|
2851 |
-
.n2-ss-layer .
|
2852 |
top: 0;
|
2853 |
margin-left: 0;
|
2854 |
left: 25%;
|
2855 |
width: 50%;
|
2856 |
}
|
2857 |
|
2858 |
-
.n2-ss-layer .
|
2859 |
left: 0;
|
2860 |
bottom: 100%;
|
2861 |
width: 100%;
|
2862 |
}
|
2863 |
|
2864 |
-
.n2-ss-layer .
|
2865 |
-
.n2-ss-layer .
|
2866 |
right: -4px;
|
2867 |
top: 50%;
|
2868 |
margin-top: -4px;
|
2869 |
}
|
2870 |
|
2871 |
-
.n2-ss-layer .
|
2872 |
min-width: 5px;
|
2873 |
cursor: w-resize;
|
2874 |
}
|
2875 |
|
2876 |
-
.n2-ss-layer .
|
2877 |
top: 25%;
|
2878 |
margin-top: 0;
|
2879 |
right: 0;
|
2880 |
height: 50%;
|
2881 |
}
|
2882 |
|
2883 |
-
.n2-ss-layer .
|
2884 |
top: 0;
|
2885 |
left: 100%;
|
2886 |
height: 100%;
|
2887 |
}
|
2888 |
|
2889 |
-
.n2-ss-layer .
|
2890 |
-
.n2-ss-layer .
|
2891 |
bottom: -4px;
|
2892 |
left: 50%;
|
2893 |
margin-left: -4px;
|
2894 |
}
|
2895 |
|
2896 |
-
.n2-ss-layer .
|
2897 |
min-height: 5px;
|
2898 |
cursor: n-resize;
|
2899 |
}
|
2900 |
|
2901 |
-
.n2-ss-layer .
|
2902 |
bottom: 0;
|
2903 |
margin-left: 0;
|
2904 |
left: 25%;
|
2905 |
width: 50%;
|
2906 |
}
|
2907 |
|
2908 |
-
.n2-ss-layer .
|
2909 |
bottom: auto;
|
2910 |
top: 100%;
|
2911 |
left: 0;
|
2912 |
width: 100%;
|
2913 |
}
|
2914 |
|
2915 |
-
.n2-ss-layer .
|
2916 |
-
.n2-ss-layer .
|
2917 |
left: -4px;
|
2918 |
top: 50%;
|
2919 |
margin-top: -4px;
|
2920 |
}
|
2921 |
|
2922 |
-
.n2-ss-layer .
|
2923 |
min-width: 5px;
|
2924 |
cursor: e-resize;
|
2925 |
}
|
2926 |
|
2927 |
-
.n2-ss-layer .
|
2928 |
top: 25%;
|
2929 |
margin-top: 0;
|
2930 |
left: 0;
|
2931 |
height: 50%;
|
2932 |
}
|
2933 |
|
2934 |
-
.n2-ss-layer .
|
2935 |
left: auto;
|
2936 |
right: 100%;
|
2937 |
top: 0;
|
2938 |
height: 100%;
|
2939 |
}
|
2940 |
|
2941 |
-
.n2-ss-layer .
|
2942 |
right: -4px;
|
2943 |
top: -4px;
|
2944 |
}
|
2945 |
|
2946 |
-
.n2-ss-layer .
|
2947 |
right: -4px;
|
2948 |
bottom: -4px;
|
2949 |
}
|
2950 |
|
2951 |
-
.n2-ss-layer .
|
2952 |
left: -4px;
|
2953 |
bottom: -4px;
|
2954 |
}
|
2955 |
|
2956 |
-
.n2-ss-layer .
|
2957 |
left: -4px;
|
2958 |
top: -4px;
|
2959 |
}
|
@@ -2966,59 +3156,65 @@ div#n2-ss-0 .n2-ss-layer[data-type="col"] .n2-ss-layer.ui-draggable-dragging {
|
|
2966 |
}
|
2967 |
|
2968 |
.n2-ss-layer.n2-active:HOVER {
|
2969 |
-
box-shadow: inset
|
|
|
|
|
|
|
|
|
|
|
2970 |
}
|
2971 |
|
2972 |
-
.n2-ss-resize-layer .n2-ss-layer.n2-active > .
|
2973 |
-
.n2-ss-layer.n2-active:HOVER > .
|
2974 |
-
.n2-ss-resize-layer .n2-ss-layer.n2-active > .
|
2975 |
-
.n2-ss-layer.n2-active:HOVER > .
|
2976 |
.n2-ss-resize-layer .n2-ss-layer.n2-active > .n2-ss-layer-row > .ui-column-width-handle,
|
2977 |
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .ui-column-width-handle,
|
2978 |
-
.n2-ss-resize-layer .n2-ss-layer.n2-active > .n2-ss-layer-row > .
|
2979 |
-
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .
|
2980 |
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-cc,
|
2981 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .
|
2982 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .
|
2983 |
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .n2-ss-layer-cc {
|
2984 |
display: block !important;
|
2985 |
}
|
2986 |
|
2987 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .
|
2988 |
display: none !important;
|
2989 |
}
|
2990 |
|
2991 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .
|
2992 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .
|
2993 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-mask > .n2-ss-layer-row > .
|
2994 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-content > .
|
2995 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-mask > .n2-ss-layer-content > .
|
2996 |
display: block !important;
|
2997 |
}
|
2998 |
|
2999 |
-
.
|
3000 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.
|
3001 |
-
.
|
3002 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.
|
3003 |
-
.
|
3004 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.
|
3005 |
display: block !important;
|
3006 |
}
|
3007 |
|
3008 |
-
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.
|
3009 |
opacity: 1;
|
3010 |
}
|
3011 |
|
3012 |
-
#n2-ss-0 .
|
3013 |
-
#n2-ss-0 .n2-ss-layer-row
|
|
|
3014 |
display: none !important;
|
3015 |
}
|
3016 |
|
3017 |
-
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .
|
3018 |
-
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .
|
3019 |
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,
|
3020 |
-
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .
|
3021 |
-
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .
|
3022 |
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc {
|
3023 |
display: none !important;
|
3024 |
}
|
@@ -3163,23 +3359,27 @@ div#n2-ss-0 .n2-ss-layer-chain-parent {
|
|
3163 |
border-color: #0b7dbe;
|
3164 |
}
|
3165 |
|
3166 |
-
.n2-ss-layer[data-
|
3167 |
cursor: move;
|
3168 |
}
|
3169 |
|
3170 |
-
.n2-highlight-structure .n2-ss-layer[data-
|
3171 |
-
box-shadow: 0 0
|
|
|
|
|
|
|
|
|
3172 |
}
|
3173 |
|
3174 |
.n2-ss-layer-under-creation {
|
3175 |
visibility: hidden !important;
|
3176 |
}
|
3177 |
|
3178 |
-
[data-editormode="canvas"] div#n2-ss-0 .n2-ss-layer[data-
|
3179 |
display: none;
|
3180 |
}
|
3181 |
|
3182 |
-
[data-editormode="content"] div#n2-ss-0 .n2-ss-layer[data-
|
3183 |
height: 100%;
|
3184 |
}
|
3185 |
|
@@ -3260,18 +3460,13 @@ div#n2-ss-0 .n2-ss-layer-content .n2-ss-layer.n2-active:HOVER {
|
|
3260 |
margin: 20px 0;
|
3261 |
}
|
3262 |
|
3263 |
-
.n2-ss-section-outer {
|
3264 |
-
min-height: 10px;
|
3265 |
-
}
|
3266 |
-
|
3267 |
[data-visibility="hidden"],
|
3268 |
[data-visibility="hidden"] * {
|
3269 |
visibility: hidden !important;
|
3270 |
}
|
3271 |
|
3272 |
-
div div#n2-ss-0 .n2-ss-static-slide
|
3273 |
-
div div#n2-ss-0 .n2-ss-static-slide div[data-
|
3274 |
-
div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-main-content {
|
3275 |
visibility: visible;
|
3276 |
}
|
3277 |
.n2-ss-sample-slides-container {
|
@@ -3384,7 +3579,7 @@ div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-m
|
|
3384 |
margin-left: auto;
|
3385 |
}
|
3386 |
|
3387 |
-
.n2-ss-sample-slide-setting-field .
|
3388 |
width: 100px;
|
3389 |
position: relative;
|
3390 |
background: #374d64;
|
@@ -3393,7 +3588,7 @@ div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-m
|
|
3393 |
border-radius: 10px;
|
3394 |
}
|
3395 |
|
3396 |
-
.n2-ss-sample-slide-setting-field .
|
3397 |
position: absolute;
|
3398 |
top: 0;
|
3399 |
z-index: 2;
|
@@ -3510,15 +3705,15 @@ div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-m
|
|
3510 |
position: relative;
|
3511 |
margin: 0;
|
3512 |
background: transparent;
|
3513 |
-
border:none;
|
3514 |
border-radius: 0;
|
3515 |
}
|
3516 |
|
3517 |
-
#n2-ss-slider-zoom .
|
3518 |
display: none;
|
3519 |
}
|
3520 |
|
3521 |
-
#n2-ss-slider-zoom .
|
3522 |
position: absolute;
|
3523 |
top: 50%;
|
3524 |
display: block;
|
@@ -3528,7 +3723,7 @@ div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-m
|
|
3528 |
margin-left: -23px;
|
3529 |
background-color: #e6eaee;
|
3530 |
background: #e6eaee;
|
3531 |
-
border:none;
|
3532 |
border-radius: 3px;
|
3533 |
z-index: 2;
|
3534 |
color: #7b8898;
|
@@ -3548,24 +3743,6 @@ div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-m
|
|
3548 |
background-color: #6b7986;
|
3549 |
}
|
3550 |
|
3551 |
-
#n2-ss-lock {
|
3552 |
-
display: inline-block;
|
3553 |
-
position: absolute;
|
3554 |
-
right: -36px;
|
3555 |
-
top: 9px;
|
3556 |
-
cursor: pointer;
|
3557 |
-
line-height: 16px;
|
3558 |
-
}
|
3559 |
-
|
3560 |
-
#n2-ss-lock .n2-i {
|
3561 |
-
color: #6b7986;
|
3562 |
-
font-size: 16px;
|
3563 |
-
}
|
3564 |
-
|
3565 |
-
#n2-ss-lock.n2-active .n2-i:before {
|
3566 |
-
content: "\e609";
|
3567 |
-
}
|
3568 |
-
|
3569 |
.n2-ss-device-zoomer {
|
3570 |
min-width: 280px;
|
3571 |
}
|
@@ -3588,12 +3765,11 @@ div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-m
|
|
3588 |
background-color: #374d64;
|
3589 |
}
|
3590 |
|
3591 |
-
.n2-ss-device-zoomer #n2-ss-zoom .n2-ss-slider-zoom-container > .n2-i
|
3592 |
-
.n2-ss-device-zoomer #n2-ss-zoom #n2-ss-lock > .n2-i {
|
3593 |
color: #4e667f;
|
3594 |
}
|
3595 |
|
3596 |
-
.n2-ss-device-zoomer #n2-ss-slider-zoom .
|
3597 |
background-color: #526a80;
|
3598 |
color: #fff;
|
3599 |
}
|
@@ -3616,10 +3792,6 @@ div div#n2-ss-0 .n2-ss-static-slide div[data-type="content"] div.n2-ss-section-m
|
|
3616 |
color: #a4b0b7;
|
3617 |
}
|
3618 |
|
3619 |
-
html[dir="rtl"] #n2-ss-devices .n2-table {
|
3620 |
-
float: left;
|
3621 |
-
}
|
3622 |
-
|
3623 |
#n2-ss-devices .n2-td {
|
3624 |
height: 60px;
|
3625 |
vertical-align: middle;
|
@@ -3737,7 +3909,7 @@ html[dir="rtl"] #n2-ss-devices .n2-table {
|
|
3737 |
width: 100%;
|
3738 |
height: 100%;
|
3739 |
z-index: 1000000;
|
3740 |
-
box-shadow: inset
|
3741 |
}
|
3742 |
|
3743 |
.n2-ss-picker-overlay-tile {
|
@@ -3787,6 +3959,7 @@ html[dir="rtl"] #n2-ss-devices .n2-table {
|
|
3787 |
left: 0;
|
3788 |
box-sizing: border-box;
|
3789 |
white-space: nowrap;
|
|
|
3790 |
}
|
3791 |
|
3792 |
.n2-ruler > span {
|
@@ -3888,7 +4061,7 @@ html[dir="rtl"] #n2-ss-devices .n2-table {
|
|
3888 |
|
3889 |
.n2-ruler-vertical {
|
3890 |
padding-top: 1px;
|
3891 |
-
width:
|
3892 |
height: 100%;
|
3893 |
background: #e9edf0;
|
3894 |
z-index: 5;
|
@@ -3923,7 +4096,7 @@ html[dir="rtl"] #n2-ss-devices .n2-table {
|
|
3923 |
}
|
3924 |
|
3925 |
.n2-ruler-horizontal .n2-ruler-guide {
|
3926 |
-
width:
|
3927 |
height: 3000px;
|
3928 |
}
|
3929 |
|
21 |
user-select: none;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
Layout
|
26 |
*/
|
193 |
color: #6f653f;
|
194 |
font-size: 12px;
|
195 |
border: 0;
|
196 |
+
direction: ltr;
|
197 |
}
|
198 |
|
199 |
.n2-ss-slider-publish img {
|
224 |
#n2-admin[data-slider-type='block'] .n2-fm-indicator,
|
225 |
#n2-admin[data-slider-type='block'] .n2-fm-bar,
|
226 |
#n2-admin[data-slider-type='block'] .n2-fm-thumbnail {
|
227 |
+
display: none;
|
228 |
+
}
|
229 |
+
|
230 |
+
#n2-admin[data-autoplay='0'] #n2-form-matrix-sliderwidgets .n2-fm-indicator,
|
231 |
+
#n2-admin[data-autoplay='0'] #n2-form-matrix-sliderwidgets .n2-fm-autoplay {
|
232 |
+
display: none;
|
233 |
}
|
234 |
|
235 |
.n2-ss-container-device {
|
241 |
margin-top: 40px;
|
242 |
}
|
243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
.n2-ss-create-slider-free-sample {
|
245 |
float: left;
|
246 |
height: 70px;
|
279 |
.n2-ss-modal-subscribe .n2-input-button > * {
|
280 |
display: inline-block;
|
281 |
white-space: nowrap;
|
282 |
+
vertical-align: top;
|
283 |
}
|
284 |
|
285 |
.n2-input-button input,
|
295 |
border-right: 0;
|
296 |
border-top-left-radius: 3px;
|
297 |
border-bottom-left-radius: 3px;
|
298 |
+
border-top-right-radius: 0;
|
299 |
+
border-bottom-right-radius: 0;
|
300 |
overflow: hidden;
|
301 |
padding: 0 10px;
|
302 |
line-height: 36px;
|
304 |
color: #7b8898;
|
305 |
font-size: 12px;
|
306 |
background: #ffffff;
|
307 |
+
box-sizing: border-box;
|
308 |
}
|
309 |
|
310 |
.n2-input-button .n2-button,
|
351 |
|
352 |
}
|
353 |
|
354 |
+
#n2-ss-edit-slider-form > .n2-form > .n2-form-tab,
|
355 |
+
#n2-ss-edit-group-form > .n2-form > .n2-form-tab {
|
356 |
margin: 20px 0 0 0;
|
357 |
border-radius: 0;
|
358 |
border: 0;
|
359 |
}
|
360 |
|
361 |
+
#n2-ss-edit-slider-form > .n2-form > .n2-form-tab .n2-form-matrix-views,
|
362 |
+
#n2-ss-edit-group-form > .n2-form > .n2-form-tab .n2-form-matrix-views {
|
363 |
border-radius: 0;
|
364 |
}
|
365 |
|
391 |
|
392 |
.n2-ss-sliders-header > * {
|
393 |
margin: 0 10px;
|
394 |
+
vertical-align: top;
|
395 |
}
|
396 |
|
397 |
html[data-sliders='0'] .n2-ss-sliders-header {
|
409 |
|
410 |
#n2-ss-slider-container[data-groupid="0"] .n2-ss-remove-from-group {
|
411 |
display: none;
|
|
|
|
|
|
|
|
|
412 |
}
|
413 |
+
body[data-slides='0'] #n2-ss-edit-slider-form {
|
|
|
414 |
display: none;
|
415 |
}
|
416 |
|
506 |
box-shadow: none;
|
507 |
}
|
508 |
|
509 |
+
body:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,
|
510 |
+
body:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-dummy {
|
511 |
display: none;
|
512 |
}
|
513 |
|
535 |
width: 100%;
|
536 |
height: 100%;
|
537 |
background-color: rgba(32, 41, 52, 0.9);
|
538 |
+
border: 0;
|
539 |
right: 0;
|
540 |
bottom: 0;
|
541 |
+
margin: 0;
|
542 |
vertical-align: bottom;
|
543 |
line-height: 130px;
|
544 |
text-align: center;
|
549 |
display: block;
|
550 |
}
|
551 |
|
552 |
+
body:not([data-slides='0']) #n2-ss-slides .n2-box-dummy {
|
553 |
display: none;
|
554 |
}
|
555 |
|
606 |
position: relative;
|
607 |
z-index: 9;
|
608 |
color: #6b7989;
|
609 |
+
margin: 14px 0 4px 0;
|
610 |
}
|
611 |
|
612 |
.n2-ss-bulk-controls {
|
629 |
z-index: 5;
|
630 |
}
|
631 |
|
632 |
+
#n2-ss-slides .n2-box-slide-add > .n2-ss-add-slide-button {
|
633 |
width: 100%;
|
634 |
height: 135px;
|
635 |
padding: 0;
|
636 |
}
|
637 |
|
638 |
+
#n2-ss-slides .n2-box-slide-add > .n2-ss-add-slide-button:before {
|
639 |
display: block;
|
640 |
font-family: 'Nextend' !important;
|
641 |
font-size: 48px;
|
660 |
}
|
661 |
|
662 |
.n2-ss-slides-header > * {
|
663 |
+
vertical-align: top;
|
664 |
display: inline-block;
|
665 |
}
|
666 |
|
692 |
|
693 |
.n2-ss-block-slides-notice {
|
694 |
display: none;
|
695 |
+
color: #606d7b;
|
696 |
+
background: #fff;
|
697 |
+
margin-top: 25px;
|
698 |
+
padding: 10px 15px;
|
699 |
+
border-radius: 5px;
|
700 |
}
|
701 |
|
702 |
+
.n2-ss-block-slides-notice p {
|
703 |
+
margin: 0 0 10px;
|
704 |
}
|
705 |
|
706 |
+
body:not([data-slides='0']):not([data-slides='1']) #n2-admin[data-slider-type="block"] .n2-ss-block-slides-notice {
|
707 |
+
display: inline-block;
|
708 |
+
}
|
709 |
+
|
710 |
+
#n2-ss-slides .n2-box-slide-add .n2-ss-add-slide-button:before {
|
711 |
+
transition: transform 0.4s;
|
712 |
+
}
|
713 |
+
|
714 |
+
#n2-ss-slides .n2-box-slide-add .n2-ss-add-slide-button {
|
715 |
+
transition: background 0.4s;
|
716 |
+
}
|
717 |
+
|
718 |
+
#n2-ss-slides[data-showcreateslide="1"] .n2-box-slide-add .n2-ss-add-slide-button {
|
719 |
+
background: #6b7986;
|
720 |
+
}
|
721 |
+
|
722 |
+
#n2-ss-slides[data-showcreateslide="1"] .n2-box-slide-add .n2-ss-add-slide-button:before {
|
723 |
+
transform: rotateZ(45deg);
|
724 |
+
}
|
725 |
+
|
726 |
+
#n2-ss-slides .n2-ss-slides-create {
|
727 |
+
position: relative;
|
728 |
+
background: #202934;
|
729 |
+
margin: -25px -26px 0 -26px;
|
730 |
+
height: 0;
|
731 |
+
overflow: hidden;
|
732 |
+
transition: height 0.4s;
|
733 |
+
}
|
734 |
+
|
735 |
+
#n2-ss-slides .n2-ss-slides-create > div {
|
736 |
+
padding: 15px 16px;
|
737 |
+
}
|
738 |
+
|
739 |
+
#n2-ss-slides[data-showcreateslide="1"] .n2-ss-slides-create {
|
740 |
+
height: 198px;
|
741 |
+
}
|
742 |
+
|
743 |
+
#n2-ss-slides .n2-ss-slides-create-heading {
|
744 |
+
font-size: 22px;
|
745 |
+
line-height: 38px;
|
746 |
+
color: #fff;
|
747 |
+
margin: 0 10px;
|
748 |
+
}
|
749 |
+
|
750 |
+
#n2-ss-slides .n2-ss-slides-create-inner {
|
751 |
+
display: flex;
|
752 |
+
}
|
753 |
+
|
754 |
+
#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box {
|
755 |
+
display: flex;
|
756 |
+
flex-flow: column;
|
757 |
+
justify-content: center;
|
758 |
+
max-width: 140px;
|
759 |
+
width: 140px;
|
760 |
+
height: 110px;
|
761 |
+
text-align: center;
|
762 |
+
color: #80a3b5;
|
763 |
+
cursor: pointer;
|
764 |
+
border-radius: 5px;
|
765 |
+
margin: 10px;
|
766 |
+
}
|
767 |
+
|
768 |
+
#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box-label {
|
769 |
+
font-size: 14px;
|
770 |
+
margin-top: 3px;
|
771 |
+
}
|
772 |
+
|
773 |
+
#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box[data-action="image"] {
|
774 |
+
background: #51b82d;
|
775 |
+
color: #fff;
|
776 |
+
}
|
777 |
+
|
778 |
+
#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box[data-action="library"] {
|
779 |
+
background: #5f39c2;
|
780 |
+
color: #fff;
|
781 |
+
}
|
782 |
+
|
783 |
+
.n2-ss-slides-create-action-box-icon {
|
784 |
+
font-size: 48px;
|
785 |
+
}
|
786 |
+
|
787 |
/*
|
788 |
MARKINGS
|
789 |
|
805 |
}
|
806 |
|
807 |
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .n2-ss-layer-cc,
|
808 |
+
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .nui-resizable-handle,
|
809 |
+
.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .nui-normal-sizing-handle {
|
810 |
display: none !important;
|
811 |
}
|
812 |
|
820 |
|
821 |
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer {
|
822 |
cursor: move;
|
823 |
+
}
|
824 |
+
|
825 |
+
.n2-ss-currently-edited-slide .n2-ss-layer {
|
826 |
background: RGBA(0, 0, 0, 0); /* IE fix, layer empty area doesnt trigger mouseenter when no background */
|
827 |
}
|
828 |
|
829 |
+
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-sstype="col"] {
|
830 |
cursor: pointer;
|
831 |
}
|
832 |
|
833 |
+
#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-sstype="col"] .n2-ss-layer {
|
834 |
cursor: pointer;
|
835 |
}
|
836 |
|
848 |
cursor: default;
|
849 |
}
|
850 |
|
851 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .nui-resizable-handle,
|
852 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .nui-normal-sizing-handle,
|
853 |
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,
|
854 |
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,
|
855 |
#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
856 |
#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,
|
857 |
+
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-selected .n2-ss-item-overlay,
|
858 |
.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-highlight {
|
859 |
display: none !important;
|
860 |
}
|
878 |
width: 1px;
|
879 |
}
|
880 |
|
|
|
|
|
|
|
|
|
881 |
.n2-ss-edit-slide-top {
|
882 |
background: #fff;
|
883 |
border-bottom: 1px solid #ccd1d6;
|
918 |
padding: 0 20px;
|
919 |
}
|
920 |
|
921 |
+
.n2-slider-name .n2-h1,
|
922 |
.n2-ss-edit-slide-top-details .n2-h1 {
|
923 |
color: #606d7b;
|
924 |
margin-bottom: 15px;
|
926 |
line-height: 30px;
|
927 |
}
|
928 |
|
929 |
+
[dir="ltr"] .n2-slider-name .n2-h1:HOVER:after,
|
930 |
+
[dir="ltr"] .n2-ss-edit-slide-top-details .n2-h1:HOVER:after {
|
931 |
+
font-family: 'Nextend' !important;
|
932 |
+
content: "\e94f";
|
933 |
+
font-size: 22px;
|
934 |
+
vertical-align: top;
|
935 |
+
margin: 0 5px;
|
936 |
+
color: #b0b9bf;
|
937 |
+
}
|
938 |
+
|
939 |
+
[dir="rtl"] .n2-slider-name .n2-h1:HOVER:before,
|
940 |
+
[dir="rtl"] .n2-ss-edit-slide-top-details .n2-h1:HOVER:before {
|
941 |
font-family: 'Nextend' !important;
|
942 |
content: "\e94f";
|
943 |
font-size: 22px;
|
970 |
|
971 |
.n2-ss-edit-slide-top-tabs .n2-button {
|
972 |
border-radius: 0;
|
973 |
+
border-left: 0;
|
974 |
padding: 0 20px;
|
975 |
}
|
976 |
|
980 |
border-left: 2px solid #e0e6ed;
|
981 |
}
|
982 |
|
983 |
+
[dir="rtl"] .n2-ss-edit-slide-top-tabs .n2-button.n2-first {
|
984 |
+
border-top-left-radius: 0;
|
985 |
+
border-bottom-left-radius: 0;
|
986 |
+
border-left: 0;
|
987 |
+
border-top-right-radius: 3px;
|
988 |
+
border-bottom-right-radius: 3px;
|
989 |
+
border-right: 2px solid #e0e6ed;
|
990 |
+
}
|
991 |
+
|
992 |
.n2-ss-edit-slide-top-tabs .n2-button.n2-last {
|
993 |
border-top-right-radius: 3px;
|
994 |
border-bottom-right-radius: 3px;
|
995 |
}
|
996 |
|
997 |
+
[dir="rtl"] .n2-ss-edit-slide-top-tabs .n2-button.n2-last {
|
998 |
+
border-top-right-radius: 0;
|
999 |
+
border-bottom-right-radius: 0;
|
1000 |
+
border-top-left-radius: 3px;
|
1001 |
+
border-bottom-left-radius: 3px;
|
1002 |
+
border-left: 2px solid #e0e6ed;
|
1003 |
+
}
|
1004 |
+
|
1005 |
.n2-ss-edit-slide-top-tabs .n2-button.n2-active {
|
1006 |
background: #0c92df;
|
1007 |
color: #fff;
|
1008 |
+
border-color: #0c92df !important;
|
1009 |
}
|
1010 |
|
1011 |
.n2-ss-edit-slide-top-tabs .n2-button.n2-active:not(.n2-first) {
|
1025 |
|
1026 |
.n2-ss-slider-outer-container {
|
1027 |
position: relative;
|
1028 |
+
padding: 40px 0 0 40px;
|
1029 |
}
|
1030 |
|
1031 |
.n2-ss-canvas-slider-container {
|
1032 |
padding-bottom: 99px;
|
|
|
1033 |
margin: 10px;
|
1034 |
}
|
1035 |
|
1036 |
.n2-ss-has-ruler .n2-ss-canvas-slider-container {
|
1037 |
+
margin: 0;
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
#n2-ss-0-align {
|
1041 |
+
margin: 0 !important;
|
1042 |
}
|
1043 |
|
1044 |
.n2-i-desktopPortrait:before {
|
1091 |
background-color: #e9edf0;
|
1092 |
}
|
1093 |
|
1094 |
+
.n2-ss-background-type-image .n2-ss-background-video-param:not(.n2-ss-slide-background-image-param) {
|
1095 |
display: none;
|
1096 |
}
|
1097 |
|
1098 |
.n2-ss-background-type-color .n2-ss-background-video-param,
|
1099 |
+
.n2-ss-background-type-color .n2-ss-slide-background-image-param {
|
1100 |
display: none;
|
1101 |
}
|
1102 |
|
1103 |
.n2-ss-background-type-gradient .n2-ss-background-video-param,
|
1104 |
+
.n2-ss-background-type-gradient .n2-ss-slide-background-image-param {
|
1105 |
display: none;
|
1106 |
}
|
1107 |
|
1234 |
|
1235 |
/*for carousel and showcase slide editing*/
|
1236 |
|
1237 |
+
#n2-ss-0 .n2-ss-slide {
|
1238 |
+
opacity: 0.3;
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
#n2-ss-0 .n2-ss-slide.n2-ss-currently-edited-slide {
|
1242 |
+
opacity: 1;
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
.n2-form-element-style-mode {
|
1246 |
+
display: flex;
|
1247 |
+
background: #28313a;
|
1248 |
+
padding: 10px;
|
1249 |
+
border: 1px solid #20282f;
|
1250 |
+
border-width: 1px 0;
|
1251 |
+
margin-bottom: -1px;
|
1252 |
+
align-items: center;
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
.n2-form-element-style-mode-reset {
|
1256 |
+
margin: 0 10px 0 auto;
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
.n2-form-element-style-mode .n2-form-element-radio-tab {
|
1260 |
+
height: 24px;
|
1261 |
+
line-height: 24px;
|
1262 |
+
margin: 0;
|
1263 |
+
}
|
1264 |
+
|
1265 |
+
.n2-form-element-style-mode .n2-form-element-radio-tab .n2-radio-option {
|
1266 |
+
background: #6b7986;
|
1267 |
+
color: #fff;
|
1268 |
+
font-size: 11px;
|
1269 |
+
}
|
1270 |
+
|
1271 |
+
.n2-form-element-style-mode .n2-form-element-radio-tab .n2-radio-option.n2-active {
|
1272 |
+
background: #0c92df;
|
1273 |
}
|
1274 |
|
1275 |
+
.n2-form-element-style-mode-label {
|
1276 |
+
display: inline-block;
|
1277 |
+
font-size: 11px;
|
1278 |
+
color: #b2bfc9;
|
1279 |
}
|
1280 |
/*
|
1281 |
MARKINGS
|
1354 |
width: 100%;
|
1355 |
height: 100%;
|
1356 |
border-radius: 3px;
|
1357 |
+
box-shadow: 0 1px 10px RGBA(0, 0, 0, 0.5);
|
1358 |
overflow: hidden;
|
1359 |
background: #3c4958;
|
1360 |
z-index: 2;
|
1587 |
overflow-x: hidden;
|
1588 |
}
|
1589 |
|
1590 |
+
#n2-ss-layer-window .n2-form-element-autocomplete .nui-autocomplete .nui-menu-item {
|
1591 |
padding-right: 20px;
|
1592 |
}
|
1593 |
|
1609 |
#n2-tabbed-animations-tabbed .n2-sidebar-tab-switcher .n2-td {
|
1610 |
line-height: 28px;
|
1611 |
height: 28px;
|
1612 |
+
border: 0;
|
1613 |
border-radius: 50px;
|
1614 |
}
|
1615 |
|
1641 |
text-align: center;
|
1642 |
}
|
1643 |
|
1644 |
+
[dir="rtl"] #n2-ss-add-sidebar {
|
1645 |
+
right: -1px;
|
1646 |
+
left: auto;
|
1647 |
+
}
|
1648 |
+
|
1649 |
#n2-ss-add-sidebar .n2-ss-add-sidebar-inner {
|
1650 |
position: relative;
|
1651 |
+
padding-top: 0.1px;
|
1652 |
}
|
1653 |
|
1654 |
#n2-ss-add-sidebar .n2-ss-add-sidebar-inner > * {
|
1835 |
margin-top: 24px;
|
1836 |
}
|
1837 |
|
1838 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="1col"]:before {
|
1839 |
content: "\e967";
|
1840 |
}
|
1841 |
|
1842 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="2col"]:before {
|
1843 |
content: "\e966";
|
1844 |
}
|
1845 |
|
1846 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="3col"]:before {
|
1847 |
content: "\e961";
|
1848 |
}
|
1849 |
|
1850 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="4col"]:before {
|
1851 |
content: "\e95f";
|
1852 |
}
|
1853 |
|
1854 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="2col-60-40"]:before {
|
1855 |
content: "\e965";
|
1856 |
}
|
1857 |
|
1858 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="2col-40-60"]:before {
|
1859 |
content: "\e964";
|
1860 |
}
|
1861 |
|
1862 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="2col-80-20"]:before {
|
1863 |
content: "\e963";
|
1864 |
}
|
1865 |
|
1866 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="2col-20-80"]:before {
|
1867 |
content: "\e962";
|
1868 |
}
|
1869 |
|
1870 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="3col-20-60-20"]:before {
|
1871 |
content: "\e960";
|
1872 |
}
|
1873 |
|
1874 |
+
.n2-ss-core-item[data-item="structure"][data-sstype="special"]:before {
|
1875 |
content: "\e95d";
|
1876 |
}
|
1877 |
#n2-ss-toolbar {
|
1954 |
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner {
|
1955 |
margin-top: 6px;
|
1956 |
min-width: 180px;
|
1957 |
+
box-shadow: 0 0 5px 0 RGBA(0, 0, 0, 0.3);
|
1958 |
background-color: #fff;
|
1959 |
border-radius: 3px;
|
1960 |
}
|
1978 |
#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick {
|
1979 |
display: block;
|
1980 |
position: absolute;
|
1981 |
+
right: 0;
|
1982 |
top: 8px;
|
1983 |
border-radius: 3px;
|
1984 |
border: 2px solid #8793a2;
|
2025 |
}
|
2026 |
|
2027 |
#n2-ss-toolbar .n2-radio-option.n2-first {
|
2028 |
+
border-left-width: 0;
|
2029 |
}
|
2030 |
|
2031 |
#n2-ss-toolbar .n2-radio-option.n2-active {
|
2033 |
border-color: #0c92df;
|
2034 |
}
|
2035 |
|
2036 |
+
|
2037 |
+
#n2-ss-toolbar .n2-radio-option.n2-active[data-mode="canvas"] {
|
2038 |
+
background-color: #5f39c2;
|
2039 |
+
border-color: #5f39c2;
|
2040 |
+
}
|
2041 |
+
|
2042 |
#n2-ss-toolbar .n2-radio-option.n2-sub-active {
|
2043 |
background-color: #51b82d;
|
2044 |
border-color: #51b82d;
|
2135 |
|
2136 |
#n2-ss-layers .nextend-sortable-placeholder div {
|
2137 |
position: absolute;
|
2138 |
+
left: 0;
|
2139 |
top: -1px;
|
2140 |
width: 100%;
|
2141 |
height: 0;
|
2142 |
+
box-shadow: 0 0 0 2px #0c92df;
|
2143 |
}
|
2144 |
|
2145 |
#n2-ss-layers ul .nextend-sortable-placeholder div {
|
2167 |
}
|
2168 |
|
2169 |
/* Fade out the cloned layer row */
|
2170 |
+
#n2-ss-layers .n2-ui-sortable-helper {
|
2171 |
opacity: 0.5;
|
2172 |
}
|
2173 |
|
2174 |
.n2-list .n2-ss-layer-group-row {
|
2175 |
+
border-bottom: 0;
|
2176 |
}
|
2177 |
|
2178 |
#n2-ss-layers-table .n2-list li {
|
2298 |
margin: 0 90px;
|
2299 |
}
|
2300 |
|
2301 |
+
[dir="rtl"] ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2302 |
+
right: 3px;
|
2303 |
+
left: auto;
|
2304 |
+
}
|
2305 |
+
|
2306 |
+
[dir="rtl"] #n2-ss-layer-list > ul > li.n2-ss-layer-content-row > .n2-ss-layer-title .n2-ss-layer-icon,
|
2307 |
+
[dir="rtl"] #n2-ss-layer-list > ul > li.n2-ss-layer-row-row > .n2-ss-layer-title .n2-ss-layer-icon,
|
2308 |
+
[dir="rtl"] ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2309 |
+
right: 23px;
|
2310 |
+
left: auto;
|
2311 |
+
}
|
2312 |
+
|
2313 |
+
[dir="rtl"] ul > li > ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2314 |
+
right: 43px;
|
2315 |
+
left: auto;
|
2316 |
+
}
|
2317 |
+
|
2318 |
+
[dir="rtl"] ul > li > ul > li > ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2319 |
+
right: 63px;
|
2320 |
+
left: auto;
|
2321 |
+
}
|
2322 |
+
|
2323 |
+
[dir="rtl"] ul > li > ul > li > ul > li > ul > li > ul > li > .n2-ss-layer-title .n2-ss-layer-icon {
|
2324 |
+
right: 83px;
|
2325 |
+
left: auto;
|
2326 |
+
}
|
2327 |
+
|
2328 |
+
[dir="rtl"] ul > li > ul > li > ul > li > ul > li > ul > li > ul > li .n2-ss-layer-title .n2-ss-layer-icon {
|
2329 |
+
right: 103px;
|
2330 |
+
left: auto;
|
2331 |
+
}
|
2332 |
+
|
2333 |
.n2-ss-layerlist-row .n2-inline-form input {
|
2334 |
background: #3c4958 none repeat scroll 0 0;
|
2335 |
color: #b2bfc9;
|
2373 |
}
|
2374 |
|
2375 |
html[dir="rtl"] .n2-ss-layer-title .n2-actions-left {
|
2376 |
+
right: 0;
|
2377 |
+
left: auto;
|
2378 |
}
|
2379 |
|
2380 |
#n2-ss-layer-list .n2-ss-layerlist-row.n2-active > .n2-ss-layer-title,
|
2620 |
padding-bottom: 400px;
|
2621 |
padding-bottom: 40vh;
|
2622 |
position: relative;
|
2623 |
+
z-index: 1;
|
2624 |
border-top: 1px solid #ccd1d6;
|
2625 |
}
|
2626 |
|
2638 |
border-top: 1px solid #ccd1d6;
|
2639 |
}
|
2640 |
|
2641 |
+
[dir="rtl"] #n2-ss-slide-canvas-container-inner {
|
2642 |
+
margin-right: 49px;
|
2643 |
+
margin-left: 0;
|
2644 |
+
}
|
2645 |
+
|
2646 |
.n2-ss-position-display {
|
2647 |
display: none;
|
2648 |
position: absolute;
|
2699 |
position: relative;
|
2700 |
height: 0;
|
2701 |
width: 100%;
|
2702 |
+
box-shadow: 0 0 0 2px #0c92df;
|
2703 |
display: block;
|
2704 |
z-index: 100000;
|
2705 |
}
|
2731 |
|
2732 |
/* When resize a layer, it shows other layers to snap too */
|
2733 |
/* When move a layer, it shows other layers to snap too */
|
2734 |
+
.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.nui-resizable,
|
2735 |
+
.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.nui-resizable {
|
2736 |
+
box-shadow: inset 0 0 0 1px #0c92df;
|
2737 |
+
}
|
2738 |
+
|
2739 |
+
.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.nui-resizable[data-pm="absolute"],
|
2740 |
+
.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.nui-resizable[data-pm="absolute"],
|
2741 |
+
.n2-ss-resize-layer div#n2-ss-0 [data-pm="absolute"] .n2-ss-layer.nui-resizable,
|
2742 |
+
.n2-ss-move-layer div#n2-ss-0 [data-pm="absolute"] .n2-ss-layer.nui-resizable {
|
2743 |
+
box-shadow: inset 0 0 0 1px #5f39c2;
|
2744 |
}
|
2745 |
|
2746 |
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over {
|
2747 |
+
box-shadow: inset 0 0 0 1px #0c92df;
|
2748 |
+
}
|
2749 |
+
|
2750 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over[data-pm="absolute"],
|
2751 |
+
#n2-ss-slide-canvas-container #n2-ss-0 [data-pm="absolute"] .n2-ss-layer.n2-ss-mouse-over {
|
2752 |
+
box-shadow: inset 0 0 0 1px #5f39c2;
|
2753 |
}
|
2754 |
|
2755 |
div#n2-ss-0 .n2-ss-layer-ui-label-container {
|
2769 |
max-height: 100%;
|
2770 |
}
|
2771 |
|
2772 |
+
div#n2-ss-0 [data-pm="absolute"] .n2-ss-layer-ui-label-container {
|
2773 |
+
background: #5f39c2;
|
2774 |
+
}
|
2775 |
+
|
2776 |
div#n2-ss-0 .n2-ss-layer-ui-label-container:HOVER {
|
2777 |
|
2778 |
max-width: none;
|
2796 |
border-left: 1px solid #0b7dbe;
|
2797 |
}
|
2798 |
|
2799 |
+
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer[data-pm="absolute"] .n2-ss-layer-ui-label {
|
2800 |
+
border-left: 1px solid #422887;
|
2801 |
+
}
|
2802 |
+
|
2803 |
#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer > .n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action {
|
2804 |
padding: 0;
|
2805 |
cursor: pointer;
|
2825 |
}
|
2826 |
|
2827 |
/* Outline col when highlighted */
|
2828 |
+
.n2-ss-layer[data-sstype="col"].n2-highlight {
|
2829 |
+
box-shadow: inset 0 0 0 1px #0c92df;
|
2830 |
}
|
2831 |
|
2832 |
+
div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-sstype="col"] {
|
2833 |
z-index: 2;
|
2834 |
}
|
2835 |
|
2836 |
/* Outline when the mouse over the editor and component is active */
|
2837 |
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active {
|
2838 |
|
2839 |
+
box-shadow: inset 0 0 0 1px #0c92df;
|
2840 |
+
}
|
2841 |
+
|
2842 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer[data-pm="absolute"].n2-active,
|
2843 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 [data-pm="absolute"] .n2-ss-layer.n2-active {
|
2844 |
+
|
2845 |
+
box-shadow: inset 0 0 0 1px #5f39c2;
|
2846 |
}
|
2847 |
|
2848 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER #n2-ss-0 .n2-ss-layer[data-sstype="row"].n2-active {
|
2849 |
|
2850 |
+
box-shadow: inset 0 0 0 1px RGBA(12, 146, 223, 1);
|
2851 |
}
|
2852 |
|
2853 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer .n2-ss-layer[data-sstype="col"].n2-active {
|
2854 |
|
2855 |
+
box-shadow: inset 0 0 0 1px RGBA(12, 146, 223, 1);
|
2856 |
+
}
|
2857 |
+
|
2858 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer[data-pm="absolute"] .n2-ss-layer[data-sstype="col"].n2-active {
|
2859 |
+
|
2860 |
+
box-shadow: inset 0 0 0 1px #5f39c2;
|
2861 |
}
|
2862 |
|
2863 |
/* When a normal positioned layer dragged, outline the cols where it can be placed */
|
2864 |
+
.n2-ss-move-layer .n2-ss-layer[data-sstype="col"] {
|
2865 |
+
box-shadow: inset 0 0 0 1px RGBA(12, 146, 223, 1);
|
2866 |
}
|
2867 |
|
2868 |
.n2-ss-move-layer #n2-ss-0 .n2-ss-layer:HOVER {
|
2871 |
|
2872 |
/* While dragging a layer with normal position */
|
2873 |
|
2874 |
+
div#n2-ss-0 .n2-ss-layer[data-sstype="content"] .n2-ss-layer.nui-draggable-dragging,
|
2875 |
+
div#n2-ss-0 .n2-ss-layer[data-sstype="col"] .n2-ss-layer.nui-draggable-dragging {
|
2876 |
/*position: absolute !important;*/
|
2877 |
/*width: 50px !important;
|
2878 |
height: 50px !important;
|
2885 |
}
|
2886 |
|
2887 |
/* While dragging a layer with normal position, hide all inside elements */
|
2888 |
+
/*div#n2-ss-0 .n2-ss-layer[data-sstype="col"] .n2-ss-layer.nui-draggable-dragging * {
|
2889 |
display: none !important;
|
2890 |
}*/
|
2891 |
|
2892 |
+
.n2-ss-item-overlay {
|
2893 |
display: none;
|
2894 |
position: absolute;
|
2895 |
top: 0;
|
2898 |
height: 100%;
|
2899 |
}
|
2900 |
|
2901 |
+
.n2-ss-select-layer-mode .n2-ss-layer-selected .n2-ss-item-overlay {
|
2902 |
display: block;
|
2903 |
background-color: RGBA(0, 132, 255, 0.4);
|
2904 |
}
|
2905 |
|
2906 |
+
.n2-ss-item-html .n2-ss-item-overlay,
|
2907 |
.n2-ss-item-iframe .ui-item-overlay {
|
2908 |
display: block;
|
2909 |
}
|
2910 |
|
2911 |
/* RESIZE */
|
2912 |
|
2913 |
+
.n2-ss-layer .n2-ss-layer-cc {
|
|
|
|
|
|
|
|
|
2914 |
opacity: 0;
|
2915 |
}
|
2916 |
|
2917 |
.n2-ss-layer-cc:HOVER,
|
2918 |
+
.nui-resizable-n:HOVER,
|
2919 |
+
.nui-resizable-e:HOVER,
|
2920 |
+
.nui-resizable-s:HOVER,
|
2921 |
+
.nui-resizable-w:HOVER,
|
2922 |
+
.nui-resizable-ne:HOVER,
|
2923 |
+
.nui-resizable-se:HOVER,
|
2924 |
+
.nui-resizable-sw:HOVER,
|
2925 |
+
.nui-resizable-nw:HOVER {
|
2926 |
opacity: 1;
|
2927 |
}
|
2928 |
|
2929 |
+
.n2-ss-layer[data-align="left"][data-valign="top"] .nui-resizable-nw,
|
2930 |
+
.n2-ss-layer[data-align="left"][data-valign="middle"] .nui-resizable-w,
|
2931 |
+
.n2-ss-layer[data-align="left"][data-valign="bottom"] .nui-resizable-sw,
|
2932 |
+
.n2-ss-layer[data-align="center"][data-valign="top"] .nui-resizable-n,
|
2933 |
.n2-ss-layer[data-align="center"][data-valign="middle"] .n2-ss-layer-cc,
|
2934 |
+
.n2-ss-layer[data-align="center"][data-valign="bottom"] .nui-resizable-s,
|
2935 |
+
.n2-ss-layer[data-align="right"][data-valign="top"] .nui-resizable-ne,
|
2936 |
+
.n2-ss-layer[data-align="right"][data-valign="middle"] .nui-resizable-e,
|
2937 |
+
.n2-ss-layer[data-align="right"][data-valign="bottom"] .nui-resizable-se {
|
2938 |
background: #0c92df;
|
2939 |
opacity: 1;
|
2940 |
border: 1px solid #fff;
|
2941 |
}
|
2942 |
|
2943 |
+
.n2-ss-layer[data-align="left"][data-valign="top"][data-pm="absolute"] .nui-resizable-nw,
|
2944 |
+
.n2-ss-layer[data-align="left"][data-valign="middle"][data-pm="absolute"] .nui-resizable-w,
|
2945 |
+
.n2-ss-layer[data-align="left"][data-valign="bottom"][data-pm="absolute"] .nui-resizable-sw,
|
2946 |
+
.n2-ss-layer[data-align="center"][data-valign="top"][data-pm="absolute"] .nui-resizable-n,
|
2947 |
+
.n2-ss-layer[data-align="center"][data-valign="middle"][data-pm="absolute"] .n2-ss-layer-cc,
|
2948 |
+
.n2-ss-layer[data-align="center"][data-valign="bottom"][data-pm="absolute"] .nui-resizable-s,
|
2949 |
+
.n2-ss-layer[data-align="right"][data-valign="top"][data-pm="absolute"] .nui-resizable-ne,
|
2950 |
+
.n2-ss-layer[data-align="right"][data-valign="middle"][data-pm="absolute"] .nui-resizable-e,
|
2951 |
+
.n2-ss-layer[data-align="right"][data-valign="bottom"][data-pm="absolute"] .nui-resizable-se {
|
2952 |
+
background: #5f39c2;
|
2953 |
+
}
|
2954 |
+
|
2955 |
.n2-ss-layer-cc {
|
2956 |
position: absolute;
|
2957 |
font-size: 0.1px;
|
2959 |
z-index: 92;
|
2960 |
}
|
2961 |
|
2962 |
+
.n2-ss-layer .nui-resizable-handle,
|
2963 |
+
.n2-ss-layer .nui-normal-sizing-handle {
|
2964 |
border-radius: 50px;
|
2965 |
}
|
2966 |
|
2967 |
.n2-ss-layer .n2-ss-layer-cc,
|
2968 |
+
.n2-ss-layer .nui-resizable-handle,
|
2969 |
+
.n2-ss-layer .nui-normal-sizing-handle {
|
2970 |
display: none !important;
|
2971 |
background-image: none;
|
2972 |
border: 1px solid #0c92df;
|
2975 |
background: #fff;
|
2976 |
}
|
2977 |
|
2978 |
+
.n2-ss-layer[data-pm="absolute"] .n2-ss-layer-cc,
|
2979 |
+
.n2-ss-layer[data-pm="absolute"] .nui-resizable-handle,
|
2980 |
+
.n2-ss-layer[data-pm="absolute"] .nui-normal-sizing-handle {
|
2981 |
+
border: 1px solid #5f39c2;
|
2982 |
+
}
|
2983 |
+
|
2984 |
.n2-ss-layer .ui-column-width-handle {
|
2985 |
display: none !important;
|
2986 |
position: absolute;
|
3001 |
background: RGBA(12, 146, 223, 1);
|
3002 |
}
|
3003 |
|
3004 |
+
.n2-ss-layer[data-pm="absolute"] .ui-column-width-handle {
|
3005 |
+
background: RGBA(95, 57, 194, .5);
|
3006 |
+
}
|
3007 |
+
|
3008 |
+
.n2-ss-layer[data-pm="absolute"] .ui-column-width-handle:HOVER {
|
3009 |
+
background: RGBA(95, 57, 194, 1);
|
3010 |
+
}
|
3011 |
+
|
3012 |
+
.n2-ss-layer .nui-spacing-handle {
|
3013 |
display: none !important;
|
3014 |
opacity: 1;
|
3015 |
z-index: 89;
|
3018 |
overflow: hidden;
|
3019 |
}
|
3020 |
|
3021 |
+
.n2-ss-layer[data-pm="absolute"] .nui-spacing-handle {
|
3022 |
+
background: #5f39c2;
|
3023 |
+
}
|
3024 |
+
|
3025 |
+
.n2-ss-layer .nui-spacing-handle:HOVER,
|
3026 |
+
.n2-ss-layer .nui-spacing-handle.nui-spacing-under-spacing {
|
3027 |
opacity: 0.8;
|
3028 |
}
|
3029 |
|
3030 |
+
.n2-ss-layer .nui-resizable-n {
|
3031 |
left: 50%;
|
3032 |
top: -4px;
|
3033 |
margin-left: -4px;
|
3034 |
}
|
3035 |
|
3036 |
+
.n2-ss-layer .nui-spacing-handle.nui-spacing-n {
|
3037 |
min-height: 5px;
|
3038 |
cursor: s-resize;
|
3039 |
}
|
3040 |
|
3041 |
+
.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-n {
|
3042 |
top: 0;
|
3043 |
margin-left: 0;
|
3044 |
left: 25%;
|
3045 |
width: 50%;
|
3046 |
}
|
3047 |
|
3048 |
+
.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-n {
|
3049 |
left: 0;
|
3050 |
bottom: 100%;
|
3051 |
width: 100%;
|
3052 |
}
|
3053 |
|
3054 |
+
.n2-ss-layer .nui-resizable-e,
|
3055 |
+
.n2-ss-layer .nui-normal-sizing-e {
|
3056 |
right: -4px;
|
3057 |
top: 50%;
|
3058 |
margin-top: -4px;
|
3059 |
}
|
3060 |
|
3061 |
+
.n2-ss-layer .nui-spacing-handle.nui-spacing-e {
|
3062 |
min-width: 5px;
|
3063 |
cursor: w-resize;
|
3064 |
}
|
3065 |
|
3066 |
+
.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-e {
|
3067 |
top: 25%;
|
3068 |
margin-top: 0;
|
3069 |
right: 0;
|
3070 |
height: 50%;
|
3071 |
}
|
3072 |
|
3073 |
+
.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-e {
|
3074 |
top: 0;
|
3075 |
left: 100%;
|
3076 |
height: 100%;
|
3077 |
}
|
3078 |
|
3079 |
+
.n2-ss-layer .nui-resizable-s,
|
3080 |
+
.n2-ss-layer .nui-normal-sizing-s {
|
3081 |
bottom: -4px;
|
3082 |
left: 50%;
|
3083 |
margin-left: -4px;
|
3084 |
}
|
3085 |
|
3086 |
+
.n2-ss-layer .nui-spacing-handle.nui-spacing-s {
|
3087 |
min-height: 5px;
|
3088 |
cursor: n-resize;
|
3089 |
}
|
3090 |
|
3091 |
+
.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-s {
|
3092 |
bottom: 0;
|
3093 |
margin-left: 0;
|
3094 |
left: 25%;
|
3095 |
width: 50%;
|
3096 |
}
|
3097 |
|
3098 |
+
.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-s {
|
3099 |
bottom: auto;
|
3100 |
top: 100%;
|
3101 |
left: 0;
|
3102 |
width: 100%;
|
3103 |
}
|
3104 |
|
3105 |
+
.n2-ss-layer .nui-resizable-w,
|
3106 |
+
.n2-ss-layer .nui-normal-sizing-w {
|
3107 |
left: -4px;
|
3108 |
top: 50%;
|
3109 |
margin-top: -4px;
|
3110 |
}
|
3111 |
|
3112 |
+
.n2-ss-layer .nui-spacing-handle.nui-spacing-w {
|
3113 |
min-width: 5px;
|
3114 |
cursor: e-resize;
|
3115 |
}
|
3116 |
|
3117 |
+
.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-w {
|
3118 |
top: 25%;
|
3119 |
margin-top: 0;
|
3120 |
left: 0;
|
3121 |
height: 50%;
|
3122 |
}
|
3123 |
|
3124 |
+
.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-w {
|
3125 |
left: auto;
|
3126 |
right: 100%;
|
3127 |
top: 0;
|
3128 |
height: 100%;
|
3129 |
}
|
3130 |
|
3131 |
+
.n2-ss-layer .nui-resizable-ne {
|
3132 |
right: -4px;
|
3133 |
top: -4px;
|
3134 |
}
|
3135 |
|
3136 |
+
.n2-ss-layer .nui-resizable-se {
|
3137 |
right: -4px;
|
3138 |
bottom: -4px;
|
3139 |
}
|
3140 |
|
3141 |
+
.n2-ss-layer .nui-resizable-sw {
|
3142 |
left: -4px;
|
3143 |
bottom: -4px;
|
3144 |
}
|
3145 |
|
3146 |
+
.n2-ss-layer .nui-resizable-nw {
|
3147 |
left: -4px;
|
3148 |
top: -4px;
|
3149 |
}
|
3156 |
}
|
3157 |
|
3158 |
.n2-ss-layer.n2-active:HOVER {
|
3159 |
+
box-shadow: inset 0 0 0 1px #0c92df;
|
3160 |
+
}
|
3161 |
+
|
3162 |
+
.n2-ss-layer.n2-active[data-pm="absolute"]:HOVER,
|
3163 |
+
[data-pm="absolute"] .n2-ss-layer.n2-active:HOVER {
|
3164 |
+
box-shadow: inset 0 0 0 1px #5f39c2;
|
3165 |
}
|
3166 |
|
3167 |
+
.n2-ss-resize-layer .n2-ss-layer.n2-active > .nui-resizable-handle,
|
3168 |
+
.n2-ss-layer.n2-active:HOVER > .nui-resizable-handle,
|
3169 |
+
.n2-ss-resize-layer .n2-ss-layer.n2-active > .nui-normal-sizing-handle,
|
3170 |
+
.n2-ss-layer.n2-active:HOVER > .nui-normal-sizing-handle,
|
3171 |
.n2-ss-resize-layer .n2-ss-layer.n2-active > .n2-ss-layer-row > .ui-column-width-handle,
|
3172 |
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .ui-column-width-handle,
|
3173 |
+
.n2-ss-resize-layer .n2-ss-layer.n2-active > .n2-ss-layer-row > .nui-spacing-handle,
|
3174 |
+
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .nui-spacing-handle,
|
3175 |
.n2-ss-layer.n2-active:HOVER > .n2-ss-layer-cc,
|
3176 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .nui-resizable-handle,
|
3177 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .nui-normal-sizing-handle,
|
3178 |
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .n2-ss-layer-cc {
|
3179 |
display: block !important;
|
3180 |
}
|
3181 |
|
3182 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active > .nui-spacing-handle {
|
3183 |
display: none !important;
|
3184 |
}
|
3185 |
|
3186 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .nui-spacing-handle,
|
3187 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-row > .nui-spacing-handle,
|
3188 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-mask > .n2-ss-layer-row > .nui-spacing-handle,
|
3189 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-content > .nui-spacing-handle,
|
3190 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER > .n2-ss-layer-mask > .n2-ss-layer-content > .nui-spacing-handle {
|
3191 |
display: block !important;
|
3192 |
}
|
3193 |
|
3194 |
+
.nui-spacing-resizing > .nui-spacing-handle,
|
3195 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.nui-spacing-resizing > .nui-spacing-handle,
|
3196 |
+
.nui-resizable-resizing > .nui-spacing-handle,
|
3197 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.nui-resizable-resizing > div > .nui-spacing-handle,
|
3198 |
+
.nui-resizable-resizing > .nui-spacing-handle,
|
3199 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.nui-resizable-resizing > div > .nui-spacing-handle {
|
3200 |
display: block !important;
|
3201 |
}
|
3202 |
|
3203 |
+
.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.nui-spacing-resizing > .nui-spacing-handle.nui-spacing-under-spacing {
|
3204 |
opacity: 1;
|
3205 |
}
|
3206 |
|
3207 |
+
#n2-ss-0 .nui-spacing-resizing .ui-column-width-handle,
|
3208 |
+
#n2-ss-0 .n2-ss-layer-row[row-wrapped="1"] .ui-column-width-handle,
|
3209 |
+
#n2-ss-0 [data-frontend-fullwidth="0"] > .n2-ss-layer-row .ui-column-width-handle {
|
3210 |
display: none !important;
|
3211 |
}
|
3212 |
|
3213 |
+
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .nui-resizable-handle,
|
3214 |
+
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .nui-normal-sizing-handle,
|
3215 |
.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,
|
3216 |
+
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .nui-resizable-handle,
|
3217 |
+
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .nui-normal-sizing-handle,
|
3218 |
.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc {
|
3219 |
display: none !important;
|
3220 |
}
|
3359 |
border-color: #0b7dbe;
|
3360 |
}
|
3361 |
|
3362 |
+
.n2-ss-layer[data-sstype="col"] > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self {
|
3363 |
cursor: move;
|
3364 |
}
|
3365 |
|
3366 |
+
.n2-highlight-structure .n2-ss-layer[data-sstype="col"] {
|
3367 |
+
box-shadow: 0 0 0 2px #0c92df;
|
3368 |
+
}
|
3369 |
+
|
3370 |
+
.n2-highlight-structure[data-pm="absolute"] .n2-ss-layer[data-sstype="col"] {
|
3371 |
+
box-shadow: 0 0 0 2px #5f39c2;
|
3372 |
}
|
3373 |
|
3374 |
.n2-ss-layer-under-creation {
|
3375 |
visibility: hidden !important;
|
3376 |
}
|
3377 |
|
3378 |
+
[data-editormode="canvas"] div#n2-ss-0 .n2-ss-layer[data-sstype="content"].n2-ss-content-empty {
|
3379 |
display: none;
|
3380 |
}
|
3381 |
|
3382 |
+
[data-editormode="content"] div#n2-ss-0 .n2-ss-layer[data-sstype="content"].n2-ss-content-empty {
|
3383 |
height: 100%;
|
3384 |
}
|
3385 |
|
3460 |
margin: 20px 0;
|
3461 |
}
|
3462 |
|
|
|
|
|
|
|
|
|
3463 |
[data-visibility="hidden"],
|
3464 |
[data-visibility="hidden"] * {
|
3465 |
visibility: hidden !important;
|
3466 |
}
|
3467 |
|
3468 |
+
div div#n2-ss-0 .n2-ss-static-slide div[data-sstype="content"],
|
3469 |
+
div div#n2-ss-0 .n2-ss-static-slide div[data-sstype="content"] div.n2-ss-section-main-content {
|
|
|
3470 |
visibility: visible;
|
3471 |
}
|
3472 |
.n2-ss-sample-slides-container {
|
3579 |
margin-left: auto;
|
3580 |
}
|
3581 |
|
3582 |
+
.n2-ss-sample-slide-setting-field .nui-slider {
|
3583 |
width: 100px;
|
3584 |
position: relative;
|
3585 |
background: #374d64;
|
3588 |
border-radius: 10px;
|
3589 |
}
|
3590 |
|
3591 |
+
.n2-ss-sample-slide-setting-field .nui-slider .nui-slider-handle {
|
3592 |
position: absolute;
|
3593 |
top: 0;
|
3594 |
z-index: 2;
|
3705 |
position: relative;
|
3706 |
margin: 0;
|
3707 |
background: transparent;
|
3708 |
+
border: none;
|
3709 |
border-radius: 0;
|
3710 |
}
|
3711 |
|
3712 |
+
#n2-ss-slider-zoom .nui-slider-range {
|
3713 |
display: none;
|
3714 |
}
|
3715 |
|
3716 |
+
#n2-ss-slider-zoom .nui-slider-handle {
|
3717 |
position: absolute;
|
3718 |
top: 50%;
|
3719 |
display: block;
|
3723 |
margin-left: -23px;
|
3724 |
background-color: #e6eaee;
|
3725 |
background: #e6eaee;
|
3726 |
+
border: none;
|
3727 |
border-radius: 3px;
|
3728 |
z-index: 2;
|
3729 |
color: #7b8898;
|
3743 |
background-color: #6b7986;
|
3744 |
}
|
3745 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3746 |
.n2-ss-device-zoomer {
|
3747 |
min-width: 280px;
|
3748 |
}
|
3765 |
background-color: #374d64;
|
3766 |
}
|
3767 |
|
3768 |
+
.n2-ss-device-zoomer #n2-ss-zoom .n2-ss-slider-zoom-container > .n2-i {
|
|
|
3769 |
color: #4e667f;
|
3770 |
}
|
3771 |
|
3772 |
+
.n2-ss-device-zoomer #n2-ss-slider-zoom .nui-slider-handle {
|
3773 |
background-color: #526a80;
|
3774 |
color: #fff;
|
3775 |
}
|
3792 |
color: #a4b0b7;
|
3793 |
}
|
3794 |
|
|
|
|
|
|
|
|
|
3795 |
#n2-ss-devices .n2-td {
|
3796 |
height: 60px;
|
3797 |
vertical-align: middle;
|
3909 |
width: 100%;
|
3910 |
height: 100%;
|
3911 |
z-index: 1000000;
|
3912 |
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
|
3913 |
}
|
3914 |
|
3915 |
.n2-ss-picker-overlay-tile {
|
3959 |
left: 0;
|
3960 |
box-sizing: border-box;
|
3961 |
white-space: nowrap;
|
3962 |
+
direction: ltr;
|
3963 |
}
|
3964 |
|
3965 |
.n2-ruler > span {
|
4061 |
|
4062 |
.n2-ruler-vertical {
|
4063 |
padding-top: 1px;
|
4064 |
+
width: 0;
|
4065 |
height: 100%;
|
4066 |
background: #e9edf0;
|
4067 |
z-index: 5;
|
4096 |
}
|
4097 |
|
4098 |
.n2-ruler-horizontal .n2-ruler-guide {
|
4099 |
+
width: 0;
|
4100 |
height: 3000px;
|
4101 |
}
|
4102 |
|
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 #n2-admin{mragin-top:30px}#html-body .header{position:relative;z-index:1100}.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-drag-images,#n2-ss-slides .n2-box-slide-dummy{text-align:center;color:#7b8898;box-sizing:border-box;border:2px dashed #b2bfc9}#n2-ss-slides .n2-box-slide-dummy{background:#e9edf0;background-image:url(../images/dummy-slide.png);background-repeat:no-repeat;background-position:center 36px;font-size:14px;line-height:200px}#n2-ss-slides .n2-box-slide-drag-images{background:url(../images/drag.png) no-repeat center 4px;padding:90px 60px 0;line-height:12px;box-shadow:none}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-0 .n2-ss-slide{opacity:.3}#n2-ss-0 .n2-ss-slide.n2-ss-currently-edited-slide{opacity:1}#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:15px;cursor:pointer;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:90px;min-height:73px;z-index:1000;vertical-align:top;padding-bottom:5px}.n2-ss-core-item:before{font-family:'Nextend';font-size:32px;content:"\e943";display:block;line-height:32px;margin-top:16px;margin-bottom:3px}.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-mask>.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-mask>.n2-ss-layer-row>.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}
|
1 |
+
#html-body header,.adminhtml-smartslider3-index #footer,.adminhtml-smartslider3-index .footer,.n2-ss-live-preview.n2-active .n2-button,.smartslider3-index-index footer{display:none}#html-body #anchor-content #n2-admin{mragin-top:30px}#html-body .header{position:relative;z-index:1100}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.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-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;direction:ltr}.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-autoplay='0'] #n2-form-matrix-sliderwidgets .n2-fm-autoplay,#n2-admin[data-autoplay='0'] #n2-form-matrix-sliderwidgets .n2-fm-indicator,#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-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;vertical-align:top}.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;border-top-right-radius:0;border-bottom-right-radius:0;overflow:hidden;padding:0 10px;line-height:36px;box-shadow:none;color:#7b8898;font-size:12px;background:#fff;box-sizing:border-box}.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-edit-group-form>.n2-form>.n2-form-tab,#n2-ss-edit-slider-form>.n2-form>.n2-form-tab{margin:20px 0 0;border-radius:0;border:0}#n2-ss-edit-group-form>.n2-form>.n2-form-tab .n2-form-matrix-views,#n2-ss-edit-slider-form>.n2-form>.n2-form-tab .n2-form-matrix-views{border-radius:0}#n2-ss-slider-container[data-groupid="0"] .n2-ss-remove-from-group,.n2-box-add-license.n2-ss-license-has-active-key,.n2-box-license-activated.n2-ss-license-no-active-key,.n2-ss-box-slider-group .n2-ss-add-to-group,.n2-ss-box-slider-group .n2-ss-remove-from-group,body[data-slides='0'] #n2-ss-edit-slider-form{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;vertical-align:top}html[data-sliders='0'] .n2-ss-sliders-header{visibility:hidden}.n2-ss-box-slider{cursor:pointer}.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-drag-images,#n2-ss-slides .n2-box-slide-dummy{text-align:center;color:#7b8898;box-sizing:border-box;border:2px dashed #b2bfc9}#n2-ss-slides .n2-box-slide-dummy{background:#e9edf0;background-image:url(../images/dummy-slide.png);background-repeat:no-repeat;background-position:center 36px;font-size:14px;line-height:200px}#n2-ss-slides .n2-box-slide-drag-images{background:url(../images/drag.png) no-repeat center 4px;padding:90px 60px 0;line-height:12px;box-shadow:none}body:not([data-slides='0']) #n2-ss-slides .n2-box-dummy,body:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,body: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:14px 0 4px}.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-ss-add-slide-button,.n2-box-add-sample-slide>a{width:100%;height:135px;padding:0}#n2-ss-slides .n2-box-slide-add>.n2-ss-add-slide-button: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:top;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:#606d7b;background:#fff;margin-top:25px;padding:10px 15px;border-radius:5px}.n2-ss-block-slides-notice p{margin:0 0 10px}body:not([data-slides='0']):not([data-slides='1']) #n2-admin[data-slider-type=block] .n2-ss-block-slides-notice{display:inline-block}#n2-ss-slides .n2-box-slide-add .n2-ss-add-slide-button:before{transition:transform .4s}#n2-ss-slides .n2-box-slide-add .n2-ss-add-slide-button{transition:background .4s}#n2-ss-slides[data-showcreateslide="1"] .n2-box-slide-add .n2-ss-add-slide-button{background:#6b7986}#n2-ss-slides[data-showcreateslide="1"] .n2-box-slide-add .n2-ss-add-slide-button:before{transform:rotateZ(45deg)}#n2-ss-slides .n2-ss-slides-create{position:relative;background:#202934;margin:-25px -26px 0;height:0;overflow:hidden;transition:height .4s}#n2-ss-slides .n2-ss-slides-create>div{padding:15px 16px}#n2-ss-slides[data-showcreateslide="1"] .n2-ss-slides-create{height:198px}#n2-ss-slides .n2-ss-slides-create-heading{font-size:22px;line-height:38px;color:#fff;margin:0 10px}#n2-ss-slides .n2-ss-slides-create-inner{display:flex}#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box{display:flex;flex-flow:column;justify-content:center;max-width:140px;width:140px;height:110px;text-align:center;color:#80a3b5;cursor:pointer;border-radius:5px;margin:10px}#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box-label{font-size:14px;margin-top:3px}#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box[data-action=image]{background:#51b82d;color:#fff}#n2-ss-slides .n2-ss-slides-create .n2-ss-slides-create-action-box[data-action=library]{background:#5f39c2;color:#fff}.n2-ss-slides-create-action-box-icon{font-size:48px}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 .nui-normal-sizing-handle,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .nui-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}.n2-ss-currently-edited-slide .n2-ss-layer{background:RGBA(0,0,0,0)}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-sstype=col],#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-sstype=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 .nui-normal-sizing-handle,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .nui-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 .n2-ss-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-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-slider-name .n2-h1,.n2-ss-edit-slide-top-details .n2-h1{color:#606d7b;margin-bottom:15px;cursor:pointer;line-height:30px}[dir=ltr] .n2-slider-name .n2-h1:HOVER:after,[dir=ltr] .n2-ss-edit-slide-top-details .n2-h1:HOVER:after,[dir=rtl] .n2-slider-name .n2-h1:HOVER:before,[dir=rtl] .n2-ss-edit-slide-top-details .n2-h1:HOVER:before{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}[dir=rtl] .n2-ss-edit-slide-top-tabs .n2-button.n2-first{border-top-left-radius:0;border-bottom-left-radius:0;border-left:0;border-right:2px solid #e0e6ed}.n2-ss-edit-slide-top-tabs .n2-button.n2-last,[dir=rtl] .n2-ss-edit-slide-top-tabs .n2-button.n2-first{border-top-right-radius:3px;border-bottom-right-radius:3px}[dir=rtl] .n2-ss-edit-slide-top-tabs .n2-button.n2-last{border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:2px solid #e0e6ed}.n2-ss-edit-slide-top-tabs .n2-button.n2-active{background:#0c92df;color:#fff;border-color:#0c92df!important}.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;padding:40px 0 0 40px}.n2-ss-canvas-slider-container{padding-bottom:99px;margin:10px}.n2-ss-has-ruler .n2-ss-canvas-slider-container{margin:0}#n2-ss-0-align{margin:0!important}.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-video-param,.n2-ss-background-type-color .n2-ss-slide-background-image-param,.n2-ss-background-type-gradient .n2-ss-background-video-param,.n2-ss-background-type-gradient .n2-ss-slide-background-image-param,.n2-ss-background-type-image .n2-ss-background-video-param:not(.n2-ss-slide-background-image-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-0 .n2-ss-slide{opacity:.3}#n2-ss-0 .n2-ss-slide.n2-ss-currently-edited-slide{opacity:1}.n2-form-element-style-mode{display:flex;background:#28313a;padding:10px;border:1px solid #20282f;border-width:1px 0;margin-bottom:-1px;align-items:center}.n2-form-element-style-mode-reset{margin:0 10px 0 auto}.n2-form-element-style-mode .n2-form-element-radio-tab{height:24px;line-height:24px;margin:0}.n2-form-element-style-mode .n2-form-element-radio-tab .n2-radio-option{background:#6b7986;color:#fff;font-size:11px}.n2-form-element-style-mode .n2-form-element-radio-tab .n2-radio-option.n2-active{background:#0c92df}.n2-form-element-style-mode-label{display:inline-block;font-size:11px;color:#b2bfc9}#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 .nui-autocomplete .nui-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}[dir=rtl] #n2-ss-add-sidebar{right:-1px;left:auto}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner{position:relative;padding-top:.1px}#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:15px;cursor:pointer;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:90px;min-height:73px;z-index:1000;vertical-align:top;padding-bottom:5px}.n2-ss-core-item:before{font-family:'Nextend';font-size:32px;content:"\e943";display:block;line-height:32px;margin-top:16px;margin-bottom:3px}.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-sstype="1col"]:before{content:"\e967"}.n2-ss-core-item[data-item=structure][data-sstype="2col"]:before{content:"\e966"}.n2-ss-core-item[data-item=structure][data-sstype="3col"]:before{content:"\e961"}.n2-ss-core-item[data-item=structure][data-sstype="4col"]:before{content:"\e95f"}.n2-ss-core-item[data-item=structure][data-sstype="2col-60-40"]:before{content:"\e965"}.n2-ss-core-item[data-item=structure][data-sstype="2col-40-60"]:before{content:"\e964"}.n2-ss-core-item[data-item=structure][data-sstype="2col-80-20"]:before{content:"\e963"}.n2-ss-core-item[data-item=structure][data-sstype="2col-20-80"]:before{content:"\e962"}.n2-ss-core-item[data-item=structure][data-sstype="3col-20-60-20"]:before{content:"\e960"}.n2-ss-core-item[data-item=structure][data-sstype=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-active[data-mode=canvas]{background-color:#5f39c2;border-color:#5f39c2}#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 .n2-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}[dir=rtl] ul>li>.n2-ss-layer-title .n2-ss-layer-icon{right:3px;left:auto}[dir=rtl] #n2-ss-layer-list>ul>li.n2-ss-layer-content-row>.n2-ss-layer-title .n2-ss-layer-icon,[dir=rtl] #n2-ss-layer-list>ul>li.n2-ss-layer-row-row>.n2-ss-layer-title .n2-ss-layer-icon,[dir=rtl] ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{right:23px;left:auto}[dir=rtl] ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{right:43px;left:auto}[dir=rtl] ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{right:63px;left:auto}[dir=rtl] ul>li>ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{right:83px;left:auto}[dir=rtl] ul>li>ul>li>ul>li>ul>li>ul>li>ul>li .n2-ss-layer-title .n2-ss-layer-icon{right:103px;left:auto}.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{right:0;left:auto}#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;z-index:1;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}[dir=rtl] #n2-ss-slide-canvas-container-inner{margin-right:49px;margin-left:0}.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-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over,.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.nui-resizable,.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.nui-resizable{box-shadow:inset 0 0 0 1px #0c92df}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over[data-pm=absolute],#n2-ss-slide-canvas-container #n2-ss-0 [data-pm=absolute] .n2-ss-layer.n2-ss-mouse-over,.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.nui-resizable[data-pm=absolute],.n2-ss-move-layer div#n2-ss-0 [data-pm=absolute] .n2-ss-layer.nui-resizable,.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.nui-resizable[data-pm=absolute],.n2-ss-resize-layer div#n2-ss-0 [data-pm=absolute] .n2-ss-layer.nui-resizable{box-shadow:inset 0 0 0 1px #5f39c2}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 [data-pm=absolute] .n2-ss-layer-ui-label-container{background:#5f39c2}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[data-pm=absolute] .n2-ss-layer-ui-label{border-left:1px solid #422887}#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-sstype=col].n2-highlight{box-shadow:inset 0 0 0 1px #0c92df}div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-sstype=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 div#n2-ss-0 .n2-ss-layer[data-pm=absolute] .n2-ss-layer[data-sstype=col].n2-active,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer[data-pm=absolute].n2-active,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 [data-pm=absolute] .n2-ss-layer.n2-active{box-shadow:inset 0 0 0 1px #5f39c2}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER #n2-ss-0 .n2-ss-layer[data-sstype=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-sstype=col].n2-active{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-move-layer .n2-ss-layer[data-sstype=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-sstype=col] .n2-ss-layer.nui-draggable-dragging,div#n2-ss-0 .n2-ss-layer[data-sstype=content] .n2-ss-layer.nui-draggable-dragging{z-index:100000;outline:0!important}.n2-ss-item-overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.n2-ss-select-layer-mode .n2-ss-layer-selected .n2-ss-item-overlay{display:block;background-color:RGBA(0,132,255,.4)}.n2-ss-item-html .n2-ss-item-overlay,.n2-ss-item-iframe .ui-item-overlay{display:block}.n2-ss-layer .n2-ss-layer-cc{opacity:0}.n2-ss-layer-cc:HOVER,.nui-resizable-e:HOVER,.nui-resizable-n:HOVER,.nui-resizable-ne:HOVER,.nui-resizable-nw:HOVER,.nui-resizable-s:HOVER,.nui-resizable-se:HOVER,.nui-resizable-sw:HOVER,.nui-resizable-w:HOVER{opacity:1}.n2-ss-layer[data-align=center][data-valign=bottom] .nui-resizable-s,.n2-ss-layer[data-align=center][data-valign=middle] .n2-ss-layer-cc,.n2-ss-layer[data-align=center][data-valign=top] .nui-resizable-n,.n2-ss-layer[data-align=left][data-valign=bottom] .nui-resizable-sw,.n2-ss-layer[data-align=left][data-valign=middle] .nui-resizable-w,.n2-ss-layer[data-align=left][data-valign=top] .nui-resizable-nw,.n2-ss-layer[data-align=right][data-valign=bottom] .nui-resizable-se,.n2-ss-layer[data-align=right][data-valign=middle] .nui-resizable-e,.n2-ss-layer[data-align=right][data-valign=top] .nui-resizable-ne{background:#0c92df;opacity:1;border:1px solid #fff}.n2-ss-layer[data-align=center][data-valign=bottom][data-pm=absolute] .nui-resizable-s,.n2-ss-layer[data-align=center][data-valign=middle][data-pm=absolute] .n2-ss-layer-cc,.n2-ss-layer[data-align=center][data-valign=top][data-pm=absolute] .nui-resizable-n,.n2-ss-layer[data-align=left][data-valign=bottom][data-pm=absolute] .nui-resizable-sw,.n2-ss-layer[data-align=left][data-valign=middle][data-pm=absolute] .nui-resizable-w,.n2-ss-layer[data-align=left][data-valign=top][data-pm=absolute] .nui-resizable-nw,.n2-ss-layer[data-align=right][data-valign=bottom][data-pm=absolute] .nui-resizable-se,.n2-ss-layer[data-align=right][data-valign=middle][data-pm=absolute] .nui-resizable-e,.n2-ss-layer[data-align=right][data-valign=top][data-pm=absolute] .nui-resizable-ne{background:#5f39c2}.n2-ss-layer-cc{position:absolute;font-size:.1px;display:block;z-index:92}.n2-ss-layer .nui-normal-sizing-handle,.n2-ss-layer .nui-resizable-handle{border-radius:50px}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .nui-normal-sizing-handle,.n2-ss-layer .nui-resizable-handle{display:none!important;background-image:none;border:1px solid #0c92df;height:7px;width:7px;background:#fff}.n2-ss-layer[data-pm=absolute] .n2-ss-layer-cc,.n2-ss-layer[data-pm=absolute] .nui-normal-sizing-handle,.n2-ss-layer[data-pm=absolute] .nui-resizable-handle{border:1px solid #5f39c2}.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[data-pm=absolute] .ui-column-width-handle{background:RGBA(95,57,194,.5)}.n2-ss-layer[data-pm=absolute] .ui-column-width-handle:HOVER{background:RGBA(95,57,194,1)}.n2-ss-layer .nui-spacing-handle{display:none!important;z-index:89;background:#0c92df;opacity:.5;overflow:hidden}.n2-ss-layer[data-pm=absolute] .nui-spacing-handle{background:#5f39c2}.n2-ss-layer .nui-spacing-handle.nui-spacing-under-spacing,.n2-ss-layer .nui-spacing-handle:HOVER{opacity:.8}.n2-ss-layer .nui-resizable-n{left:50%;top:-4px;margin-left:-4px}.n2-ss-layer .nui-spacing-handle.nui-spacing-n{min-height:5px;cursor:s-resize}.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-n{top:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-n{left:0;bottom:100%;width:100%}.n2-ss-layer .nui-normal-sizing-e,.n2-ss-layer .nui-resizable-e{right:-4px;top:50%;margin-top:-4px}.n2-ss-layer .nui-spacing-handle.nui-spacing-e{min-width:5px;cursor:w-resize}.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-e{top:25%;margin-top:0;right:0;height:50%}.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-e{top:0;left:100%;height:100%}.n2-ss-layer .nui-normal-sizing-s,.n2-ss-layer .nui-resizable-s{bottom:-4px;left:50%;margin-left:-4px}.n2-ss-layer .nui-spacing-handle.nui-spacing-s{min-height:5px;cursor:n-resize}.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-s{bottom:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-s{bottom:auto;top:100%;left:0;width:100%}.n2-ss-layer .nui-normal-sizing-w,.n2-ss-layer .nui-resizable-w{left:-4px;top:50%;margin-top:-4px}.n2-ss-layer .nui-spacing-handle.nui-spacing-w{min-width:5px;cursor:e-resize}.n2-ss-layer .nui-spacing-handle-padding.nui-spacing-w{top:25%;margin-top:0;left:0;height:50%}.n2-ss-layer .nui-spacing-handle-margin.nui-spacing-w{left:auto;right:100%;top:0;height:100%}.n2-ss-layer .nui-resizable-ne{right:-4px;top:-4px}.n2-ss-layer .nui-resizable-se{right:-4px;bottom:-4px}.n2-ss-layer .nui-resizable-sw{left:-4px;bottom:-4px}.n2-ss-layer .nui-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 #0c92df}.n2-ss-layer.n2-active[data-pm=absolute]:HOVER,[data-pm=absolute] .n2-ss-layer.n2-active:HOVER{box-shadow:inset 0 0 0 1px #5f39c2}.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>.nui-normal-sizing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.nui-resizable-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-cc,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.nui-spacing-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-column-width-handle,.n2-ss-layer.n2-active:HOVER>.nui-normal-sizing-handle,.n2-ss-layer.n2-active:HOVER>.nui-resizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.n2-ss-layer-row>.nui-spacing-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>.nui-normal-sizing-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.nui-resizable-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.nui-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>.nui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-mask>.n2-ss-layer-content>.nui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-mask>.n2-ss-layer-row>.nui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.nui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.nui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.nui-resizable-resizing>div>.nui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.nui-spacing-resizing>.nui-spacing-handle,.nui-resizable-resizing>.nui-spacing-handle,.nui-spacing-resizing>.nui-spacing-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.nui-spacing-resizing>.nui-spacing-handle.nui-spacing-under-spacing{opacity:1}#n2-ss-0 .n2-ss-layer-row[row-wrapped="1"] .ui-column-width-handle,#n2-ss-0 .nui-spacing-resizing .ui-column-width-handle,#n2-ss-0 [data-frontend-fullwidth="0"]>.n2-ss-layer-row .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 .nui-normal-sizing-handle,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .nui-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 .nui-normal-sizing-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .nui-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-sstype=col]>.n2-ss-layer-ui-label-container>.n2-ss-layer-ui-label-self{cursor:move}.n2-highlight-structure .n2-ss-layer[data-sstype=col]{box-shadow:0 0 0 2px #0c92df}.n2-highlight-structure[data-pm=absolute] .n2-ss-layer[data-sstype=col]{box-shadow:0 0 0 2px #5f39c2}.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-sstype=content].n2-ss-content-empty{display:none}[data-editormode=content] div#n2-ss-0 .n2-ss-layer[data-sstype=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}[data-visibility=hidden],[data-visibility=hidden] *{visibility:hidden!important}div div#n2-ss-0 .n2-ss-static-slide div[data-sstype=content],div div#n2-ss-0 .n2-ss-static-slide div[data-sstype=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 .nui-slider{width:100px;position:relative;background:#374d64;height:6px;margin:10px;border-radius:10px}.n2-ss-sample-slide-setting-field .nui-slider .nui-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 .nui-slider-range{display:none}#n2-ss-slider-zoom .nui-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-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-slider-zoom-container>.n2-i{color:#4e667f}.n2-ss-device-zoomer #n2-ss-slider-zoom .nui-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}#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;direction:ltr}.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/{images → admin/images}/fillmode/center.png
RENAMED
File without changes
|
library/media/{images → admin/images}/fillmode/default.png
RENAMED
File without changes
|
library/media/{images → admin/images}/fillmode/fill.png
RENAMED
File without changes
|
library/media/{images → admin/images}/fillmode/fit.png
RENAMED
File without changes
|
library/media/{images → admin/images}/fillmode/fixed.png
RENAMED
File without changes
|
library/media/{images → admin/images}/fillmode/stretch.png
RENAMED
File without changes
|
library/media/{images → admin/images}/fillmode/tile.png
RENAMED
File without changes
|
library/media/admin/images/free/getpro1.jpg
DELETED
Binary file
|
library/media/admin/images/free/getpro2.jpg
DELETED
Binary file
|
library/media/admin/images/free/rate.png
DELETED
Binary file
|
library/media/{plugins/widget/arrow/arrow/disabled.png → admin/images/widgetdisabled.png}
RENAMED
File without changes
|
library/media/admin/js/jqueryui/jquery-ui.canvas-item.js
DELETED
@@ -1,43 +0,0 @@
|
|
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
DELETED
@@ -1,585 +0,0 @@
|
|
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
DELETED
@@ -1,216 +0,0 @@
|
|
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
DELETED
@@ -1,35 +0,0 @@
|
|
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
DELETED
@@ -1,252 +0,0 @@
|
|
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,5 +1,13 @@
|
|
1 |
-
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
function ContextMenu($el, parameters) {
|
4 |
this.isActive = false;
|
5 |
this.$el = $el.data('nextendcontextmenu', this);
|
@@ -10,14 +18,14 @@ N2Require('ContextMenu', [], [], function ($, scope, undefined) {
|
|
10 |
}, parameters);
|
11 |
|
12 |
this.$menu = $('<div class="n2-context-menu"></div>').on('mousedown', function () {
|
13 |
-
|
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();
|
@@ -34,13 +42,13 @@ N2Require('ContextMenu', [], [], function ($, scope, undefined) {
|
|
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) {
|
@@ -48,12 +56,12 @@ N2Require('ContextMenu', [], [], function ($, scope, undefined) {
|
|
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 () {
|
@@ -64,33 +72,32 @@ N2Require('ContextMenu', [], [], function ($, scope, undefined) {
|
|
64 |
return ContextMenu;
|
65 |
});
|
66 |
|
67 |
-
|
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.
|
|
|
80 |
this.devices = {
|
81 |
unknownUnknown: $('<div />')
|
82 |
};
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
|
89 |
-
this.
|
90 |
|
91 |
var desktopWidth = responsive.parameters.sliderWidthToDevice['desktopPortrait'];
|
92 |
|
93 |
-
this.container = responsive.containerElement.closest('.n2-ss-container-device').
|
94 |
this.container.width(desktopWidth);
|
95 |
this.containerWidth = desktopWidth;
|
96 |
|
@@ -130,28 +137,32 @@ N2Require('Zoom', [], [], function ($, scope, undefined) {
|
|
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(
|
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 |
-
|
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)
|
@@ -160,33 +171,6 @@ N2Require('Zoom', [], [], function ($, scope, undefined) {
|
|
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) {
|
@@ -196,57 +180,33 @@ N2Require('Zoom', [], [], function ($, scope, undefined) {
|
|
196 |
}
|
197 |
|
198 |
this.zoom =
|
199 |
-
zoom.removeAttr('slide').prop('slide', false)
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
'
|
235 |
-
'slidechange.n2-ss-zoom': $.proxy(this.zoomChangeSyncMode, this)
|
236 |
});
|
|
|
237 |
};
|
238 |
|
239 |
-
Zoom.prototype.
|
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 |
-
|
248 |
-
|
249 |
-
|
250 |
var ratio = 1;
|
251 |
if (value < 50) {
|
252 |
ratio = nextend.smallestZoom / this.containerWidth + Math.max(value / 50, 0) * (1 - nextend.smallestZoom / this.containerWidth);
|
@@ -254,47 +214,95 @@ N2Require('Zoom', [], [], function ($, scope, undefined) {
|
|
254 |
ratio = 1 + (value - 52) / 50;
|
255 |
}
|
256 |
width = parseInt(ratio * this.containerWidth);
|
257 |
-
this.container.width(width);
|
258 |
|
259 |
-
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
for (var i = 0; i < this.responsives.length; i++) {
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
|
|
|
|
|
|
|
|
271 |
}
|
|
|
|
|
272 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
} else {
|
274 |
-
|
275 |
-
this.container.width(width);
|
276 |
}
|
277 |
-
|
278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
}
|
|
|
|
|
280 |
};
|
281 |
|
282 |
-
Zoom.prototype.
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
} else
|
288 |
-
|
|
|
|
|
289 |
}
|
290 |
-
var oldValue = this.zoom.slider('value');
|
291 |
-
this.zoom.slider('value', v);
|
292 |
};
|
293 |
|
294 |
return Zoom;
|
295 |
});
|
296 |
-
|
297 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
function CreateSlider(groupID, ajaxUrl, shouldSkipLicenseModal) {
|
299 |
this.addToGroupModal = null;
|
300 |
this.groupID = groupID;
|
@@ -307,7 +315,7 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
307 |
|
308 |
}, this));
|
309 |
|
310 |
-
this.notificationStack = new
|
311 |
$('.n2-ss-add-sample-slider').click($.proxy(function (e) {
|
312 |
e.preventDefault();
|
313 |
e.stopImmediatePropagation();
|
@@ -345,7 +353,7 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
345 |
var size = [550, 390 + 130];
|
346 |
|
347 |
|
348 |
-
this.createSliderModal = new NextendModal({
|
349 |
zero: {
|
350 |
size: size,
|
351 |
title: n2_('Create Slider'),
|
@@ -375,8 +383,8 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
375 |
sliderWidth = $('#createsliderwidth').val(1200),
|
376 |
sliderHeight = $('#createsliderheight').val(500);
|
377 |
|
378 |
-
sliderWidth.parent().addClass('n2-form-element-autocomplete
|
379 |
-
sliderHeight.parent().addClass('n2-form-element-autocomplete
|
380 |
|
381 |
this.createHeading(n2_('Preset')).appendTo(this.content);
|
382 |
var imageRadioHeight = 100
|
@@ -397,9 +405,9 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
397 |
|
398 |
button.on('click', $.proxy(function () {
|
399 |
|
400 |
-
|
401 |
type: "POST",
|
402 |
-
url:
|
403 |
nextendaction: 'create'
|
404 |
}),
|
405 |
data: {
|
@@ -411,7 +419,7 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
411 |
},
|
412 |
dataType: 'json'
|
413 |
}).done($.proxy(function (response) {
|
414 |
-
|
415 |
}, this));
|
416 |
|
417 |
}, this));
|
@@ -442,14 +450,14 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
442 |
that.notificationStack.popStack();
|
443 |
},
|
444 |
importSlider = function (href) {
|
445 |
-
|
446 |
type: "POST",
|
447 |
-
url:
|
448 |
nextendaction: 'importDemo'
|
449 |
}),
|
450 |
data: {
|
451 |
groupID: that.groupID,
|
452 |
-
key: Base64.encode(href.replace(/^(http(s)?:)?\/\//, '//'))
|
453 |
},
|
454 |
dataType: 'json'
|
455 |
}).fail(function () {
|
@@ -479,7 +487,7 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
479 |
};
|
480 |
|
481 |
this.notificationStack.enableStack();
|
482 |
-
|
483 |
closeFrame();
|
484 |
return true;
|
485 |
}, this));
|
@@ -489,10 +497,17 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
489 |
|
490 |
return CreateSlider;
|
491 |
});
|
492 |
-
|
493 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
function ManageSliders(groupID, ajaxUrl, shouldSkipLicenseModal) {
|
495 |
-
this.preventSort = false;
|
496 |
this.groupID = groupID;
|
497 |
this.ajaxUrl = ajaxUrl;
|
498 |
this.sliders = [];
|
@@ -502,7 +517,7 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
502 |
|
503 |
var sliders = this.slidersContainer.find('.n2-ss-box-slider');
|
504 |
for (var i = 0; i < sliders.length; i++) {
|
505 |
-
this.sliders.push(new
|
506 |
}
|
507 |
|
508 |
this.changed();
|
@@ -511,7 +526,7 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
511 |
|
512 |
this.initOrderable();
|
513 |
|
514 |
-
this.create = new
|
515 |
this.initBulk();
|
516 |
}
|
517 |
|
@@ -521,7 +536,6 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
521 |
};
|
522 |
|
523 |
ManageSliders.prototype.initSliders = function () {
|
524 |
-
var previousLength = this.sliders.length;
|
525 |
var sliderNodes = this.slidersContainer.find('.n2-ss-box-slider'),
|
526 |
sliders = [];
|
527 |
for (var i = 0; i < sliderNodes.length; i++) {
|
@@ -535,28 +549,20 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
535 |
|
536 |
ManageSliders.prototype.initOrderable = function () {
|
537 |
if (this.orderBy) {
|
538 |
-
|
539 |
helper: 'clone',
|
540 |
-
|
541 |
-
tolerance: "pointer",
|
542 |
-
connectWith: '.n2-ss-box-slider-group',
|
543 |
-
items: ".n2-ss-box-slider",
|
544 |
-
start: function (event, ui) {
|
545 |
-
ui.item.show();
|
546 |
-
},
|
547 |
stop: $.proxy(this.saveOrder, this),
|
548 |
placeholder: 'n2-box-sortable-placeholder',
|
549 |
distance: 10
|
550 |
-
}
|
|
|
|
|
551 |
}
|
552 |
};
|
553 |
|
554 |
-
ManageSliders.prototype.saveOrder = function (e) {
|
555 |
-
|
556 |
-
this.slidersContainer.sortable("cancel");
|
557 |
-
this.preventSort = false;
|
558 |
-
return;
|
559 |
-
}
|
560 |
var sliderNodes = this.slidersContainer.find('.n2-ss-box-slider'),
|
561 |
sliders = [],
|
562 |
ids = [],
|
@@ -576,9 +582,9 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
576 |
nextendcontroller: 'sliders',
|
577 |
nextendaction: 'order'
|
578 |
};
|
579 |
-
|
580 |
type: 'POST',
|
581 |
-
url:
|
582 |
data: {
|
583 |
groupID: this.groupID,
|
584 |
sliderorder: ids,
|
@@ -638,9 +644,9 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
638 |
if (sliders.length > 1) {
|
639 |
title += ' and ' + (sliders.length - 1) + ' more';
|
640 |
}
|
641 |
-
|
642 |
-
|
643 |
-
url:
|
644 |
nextendcontroller: 'sliders',
|
645 |
nextendaction: 'delete'
|
646 |
}),
|
@@ -670,13 +676,12 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
670 |
|
671 |
ManageSliders.prototype.exportSliders = function (ids, sliders) {
|
672 |
|
673 |
-
window.location.href = (
|
674 |
nextendcontroller: 'sliders',
|
675 |
nextendaction: 'exportAll'
|
676 |
}) + '&' + $.param({sliders: ids, currentGroupID: this.groupID}));
|
677 |
};
|
678 |
|
679 |
-
|
680 |
ManageSliders.prototype.initBulk = function () {
|
681 |
|
682 |
this.selection = [];
|
@@ -756,9 +761,9 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
756 |
this.leaveBulk();
|
757 |
} else {
|
758 |
if (skipGroups) {
|
759 |
-
|
760 |
} else {
|
761 |
-
|
762 |
}
|
763 |
}
|
764 |
};
|
@@ -767,7 +772,7 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
767 |
if (!this.isBulkSelection) {
|
768 |
this.isBulkSelection = true;
|
769 |
if (this.orderBy) {
|
770 |
-
this.slidersContainer.
|
771 |
}
|
772 |
$('#n2-admin').addClass('n2-ss-has-box-selection');
|
773 |
}
|
@@ -776,7 +781,7 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
776 |
ManageSliders.prototype.leaveBulk = function () {
|
777 |
if (this.isBulkSelection) {
|
778 |
if (this.orderBy) {
|
779 |
-
this.slidersContainer.
|
780 |
}
|
781 |
$('#n2-admin').removeClass('n2-ss-has-box-selection');
|
782 |
|
@@ -790,7 +795,15 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
790 |
|
791 |
return ManageSliders;
|
792 |
});
|
793 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
794 |
function Slider(manager, box) {
|
795 |
this.selected = false;
|
796 |
this.manager = manager;
|
@@ -808,7 +821,6 @@ N2Require('Slider', [], [], function ($, scope, undefined) {
|
|
808 |
this.manager.hideMenu();
|
809 |
}, this))
|
810 |
.on('click.n2-slider', $.proxy(this.goToEdit, this));
|
811 |
-
|
812 |
this.box.find('.n2-ss-box-select').on('click', $.proxy(function (e) {
|
813 |
e.stopPropagation();
|
814 |
e.preventDefault();
|
@@ -822,18 +834,20 @@ N2Require('Slider', [], [], function ($, scope, undefined) {
|
|
822 |
};
|
823 |
|
824 |
Slider.prototype.goToEdit = function (e, isBlank) {
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
|
|
|
|
830 |
}
|
831 |
};
|
832 |
|
833 |
Slider.prototype.preview = function (e) {
|
834 |
e.stopPropagation();
|
835 |
e.preventDefault();
|
836 |
-
window.open(
|
837 |
nextendcontroller: 'preview',
|
838 |
nextendaction: 'index'
|
839 |
}), '_blank');
|
@@ -844,8 +858,8 @@ N2Require('Slider', [], [], function ($, scope, undefined) {
|
|
844 |
e.stopPropagation();
|
845 |
e.preventDefault();
|
846 |
var deferred = $.Deferred();
|
847 |
-
|
848 |
-
url:
|
849 |
nextendcontroller: 'slider',
|
850 |
nextendaction: 'duplicate'
|
851 |
})
|
@@ -897,8 +911,15 @@ N2Require('Slider', [], [], function ($, scope, undefined) {
|
|
897 |
|
898 |
return Slider;
|
899 |
});
|
900 |
-
|
901 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
function FormElementAnimationManager(id, managerIdentifier) {
|
903 |
this.element = $('#' + id);
|
904 |
this.managerIdentifier = managerIdentifier;
|
@@ -913,11 +934,11 @@ N2Require('FormElementAnimationManager', ['FormElement'], [], function ($, scope
|
|
913 |
|
914 |
this.updateName(this.element.val());
|
915 |
|
916 |
-
|
917 |
}
|
918 |
|
919 |
|
920 |
-
FormElementAnimationManager.prototype = Object.create(
|
921 |
FormElementAnimationManager.prototype.constructor = FormElementAnimationManager;
|
922 |
|
923 |
|
@@ -963,8 +984,16 @@ N2Require('FormElementAnimationManager', ['FormElement'], [], function ($, scope
|
|
963 |
|
964 |
return FormElementAnimationManager;
|
965 |
});
|
966 |
-
|
967 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
function FormElementBackground(id, value) {
|
969 |
this.value = '';
|
970 |
this.element = $('#' + id);
|
@@ -981,10 +1010,10 @@ N2Require('FormElementBackground', ['FormElement'], [], function ($, scope, unde
|
|
981 |
this.insideChange(this.element.val());
|
982 |
}, this));
|
983 |
|
984 |
-
|
985 |
};
|
986 |
|
987 |
-
FormElementBackground.prototype = Object.create(
|
988 |
FormElementBackground.prototype.constructor = FormElementBackground;
|
989 |
|
990 |
FormElementBackground.prototype.selectOption = function (e) {
|
@@ -1004,7 +1033,7 @@ N2Require('FormElementBackground', ['FormElement'], [], function ($, scope, unde
|
|
1004 |
this.$container.removeClass('n2-ss-background-type-' + this.value);
|
1005 |
this.value = newValue;
|
1006 |
this.$container.addClass('n2-ss-background-type-' + this.value);
|
1007 |
-
}
|
1008 |
|
1009 |
FormElementBackground.prototype.insideChange = function (value) {
|
1010 |
this.setValue(value);
|
@@ -1023,8 +1052,14 @@ N2Require('FormElementBackground', ['FormElement'], [], function ($, scope, unde
|
|
1023 |
return FormElementBackground;
|
1024 |
});
|
1025 |
|
1026 |
-
|
1027 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1028 |
function FormElementColumns(id) {
|
1029 |
this.denominators = {
|
1030 |
1: 100,
|
@@ -1035,26 +1070,29 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1035 |
6: 144
|
1036 |
};
|
1037 |
this.element = $('#' + id);
|
1038 |
-
|
1039 |
this.$c = $('#' + id).parent();
|
1040 |
this.$container = this.$c.find('.n2-ss-columns-element-container');
|
1041 |
this.containerWidth = 284;
|
1042 |
this.maxWidth = 0;
|
1043 |
|
1044 |
|
1045 |
-
this.$container.
|
1046 |
axis: 'x',
|
1047 |
-
tolerance: 'pointer',
|
1048 |
items: '.n2-ss-columns-element-column',
|
1049 |
-
helper: '
|
1050 |
start: $.proxy(function (e, ui) {
|
1051 |
this.$container.addClass('n2-sortable-currently-sorted');
|
1052 |
-
ui.placeholder.css(
|
|
|
|
|
|
|
1053 |
|
1054 |
var $columns = this.$container.find('.n2-ss-columns-element-column');
|
1055 |
ui.item.data('index', $columns.index(ui.item));
|
1056 |
|
1057 |
}, this),
|
|
|
1058 |
stop: $.proxy(function (e, ui) {
|
1059 |
var $columns = this.$container.find('.n2-ss-columns-element-column');
|
1060 |
var oldIndex = ui.item.data('index'),
|
@@ -1077,7 +1115,7 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1077 |
});
|
1078 |
}
|
1079 |
|
1080 |
-
FormElementColumns.prototype = Object.create(
|
1081 |
FormElementColumns.prototype.constructor = FormElementColumns;
|
1082 |
|
1083 |
|
@@ -1086,25 +1124,25 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1086 |
this.denominators[i] = i * 15;
|
1087 |
}
|
1088 |
return this.denominators[i];
|
1089 |
-
}
|
1090 |
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
|
1096 |
FormElementColumns.prototype.setValue = function (newValue) {
|
1097 |
|
1098 |
-
}
|
1099 |
|
1100 |
FormElementColumns.prototype.insideChange = function (value) {
|
1101 |
this.start(value);
|
1102 |
-
}
|
1103 |
|
1104 |
FormElementColumns.prototype.activateColumn = function (e) {
|
1105 |
var clickedColIndex = this.$container.find('.n2-ss-columns-element-column').index(e.currentTarget);
|
1106 |
this.currentRow.activateColumn(clickedColIndex, e);
|
1107 |
-
}
|
1108 |
|
1109 |
FormElementColumns.prototype.start = function (value) {
|
1110 |
this.percentages = [];
|
@@ -1126,16 +1164,16 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1126 |
|
1127 |
this.makeResizable();
|
1128 |
|
1129 |
-
}
|
1130 |
|
1131 |
FormElementColumns.prototype.refreshMaxWidth = function () {
|
1132 |
this.maxWidth = this.containerWidth - (this.percentages.length - 1) * 15;
|
1133 |
-
}
|
1134 |
|
1135 |
FormElementColumns.prototype.updateColumn = function ($col, fraction) {
|
1136 |
$col.css('width', (this.maxWidth * fraction.valueOf()) + 'px')
|
1137 |
.html(Math.round(fraction.valueOf() * 100 * 10) / 10 + '%');
|
1138 |
-
}
|
1139 |
|
1140 |
FormElementColumns.prototype.makeResizable = function () {
|
1141 |
if (this.handles) {
|
@@ -1146,7 +1184,7 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1146 |
|
1147 |
this.handles = this.$container.find('.n2-ss-columns-element-handle')
|
1148 |
.on('mousedown', $.proxy(this._resizeStart, this));
|
1149 |
-
}
|
1150 |
|
1151 |
FormElementColumns.prototype._resizeStart = function (e) {
|
1152 |
var index = this.handles.index(e.currentTarget),
|
@@ -1158,7 +1196,7 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1158 |
$currentCol: this.$columns.eq(index),
|
1159 |
$nextCol: this.$columns.eq(index + 1),
|
1160 |
startX: Math.max(0, Math.min(e.clientX - cLeft, this.containerWidth)),
|
1161 |
-
}
|
1162 |
|
1163 |
this._resizeMove(e);
|
1164 |
|
@@ -1166,7 +1204,7 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1166 |
'mousemove.resizecol': $.proxy(this._resizeMove, this),
|
1167 |
'mouseup.resizecol mouseleave.resizecol': $.proxy(this._resizeStop, this)
|
1168 |
});
|
1169 |
-
}
|
1170 |
|
1171 |
FormElementColumns.prototype._resizeMove = function (e) {
|
1172 |
e.preventDefault();
|
@@ -1192,7 +1230,7 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1192 |
this.onColumnWidthChange(_percentages);
|
1193 |
|
1194 |
return [currentP, nextP];
|
1195 |
-
}
|
1196 |
|
1197 |
FormElementColumns.prototype._resizeStop = function (e) {
|
1198 |
var ret = this._resizeMove(e);
|
@@ -1202,7 +1240,7 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1202 |
delete this.resizeContext;
|
1203 |
|
1204 |
this.currentRow.setRealColsWidth(this.percentages);
|
1205 |
-
}
|
1206 |
|
1207 |
FormElementColumns.prototype.onColumnWidthChange = function (_percentages) {
|
1208 |
var percentages = [];
|
@@ -1210,7 +1248,7 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1210 |
percentages.push(_percentages[i].valueOf());
|
1211 |
}
|
1212 |
this.currentRow.updateColumnWidth(percentages);
|
1213 |
-
}
|
1214 |
|
1215 |
return FormElementColumns;
|
1216 |
});
|
@@ -1983,22 +2021,30 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
1983 |
};
|
1984 |
root['Fraction'] = Fraction;
|
1985 |
|
1986 |
-
})(
|
1987 |
-
|
1988 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1989 |
function FormElementSliderType(id) {
|
1990 |
this.element = $('#' + id);
|
1991 |
|
1992 |
this.setAttribute();
|
1993 |
|
1994 |
this.element.on('nextendChange', $.proxy(this.setAttribute, this));
|
1995 |
-
}
|
1996 |
|
1997 |
FormElementSliderType.prototype.setAttribute = function () {
|
|
|
|
|
|
|
|
|
1998 |
|
1999 |
-
|
2000 |
-
|
2001 |
-
if (this.element.val() == 'block') {
|
2002 |
$('.n2-fm-shadow').trigger('click');
|
2003 |
}
|
2004 |
};
|
@@ -2006,8 +2052,14 @@ N2Require('FormElementSliderType', [], [], function ($, scope, undefined) {
|
|
2006 |
return FormElementSliderType;
|
2007 |
});
|
2008 |
|
2009 |
-
|
2010 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2011 |
function FormElementSliderWidgetArea(id) {
|
2012 |
this.element = $('#' + id);
|
2013 |
|
@@ -2017,11 +2069,11 @@ N2Require('FormElementSliderWidgetArea', ['FormElement'], [], function ($, scope
|
|
2017 |
|
2018 |
this.areas.on('click', $.proxy(this.chooseArea, this));
|
2019 |
|
2020 |
-
|
2021 |
-
}
|
2022 |
|
2023 |
|
2024 |
-
FormElementSliderWidgetArea.prototype = Object.create(
|
2025 |
FormElementSliderWidgetArea.prototype.constructor = FormElementSliderWidgetArea;
|
2026 |
|
2027 |
|
@@ -2050,8 +2102,14 @@ N2Require('FormElementSliderWidgetArea', ['FormElement'], [], function ($, scope
|
|
2050 |
return FormElementSliderWidgetArea;
|
2051 |
});
|
2052 |
|
2053 |
-
|
2054 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2055 |
function FormElementWidgetPosition(id) {
|
2056 |
|
2057 |
this.element = $('#' + id + '-mode');
|
@@ -2062,12 +2120,12 @@ N2Require('FormElementWidgetPosition', [], [], function ($, scope, undefined) {
|
|
2062 |
this.element.on('nextendChange', $.proxy(this.onChange, this));
|
2063 |
|
2064 |
this.onChange();
|
2065 |
-
}
|
2066 |
|
2067 |
FormElementWidgetPosition.prototype.onChange = function () {
|
2068 |
var value = this.element.val();
|
2069 |
|
2070 |
-
if (value
|
2071 |
this.tabs.eq(2).css('display', '');
|
2072 |
this.tabs.eq(1).css('display', 'none');
|
2073 |
} else {
|
@@ -2079,23 +2137,29 @@ N2Require('FormElementWidgetPosition', [], [], function ($, scope, undefined) {
|
|
2079 |
return FormElementWidgetPosition;
|
2080 |
});
|
2081 |
|
2082 |
-
|
2083 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2084 |
function SmartSliderGeneratorRecords(ajaxUrl) {
|
2085 |
this.ajaxUrl = ajaxUrl;
|
2086 |
|
2087 |
$("#generatorrecord-viewer").on("click", $.proxy(this.showRecords, this));
|
2088 |
-
}
|
2089 |
|
2090 |
SmartSliderGeneratorRecords.prototype.showRecords = function (e) {
|
2091 |
e.preventDefault();
|
2092 |
-
|
2093 |
type: "POST",
|
2094 |
url: this.ajaxUrl,
|
2095 |
data: $("#smartslider-form").serialize(),
|
2096 |
dataType: "json"
|
2097 |
}).done(function (response) {
|
2098 |
-
var modal = new NextendModal({
|
2099 |
zero: {
|
2100 |
size: [
|
2101 |
1300,
|
@@ -2108,7 +2172,7 @@ N2Require('SmartSliderGeneratorRecords', [], [], function ($, scope, undefined)
|
|
2108 |
modal.content.css('overflow', 'auto');
|
2109 |
}).error(function (response) {
|
2110 |
if (response.status == 200) {
|
2111 |
-
var modal = new NextendModal({
|
2112 |
zero: {
|
2113 |
size: [
|
2114 |
1300,
|
@@ -2125,8 +2189,14 @@ N2Require('SmartSliderGeneratorRecords', [], [], function ($, scope, undefined)
|
|
2125 |
|
2126 |
return SmartSliderGeneratorRecords;
|
2127 |
});
|
2128 |
-
|
2129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2130 |
function QuickSlides(ajaxUrl) {
|
2131 |
|
2132 |
var button = $('#n2-quick-slides-edit');
|
@@ -2137,14 +2207,14 @@ N2Require('QuickSlides', [], [], function ($, scope, undefined) {
|
|
2137 |
this.ajaxUrl = ajaxUrl;
|
2138 |
|
2139 |
button.on('click', $.proxy(this.openEdit, this));
|
2140 |
-
}
|
2141 |
|
2142 |
QuickSlides.prototype.openEdit = function (e) {
|
2143 |
e.preventDefault();
|
2144 |
var slides = $('#n2-ss-slides .n2-box-slide');
|
2145 |
|
2146 |
var that = this;
|
2147 |
-
this.modal = new NextendModal({
|
2148 |
zero: {
|
2149 |
fit: true,
|
2150 |
fitX: false,
|
@@ -2179,7 +2249,7 @@ N2Require('QuickSlides', [], [], function ($, scope, undefined) {
|
|
2179 |
tr.append($('<td />').append(that.createTextarea('Description', 'description-' + id, slide.data('description'), 'width: 330px;height:24px;')));
|
2180 |
var link = slide.data('link').split('|*|');
|
2181 |
tr.append($('<td />').append(that.createLink('Link', 'link-' + id, link[0], 'width: 180px;')));
|
2182 |
-
tr.append($('<td />').append(that.createTarget('Target', 'target-' + id, link.length > 1 ? link[1] : '_self', '')));
|
2183 |
|
2184 |
new N2Classes.FormElementUrl('link-' + id, nextend.NextendElementUrlParams);
|
2185 |
|
@@ -2209,10 +2279,10 @@ N2Require('QuickSlides', [], [], function ($, scope, undefined) {
|
|
2209 |
this.hide(e);
|
2210 |
} else {
|
2211 |
this.hide(e);
|
2212 |
-
|
2213 |
type: "POST",
|
2214 |
-
url:
|
2215 |
-
data: {changed: Base64.encode(JSON.stringify(changed))},
|
2216 |
dataType: 'json'
|
2217 |
}).done($.proxy(function (response) {
|
2218 |
var slides = response.data;
|
@@ -2276,14 +2346,22 @@ N2Require('QuickSlides', [], [], function ($, scope, undefined) {
|
|
2276 |
if (arguments.length == 4) {
|
2277 |
style = arguments[3];
|
2278 |
}
|
2279 |
-
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
|
2280 |
nodes.find('select').val(value);
|
2281 |
return nodes;
|
2282 |
};
|
2283 |
|
2284 |
return QuickSlides;
|
2285 |
});
|
2286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2287 |
function Slide(manager, box) {
|
2288 |
this.selected = false;
|
2289 |
this.manager = manager;
|
@@ -2318,8 +2396,8 @@ N2Require('Slide', [], [], function ($, scope, undefined) {
|
|
2318 |
Slide.prototype.setFirst = function (e) {
|
2319 |
e.stopPropagation();
|
2320 |
e.preventDefault();
|
2321 |
-
|
2322 |
-
url:
|
2323 |
nextendaction: 'first'
|
2324 |
}),
|
2325 |
type: 'POST',
|
@@ -2363,13 +2441,15 @@ N2Require('Slide', [], [], function ($, scope, undefined) {
|
|
2363 |
this.invertSelection();
|
2364 |
e.preventDefault();
|
2365 |
} else {
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
|
|
|
|
2373 |
}
|
2374 |
}
|
2375 |
};
|
@@ -2378,8 +2458,8 @@ N2Require('Slide', [], [], function ($, scope, undefined) {
|
|
2378 |
e.stopPropagation();
|
2379 |
e.preventDefault();
|
2380 |
var deferred = $.Deferred();
|
2381 |
-
|
2382 |
-
url:
|
2383 |
nextendaction: 'duplicate'
|
2384 |
})
|
2385 |
}).done($.proxy(function (response) {
|
@@ -2430,31 +2510,36 @@ N2Require('Slide', [], [], function ($, scope, undefined) {
|
|
2430 |
|
2431 |
Slide.prototype.publish = function (e) {
|
2432 |
this.switchPublished(e);
|
2433 |
-
}
|
2434 |
|
2435 |
Slide.prototype.unpublish = function (e) {
|
2436 |
this.switchPublished(e);
|
2437 |
-
}
|
2438 |
|
2439 |
Slide.prototype.generator = function (e) {
|
2440 |
window.location = this.box.data('generator');
|
2441 |
-
}
|
2442 |
|
2443 |
Slide.prototype.copy = function (e) {
|
2444 |
-
this.manager.showSliderSelector(n2_('Copy slide to ...'), $.proxy(function (
|
2445 |
-
|
2446 |
-
url:
|
2447 |
nextendaction: 'copy',
|
2448 |
-
targetSliderID: sliderID
|
2449 |
})
|
2450 |
});
|
2451 |
}, this));
|
2452 |
-
}
|
2453 |
|
2454 |
return Slide;
|
2455 |
});
|
2456 |
-
|
2457 |
|
|
|
|
|
|
|
|
|
|
|
2458 |
function SlidesManager(ajaxUrl, contentAjaxUrl, parameters, isUploadDisabled, uploadUrl, uploadDir) {
|
2459 |
this.quickPostModal = null;
|
2460 |
this.quickVideoModal = null;
|
@@ -2471,26 +2556,55 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2471 |
|
2472 |
var slides = this.slidesContainer.find('.n2-box-slide');
|
2473 |
for (var i = 0; i < slides.length; i++) {
|
2474 |
-
this.slides.push(new
|
2475 |
}
|
2476 |
|
2477 |
-
$('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2478 |
|
2479 |
-
$('.n2-
|
2480 |
-
$('.n2-add-quick-video').on('click', $.proxy(this.addQuickVideo, this));
|
2481 |
-
$('.n2-add-quick-post').on('click', $.proxy(this.addQuickPost, this));
|
2482 |
|
2483 |
this.initBulk();
|
2484 |
|
2485 |
|
2486 |
if (!isUploadDisabled) {
|
2487 |
var images = [];
|
2488 |
-
this.slidesContainer.
|
2489 |
url: uploadUrl,
|
2490 |
pasteZone: false,
|
2491 |
dataType: 'json',
|
2492 |
paramName: 'image',
|
2493 |
-
dropZone:
|
2494 |
|
2495 |
add: $.proxy(function (e, data) {
|
2496 |
data.formData = {path: '/' + uploadDir};
|
@@ -2501,22 +2615,22 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2501 |
var response = data.result;
|
2502 |
if (response.data && response.data.name) {
|
2503 |
images.push({
|
2504 |
-
title: response.data.name,
|
2505 |
description: '',
|
2506 |
image: response.data.url
|
2507 |
});
|
2508 |
} else {
|
2509 |
-
|
2510 |
}
|
2511 |
|
2512 |
}, this),
|
2513 |
|
2514 |
fail: $.proxy(function (e, data) {
|
2515 |
-
|
2516 |
}, this),
|
2517 |
|
2518 |
start: function () {
|
2519 |
-
|
2520 |
},
|
2521 |
|
2522 |
stop: $.proxy(function () {
|
@@ -2524,7 +2638,7 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2524 |
this._addQuickImages(images);
|
2525 |
} else {
|
2526 |
setTimeout(function () {
|
2527 |
-
|
2528 |
}, 100);
|
2529 |
}
|
2530 |
images = [];
|
@@ -2553,17 +2667,12 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2553 |
};
|
2554 |
|
2555 |
SlidesManager.prototype.initSlidesOrderable = function () {
|
2556 |
-
this.slidesContainer.
|
2557 |
-
helper: 'clone',
|
2558 |
-
forcePlaceholderSize: false,
|
2559 |
-
tolerance: "pointer",
|
2560 |
items: ".n2-box-slide",
|
2561 |
-
start: function (event, ui) {
|
2562 |
-
ui.item.show();
|
2563 |
-
},
|
2564 |
stop: $.proxy(this.saveSlideOrder, this),
|
2565 |
placeholder: 'n2-box-sortable-placeholder n2-box-sortable-placeholder-small',
|
2566 |
-
distance: 10
|
|
|
2567 |
});
|
2568 |
};
|
2569 |
|
@@ -2587,9 +2696,9 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2587 |
nextendcontroller: 'slides',
|
2588 |
nextendaction: 'order'
|
2589 |
};
|
2590 |
-
|
2591 |
type: 'POST',
|
2592 |
-
url:
|
2593 |
data: {
|
2594 |
slideorder: ids
|
2595 |
}
|
@@ -2600,7 +2709,6 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2600 |
};
|
2601 |
|
2602 |
SlidesManager.prototype.initSlides = function () {
|
2603 |
-
var previousLength = this.slides.length;
|
2604 |
var slideNodes = this.slidesContainer.find('.n2-box-slide'),
|
2605 |
slides = [];
|
2606 |
for (var i = 0; i < slideNodes.length; i++) {
|
@@ -2611,7 +2719,7 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2611 |
this.changed();
|
2612 |
$(window).triggerHandler('SmartSliderSidebarSlidesChanged');
|
2613 |
|
2614 |
-
$('
|
2615 |
};
|
2616 |
|
2617 |
SlidesManager.prototype.unsetFirst = function () {
|
@@ -2630,37 +2738,48 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2630 |
|
2631 |
boxes.insertBefore(this.slidesContainer.find('.n2-clear'));
|
2632 |
boxes.addClass('n2-ss-box-just-added').each($.proxy(function (i, el) {
|
2633 |
-
new
|
2634 |
}, this));
|
2635 |
this.initSlides();
|
2636 |
setTimeout(function () {
|
2637 |
boxes.removeClass('n2-ss-box-just-added');
|
2638 |
}, 200);
|
2639 |
-
}
|
2640 |
|
2641 |
-
SlidesManager.prototype._addQuickImages = function (
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
images
|
2649 |
}
|
2650 |
-
}
|
2651 |
-
|
2652 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2653 |
};
|
2654 |
|
2655 |
SlidesManager.prototype.addQuickVideo = function (e) {
|
2656 |
e.preventDefault();
|
2657 |
var manager = this;
|
2658 |
if (!this.quickVideoModal) {
|
2659 |
-
this.quickVideoModal = new NextendModal({
|
2660 |
zero: {
|
2661 |
size: [
|
2662 |
500,
|
2663 |
-
|
2664 |
],
|
2665 |
title: n2_('Add video'),
|
2666 |
back: false,
|
@@ -2689,7 +2808,7 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2689 |
html5Video = video.match(/\.(mp4)/i);
|
2690 |
|
2691 |
if (youtubeMatch) {
|
2692 |
-
|
2693 |
if (data.items.length) {
|
2694 |
var snippet = data.items[0].snippet;
|
2695 |
|
@@ -2705,10 +2824,10 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2705 |
});
|
2706 |
}
|
2707 |
}, this)).fail(function (data) {
|
2708 |
-
|
2709 |
});
|
2710 |
} else if (vimeoMatch) {
|
2711 |
-
|
2712 |
manager._addQuickVideo(this, {
|
2713 |
type: 'vimeo',
|
2714 |
title: data[0].title,
|
@@ -2717,14 +2836,14 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2717 |
image: data[0].thumbnail_large
|
2718 |
});
|
2719 |
}, this)).fail(function (data) {
|
2720 |
-
|
2721 |
});
|
2722 |
|
2723 |
} else if (html5Video) {
|
2724 |
-
|
2725 |
|
2726 |
} else {
|
2727 |
-
|
2728 |
}
|
2729 |
}, this)));
|
2730 |
}
|
@@ -2736,20 +2855,20 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2736 |
};
|
2737 |
|
2738 |
SlidesManager.prototype._addQuickVideo = function (modal, video) {
|
2739 |
-
|
2740 |
type: 'POST',
|
2741 |
-
url:
|
2742 |
nextendaction: 'quickVideo'
|
2743 |
}),
|
2744 |
data: {
|
2745 |
-
video: Base64.encode(encodeURIComponent(JSON.stringify(video)))
|
2746 |
}
|
2747 |
}).done($.proxy(function (response) {
|
2748 |
this.addBoxes($(response.data));
|
2749 |
|
2750 |
this.initSlides();
|
2751 |
}, this));
|
2752 |
-
modal.hide();
|
2753 |
};
|
2754 |
|
2755 |
SlidesManager.prototype.addQuickPost = function (e) {
|
@@ -2759,9 +2878,9 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2759 |
cache = {},
|
2760 |
getContent = $.proxy(function (search) {
|
2761 |
if (typeof cache[search] == 'undefined') {
|
2762 |
-
cache[search] =
|
2763 |
type: "POST",
|
2764 |
-
url:
|
2765 |
data: {
|
2766 |
keyword: search
|
2767 |
},
|
@@ -2771,7 +2890,7 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2771 |
return cache[search];
|
2772 |
}, this);
|
2773 |
|
2774 |
-
this.quickPostModal = new NextendModal({
|
2775 |
zero: {
|
2776 |
size: [
|
2777 |
600,
|
@@ -2827,9 +2946,9 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2827 |
if (!post.image) {
|
2828 |
post.image = '';
|
2829 |
}
|
2830 |
-
|
2831 |
type: 'POST',
|
2832 |
-
url:
|
2833 |
nextendaction: 'quickPost'
|
2834 |
}),
|
2835 |
data: {
|
@@ -2905,14 +3024,14 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2905 |
this.enterBulk();
|
2906 |
}
|
2907 |
this.selection.push(slide);
|
2908 |
-
}
|
2909 |
|
2910 |
SlidesManager.prototype.removeSelection = function (slide) {
|
2911 |
this.selection.splice($.inArray(slide, this.selection), 1);
|
2912 |
if (this.selection.length == 0) {
|
2913 |
this.leaveBulk();
|
2914 |
}
|
2915 |
-
}
|
2916 |
|
2917 |
SlidesManager.prototype.bulkSelect = function (cb) {
|
2918 |
for (var i = 0; i < this.slides.length; i++) {
|
@@ -2932,21 +3051,21 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2932 |
if (ids.length) {
|
2933 |
this[action](ids, slides);
|
2934 |
} else {
|
2935 |
-
|
2936 |
}
|
2937 |
};
|
2938 |
|
2939 |
SlidesManager.prototype.enterBulk = function () {
|
2940 |
if (!this.isBulkSelection) {
|
2941 |
this.isBulkSelection = true;
|
2942 |
-
this.slidesContainer.
|
2943 |
$('#n2-admin').addClass('n2-ss-has-box-selection');
|
2944 |
}
|
2945 |
};
|
2946 |
|
2947 |
SlidesManager.prototype.leaveBulk = function () {
|
2948 |
if (this.isBulkSelection) {
|
2949 |
-
this.slidesContainer.
|
2950 |
$('#n2-admin').removeClass('n2-ss-has-box-selection');
|
2951 |
|
2952 |
for (var i = 0; i < this.slides.length; i++) {
|
@@ -2963,9 +3082,9 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2963 |
if (slides.length > 1) {
|
2964 |
title += ' and ' + (slides.length - 1) + ' more';
|
2965 |
}
|
2966 |
-
|
2967 |
-
|
2968 |
-
url:
|
2969 |
nextendaction: 'delete'
|
2970 |
}),
|
2971 |
type: 'POST',
|
@@ -2993,11 +3112,11 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
2993 |
};
|
2994 |
|
2995 |
SlidesManager.prototype.copySlides = function (ids, slides) {
|
2996 |
-
this.showSliderSelector(n2_('Copy slide to ...'), $.proxy(function (
|
2997 |
-
|
2998 |
-
url:
|
2999 |
nextendaction: 'copySlides',
|
3000 |
-
targetSliderID: sliderID
|
3001 |
}),
|
3002 |
type: 'POST',
|
3003 |
data: {
|
@@ -3008,8 +3127,8 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
3008 |
};
|
3009 |
|
3010 |
SlidesManager.prototype.publishSlides = function (ids, slides) {
|
3011 |
-
|
3012 |
-
url:
|
3013 |
nextendaction: 'publish'
|
3014 |
}),
|
3015 |
type: 'POST',
|
@@ -3025,8 +3144,8 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
3025 |
};
|
3026 |
|
3027 |
SlidesManager.prototype.unPublishSlides = function (ids, slides) {
|
3028 |
-
|
3029 |
-
url:
|
3030 |
nextendaction: 'unpublish'
|
3031 |
}),
|
3032 |
type: 'POST',
|
@@ -3051,6 +3170,8 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
3051 |
if (action && typeof this.slide[action] === 'function') {
|
3052 |
this.slide[action](e);
|
3053 |
}
|
|
|
|
|
3054 |
}, this));
|
3055 |
|
3056 |
this.menu.find('.n2-button').on('click', $.proxy(function (e) {
|
@@ -3064,24 +3185,24 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
3064 |
});
|
3065 |
}
|
3066 |
}, this));
|
3067 |
-
}
|
3068 |
|
3069 |
|
3070 |
SlidesManager.prototype.showMenu = function (slide) {
|
3071 |
this.slide = slide;
|
3072 |
this.menu.appendTo(slide.box);
|
3073 |
-
}
|
3074 |
|
3075 |
SlidesManager.prototype.hideMenu = function () {
|
3076 |
this.menu.detach();
|
3077 |
-
}
|
3078 |
|
3079 |
SlidesManager.prototype.showSliderSelector = function (title, cb) {
|
3080 |
-
var url =
|
3081 |
nextendcontroller: 'sliders',
|
3082 |
nextendaction: 'choose'
|
3083 |
});
|
3084 |
-
this.sliderSelectorModal = new NextendModal({
|
3085 |
zero: {
|
3086 |
size: [
|
3087 |
970,
|
@@ -3098,8 +3219,15 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
3098 |
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
3099 |
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", $.proxy(function (e) {
|
3100 |
if (e.source == (iframe[0].contentWindow || iframe[0].contentDocument)) {
|
3101 |
-
var
|
3102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3103 |
this.hide();
|
3104 |
}
|
3105 |
}, this), false);
|
@@ -3111,620 +3239,776 @@ N2Require('SlidesManager', [], [], function ($, scope, undefined) {
|
|
3111 |
}
|
3112 |
}
|
3113 |
}, true);
|
3114 |
-
}
|
3115 |
|
3116 |
return SlidesManager;
|
3117 |
});
|
3118 |
-
|
3119 |
-
function SlideAdmin() {
|
3120 |
-
/** @type {LayerAnimationManager} */
|
3121 |
-
this.layerAnimationManager = null;
|
3122 |
-
/** @type {SlideEditManager} */
|
3123 |
-
this.slideEditManager = null;
|
3124 |
-
/** @type {NextendSmartSliderAbstract} */
|
3125 |
-
this.frontend = null;
|
3126 |
-
/** @type {Generator} */
|
3127 |
-
this.generator = null;
|
3128 |
-
/** @type {CanvasManager} */
|
3129 |
-
this.canvasManager = null;
|
3130 |
-
/** @type {NextendSmartSliderSlideEditorHistory} */
|
3131 |
-
this.history = null;
|
3132 |
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
};
|
3143 |
-
|
3144 |
-
window.nextend.pre = 'div#n2-ss-0 ';
|
3145 |
-
window.nextend.smartSlider = new SlideAdmin();
|
3146 |
-
|
3147 |
-
return SlideAdmin;
|
3148 |
-
})
|
3149 |
-
N2Require('SmartSliderBackgroundImageAdmin', ['SmartSliderBackgroundImage'], [], function ($, scope, undefined) {
|
3150 |
|
|
|
|
|
|
|
|
|
|
|
3151 |
|
3152 |
-
function SmartSliderBackgroundImageAdmin(slide, element, manager) {
|
3153 |
this.allowVisualLoad = true;
|
|
|
3154 |
|
3155 |
-
this.hash = element.data('hash');
|
3156 |
|
3157 |
-
|
3158 |
-
this.loadAllowed = true;
|
3159 |
|
3160 |
-
|
3161 |
}
|
3162 |
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
SmartSliderBackgroundImageAdmin.prototype.startColorMode = function () {
|
3168 |
|
3169 |
-
|
3170 |
-
this.$background = $('<div class="n2-ss-background-image"/>')
|
3171 |
-
.appendTo(this.$mask);
|
3172 |
-
this.loadDeferred.resolve();
|
3173 |
-
};
|
3174 |
-
|
3175 |
-
SmartSliderBackgroundImageAdmin.prototype.setVisualLoad = function (state) {
|
3176 |
this.allowVisualLoad = state;
|
3177 |
};
|
3178 |
|
3179 |
-
|
3180 |
-
if (
|
3181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3182 |
}
|
3183 |
};
|
3184 |
|
3185 |
-
|
3186 |
-
if (
|
3187 |
-
|
3188 |
}
|
3189 |
-
|
3190 |
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
|
3195 |
-
this.
|
3196 |
};
|
3197 |
|
3198 |
-
|
3199 |
-
this.
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
if (src != '' && this.allowVisualLoad) {
|
3204 |
-
var img = new Image();
|
3205 |
-
img.addEventListener("load", $.proxy(function () {
|
3206 |
-
$.when(nextend.imageManager.getVisual(src))
|
3207 |
-
.done($.proxy(function (visual) {
|
3208 |
-
this.onImageManagerChanged(null, visual.value);
|
3209 |
-
this.listenImageManager();
|
3210 |
-
}, this));
|
3211 |
-
}, this), false);
|
3212 |
-
img.src = nextend.imageHelper.fixed(src);
|
3213 |
-
} else {
|
3214 |
-
this.tabletSrc = '';
|
3215 |
-
this.mobileSrc = '';
|
3216 |
|
3217 |
-
|
|
|
|
|
3218 |
}
|
3219 |
};
|
3220 |
|
3221 |
-
|
3222 |
-
|
|
|
|
|
3223 |
};
|
3224 |
|
3225 |
-
|
|
|
|
|
|
|
3226 |
|
|
|
|
|
|
|
3227 |
};
|
3228 |
|
3229 |
-
|
3230 |
-
if (
|
3231 |
-
|
3232 |
}
|
3233 |
-
this.element.attr('data-mode', newMode);
|
3234 |
-
this.mode = newMode;
|
3235 |
-
};
|
3236 |
|
3237 |
-
|
3238 |
-
this
|
3239 |
};
|
3240 |
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3244 |
};
|
3245 |
|
3246 |
-
|
3247 |
-
if (
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
}).css(window.n2FilterProperty, 'blur(' + blur + 'px)');
|
3253 |
-
} else {
|
3254 |
-
this.$background.css({
|
3255 |
-
margin: '',
|
3256 |
-
padding: ''
|
3257 |
-
}).css(window.n2FilterProperty, '');
|
3258 |
}
|
3259 |
}
|
3260 |
-
this.blur = blur;
|
3261 |
};
|
3262 |
|
3263 |
-
return
|
3264 |
-
});
|
3265 |
-
N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
3266 |
-
"use strict";
|
3267 |
-
|
3268 |
-
function SlideEditManager(sliderElementID, slideContentElementID, options) {
|
3269 |
-
this.readyDeferred = $.Deferred();
|
3270 |
-
|
3271 |
-
this.options = $.extend({
|
3272 |
-
slideAsFile: 0,
|
3273 |
-
isUploadDisabled: true,
|
3274 |
-
uploadUrl: '',
|
3275 |
-
uploadDir: '',
|
3276 |
-
isAddSample: false,
|
3277 |
-
}, options);
|
3278 |
-
|
3279 |
-
|
3280 |
-
this.warnInternetExplorerUsers();
|
3281 |
-
|
3282 |
-
this.$slideContentElement = $('#' + slideContentElementID);
|
3283 |
-
this.slideStartValue = this.$slideContentElement.val();
|
3284 |
-
|
3285 |
-
|
3286 |
-
window[sliderElementID].visible($.proxy(this.sliderStarted, this));
|
3287 |
-
}
|
3288 |
-
|
3289 |
-
SlideEditManager.prototype.startSampleSlides = function () {
|
3290 |
-
var sampleSlidesUrl = 'https://smartslider3.com/slides/' + window.N2SS3VERSION + '/free/';
|
3291 |
-
|
3292 |
-
|
3293 |
-
var that = this,
|
3294 |
-
eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
3295 |
-
|
3296 |
-
var $iframe = $('<iframe src="' + sampleSlidesUrl + '"></iframe>').prependTo('.n2-ss-sample-slides-container'),
|
3297 |
-
iframe = $iframe[0];
|
3298 |
-
|
3299 |
-
$('html, body').scrollTop($iframe.offset().top - $('#wpadminbar').height());
|
3300 |
-
|
3301 |
-
var $settings = $('.n2-ss-sample-slide-settings');
|
3302 |
-
|
3303 |
-
var $backgroundImage = $('#slidebackgroundImage'),
|
3304 |
-
$sampleBackgroundImage = $('#n2-ss-sample-slide-setting-background-image')
|
3305 |
-
.on('click', function () {
|
3306 |
-
$backgroundImage.parent().find('.n2-form-element-button').trigger('click');
|
3307 |
-
}),
|
3308 |
-
cbUpdateBackgroundImage = function () {
|
3309 |
-
var image = $backgroundImage.val();
|
3310 |
-
if (image === '') {
|
3311 |
-
$settings.removeClass('n2-ss-has-image');
|
3312 |
-
$sampleBackgroundImage.css('background-image', 'url(//nextenddev.no-ip.org/roland/wordpress1/wp-content/plugins/nextend-smart-slider3-pro/nextend/media/images/placeholder/image.png)');
|
3313 |
-
$('#slidebackground-type').val('color').trigger('change');
|
3314 |
-
} else {
|
3315 |
-
$settings.addClass('n2-ss-has-image');
|
3316 |
-
$('#slidebackground-type').val('image').trigger('change');
|
3317 |
-
$sampleBackgroundImage.css('background-image', 'url(' + nextend.imageHelper.fixed(image) + ')');
|
3318 |
-
}
|
3319 |
-
};
|
3320 |
-
|
3321 |
-
$sampleBackgroundImage.find('.n2-i-close').on('click', function (e) {
|
3322 |
-
e.stopPropagation();
|
3323 |
-
$backgroundImage.parent().find('.n2-form-element-clear').trigger('click');
|
3324 |
-
});
|
3325 |
-
|
3326 |
-
$backgroundImage.on('nextendChange', cbUpdateBackgroundImage);
|
3327 |
-
cbUpdateBackgroundImage();
|
3328 |
-
|
3329 |
-
var $opacityField = $('#slidebackgroundImageOpacity'),
|
3330 |
-
$opacitySlider = $('#n2-ss-sample-slide-setting-opacity-slider').removeAttr('slide').prop('slide', false).slider({
|
3331 |
-
min: 0,
|
3332 |
-
max: 100,
|
3333 |
-
step: 1,
|
3334 |
-
slide: function (event, ui) {
|
3335 |
-
$opacityField.data('field').insideChange(ui.value);
|
3336 |
-
}
|
3337 |
-
}),
|
3338 |
-
cb = function (e) {
|
3339 |
-
$opacitySlider.slider('value', $opacityField.val());
|
3340 |
-
};
|
3341 |
-
|
3342 |
-
$opacityField.on('nextendChange', cb);
|
3343 |
-
cb();
|
3344 |
-
|
3345 |
-
var $blurField = $('#slidebackgroundImageBlur'),
|
3346 |
-
$blurSlider = $('#n2-ss-sample-slide-setting-blur-slider').removeAttr('slide').prop('slide', false).slider({
|
3347 |
-
min: 0,
|
3348 |
-
max: 40,
|
3349 |
-
step: 1,
|
3350 |
-
slide: function (event, ui) {
|
3351 |
-
$blurField.data('field').insideChange(ui.value);
|
3352 |
-
}
|
3353 |
-
}),
|
3354 |
-
cb2 = function (e) {
|
3355 |
-
$blurSlider.slider('value', $blurField.val());
|
3356 |
-
};
|
3357 |
-
|
3358 |
-
$blurField.on('nextendChange', cb2);
|
3359 |
-
cb2();
|
3360 |
-
|
3361 |
-
var $colorField = $('#slidebackgroundColor'),
|
3362 |
-
$color = $('#n2-ss-sample-slide-setting-color')
|
3363 |
-
.n2spectrum({
|
3364 |
-
showAlpha: 1,
|
3365 |
-
preferredFormat: "hex8",
|
3366 |
-
showInput: false,
|
3367 |
-
showButtons: false,
|
3368 |
-
move: function () {
|
3369 |
-
var value = $color.n2spectrum("get").toHexString8();
|
3370 |
-
$color.val(value);
|
3371 |
-
$colorField.data('field').insideChange(value);
|
3372 |
-
},
|
3373 |
-
showSelectionPalette: true,
|
3374 |
-
showPalette: true,
|
3375 |
-
maxSelectionSize: 6,
|
3376 |
-
localStorageKey: 'color',
|
3377 |
-
palette: [
|
3378 |
-
['000000', '55aa39', '357cbd', 'bb4a28', '8757b2', '000000CC'],
|
3379 |
-
['81898d', '5cba3c', '4594e1', 'd85935', '9e74c2', '00000080'],
|
3380 |
-
['ced3d5', '27ae60', '01add3', 'e79d19', 'e264af', 'FFFFFFCC'],
|
3381 |
-
['ffffff', '2ecc71', '00c1c4', 'ecc31f', 'ec87c0', 'FFFFFF80']
|
3382 |
-
]
|
3383 |
-
}),
|
3384 |
-
cb3 = function (e) {
|
3385 |
-
var color = $colorField.val();
|
3386 |
-
if (color != $color.val()) {
|
3387 |
-
$color.n2spectrum("set", color);
|
3388 |
-
}
|
3389 |
-
};
|
3390 |
-
$colorField.on('nextendChange', cb3);
|
3391 |
-
cb3();
|
3392 |
-
|
3393 |
-
|
3394 |
-
var $gradientDir = $('#slidebackgroundGradient'),
|
3395 |
-
cb4 = function () {
|
3396 |
-
if ($gradientDir.val() == 'off') {
|
3397 |
-
$settings.removeClass('n2-ss-has-gradient');
|
3398 |
-
} else {
|
3399 |
-
$settings.addClass('n2-ss-has-gradient');
|
3400 |
-
}
|
3401 |
-
};
|
3402 |
-
$gradientDir.on('nextendChange', cb4);
|
3403 |
-
cb4();
|
3404 |
-
|
3405 |
-
var $gradientField = $('#slidebackgroundColorEnd'),
|
3406 |
-
gradient = $('#n2-ss-sample-slide-setting-gradient')
|
3407 |
-
.n2spectrum({
|
3408 |
-
showAlpha: 1,
|
3409 |
-
preferredFormat: "hex8",
|
3410 |
-
showInput: false,
|
3411 |
-
showButtons: false,
|
3412 |
-
move: function () {
|
3413 |
-
var value = gradient.n2spectrum("get").toHexString8();
|
3414 |
-
$gradientField.data('field').insideChange(value);
|
3415 |
-
},
|
3416 |
-
showSelectionPalette: true,
|
3417 |
-
showPalette: true,
|
3418 |
-
maxSelectionSize: 6,
|
3419 |
-
localStorageKey: 'color',
|
3420 |
-
palette: [
|
3421 |
-
['000000', '55aa39', '357cbd', 'bb4a28', '8757b2', '000000CC'],
|
3422 |
-
['81898d', '5cba3c', '4594e1', 'd85935', '9e74c2', '00000080'],
|
3423 |
-
['ced3d5', '27ae60', '01add3', 'e79d19', 'e264af', 'FFFFFFCC'],
|
3424 |
-
['ffffff', '2ecc71', '00c1c4', 'ecc31f', 'ec87c0', 'FFFFFF80']
|
3425 |
-
]
|
3426 |
-
}),
|
3427 |
-
cb5 = function (e) {
|
3428 |
-
gradient.n2spectrum("set", $gradientField.val());
|
3429 |
-
};
|
3430 |
-
$gradientField.on('outsideChange', cb5);
|
3431 |
-
cb5();
|
3432 |
-
|
3433 |
-
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
|
3434 |
-
if (e.source == (iframe.contentWindow || iframe.contentDocument)) {
|
3435 |
-
var a = e[e.message ? "message" : "data"];
|
3436 |
-
if (a.key) {
|
3437 |
-
switch (a.key) {
|
3438 |
-
case 'sampleSlide':
|
3439 |
-
var slide = JSON.parse(a.data);
|
3440 |
-
that.settings.setData(slide.data, true);
|
3441 |
-
|
3442 |
-
that.canvasManager.mainContainer.replaceLayers(slide.layers);
|
3443 |
-
|
3444 |
-
if (that.canvasManager.currentEditorMode != 'content' && that.canvasManager.mainContent != undefined) {
|
3445 |
-
that.canvasManager.updateEditorMode('content');
|
3446 |
-
}
|
3447 |
-
break;
|
3448 |
-
|
3449 |
-
case 'ready':
|
3450 |
-
(iframe.contentWindow || iframe.contentDocument).postMessage({
|
3451 |
-
key: 'ackReady'
|
3452 |
-
}, "*");
|
3453 |
-
if (that.options.isAddSample) {
|
3454 |
-
(iframe.contentWindow || iframe.contentDocument).postMessage({
|
3455 |
-
key: 'create'
|
3456 |
-
}, "*");
|
3457 |
-
that.options.isAddSample = false;
|
3458 |
-
}
|
3459 |
-
break;
|
3460 |
-
}
|
3461 |
-
}
|
3462 |
-
}
|
3463 |
-
}, false);
|
3464 |
-
};
|
3465 |
-
|
3466 |
-
SlideEditManager.prototype.sliderStarted = function () {
|
3467 |
-
|
3468 |
-
smartSlider.history = new scope.History();
|
3469 |
-
|
3470 |
-
smartSlider.frontend = window["n2-ss-0"];
|
3471 |
-
smartSlider.frontend.visible(function () {
|
3472 |
-
$('body').addClass('n2-ss-slider-visible');
|
3473 |
-
var el = $("#n2-ss-slide-canvas-container"),
|
3474 |
-
tinyscrollbar = el
|
3475 |
-
.tinyscrollbar({
|
3476 |
-
axis: "x",
|
3477 |
-
wheel: false,
|
3478 |
-
wheelLock: false
|
3479 |
-
})
|
3480 |
-
.data('plugin_tinyscrollbar');
|
3481 |
-
if (typeof el.get(0).move === 'function') {
|
3482 |
-
el.get(0).move = null;
|
3483 |
-
}
|
3484 |
-
|
3485 |
-
this.sliderElement.on('SliderResize', function () {
|
3486 |
-
tinyscrollbar.update("relative");
|
3487 |
-
});
|
3488 |
-
});
|
3489 |
-
|
3490 |
-
smartSlider.$currentSlideElement = smartSlider.frontend.sliderElement.find('.n2-ss-currently-edited-slide');
|
3491 |
-
var isStatic = smartSlider.$currentSlideElement.hasClass('n2-ss-static-slide');
|
3492 |
-
|
3493 |
-
new scope.Generator();
|
3494 |
-
|
3495 |
-
this.settings = new scope.SlideSettings(isStatic);
|
3496 |
-
|
3497 |
-
this.canvasManager = new scope.CanvasManager(this, isStatic, this.options);
|
3498 |
-
|
3499 |
-
this.readyDeferred.resolve();
|
3500 |
-
|
3501 |
-
$('#smartslider-form').on({
|
3502 |
-
checkChanged: $.proxy(this.prepareFormForCheck, this),
|
3503 |
-
submit: $.proxy(this.onSlideSubmit, this)
|
3504 |
-
});
|
3505 |
-
|
3506 |
-
if (this.options.isAddSample) {
|
3507 |
-
this.startSampleSlides();
|
3508 |
-
}
|
3509 |
-
}
|
3510 |
-
|
3511 |
-
SlideEditManager.prototype.ready = function (fn) {
|
3512 |
-
this.readyDeferred.done(fn);
|
3513 |
-
};
|
3514 |
-
|
3515 |
-
SlideEditManager.prototype.prepareFormForCheck = function () {
|
3516 |
-
var data = JSON.stringify(this.canvasManager.getData()),
|
3517 |
-
startData = JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));
|
3518 |
-
|
3519 |
-
this.$slideContentElement.val(startData == data ? this.slideStartValue : Base64.encode(data));
|
3520 |
-
};
|
3521 |
-
|
3522 |
-
SlideEditManager.prototype.onSlideSubmit = function (e) {
|
3523 |
-
if (!nextend.isPreview) {
|
3524 |
-
this.prepareForm();
|
3525 |
-
e.preventDefault();
|
3526 |
-
|
3527 |
-
nextend.askToSave = false;
|
3528 |
-
|
3529 |
-
//$('#n2-admin').removeClass('n2-ss-add-slide-with-sample');
|
3530 |
-
|
3531 |
-
if (this.options.slideAsFile && typeof window.FormData !== undefined && typeof window.File !== 'undefined') {
|
3532 |
-
var fd = new FormData();
|
3533 |
-
var data = $('#smartslider-form').serializeArray();
|
3534 |
-
$.each(data, function (key, input) {
|
3535 |
-
if (input.name == 'slide[slide]') {
|
3536 |
-
|
3537 |
-
try {
|
3538 |
-
fd.append('slide', new Blob([input.value]), "slide.txt");
|
3539 |
-
} catch (e) {
|
3540 |
-
try {
|
3541 |
-
fd.append('slide', new Blob([input.value]));
|
3542 |
-
} catch (e) {
|
3543 |
-
try {
|
3544 |
-
fd.append('slide', new File([input.value], "slide.txt"));
|
3545 |
-
} catch (e) {
|
3546 |
-
nextend.notificationCenter.notice('Your browser does not support File api, please disable "Send slide as file" option in the global settings.');
|
3547 |
-
}
|
3548 |
-
}
|
3549 |
-
}
|
3550 |
-
} else {
|
3551 |
-
fd.append(input.name, input.value);
|
3552 |
-
}
|
3553 |
-
});
|
3554 |
-
|
3555 |
-
NextendAjaxHelper.ajax({
|
3556 |
-
url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
|
3557 |
-
type: 'POST',
|
3558 |
-
data: fd,
|
3559 |
-
contentType: false,
|
3560 |
-
processData: false
|
3561 |
-
}).done($.proxy(this.afterSave, this));
|
3562 |
-
} else {
|
3563 |
-
NextendAjaxHelper.ajax({
|
3564 |
-
type: 'POST',
|
3565 |
-
url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
|
3566 |
-
data: $('#smartslider-form').serialize(),
|
3567 |
-
dataType: 'json'
|
3568 |
-
}).done($.proxy(this.afterSave, this));
|
3569 |
-
}
|
3570 |
-
}
|
3571 |
-
};
|
3572 |
-
|
3573 |
-
SlideEditManager.prototype.afterSave = function () {
|
3574 |
-
nextend.askToSave = true;
|
3575 |
-
$('#smartslider-form').trigger('saved');
|
3576 |
-
|
3577 |
-
$('.n2-ss-edit-slide-top-details .n2-h1').html($('#slidetitle').val());
|
3578 |
-
};
|
3579 |
-
|
3580 |
-
SlideEditManager.prototype.prepareForm = function () {
|
3581 |
-
if (smartSlider.ruler) {
|
3582 |
-
$('#slideguides').val(Base64.encode(JSON.stringify(smartSlider.ruler.toArray())));
|
3583 |
-
}
|
3584 |
-
|
3585 |
-
this.$slideContentElement.val(Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.canvasManager.getData()))));
|
3586 |
-
};
|
3587 |
-
|
3588 |
-
/**
|
3589 |
-
* Warn old version IE users that the editor may fail to work in their browser.
|
3590 |
-
* @private
|
3591 |
-
*/
|
3592 |
-
SlideEditManager.prototype.warnInternetExplorerUsers = function () {
|
3593 |
-
var ie = this.isInternetExplorer();
|
3594 |
-
if (ie && ie < 10) {
|
3595 |
-
alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser);
|
3596 |
-
}
|
3597 |
-
};
|
3598 |
-
|
3599 |
-
/**
|
3600 |
-
* @returns Internet Explorer version number or false
|
3601 |
-
* @private
|
3602 |
-
*/
|
3603 |
-
SlideEditManager.prototype.isInternetExplorer = function () {
|
3604 |
-
var myNav = navigator.userAgent.toLowerCase();
|
3605 |
-
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
|
3606 |
-
};
|
3607 |
-
|
3608 |
-
SlideEditManager.prototype.getLayout = function () {
|
3609 |
-
var propertiesRaw = $('#smartslider-form').serializeArray(),
|
3610 |
-
properties = {};
|
3611 |
-
|
3612 |
-
for (var i = 0; i < propertiesRaw.length; i++) {
|
3613 |
-
var m = propertiesRaw[i].name.match(/slide\[(.*?)\]/);
|
3614 |
-
if (m) {
|
3615 |
-
properties[m[1]] = propertiesRaw[i].value;
|
3616 |
-
}
|
3617 |
-
}
|
3618 |
-
delete properties['generator'];
|
3619 |
-
delete properties['published'];
|
3620 |
-
delete properties['publishdates'];
|
3621 |
-
delete properties['record-start'];
|
3622 |
-
delete properties['record-slides'];
|
3623 |
-
delete properties['slide'];
|
3624 |
-
|
3625 |
-
properties['slide'] = this.canvasManager.getData();
|
3626 |
-
return properties;
|
3627 |
-
};
|
3628 |
-
|
3629 |
-
SlideEditManager.prototype.loadLayout = function (properties, slideDataOverwrite, layerOverwrite) {
|
3630 |
-
// we are working on references!
|
3631 |
-
var slide = properties['slide'];
|
3632 |
-
delete properties['slide'];
|
3633 |
-
if (layerOverwrite) {
|
3634 |
-
this.canvasManager.importLayers(slide, true);
|
3635 |
-
} else {
|
3636 |
-
this.canvasManager.importLayers(slide, false);
|
3637 |
-
}
|
3638 |
-
if (slideDataOverwrite) {
|
3639 |
-
for (var k in properties) {
|
3640 |
-
$('#slide' + k).val(properties[k]).trigger('change');
|
3641 |
-
}
|
3642 |
-
}
|
3643 |
-
properties['slide'] = slide;
|
3644 |
-
};
|
3645 |
-
|
3646 |
-
SlideEditManager.prototype.getSelf = function () {
|
3647 |
-
return this;
|
3648 |
-
}
|
3649 |
-
|
3650 |
-
SlideEditManager.prototype.copySlide = function () {
|
3651 |
-
var slide = {
|
3652 |
-
data: this.settings.getBackgroundData(),
|
3653 |
-
layers: this.canvasManager.getData()
|
3654 |
-
};
|
3655 |
-
$.jStorage.set('copiedSlide', JSON.stringify(slide));
|
3656 |
-
}
|
3657 |
-
|
3658 |
-
SlideEditManager.prototype.pasteSlide = function () {
|
3659 |
-
var slide = $.jStorage.get('copiedSlide');
|
3660 |
-
if (slide) {
|
3661 |
-
slide = JSON.parse(slide);
|
3662 |
-
this.settings.setData(slide.data);
|
3663 |
-
|
3664 |
-
this.canvasManager.mainContainer.replaceLayers(slide.layers);
|
3665 |
-
}
|
3666 |
-
}
|
3667 |
-
SlideEditManager.prototype.hasCopiedSlide = function () {
|
3668 |
-
var slide = $.jStorage.get('copiedSlide');
|
3669 |
-
if (slide) {
|
3670 |
-
return true;
|
3671 |
-
}
|
3672 |
-
return false;
|
3673 |
-
}
|
3674 |
-
|
3675 |
-
return SlideEditManager;
|
3676 |
});
|
3677 |
-
|
3678 |
-
"use strict";
|
3679 |
-
function Generator() {
|
3680 |
-
this._refreshTimeout = null;
|
3681 |
-
this.modal = false;
|
3682 |
-
this.group = 0;
|
3683 |
-
smartSlider.generator = this;
|
3684 |
-
var variables = smartSlider.$currentSlideElement.data('variables');
|
3685 |
-
if (variables) {
|
3686 |
-
this.variables = variables;
|
3687 |
|
3688 |
-
|
3689 |
-
|
3690 |
-
|
3691 |
-
|
3692 |
-
|
|
|
|
|
|
|
|
|
|
|
3693 |
|
3694 |
-
|
3695 |
-
if (this.group > 0) {
|
3696 |
-
this.registerField = this.generatorRegisterField;
|
3697 |
|
3698 |
-
|
3699 |
-
.on('click', $.proxy(function (e) {
|
3700 |
-
e.preventDefault();
|
3701 |
-
this.showModal();
|
3702 |
-
}, this));
|
3703 |
-
this.registerField($('#slidetitle'));
|
3704 |
-
this.registerField($('#slidedescription'));
|
3705 |
-
this.registerField($('#slidethumbnail'));
|
3706 |
-
this.registerField($('#slidebackgroundImage'));
|
3707 |
-
this.registerField($('#slidebackgroundAlt'));
|
3708 |
-
this.registerField($('#slidebackgroundTitle'));
|
3709 |
-
this.registerField($('#slidebackgroundVideoMp4'));
|
3710 |
-
this.registerField($('#slidebackgroundColor'));
|
3711 |
-
this.registerField($('#slidebackgroundColorEnd'));
|
3712 |
-
this.registerField($('#linkslidelink_0'));
|
3713 |
-
this.registerField($('#layergenerator-visible'));
|
3714 |
-
this.registerField($('#layergroup-generator-visible'));
|
3715 |
|
3716 |
-
|
3717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3718 |
}
|
|
|
|
|
3719 |
|
3720 |
-
|
3721 |
-
|
3722 |
-
|
3723 |
-
|
3724 |
};
|
3725 |
|
3726 |
-
|
3727 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3728 |
};
|
3729 |
|
3730 |
Generator.prototype.splitTokens = function (input) {
|
@@ -3750,7 +4034,7 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
3750 |
tokens.push(currentToken);
|
3751 |
}
|
3752 |
return tokens;
|
3753 |
-
}
|
3754 |
|
3755 |
Generator.prototype.fill = function (value) {
|
3756 |
return value;
|
@@ -3828,7 +4112,7 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
3828 |
.replace(tags, function ($0, $1) {
|
3829 |
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
|
3830 |
});
|
3831 |
-
}
|
3832 |
|
3833 |
Generator.prototype.removehtml = function (variable) {
|
3834 |
return $('<div>' + variable + '</div>').text();
|
@@ -3912,10 +4196,26 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
3912 |
return s.replace(re, '');
|
3913 |
};
|
3914 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3915 |
Generator.prototype.registerField = function (field) {
|
3916 |
};
|
3917 |
|
3918 |
Generator.prototype.generatorRegisterField = function (field) {
|
|
|
3919 |
var parent = field.parent();
|
3920 |
parent.on({
|
3921 |
mouseenter: $.proxy(function () {
|
@@ -3975,18 +4275,18 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
3975 |
content = $('<div class="n2-generator-insert-variable"/>');
|
3976 |
|
3977 |
|
3978 |
-
var groupHeader = NextendModal.prototype.createHeading(n2_('Choose the group')).appendTo(content);
|
3979 |
var groupContainer = $('<div class="n2-group-container" />').appendTo(content);
|
3980 |
|
3981 |
|
3982 |
-
content.append(NextendModal.prototype.createHeading(n2_('Choose the variable')));
|
3983 |
var variableContainer = $('<div class="n2-variable-container webkit-scroll-fix" />').appendTo(content);
|
3984 |
|
3985 |
-
//content.append(NextendModal.prototype.createHeading('Functions'));
|
3986 |
var functionsContainer = $('<div class="n2-generator-functions-container n2-form-element-mixed" />')
|
3987 |
.appendTo($('<div class="n2-form" />').appendTo(content));
|
3988 |
|
3989 |
-
content.append(NextendModal.prototype.createHeading(n2_('Result')));
|
3990 |
resultContainer.appendTo(content);
|
3991 |
|
3992 |
|
@@ -4069,7 +4369,7 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
4069 |
active.removelinebreaks = parseInt(removelinebreaks.val());
|
4070 |
updateResult();
|
4071 |
}, this));
|
4072 |
-
|
4073 |
removelinebreaksIndex.on('change', $.proxy(function () {
|
4074 |
active.removelinebreaksIndex = parseInt(removelinebreaksIndex.val());
|
4075 |
updateResult();
|
@@ -4110,7 +4410,7 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
4110 |
|
4111 |
var inited = false;
|
4112 |
|
4113 |
-
this.modal = new NextendModal({
|
4114 |
zero: {
|
4115 |
size: [
|
4116 |
1000,
|
@@ -4154,20 +4454,6 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
4154 |
this.activeField.val(value).trigger('change');
|
4155 |
};
|
4156 |
|
4157 |
-
Generator.prototype.initSlideDataRefresh = function () {
|
4158 |
-
|
4159 |
-
var name = $('#slidetitle').on('nextendChange', $.proxy(function () {
|
4160 |
-
this.variables.slide.name = name.val();
|
4161 |
-
this.refresh();
|
4162 |
-
}, this));
|
4163 |
-
|
4164 |
-
var description = $('#slidedescription').on('nextendChange', $.proxy(function () {
|
4165 |
-
this.variables.slide.description = description.val();
|
4166 |
-
this.refresh();
|
4167 |
-
}, this));
|
4168 |
-
|
4169 |
-
};
|
4170 |
-
|
4171 |
|
4172 |
Generator.prototype.refresh = function () {
|
4173 |
if (this._refreshTimeout) {
|
@@ -4178,7 +4464,7 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
4178 |
};
|
4179 |
|
4180 |
Generator.prototype._refresh = function () {
|
4181 |
-
var layers =
|
4182 |
for (var j = 0; j < layers.length; j++) {
|
4183 |
if (layers[j].type == 'layer') {
|
4184 |
layers[j].item.reRender();
|
@@ -4188,9 +4474,14 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
4188 |
|
4189 |
return Generator;
|
4190 |
});
|
4191 |
-
|
4192 |
"use strict";
|
4193 |
|
|
|
|
|
|
|
|
|
|
|
4194 |
function History() {
|
4195 |
this.historyStates = 50;
|
4196 |
this.enabled = this.historyStates != 0;
|
@@ -4210,16 +4501,30 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4210 |
this.undoBTN = $('#n2-ss-undo').on({
|
4211 |
click: $.proxy(this.undo, this),
|
4212 |
mousedown: function (e) {
|
4213 |
-
|
4214 |
}
|
4215 |
});
|
4216 |
this.redoBTN = $('#n2-ss-redo').on({
|
4217 |
click: $.proxy(this.redo, this),
|
4218 |
mousedown: function (e) {
|
4219 |
-
|
4220 |
}
|
4221 |
});
|
4222 |
this.updateUI();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4223 |
};
|
4224 |
|
4225 |
History.prototype.updateUI = function () {
|
@@ -4249,7 +4554,7 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4249 |
|
4250 |
History.prototype.isEnabled = function () {
|
4251 |
return this.enabled && this.historyAddAllowed;
|
4252 |
-
}
|
4253 |
|
4254 |
/**
|
4255 |
*
|
@@ -4263,7 +4568,7 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4263 |
return batch;
|
4264 |
}
|
4265 |
return false;
|
4266 |
-
}
|
4267 |
|
4268 |
History.prototype.endBatch = function () {
|
4269 |
if (this.isEnabled()) {
|
@@ -4272,18 +4577,18 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4272 |
}
|
4273 |
this.currentBatch = this.currentBatch.parent;
|
4274 |
}
|
4275 |
-
}
|
4276 |
|
4277 |
History.prototype.addControl = function (mode) {
|
4278 |
return this.currentBatch._add(new Control(mode));
|
4279 |
-
}
|
4280 |
|
4281 |
History.prototype.addSimple = function (that, undoAction, redoAction, context) {
|
4282 |
if (this.isEnabled()) {
|
4283 |
return this.currentBatch._add(new Task(that, undoAction, redoAction, context));
|
4284 |
}
|
4285 |
return false;
|
4286 |
-
}
|
4287 |
|
4288 |
/**
|
4289 |
*
|
@@ -4308,14 +4613,14 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4308 |
return this.currentBatch._add(new TaskValue(that, action, action, context));
|
4309 |
}
|
4310 |
return false;
|
4311 |
-
}
|
4312 |
|
4313 |
History.prototype.getCurrentBatchStack = function () {
|
4314 |
if (this.currentBatch != this) {
|
4315 |
return this.currentBatch.tasks;
|
4316 |
}
|
4317 |
return this.tasks[this.tasks.length - 1];
|
4318 |
-
}
|
4319 |
|
4320 |
/**
|
4321 |
*
|
@@ -4422,7 +4727,7 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4422 |
Batch.prototype._add = function (task) {
|
4423 |
this.tasks.push(task);
|
4424 |
return task;
|
4425 |
-
}
|
4426 |
|
4427 |
Batch.prototype.invertUndo = function () {
|
4428 |
this.undo = function () {
|
@@ -4432,9 +4737,9 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4432 |
}
|
4433 |
}
|
4434 |
return true;
|
4435 |
-
}
|
4436 |
return this;
|
4437 |
-
}
|
4438 |
|
4439 |
Batch.prototype.undo = function () {
|
4440 |
for (var i = 0; i < this.tasks.length; i++) {
|
@@ -4443,7 +4748,7 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4443 |
}
|
4444 |
}
|
4445 |
return true;
|
4446 |
-
}
|
4447 |
|
4448 |
Batch.prototype.redo = function () {
|
4449 |
for (var i = 0; i < this.tasks.length; i++) {
|
@@ -4452,18 +4757,18 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4452 |
}
|
4453 |
}
|
4454 |
return true;
|
4455 |
-
}
|
4456 |
|
4457 |
Batch.prototype.isEqual = function () {
|
4458 |
return false;
|
4459 |
-
}
|
4460 |
|
4461 |
function Control(mode) {
|
4462 |
switch (mode) {
|
4463 |
case 'skipForwardUndos':
|
4464 |
this.undo = function () {
|
4465 |
return false;
|
4466 |
-
}
|
4467 |
break;
|
4468 |
}
|
4469 |
}
|
@@ -4471,15 +4776,15 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4471 |
|
4472 |
Control.prototype.undo = function () {
|
4473 |
return true;
|
4474 |
-
}
|
4475 |
|
4476 |
Control.prototype.redo = function () {
|
4477 |
return true;
|
4478 |
-
}
|
4479 |
|
4480 |
Control.prototype.isEqual = function () {
|
4481 |
return false;
|
4482 |
-
}
|
4483 |
|
4484 |
function Task(that, undoAction, redoAction, context) {
|
4485 |
this.that = that;
|
@@ -4492,16 +4797,16 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4492 |
Task.prototype.undo = function () {
|
4493 |
this.undoAction.apply(this.that.getSelf(), this.context);
|
4494 |
return true;
|
4495 |
-
}
|
4496 |
|
4497 |
Task.prototype.redo = function () {
|
4498 |
this.redoAction.apply(this.that.getSelf(), this.context);
|
4499 |
return true;
|
4500 |
-
}
|
4501 |
|
4502 |
Task.prototype.isEqual = function () {
|
4503 |
return false;
|
4504 |
-
}
|
4505 |
|
4506 |
function TaskValue() {
|
4507 |
Task.prototype.constructor.apply(this, arguments);
|
@@ -4513,21 +4818,21 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4513 |
TaskValue.prototype.setValues = function (undoValue, redoValue) {
|
4514 |
this.undoValue = undoValue;
|
4515 |
this.redoValue = redoValue;
|
4516 |
-
}
|
4517 |
|
4518 |
TaskValue.prototype.undo = function () {
|
4519 |
-
this.context.unshift(this.undoValue)
|
4520 |
this.undoAction.apply(this.that.getSelf(), this.context);
|
4521 |
this.context.shift();
|
4522 |
return true;
|
4523 |
-
}
|
4524 |
|
4525 |
TaskValue.prototype.redo = function () {
|
4526 |
-
this.context.unshift(this.redoValue)
|
4527 |
this.redoAction.apply(this.that.getSelf(), this.context);
|
4528 |
this.context.shift();
|
4529 |
return true;
|
4530 |
-
}
|
4531 |
|
4532 |
TaskValue.prototype.isEqual = function (that, action, context) {
|
4533 |
if (that == this.that && action == this.undoAction) {
|
@@ -4538,17 +4843,22 @@ N2Require('History', [], [], function ($, scope, undefined) {
|
|
4538 |
}
|
4539 |
this.setValues = function (undoValue, redoValue) {
|
4540 |
this.redoValue = redoValue;
|
4541 |
-
}
|
4542 |
return true;
|
4543 |
}
|
4544 |
return false;
|
4545 |
-
}
|
4546 |
|
4547 |
return History;
|
4548 |
});
|
4549 |
|
4550 |
-
|
4551 |
|
|
|
|
|
|
|
|
|
|
|
4552 |
function InlineField() {
|
4553 |
|
4554 |
this.$input = $('<input type="text" name="name" />')
|
@@ -4588,16 +4898,28 @@ N2Require('InlineField', [], [], function ($, scope, undefined) {
|
|
4588 |
};
|
4589 |
|
4590 |
InlineField.prototype.destroy = function () {
|
4591 |
-
this.$input.off('blur')
|
4592 |
this.$form.remove();
|
4593 |
};
|
4594 |
|
4595 |
return InlineField;
|
4596 |
});
|
4597 |
-
|
4598 |
"use strict";
|
4599 |
|
4600 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4601 |
this.isStatic = isStatic;
|
4602 |
|
4603 |
var $fields = $('#smartslider-form').find('input[id][name^="slide"], textarea[id][name^="slide"]'),
|
@@ -4613,28 +4935,41 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4613 |
*/
|
4614 |
this.fields = fields;
|
4615 |
|
4616 |
-
this.slideBackground =
|
4617 |
|
4618 |
if (!isStatic) {
|
4619 |
|
4620 |
-
this.$slideMask = this.slideBackground.$mask;
|
4621 |
-
|
4622 |
// Auto fill thumbnail if empty
|
4623 |
-
var thumbnail = $('#slidethumbnail')
|
4624 |
-
|
4625 |
-
|
4626 |
-
|
4627 |
-
|
4628 |
-
|
4629 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4630 |
itemImage.off('.slidethumbnail');
|
|
|
4631 |
}
|
4632 |
-
}
|
4633 |
-
|
4634 |
-
|
4635 |
-
|
4636 |
-
|
4637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4638 |
}, this));
|
4639 |
}
|
4640 |
}
|
@@ -4652,7 +4987,7 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4652 |
$input.on('nextendChange', $.proxy(function () {
|
4653 |
var newValue = $input.val();
|
4654 |
|
4655 |
-
var task =
|
4656 |
if (task) {
|
4657 |
task.setValues(this.values[id], newValue);
|
4658 |
}
|
@@ -4710,6 +5045,7 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4710 |
};
|
4711 |
|
4712 |
SlideSettings.prototype.onChange = function (name, e) {
|
|
|
4713 |
if (typeof this['sync_' + name] === 'function') {
|
4714 |
this['sync_' + name].call(this);
|
4715 |
}
|
@@ -4722,110 +5058,365 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4722 |
};
|
4723 |
|
4724 |
SlideSettings.prototype.updateBackgroundColor = function () {
|
4725 |
-
var backgroundColor = smartSlider.generator.fill(this.fields.backgroundColor.val()),
|
4726 |
-
gradient = this.fields.backgroundGradient.val();
|
4727 |
-
if(backgroundColor.length && backgroundColor.charAt(0) == '#'){
|
4728 |
-
backgroundColor = backgroundColor.substring(1);
|
4729 |
-
if(backgroundColor.length == 6){
|
4730 |
-
backgroundColor += 'ff';
|
4731 |
-
}
|
4732 |
-
}
|
4733 |
-
if (gradient != 'off') {
|
4734 |
-
var backgroundColorEnd = smartSlider.generator.fill(this.fields.backgroundColorEnd.val()),
|
4735 |
-
$slideMask = this.$slideMask.css({background: '', filter: ''});
|
4736 |
-
|
4737 |
-
if(backgroundColorEnd.length && backgroundColorEnd.charAt(0) == '#'){
|
4738 |
-
backgroundColorEnd = backgroundColorEnd.substring(1);
|
4739 |
-
if(backgroundColorEnd.length == 6){
|
4740 |
-
backgroundColorEnd += 'ff';
|
4741 |
-
}
|
4742 |
-
}
|
4743 |
|
4744 |
-
|
4745 |
-
|
4746 |
-
|
4747 |
-
|
4748 |
-
|
4749 |
-
|
4750 |
-
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
-
|
4755 |
-
|
4756 |
-
|
4757 |
-
|
4758 |
-
|
4759 |
-
|
4760 |
-
|
4761 |
-
|
4762 |
-
|
4763 |
-
|
4764 |
-
|
4765 |
-
|
4766 |
-
|
4767 |
-
|
4768 |
-
|
4769 |
-
|
4770 |
-
|
4771 |
-
|
4772 |
-
|
4773 |
-
|
4774 |
-
|
4775 |
-
|
4776 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4777 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4778 |
|
|
|
|
|
|
|
4779 |
|
|
|
|
|
4780 |
} else {
|
4781 |
-
|
4782 |
-
|
4783 |
-
|
4784 |
-
|
4785 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4786 |
}
|
4787 |
}
|
4788 |
-
|
4789 |
};
|
4790 |
|
4791 |
-
|
4792 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4793 |
};
|
4794 |
|
4795 |
-
|
4796 |
-
|
4797 |
-
|
4798 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4799 |
} else {
|
4800 |
-
this.
|
|
|
|
|
|
|
4801 |
}
|
4802 |
};
|
4803 |
|
4804 |
-
|
4805 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4806 |
};
|
4807 |
|
4808 |
-
|
4809 |
-
this.
|
4810 |
};
|
4811 |
|
4812 |
-
|
4813 |
-
this.
|
4814 |
};
|
4815 |
|
4816 |
-
|
4817 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4818 |
};
|
4819 |
|
4820 |
-
|
4821 |
-
this.
|
|
|
|
|
4822 |
};
|
4823 |
|
4824 |
-
return
|
4825 |
});
|
4826 |
-
|
4827 |
"use strict";
|
4828 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4829 |
function LayerContainer(component, $ul, allowedPlacementMode, childrenSelector, allowedChildren) {
|
4830 |
this.component = component;
|
4831 |
this.$ul = $ul
|
@@ -4842,10 +5433,10 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
4842 |
this.layerContainerElement = $layerContainerElement;
|
4843 |
};
|
4844 |
|
4845 |
-
LayerContainer.prototype.startWithExistingNodes = function () {
|
4846 |
var nodes = this.layerContainerElement.find(this.childrenSelector);
|
4847 |
for (var i = 0; i < nodes.length; i++) {
|
4848 |
-
this._loadNode(nodes.eq(i),
|
4849 |
}
|
4850 |
this.component.onChildCountChange();
|
4851 |
};
|
@@ -4854,18 +5445,18 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
4854 |
return $.inArray(type, this.allowedChildren) !== -1;
|
4855 |
};
|
4856 |
|
4857 |
-
LayerContainer.prototype._loadNode = function ($el,
|
4858 |
-
var type = $el.data('
|
4859 |
if (this.isChildAllowed(type)) {
|
4860 |
var lastPlacement = $el.data('lastplacement'),
|
4861 |
removedPlacementData = {};
|
4862 |
if (lastPlacement !== undefined && lastPlacement != this.allowedPlacementMode) {
|
4863 |
switch (lastPlacement) {
|
4864 |
case 'absolute':
|
4865 |
-
removedPlacementData =
|
4866 |
break;
|
4867 |
case 'normal':
|
4868 |
-
removedPlacementData =
|
4869 |
break;
|
4870 |
}
|
4871 |
}
|
@@ -4873,10 +5464,10 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
4873 |
var component;
|
4874 |
switch (type) {
|
4875 |
case 'layer':
|
4876 |
-
component = new
|
4877 |
|
4878 |
var itemClass = component.itemEditor.getItemClass($el.find('.n2-ss-item').data('item'));
|
4879 |
-
if (itemClass &&
|
4880 |
if (removedPlacementData.desktopportraitheight !== undefined) {
|
4881 |
// If absolute layer pasted into normal position then we should force the absolute height
|
4882 |
// when the item has needSize property true.
|
@@ -4885,21 +5476,21 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
4885 |
}
|
4886 |
break;
|
4887 |
case 'content':
|
4888 |
-
component = new
|
4889 |
break;
|
4890 |
case 'row':
|
4891 |
-
component = new
|
4892 |
break;
|
4893 |
case 'col':
|
4894 |
-
component = new
|
4895 |
break;
|
4896 |
case 'group':
|
4897 |
break;
|
4898 |
}
|
4899 |
|
4900 |
if (component) {
|
4901 |
-
component.load($el);
|
4902 |
-
if (
|
4903 |
component.sync();
|
4904 |
}
|
4905 |
return component;
|
@@ -4931,7 +5522,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
4931 |
|
4932 |
LayerContainer.prototype.append = function ($layer) {
|
4933 |
$layer.appendTo(this.layerContainerElement);
|
4934 |
-
var layer = this._loadNode($layer,
|
4935 |
this.component.onChildCountChange();
|
4936 |
return layer;
|
4937 |
};
|
@@ -4945,7 +5536,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
4945 |
$layer.insertBefore(layers[index].layer);
|
4946 |
}
|
4947 |
|
4948 |
-
var layer = this._loadNode($layer,
|
4949 |
this.component.onChildCountChange();
|
4950 |
return layer;
|
4951 |
};
|
@@ -4977,9 +5568,9 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
4977 |
var relatedLayer,
|
4978 |
isReversed = (this.allowedPlacementMode == 'absolute');
|
4979 |
if (isReversed) {
|
4980 |
-
relatedLayer = layer.getRootElement().prevAll('.n2-ss-layer, .n2-ss-layer-group
|
4981 |
} else {
|
4982 |
-
relatedLayer = layer.getRootElement().nextAll('.n2-ss-layer, .n2-ss-layer-group
|
4983 |
}
|
4984 |
|
4985 |
if (relatedLayer !== undefined) {
|
@@ -5179,9 +5770,14 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5179 |
|
5180 |
return LayerContainer;
|
5181 |
});
|
5182 |
-
|
5183 |
"use strict";
|
5184 |
|
|
|
|
|
|
|
|
|
|
|
5185 |
function LayerDataStorage() {
|
5186 |
this.isDeviceProp = {};
|
5187 |
this.propertyScope = {};
|
@@ -5194,10 +5790,31 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5194 |
mobilePortrait: {},
|
5195 |
mobileLandscape: {}
|
5196 |
};
|
|
|
|
|
5197 |
}
|
5198 |
|
5199 |
LayerDataStorage.prototype.getMode = function () {
|
5200 |
-
return this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5201 |
};
|
5202 |
|
5203 |
LayerDataStorage.prototype.getRawProperty = function (name) {
|
@@ -5211,7 +5828,7 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5211 |
return undefined;
|
5212 |
}
|
5213 |
return this.property[name];
|
5214 |
-
}
|
5215 |
|
5216 |
LayerDataStorage.prototype.getProperty = function (name) {
|
5217 |
|
@@ -5239,7 +5856,7 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5239 |
this.render(name);
|
5240 |
}
|
5241 |
}
|
5242 |
-
}
|
5243 |
|
5244 |
LayerDataStorage.prototype.store = function (name, value, needRender, from) {
|
5245 |
|
@@ -5252,7 +5869,7 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5252 |
} else {
|
5253 |
oldValueFilled = oldValue = this.property[name];
|
5254 |
}
|
5255 |
-
var task =
|
5256 |
if (task) {
|
5257 |
task.setValues(oldValue, value);
|
5258 |
}
|
@@ -5266,17 +5883,14 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5266 |
if (needRender) {
|
5267 |
this.render(name, oldValueFilled, from);
|
5268 |
}
|
5269 |
-
}
|
5270 |
|
5271 |
LayerDataStorage.prototype.render = function (name, oldValue, from) {
|
5272 |
this.propertyScope[name]['_sync' + name](oldValue, from);
|
5273 |
};
|
5274 |
|
5275 |
LayerDataStorage.prototype.isDimensionPropertyAccepted = function (value) {
|
5276 |
-
|
5277 |
-
return true;
|
5278 |
-
}
|
5279 |
-
return false;
|
5280 |
};
|
5281 |
|
5282 |
LayerDataStorage.prototype.changeEditorMode = function (mode) {
|
@@ -5292,27 +5906,29 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5292 |
this.renderModeProperties(false);
|
5293 |
};
|
5294 |
|
5295 |
-
LayerDataStorage.prototype.renderModeProperties = function () {
|
5296 |
-
for (var k in this.
|
5297 |
-
this.
|
5298 |
-
|
|
|
|
|
5299 |
}
|
5300 |
-
}
|
5301 |
|
5302 |
LayerDataStorage.prototype.historyResetMode = function (value, mode) {
|
5303 |
|
5304 |
this.deviceProperty[mode] = $.extend({}, value);
|
5305 |
|
5306 |
-
if (mode == this.
|
5307 |
this.renderModeProperties(true);
|
5308 |
}
|
5309 |
-
}
|
5310 |
|
5311 |
LayerDataStorage.prototype.resetMode = function (mode) {
|
5312 |
if (mode != 'desktopPortrait') {
|
5313 |
var undefined;
|
5314 |
|
5315 |
-
var task =
|
5316 |
if (task) {
|
5317 |
task.setValues($.extend({}, this.deviceProperty[mode]), {});
|
5318 |
}
|
@@ -5320,7 +5936,7 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5320 |
for (var k in this.deviceProperty[mode]) {
|
5321 |
this.deviceProperty[mode][k] = undefined;
|
5322 |
}
|
5323 |
-
if (mode == this.
|
5324 |
this.renderModeProperties(true);
|
5325 |
}
|
5326 |
}
|
@@ -5332,7 +5948,7 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5332 |
|
5333 |
this.deviceProperty[to] = $.extend({}, this.deviceProperty[to], this.deviceProperty[from]);
|
5334 |
|
5335 |
-
var task =
|
5336 |
if (task) {
|
5337 |
task.setValues(originalValues, this.deviceProperty[to]);
|
5338 |
}
|
@@ -5344,7 +5960,7 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5344 |
return this.originalProperties[name];
|
5345 |
}
|
5346 |
return def;
|
5347 |
-
}
|
5348 |
|
5349 |
LayerDataStorage.prototype.createProperty = function (name, def, $layer, scope) {
|
5350 |
this.isDeviceProp[name] = false;
|
@@ -5357,45 +5973,68 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5357 |
} else {
|
5358 |
this.property[name] = this._getDefault(name, def);
|
5359 |
}
|
5360 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5361 |
|
5362 |
LayerDataStorage.prototype.createDeviceProperty = function (name, def, $layer, scope) {
|
|
|
5363 |
this.isDeviceProp[name] = true;
|
5364 |
this.propertyScope[name] = scope || this;
|
5365 |
if ($layer) {
|
5366 |
-
for (
|
5367 |
this.deviceProperty[k][name] = $layer.data(k.toLowerCase() + name.toLowerCase());
|
5368 |
if (this.deviceProperty[k][name] === "") {
|
5369 |
this.deviceProperty[k][name] = undefined;
|
5370 |
}
|
5371 |
}
|
5372 |
-
for (
|
5373 |
if (this.deviceProperty[k][name] === undefined || this.deviceProperty[k][name] === "") {
|
5374 |
-
|
5375 |
if (defaultValue !== undefined) {
|
5376 |
this.deviceProperty[k][name] = defaultValue;
|
5377 |
}
|
5378 |
}
|
5379 |
}
|
5380 |
-
for (
|
5381 |
if (this.deviceProperty[k][name] === undefined || this.deviceProperty[k][name] === "") {
|
5382 |
this.deviceProperty[k][name] = def[k];
|
5383 |
}
|
5384 |
}
|
5385 |
} else {
|
5386 |
//Create layer
|
5387 |
-
for (
|
5388 |
this.deviceProperty[k][name] = def[k];
|
5389 |
}
|
5390 |
-
for (
|
5391 |
-
|
5392 |
if (defaultValue !== undefined) {
|
5393 |
this.deviceProperty[k][name] = defaultValue;
|
5394 |
}
|
5395 |
}
|
5396 |
}
|
5397 |
this.property[name] = this.deviceProperty.desktopPortrait[name];
|
5398 |
-
}
|
5399 |
|
5400 |
LayerDataStorage.prototype.removeProperty = function (name) {
|
5401 |
delete this.property[name];
|
@@ -5411,13 +6050,13 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5411 |
}
|
5412 |
delete this.isDeviceProp[name];
|
5413 |
delete this.propertyScope[name];
|
5414 |
-
}
|
5415 |
|
5416 |
LayerDataStorage.prototype.removeProperties = function (properties) {
|
5417 |
for (var i = 0; i < properties.length; i++) {
|
5418 |
this.removeProperty(properties[i]);
|
5419 |
}
|
5420 |
-
}
|
5421 |
|
5422 |
LayerDataStorage.prototype.getPropertiesData = function (properties) {
|
5423 |
var data = {};
|
@@ -5435,17 +6074,24 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5435 |
}
|
5436 |
}
|
5437 |
return data;
|
5438 |
-
}
|
5439 |
|
5440 |
LayerDataStorage.prototype.setProperty = function (name, value, from) {
|
|
|
|
|
|
|
|
|
|
|
5441 |
if (this.propertyScope[name] !== undefined) {
|
5442 |
if (typeof this.propertyScope[name]['setProperty' + name] == 'function') {
|
5443 |
this.propertyScope[name]['setProperty' + name](name, value, from);
|
5444 |
} else {
|
5445 |
this._setProperty(name, value, from);
|
5446 |
}
|
|
|
|
|
5447 |
}
|
5448 |
-
}
|
5449 |
|
5450 |
LayerDataStorage.prototype._setProperty = function (name, value, from) {
|
5451 |
|
@@ -5454,11 +6100,21 @@ N2Require('LayerDataStorage', [], ['smartSlider'], function ($, scope, smartSlid
|
|
5454 |
if (from != 'manager') {
|
5455 |
this.$.trigger('propertyChanged', [name, this.getProperty(name)]);
|
5456 |
}
|
5457 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5458 |
|
5459 |
return LayerDataStorage;
|
5460 |
});
|
5461 |
-
|
5462 |
"use strict";
|
5463 |
var layerClass = '.n2-ss-layer',
|
5464 |
keys = {
|
@@ -5501,37 +6157,57 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5501 |
2: 'GROUP'
|
5502 |
};
|
5503 |
|
5504 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5505 |
this.mode = 'desktopPortrait';
|
5506 |
-
|
5507 |
-
|
|
|
|
|
|
|
|
|
|
|
5508 |
this.ready = $.Deferred();
|
5509 |
|
5510 |
this.shouldPreventActivationBubble = false;
|
5511 |
|
5512 |
this.$ = $(this);
|
5513 |
|
5514 |
-
|
5515 |
|
5516 |
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" />');
|
5517 |
|
5518 |
this.initSelectMode();
|
5519 |
|
5520 |
-
this.layerWindow = new
|
5521 |
|
5522 |
-
this.layerOptions = new
|
5523 |
|
5524 |
-
this.ui = new
|
5525 |
|
5526 |
-
|
|
|
|
|
|
|
5527 |
|
5528 |
-
this.itemEditor = new
|
5529 |
|
5530 |
this.mainContainer.lateInit();
|
5531 |
|
5532 |
this._initDeviceModeChange();
|
5533 |
|
5534 |
-
|
|
|
|
|
|
|
5535 |
|
5536 |
this.layerOptions.startFeatures();
|
5537 |
|
@@ -5585,56 +6261,54 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5585 |
}, this));
|
5586 |
|
5587 |
this.isMultiDrag = false;
|
|
|
5588 |
|
5589 |
-
|
5590 |
-
|
5591 |
-
CanvasManager.prototype.updateEditorMode = function (mode) {
|
5592 |
this.currentEditorMode = mode;
|
5593 |
$('body').attr('data-editormode', this.currentEditorMode);
|
5594 |
};
|
5595 |
|
5596 |
-
|
5597 |
return this.mode;
|
5598 |
};
|
5599 |
|
5600 |
-
|
5601 |
-
|
5602 |
-
return smartSlider.frontend.responsive.lastRatios.slideW;
|
5603 |
-
} else if (axis == 'v') {
|
5604 |
-
return smartSlider.frontend.responsive.lastRatios.slideH;
|
5605 |
-
}
|
5606 |
-
return 0;
|
5607 |
};
|
5608 |
|
5609 |
-
|
|
|
|
|
|
|
|
|
5610 |
this.mainContent = layer;
|
5611 |
-
}
|
5612 |
|
5613 |
-
|
5614 |
return false;
|
5615 |
|
5616 |
-
}
|
5617 |
|
5618 |
-
|
5619 |
-
return layer instanceof
|
5620 |
-
}
|
5621 |
|
5622 |
-
|
5623 |
-
return layer instanceof
|
5624 |
-
}
|
5625 |
|
5626 |
-
|
5627 |
-
return layer instanceof
|
5628 |
-
}
|
5629 |
|
5630 |
-
|
5631 |
-
return layer instanceof
|
5632 |
-
}
|
5633 |
|
5634 |
//<editor-fold desc="Initialize the device mode changer">
|
5635 |
|
5636 |
|
5637 |
-
|
5638 |
var resetButton = $('#layerresettodesktop').on('click', $.proxy(this.__onResetToDesktopClick, this));
|
5639 |
this.resetToDesktopTRElement = resetButton.closest('tr');
|
5640 |
this.resetToDesktopGlobalElement = $('#n2-ss-layer-reset-to-desktop').on('click', $.proxy(function () {
|
@@ -5645,7 +6319,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5645 |
|
5646 |
var showOn = $('#n2-ss-layer-show-on'),
|
5647 |
showOnShortCuts = {},
|
5648 |
-
deviceModes =
|
5649 |
for (var k in deviceModes) {
|
5650 |
if (deviceModes[k]) {
|
5651 |
showOnShortCuts[k] = $('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-' + k + '"></i></div>').on('click', $.proxy(function (mode) {
|
@@ -5674,55 +6348,49 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5674 |
this.layerOptions.forms.global.mobileLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'mobileLandscape'));
|
5675 |
|
5676 |
$('#layershow').data('field').setAvailableDevices(deviceModes);
|
5677 |
-
$('#layergroup-show').data('field').setAvailableDevices(deviceModes);
|
5678 |
|
5679 |
-
this.
|
5680 |
-
smartSlider.frontend.sliderElement.on('SliderDeviceOrientation', $.proxy(function () {
|
5681 |
-
this.__onChangeDeviceOrientation();
|
5682 |
-
}, this));
|
5683 |
|
5684 |
this.ready.resolve();
|
5685 |
|
5686 |
-
}
|
5687 |
|
5688 |
/**
|
5689 |
* 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.
|
5690 |
*/
|
5691 |
-
|
|
|
5692 |
|
5693 |
-
this.
|
|
|
5694 |
|
5695 |
-
|
5696 |
};
|
5697 |
|
5698 |
-
|
5699 |
-
|
5700 |
-
|
5701 |
-
* @private
|
5702 |
-
*/
|
5703 |
-
CanvasManager.prototype.__onChangeDeviceOrientation = function () {
|
5704 |
-
|
5705 |
-
this.mode = smartSlider.frontend.responsive.getNormalizedModeString();
|
5706 |
-
//this.globalShowOnDeviceCB(this.mode);
|
5707 |
|
5708 |
-
|
5709 |
-
this.
|
5710 |
|
5711 |
-
this.
|
|
|
|
|
5712 |
};
|
5713 |
|
5714 |
/**
|
5715 |
* Reset the custom values of the current mode on the current layer to the desktop values.
|
5716 |
* @private
|
5717 |
*/
|
5718 |
-
|
5719 |
if (this.mainContainer.getSelectedLayer()) {
|
5720 |
var mode = this.getMode();
|
5721 |
this.mainContainer.getSelectedLayer().resetMode(mode);
|
5722 |
}
|
5723 |
};
|
5724 |
|
5725 |
-
|
5726 |
var currentMode = this.getMode();
|
5727 |
if (currentMode == 'desktopPortrait') {
|
5728 |
if (mode != 'desktopPortrait') {
|
@@ -5739,12 +6407,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5739 |
|
5740 |
//</editor-fold>
|
5741 |
|
5742 |
-
|
5743 |
if (this.canvasSettings.get("n2-ss-snap-to-enabled")) {
|
5744 |
-
|
5745 |
-
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');
|
5746 |
-
}
|
5747 |
-
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');
|
5748 |
}
|
5749 |
return false;
|
5750 |
};
|
@@ -5753,7 +6418,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5753 |
* Get the HTML code of the whole slide
|
5754 |
* @returns {string} HTML
|
5755 |
*/
|
5756 |
-
|
5757 |
var node = $('<div></div>');
|
5758 |
|
5759 |
var list = this.mainContainer.container.getAllLayers();
|
@@ -5765,11 +6430,11 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5765 |
};
|
5766 |
|
5767 |
|
5768 |
-
|
5769 |
return this.mainContainer.container.getData();
|
5770 |
};
|
5771 |
|
5772 |
-
|
5773 |
var group = this.mainContainer;
|
5774 |
|
5775 |
var layers = $.extend(true, [], data);
|
@@ -5797,7 +6462,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5797 |
|
5798 |
};
|
5799 |
|
5800 |
-
|
5801 |
|
5802 |
var component = group.container.append($component);
|
5803 |
|
@@ -5808,7 +6473,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5808 |
return component;
|
5809 |
};
|
5810 |
|
5811 |
-
|
5812 |
|
5813 |
var component = group.container.insertAt($component, index);
|
5814 |
|
@@ -5826,14 +6491,14 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5826 |
* @private
|
5827 |
*/
|
5828 |
|
5829 |
-
|
5830 |
var selectedLayer = this.mainContainer.getSelectedLayer();
|
5831 |
if (selectedLayer == false || selectedLayer.isDeleted) {
|
5832 |
this.resetActiveLayer();
|
5833 |
}
|
5834 |
};
|
5835 |
|
5836 |
-
|
5837 |
var layers = this.mainContainer.container.getSortedLayers();
|
5838 |
if (layers.length) {
|
5839 |
layers[layers.length - 1].activate();
|
@@ -5842,7 +6507,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5842 |
}
|
5843 |
};
|
5844 |
|
5845 |
-
|
5846 |
var layer = this.mainContainer.getSelectedLayer();
|
5847 |
if (layer && !layer.isDeleted) {
|
5848 |
// There is a chance that the layer already deleted
|
@@ -5859,7 +6524,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5859 |
|
5860 |
if (nextActiveLayer) {
|
5861 |
|
5862 |
-
this.layerOptions.changeActiveComponent(nextActiveLayer, nextActiveLayer.type, nextActiveLayer.placement.getType(), nextActiveLayer.
|
5863 |
|
5864 |
nextActiveLayer.$.on({
|
5865 |
'propertyChanged.editor': $.proxy(this.layerOptions.onUpdateField, this.layerOptions),
|
@@ -5873,27 +6538,27 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5873 |
this.$.trigger('activeLayerChanged');
|
5874 |
};
|
5875 |
|
5876 |
-
|
5877 |
this.$highlight.appendTo(layer.layer);
|
5878 |
-
}
|
5879 |
|
5880 |
-
|
5881 |
this.$highlight.detach();
|
5882 |
-
}
|
5883 |
|
5884 |
-
|
5885 |
if (this.mainContainer.getSelectedLayer()) {
|
5886 |
this.doActionOnActiveLayer('delete');
|
5887 |
}
|
5888 |
};
|
5889 |
|
5890 |
-
|
5891 |
if (this.mainContainer.getSelectedLayer()) {
|
5892 |
this.doActionOnActiveLayer('duplicate', [this.selectMode == SELECT_MODE.ON ? false : true, false]);
|
5893 |
}
|
5894 |
};
|
5895 |
|
5896 |
-
|
5897 |
var requestedLayers;
|
5898 |
if (clickedLayer == undefined) {
|
5899 |
if (this.selectMode == 1) {
|
@@ -5922,7 +6587,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5922 |
}
|
5923 |
};
|
5924 |
|
5925 |
-
|
5926 |
var clipboard = $.jStorage.get('ss3layersclipboard');
|
5927 |
if (clipboard) {
|
5928 |
var layers = JSON.parse(clipboard);
|
@@ -5942,17 +6607,16 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5942 |
}
|
5943 |
};
|
5944 |
|
5945 |
-
|
5946 |
if ($.jStorage.get('ss3layersclipboard')) {
|
5947 |
return true;
|
5948 |
}
|
5949 |
return false;
|
5950 |
-
}
|
5951 |
|
5952 |
-
|
5953 |
-
var canvasManager = this;
|
5954 |
|
5955 |
-
|
5956 |
onShow: $.proxy(function (e, contextMenu) {
|
5957 |
var $target = $(e.target);
|
5958 |
|
@@ -5985,11 +6649,11 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5985 |
}
|
5986 |
|
5987 |
contextMenu.addItem('Copy slide', 'n2-i-copy', $.proxy(function () {
|
5988 |
-
this.
|
5989 |
}, this));
|
5990 |
-
if (this.
|
5991 |
contextMenu.addItem('Paste slide', 'n2-i-paste', $.proxy(function () {
|
5992 |
-
this.
|
5993 |
}, this));
|
5994 |
}
|
5995 |
}, this)
|
@@ -5997,7 +6661,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
5997 |
};
|
5998 |
|
5999 |
|
6000 |
-
|
6001 |
this.selectMode = SELECT_MODE.OFF;
|
6002 |
this.selectedLayers = [];
|
6003 |
|
@@ -6018,9 +6682,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6018 |
break;
|
6019 |
}
|
6020 |
}, this))
|
6021 |
-
}
|
6022 |
|
6023 |
-
|
6024 |
if (isGroupMode) {
|
6025 |
if (this.selectMode == SELECT_MODE.ON) {
|
6026 |
this.exitSelectMode();
|
@@ -6029,9 +6693,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6029 |
} else {
|
6030 |
this.changeSelectMode(SELECT_MODE.ON);
|
6031 |
}
|
6032 |
-
}
|
6033 |
|
6034 |
-
|
6035 |
var lastMode = this.selectMode;
|
6036 |
if (lastMode != targetMode) {
|
6037 |
|
@@ -6062,23 +6726,23 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6062 |
$('body').off('.n2-ss-selection');
|
6063 |
} else {
|
6064 |
$('body').on('mousedown.n2-ss-selection', $.proxy(function (e) {
|
6065 |
-
if (
|
6066 |
-
if (
|
6067 |
this.exitSelectMode();
|
6068 |
}
|
6069 |
}
|
6070 |
}, this));
|
6071 |
}
|
6072 |
}
|
6073 |
-
}
|
6074 |
|
6075 |
-
|
6076 |
if (isGroupMode && this.selectMode == SELECT_MODE.GROUP) {
|
6077 |
this.exitSelectMode();
|
6078 |
}
|
6079 |
-
}
|
6080 |
|
6081 |
-
|
6082 |
if (layer.type != 'layer') {
|
6083 |
return true;
|
6084 |
}
|
@@ -6102,7 +6766,7 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6102 |
return true;
|
6103 |
};
|
6104 |
|
6105 |
-
|
6106 |
|
6107 |
var index = $.inArray(layer, this.selectedLayers);
|
6108 |
if (index != -1) {
|
@@ -6149,9 +6813,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6149 |
this.selectedLayers[i].layerRow.addClass('n2-selected');
|
6150 |
this.selectedLayers[i].layer.addClass('n2-ss-layer-selected');
|
6151 |
}
|
6152 |
-
}
|
6153 |
|
6154 |
-
|
6155 |
if (!isGroupSelected) {
|
6156 |
this.changeSelectMode(SELECT_MODE.ON);
|
6157 |
}
|
@@ -6159,9 +6823,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6159 |
for (var i = 0; i < layers.length; i++) {
|
6160 |
this._selectLayer(layers[i], false);
|
6161 |
}
|
6162 |
-
}
|
6163 |
|
6164 |
-
|
6165 |
if (this.selectMode) {
|
6166 |
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6167 |
if (this.selectedLayers[i] != this.mainContainer.getSelectedLayer()) {
|
@@ -6174,9 +6838,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6174 |
this.selectedLayers = [];
|
6175 |
this.changeSelectMode(SELECT_MODE.OFF);
|
6176 |
}
|
6177 |
-
}
|
6178 |
|
6179 |
-
|
6180 |
if (this.selectMode == SELECT_MODE.ON) {
|
6181 |
|
6182 |
var selectedLayers = $.extend([], this.selectedLayers);
|
@@ -6189,9 +6853,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6189 |
selectedLayer[action].apply(selectedLayer, args);
|
6190 |
}
|
6191 |
}
|
6192 |
-
}
|
6193 |
|
6194 |
-
|
6195 |
if (this.selectMode && this.currentEditorMode == 'canvas' && ui.mode == 'absolute') {
|
6196 |
|
6197 |
var targetFoundInSelection = false;
|
@@ -6222,14 +6886,14 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6222 |
|
6223 |
this.isMultiDrag = true;
|
6224 |
}
|
6225 |
-
}
|
6226 |
|
6227 |
-
|
6228 |
if (this.isMultiDrag === true) {
|
6229 |
var movement = {
|
6230 |
left: ui.position.left + ui.canvasOffset.left - ui.originalOffset.left,
|
6231 |
top: ui.position.top + ui.canvasOffset.top - ui.originalOffset.top
|
6232 |
-
}
|
6233 |
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6234 |
var selectedLayer = this.selectedLayers[i];
|
6235 |
if (!this.isGroup(selectedLayer)) {
|
@@ -6248,9 +6912,9 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6248 |
}
|
6249 |
}
|
6250 |
}
|
6251 |
-
}
|
6252 |
|
6253 |
-
|
6254 |
if (this.isMultiDrag === true) {
|
6255 |
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6256 |
var selectedLayer = this.selectedLayers[i];
|
@@ -6277,26 +6941,26 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6277 |
return true;
|
6278 |
}
|
6279 |
return false;
|
6280 |
-
}
|
6281 |
|
6282 |
-
|
6283 |
historicalGroup.getSelf().delete();
|
6284 |
-
}
|
6285 |
|
6286 |
-
|
6287 |
-
var group = new
|
6288 |
group.create();
|
6289 |
historicalGroup.setSelf(group);
|
6290 |
-
}
|
6291 |
|
6292 |
-
|
6293 |
var group;
|
6294 |
switch (this.selectMode) {
|
6295 |
case SELECT_MODE.ON:
|
6296 |
-
group = new
|
6297 |
group.create();
|
6298 |
|
6299 |
-
|
6300 |
|
6301 |
group.addLayers(this.selectedLayers);
|
6302 |
|
@@ -6308,13 +6972,13 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6308 |
var activeLayer = this.mainContainer.getSelectedLayer();
|
6309 |
|
6310 |
// If the single layer is already in a group, we just activate that group
|
6311 |
-
if (activeLayer.group instanceof
|
6312 |
activeLayer.group.activate();
|
6313 |
} else {
|
6314 |
-
group = new
|
6315 |
group.create();
|
6316 |
|
6317 |
-
|
6318 |
|
6319 |
group.addLayers([activeLayer]);
|
6320 |
|
@@ -6324,18 +6988,18 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6324 |
case SELECT_MODE.GROUP:
|
6325 |
break;
|
6326 |
}
|
6327 |
-
}
|
6328 |
|
6329 |
-
|
6330 |
-
var layer = new
|
6331 |
layer.create();
|
6332 |
layer.hightlightStructure();
|
6333 |
return {
|
6334 |
layer: layer
|
6335 |
};
|
6336 |
-
}
|
6337 |
|
6338 |
-
|
6339 |
var activeGroup = group,
|
6340 |
layer = null;
|
6341 |
if (this.isCol(activeGroup)) {
|
@@ -6351,24 +7015,25 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6351 |
return {
|
6352 |
layer: layer
|
6353 |
};
|
6354 |
-
}
|
6355 |
|
6356 |
-
|
6357 |
if (!this.shouldPreventActivationBubble) {
|
6358 |
this.shouldPreventActivationBubble = true;
|
6359 |
return true;
|
6360 |
}
|
6361 |
return false;
|
6362 |
-
}
|
6363 |
|
6364 |
-
|
6365 |
this.shouldPreventActivationBubble = false;
|
6366 |
-
}
|
6367 |
|
6368 |
-
|
6369 |
$(window).on({
|
6370 |
keydown: $.proxy(function (e) {
|
6371 |
-
|
|
|
6372 |
var hasSelectedLayer = this.mainContainer.getSelectedLayer(),
|
6373 |
keyCode = e.keyCode;
|
6374 |
|
@@ -6450,11 +7115,11 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6450 |
if (e.ctrlKey || e.metaKey) {
|
6451 |
if (keyCode == 90) {
|
6452 |
if (e.shiftKey) {
|
6453 |
-
if (
|
6454 |
e.preventDefault();
|
6455 |
}
|
6456 |
} else {
|
6457 |
-
if (
|
6458 |
e.preventDefault();
|
6459 |
}
|
6460 |
}
|
@@ -6463,10 +7128,10 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6463 |
e.preventDefault();
|
6464 |
} else if (keyCode == 68) {
|
6465 |
e.preventDefault();
|
6466 |
-
this.
|
6467 |
} else if (keyCode == 70) {
|
6468 |
e.preventDefault();
|
6469 |
-
this.
|
6470 |
} else if (keyCode == 67) {
|
6471 |
this.copy();
|
6472 |
} else if (keyCode == 86) {
|
@@ -6482,19 +7147,25 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6482 |
}
|
6483 |
}, this)
|
6484 |
});
|
6485 |
-
}
|
6486 |
|
6487 |
-
|
6488 |
return this;
|
6489 |
-
}
|
6490 |
|
6491 |
-
return
|
6492 |
});
|
6493 |
-
|
6494 |
"use strict";
|
6495 |
|
6496 |
-
|
6497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6498 |
this.isShown = !$.jStorage.get('ssLayersShown', false);
|
6499 |
this.tlHeight = $.jStorage.get('ssLayersHeight') || 200;
|
6500 |
|
@@ -6523,7 +7194,7 @@ N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartS
|
|
6523 |
var h = this.$container.height();
|
6524 |
this.paneLeft.height(h - 48);
|
6525 |
this.paneRight.height(h - 48);
|
6526 |
-
}
|
6527 |
|
6528 |
CanvasUserInterface.prototype.onActivateLayer = function (layer) {
|
6529 |
|
@@ -6534,13 +7205,13 @@ N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartS
|
|
6534 |
do {
|
6535 |
top += currentLayer.layerRow.get(0).offsetTop;
|
6536 |
currentLayer = currentLayer.group;
|
6537 |
-
} while (currentLayer !== this.
|
6538 |
|
6539 |
if (top < scrollTop || top > scrollTop + this.paneLeft.height() - 40) {
|
6540 |
this.paneLeft.scrollTop(top);
|
6541 |
this.paneRight.scrollTop(top);
|
6542 |
}
|
6543 |
-
}
|
6544 |
|
6545 |
CanvasUserInterface.prototype.fixScroll = function () {
|
6546 |
|
@@ -6568,7 +7239,7 @@ N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartS
|
|
6568 |
}, this));
|
6569 |
|
6570 |
this.paneRight.on('mousewheel', cb);
|
6571 |
-
}
|
6572 |
|
6573 |
CanvasUserInterface.prototype.resizeStart = function (e) {
|
6574 |
if (!this.isShown) return;
|
@@ -6582,12 +7253,12 @@ N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartS
|
|
6582 |
'mouseleave.n2-ss-tl-resize': $.proxy(this.resizeStop, this)
|
6583 |
});
|
6584 |
}
|
6585 |
-
}
|
6586 |
|
6587 |
CanvasUserInterface.prototype.resizeMove = function (e) {
|
6588 |
e.preventDefault();
|
6589 |
this.setTLHeight(this._calculateDesiredHeight(e));
|
6590 |
-
}
|
6591 |
|
6592 |
CanvasUserInterface.prototype.resizeStop = function (e) {
|
6593 |
e.preventDefault();
|
@@ -6598,16 +7269,16 @@ N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartS
|
|
6598 |
this.tlHeight = h;
|
6599 |
$.jStorage.set('ssLayersHeight', h);
|
6600 |
$('#n2-admin').triggerHandler('resize');
|
6601 |
-
}
|
6602 |
|
6603 |
CanvasUserInterface.prototype._calculateDesiredHeight = function (e) {
|
6604 |
var h = this.startY - e.clientY + this.height - 48;
|
6605 |
return this.__calculateDesiredHeight(h);
|
6606 |
-
}
|
6607 |
|
6608 |
CanvasUserInterface.prototype.__calculateDesiredHeight = function (h) {
|
6609 |
return Math.round(Math.min(Math.max(40, h), (window.innerHeight || document.documentElement.clientHeight) / 2) / 40) * 40 + 48;
|
6610 |
-
}
|
6611 |
|
6612 |
|
6613 |
CanvasUserInterface.prototype.switchLayerList = function () {
|
@@ -6619,7 +7290,7 @@ N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartS
|
|
6619 |
this.setTLHeight(48);
|
6620 |
}
|
6621 |
$.jStorage.set('ssLayersShown', this.isShown);
|
6622 |
-
}
|
6623 |
|
6624 |
CanvasUserInterface.prototype.setTLHeight = function (h) {
|
6625 |
h = Math.max(48, h);
|
@@ -6629,18 +7300,18 @@ N2Require('CanvasUserInterface', [], ['smartSlider'], function ($, scope, smartS
|
|
6629 |
this.paneRight.height(h - 48);
|
6630 |
|
6631 |
nextend.triggerResize();
|
6632 |
-
}
|
6633 |
|
6634 |
CanvasUserInterface.prototype.activateAdd = function (x, y) {
|
6635 |
this.$add.css({
|
6636 |
left: x,
|
6637 |
top: y
|
6638 |
}).appendTo(this.$container);
|
6639 |
-
}
|
6640 |
|
6641 |
return CanvasUserInterface;
|
6642 |
});
|
6643 |
-
|
6644 |
"use strict";
|
6645 |
|
6646 |
var nameToIndex = {
|
@@ -6652,9 +7323,16 @@ N2Require('LayerFeatures', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6652 |
bottom: 2
|
6653 |
};
|
6654 |
|
6655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6656 |
this.fields = fields;
|
6657 |
-
this.
|
6658 |
|
6659 |
this.initParentLinker();
|
6660 |
this.initAlign();
|
@@ -6713,7 +7391,7 @@ N2Require('LayerFeatures', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6713 |
}
|
6714 |
break;
|
6715 |
}
|
6716 |
-
} else if (this.
|
6717 |
var align = $(e.currentTarget).data('align');
|
6718 |
switch (align) {
|
6719 |
case 'left':
|
@@ -6795,16 +7473,20 @@ N2Require('LayerFeatures', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6795 |
row = $('<div class="n2-editor-header n2-h2 n2-uc"><span>' + headingLabel + '</span></div>');
|
6796 |
|
6797 |
heading.replaceWith(row);
|
6798 |
-
}
|
6799 |
|
6800 |
return LayerFeatures;
|
6801 |
});
|
6802 |
-
|
6803 |
"use strict";
|
6804 |
|
6805 |
-
|
6806 |
-
|
6807 |
-
|
|
|
|
|
|
|
|
|
6808 |
|
6809 |
this.isMinimized = false;
|
6810 |
this.detachedPosition = {
|
@@ -6817,13 +7499,11 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
6817 |
this.lastHeight = this.detachedPosition.height;
|
6818 |
|
6819 |
this.admin = $('#n2-admin');
|
6820 |
-
this.sidebar = $('#n2-ss-layer-window').on('mousedown', $.proxy(
|
6821 |
|
6822 |
this.title = this.sidebar.find('.n2-ss-layer-window-title-inner');
|
6823 |
-
this.sidebarTD = this.sidebar.parent();
|
6824 |
|
6825 |
-
this.
|
6826 |
-
smartSlider.layerWindow = this;
|
6827 |
|
6828 |
this.viewPanes = {
|
6829 |
layerEdit: $('#n2-tabbed-slide-editor-settings > .n2-tabs').addClass('n2-scrollable')
|
@@ -6843,7 +7523,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
6843 |
e.preventDefault();
|
6844 |
e.returnValue = false;
|
6845 |
return false;
|
6846 |
-
}
|
6847 |
|
6848 |
if (!up && this.scrollHeight <= $(this).innerHeight() + this.scrollTop + 1) {
|
6849 |
return prevent();
|
@@ -6879,7 +7559,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
6879 |
e.preventDefault();
|
6880 |
$('#n2-ss-layers-switcher > .n2-labels .n2-td').eq(0).trigger('click');
|
6881 |
$verticalBar.toggleClass('n2-active');
|
6882 |
-
})
|
6883 |
|
6884 |
$('.n2-ss-core-item').on('click', function (e) {
|
6885 |
$verticalBar.removeClass('n2-active');
|
@@ -6904,7 +7584,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
6904 |
|
6905 |
this.detach();
|
6906 |
|
6907 |
-
$('#n2-admin').on('resize', $.proxy(this.resizeVerticalBar, this))
|
6908 |
|
6909 |
$(window).on('resize', $.proxy(this.onResize, this));
|
6910 |
|
@@ -6912,25 +7592,25 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
6912 |
$('.n2-ss-slide-duplicate-layer').on('click', $.proxy(function (e) {
|
6913 |
e.preventDefault();
|
6914 |
this.duplicate();
|
6915 |
-
}, this.
|
6916 |
|
6917 |
$('.n2-ss-slide-delete-layer').on('click', $.proxy(function (e) {
|
6918 |
e.preventDefault();
|
6919 |
this.delete();
|
6920 |
-
}, this.
|
6921 |
|
6922 |
|
6923 |
$('body').on('mousedown', $.proxy(function (e) {
|
6924 |
-
if (
|
6925 |
-
if (
|
6926 |
this.hide();
|
6927 |
}
|
6928 |
}
|
6929 |
}, this));
|
6930 |
|
6931 |
-
var $devicespecific = $('<div id="n2-ss-devicespecific-settings"></div>')
|
|
|
6932 |
|
6933 |
-
var modes = nextend.smartSlider.frontend.responsive.parameters.deviceModes;
|
6934 |
for (var k in modes) {
|
6935 |
if (modes[k]) {
|
6936 |
var mode = k.replace(/([A-Z])/g, ' $1').split(' '),
|
@@ -6957,7 +7637,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
6957 |
$('#n2-ss-devices').find('[data-device="' + $target.data('device') + '"][data-orientation="' + $target.data('orientation') + '"]').trigger('click')
|
6958 |
}, this)
|
6959 |
});
|
6960 |
-
}
|
6961 |
|
6962 |
LayerWindow.prototype.toggleMinimize = function () {
|
6963 |
this.isMinimized = !this.isMinimized;
|
@@ -6965,38 +7645,53 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
6965 |
if (!this.isMinimized) {
|
6966 |
this.onResize();
|
6967 |
}
|
6968 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6969 |
|
6970 |
LayerWindow.prototype.show = function (layer, of) {
|
6971 |
this.setTitle(layer);
|
6972 |
|
6973 |
$('body').addClass('n2-ss-layer-edit-visible');
|
6974 |
-
}
|
6975 |
|
6976 |
LayerWindow.prototype._show = function () {
|
6977 |
$('body').addClass('n2-ss-layer-edit-visible');
|
6978 |
-
}
|
6979 |
|
6980 |
LayerWindow.prototype.hide = function () {
|
6981 |
$('body').removeClass('n2-ss-layer-edit-visible');
|
6982 |
-
}
|
6983 |
|
6984 |
LayerWindow.prototype.isVisible = function () {
|
6985 |
return $('body').hasClass('n2-ss-layer-edit-visible');
|
6986 |
-
}
|
6987 |
|
6988 |
LayerWindow.prototype.hideWithDeferred = function (deferred) {
|
6989 |
if ($('body').hasClass('n2-ss-layer-edit-visible')) {
|
6990 |
this.hide();
|
6991 |
deferred.done($.proxy(this._show, this));
|
6992 |
}
|
6993 |
-
}
|
6994 |
|
6995 |
LayerWindow.prototype.setTitle = function (layer) {
|
6996 |
this.title.html(layer.getName());
|
6997 |
|
6998 |
this.updateGroupTitle(layer);
|
6999 |
-
}
|
7000 |
|
7001 |
LayerWindow.prototype.updateGroupTitle = function (layer) {
|
7002 |
var i;
|
@@ -7006,18 +7701,18 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7006 |
$('<span class="n2-window-title-structure-nav"><span>' + layer.label + '</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>')
|
7007 |
.on({
|
7008 |
mouseenter: $.proxy(function () {
|
7009 |
-
this.
|
7010 |
}, layer),
|
7011 |
mouseleave: $.proxy(function () {
|
7012 |
-
this.
|
7013 |
}, layer),
|
7014 |
click: $.proxy(function (e) {
|
7015 |
-
this.
|
7016 |
this.activate(e);
|
7017 |
}, layer)
|
7018 |
})
|
7019 |
.prependTo(this.$breadcrumb);
|
7020 |
-
if (layer.group && layer.group !== this.
|
7021 |
layer = layer.group;
|
7022 |
} else {
|
7023 |
break;
|
@@ -7025,9 +7720,9 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7025 |
}
|
7026 |
|
7027 |
this.hasBreadcrumb = i > 0;
|
7028 |
-
this.$breadcrumb.toggleClass('n2-has-breadcrumb', this.hasBreadcrumb)
|
7029 |
this.onResize();
|
7030 |
-
}
|
7031 |
|
7032 |
LayerWindow.prototype.getLayerEditExcludedHeight = function () {
|
7033 |
return 85 + (this.hasBreadcrumb ? 23 : 0);
|
@@ -7035,7 +7730,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7035 |
|
7036 |
LayerWindow.prototype.resizeVerticalBar = function () {
|
7037 |
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);
|
7038 |
-
}
|
7039 |
|
7040 |
LayerWindow.prototype.onResize = function () {
|
7041 |
this.sidebar.css('display', 'block');
|
@@ -7068,7 +7763,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7068 |
this.sidebar.css(properties);
|
7069 |
this.sidebar.css('display', '');
|
7070 |
|
7071 |
-
}
|
7072 |
|
7073 |
LayerWindow.prototype.detach = function () {
|
7074 |
|
@@ -7081,7 +7776,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7081 |
this.sidebar.removeClass("n2-sidebar-fixed");
|
7082 |
|
7083 |
this.sidebar
|
7084 |
-
.
|
7085 |
distance: 5,
|
7086 |
handle: ".n2-ss-layer-window-title",
|
7087 |
containment: 'window',
|
@@ -7097,7 +7792,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7097 |
}, this),
|
7098 |
scroll: false
|
7099 |
})
|
7100 |
-
.
|
7101 |
distance: 5,
|
7102 |
handles: "s",
|
7103 |
stop: $.proxy(function (event, ui) {
|
@@ -7106,7 +7801,7 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7106 |
|
7107 |
}, this),
|
7108 |
create: $.proxy(function (e, ui) {
|
7109 |
-
var handle = $(e.target).find('.
|
7110 |
}, this)
|
7111 |
});
|
7112 |
|
@@ -7120,19 +7815,27 @@ N2Require('LayerWindow', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
7120 |
|
7121 |
return LayerWindow;
|
7122 |
});
|
7123 |
-
|
7124 |
"use strict";
|
7125 |
|
|
|
|
|
|
|
|
|
|
|
7126 |
function PositionDisplay() {
|
7127 |
this.currentSource = '';
|
7128 |
-
$(window).ready($.proxy(this.
|
7129 |
}
|
7130 |
|
7131 |
-
|
|
|
|
|
|
|
7132 |
this.$body = $('body');
|
7133 |
this.$el = $('<div class="n2 n2-ss-position-display"/>')
|
7134 |
.appendTo('body');
|
7135 |
-
}
|
7136 |
|
7137 |
PositionDisplay.prototype.show = function (source) {
|
7138 |
if (this.currentSource == '') {
|
@@ -7140,7 +7843,7 @@ N2Require('PositionDisplay', [], ['smartSlider'], function ($, scope, smartSlide
|
|
7140 |
this.$el.addClass('n2-active');
|
7141 |
this.$body.addClass('n2-position-display-active');
|
7142 |
}
|
7143 |
-
}
|
7144 |
|
7145 |
PositionDisplay.prototype.update = function (e, source, html) {
|
7146 |
if (this.currentSource == source) {
|
@@ -7150,7 +7853,7 @@ N2Require('PositionDisplay', [], ['smartSlider'], function ($, scope, smartSlide
|
|
7150 |
top: e.pageY + 10
|
7151 |
});
|
7152 |
}
|
7153 |
-
}
|
7154 |
|
7155 |
PositionDisplay.prototype.hide = function (source) {
|
7156 |
if (this.currentSource == source || source === undefined) {
|
@@ -7159,16 +7862,36 @@ N2Require('PositionDisplay', [], ['smartSlider'], function ($, scope, smartSlide
|
|
7159 |
this.currentSource = '';
|
7160 |
}
|
7161 |
|
7162 |
-
}
|
|
|
7163 |
|
7164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7165 |
|
7166 |
return PositionDisplay;
|
7167 |
});
|
7168 |
-
|
7169 |
"use strict";
|
7170 |
|
7171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7172 |
this.showGuides = 1;
|
7173 |
this.guides = [];
|
7174 |
this.container = $('<div class="n2-ruler-container" />').appendTo('#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container');
|
@@ -7182,7 +7905,6 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7182 |
this.horizontalSpans = $();
|
7183 |
|
7184 |
this.onResize();
|
7185 |
-
nextend.smartSlider.frontend.sliderElement.on('SliderResize', $.proxy(this.onSliderResize, this))
|
7186 |
$(window).on('resize', $.proxy(this.onResize, this));
|
7187 |
|
7188 |
this.horizontal.on('mousedown', $.proxy(function (e) {
|
@@ -7200,7 +7922,7 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7200 |
|
7201 |
|
7202 |
try {
|
7203 |
-
stored = $.extend({vertical: [], horizontal: []}, JSON.parse(Base64.decode(stored)));
|
7204 |
for (var i = 0; i < stored.horizontal.length; i++) {
|
7205 |
var guide = new GuideHorizontal(this, this.horizontal);
|
7206 |
guide.setPosition(stored.horizontal[i]);
|
@@ -7211,34 +7933,28 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7211 |
}
|
7212 |
} catch (e) {
|
7213 |
}
|
7214 |
-
nextend.ruler = this;
|
7215 |
this.measureToolVertical();
|
7216 |
this.measureToolHorizontal();
|
7217 |
}
|
7218 |
|
7219 |
Ruler.prototype.addGuide = function (guide) {
|
7220 |
this.guides.push(guide);
|
7221 |
-
}
|
7222 |
|
7223 |
Ruler.prototype.removeGuide = function (guide) {
|
7224 |
this.guides.splice($.inArray(guide, this.guides), 1);
|
7225 |
-
}
|
7226 |
|
7227 |
Ruler.prototype.clearGuides = function () {
|
7228 |
for (var i = this.guides.length - 1; i >= 0; i--) {
|
7229 |
this.guides[i].delete();
|
7230 |
}
|
7231 |
-
}
|
7232 |
-
|
7233 |
-
Ruler.prototype.onSliderResize = function (e, ratios) {
|
7234 |
-
this.onResize();
|
7235 |
-
}
|
7236 |
|
7237 |
Ruler.prototype.onResize = function () {
|
7238 |
-
var
|
7239 |
-
width =
|
7240 |
-
height =
|
7241 |
-
|
7242 |
|
7243 |
this.container.css({
|
7244 |
width: width + 40,
|
@@ -7264,7 +7980,7 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7264 |
}
|
7265 |
this.verticalSpans = this.verticalSpans.add(mark);
|
7266 |
}
|
7267 |
-
}
|
7268 |
|
7269 |
Ruler.prototype.toArray = function () {
|
7270 |
var data = {
|
@@ -7279,7 +7995,7 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7279 |
}
|
7280 |
}
|
7281 |
return data;
|
7282 |
-
}
|
7283 |
|
7284 |
Ruler.prototype.measureToolVertical = function () {
|
7285 |
var guide = $('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>')
|
@@ -7291,14 +8007,14 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7291 |
if (!guideVisible) {
|
7292 |
guideVisible = true;
|
7293 |
guide.css('display', '');
|
7294 |
-
|
7295 |
}
|
7296 |
}, this),
|
7297 |
hideGuide = $.proxy(function () {
|
7298 |
if (guideVisible) {
|
7299 |
guideVisible = false;
|
7300 |
guide.css('display', 'none');
|
7301 |
-
|
7302 |
}
|
7303 |
}, this);
|
7304 |
this.vertical.on({
|
@@ -7316,7 +8032,7 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7316 |
if (lastY != e.pageY) {
|
7317 |
var pos = e.pageY - offset;
|
7318 |
guide.css('top', pos);
|
7319 |
-
|
7320 |
lastY = e.pageY;
|
7321 |
}
|
7322 |
}
|
@@ -7327,7 +8043,7 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7327 |
hideGuide();
|
7328 |
}, this)
|
7329 |
});
|
7330 |
-
}
|
7331 |
|
7332 |
Ruler.prototype.measureToolHorizontal = function () {
|
7333 |
var guide = $('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>')
|
@@ -7339,14 +8055,14 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7339 |
if (!guideVisible) {
|
7340 |
guideVisible = true;
|
7341 |
guide.css('display', '');
|
7342 |
-
|
7343 |
}
|
7344 |
}, this),
|
7345 |
hideGuide = $.proxy(function () {
|
7346 |
if (guideVisible) {
|
7347 |
guideVisible = false;
|
7348 |
guide.css('display', 'none');
|
7349 |
-
|
7350 |
}
|
7351 |
}, this);
|
7352 |
|
@@ -7365,7 +8081,7 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7365 |
if (lastX != e.pageX) {
|
7366 |
var pos = Math.max(e.pageX - offset, 40);
|
7367 |
guide.css('left', pos);
|
7368 |
-
|
7369 |
lastX = e.pageX;
|
7370 |
}
|
7371 |
}
|
@@ -7376,8 +8092,16 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7376 |
hideGuide();
|
7377 |
}, this)
|
7378 |
});
|
7379 |
-
}
|
7380 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7381 |
function Guide(ruler, container, e) {
|
7382 |
this.ruler = ruler;
|
7383 |
this.container = container;
|
@@ -7388,7 +8112,7 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7388 |
.on('mousedown', $.proxy(function (e) {
|
7389 |
e.preventDefault();
|
7390 |
e.stopPropagation();
|
7391 |
-
if (!
|
7392 |
this.delete();
|
7393 |
}
|
7394 |
}, this));
|
@@ -7398,27 +8122,31 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7398 |
if (e) {
|
7399 |
this.create(e);
|
7400 |
}
|
7401 |
-
|
7402 |
}
|
7403 |
|
7404 |
Guide.prototype._position = function (position, e) {
|
7405 |
return Math.max(0, position);
|
7406 |
-
}
|
7407 |
|
7408 |
Guide.prototype.setPosition = function (position) {
|
7409 |
this.position = position;
|
7410 |
this.refresh();
|
7411 |
-
}
|
7412 |
|
7413 |
Guide.prototype.refresh = function () {
|
7414 |
this.positionRender(this.position);
|
7415 |
-
}
|
7416 |
|
7417 |
Guide.prototype.delete = function () {
|
7418 |
this.ruler.removeGuide(this);
|
7419 |
this.guide.remove();
|
7420 |
-
}
|
7421 |
|
|
|
|
|
|
|
|
|
|
|
7422 |
function GuideHorizontal() {
|
7423 |
Guide.prototype.constructor.apply(this, arguments);
|
7424 |
}
|
@@ -7433,16 +8161,21 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7433 |
|
7434 |
this.position = this._position((e.pageX - offset), e);
|
7435 |
this.positionRender(this.position);
|
7436 |
-
}
|
7437 |
|
7438 |
GuideHorizontal.prototype.rawPositionRender = function (value) {
|
7439 |
this.guide.css('left', Math.max(0, value) + 40);
|
7440 |
-
}
|
7441 |
|
7442 |
GuideHorizontal.prototype.positionRender = function (value) {
|
7443 |
this.guide.css('left', Math.max(0, value) + 40);
|
7444 |
-
}
|
7445 |
|
|
|
|
|
|
|
|
|
|
|
7446 |
function GuideVertical() {
|
7447 |
Guide.prototype.constructor.apply(this, arguments);
|
7448 |
}
|
@@ -7455,25 +8188,35 @@ N2Require('Ruler', [], ['smartSlider'], function ($, scope, smartSlider, undefin
|
|
7455 |
var offset = Math.round(this.container.offset().top) + 40;
|
7456 |
this.position = this._position((e.pageY - offset), e);
|
7457 |
this.positionRender(this.position);
|
7458 |
-
}
|
7459 |
|
7460 |
GuideVertical.prototype.rawPositionRender = function (value) {
|
7461 |
this.guide.css('top', Math.max(0, value) + 40);
|
7462 |
-
}
|
7463 |
|
7464 |
GuideVertical.prototype.positionRender = function (value) {
|
7465 |
this.guide.css('top', Math.max(0, value) + 40);
|
7466 |
-
}
|
7467 |
|
7468 |
return Ruler;
|
7469 |
});
|
7470 |
-
|
7471 |
"use strict";
|
7472 |
-
function CanvasSettings(canvasManager) {
|
7473 |
|
7474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7475 |
|
7476 |
-
this.settings = {}
|
7477 |
var $settings = $('#n2-ss-slide-canvas-settings')
|
7478 |
.on('mouseleave', $.proxy(function () {
|
7479 |
$settings.removeClass('n2-active');
|
@@ -7488,14 +8231,14 @@ N2Require('CanvasSettings', [], ['smartSlider'], function ($, scope, smartSlider
|
|
7488 |
this.snapTo();
|
7489 |
this.roundTo();
|
7490 |
this.colorScheme();
|
7491 |
-
if (!this.
|
7492 |
-
this.
|
7493 |
}
|
7494 |
}
|
7495 |
|
7496 |
CanvasSettings.prototype._addSettings = function (hash, title, _default, cb) {
|
7497 |
this.settings[hash] = parseInt($.jStorage.get(hash, _default));
|
7498 |
-
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) {
|
7499 |
e.preventDefault();
|
7500 |
this.settings[hash] = (this.settings[hash] == 1 ? 0 : 1);
|
7501 |
$.jStorage.set(hash, this.settings[hash]);
|
@@ -7505,18 +8248,18 @@ N2Require('CanvasSettings', [], ['smartSlider'], function ($, scope, smartSlider
|
|
7505 |
|
7506 |
row.toggleClass('n2-setting-enabled', this.settings[hash] == 1);
|
7507 |
cb(this.settings[hash], true);
|
7508 |
-
}
|
7509 |
|
7510 |
CanvasSettings.prototype._addAction = function (title, cb) {
|
7511 |
-
$('<a href="" class="n2-panel-action">' + title + '</a>').on('click', $.proxy(function (e) {
|
7512 |
e.preventDefault();
|
7513 |
cb();
|
7514 |
}, this)).appendTo(this.$settingsPanel);
|
7515 |
-
}
|
7516 |
|
7517 |
CanvasSettings.prototype.get = function (name) {
|
7518 |
return this.settings[name];
|
7519 |
-
}
|
7520 |
|
7521 |
CanvasSettings.prototype.snapTo = function () {
|
7522 |
|
@@ -7525,7 +8268,7 @@ N2Require('CanvasSettings', [], ['smartSlider'], function ($, scope, smartSlider
|
|
7525 |
for (var i = 0; i < layers.length; i++) {
|
7526 |
layers[i].placement.doAction('snap');
|
7527 |
}
|
7528 |
-
}, this.
|
7529 |
};
|
7530 |
|
7531 |
CanvasSettings.prototype.roundTo = function () {
|
@@ -7548,8 +8291,8 @@ N2Require('CanvasSettings', [], ['smartSlider'], function ($, scope, smartSlider
|
|
7548 |
};
|
7549 |
|
7550 |
|
7551 |
-
CanvasSettings.prototype.
|
7552 |
-
|
7553 |
|
7554 |
var editor = $('#n2-ss-slide-canvas-container');
|
7555 |
this._addSettings("n2-ss-ruler-enabled", n2_('Ruler'), 1, $.proxy(function (value) {
|
@@ -7559,7 +8302,7 @@ N2Require('CanvasSettings', [], ['smartSlider'], function ($, scope, smartSlider
|
|
7559 |
|
7560 |
|
7561 |
this._addSettings("n2-ss-show-guides", n2_('Show Guides'), 1, $.proxy(function (value) {
|
7562 |
-
|
7563 |
editor.toggleClass('n2-ss-show-guides', value == 1);
|
7564 |
}, this));
|
7565 |
this._addSettings("n2-ss-lock-guides", n2_('Lock Guides'), 0, $.proxy(function (value) {
|
@@ -7567,31 +8310,31 @@ N2Require('CanvasSettings', [], ['smartSlider'], function ($, scope, smartSlider
|
|
7567 |
}, this));
|
7568 |
|
7569 |
this._addAction('Clear Guides', $.proxy(function () {
|
7570 |
-
|
7571 |
}, this))
|
7572 |
};
|
7573 |
|
7574 |
return CanvasSettings;
|
7575 |
});
|
7576 |
-
|
7577 |
"use strict";
|
7578 |
|
7579 |
var rAFShim = (function () {
|
7580 |
var timeLast = 0;
|
7581 |
|
7582 |
return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
|
7583 |
-
|
7584 |
-
|
7585 |
|
7586 |
-
|
7587 |
-
|
7588 |
-
|
7589 |
-
|
7590 |
|
7591 |
-
|
7592 |
-
|
7593 |
-
|
7594 |
-
|
7595 |
})(),
|
7596 |
resizeCollection = {
|
7597 |
raf: false,
|
@@ -7619,20 +8362,20 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7619 |
};
|
7620 |
|
7621 |
/**
|
|
|
7622 |
*
|
7623 |
* @param placement
|
7624 |
* @param layer
|
7625 |
-
* @param
|
7626 |
* @constructor
|
7627 |
* @augments PlacementAbstract
|
7628 |
-
* @memberof scope
|
7629 |
*/
|
7630 |
-
function PlacementAbsolute(placement, layer,
|
7631 |
this.type = 'absolute';
|
7632 |
|
7633 |
this.transferredProperties = {};
|
7634 |
|
7635 |
-
|
7636 |
|
7637 |
this.doThrottledTheResize = this.doTheResize;
|
7638 |
this._triggerLayerResizedThrottled = NextendThrottle(this._triggerLayerResized, 30);
|
@@ -7642,13 +8385,13 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7642 |
this.children = [];
|
7643 |
}
|
7644 |
|
7645 |
-
PlacementAbsolute.prototype = Object.create(
|
7646 |
PlacementAbsolute.prototype.constructor = PlacementAbsolute;
|
7647 |
|
7648 |
PlacementAbsolute.prototype.start = function () {
|
7649 |
this.$layer = this.layer.layer;
|
7650 |
this.$layerRow = this.layer.layerRow;
|
7651 |
-
}
|
7652 |
|
7653 |
PlacementAbsolute.prototype.preActivation = function (lastPlacement) {
|
7654 |
if (lastPlacement.type == 'normal') {
|
@@ -7657,7 +8400,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7657 |
this.transferredProperties.height = height;
|
7658 |
}
|
7659 |
}
|
7660 |
-
}
|
7661 |
|
7662 |
PlacementAbsolute.prototype.activated = function (properties) {
|
7663 |
var delayedActivate = false,
|
@@ -7674,7 +8417,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7674 |
} else {
|
7675 |
this._activated(properties);
|
7676 |
}
|
7677 |
-
}
|
7678 |
|
7679 |
PlacementAbsolute.prototype.activatedAfterParentReady = function (properties) {
|
7680 |
var parentid = this.$layer.data('parentid');
|
@@ -7696,7 +8439,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7696 |
} else {
|
7697 |
this._activated(properties);
|
7698 |
}
|
7699 |
-
}
|
7700 |
|
7701 |
PlacementAbsolute.prototype._activated = function (properties) {
|
7702 |
this.loadProperties($.extend(properties, this.transferredProperties));
|
@@ -7771,7 +8514,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7771 |
});
|
7772 |
|
7773 |
this.alignMarker.remove();
|
7774 |
-
this.$layer.
|
7775 |
this.$layer.off('.n2-ss-absolute');
|
7776 |
|
7777 |
this.$layer.triggerHandler('LayerUnavailable');
|
@@ -7786,7 +8529,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7786 |
this.chainParent.remove();
|
7787 |
|
7788 |
return historicalData;
|
7789 |
-
}
|
7790 |
|
7791 |
PlacementAbsolute.prototype.loadProperties = function (options) {
|
7792 |
this.layer.createProperty('parentid', null, this.layer.layer, this);
|
@@ -7831,7 +8574,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7831 |
}
|
7832 |
}, this)
|
7833 |
}).appendTo(this.$layer);
|
7834 |
-
}
|
7835 |
|
7836 |
|
7837 |
PlacementAbsolute.prototype.triggerLayerResized = function (isThrottled, ratios) {
|
@@ -7845,8 +8588,8 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7845 |
PlacementAbsolute.prototype._triggerLayerResized = function (isThrottled, ratios) {
|
7846 |
if (!this.layer.isDeleted) {
|
7847 |
this.$layer.triggerHandler('LayerResized', [ratios || {
|
7848 |
-
slideW: this.
|
7849 |
-
slideH: this.
|
7850 |
}, isThrottled || false]);
|
7851 |
}
|
7852 |
};
|
@@ -7864,46 +8607,46 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7864 |
*/
|
7865 |
PlacementAbsolute.prototype.___makeLayerResizeable = function () {
|
7866 |
this._resizableJustClick = false;
|
7867 |
-
this.$layer.
|
7868 |
handles: 'n, e, s, w, ne, se, sw, nw',
|
7869 |
-
_containment: this.
|
7870 |
start: $.proxy(this.____makeLayerResizeableStart, this),
|
7871 |
resize: $.proxy(this.____makeLayerResizeableResize, this),
|
7872 |
stop: $.proxy(this.____makeLayerResizeableStop, this),
|
7873 |
create: $.proxy(function () {
|
7874 |
-
this.$layer.find('.
|
7875 |
mousedown: $.proxy(function (e) {
|
7876 |
this._resizableJustClick = [e.clientX, e.clientY];
|
7877 |
}, this),
|
7878 |
mouseup: $.proxy(function (e) {
|
7879 |
if (this._resizableJustClick && Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0] - e.clientX, 2) + Math.pow(this._resizableJustClick[1] - e.clientY, 2))) < 1) {
|
7880 |
var $target = $(e.currentTarget),
|
7881 |
-
layerFeatures = this.
|
7882 |
-
if ($target.hasClass('
|
7883 |
layerFeatures.horizontalAlign('left', false);
|
7884 |
layerFeatures.verticalAlign('top', false);
|
7885 |
-
} else if ($target.hasClass('
|
7886 |
layerFeatures.horizontalAlign('left', false);
|
7887 |
layerFeatures.verticalAlign('middle', false);
|
7888 |
-
} else if ($target.hasClass('
|
7889 |
layerFeatures.horizontalAlign('left', false);
|
7890 |
layerFeatures.verticalAlign('bottom', false);
|
7891 |
-
} else if ($target.hasClass('
|
7892 |
layerFeatures.horizontalAlign('center', false);
|
7893 |
layerFeatures.verticalAlign('top', false);
|
7894 |
} else if ($target.hasClass('n2-ss-layer-cc')) {
|
7895 |
layerFeatures.horizontalAlign('center', false);
|
7896 |
layerFeatures.verticalAlign('middle', false);
|
7897 |
-
} else if ($target.hasClass('
|
7898 |
layerFeatures.horizontalAlign('center', false);
|
7899 |
layerFeatures.verticalAlign('bottom', false);
|
7900 |
-
} else if ($target.hasClass('
|
7901 |
layerFeatures.horizontalAlign('right', false);
|
7902 |
layerFeatures.verticalAlign('top', false);
|
7903 |
-
} else if ($target.hasClass('
|
7904 |
layerFeatures.horizontalAlign('right', false);
|
7905 |
layerFeatures.verticalAlign('middle', false);
|
7906 |
-
} else if ($target.hasClass('
|
7907 |
layerFeatures.horizontalAlign('right', false);
|
7908 |
layerFeatures.verticalAlign('bottom', false);
|
7909 |
}
|
@@ -7914,16 +8657,16 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7914 |
}, this),
|
7915 |
smartguides: $.proxy(function () {
|
7916 |
this.$layer.triggerHandler('LayerParent');
|
7917 |
-
return this.
|
7918 |
}, this),
|
7919 |
tolerance: 5
|
7920 |
})
|
7921 |
.on({
|
7922 |
'mousedown.n2-ss-absolute': $.proxy(function (e) {
|
7923 |
-
if (!this.layer.status !=
|
7924 |
-
|
7925 |
|
7926 |
-
|
7927 |
|
7928 |
}
|
7929 |
if (document.activeElement) {
|
@@ -7931,7 +8674,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7931 |
}
|
7932 |
}, this),
|
7933 |
'mouseup.n2-ss-absolute': $.proxy(function (e) {
|
7934 |
-
|
7935 |
}, this)
|
7936 |
});
|
7937 |
};
|
@@ -7939,19 +8682,19 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7939 |
PlacementAbsolute.prototype.____makeLayerResizeableStart = function (event, ui) {
|
7940 |
this.preventActivation = true;
|
7941 |
this.resizableDeferred = $.Deferred();
|
7942 |
-
this.
|
7943 |
$('body').addClass('n2-ss-resize-layer');
|
7944 |
if (this._resizableJustClick) {
|
7945 |
this._resizableJustClick = false;
|
7946 |
}
|
7947 |
this.____makeLayerResizeableResize(event, ui);
|
7948 |
-
|
7949 |
};
|
7950 |
|
7951 |
PlacementAbsolute.prototype.____makeLayerResizeableResize = function (e, ui) {
|
7952 |
|
7953 |
|
7954 |
-
|
7955 |
|
7956 |
this.triggerLayerResized();
|
7957 |
};
|
@@ -7978,8 +8721,8 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7978 |
}
|
7979 |
}
|
7980 |
|
7981 |
-
var ratioSizeH = this.
|
7982 |
-
ratioSizeV = this.
|
7983 |
|
7984 |
if (!parseInt(this.layer.getProperty('responsivesize'))) {
|
7985 |
ratioSizeH = ratioSizeV = 1;
|
@@ -7999,13 +8742,13 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7999 |
|
8000 |
this.$layer.triggerHandler('LayerUnParent');
|
8001 |
|
8002 |
-
|
8003 |
|
8004 |
setTimeout($.proxy(function () {
|
8005 |
this.preventActivation = false;
|
8006 |
}, this), 80);
|
8007 |
|
8008 |
-
//this.
|
8009 |
};
|
8010 |
//</editor-fold>
|
8011 |
|
@@ -8038,7 +8781,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8038 |
height = this.layer.getProperty('height');
|
8039 |
}
|
8040 |
|
8041 |
-
var task =
|
8042 |
if (task) {
|
8043 |
task.setValues({
|
8044 |
align: this.layer.getRawProperty('align'),
|
@@ -8057,7 +8800,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8057 |
});
|
8058 |
}
|
8059 |
|
8060 |
-
|
8061 |
|
8062 |
this.layer.store('width', width, true, 'layer');
|
8063 |
this.layer.$.trigger('propertyChanged', ['width', width]);
|
@@ -8077,7 +8820,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8077 |
this.layer.store('top', top, true, 'layer');
|
8078 |
this.layer.$.trigger('propertyChanged', ['top', top]);
|
8079 |
|
8080 |
-
|
8081 |
|
8082 |
};
|
8083 |
|
@@ -8093,10 +8836,10 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8093 |
this.layer.historyStore(values.top, 'top', mode);
|
8094 |
|
8095 |
this.triggerLayerResized();
|
8096 |
-
}
|
8097 |
|
8098 |
PlacementAbsolute.prototype.calculatePositionLeft = function (align, left) {
|
8099 |
-
var ratioH = this.
|
8100 |
|
8101 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8102 |
ratioH = 1;
|
@@ -8140,7 +8883,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8140 |
left = -Math.round((p.left - left) * (1 / ratioH));
|
8141 |
break;
|
8142 |
case 'center':
|
8143 |
-
left = -Math.round((p.left - left - this.$layer.width() / 2) * (1 / ratioH))
|
8144 |
break;
|
8145 |
case 'right':
|
8146 |
left = -Math.round((p.left - left - this.$layer.width()) * (1 / ratioH));
|
@@ -8148,11 +8891,11 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8148 |
}
|
8149 |
|
8150 |
return left;
|
8151 |
-
}
|
8152 |
|
8153 |
|
8154 |
PlacementAbsolute.prototype.calculatePositionTop = function (valign, top) {
|
8155 |
-
var ratioV = this.
|
8156 |
|
8157 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8158 |
ratioV = 1;
|
@@ -8204,7 +8947,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8204 |
}
|
8205 |
|
8206 |
return top;
|
8207 |
-
}
|
8208 |
|
8209 |
PlacementAbsolute.prototype.moveX = function (x) {
|
8210 |
|
@@ -8223,7 +8966,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8223 |
this.layer.store('left', left, true);
|
8224 |
this.layer.$.trigger('propertyChanged', ['left', left]);
|
8225 |
|
8226 |
-
}
|
8227 |
|
8228 |
PlacementAbsolute.prototype.setPositionTop = function (top) {
|
8229 |
|
@@ -8231,12 +8974,12 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8231 |
|
8232 |
this.layer.store('top', top, true);
|
8233 |
this.layer.$.trigger('propertyChanged', ['top', top]);
|
8234 |
-
}
|
8235 |
|
8236 |
PlacementAbsolute.prototype.setPosition = function (left, top) {
|
8237 |
this.setPositionLeft(left);
|
8238 |
this.setPositionTop(top);
|
8239 |
-
}
|
8240 |
|
8241 |
PlacementAbsolute.prototype.setDeviceBasedAlign = function () {
|
8242 |
var mode = this.layer.getMode();
|
@@ -8253,7 +8996,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8253 |
PlacementAbsolute.prototype.setPropertyresponsiveposition =
|
8254 |
PlacementAbsolute.prototype.setPropertyresponsivesize = function (name, value, from) {
|
8255 |
this.layer._setProperty(name, parseInt(value), from);
|
8256 |
-
}
|
8257 |
|
8258 |
|
8259 |
PlacementAbsolute.prototype.setPropertywidth =
|
@@ -8270,7 +9013,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8270 |
}, this), 50);
|
8271 |
|
8272 |
this.layer._setProperty(name, v, from);
|
8273 |
-
}
|
8274 |
|
8275 |
PlacementAbsolute.prototype.setPropertyleft =
|
8276 |
PlacementAbsolute.prototype.setPropertytop = function (name, value, from) {
|
@@ -8279,7 +9022,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8279 |
this.layer.$.trigger('propertyChanged', [name, v]);
|
8280 |
}
|
8281 |
this.layer._setProperty(name, v, from);
|
8282 |
-
}
|
8283 |
|
8284 |
PlacementAbsolute.prototype.render = function (name) {
|
8285 |
this['_sync' + name]();
|
@@ -8299,8 +9042,8 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8299 |
|
8300 |
PlacementAbsolute.prototype.onResize = function (isForced) {
|
8301 |
this.resize({
|
8302 |
-
slideW: this.
|
8303 |
-
slideH: this.
|
8304 |
}, isForced);
|
8305 |
};
|
8306 |
|
@@ -8336,7 +9079,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8336 |
|
8337 |
if (!this.layer.isDimensionPropertyAccepted(value)) {
|
8338 |
if (parseInt(this.layer.getProperty('responsivesize'))) {
|
8339 |
-
var ratio = this.
|
8340 |
value = (value * ratio);
|
8341 |
}
|
8342 |
value += 'px';
|
@@ -8349,7 +9092,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8349 |
var value = this.layer.getProperty('height');
|
8350 |
if (!this.layer.isDimensionPropertyAccepted(value)) {
|
8351 |
if (parseInt(this.layer.getProperty('responsivesize'))) {
|
8352 |
-
var ratio = this.
|
8353 |
value = (value * ratio);
|
8354 |
}
|
8355 |
value += 'px';
|
@@ -8381,7 +9124,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8381 |
var value = this.layer.getProperty('left');
|
8382 |
|
8383 |
if (parseInt(this.layer.getProperty('responsiveposition'))) {
|
8384 |
-
var ratio = this.
|
8385 |
value = (value * ratio);
|
8386 |
}
|
8387 |
|
@@ -8450,7 +9193,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8450 |
var value = this.layer.getProperty('top');
|
8451 |
|
8452 |
if (parseInt(this.layer.getProperty('responsiveposition'))) {
|
8453 |
-
var ratio = this.
|
8454 |
value = (value * ratio);
|
8455 |
}
|
8456 |
|
@@ -8531,17 +9274,17 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8531 |
this.layer.render(prop, null, 'history');
|
8532 |
this.layer.render(prop2, null, 'history');
|
8533 |
}
|
8534 |
-
}
|
8535 |
|
8536 |
PlacementAbsolute.prototype.setPropertyalign = function (name, value, from) {
|
8537 |
var oldValue = this.layer.getProperty(name),
|
8538 |
oldLeft = this.layer.getRawProperty('left');
|
8539 |
|
8540 |
-
|
8541 |
this.layer._setProperty(name, value, from);
|
8542 |
-
|
8543 |
|
8544 |
-
var task =
|
8545 |
if (task) {
|
8546 |
task.setValues({
|
8547 |
value: oldValue,
|
@@ -8551,17 +9294,17 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8551 |
value2: this.layer.getRawProperty('left')
|
8552 |
});
|
8553 |
}
|
8554 |
-
}
|
8555 |
|
8556 |
PlacementAbsolute.prototype.setPropertyvalign = function (name, value, from) {
|
8557 |
var oldValue = this.layer.getProperty(name),
|
8558 |
oldTop = this.layer.getRawProperty('top');
|
8559 |
|
8560 |
-
|
8561 |
this.layer._setProperty(name, value, from);
|
8562 |
-
|
8563 |
|
8564 |
-
var task =
|
8565 |
if (task) {
|
8566 |
task.setValues({
|
8567 |
value: oldValue,
|
@@ -8571,7 +9314,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8571 |
value2: this.layer.getRawProperty('top')
|
8572 |
});
|
8573 |
}
|
8574 |
-
}
|
8575 |
|
8576 |
PlacementAbsolute.prototype._syncalign = function (oldValue, from) {
|
8577 |
var value = this.layer.getProperty('align');
|
@@ -8605,7 +9348,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8605 |
this.layer.setProperty('height', 'auto', 'layer');
|
8606 |
|
8607 |
var layerWidth = this.$layer.width();
|
8608 |
-
if (Math.abs(this.
|
8609 |
this.layer.setProperty('width', layerWidth, 'layer');
|
8610 |
}
|
8611 |
}
|
@@ -8623,15 +9366,15 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8623 |
|
8624 |
PlacementAbsolute.prototype.changeStatus = function (oldStatus, newStatus) {
|
8625 |
|
8626 |
-
if (oldStatus ==
|
8627 |
-
this.layer.
|
8628 |
}
|
8629 |
|
8630 |
|
8631 |
-
if (newStatus ==
|
8632 |
-
this.$layer.
|
8633 |
}
|
8634 |
-
}
|
8635 |
|
8636 |
PlacementAbsolute.prototype.getParent = function () {
|
8637 |
return $('#' + this.layer.getProperty('parentid')).data('layerObject');
|
@@ -8705,11 +9448,11 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8705 |
|
8706 |
PlacementAbsolute.prototype.addChild = function (childPlacement) {
|
8707 |
this.children.push(childPlacement);
|
8708 |
-
}
|
8709 |
|
8710 |
PlacementAbsolute.prototype.removeChild = function (childPlacement) {
|
8711 |
this.children.splice($.inArray(childPlacement, this.children), 1);
|
8712 |
-
}
|
8713 |
|
8714 |
PlacementAbsolute.prototype.unlink = function (e) {
|
8715 |
if (e) e.preventDefault();
|
@@ -8758,7 +9501,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8758 |
PlacementAbsolute.prototype.snap = function () {
|
8759 |
this.$layer.nextendResizable("option", "smartguides", $.proxy(function () {
|
8760 |
this.$layer.triggerHandler('LayerParent');
|
8761 |
-
return this.
|
8762 |
}, this));
|
8763 |
};
|
8764 |
|
@@ -8802,7 +9545,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8802 |
} else {
|
8803 |
left = this.$layer.parent().width() / 2;
|
8804 |
}
|
8805 |
-
var ratio = this.
|
8806 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8807 |
ratio = 1;
|
8808 |
}
|
@@ -8816,7 +9559,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8816 |
} else {
|
8817 |
top = this.$layer.parent().height() / 2;
|
8818 |
}
|
8819 |
-
var ratio = this.
|
8820 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8821 |
ratio = 1;
|
8822 |
}
|
@@ -8831,11 +9574,11 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8831 |
index = 0;
|
8832 |
}
|
8833 |
return index;
|
8834 |
-
}
|
8835 |
|
8836 |
PlacementAbsolute.prototype.renderIndex = function (index) {
|
8837 |
//this.layer.layer.css('zIndex', index + 1);
|
8838 |
-
}
|
8839 |
|
8840 |
PlacementAbsolute.prototype.sync = function () {
|
8841 |
|
@@ -8849,7 +9592,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8849 |
|
8850 |
this._syncparentid();
|
8851 |
|
8852 |
-
}
|
8853 |
|
8854 |
PlacementAbsolute.prototype.delete = function () {
|
8855 |
|
@@ -8857,117 +9600,118 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8857 |
if (parentId) {
|
8858 |
this.unSubscribeParent('delete');
|
8859 |
}
|
8860 |
-
}
|
8861 |
|
8862 |
PlacementAbsolute.prototype.isParentOrChild = function () {
|
8863 |
return this.parent || this.children.length > 0;
|
8864 |
-
}
|
8865 |
|
8866 |
return PlacementAbsolute;
|
8867 |
});
|
8868 |
-
|
8869 |
"use strict";
|
8870 |
|
8871 |
/**
|
|
|
8872 |
*
|
8873 |
-
* @alias scope.PlacementContent
|
8874 |
* @param placement
|
8875 |
* @param layer
|
8876 |
-
* @param
|
8877 |
* @constructor
|
8878 |
*/
|
8879 |
-
function PlacementContent(placement, layer,
|
8880 |
this.type = 'content';
|
8881 |
|
8882 |
-
|
8883 |
}
|
8884 |
|
8885 |
-
PlacementContent.prototype = Object.create(
|
8886 |
PlacementContent.prototype.constructor = PlacementContent;
|
8887 |
|
8888 |
return PlacementContent;
|
8889 |
});
|
8890 |
-
|
8891 |
"use strict";
|
8892 |
|
8893 |
/**
|
|
|
8894 |
*
|
8895 |
-
* @alias scope.PlacementDefault
|
8896 |
* @param placement
|
8897 |
* @param layer
|
8898 |
-
* @param
|
8899 |
* @constructor
|
8900 |
*/
|
8901 |
-
function PlacementDefault(placement, layer,
|
8902 |
this.type = 'default';
|
8903 |
|
8904 |
-
|
8905 |
}
|
8906 |
|
8907 |
-
PlacementDefault.prototype = Object.create(
|
8908 |
PlacementDefault.prototype.constructor = PlacementDefault;
|
8909 |
|
8910 |
PlacementDefault.prototype.start = function () {
|
8911 |
this.$layer = this.layer.layer;
|
8912 |
-
}
|
8913 |
|
8914 |
|
8915 |
PlacementDefault.prototype.activated = function (properties) {
|
8916 |
|
8917 |
this.startUISizing();
|
8918 |
-
}
|
8919 |
|
8920 |
PlacementDefault.prototype.deActivated = function (newMode) {
|
8921 |
-
this.$layer.
|
8922 |
-
}
|
8923 |
|
8924 |
PlacementDefault.prototype.startUISizing = function () {
|
8925 |
var needSize = false;
|
8926 |
if (this.layer.item && this.layer.item.needSize) {
|
8927 |
needSize = true;
|
8928 |
}
|
8929 |
-
this.$layer.
|
8930 |
start: $.proxy(function (e, prop) {
|
8931 |
-
|
8932 |
-
if (prop
|
8933 |
-
this.layer.layer.
|
8934 |
}
|
8935 |
}, this),
|
8936 |
resizeMaxWidth: $.proxy(function (e, ui) {
|
8937 |
|
8938 |
-
|
8939 |
|
8940 |
}, this),
|
8941 |
stopMaxWidth: $.proxy(function (e, ui) {
|
8942 |
-
|
8943 |
this.layer.setProperty('maxwidth', ui.value);
|
8944 |
}, this)
|
8945 |
});
|
8946 |
-
}
|
8947 |
|
8948 |
return PlacementDefault;
|
8949 |
});
|
8950 |
-
|
8951 |
"use strict";
|
8952 |
|
8953 |
/**
|
|
|
8954 |
*
|
8955 |
* @param placement
|
8956 |
* @param layer
|
8957 |
-
* @param
|
8958 |
* @constructor
|
8959 |
* @augments PlacementAbstract
|
8960 |
-
|
8961 |
*/
|
8962 |
-
function PlacementNormal(placement, layer,
|
8963 |
this.type = 'normal';
|
8964 |
|
8965 |
this.transferredProperties = {};
|
8966 |
|
8967 |
-
|
8968 |
}
|
8969 |
|
8970 |
-
PlacementNormal.prototype = Object.create(
|
8971 |
PlacementNormal.prototype.constructor = PlacementNormal;
|
8972 |
|
8973 |
PlacementNormal.prototype.start = function () {
|
@@ -9021,7 +9765,7 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9021 |
];
|
9022 |
|
9023 |
$layer
|
9024 |
-
.
|
9025 |
.removeAttr('data-cssselfalign')
|
9026 |
.css({
|
9027 |
position: '',
|
@@ -9050,10 +9794,10 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9050 |
|
9051 |
PlacementNormal.prototype.deActivated = function (newMode) {
|
9052 |
this.layer.$.off('.placementnormal');
|
9053 |
-
this.$layer.
|
9054 |
-
this.$layer.
|
9055 |
|
9056 |
-
this.layer.layer.
|
9057 |
this.layer.layer.removeAttr('data-cssselfalign');
|
9058 |
|
9059 |
var properties = ['margin', 'height', 'maxwidth', 'selfalign'],
|
@@ -9094,11 +9838,11 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9094 |
this.layer.layer.css('margin', margin);
|
9095 |
this.layer.update();
|
9096 |
|
9097 |
-
this.$layer.
|
9098 |
};
|
9099 |
|
9100 |
PlacementNormal.prototype.startUISpacing = function () {
|
9101 |
-
this.$layer.
|
9102 |
mode: 'margin',
|
9103 |
sync: {
|
9104 |
n: 'margin-top',
|
@@ -9108,7 +9852,7 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9108 |
},
|
9109 |
handles: 'n, s, e, w',
|
9110 |
start: $.proxy(function (e, ui) {
|
9111 |
-
|
9112 |
}, this),
|
9113 |
spacing: $.proxy(function (e, ui) {
|
9114 |
var html = '';
|
@@ -9116,20 +9860,20 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9116 |
html += 'Margin ' + k + ': ' + ui.changed[k] + 'px<br>';
|
9117 |
}
|
9118 |
|
9119 |
-
|
9120 |
}, this),
|
9121 |
stop: $.proxy(this.onSpacingStop, this),
|
9122 |
});
|
9123 |
};
|
9124 |
|
9125 |
PlacementNormal.prototype.onSpacingStop = function (event, ui) {
|
9126 |
-
|
9127 |
var margin = this.layer.getProperty('margin').split('|*|'),
|
9128 |
ratioH = 1,
|
9129 |
ratioV = 1;
|
9130 |
if (margin[margin.length - 1] == 'px+' && Math.abs(parseFloat(this.$layer.css('fontSize')) - this.layer.baseSize) > 1) {
|
9131 |
-
ratioH = this.
|
9132 |
-
ratioV = this.
|
9133 |
}
|
9134 |
|
9135 |
for (var k in ui.changed) {
|
@@ -9158,39 +9902,39 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9158 |
if (this.layer.item && this.layer.item.needSize) {
|
9159 |
needSize = true;
|
9160 |
}
|
9161 |
-
this.$layer.
|
9162 |
height: needSize,
|
9163 |
syncWidth: true,
|
9164 |
start: $.proxy(function (e, prop) {
|
9165 |
-
|
9166 |
-
if (prop
|
9167 |
-
this.layer.layer.
|
9168 |
}
|
9169 |
}, this),
|
9170 |
resizeMaxWidth: $.proxy(function (e, ui) {
|
9171 |
-
|
9172 |
|
9173 |
}, this),
|
9174 |
stopMaxWidth: $.proxy(function (e, ui) {
|
9175 |
-
|
9176 |
this.layer.setProperty('maxwidth', ui.value);
|
9177 |
}, this),
|
9178 |
resizeHeight: $.proxy(function (e, ui) {
|
9179 |
-
|
9180 |
|
9181 |
}, this),
|
9182 |
stopHeight: $.proxy(function (e, ui) {
|
9183 |
-
|
9184 |
var ratio = 1;
|
9185 |
if (parseInt(this.$layer.css('fontSize')) != this.layer.baseSize) {
|
9186 |
-
ratio = this.
|
9187 |
}
|
9188 |
var value = Math.round(value / ratio);
|
9189 |
|
9190 |
this.layer.setProperty('height', ui.value);
|
9191 |
}, this)
|
9192 |
});
|
9193 |
-
}
|
9194 |
|
9195 |
PlacementNormal.prototype._syncheight = function () {
|
9196 |
var height = parseInt(this.layer.getProperty('height'));
|
@@ -9216,10 +9960,10 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9216 |
var value = parseInt(this.layer.getProperty('maxwidth'));
|
9217 |
if (value <= 0 || isNaN(value)) {
|
9218 |
this.layer.layer.css('maxWidth', '')
|
9219 |
-
.
|
9220 |
} else {
|
9221 |
this.layer.layer.css('maxWidth', value + 'px')
|
9222 |
-
.
|
9223 |
}
|
9224 |
|
9225 |
this.layer.update();
|
@@ -9227,27 +9971,28 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9227 |
|
9228 |
PlacementNormal.prototype._syncselfalign = function () {
|
9229 |
this.layer.layer.attr('data-cssselfalign', this.layer.getProperty('selfalign'));
|
9230 |
-
}
|
9231 |
|
9232 |
PlacementNormal.prototype.sync = function () {
|
9233 |
this._syncmargin();
|
9234 |
this._syncheight();
|
9235 |
this._syncmaxwidth();
|
9236 |
-
}
|
9237 |
|
9238 |
return PlacementNormal;
|
9239 |
});
|
9240 |
-
|
9241 |
"use strict";
|
9242 |
|
9243 |
/**
|
9244 |
-
* @
|
|
|
9245 |
* @param layer
|
9246 |
* @constructor
|
9247 |
*/
|
9248 |
function Placement(layer) {
|
9249 |
this.layer = layer;
|
9250 |
-
this.
|
9251 |
this.modes = {};
|
9252 |
this.current = null;
|
9253 |
this.isTransferHandled = false;
|
@@ -9258,28 +10003,28 @@ N2Require('Placement', [], [], function ($, scope, undefined) {
|
|
9258 |
Placement.prototype.allow = function (mode) {
|
9259 |
switch (mode) {
|
9260 |
case 'absolute':
|
9261 |
-
this.modes.absolute = new
|
9262 |
break;
|
9263 |
case 'normal':
|
9264 |
-
this.modes.normal = new
|
9265 |
break;
|
9266 |
case 'group':
|
9267 |
-
this.modes.absolute = new
|
9268 |
break;
|
9269 |
case 'content':
|
9270 |
-
this.modes.absolute = new
|
9271 |
break;
|
9272 |
case 'default':
|
9273 |
-
this.modes['default'] = new
|
9274 |
break;
|
9275 |
}
|
9276 |
-
}
|
9277 |
|
9278 |
Placement.prototype.start = function () {
|
9279 |
for (var k in this.modes) {
|
9280 |
this.modes[k].start();
|
9281 |
}
|
9282 |
-
}
|
9283 |
|
9284 |
Placement.prototype.setMode = function (mode, properties) {
|
9285 |
var historicalData = false;
|
@@ -9304,7 +10049,7 @@ N2Require('Placement', [], [], function ($, scope, undefined) {
|
|
9304 |
throw new Exception('Layer placement(' + mode + ') not allowed for the container', this.layer);
|
9305 |
}
|
9306 |
return historicalData;
|
9307 |
-
}
|
9308 |
|
9309 |
Placement.prototype.doAction = function (action) {
|
9310 |
try {
|
@@ -9312,37 +10057,37 @@ N2Require('Placement', [], [], function ($, scope, undefined) {
|
|
9312 |
} catch (e) {
|
9313 |
|
9314 |
}
|
9315 |
-
}
|
9316 |
|
9317 |
Placement.prototype.getType = function () {
|
9318 |
return this.current.type;
|
9319 |
-
}
|
9320 |
|
9321 |
Placement.prototype.onResize = function (isForced) {
|
9322 |
if (typeof this.current.onResize == 'function') {
|
9323 |
this.current.onResize(isForced);
|
9324 |
}
|
9325 |
-
}
|
9326 |
|
9327 |
Placement.prototype.updatePosition = function () {
|
9328 |
this.current.updatePosition();
|
9329 |
-
}
|
9330 |
|
9331 |
Placement.prototype.getIndex = function () {
|
9332 |
return this.current.getIndex();
|
9333 |
-
}
|
9334 |
|
9335 |
Placement.prototype.renderIndex = function (index) {
|
9336 |
return this.current.renderIndex(index);
|
9337 |
-
}
|
9338 |
|
9339 |
Placement.prototype.doLinearResize = function (ratios) {
|
9340 |
this.current.doLinearResize(ratios);
|
9341 |
-
}
|
9342 |
|
9343 |
Placement.prototype.sync = function () {
|
9344 |
this.current.sync();
|
9345 |
-
}
|
9346 |
|
9347 |
Placement.prototype.renderModeProperties = function (isReset) {
|
9348 |
|
@@ -9350,112 +10095,119 @@ N2Require('Placement', [], [], function ($, scope, undefined) {
|
|
9350 |
this.layer.adjustFontSize(this.layer.getProperty('adaptivefont'), fontSize, false);
|
9351 |
|
9352 |
this.current._renderModeProperties(isReset);
|
9353 |
-
}
|
9354 |
|
9355 |
Placement.prototype.delete = function () {
|
9356 |
this.current.delete();
|
9357 |
-
}
|
9358 |
|
9359 |
return Placement;
|
9360 |
});
|
9361 |
-
|
9362 |
"use strict";
|
9363 |
|
9364 |
/**
|
9365 |
-
* @
|
|
|
9366 |
* @param placement
|
9367 |
* @param {ComponentAbstract} layer
|
9368 |
-
* @param
|
9369 |
* @constructor
|
9370 |
*/
|
9371 |
-
function PlacementAbstract(placement, layer,
|
9372 |
this.placement = placement;
|
9373 |
/**
|
9374 |
* @type {ComponentAbstract}
|
9375 |
*/
|
9376 |
this.layer = layer;
|
9377 |
-
this.
|
9378 |
}
|
9379 |
|
9380 |
PlacementAbstract.prototype.start = function () {
|
9381 |
|
9382 |
-
}
|
9383 |
|
9384 |
PlacementAbstract.prototype.preActivation = function (lastPlacement) {
|
9385 |
|
9386 |
-
}
|
9387 |
|
9388 |
PlacementAbstract.prototype.activated = function () {
|
9389 |
|
9390 |
-
}
|
9391 |
|
9392 |
PlacementAbstract.prototype.deActivated = function (newMode) {
|
9393 |
|
9394 |
return false;
|
9395 |
-
}
|
9396 |
|
9397 |
PlacementAbstract.prototype.updatePosition = function () {
|
9398 |
this.layer.group.update();
|
9399 |
-
}
|
9400 |
|
9401 |
PlacementAbstract.prototype._renderModeProperties = function (isReset) {
|
9402 |
|
9403 |
-
}
|
9404 |
|
9405 |
PlacementAbstract.prototype._hide = function () {
|
9406 |
};
|
9407 |
|
9408 |
PlacementAbstract.prototype._show = function () {
|
9409 |
-
}
|
9410 |
|
9411 |
PlacementAbstract.prototype.snap = function () {
|
9412 |
return false;
|
9413 |
-
}
|
9414 |
|
9415 |
PlacementAbstract.prototype.getIndex = function () {
|
9416 |
return this.layer.layer.index();
|
9417 |
-
}
|
9418 |
|
9419 |
PlacementAbstract.prototype.renderIndex = function (index) {
|
9420 |
|
9421 |
-
}
|
9422 |
|
9423 |
PlacementAbstract.prototype.doLinearResize = function (ratios) {
|
9424 |
};
|
9425 |
|
9426 |
PlacementAbstract.prototype.sync = function () {
|
9427 |
|
9428 |
-
}
|
9429 |
|
9430 |
PlacementAbstract.prototype.delete = function () {
|
9431 |
-
}
|
9432 |
|
9433 |
|
9434 |
PlacementAbstract.prototype.triggerLayerResized = function (isThrottled, ratios) {
|
9435 |
|
9436 |
-
}
|
9437 |
|
9438 |
PlacementAbstract.prototype.changeStatus = function (oldStatus, newStatus) {
|
9439 |
|
9440 |
-
}
|
9441 |
|
9442 |
return PlacementAbstract;
|
9443 |
});
|
9444 |
-
|
9445 |
"use strict";
|
9446 |
|
9447 |
/**
|
|
|
|
|
9448 |
* @constructor
|
9449 |
-
* @memberof scope
|
9450 |
*/
|
9451 |
function Item($item, layer, itemEditor) {
|
9452 |
-
|
9453 |
if (this.type === undefined) {
|
9454 |
this.type = $item.data('item');
|
9455 |
}
|
9456 |
|
9457 |
this.needSize = this.constructor.needSize;
|
9458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9459 |
this.self = this;
|
9460 |
this.$item = $item;
|
9461 |
this.layer = layer;
|
@@ -9471,7 +10223,7 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9471 |
this.values = $.parseJSON(this.values);
|
9472 |
}
|
9473 |
|
9474 |
-
this.pre = 'div#' +
|
9475 |
this.defaultValues = itemEditor.getItemForm(this.type).values;
|
9476 |
|
9477 |
this.added();
|
@@ -9489,7 +10241,7 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9489 |
|
9490 |
|
9491 |
$('<div/>')
|
9492 |
-
.addClass('
|
9493 |
.css('zIndex', 89)
|
9494 |
.appendTo(this.$item);
|
9495 |
|
@@ -9542,7 +10294,7 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9542 |
|
9543 |
Item.prototype.render = function (data, originalData) {
|
9544 |
this.layer.layer.triggerHandler('itemRender');
|
9545 |
-
this.$item.html('')
|
9546 |
|
9547 |
this.parseAll(data);
|
9548 |
this._render(data);
|
@@ -9551,7 +10303,7 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9551 |
this.itemEditor.lastValues[this.type] = this.values = originalData;
|
9552 |
|
9553 |
$('<div/>')
|
9554 |
-
.addClass('
|
9555 |
.css('zIndex', 89)
|
9556 |
.appendTo(this.$item);
|
9557 |
|
@@ -9593,7 +10345,7 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9593 |
var item = '';
|
9594 |
if (base64) {
|
9595 |
|
9596 |
-
item = '[' + this.type + ' values="' + Base64.encode(JSON.stringify(this.values)) + '"]';
|
9597 |
} else {
|
9598 |
item = $('<div class="n2-ss-item n2-ss-item-' + this.type + '"></div>')
|
9599 |
.attr('data-item', this.type)
|
@@ -9668,7 +10420,7 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9668 |
|
9669 |
for (var i = 0; i < this.needFill.length; i++) {
|
9670 |
if (typeof data[this.needFill[i]] !== 'undefined') {
|
9671 |
-
data[this.needFill[i]] =
|
9672 |
}
|
9673 |
}
|
9674 |
};
|
@@ -9678,32 +10430,32 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9678 |
};
|
9679 |
|
9680 |
Item.prototype.resizeLayerToImage = function (image) {
|
9681 |
-
var layer = this.layer
|
9682 |
-
|
9683 |
-
|
9684 |
-
|
9685 |
-
|
9686 |
-
|
9687 |
-
|
9688 |
-
|
9689 |
-
|
9690 |
-
|
9691 |
-
|
9692 |
-
|
9693 |
-
|
9694 |
-
|
9695 |
-
|
9696 |
-
|
9697 |
-
|
9698 |
-
|
9699 |
-
|
|
|
|
|
|
|
|
|
|
|
9700 |
}
|
9701 |
-
|
9702 |
-
layer.setProperty('width', width);
|
9703 |
-
layer.setProperty('height', 'auto');
|
9704 |
-
nextend.smartSlider.history.on();
|
9705 |
-
}
|
9706 |
-
});
|
9707 |
};
|
9708 |
|
9709 |
Item.prototype.fitLayer = function (item) {
|
@@ -9712,15 +10464,22 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9712 |
|
9713 |
return Item;
|
9714 |
});
|
9715 |
-
|
9716 |
"use strict";
|
9717 |
|
9718 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9719 |
this.suppressChange = false;
|
9720 |
|
9721 |
this.activeItemOriginalData = null;
|
9722 |
|
9723 |
-
this.
|
9724 |
|
9725 |
this.lastValues = {};
|
9726 |
|
@@ -9730,10 +10489,11 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9730 |
this.activeForm = false;
|
9731 |
|
9732 |
if (!options.isUploadDisabled) {
|
9733 |
-
|
|
|
9734 |
url: options.uploadUrl,
|
9735 |
pasteZone: false,
|
9736 |
-
dropZone:
|
9737 |
dataType: 'json',
|
9738 |
paramName: 'image',
|
9739 |
add: function (e, data) {
|
@@ -9749,21 +10509,21 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9749 |
});
|
9750 |
item.activate(null, null, true);
|
9751 |
} else {
|
9752 |
-
|
9753 |
}
|
9754 |
|
9755 |
}, this),
|
9756 |
fail: function (e, data) {
|
9757 |
-
|
9758 |
},
|
9759 |
|
9760 |
start: function () {
|
9761 |
-
|
9762 |
},
|
9763 |
|
9764 |
stop: function () {
|
9765 |
setTimeout(function () {
|
9766 |
-
|
9767 |
}, 100);
|
9768 |
}
|
9769 |
});
|
@@ -9771,7 +10531,7 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9771 |
}
|
9772 |
|
9773 |
ItemManager.prototype.setActiveItem = function (item, context, force) {
|
9774 |
-
// Must be called through
|
9775 |
if (item != this.activeItem || force) {
|
9776 |
this.activeItemOriginalData = null;
|
9777 |
|
@@ -9812,7 +10572,7 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9812 |
|
9813 |
ItemManager.prototype.focusFirst = function (context) {
|
9814 |
var field = this.activeForm.fields.eq(0).data('field');
|
9815 |
-
if (
|
9816 |
|
9817 |
} else {
|
9818 |
this.activeForm.fields.eq(0).data('field').focus(typeof context !== 'undefined' && context);
|
@@ -9821,8 +10581,8 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9821 |
|
9822 |
ItemManager.prototype.startItems = function () {
|
9823 |
|
9824 |
-
$('.n2-ss-core-item').
|
9825 |
-
canvasUIManager: this.
|
9826 |
distance: 5,
|
9827 |
$layer: function () {
|
9828 |
return this.element.clone();
|
@@ -9831,14 +10591,14 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9831 |
switch (targetContainer.layer.type) {
|
9832 |
case 'content':
|
9833 |
case 'col':
|
9834 |
-
|
9835 |
var item = this.createLayerItem(targetContainer.layer, itemOptions.$layer.data(), 'click');
|
9836 |
-
|
9837 |
|
9838 |
targetContainer.layer.container.insertLayerAt(item.layer, targetIndex);
|
9839 |
item.layer.changeGroup(false, targetContainer.layer);
|
9840 |
|
9841 |
-
|
9842 |
|
9843 |
break;
|
9844 |
|
@@ -9846,20 +10606,20 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9846 |
var col = targetContainer.layer.createCol();
|
9847 |
targetContainer.layer.moveCol(col.getIndex(), targetIndex);
|
9848 |
|
9849 |
-
|
9850 |
var item = this.createLayerItem(col, itemOptions.$layer.data(), 'click');
|
9851 |
-
|
9852 |
|
9853 |
col.container.insertLayerAt(item.layer, 0);
|
9854 |
item.layer.changeGroup(false, col);
|
9855 |
|
9856 |
-
|
9857 |
|
9858 |
break;
|
9859 |
default:
|
9860 |
-
var
|
9861 |
-
item = this.createLayerItem(this.
|
9862 |
-
item.layer.placement.current.setPosition(e.pageX -
|
9863 |
|
9864 |
break;
|
9865 |
}
|
@@ -9868,7 +10628,7 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9868 |
$('#n2-ss-add-sidebar').removeClass('n2-active');
|
9869 |
}
|
9870 |
}).on('click', $.proxy(function (e) {
|
9871 |
-
this.createLayerItem(this.
|
9872 |
}, this));
|
9873 |
|
9874 |
|
@@ -9889,17 +10649,17 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9889 |
$('#n2-ss-layers-switcher > .n2-labels .n2-td').eq(1).trigger('click');
|
9890 |
}, this),
|
9891 |
mousedown: $.proxy(function (e) {
|
9892 |
-
$('.n2-ss-core-item[data-
|
9893 |
}, this)
|
9894 |
});
|
9895 |
};
|
9896 |
|
9897 |
ItemManager.prototype.createLayerItem = function (group, data, interaction, props) {
|
9898 |
-
group = group || this.
|
9899 |
var type = data.item;
|
9900 |
if (type == 'structure') {
|
9901 |
-
var layer = new
|
9902 |
-
layer.create(data.
|
9903 |
layer.hightlightStructure();
|
9904 |
|
9905 |
return {
|
@@ -9921,9 +10681,9 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9921 |
layer.activate();
|
9922 |
}
|
9923 |
|
9924 |
-
|
9925 |
|
9926 |
-
|
9927 |
|
9928 |
return layer.item;
|
9929 |
}
|
@@ -9934,25 +10694,25 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9934 |
return this.lastValues[type];
|
9935 |
}
|
9936 |
return {};
|
9937 |
-
}
|
9938 |
|
9939 |
ItemManager.prototype.getItemClass = function (type) {
|
9940 |
-
var itemClass = 'Item' +
|
9941 |
-
if (typeof
|
9942 |
return 'Item';
|
9943 |
}
|
9944 |
return itemClass;
|
9945 |
-
}
|
9946 |
|
9947 |
ItemManager.prototype._createLayer = function ($item, group, properties) {
|
9948 |
-
var defaultAlign = this.
|
9949 |
for (var k in defaultAlign) {
|
9950 |
if (defaultAlign[k] !== null) {
|
9951 |
properties[k] = defaultAlign[k];
|
9952 |
}
|
9953 |
}
|
9954 |
|
9955 |
-
var newLayer = new
|
9956 |
|
9957 |
newLayer.create(function (layer) {
|
9958 |
return layer._createLayer()
|
@@ -10008,7 +10768,7 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
10008 |
}, this));
|
10009 |
|
10010 |
if (e && e.type == 'nextendChange') {
|
10011 |
-
var task =
|
10012 |
if (task) {
|
10013 |
task.setValues(this.activeItemOriginalData, $.extend({}, originalData));
|
10014 |
}
|
@@ -10027,7 +10787,7 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
10027 |
if (this.activeItem == maybeOldActiveItem) {
|
10028 |
maybeOldActiveItem.activate(null, null, true);
|
10029 |
}
|
10030 |
-
}
|
10031 |
|
10032 |
ItemManager.prototype.updateCurrentItemDeBounced = NextendDeBounce(function (e) {
|
10033 |
this.updateCurrentItem(e);
|
@@ -10035,27 +10795,32 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
10035 |
|
10036 |
ItemManager.prototype.historyDelete = function (historyGroup, historyLayer) {
|
10037 |
historyLayer.getSelf().delete();
|
10038 |
-
}
|
10039 |
|
10040 |
ItemManager.prototype.historyCreate = function (historyGroup, historyLayer, data) {
|
10041 |
var item = this.createLayerItem(historyGroup.getSelf(), data);
|
10042 |
historyLayer.setSelf(item.layer);
|
10043 |
-
}
|
10044 |
|
10045 |
ItemManager.prototype.historyCreateStructure = function (historyGroup, historyLayer, data) {
|
10046 |
var obj = this.createLayerItem(historyGroup.getSelf(), data);
|
10047 |
historyLayer.setSelf(obj.layer);
|
10048 |
-
}
|
10049 |
|
10050 |
ItemManager.prototype.getSelf = function () {
|
10051 |
return this;
|
10052 |
-
}
|
10053 |
|
10054 |
return ItemManager;
|
10055 |
});
|
10056 |
-
|
10057 |
"use strict";
|
10058 |
|
|
|
|
|
|
|
|
|
|
|
10059 |
function PluginActivatable() {
|
10060 |
this.isActive = false;
|
10061 |
this.preventActivation = false;
|
@@ -10066,15 +10831,15 @@ N2Require('PluginActivatable', [], [], function ($, scope, undefined) {
|
|
10066 |
if (document.activeElement) {
|
10067 |
document.activeElement.blur();
|
10068 |
}
|
10069 |
-
if (e && (e.ctrlKey || e.metaKey) && this.
|
10070 |
return !this.select();
|
10071 |
} else {
|
10072 |
-
if (e && e.which == 3 && this.
|
10073 |
return false;
|
10074 |
}
|
10075 |
|
10076 |
if (!preventExitFromSelection) {
|
10077 |
-
this.
|
10078 |
}
|
10079 |
}
|
10080 |
|
@@ -10084,15 +10849,15 @@ N2Require('PluginActivatable', [], [], function ($, scope, undefined) {
|
|
10084 |
|
10085 |
|
10086 |
// Set the layer active if it is not active currently
|
10087 |
-
if (this.
|
10088 |
this.layerRow.addClass('n2-active');
|
10089 |
this.layer.addClass('n2-active');
|
10090 |
this.layer.triggerHandler('n2-ss-activate');
|
10091 |
-
this.
|
10092 |
nextend.activeLayer = this.layer;
|
10093 |
|
10094 |
|
10095 |
-
this.
|
10096 |
}
|
10097 |
this.isActive = true;
|
10098 |
return true;
|
@@ -10110,18 +10875,23 @@ N2Require('PluginActivatable', [], [], function ($, scope, undefined) {
|
|
10110 |
|
10111 |
return PluginActivatable;
|
10112 |
});
|
10113 |
-
|
10114 |
"use strict";
|
10115 |
var dblClickInterval = 300,
|
10116 |
timeout = null;
|
10117 |
|
|
|
|
|
|
|
|
|
|
|
10118 |
function PluginEditableName() {
|
10119 |
}
|
10120 |
|
10121 |
PluginEditableName.prototype.addProperties = function ($layer) {
|
10122 |
this.createProperty('name', this.label, $layer);
|
10123 |
this.createProperty('nameSynced', 1, $layer);
|
10124 |
-
}
|
10125 |
|
10126 |
PluginEditableName.prototype.makeNameEditable = function () {
|
10127 |
this.layerTitleSpan.on({
|
@@ -10138,10 +10908,10 @@ N2Require('PluginEditableName', [], [], function ($, scope, undefined) {
|
|
10138 |
}
|
10139 |
}, this)
|
10140 |
})
|
10141 |
-
}
|
10142 |
|
10143 |
PluginEditableName.prototype.editName = function () {
|
10144 |
-
var input = new
|
10145 |
|
10146 |
input.$input.on({
|
10147 |
valueChanged: $.proxy(function (e, newName) {
|
@@ -10186,9 +10956,14 @@ N2Require('PluginEditableName', [], [], function ($, scope, undefined) {
|
|
10186 |
|
10187 |
return PluginEditableName;
|
10188 |
});
|
10189 |
-
|
10190 |
"use strict";
|
10191 |
|
|
|
|
|
|
|
|
|
|
|
10192 |
function PluginShowOn() {
|
10193 |
|
10194 |
}
|
@@ -10202,7 +10977,7 @@ N2Require('PluginShowOn', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
10202 |
this.createProperty('tabletLandscape', 1, $layer);
|
10203 |
this.createProperty('mobilePortrait', 1, $layer);
|
10204 |
this.createProperty('mobileLandscape', 1, $layer);
|
10205 |
-
}
|
10206 |
|
10207 |
PluginShowOn.prototype._hide = function () {
|
10208 |
this.layer.css('display', 'none');
|
@@ -10211,7 +10986,7 @@ N2Require('PluginShowOn', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
10211 |
};
|
10212 |
|
10213 |
PluginShowOn.prototype._show = function () {
|
10214 |
-
if (parseInt(this.property[this.
|
10215 |
this.layer.css('display', '');
|
10216 |
this.showsOnCurrent = true;
|
10217 |
}
|
@@ -10264,51 +11039,79 @@ N2Require('PluginShowOn', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
10264 |
|
10265 |
return PluginShowOn;
|
10266 |
});
|
10267 |
-
|
10268 |
"use strict";
|
10269 |
|
10270 |
/**
|
|
|
|
|
|
|
|
|
|
|
10271 |
* @constructor
|
10272 |
-
|
10273 |
-
* @
|
10274 |
*/
|
10275 |
-
function Col(
|
10276 |
this.label = 'Col';
|
10277 |
this.type = 'col';
|
10278 |
|
10279 |
this.innerContainer = '> .n2-ss-layer-col';
|
10280 |
|
10281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10282 |
|
10283 |
this.placement.allow('default');
|
10284 |
}
|
10285 |
|
10286 |
-
Col.prototype = Object.create(
|
10287 |
Col.prototype.constructor = Col;
|
10288 |
|
10289 |
Col.prototype._createLayer = function () {
|
10290 |
return $('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>')
|
10291 |
-
.attr('data-
|
10292 |
};
|
10293 |
|
10294 |
Col.prototype.addProperties = function ($layer) {
|
10295 |
|
10296 |
-
|
10297 |
|
10298 |
this.createProperty('colwidth', '1', $layer);
|
10299 |
this.createProperty('link', '#|*|_self', $layer);
|
10300 |
-
this.createProperty('borderradius', 0, $layer);
|
10301 |
-
this.createProperty('boxshadow', '0|*|0|*|0|*|0|*|00000080', $layer);
|
10302 |
|
10303 |
-
this.
|
10304 |
-
|
10305 |
-
this
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10306 |
|
10307 |
this.createDeviceProperty('order', {desktopPortrait: 0}, $layer);
|
10308 |
};
|
10309 |
|
10310 |
Col.prototype.create = function () {
|
10311 |
-
|
10312 |
|
10313 |
this._syncorder();
|
10314 |
|
@@ -10320,9 +11123,9 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10320 |
this._onReady();
|
10321 |
};
|
10322 |
|
10323 |
-
Col.prototype.load = function ($layer) {
|
10324 |
|
10325 |
-
|
10326 |
|
10327 |
this._syncorder();
|
10328 |
|
@@ -10347,9 +11150,12 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10347 |
Col.prototype.createRow = function () {
|
10348 |
this.$content = this.layer.find('.n2-ss-layer-content:first');
|
10349 |
|
10350 |
-
this.container = new
|
10351 |
this.container.setLayerContainerElement(this.$content);
|
10352 |
|
|
|
|
|
|
|
10353 |
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)),
|
10354 |
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 () {
|
10355 |
this.duplicate(true, false)
|
@@ -10371,7 +11177,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10371 |
|
10372 |
Col.prototype._start = function (isCreate) {
|
10373 |
|
10374 |
-
|
10375 |
|
10376 |
if (isCreate) {
|
10377 |
this.highlight(2000);
|
@@ -10392,53 +11198,119 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10392 |
if (order == 0) {
|
10393 |
this.layer.css('order', '');
|
10394 |
} else {
|
10395 |
-
this.layer.css('order', order);
|
10396 |
}
|
10397 |
|
10398 |
this.group.refreshUI();
|
10399 |
};
|
10400 |
|
10401 |
Col.prototype._synccolwidth = function () {
|
10402 |
-
this.
|
|
|
10403 |
this.group.refreshUI();
|
10404 |
};
|
10405 |
|
10406 |
-
Col.prototype.
|
|
|
10407 |
};
|
10408 |
|
10409 |
-
Col.prototype.
|
10410 |
-
this.$content.css('border-radius', this.getProperty('borderradius') + 'px');
|
10411 |
};
|
10412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10413 |
Col.prototype._syncborderwidth =
|
10414 |
Col.prototype._syncbordercolor =
|
10415 |
-
Col.prototype._syncborderstyle =
|
10416 |
-
|
10417 |
-
|
|
|
|
|
|
|
10418 |
|
10419 |
Col.prototype._syncborder = function () {
|
10420 |
-
var borderstyle = this.getProperty('borderstyle')
|
10421 |
-
|
10422 |
-
|
10423 |
-
this.$content.css('border-style', this.getProperty('borderstyle'));
|
10424 |
-
var borderWidth = this.getProperty('borderwidth').split('|*|'),
|
10425 |
-
unit = 'px';
|
10426 |
-
|
10427 |
-
this.$content.css('border-width', borderWidth.join(unit + ' ') + unit);
|
10428 |
-
} else {
|
10429 |
-
this.$content.css('border', '');
|
10430 |
-
}
|
10431 |
|
10432 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10433 |
};
|
10434 |
|
10435 |
-
Col.prototype._syncboxshadow =
|
10436 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10437 |
if ((boxShadow[0] != 0 || boxShadow[1] != 0 || boxShadow[2] != 0 || boxShadow[3] != 0) && N2Color.hex2alpha(boxShadow[4]) != 0) {
|
10438 |
-
|
10439 |
-
} else {
|
10440 |
-
this.$content.css('box-shadow', '');
|
10441 |
}
|
|
|
10442 |
};
|
10443 |
|
10444 |
Col.prototype.delete = function () {
|
@@ -10450,7 +11322,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10450 |
};
|
10451 |
|
10452 |
Col.prototype.getHTML = function (base64) {
|
10453 |
-
var layer =
|
10454 |
|
10455 |
layer.attr('data-rowcolumns', this.group.getColumns());
|
10456 |
return layer;
|
@@ -10459,32 +11331,59 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10459 |
Col.prototype.renderModeProperties = function (isReset) {
|
10460 |
this._syncorder();
|
10461 |
|
10462 |
-
|
10463 |
};
|
10464 |
|
10465 |
Col.prototype.update = function () {
|
10466 |
|
10467 |
this.group._syncwrapafter();
|
10468 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10469 |
};
|
10470 |
|
10471 |
return Col;
|
10472 |
});
|
10473 |
var dependencies = ['LayerDataStorage', 'PluginEditableName'];
|
10474 |
-
|
10475 |
"use strict";
|
10476 |
|
10477 |
var i = 0;
|
10478 |
window.layers = [];
|
10479 |
|
10480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10481 |
|
10482 |
this.wraps = {};
|
10483 |
this.counter = i++;
|
10484 |
window.layers[this.counter] = this;
|
10485 |
this.self = this;
|
10486 |
this.originalProperties = properties || {};
|
10487 |
-
|
10488 |
this.readyDeferred = $.Deferred();
|
10489 |
this.readyDeferred.done($.proxy(this.onReady, this));
|
10490 |
this.isDeleteStarted = false;
|
@@ -10498,14 +11397,18 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10498 |
|
10499 |
this.status = ComponentAbstract.STATUS.UNDEFINED;
|
10500 |
|
10501 |
-
this.
|
10502 |
this.group = group;
|
10503 |
|
|
|
|
|
|
|
10504 |
|
10505 |
-
|
|
|
10506 |
|
10507 |
/** @type {Placement} */
|
10508 |
-
this.placement = new
|
10509 |
|
10510 |
this.readyDeferred.done($.proxy(this.addUILabels, this));
|
10511 |
|
@@ -10526,20 +11429,20 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10526 |
};
|
10527 |
|
10528 |
|
10529 |
-
for (var k in
|
10530 |
-
ComponentAbstract.prototype[k] =
|
10531 |
}
|
10532 |
|
10533 |
-
for (var k in
|
10534 |
-
ComponentAbstract.prototype[k] =
|
10535 |
}
|
10536 |
|
10537 |
-
for (var k in
|
10538 |
-
ComponentAbstract.prototype[k] =
|
10539 |
}
|
10540 |
|
10541 |
-
for (var k in
|
10542 |
-
ComponentAbstract.prototype[k] =
|
10543 |
}
|
10544 |
|
10545 |
ComponentAbstract.prototype.addUILabels = function () {
|
@@ -10579,20 +11482,21 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10579 |
}, this)
|
10580 |
})
|
10581 |
.appendTo(this.uiLabel);
|
10582 |
-
}
|
10583 |
|
10584 |
ComponentAbstract.prototype.getUILabel = function () {
|
10585 |
return this.label;
|
10586 |
-
}
|
10587 |
|
10588 |
ComponentAbstract.prototype.up = function (e) {
|
10589 |
e.stopImmediatePropagation();
|
10590 |
this.group.activate(e);
|
10591 |
-
}
|
10592 |
|
10593 |
ComponentAbstract.prototype.addProperties = function ($layer) {
|
10594 |
|
10595 |
this.createProperty('id', null, $layer, this);
|
|
|
10596 |
|
10597 |
this.createProperty('class', '', $layer);
|
10598 |
this.createProperty('crop', 'visible', $layer);
|
@@ -10601,13 +11505,13 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10601 |
this.createProperty('adaptivefont', 0, $layer);
|
10602 |
|
10603 |
this.createDeviceProperty('fontsize', {desktopPortrait: 100}, $layer);
|
10604 |
-
|
10605 |
-
|
10606 |
-
}
|
10607 |
|
10608 |
ComponentAbstract.prototype.getRootElement = function () {
|
10609 |
return this.layer;
|
10610 |
-
}
|
10611 |
|
10612 |
ComponentAbstract.prototype.create = function (cb, useCreatedLayerProperties) {
|
10613 |
useCreatedLayerProperties = useCreatedLayerProperties || false;
|
@@ -10636,9 +11540,9 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10636 |
this.$.triggerHandler('create');
|
10637 |
|
10638 |
this._start(true);
|
10639 |
-
}
|
10640 |
|
10641 |
-
ComponentAbstract.prototype.load = function ($layer) {
|
10642 |
|
10643 |
this.addProperties($layer);
|
10644 |
|
@@ -10655,7 +11559,11 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10655 |
} else {
|
10656 |
this.changeStatus(ComponentAbstract.STATUS.NORMAL);
|
10657 |
}
|
10658 |
-
|
|
|
|
|
|
|
|
|
10659 |
|
10660 |
ComponentAbstract.prototype._start = function (isCreate) {
|
10661 |
this.createRow();
|
@@ -10674,7 +11582,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10674 |
this.setGroup(this.group);
|
10675 |
|
10676 |
|
10677 |
-
this.
|
10678 |
|
10679 |
if (isCreate) {
|
10680 |
this.refreshBaseSize();
|
@@ -10689,7 +11597,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10689 |
this.layer.removeClass('n2-ss-layer-under-creation');
|
10690 |
}
|
10691 |
}, this), 300);
|
10692 |
-
}
|
10693 |
|
10694 |
|
10695 |
ComponentAbstract.prototype._onReady = function () {
|
@@ -10702,18 +11610,18 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10702 |
mouseover: $.proxy(this.markOver, this),
|
10703 |
mouseout: $.proxy(this.markOut, this)
|
10704 |
});
|
10705 |
-
}
|
10706 |
|
10707 |
ComponentAbstract.prototype.isReady = function () {
|
10708 |
return this.readyDeferred.state() == 'resolved';
|
10709 |
-
}
|
10710 |
|
10711 |
ComponentAbstract.prototype.getName = function () {
|
10712 |
return this.property.name;
|
10713 |
-
}
|
10714 |
|
10715 |
ComponentAbstract.prototype.setGroup = function (group) {
|
10716 |
-
this.group.$.off('baseSizeUpdated'
|
10717 |
|
10718 |
this.group = group;
|
10719 |
this.placement.setMode(group.container.allowedPlacementMode);
|
@@ -10722,30 +11630,30 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10722 |
if (this.isReady()) {
|
10723 |
this.refreshBaseSize();
|
10724 |
}
|
10725 |
-
this.group.$.on('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10726 |
};
|
10727 |
|
10728 |
ComponentAbstract.prototype.changeGroup = function (originalIndex, newGroup) {
|
10729 |
var originalGroup = this.group;
|
10730 |
-
originalGroup.$.off('baseSizeUpdated'
|
10731 |
|
10732 |
this.group = newGroup;
|
10733 |
var originalPlacementData = this.placement.setMode(newGroup.container.allowedPlacementMode);
|
10734 |
newGroup.container.syncLayerRow(this);
|
10735 |
|
10736 |
this.refreshBaseSize();
|
10737 |
-
newGroup.$.on('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10738 |
|
10739 |
this.userGroupChange(originalGroup, originalIndex, originalPlacementData, newGroup, this.getIndex());
|
10740 |
|
10741 |
originalGroup.update();
|
10742 |
-
}
|
10743 |
|
10744 |
ComponentAbstract.prototype.userGroupChange = function (originalGroup, originalIndex, originalPlacementData, newGroup, newIndex) {
|
10745 |
if (originalGroup == newGroup) {
|
10746 |
this.userIndexChange(originalIndex, newIndex);
|
10747 |
} else {
|
10748 |
-
var task =
|
10749 |
|
10750 |
if (task) {
|
10751 |
task.setValues({
|
@@ -10758,7 +11666,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10758 |
});
|
10759 |
}
|
10760 |
}
|
10761 |
-
}
|
10762 |
|
10763 |
ComponentAbstract.prototype.historyUserGroupChange = function (data) {
|
10764 |
var originalGroup = this.group,
|
@@ -10766,7 +11674,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10766 |
index = data.index;
|
10767 |
group.container.insertLayerAt(this, index);
|
10768 |
|
10769 |
-
this.group.$.off('baseSizeUpdated'
|
10770 |
|
10771 |
this.group = group;
|
10772 |
if (data.placementData) {
|
@@ -10776,7 +11684,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10776 |
group.container.syncLayerRow(this);
|
10777 |
|
10778 |
this.refreshBaseSize();
|
10779 |
-
this.group.$.on('baseSizeUpdated', this.proxyRefreshBaseSize);
|
10780 |
|
10781 |
|
10782 |
group.onChildCountChange();
|
@@ -10790,23 +11698,23 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10790 |
|
10791 |
ComponentAbstract.prototype.userIndexChange = function (originalIndex, newIndex) {
|
10792 |
|
10793 |
-
var task =
|
10794 |
if (task) {
|
10795 |
task.setValues(originalIndex, newIndex);
|
10796 |
}
|
10797 |
this.group.container.insertLayerAt(this, newIndex);
|
10798 |
-
}
|
10799 |
|
10800 |
ComponentAbstract.prototype.historyUserIndexChange = function (value) {
|
10801 |
this.group.container.insertLayerAt(this, value);
|
10802 |
-
}
|
10803 |
|
10804 |
|
10805 |
ComponentAbstract.prototype._createLayerListRow = function (actions) {
|
10806 |
this.layerRow = $('<li class="n2-ss-layerlist-row"></li>')
|
10807 |
.data('layer', this)
|
10808 |
.on({
|
10809 |
-
mousedown: $.proxy(
|
10810 |
})
|
10811 |
.appendTo(this.group.container.$ul);
|
10812 |
this.layerTitleSpan = $('<span class="n2-ucf">' + this.property.name + '</span>');
|
@@ -10816,10 +11724,10 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10816 |
this.layerTitle = $('<div class="n2-ss-layer-title"></div>')
|
10817 |
.on({
|
10818 |
mouseenter: $.proxy(function () {
|
10819 |
-
this.
|
10820 |
}, this),
|
10821 |
mouseleave: $.proxy(function () {
|
10822 |
-
this.
|
10823 |
}, this),
|
10824 |
})
|
10825 |
.append(this.layerTitleSpan)
|
@@ -10835,17 +11743,17 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10835 |
|
10836 |
nextend.tooltip.add(this.layerRow);
|
10837 |
|
10838 |
-
this.layerRow.
|
10839 |
-
UIManager: this.
|
10840 |
layer: this,
|
10841 |
$item: this.layerRow
|
10842 |
});
|
10843 |
|
10844 |
return this.layerRow;
|
10845 |
-
}
|
10846 |
|
10847 |
ComponentAbstract.prototype.select = function (e) {
|
10848 |
-
return this.
|
10849 |
};
|
10850 |
|
10851 |
ComponentAbstract.prototype.update = function () {
|
@@ -10855,15 +11763,15 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10855 |
|
10856 |
ComponentAbstract.prototype.updateThrottled = function () {
|
10857 |
this.placement.updatePositionThrottled();
|
10858 |
-
}
|
10859 |
|
10860 |
ComponentAbstract.prototype.positionSidebar = function () {
|
10861 |
-
this.
|
10862 |
-
}
|
10863 |
|
10864 |
ComponentAbstract.prototype.showEditor = function () {
|
10865 |
-
this.
|
10866 |
-
}
|
10867 |
|
10868 |
ComponentAbstract.prototype.highlight = function (hideInterval) {
|
10869 |
hideInterval = hideInterval || 2000;
|
@@ -10875,7 +11783,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10875 |
this.isHighlighted = setTimeout($.proxy(function () {
|
10876 |
this.layer.removeClass('n2-highlight');
|
10877 |
}, this), hideInterval);
|
10878 |
-
}
|
10879 |
|
10880 |
ComponentAbstract.prototype.setPropertydesktopPortrait =
|
10881 |
ComponentAbstract.prototype.setPropertydesktopLandscape =
|
@@ -10884,7 +11792,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10884 |
ComponentAbstract.prototype.setPropertymobilePortrait =
|
10885 |
ComponentAbstract.prototype.setPropertymobileLandscape = function (name, value, from) {
|
10886 |
this._setProperty(name, parseInt(value), from);
|
10887 |
-
}
|
10888 |
|
10889 |
ComponentAbstract.prototype.getHTML = function (base64) {
|
10890 |
var $layer = this._createLayer();
|
@@ -10919,7 +11827,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10919 |
$layer.attr('id', id);
|
10920 |
}
|
10921 |
|
10922 |
-
if (this.status >
|
10923 |
$layer.attr('data-status', this.status);
|
10924 |
}
|
10925 |
|
@@ -10946,8 +11854,17 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10946 |
$component.attr('data-parentid', '');
|
10947 |
|
10948 |
}
|
10949 |
-
|
10950 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10951 |
|
10952 |
this.layerRow.trigger('mouseleave');
|
10953 |
|
@@ -10955,14 +11872,14 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10955 |
newComponent.activate();
|
10956 |
}
|
10957 |
|
10958 |
-
|
10959 |
|
10960 |
return newComponent;
|
10961 |
};
|
10962 |
|
10963 |
ComponentAbstract.prototype.historyDeleteDuplicated = function (historicalNewComponent) {
|
10964 |
historicalNewComponent.getSelf().delete();
|
10965 |
-
}
|
10966 |
|
10967 |
ComponentAbstract.prototype.historyDuplicate = function (historicalNewComponent, historicalAllLayers) {
|
10968 |
var newComponent = this.duplicate(false, false);
|
@@ -10974,14 +11891,14 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10974 |
historicalAllLayers[i].setSelf(newAllLayers[i]);
|
10975 |
}
|
10976 |
}
|
10977 |
-
}
|
10978 |
|
10979 |
ComponentAbstract.prototype.historyDelete = function () {
|
10980 |
this.delete();
|
10981 |
-
}
|
10982 |
|
10983 |
ComponentAbstract.prototype.historyRestore = function ($component, historicalGroup, index, historicalAllLayers) {
|
10984 |
-
var newComponent = this.
|
10985 |
this.setSelf(newComponent);
|
10986 |
|
10987 |
if (historicalAllLayers) {
|
@@ -10990,20 +11907,20 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
10990 |
historicalAllLayers[i].setSelf(newAllLayers[i]);
|
10991 |
}
|
10992 |
}
|
10993 |
-
}
|
10994 |
|
10995 |
ComponentAbstract.prototype.delete = function () {
|
10996 |
-
|
10997 |
nextend.tooltip.onLeave();
|
10998 |
this._delete();
|
10999 |
-
}
|
11000 |
|
11001 |
ComponentAbstract.prototype._delete = function () {
|
11002 |
|
11003 |
this.isDeleteStarted = true;
|
11004 |
|
11005 |
-
if (this.
|
11006 |
-
this.
|
11007 |
}
|
11008 |
|
11009 |
if (this.isHighlighted) {
|
@@ -11011,20 +11928,20 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11011 |
this.isHighlighted = false;
|
11012 |
}
|
11013 |
|
11014 |
-
|
11015 |
-
|
11016 |
|
11017 |
this.deActivate();
|
11018 |
|
11019 |
if (this.container != undefined) {
|
11020 |
-
|
11021 |
var layers = this.container.getSortedLayers();
|
11022 |
for (var i = 0; i < layers.length; i++) {
|
11023 |
layers[i]._delete();
|
11024 |
}
|
11025 |
-
|
11026 |
}
|
11027 |
-
|
11028 |
|
11029 |
if (this.item != undefined) {
|
11030 |
this.item.delete();
|
@@ -11037,7 +11954,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11037 |
|
11038 |
this.isDeleted = true;
|
11039 |
|
11040 |
-
this.
|
11041 |
|
11042 |
this.layer.triggerHandler('LayerDeleted');
|
11043 |
this.getRootElement().remove();
|
@@ -11046,18 +11963,18 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11046 |
this.group.update();
|
11047 |
|
11048 |
|
11049 |
-
this.group.$.off('baseSizeUpdated'
|
11050 |
this.$.trigger('layerDeleted');
|
11051 |
|
11052 |
if (this.markTimer) {
|
11053 |
clearTimeout(this.markTimer);
|
11054 |
}
|
11055 |
|
11056 |
-
//delete this.
|
11057 |
delete this.layer;
|
11058 |
delete this.itemEditor;
|
11059 |
this.group.onChildCountChange();
|
11060 |
-
}
|
11061 |
|
11062 |
ComponentAbstract.prototype.getData = function (params) {
|
11063 |
var data = {
|
@@ -11065,7 +11982,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11065 |
lastplacement: this.placement.getType()
|
11066 |
};
|
11067 |
|
11068 |
-
if (this.status >
|
11069 |
data.status = this.status;
|
11070 |
}
|
11071 |
|
@@ -11139,7 +12056,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11139 |
}
|
11140 |
this.layer.addClass('n2-ss-mouse-over-delayed');
|
11141 |
this.uiLabel.removeClass('invisible');
|
11142 |
-
}
|
11143 |
|
11144 |
ComponentAbstract.prototype.markOut = function (e) {
|
11145 |
this.layer.removeClass('n2-ss-mouse-over');
|
@@ -11159,17 +12076,17 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11159 |
this.uiLabel.removeClass('invisible');
|
11160 |
this.markTimer = null;
|
11161 |
}, this), 10);
|
11162 |
-
}
|
11163 |
|
11164 |
ComponentAbstract.prototype.markEnter = function (e) {
|
11165 |
this.layer.addClass('n2-ss-mouse-hover');
|
11166 |
this.group.markEnter();
|
11167 |
-
}
|
11168 |
|
11169 |
ComponentAbstract.prototype.markLeave = function (e) {
|
11170 |
this.layer.removeClass('n2-ss-mouse-hover');
|
11171 |
this.group.markLeave();
|
11172 |
-
}
|
11173 |
|
11174 |
|
11175 |
ComponentAbstract.prototype.formSetname = function (options, value) {
|
@@ -11213,7 +12130,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11213 |
}
|
11214 |
}
|
11215 |
this.placement.sync();
|
11216 |
-
}
|
11217 |
|
11218 |
ComponentAbstract.prototype._syncid = function () {
|
11219 |
var value = this.getProperty('id');
|
@@ -11233,6 +12150,36 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11233 |
return id;
|
11234 |
};
|
11235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11236 |
ComponentAbstract.prototype._syncfontsize = function () {
|
11237 |
this.adjustFontSize(this.getProperty('adaptivefont'), this.getProperty('fontsize'), true);
|
11238 |
};
|
@@ -11264,15 +12211,15 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11264 |
this.baseSize = this.group.baseSize * fontSize / 100;
|
11265 |
}
|
11266 |
this.$.triggerHandler('baseSizeUpdated');
|
11267 |
-
}
|
11268 |
|
11269 |
ComponentAbstract.prototype.getFontSize = function () {
|
11270 |
return parseInt(this.getProperty('fontsize'));
|
11271 |
-
}
|
11272 |
|
11273 |
ComponentAbstract.prototype.isAdaptiveFont = function () {
|
11274 |
return parseInt(this.getProperty('adaptivefont'));
|
11275 |
-
}
|
11276 |
|
11277 |
ComponentAbstract.prototype._synccrop = function () {
|
11278 |
var value = this.getProperty('crop');
|
@@ -11303,7 +12250,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11303 |
} else {
|
11304 |
this.removeWrap('rotation');
|
11305 |
}
|
11306 |
-
}
|
11307 |
|
11308 |
ComponentAbstract.prototype.addWrap = function (key, html) {
|
11309 |
if (this.wraps[key] === undefined) {
|
@@ -11331,7 +12278,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11331 |
}
|
11332 |
}
|
11333 |
return this.wraps[key];
|
11334 |
-
}
|
11335 |
|
11336 |
ComponentAbstract.prototype.removeWrap = function (key) {
|
11337 |
if (this.wraps[key] !== undefined) {
|
@@ -11355,11 +12302,11 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11355 |
this.wraps[key].remove();
|
11356 |
delete this.wraps[key];
|
11357 |
}
|
11358 |
-
}
|
11359 |
|
11360 |
ComponentAbstract.prototype.getContents = function () {
|
11361 |
return false;
|
11362 |
-
}
|
11363 |
|
11364 |
ComponentAbstract.prototype._syncclass = function () {
|
11365 |
if (this._lastClasses !== false) {
|
@@ -11393,19 +12340,19 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11393 |
|
11394 |
ComponentAbstract.prototype.renderModeProperties = function (isReset) {
|
11395 |
|
11396 |
-
|
11397 |
|
11398 |
|
11399 |
this.placement.renderModeProperties(isReset);
|
11400 |
-
}
|
11401 |
|
11402 |
ComponentAbstract.prototype.getIndex = function () {
|
11403 |
return this.group.container.getLayerIndex(this.layer);
|
11404 |
-
}
|
11405 |
|
11406 |
ComponentAbstract.prototype.toString = function () {
|
11407 |
return this.type + ' #' + this.counter;
|
11408 |
-
}
|
11409 |
|
11410 |
ComponentAbstract.prototype.setSelf = function (self) {
|
11411 |
if (self === undefined) {
|
@@ -11416,24 +12363,24 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11416 |
}
|
11417 |
this.self = self;
|
11418 |
|
11419 |
-
}
|
11420 |
|
11421 |
ComponentAbstract.prototype.getSelf = function () {
|
11422 |
if (this.self !== this) {
|
11423 |
this.self = this.self.getSelf();
|
11424 |
}
|
11425 |
return this.self;
|
11426 |
-
}
|
11427 |
|
11428 |
ComponentAbstract.prototype.historyStoreOnPlacement = function () {
|
11429 |
var args = Array.prototype.slice.call(arguments);
|
11430 |
args.splice(1, 1);
|
11431 |
this.placement.current[arguments[1]].apply(this.placement.current, args);
|
11432 |
-
}
|
11433 |
|
11434 |
ComponentAbstract.prototype.getDroppable = function () {
|
11435 |
return false;
|
11436 |
-
}
|
11437 |
|
11438 |
ComponentAbstract.prototype.onCanvasUpdate = function (originalIndex, targetGroup, newIndex) {
|
11439 |
|
@@ -11444,7 +12391,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11444 |
}
|
11445 |
} else {
|
11446 |
var oldAbsoluteParent;
|
11447 |
-
if (this.
|
11448 |
oldAbsoluteParent = this;
|
11449 |
while (oldAbsoluteParent && (!oldAbsoluteParent.placement || oldAbsoluteParent.placement.getType() !== 'absolute')) {
|
11450 |
oldAbsoluteParent = oldAbsoluteParent.group;
|
@@ -11468,7 +12415,7 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11468 |
absoluteParent.placement.updatePosition();
|
11469 |
}
|
11470 |
}
|
11471 |
-
}
|
11472 |
|
11473 |
ComponentAbstract.prototype.setStatusNormal = function () {
|
11474 |
this.changeStatus(ComponentAbstract.STATUS.NORMAL);
|
@@ -11507,31 +12454,98 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11507 |
|
11508 |
this.placement.current.changeStatus(oldStatus, this.status);
|
11509 |
|
11510 |
-
}
|
11511 |
|
11512 |
ComponentAbstract.prototype.moveX = function (x) {
|
11513 |
if (this.placement.getType() == 'absolute') {
|
11514 |
this.placement.current.moveX(x);
|
11515 |
}
|
11516 |
-
}
|
11517 |
|
11518 |
ComponentAbstract.prototype.moveY = function (y) {
|
11519 |
if (this.placement.getType() == 'absolute') {
|
11520 |
this.placement.current.moveY(y);
|
11521 |
}
|
11522 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11523 |
|
11524 |
return ComponentAbstract;
|
11525 |
});
|
11526 |
-
|
11527 |
"use strict";
|
11528 |
|
11529 |
/**
|
|
|
|
|
11530 |
* @constructor
|
11531 |
* @augments ComponentAbstract
|
11532 |
-
* @memberof scope
|
11533 |
*/
|
11534 |
-
function Content(
|
11535 |
this.label = n2_('Content');
|
11536 |
this.type = 'content';
|
11537 |
|
@@ -11539,67 +12553,72 @@ N2Require('Content', ['ContentAbstract'], ['smartSlider'], function ($, scope, s
|
|
11539 |
|
11540 |
this._defaults = $.extend({verticalalign: 'center'}, this._defaults);
|
11541 |
|
11542 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11543 |
|
11544 |
this.placement.allow('content');
|
11545 |
|
11546 |
-
|
11547 |
}
|
11548 |
|
11549 |
-
Content.prototype = Object.create(
|
11550 |
Content.prototype.constructor = Content;
|
11551 |
|
11552 |
Content.prototype.addUILabels = function () {
|
11553 |
this.markTimer = null;
|
11554 |
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>')
|
11555 |
.appendTo(this.layer);
|
11556 |
-
}
|
11557 |
|
11558 |
Content.prototype.addProperties = function ($layer) {
|
11559 |
|
11560 |
-
|
11561 |
|
11562 |
this.createDeviceProperty('selfalign', {desktopPortrait: 'inherit'}, $layer);
|
11563 |
|
11564 |
-
}
|
11565 |
|
11566 |
Content.prototype.getRootElement = function () {
|
11567 |
-
return this
|
11568 |
-
}
|
11569 |
|
11570 |
Content.prototype.getBackgroundElement = function () {
|
11571 |
-
return this
|
11572 |
-
}
|
11573 |
|
11574 |
Content.prototype._createLayer = function () {
|
11575 |
return $('<div class="n2-ss-layer n2-ss-content-empty"><div class="n2-ss-section-main-content n2-ss-layer-content"></div></div>')
|
11576 |
-
.attr('data-
|
11577 |
-
}
|
11578 |
|
11579 |
Content.prototype.createRow = function () {
|
11580 |
-
|
11581 |
-
|
11582 |
-
this.$outerSection = $('<div class="n2-ss-section-outer"></div>')
|
11583 |
-
.insertAfter(this.layer)
|
11584 |
-
.append(this.layer);
|
11585 |
-
}
|
11586 |
-
this.$outerSection.data('layerObject', this);
|
11587 |
|
11588 |
this.$content = this.layer.find('.n2-ss-layer-content:first');
|
11589 |
|
11590 |
var status = $('<div class="n2-ss-layer-status"></div>'),
|
11591 |
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));
|
11592 |
|
11593 |
-
this.container = new
|
11594 |
this.container.setLayerContainerElement(this.$content);
|
11595 |
|
11596 |
|
11597 |
$('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(status).on('click', $.proxy(function (e) {
|
11598 |
e.preventDefault();
|
11599 |
-
if (this.status ==
|
11600 |
this.setStatusNormal();
|
11601 |
} else {
|
11602 |
-
this.changeStatus(
|
11603 |
}
|
11604 |
}, this));
|
11605 |
|
@@ -11615,136 +12634,161 @@ N2Require('Content', ['ContentAbstract'], ['smartSlider'], function ($, scope, s
|
|
11615 |
this.container.$ul.appendTo(this.layerRow);
|
11616 |
|
11617 |
this.readyDeferred.done($.proxy(this._syncopened, this));
|
11618 |
-
}
|
11619 |
|
11620 |
Content.prototype.create = function () {
|
11621 |
|
11622 |
this.originalProperties.adaptivefont = 1;
|
11623 |
|
11624 |
-
|
11625 |
|
11626 |
this._syncselfalign();
|
11627 |
|
11628 |
this._onReady();
|
11629 |
-
}
|
11630 |
|
11631 |
-
Content.prototype.load = function ($layer) {
|
11632 |
|
11633 |
-
|
11634 |
|
11635 |
this._syncselfalign();
|
11636 |
|
11637 |
this._onReady();
|
11638 |
-
}
|
|
|
11639 |
Content.prototype._onReady = function () {
|
11640 |
-
|
11641 |
this.startUISizing();
|
11642 |
-
}
|
11643 |
|
11644 |
Content.prototype.startUISizing = function () {
|
11645 |
-
this.layer.
|
11646 |
start: $.proxy(function (e, prop) {
|
11647 |
-
|
11648 |
-
if (prop
|
11649 |
-
this.layer.
|
11650 |
}
|
11651 |
}, this),
|
11652 |
resizeMaxWidth: $.proxy(function (e, ui) {
|
11653 |
|
11654 |
-
|
11655 |
|
11656 |
}, this),
|
11657 |
stopMaxWidth: $.proxy(function (e, ui) {
|
11658 |
-
|
11659 |
this.setProperty('maxwidth', ui.value);
|
11660 |
}, this)
|
11661 |
});
|
11662 |
-
}
|
11663 |
|
11664 |
Content.prototype.delete = function () {
|
11665 |
var layers = this.container.getSortedLayers();
|
11666 |
for (var i = 0; i < layers.length; i++) {
|
11667 |
layers[i].delete();
|
11668 |
}
|
11669 |
-
}
|
11670 |
|
11671 |
Content.prototype.remove = function () {
|
11672 |
this._delete();
|
11673 |
-
}
|
11674 |
|
11675 |
Content.prototype.update = function () {
|
11676 |
-
|
11677 |
-
}
|
11678 |
|
11679 |
Content.prototype.onChildCountChange = function () {
|
11680 |
|
11681 |
var layers = this.container.getSortedLayers();
|
11682 |
|
11683 |
this.layer.toggleClass('n2-ss-content-empty', layers.length == 0);
|
11684 |
-
}
|
11685 |
|
11686 |
Content.prototype.renderModeProperties = function (isReset) {
|
11687 |
-
|
11688 |
|
11689 |
this._syncselfalign();
|
11690 |
-
}
|
11691 |
|
11692 |
Content.prototype._syncselfalign = function () {
|
11693 |
this.layer.attr('data-cssselfalign', this.getProperty('selfalign'));
|
11694 |
-
}
|
11695 |
|
11696 |
Content.prototype.duplicate = function (needActivate) {
|
11697 |
console.error('Content can not be duplicated!');
|
11698 |
-
}
|
11699 |
|
11700 |
return Content;
|
11701 |
});
|
11702 |
-
|
11703 |
"use strict";
|
11704 |
|
11705 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11706 |
|
11707 |
this._defaults = $.extend({verticalalign: 'flex-start'}, this._defaults);
|
11708 |
|
11709 |
this._syncbgThrottled = NextendThrottle(this._syncbgThrottled, 50);
|
11710 |
|
11711 |
-
|
|
|
|
|
11712 |
}
|
11713 |
|
11714 |
-
ContentAbstract.prototype = Object.create(
|
11715 |
ContentAbstract.prototype.constructor = ContentAbstract;
|
11716 |
|
11717 |
ContentAbstract.prototype.addProperties = function ($layer) {
|
11718 |
|
11719 |
this.createProperty('opened', 1, $layer, this);
|
11720 |
|
11721 |
-
|
11722 |
|
11723 |
this.createProperty('bgimage', '', $layer);
|
11724 |
this.createProperty('bgimagex', 50, $layer);
|
11725 |
this.createProperty('bgimagey', 50, $layer);
|
11726 |
this.createProperty('bgimageparallax', 0, $layer);
|
11727 |
-
|
11728 |
-
this.
|
11729 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11730 |
this.createProperty('verticalalign', this._defaults.verticalalign, $layer);
|
11731 |
|
11732 |
this.createDeviceProperty('maxwidth', {desktopPortrait: 0}, $layer);
|
11733 |
|
11734 |
this.createDeviceProperty('inneralign', {desktopPortrait: 'inherit'}, $layer);
|
11735 |
this.createDeviceProperty('padding', {desktopPortrait: '10|*|10|*|10|*|10|*|px+'}, $layer);
|
11736 |
-
|
|
|
|
|
|
|
11737 |
|
11738 |
ContentAbstract.prototype.getBackgroundElement = function () {
|
11739 |
return this.$content;
|
11740 |
-
}
|
11741 |
|
11742 |
ContentAbstract.prototype.getPaddingElement = function () {
|
11743 |
return this.$content;
|
11744 |
-
}
|
11745 |
|
11746 |
ContentAbstract.prototype.create = function () {
|
11747 |
-
|
11748 |
|
11749 |
this.initUI();
|
11750 |
|
@@ -11754,11 +12798,11 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11754 |
this._syncpadding();
|
11755 |
this._syncinneralign();
|
11756 |
this._syncbgThrottled();
|
11757 |
-
}
|
11758 |
|
11759 |
-
ContentAbstract.prototype.load = function ($layer) {
|
11760 |
|
11761 |
-
|
11762 |
|
11763 |
this.initUI();
|
11764 |
|
@@ -11768,15 +12812,15 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11768 |
this._syncinneralign();
|
11769 |
this._syncbgThrottled();
|
11770 |
|
11771 |
-
this.container.startWithExistingNodes();
|
11772 |
-
}
|
11773 |
|
11774 |
ContentAbstract.prototype.initUI = function () {
|
11775 |
|
11776 |
this.layer.on({
|
11777 |
-
mousedown: $.proxy(
|
11778 |
click: $.proxy(function (e) {
|
11779 |
-
if (!nextend.shouldPreventMouseUp && this.
|
11780 |
this.activate(e);
|
11781 |
}
|
11782 |
}, this),
|
@@ -11786,11 +12830,10 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11786 |
}, this)
|
11787 |
});
|
11788 |
|
11789 |
-
|
11790 |
-
this.getPaddingElement().nextendSpacing({
|
11791 |
handles: 'n, s, e, w',
|
11792 |
start: $.proxy(function (e, ui) {
|
11793 |
-
|
11794 |
}, this),
|
11795 |
spacing: $.proxy(function (e, ui) {
|
11796 |
var html = '';
|
@@ -11798,21 +12841,21 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11798 |
html += 'Padding ' + k + ': ' + ui.changed[k] + 'px<br>';
|
11799 |
}
|
11800 |
|
11801 |
-
|
11802 |
}, this),
|
11803 |
stop: $.proxy(this.onSpacingStop, this),
|
11804 |
});
|
11805 |
-
}
|
11806 |
|
11807 |
ContentAbstract.prototype.onSpacingStop = function (event, ui) {
|
11808 |
-
|
11809 |
var padding = this.getPadding().split('|*|'),
|
11810 |
ratioH = 1,
|
11811 |
ratioV = 1;
|
11812 |
|
11813 |
if (padding[padding.length - 1] == 'px+' && Math.abs(parseFloat(this.layer.css('fontSize')) - this.baseSize) > 1) {
|
11814 |
-
ratioH = this.
|
11815 |
-
ratioV = this.
|
11816 |
}
|
11817 |
|
11818 |
for (var k in ui.changed) {
|
@@ -11861,7 +12904,7 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11861 |
|
11862 |
ContentAbstract.prototype.getPadding = function () {
|
11863 |
return this.getProperty('padding');
|
11864 |
-
}
|
11865 |
|
11866 |
ContentAbstract.prototype._syncpadding = function () {
|
11867 |
var padding = this.getPadding().split('|*|'),
|
@@ -11878,17 +12921,17 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11878 |
this.getPaddingElement().css('padding', css);
|
11879 |
this.update();
|
11880 |
|
11881 |
-
this.getPaddingElement().
|
11882 |
-
}
|
11883 |
|
11884 |
ContentAbstract.prototype._syncmaxwidth = function () {
|
11885 |
var value = parseInt(this.getProperty('maxwidth'));
|
11886 |
if (value <= 0 || isNaN(value)) {
|
11887 |
this.layer.css('maxWidth', '')
|
11888 |
-
.
|
11889 |
} else {
|
11890 |
this.layer.css('maxWidth', value + 'px')
|
11891 |
-
.
|
11892 |
}
|
11893 |
|
11894 |
this.update();
|
@@ -11896,19 +12939,19 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11896 |
|
11897 |
ContentAbstract.prototype.getInnerAlign = function () {
|
11898 |
return this.getProperty('inneralign');
|
11899 |
-
}
|
11900 |
|
11901 |
ContentAbstract.prototype._syncinneralign = function () {
|
11902 |
this.layer.attr('data-csstextalign', this.getInnerAlign());
|
11903 |
-
}
|
11904 |
|
11905 |
ContentAbstract.prototype.getVerticalAlign = function () {
|
11906 |
return this.getProperty('verticalalign');
|
11907 |
-
}
|
11908 |
|
11909 |
ContentAbstract.prototype._syncverticalalign = function () {
|
11910 |
this.$content.attr('data-verticalalign', this.getVerticalAlign());
|
11911 |
-
}
|
11912 |
|
11913 |
ContentAbstract.prototype._syncbgimage =
|
11914 |
ContentAbstract.prototype._syncbgimagex =
|
@@ -11916,14 +12959,18 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11916 |
ContentAbstract.prototype._syncbgimageparallax =
|
11917 |
ContentAbstract.prototype._syncbgcolor =
|
11918 |
ContentAbstract.prototype._syncbgcolorgradient =
|
11919 |
-
ContentAbstract.prototype._syncbgcolorgradientend =
|
11920 |
-
|
11921 |
-
|
|
|
|
|
|
|
11922 |
|
11923 |
|
11924 |
ContentAbstract.prototype._syncbgThrottled = function () {
|
11925 |
var background = '',
|
11926 |
-
image =
|
|
|
11927 |
if (image != '') {
|
11928 |
var x = parseInt(this.getProperty('bgimagex'));
|
11929 |
if (!isFinite(x)) {
|
@@ -11933,59 +12980,87 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11933 |
if (!isFinite(y)) {
|
11934 |
y = 50;
|
11935 |
}
|
11936 |
-
background += '
|
|
|
11937 |
}
|
11938 |
var color = this.getProperty('bgcolor'),
|
11939 |
gradient = this.getProperty('bgcolorgradient'),
|
11940 |
colorend = this.getProperty('bgcolorgradientend');
|
11941 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11942 |
if (N2Color.hex2alpha(color) != 0 || (gradient != 'off' && N2Color.hex2alpha(colorend) != 0)) {
|
11943 |
var after = '';
|
11944 |
-
if (
|
11945 |
-
after = ',' +
|
11946 |
}
|
11947 |
switch (gradient) {
|
11948 |
case 'horizontal':
|
11949 |
-
|
11950 |
-
|
11951 |
-
|
11952 |
-
.css('background', 'linear-gradient(to right, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
11953 |
-
break;
|
11954 |
case 'vertical':
|
11955 |
-
|
11956 |
-
|
11957 |
-
|
11958 |
-
.css('background', 'linear-gradient(to bottom, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
11959 |
-
break;
|
11960 |
case 'diagonal1':
|
11961 |
-
|
11962 |
-
|
11963 |
-
|
11964 |
-
.css('background', 'linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
11965 |
-
break;
|
11966 |
case 'diagonal2':
|
11967 |
-
|
11968 |
-
|
11969 |
-
|
11970 |
-
.css('background', 'linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
11971 |
-
break;
|
11972 |
case 'off':
|
11973 |
default:
|
11974 |
-
if (
|
11975 |
-
background
|
11976 |
-
} else {
|
11977 |
-
background += N2Color.hex2rgbaCSS(color);
|
11978 |
}
|
11979 |
-
|
11980 |
-
break;
|
11981 |
}
|
11982 |
-
} else {
|
11983 |
-
|
11984 |
}
|
|
|
11985 |
};
|
11986 |
|
11987 |
ContentAbstract.prototype.getData = function (params) {
|
11988 |
-
var data =
|
11989 |
|
11990 |
if (params.layersIncluded) {
|
11991 |
data.layers = this.container.getData(params);
|
@@ -11998,16 +13073,16 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
11998 |
this.layer.toggleClass('n2-ss-content-empty', this.container.getLayerCount() == 0);
|
11999 |
|
12000 |
this.update();
|
12001 |
-
}
|
12002 |
|
12003 |
ContentAbstract.prototype.renderModeProperties = function (isReset) {
|
12004 |
-
|
12005 |
|
12006 |
this._syncmaxwidth();
|
12007 |
|
12008 |
this._syncpadding();
|
12009 |
this._syncinneralign();
|
12010 |
-
}
|
12011 |
|
12012 |
ContentAbstract.prototype.getDroppable = function () {
|
12013 |
if (!this.layer.is(":visible") || this.status == N2Classes.ComponentAbstract.STATUS.HIDDEN || this.status == N2Classes.ComponentAbstract.STATUS.LOCKED) {
|
@@ -12019,7 +13094,7 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
12019 |
placement: 'normal',
|
12020 |
axis: 'y'
|
12021 |
}
|
12022 |
-
}
|
12023 |
|
12024 |
ContentAbstract.prototype.getLLDroppable = function (layer) {
|
12025 |
switch (layer.type) {
|
@@ -12032,31 +13107,44 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
12032 |
break;
|
12033 |
}
|
12034 |
return false;
|
12035 |
-
}
|
12036 |
|
12037 |
ContentAbstract.prototype.getContents = function () {
|
12038 |
return this.$content;
|
12039 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12040 |
|
12041 |
return ContentAbstract;
|
12042 |
});
|
12043 |
-
|
12044 |
"use strict";
|
12045 |
|
12046 |
/**
|
|
|
|
|
12047 |
* @constructor
|
12048 |
* @augments ComponentAbstract
|
12049 |
-
* @memberof scope
|
12050 |
*/
|
12051 |
-
function Layer(
|
12052 |
this.label = n2_('Layer');
|
12053 |
this.type = 'layer';
|
12054 |
|
12055 |
this.parent = false;
|
12056 |
|
12057 |
-
this.itemEditor =
|
12058 |
|
12059 |
-
|
12060 |
|
12061 |
this.placement.allow('absolute');
|
12062 |
this.placement.allow('normal');
|
@@ -12064,35 +13152,35 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12064 |
this.$.on('load create', $.proxy(this.startItem, this));
|
12065 |
};
|
12066 |
|
12067 |
-
Layer.prototype = Object.create(
|
12068 |
Layer.prototype.constructor = Layer;
|
12069 |
|
12070 |
|
12071 |
Layer.prototype.create = function () {
|
12072 |
|
12073 |
-
|
12074 |
|
12075 |
this.initUI();
|
12076 |
|
12077 |
this._onReady();
|
12078 |
-
}
|
12079 |
|
12080 |
-
Layer.prototype.load = function ($layer) {
|
12081 |
|
12082 |
-
|
12083 |
|
12084 |
this.initUI();
|
12085 |
|
12086 |
this._onReady();
|
12087 |
-
}
|
12088 |
|
12089 |
Layer.prototype.startItem = function () {
|
12090 |
var $item = this.layer.find('.n2-ss-item');
|
12091 |
|
12092 |
-
new
|
12093 |
|
12094 |
-
this.layer.
|
12095 |
-
canvasUIManager: this.
|
12096 |
layer: this,
|
12097 |
$layer: this.layer
|
12098 |
});
|
@@ -12100,26 +13188,26 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12100 |
if (this.item.needSize) {
|
12101 |
this.layer.addClass('n2-ss-layer-needsize');
|
12102 |
}
|
12103 |
-
}
|
12104 |
|
12105 |
Layer.prototype.initUI = function () {
|
12106 |
|
12107 |
this.layer.on({
|
12108 |
-
mousedown: $.proxy(
|
12109 |
click: $.proxy(function (e) {
|
12110 |
-
if (this.
|
12111 |
this.activate(e);
|
12112 |
}
|
12113 |
}, this),
|
12114 |
dblclick: $.proxy(function (e) {
|
12115 |
-
if (!
|
12116 |
e.stopPropagation();
|
12117 |
$('[data-tab="item"]').trigger('click');
|
12118 |
this.item.itemEditor.focusFirst('dblclick');
|
12119 |
}
|
12120 |
}, this)
|
12121 |
});
|
12122 |
-
}
|
12123 |
|
12124 |
Layer.prototype.getContent = function () {
|
12125 |
|
@@ -12129,12 +13217,12 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12129 |
$content = $content.find(selector);
|
12130 |
}
|
12131 |
return $content;
|
12132 |
-
}
|
12133 |
|
12134 |
Layer.prototype._createLayer = function () {
|
12135 |
return $('<div class="n2-ss-layer"></div>')
|
12136 |
-
.attr('data-
|
12137 |
-
}
|
12138 |
|
12139 |
Layer.prototype.createRow = function () {
|
12140 |
var status = $('<div class="n2-ss-layer-status"></div>'),
|
@@ -12145,10 +13233,10 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12145 |
|
12146 |
$('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(status).on('click', $.proxy(function (e) {
|
12147 |
e.preventDefault();
|
12148 |
-
if (this.status ==
|
12149 |
this.setStatusNormal();
|
12150 |
} else {
|
12151 |
-
this.changeStatus(
|
12152 |
}
|
12153 |
}, this));
|
12154 |
|
@@ -12166,7 +13254,7 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12166 |
*/
|
12167 |
Layer.prototype.activate = function (e, context, preventExitFromSelection) {
|
12168 |
|
12169 |
-
|
12170 |
|
12171 |
if (this.item) {
|
12172 |
this.item.activate(null, context);
|
@@ -12177,7 +13265,7 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12177 |
|
12178 |
Layer.prototype.getHTML = function (base64) {
|
12179 |
|
12180 |
-
var $node =
|
12181 |
|
12182 |
var $item = this.item.getHTML(base64);
|
12183 |
$node.attr('style', $node.attr('style') + this.getStyleText())
|
@@ -12187,7 +13275,7 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12187 |
};
|
12188 |
|
12189 |
Layer.prototype.getData = function (params) {
|
12190 |
-
var data =
|
12191 |
|
12192 |
if (params.itemsIncluded) {
|
12193 |
data.item = this.item.getData();
|
@@ -12208,7 +13296,7 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12208 |
|
12209 |
Layer.prototype.getContents = function () {
|
12210 |
return this.item.$item;
|
12211 |
-
}
|
12212 |
|
12213 |
Layer.prototype.setSelf = function (self) {
|
12214 |
if (this.self != this) {
|
@@ -12216,80 +13304,159 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12216 |
}
|
12217 |
this.self = self;
|
12218 |
this.item.setSelf(self.item);
|
12219 |
-
}
|
12220 |
|
12221 |
Layer.prototype.getSelf = function () {
|
12222 |
if (this.self !== this) {
|
12223 |
this.self = this.self.getSelf();
|
12224 |
}
|
12225 |
return this.self;
|
12226 |
-
}
|
12227 |
|
12228 |
return Layer;
|
12229 |
});
|
12230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12231 |
"use strict";
|
12232 |
|
12233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12234 |
|
12235 |
this.baseSize = 16;
|
12236 |
|
12237 |
this.activeLayer = null;
|
12238 |
|
12239 |
-
this.$ =
|
12240 |
|
12241 |
this.isActiveGroupBlurred = true;
|
12242 |
|
12243 |
this.isMainGroup = true;
|
12244 |
-
this.
|
12245 |
-
this.layer =
|
12246 |
|
12247 |
-
this.layer.
|
12248 |
mainContainer: this,
|
12249 |
tolerance: 5,
|
12250 |
smartguides: $.proxy(function (context) {
|
12251 |
context.$layer.triggerHandler('LayerParent');
|
12252 |
-
return this.
|
12253 |
}, this),
|
12254 |
display: {
|
12255 |
hidden: true,
|
12256 |
show: $.proxy(function () {
|
12257 |
-
|
12258 |
}, this),
|
12259 |
update: $.proxy(function (e, position) {
|
12260 |
-
|
12261 |
|
12262 |
}, this),
|
12263 |
hide: $.proxy(function () {
|
12264 |
-
|
12265 |
}, this)
|
12266 |
},
|
12267 |
start: $.proxy(function (e, ui) {
|
12268 |
-
this.
|
12269 |
}, this),
|
12270 |
drag: $.proxy(function (e, ui) {
|
12271 |
-
this.
|
12272 |
|
12273 |
if (ui.layer) ui.layer.placement.current.triggerLayerResized();
|
12274 |
}, this),
|
12275 |
stop: $.proxy(function (e, ui) {
|
12276 |
-
this.
|
12277 |
|
12278 |
if (ui.layer) ui.layer.placement.current.triggerLayerResized();
|
12279 |
}, this)
|
12280 |
});
|
12281 |
-
this.canvasUIManager = this.layer.
|
12282 |
|
12283 |
-
this.layer.
|
12284 |
mainContainer: this,
|
12285 |
$fixed: $('#n2-ss-layers'),
|
12286 |
$scrolled: $('#n2-ss-layer-list')
|
12287 |
});
|
12288 |
-
this.layerListUIManager = this.layer.
|
12289 |
|
12290 |
this.layer.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />');
|
12291 |
|
12292 |
-
this.container = new
|
12293 |
|
12294 |
this.layerRow = this.container.$ul;
|
12295 |
|
@@ -12300,23 +13467,19 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12300 |
|
12301 |
MainContainer.prototype.lateInit = function () {
|
12302 |
|
12303 |
-
this.container.startWithExistingNodes();
|
12304 |
|
12305 |
this.layer.parent().on('click', $.proxy(function () {
|
12306 |
-
if (this.
|
12307 |
this.blurActiveGroup();
|
12308 |
} else {
|
12309 |
this.unBlurActiveGroup();
|
12310 |
}
|
12311 |
-
this.
|
12312 |
}, this));
|
12313 |
-
|
12314 |
-
|
12315 |
-
smartSlider.frontend.sliderElement.on('SliderResize', $.proxy(this.onResize, this));
|
12316 |
};
|
12317 |
|
12318 |
-
MainContainer.prototype.onResize = function (
|
12319 |
-
|
12320 |
var sortedLayerList = this.getEverySortedLayers();
|
12321 |
|
12322 |
for (var i = 0; i < sortedLayerList.length; i++) {
|
@@ -12366,21 +13529,21 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12366 |
if (this.isActiveGroupBlurred) {
|
12367 |
var group = this,
|
12368 |
activeLayer = this.activeLayer;
|
12369 |
-
if (this.
|
12370 |
group = activeLayer;
|
12371 |
-
} else if (this.
|
12372 |
group = activeLayer.container.getSortedLayers()[0];
|
12373 |
} else if (activeLayer) {
|
12374 |
group = activeLayer.group;
|
12375 |
}
|
12376 |
-
switch (this.
|
12377 |
case 'content':
|
12378 |
if (group == this) {
|
12379 |
-
group = this.
|
12380 |
}
|
12381 |
break;
|
12382 |
case 'canvas':
|
12383 |
-
if (group == this.
|
12384 |
group = this;
|
12385 |
}
|
12386 |
break;
|
@@ -12388,9 +13551,9 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12388 |
|
12389 |
return group;
|
12390 |
}
|
12391 |
-
switch (this.
|
12392 |
case 'content':
|
12393 |
-
return this.
|
12394 |
}
|
12395 |
return this;
|
12396 |
};
|
@@ -12417,10 +13580,10 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12417 |
|
12418 |
MainContainer.prototype.layerDeleted = function (layer) {
|
12419 |
|
12420 |
-
var i = this.
|
12421 |
while (i--) {
|
12422 |
-
if (layer == this.
|
12423 |
-
this.
|
12424 |
}
|
12425 |
}
|
12426 |
|
@@ -12432,7 +13595,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12432 |
MainContainer.prototype._afterLayerDeletedDeBounced = NextendDeBounce(function (layer) {
|
12433 |
|
12434 |
if (!this.activeLayer || this.activeLayer.isDeleted) {
|
12435 |
-
this.
|
12436 |
}
|
12437 |
}, 50);
|
12438 |
|
@@ -12465,9 +13628,12 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12465 |
return this;
|
12466 |
};
|
12467 |
|
12468 |
-
MainContainer.prototype.createLayerAnimations = function (
|
12469 |
-
|
12470 |
-
var
|
|
|
|
|
|
|
12471 |
for (var i = 0; i < children.length; i++) {
|
12472 |
animations.push.apply(animations, children[i].createLayerAnimations(horizontalRatio, verticalRatio));
|
12473 |
}
|
@@ -12475,19 +13641,19 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12475 |
};
|
12476 |
|
12477 |
MainContainer.prototype.getDroppables = function (exclude) {
|
12478 |
-
var editorMode = this.
|
12479 |
droppables = [],
|
12480 |
layers;
|
12481 |
|
12482 |
if (editorMode == 'canvas') {
|
12483 |
droppables.push(this.getDroppable());
|
12484 |
layers = this.container.getSortedLayers();
|
12485 |
-
var index = $.inArray(this.
|
12486 |
if (index > -1) {
|
12487 |
layers.splice(index, 1);
|
12488 |
}
|
12489 |
} else if (editorMode == 'content') {
|
12490 |
-
layers = [this.
|
12491 |
}
|
12492 |
|
12493 |
for (var i = 0; i < layers.length; i++) {
|
@@ -12539,17 +13705,17 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12539 |
|
12540 |
this.deleteLayers();
|
12541 |
|
12542 |
-
this.
|
12543 |
|
12544 |
|
12545 |
for (var i = 0; i < layerNodes.length; i++) {
|
12546 |
layers.push(this.container.append(layerNodes[i]));
|
12547 |
}
|
12548 |
|
12549 |
-
this.
|
12550 |
|
12551 |
this.container.layerContainerElement.n2imagesLoaded()
|
12552 |
-
.always($.proxy(this.
|
12553 |
|
12554 |
if (!this.getSelectedLayer()) {
|
12555 |
if (layers.length > 0) {
|
@@ -12557,8 +13723,8 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12557 |
}
|
12558 |
}
|
12559 |
|
12560 |
-
if (
|
12561 |
-
|
12562 |
}
|
12563 |
|
12564 |
return layers;
|
@@ -12569,7 +13735,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12569 |
historicalLayers[i].getSelf().delete();
|
12570 |
}
|
12571 |
|
12572 |
-
this.
|
12573 |
};
|
12574 |
|
12575 |
MainContainer.prototype.historyReplaceLayers = function (layersData, historicalLayers, historicalAllLayers) {
|
@@ -12591,9 +13757,9 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12591 |
layers.push(group.container.append(layerNodes[i]));
|
12592 |
}
|
12593 |
|
12594 |
-
this.
|
12595 |
|
12596 |
-
|
12597 |
|
12598 |
return layers;
|
12599 |
};
|
@@ -12617,7 +13783,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12617 |
switch (layers[i].type) {
|
12618 |
case 'group':
|
12619 |
console.error('Group data to layer not implemented!');
|
12620 |
-
//new
|
12621 |
break;
|
12622 |
case 'row':
|
12623 |
nodes.push(this.buildRowNode(layers[i], $targetGroupContent));
|
@@ -12665,7 +13831,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12665 |
case 'object':
|
12666 |
this._idTranslation[layerData.parentid].done($.proxy(function ($_layer, originalID, newID) {
|
12667 |
$_layer.data('parentid', newID);
|
12668 |
-
}, this, $layer))
|
12669 |
break;
|
12670 |
default:
|
12671 |
layerData.parentid = '';
|
@@ -12676,7 +13842,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12676 |
|
12677 |
MainContainer.prototype.buildContentNode = function (layerData, $targetGroupContent) {
|
12678 |
|
12679 |
-
var $layer = $("<div class='n2-ss-layer' data-
|
12680 |
$content = $("<div class='n2-ss-section-main-content n2-ss-layer-content' />").appendTo($layer);
|
12681 |
for (var k in layerData) {
|
12682 |
$layer.data(k, layerData[k]);
|
@@ -12693,7 +13859,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12693 |
|
12694 |
MainContainer.prototype.buildRowNode = function (layerData, $targetGroupContent) {
|
12695 |
|
12696 |
-
var $layer = $("<div class='n2-ss-layer' data-
|
12697 |
$content = $("<div class='n2-ss-layer-row' />").appendTo($layer);
|
12698 |
|
12699 |
this._buildNodePrepareID($layer, layerData);
|
@@ -12712,7 +13878,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12712 |
|
12713 |
MainContainer.prototype.buildColNode = function (layerData, $targetGroupContent) {
|
12714 |
|
12715 |
-
var $layer = $("<div class='n2-ss-layer' data-
|
12716 |
$content = $("<div class='n2-ss-layer-col n2-ss-layer-content' />").appendTo($layer);
|
12717 |
for (var k in layerData) {
|
12718 |
$layer.data(k, layerData[k]);
|
@@ -12729,7 +13895,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12729 |
|
12730 |
MainContainer.prototype.buildLayerNode = function (layerData, $targetGroupContent) {
|
12731 |
|
12732 |
-
var $layer = $("<div class='n2-ss-layer' data-
|
12733 |
.attr('style', layerData.style);
|
12734 |
|
12735 |
var storedIndex = 1;
|
@@ -12764,50 +13930,83 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12764 |
|
12765 |
return MainContainer;
|
12766 |
});
|
12767 |
-
|
12768 |
"use strict";
|
12769 |
|
12770 |
/**
|
|
|
|
|
|
|
|
|
|
|
12771 |
* @constructor
|
12772 |
* @augments ComponentAbstract
|
12773 |
-
* @memberof scope
|
12774 |
*/
|
12775 |
-
function Row(
|
12776 |
this.label = n2_('Row');
|
12777 |
this.type = 'row';
|
12778 |
|
12779 |
this._syncbgThrottled = NextendThrottle(this._syncbgThrottled, 50);
|
12780 |
|
12781 |
-
this.innerContainer = '> .n2-ss-layer-row';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12782 |
|
12783 |
this.columnsField = $('#layerrow-columns').data('field');
|
12784 |
|
12785 |
this.refreshUI = NextendDeBounce(this.refreshUI, 100);
|
12786 |
|
12787 |
-
|
|
|
|
|
12788 |
|
12789 |
this.placement.allow('absolute');
|
12790 |
this.placement.allow('normal');
|
12791 |
}
|
12792 |
|
12793 |
-
Row.prototype = Object.create(
|
12794 |
Row.prototype.constructor = Row;
|
12795 |
|
12796 |
Row.prototype.addProperties = function ($layer) {
|
12797 |
|
12798 |
this.createProperty('opened', 1, $layer, this);
|
12799 |
|
12800 |
-
|
|
|
|
|
|
|
|
|
12801 |
this.createProperty('bgimage', '', $layer);
|
12802 |
this.createProperty('bgimagex', 50, $layer);
|
12803 |
this.createProperty('bgimagey', 50, $layer);
|
12804 |
this.createProperty('bgimageparallax', 0, $layer);
|
12805 |
-
this.createProperty('bgcolor', '00000000', $layer);
|
12806 |
-
this.createProperty('bgcolorgradient', 'off', $layer);
|
12807 |
-
this.createProperty('bgcolorgradientend', '00000000', $layer);
|
12808 |
|
12809 |
-
this.
|
12810 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12811 |
|
12812 |
this.createProperty('fullwidth', 1, $layer);
|
12813 |
this.createProperty('stretch', 0, $layer);
|
@@ -12817,14 +14016,16 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
12817 |
this.createDeviceProperty('padding', {desktopPortrait: '10|*|10|*|10|*|10|*|px+'}, $layer);
|
12818 |
this.createDeviceProperty('gutter', {desktopPortrait: 20}, $layer);
|
12819 |
this.createDeviceProperty('wrapafter', {desktopPortrait: 0, mobilePortrait: 1, mobileLandscape: 1}, $layer);
|
12820 |
-
|
|
|
|
|
12821 |
|
12822 |
Row.prototype.historyDeleteSelf = function () {
|
12823 |
this.delete();
|
12824 |
-
}
|
12825 |
|
12826 |
Row.prototype.historyCreateSelf = function (historyGroup, preset, historyCols) {
|
12827 |
-
var newLayer = new
|
12828 |
newLayer.create(preset);
|
12829 |
|
12830 |
this.setSelf(newLayer);
|
@@ -12833,16 +14034,19 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
12833 |
for (var i = 0; i < newCols.length; i++) {
|
12834 |
historyCols[i].setSelf(newCols[i]);
|
12835 |
}
|
12836 |
-
}
|
12837 |
|
12838 |
Row.prototype.create = function (preset) {
|
12839 |
var cb,
|
12840 |
_createRawRow = function (cols) {
|
12841 |
-
return $("<div class='n2-ss-layer' />")
|
12842 |
-
.
|
|
|
|
|
|
|
12843 |
},
|
12844 |
_createRawCol = function (inner) {
|
12845 |
-
return $("<div class='n2-ss-layer' data-
|
12846 |
};
|
12847 |
switch (preset) {
|
12848 |
case '2col':
|
@@ -12898,7 +14102,7 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
12898 |
};
|
12899 |
}
|
12900 |
|
12901 |
-
if (this.group.container.allowedPlacementMode
|
12902 |
this.originalProperties = $.extend({
|
12903 |
width: '100%',
|
12904 |
align: 'center',
|
@@ -12907,11 +14111,11 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
12907 |
}, this.originalProperties);
|
12908 |
}
|
12909 |
|
12910 |
-
|
12911 |
|
12912 |
this.initUI();
|
12913 |
|
12914 |
-
this.container.startWithExistingNodes();
|
12915 |
|
12916 |
this._syncpadding();
|
12917 |
this._syncinneralign();
|
@@ -12926,18 +14130,18 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
12926 |
this.container.renderModeProperties();
|
12927 |
|
12928 |
|
12929 |
-
|
12930 |
|
12931 |
this._onReady();
|
12932 |
-
}
|
12933 |
|
12934 |
-
Row.prototype.load = function ($layer) {
|
12935 |
|
12936 |
-
|
12937 |
|
12938 |
this.initUI();
|
12939 |
|
12940 |
-
this.container.startWithExistingNodes();
|
12941 |
|
12942 |
this._syncpadding();
|
12943 |
this._syncinneralign();
|
@@ -12948,20 +14152,20 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
12948 |
this._syncboxshadow();
|
12949 |
|
12950 |
this._onReady();
|
12951 |
-
}
|
12952 |
|
12953 |
Row.prototype.initUI = function () {
|
12954 |
|
12955 |
-
this.layer.
|
12956 |
-
canvasUIManager: this.
|
12957 |
layer: this,
|
12958 |
$layer: this.layer
|
12959 |
});
|
12960 |
|
12961 |
this.layer.on({
|
12962 |
-
mousedown: $.proxy(
|
12963 |
click: $.proxy(function (e) {
|
12964 |
-
if (!nextend.shouldPreventMouseUp && this.
|
12965 |
this.activate(e);
|
12966 |
}
|
12967 |
}, this),
|
@@ -12971,58 +14175,60 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
12971 |
}, this)
|
12972 |
});
|
12973 |
|
12974 |
-
this.$row.
|
12975 |
handles: 'n, s, e, w',
|
12976 |
start: $.proxy(function (e, ui) {
|
12977 |
-
|
12978 |
}, this),
|
12979 |
spacing: $.proxy(function (e, ui) {
|
12980 |
var html = '';
|
12981 |
for (var k in ui.changed) {
|
12982 |
html += 'Padding ' + k + ': ' + ui.changed[k] + 'px<br>';
|
12983 |
}
|
12984 |
-
|
12985 |
}, this),
|
12986 |
stop: $.proxy(this.____makeLayerResizeableStop, this),
|
12987 |
});
|
12988 |
|
12989 |
-
this.$row.
|
12990 |
columns: '1',
|
12991 |
gutter: this.getGutter(),
|
12992 |
start: $.proxy(function (e, ui) {
|
12993 |
-
|
12994 |
}, this),
|
12995 |
colwidth: $.proxy(function (e, ui) {
|
12996 |
this.updateColumnWidth(ui.currentPercent);
|
12997 |
|
12998 |
-
|
12999 |
|
13000 |
|
13001 |
}, this),
|
13002 |
stop: $.proxy(function (e, ui) {
|
13003 |
-
|
13004 |
|
13005 |
this.setRealColsWidth(ui.currentFractions);
|
13006 |
}, this)
|
13007 |
});
|
13008 |
|
13009 |
-
|
|
|
|
|
13010 |
distance: 10,
|
13011 |
-
|
13012 |
forceHelperSize: true,
|
13013 |
forcePlaceholderSize: true,
|
13014 |
items: '> .n2-ss-layer',
|
13015 |
handle: " > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self",
|
13016 |
start: $.proxy(function (e, ui) {
|
|
|
|
|
13017 |
|
13018 |
var parts = this.getColumns().split('+');
|
13019 |
|
13020 |
ui.placeholder.css({
|
13021 |
width: ((new Fraction(parts[ui.item.data('layerObject').getIndex()])).valueOf() * 100) + '%',
|
13022 |
-
height: ui.helper.height(),
|
13023 |
visibility: 'visible',
|
13024 |
-
|
13025 |
-
marginTop: this.getGutter() + 'px'
|
13026 |
});
|
13027 |
if (ui.helper.hasClass('n2-ss-last-in-row')) {
|
13028 |
ui.placeholder.addClass('n2-ss-last-in-row');
|
@@ -13033,36 +14239,52 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13033 |
ui.placeholder.attr('data-r', ui.helper.attr('data-r'));
|
13034 |
|
13035 |
}, this),
|
|
|
|
|
|
|
|
|
|
|
13036 |
stop: $.proxy(function (e, ui) {
|
|
|
|
|
|
|
13037 |
|
13038 |
-
|
13039 |
-
|
13040 |
-
|
|
|
|
|
13041 |
|
13042 |
-
|
13043 |
-
|
13044 |
-
|
13045 |
-
|
13046 |
-
|
13047 |
-
|
13048 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13049 |
}
|
13050 |
-
if (oldIndex
|
13051 |
this.moveCol(oldIndex, newIndex);
|
13052 |
}
|
13053 |
}, this)
|
13054 |
});
|
13055 |
-
}
|
13056 |
|
13057 |
Row.prototype.____makeLayerResizeableStop = function (event, ui) {
|
13058 |
-
|
13059 |
var padding = this.getPadding().split('|*|'),
|
13060 |
ratioH = 1,
|
13061 |
ratioV = 1;
|
13062 |
|
13063 |
if (padding[padding.length - 1] == 'px+' && Math.abs(parseFloat(this.layer.css('fontSize')) - this.baseSize) > 1) {
|
13064 |
-
ratioH = this.
|
13065 |
-
ratioV = this.
|
13066 |
}
|
13067 |
|
13068 |
for (var k in ui.changed) {
|
@@ -13087,35 +14309,45 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13087 |
};
|
13088 |
|
13089 |
Row.prototype._createLayer = function () {
|
13090 |
-
return $('<div class="n2-ss-layer"><div class="n2-ss-layer-row"></div></div>')
|
13091 |
-
.attr('data-
|
13092 |
-
}
|
13093 |
|
13094 |
Row.prototype.historyDeleteCol = function (historicalRow, historicalCol) {
|
13095 |
historicalCol.getSelf().delete();
|
13096 |
-
}
|
13097 |
|
13098 |
Row.prototype.historyCreateCol = function (historicalRow, historicalCol) {
|
13099 |
var newCol = historicalRow.getSelf().createCol();
|
13100 |
historicalCol.setSelf(newCol);
|
13101 |
-
}
|
13102 |
|
13103 |
Row.prototype.createCol = function () {
|
13104 |
|
13105 |
-
var col = new
|
13106 |
-
|
13107 |
col.create();
|
13108 |
if (this.isReady()) {
|
13109 |
this.placement.updatePosition();
|
13110 |
}
|
13111 |
|
13112 |
return col;
|
13113 |
-
}
|
13114 |
|
13115 |
Row.prototype.createRow = function () {
|
13116 |
this.$row = this.layer.find('.n2-ss-layer-row:first');
|
13117 |
-
this
|
13118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13119 |
|
13120 |
var status = $('<div class="n2-ss-layer-status"></div>'),
|
13121 |
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)),
|
@@ -13125,10 +14357,10 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13125 |
|
13126 |
$('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(status).on('click', $.proxy(function (e) {
|
13127 |
e.preventDefault();
|
13128 |
-
if (this.status ==
|
13129 |
this.setStatusNormal();
|
13130 |
} else {
|
13131 |
-
this.changeStatus(
|
13132 |
}
|
13133 |
}, this));
|
13134 |
|
@@ -13144,12 +14376,13 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13144 |
this.container.$ul.appendTo(this.layerRow);
|
13145 |
|
13146 |
this.readyDeferred.done($.proxy(this._syncopened, this));
|
13147 |
-
}
|
|
|
13148 |
Row.prototype.activate = function () {
|
13149 |
-
|
13150 |
|
13151 |
this.columnsField.setRow(this);
|
13152 |
-
}
|
13153 |
|
13154 |
Row.prototype.switchOpened = function (e) {
|
13155 |
e.preventDefault();
|
@@ -13181,7 +14414,7 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13181 |
columns.push(layers[i].getProperty('colwidth'));
|
13182 |
}
|
13183 |
return columns.join('+');
|
13184 |
-
}
|
13185 |
|
13186 |
Row.prototype.getColumnsOrdered = function () {
|
13187 |
var layers = this.getOrderedColumns(),
|
@@ -13190,7 +14423,7 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13190 |
columns.push(layers[i].getProperty('colwidth'));
|
13191 |
}
|
13192 |
return columns.join('+');
|
13193 |
-
}
|
13194 |
|
13195 |
Row.prototype._synccolumns = function () {
|
13196 |
var layers = this.container.getSortedLayers();
|
@@ -13198,11 +14431,11 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13198 |
layers[i]._synccolwidth();
|
13199 |
}
|
13200 |
this.update();
|
13201 |
-
}
|
13202 |
|
13203 |
Row.prototype.getPadding = function () {
|
13204 |
return this.getProperty('padding');
|
13205 |
-
}
|
13206 |
|
13207 |
Row.prototype._syncpadding = function () {
|
13208 |
var padding = this.getPadding().split('|*|'),
|
@@ -13218,116 +14451,162 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13218 |
|
13219 |
var css = padding.join(unit + ' ') + unit;
|
13220 |
this.$row.css('padding', css);
|
13221 |
-
this.$row.
|
13222 |
|
13223 |
this.update();
|
13224 |
-
}
|
13225 |
|
13226 |
Row.prototype.getGutter = function () {
|
13227 |
return this.getProperty('gutter');
|
13228 |
-
}
|
13229 |
|
13230 |
Row.prototype._syncgutter = function () {
|
13231 |
-
var gutterValue = this.getGutter()
|
|
|
13232 |
cols = this.container.getSortedLayers();
|
13233 |
if (cols.length > 0) {
|
13234 |
for (var i = cols.length - 1; i >= 0; i--) {
|
13235 |
cols[i].layer
|
13236 |
-
.css('
|
13237 |
-
.css('marginTop', gutterValue);
|
13238 |
}
|
13239 |
}
|
13240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13241 |
this.update();
|
13242 |
-
}
|
13243 |
|
13244 |
Row.prototype._syncwrapafter = function () {
|
13245 |
if (!this.isDeleted && !this.isDeleteStarted) {
|
13246 |
var wrapAfter = parseInt(this.getProperty('wrapafter')),
|
13247 |
columns = this.getOrderedColumns(),
|
13248 |
-
isWrapped = false
|
|
|
13249 |
|
13250 |
-
for (
|
13251 |
if (!columns[i].showsOnCurrent) {
|
13252 |
columns.splice(i, 1);
|
13253 |
}
|
13254 |
}
|
13255 |
|
13256 |
-
|
|
|
13257 |
|
13258 |
-
if (wrapAfter > 0 && wrapAfter <
|
13259 |
isWrapped = true;
|
13260 |
}
|
13261 |
|
13262 |
-
this.$row.
|
13263 |
-
|
13264 |
-
this.$row.toggleClass('n2-ss-row-wrapped', isWrapped);
|
13265 |
|
13266 |
if (isWrapped) {
|
13267 |
-
|
13268 |
-
|
13269 |
-
|
13270 |
-
if (
|
13271 |
-
|
13272 |
-
|
13273 |
-
|
13274 |
-
|
13275 |
-
|
13276 |
-
|
13277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13278 |
}
|
13279 |
}
|
13280 |
} else {
|
13281 |
-
|
|
|
|
|
|
|
|
|
13282 |
columns[i].layer
|
|
|
13283 |
.removeClass('n2-ss-last-in-row')
|
13284 |
.attr('data-r', 0);
|
13285 |
}
|
13286 |
-
if (
|
13287 |
-
columns[
|
13288 |
-
} else {
|
13289 |
-
console.error('The row does not have col.');
|
13290 |
}
|
13291 |
}
|
13292 |
|
13293 |
this.update();
|
13294 |
}
|
13295 |
-
}
|
13296 |
|
13297 |
Row.prototype.getOrderedColumns = function () {
|
13298 |
return this.container.getSortedLayers().sort(function (a, b) {
|
13299 |
return a.getRealOrder() - b.getRealOrder();
|
13300 |
});
|
13301 |
-
}
|
13302 |
|
13303 |
Row.prototype.getInnerAlign = function () {
|
13304 |
return this.getProperty('inneralign');
|
13305 |
-
}
|
13306 |
|
13307 |
Row.prototype._syncinneralign = function () {
|
13308 |
this.layer.attr('data-csstextalign', this.getInnerAlign());
|
13309 |
-
}
|
13310 |
|
13311 |
Row.prototype._syncfullwidth = function () {
|
13312 |
-
this.layer.
|
13313 |
-
}
|
13314 |
|
13315 |
Row.prototype._syncstretch = function () {
|
13316 |
this.layer.toggleClass('n2-ss-stretch-layer', this.getProperty('stretch') == 1);
|
13317 |
-
}
|
13318 |
|
13319 |
-
Row.prototype._syncborderradius =
|
13320 |
-
|
13321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13322 |
|
13323 |
-
Row.prototype.
|
13324 |
-
var boxShadow = this.getProperty('boxshadow').split('|*|');
|
13325 |
if ((boxShadow[0] != 0 || boxShadow[1] != 0 || boxShadow[2] != 0 || boxShadow[3] != 0) && N2Color.hex2alpha(boxShadow[4]) != 0) {
|
13326 |
-
|
13327 |
-
} else {
|
13328 |
-
this.$row.css('box-shadow', '');
|
13329 |
}
|
13330 |
-
|
|
|
|
|
|
|
|
|
13331 |
|
13332 |
Row.prototype._syncbgimage =
|
13333 |
Row.prototype._syncbgimagex =
|
@@ -13335,13 +14614,18 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13335 |
Row.prototype._syncbgimageparallax =
|
13336 |
Row.prototype._syncbgcolor =
|
13337 |
Row.prototype._syncbgcolorgradient =
|
13338 |
-
Row.prototype._syncbgcolorgradientend =
|
13339 |
-
|
13340 |
-
|
|
|
|
|
|
|
|
|
13341 |
|
13342 |
Row.prototype._syncbgThrottled = function () {
|
13343 |
var background = '',
|
13344 |
-
image =
|
|
|
13345 |
if (image != '') {
|
13346 |
var x = parseInt(this.getProperty('bgimagex'));
|
13347 |
if (!isFinite(x)) {
|
@@ -13351,59 +14635,87 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13351 |
if (!isFinite(y)) {
|
13352 |
y = 50;
|
13353 |
}
|
13354 |
-
background += '
|
|
|
13355 |
}
|
13356 |
var color = this.getProperty('bgcolor'),
|
13357 |
gradient = this.getProperty('bgcolorgradient'),
|
13358 |
colorend = this.getProperty('bgcolorgradientend');
|
13359 |
|
13360 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13361 |
var after = '';
|
13362 |
-
if (
|
13363 |
-
after = ',' +
|
13364 |
}
|
13365 |
switch (gradient) {
|
13366 |
case 'horizontal':
|
13367 |
-
|
13368 |
-
|
13369 |
-
|
13370 |
-
.css('background', 'linear-gradient(to right, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
13371 |
-
break;
|
13372 |
case 'vertical':
|
13373 |
-
|
13374 |
-
|
13375 |
-
|
13376 |
-
.css('background', 'linear-gradient(to bottom, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
13377 |
-
break;
|
13378 |
case 'diagonal1':
|
13379 |
-
|
13380 |
-
|
13381 |
-
|
13382 |
-
.css('background', 'linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
13383 |
-
break;
|
13384 |
case 'diagonal2':
|
13385 |
-
|
13386 |
-
|
13387 |
-
|
13388 |
-
.css('background', 'linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after);
|
13389 |
-
break;
|
13390 |
case 'off':
|
13391 |
default:
|
13392 |
-
if (
|
13393 |
-
background
|
13394 |
-
} else {
|
13395 |
-
background += N2Color.hex2rgbaCSS(color);
|
13396 |
}
|
13397 |
-
|
13398 |
-
break;
|
13399 |
}
|
13400 |
-
} else {
|
13401 |
-
|
13402 |
}
|
|
|
13403 |
};
|
13404 |
|
13405 |
Row.prototype.getData = function (params) {
|
13406 |
-
var data =
|
13407 |
|
13408 |
if (params.itemsIncluded) {
|
13409 |
data.cols = this.container.getData(params);
|
@@ -13422,7 +14734,7 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13422 |
if (this.getMode() == 'desktopPortrait') {
|
13423 |
this._moveCol(oldIndex, newIndex);
|
13424 |
|
13425 |
-
var task =
|
13426 |
if (task) {
|
13427 |
task.setValues({
|
13428 |
oldIndex: newIndex,
|
@@ -13442,54 +14754,94 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13442 |
}
|
13443 |
this.refreshUI();
|
13444 |
}
|
13445 |
-
}
|
|
|
13446 |
Row.prototype._moveCol = function (oldIndex, newIndex) {
|
13447 |
|
13448 |
var layers = this.container.getSortedLayers();
|
13449 |
-
if (newIndex > oldIndex) {
|
13450 |
-
newIndex++;
|
13451 |
-
}
|
13452 |
this.container.insertLayerAt(layers[oldIndex], newIndex);
|
13453 |
|
13454 |
this.refreshUI();
|
13455 |
-
}
|
13456 |
|
13457 |
Row.prototype.historyMoveCol = function (data) {
|
13458 |
|
13459 |
this._moveCol(data.oldIndex, data.newIndex);
|
13460 |
-
}
|
13461 |
|
13462 |
Row.prototype.setColsWidth = function (fractions) {
|
13463 |
var cols = this.container.getSortedLayers();
|
13464 |
for (var i = 0; i < fractions.length; i++) {
|
13465 |
cols[i].setProperty('colwidth', fractions[i].toFraction());
|
13466 |
}
|
|
|
|
|
13467 |
this.update();
|
13468 |
|
13469 |
this.refreshUI();
|
13470 |
-
}
|
13471 |
|
13472 |
Row.prototype.setRealColsWidth = function (fractions) {
|
13473 |
var cols = this.getOrderedColumns();
|
13474 |
for (var i = 0; i < fractions.length; i++) {
|
13475 |
cols[i].setProperty('colwidth', fractions[i].toFraction());
|
13476 |
}
|
|
|
|
|
13477 |
this.update();
|
13478 |
|
13479 |
this.refreshUI();
|
13480 |
-
}
|
13481 |
|
13482 |
Row.prototype.updateColumnWidth = function (widths) {
|
13483 |
-
var
|
13484 |
-
|
13485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13486 |
}
|
13487 |
-
|
13488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13489 |
|
13490 |
Row.prototype.activateColumn = function (index, e) {
|
13491 |
this.container.getSortedLayers()[index].activate(e);
|
13492 |
-
}
|
13493 |
|
13494 |
Row.prototype.onChildCountChange = function () {
|
13495 |
if (!this.isDeleted && !this.isDeleteStarted) {
|
@@ -13514,22 +14866,20 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13514 |
this.refreshUI();
|
13515 |
}
|
13516 |
this._syncgutter();
|
13517 |
-
this._syncwrapafter();
|
13518 |
}
|
13519 |
-
}
|
13520 |
|
13521 |
Row.prototype.renderModeProperties = function (isReset) {
|
13522 |
-
|
13523 |
|
13524 |
this._syncpadding();
|
13525 |
this._syncinneralign();
|
13526 |
-
this._syncwrapafter();
|
13527 |
this._syncgutter();
|
13528 |
|
13529 |
if (this.isActive) {
|
13530 |
this.columnsField.setRow(this);
|
13531 |
}
|
13532 |
-
}
|
13533 |
|
13534 |
Row.prototype.hightlightStructure = function (hideInterval) {
|
13535 |
|
@@ -13544,7 +14894,7 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13544 |
this.layer.removeClass('n2-highlight-structure');
|
13545 |
}
|
13546 |
}, this), hideInterval);
|
13547 |
-
}
|
13548 |
|
13549 |
Row.prototype.refreshUI = function () {
|
13550 |
if (!this.isDeleteStarted) {
|
@@ -13552,9 +14902,9 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13552 |
this.columnsField.setRow(this);
|
13553 |
}
|
13554 |
this._syncwrapafter();
|
13555 |
-
this.$row.
|
13556 |
}
|
13557 |
-
}
|
13558 |
|
13559 |
Row.prototype.getDroppable = function () {
|
13560 |
if (!this.layer.is(":visible") || this.status == N2Classes.ComponentAbstract.STATUS.HIDDEN || this.status == N2Classes.ComponentAbstract.STATUS.LOCKED) {
|
@@ -13566,7 +14916,7 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13566 |
placement: 'normal',
|
13567 |
axis: 'x'
|
13568 |
}
|
13569 |
-
}
|
13570 |
|
13571 |
Row.prototype.getLLDroppable = function (layer) {
|
13572 |
switch (layer.type) {
|
@@ -13580,23 +14930,44 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13580 |
break;
|
13581 |
}
|
13582 |
return false;
|
13583 |
-
}
|
13584 |
|
13585 |
Row.prototype.getContents = function () {
|
13586 |
return this.$row;
|
13587 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13588 |
|
13589 |
return Row;
|
13590 |
});
|
13591 |
-
|
13592 |
"use strict";
|
13593 |
|
13594 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13595 |
this.componentType = 'undefined';
|
13596 |
this.placementType = 'undefined';
|
13597 |
|
13598 |
-
$('html')
|
13599 |
-
|
|
|
13600 |
|
13601 |
this.currentForm = {};
|
13602 |
|
@@ -13616,6 +14987,7 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13616 |
},
|
13617 |
global: {
|
13618 |
id: $('#layerid'),
|
|
|
13619 |
desktopPortrait: $('#layershow-desktop-portrait'),
|
13620 |
desktopLandscape: $('#layershow-desktop-landscape'),
|
13621 |
tabletPortrait: $('#layershow-tablet-portrait'),
|
@@ -13637,23 +15009,23 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13637 |
stop: $('#layeronstop')
|
13638 |
}
|
13639 |
};
|
13640 |
-
this.
|
13641 |
|
|
|
13642 |
|
13643 |
-
|
13644 |
-
if (!responsive.enabled('desktop', 'Landscape')) {
|
13645 |
this.forms.global.desktopLandscape.closest('.n2-mixed-group').css('display', 'none');
|
13646 |
}
|
13647 |
-
if (!
|
13648 |
this.forms.global.tabletPortrait.closest('.n2-mixed-group').css('display', 'none');
|
13649 |
}
|
13650 |
-
if (!
|
13651 |
this.forms.global.tabletLandscape.closest('.n2-mixed-group').css('display', 'none');
|
13652 |
}
|
13653 |
-
if (!
|
13654 |
this.forms.global.mobilePortrait.closest('.n2-mixed-group').css('display', 'none');
|
13655 |
}
|
13656 |
-
if (!
|
13657 |
this.forms.global.mobileLandscape.closest('.n2-mixed-group').css('display', 'none');
|
13658 |
}
|
13659 |
|
@@ -13668,14 +15040,14 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13668 |
height: $('#layerheight'),
|
13669 |
responsivesize: $('#layerresponsive-size'),
|
13670 |
align: $('#layeralign'),
|
13671 |
-
valign: $('#layervalign')
|
13672 |
};
|
13673 |
|
13674 |
this.forms.placement.normal = {
|
13675 |
margin: $('#layernormal-margin'),
|
13676 |
height: $('#layernormal-height'),
|
13677 |
maxwidth: $('#layernormal-maxwidth'),
|
13678 |
-
selfalign: $('#layernormal-selfalign')
|
13679 |
};
|
13680 |
|
13681 |
this.forms.component.content = {
|
@@ -13684,6 +15056,7 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13684 |
padding: $('#layercontent-padding'),
|
13685 |
inneralign: $('#layercontent-inneralign'),
|
13686 |
verticalalign: $('#layercontent-verticalalign'),
|
|
|
13687 |
bgcolor: $('#layercontent-background-color'),
|
13688 |
bgimage: $('#layercontent-background-image'),
|
13689 |
bgimagex: $('#layercontent-background-focus-x'),
|
@@ -13693,7 +15066,7 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13693 |
bgcolorgradientend: $('#layercontent-background-color-end'),
|
13694 |
opened: $('#layercontent-opened')
|
13695 |
};
|
13696 |
-
|
13697 |
|
13698 |
this.forms.component.row = {
|
13699 |
padding: $('#layerrow-padding'),
|
@@ -13702,10 +15075,12 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13702 |
stretch: $('#layerrow-stretch'),
|
13703 |
wrapafter: $('#layerrow-wrap-after'),
|
13704 |
inneralign: $('#layerrow-inneralign'),
|
|
|
13705 |
bgimage: $('#layerrow-background-image'),
|
13706 |
bgimagex: $('#layerrow-background-focus-x'),
|
13707 |
bgimagey: $('#layerrow-background-focus-y'),
|
13708 |
bgimageparallax: $('#layerrow-background-parallax'),
|
|
|
13709 |
bgcolor: $('#layerrow-background-color'),
|
13710 |
bgcolorgradient: $('#layerrow-background-gradient'),
|
13711 |
bgcolorgradientend: $('#layerrow-background-color-end'),
|
@@ -13713,19 +15088,20 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13713 |
boxshadow: $('#layerrow-boxshadow'),
|
13714 |
opened: $('#layerrow-opened')
|
13715 |
};
|
13716 |
-
|
13717 |
|
13718 |
this.forms.component.col = {
|
13719 |
maxwidth: $('#layercol-maxwidth'),
|
13720 |
padding: $('#layercol-padding'),
|
13721 |
inneralign: $('#layercol-inneralign'),
|
13722 |
verticalalign: $('#layercol-verticalalign'),
|
13723 |
-
bgcolor: $('#layercol-background-color'),
|
13724 |
link: $('#layercol-link'),
|
13725 |
bgimage: $('#layercol-background-image'),
|
13726 |
bgimagex: $('#layercol-background-focus-x'),
|
13727 |
bgimagey: $('#layercol-background-focus-y'),
|
13728 |
bgimageparallax: $('#layercol-background-parallax'),
|
|
|
|
|
13729 |
bgcolorgradient: $('#layercol-background-gradient'),
|
13730 |
bgcolorgradientend: $('#layercol-background-color-end'),
|
13731 |
borderradius: $('#layercol-border-radius'),
|
@@ -13737,8 +15113,8 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13737 |
colwidth: $('#layercol-colwidth'),
|
13738 |
order: $('#layercol-order')
|
13739 |
};
|
13740 |
-
|
13741 |
-
|
13742 |
}
|
13743 |
|
13744 |
ComponentSettings.prototype.changeActiveComponent = function (layer, componentType, placementType, properties) {
|
@@ -13747,21 +15123,23 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13747 |
if (this.componentType != componentType) {
|
13748 |
|
13749 |
$('html').attr('data-component', componentType);
|
|
|
|
|
13750 |
switch (componentType) {
|
13751 |
case 'content':
|
13752 |
-
|
13753 |
break;
|
13754 |
case 'layer':
|
13755 |
-
|
13756 |
break;
|
13757 |
case 'group':
|
13758 |
-
|
13759 |
break;
|
13760 |
case 'row':
|
13761 |
-
|
13762 |
break;
|
13763 |
case 'col':
|
13764 |
-
|
13765 |
break;
|
13766 |
|
13767 |
}
|
@@ -13771,7 +15149,7 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13771 |
|
13772 |
this.changeActiveComponentPlacement(placementType);
|
13773 |
this.syncFields(properties);
|
13774 |
-
}
|
13775 |
|
13776 |
ComponentSettings.prototype.changeActiveComponentPlacement = function (placementType, properties) {
|
13777 |
|
@@ -13781,7 +15159,7 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13781 |
}
|
13782 |
|
13783 |
this.syncFields(properties);
|
13784 |
-
}
|
13785 |
|
13786 |
ComponentSettings.prototype.syncFields = function (properties) {
|
13787 |
if (typeof properties == 'object') {
|
@@ -13789,23 +15167,26 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13789 |
|
13790 |
for (var name in properties) {
|
13791 |
if (typeof properties[name] !== undefined) {
|
|
|
13792 |
this.updateField(name, properties[name]);
|
13793 |
} else {
|
13794 |
console.error('Value is undefined for: ' + name);
|
13795 |
}
|
13796 |
}
|
13797 |
|
|
|
|
|
13798 |
for (var k in this.currentForm) {
|
13799 |
this.currentForm[k].off('.layeroptions').on('outsideChange.layeroptions', $.proxy(this.activeComponentPropertyChanged, this, k));
|
13800 |
}
|
13801 |
}
|
13802 |
-
}
|
13803 |
|
13804 |
ComponentSettings.prototype.onUpdateField = function (e, name, value) {
|
13805 |
if (e.target == this.currentLayer) {
|
13806 |
this.updateField(name, value);
|
13807 |
}
|
13808 |
-
}
|
13809 |
|
13810 |
ComponentSettings.prototype.updateField = function (name, value) {
|
13811 |
if (typeof this.currentLayer['formSet' + name] === 'function') {
|
@@ -13816,17 +15197,13 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13816 |
if (field !== undefined) {
|
13817 |
field.insideChange(value);
|
13818 |
}
|
13819 |
-
} else {
|
13820 |
-
console.error('field not available: ' + name + ':' + value, this.currentForm);
|
13821 |
}
|
13822 |
}
|
13823 |
-
}
|
13824 |
|
13825 |
ComponentSettings.prototype.activeComponentPropertyChanged = function (name, e) {
|
13826 |
if (this.currentLayer && !this.currentLayer.isDeleted) {
|
13827 |
-
|
13828 |
-
var value = this.currentForm[name].val();
|
13829 |
-
this.currentLayer.setProperty(name, value, 'manager');
|
13830 |
} else {
|
13831 |
var field = this.currentForm[name].data('field');
|
13832 |
if (typeof field !== 'undefined' && field !== null) {
|
@@ -13835,8 +15212,13 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13835 |
}
|
13836 |
};
|
13837 |
|
|
|
|
|
|
|
|
|
|
|
13838 |
ComponentSettings.prototype.startFeatures = function () {
|
13839 |
-
this.layerFeatures = new
|
13840 |
|
13841 |
var globalAdaptiveFont = $('#n2-ss-layer-adaptive-font').on('click', $.proxy(function () {
|
13842 |
this.currentForm.adaptivefont.data('field').onoff.trigger('click');
|
@@ -13852,7 +15234,7 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13852 |
|
13853 |
|
13854 |
new N2Classes.FormElementNumber("n2-ss-layer-font-size", -Number.MAX_VALUE, Number.MAX_VALUE);
|
13855 |
-
new N2Classes.
|
13856 |
min: 50,
|
13857 |
max: 300,
|
13858 |
step: 5
|
@@ -13866,47 +15248,32 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13866 |
this.forms.global.fontsize.on('nextendChange', $.proxy(function () {
|
13867 |
globalFontSize.data('field').insideChange(this.forms.global.fontsize.val());
|
13868 |
}, this));
|
13869 |
-
}
|
13870 |
-
|
13871 |
-
return ComponentSettings;
|
13872 |
-
});
|
13873 |
-
N2Require('BgAnimationManager', [], [], function ($, scope, undefined) {
|
13874 |
-
|
13875 |
-
function BgAnimationManager() {
|
13876 |
-
this.type = 'backgroundanimation';
|
13877 |
-
NextendVisualManagerMultipleSelection.prototype.constructor.apply(this, arguments);
|
13878 |
-
};
|
13879 |
-
|
13880 |
-
BgAnimationManager.prototype = Object.create(NextendVisualManagerMultipleSelection.prototype);
|
13881 |
-
BgAnimationManager.prototype.constructor = BgAnimationManager;
|
13882 |
-
|
13883 |
-
BgAnimationManager.prototype.loadDefaults = function () {
|
13884 |
-
NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this, arguments);
|
13885 |
-
this.type = 'backgroundanimation';
|
13886 |
-
this.labels = {
|
13887 |
-
visual: 'Background animation',
|
13888 |
-
visuals: 'Background animations'
|
13889 |
-
};
|
13890 |
};
|
13891 |
|
13892 |
-
|
13893 |
-
|
13894 |
-
};
|
13895 |
-
|
13896 |
-
BgAnimationManager.prototype.createVisual = function (visual, set) {
|
13897 |
-
return new NextendVisualWithSetRowMultipleSelection(visual, set, this);
|
13898 |
};
|
13899 |
|
13900 |
-
return
|
13901 |
-
});
|
13902 |
-
|
13903 |
-
N2Require('BgAnimationEditor', [], [], function ($, scope, undefined) {
|
13904 |
|
|
|
|
|
|
|
|
|
|
|
13905 |
function BgAnimationEditor() {
|
13906 |
this.parameters = {
|
13907 |
shiftedBackgroundAnimation: 0
|
13908 |
};
|
13909 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13910 |
|
13911 |
this.bgAnimationElement = $('.n2-bg-animation');
|
13912 |
this.slides = $('.n2-bg-animation-slide');
|
@@ -13919,15 +15286,19 @@ N2Require('BgAnimationEditor', [], [], function ($, scope, undefined) {
|
|
13919 |
this.directionTab.element.on('nextendChange.n2-editor', $.proxy(this.directionTabChanged, this));
|
13920 |
|
13921 |
if (!nModernizr.csstransforms3d || !nModernizr.csstransformspreserve3d) {
|
13922 |
-
|
13923 |
}
|
13924 |
-
};
|
13925 |
|
13926 |
-
|
|
|
|
|
|
|
|
|
|
|
13927 |
BgAnimationEditor.prototype.constructor = BgAnimationEditor;
|
13928 |
|
13929 |
BgAnimationEditor.prototype.loadDefaults = function () {
|
13930 |
-
|
13931 |
this.type = 'backgroundanimation';
|
13932 |
this.current = 0;
|
13933 |
this.animationProperties = false;
|
@@ -13950,7 +15321,14 @@ N2Require('BgAnimationEditor', [], [], function ($, scope, undefined) {
|
|
13950 |
this.direction = parseInt(this.directionTab.element.val());
|
13951 |
};
|
13952 |
|
13953 |
-
BgAnimationEditor.prototype.start = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13954 |
if (this.animationProperties) {
|
13955 |
if (!this.timeline) {
|
13956 |
this.next();
|
@@ -13960,6 +15338,11 @@ N2Require('BgAnimationEditor', [], [], function ($, scope, undefined) {
|
|
13960 |
}
|
13961 |
};
|
13962 |
|
|
|
|
|
|
|
|
|
|
|
13963 |
BgAnimationEditor.prototype.pause = function () {
|
13964 |
if (this.timeline) {
|
13965 |
this.timeline.pause();
|
@@ -14022,3 +15405,1944 @@ N2Require('BgAnimationEditor', [], [], function ($, scope, undefined) {
|
|
14022 |
|
14023 |
return BgAnimationEditor;
|
14024 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(){var N=this;N.N2_=N.N2_||{r:[],d:[]},N.N2R=N.N2R||function(){N.N2_.r.push(arguments)},N.N2D=N.N2D||function(){N.N2_.d.push(arguments)}}).call(window);
|
2 |
+
N2D('ContextMenu', function ($, undefined) {
|
3 |
|
4 |
+
/**
|
5 |
+
* @memberOf N2Classes
|
6 |
+
*
|
7 |
+
* @param $el
|
8 |
+
* @param parameters
|
9 |
+
* @constructor
|
10 |
+
*/
|
11 |
function ContextMenu($el, parameters) {
|
12 |
this.isActive = false;
|
13 |
this.$el = $el.data('nextendcontextmenu', this);
|
18 |
}, parameters);
|
19 |
|
20 |
this.$menu = $('<div class="n2-context-menu"></div>').on('mousedown', function () {
|
21 |
+
N2Classes.WindowManager.get().setMouseDownArea('context-menu');
|
22 |
}).appendTo('body');
|
23 |
if (this.parameters.selector) {
|
24 |
this.$el.on('contextmenu', this.parameters.selector, $.proxy(this.onShowContextMenu, this));
|
25 |
} else {
|
26 |
this.$el.on('contextmenu', $.proxy(this.onShowContextMenu, this));
|
27 |
}
|
28 |
+
}
|
29 |
|
30 |
ContextMenu.prototype.onShowContextMenu = function (e) {
|
31 |
e.preventDefault();
|
42 |
$('html').on('mouseleave.nextendcontextmenu, click.nextendcontextmenu', $.proxy(this.onHide, this));
|
43 |
}
|
44 |
this.$menu.toggleClass('n2-active', this.hasItems);
|
45 |
+
};
|
46 |
|
47 |
ContextMenu.prototype.onHide = function () {
|
48 |
$('html').off('.nextendcontextmenu');
|
49 |
this.$menu.removeClass('n2-active');
|
50 |
this.isActive = false;
|
51 |
+
};
|
52 |
|
53 |
ContextMenu.prototype.clearItems = function () {
|
54 |
if (this.isActive) {
|
56 |
}
|
57 |
this.hasItems = false;
|
58 |
this.$menu.html('');
|
59 |
+
};
|
60 |
|
61 |
ContextMenu.prototype.addItem = function (label, icon, action) {
|
62 |
this.hasItems = true;
|
63 |
this.$menu.append($('<div><i class="n2-i ' + icon + '"></i><span>' + label + '</span></div>').on('click', action));
|
64 |
+
};
|
65 |
|
66 |
$.fn.nextendContextMenu = function (parameters) {
|
67 |
return this.each(function () {
|
72 |
return ContextMenu;
|
73 |
});
|
74 |
|
75 |
+
N2D('Zoom', function ($, undefined) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
/**
|
78 |
+
* @memberOf N2Classes
|
79 |
+
*
|
80 |
+
* @param responsive
|
81 |
+
* @constructor
|
82 |
+
*/
|
83 |
function Zoom(responsive) {
|
84 |
|
85 |
+
this.currentContainerWidth = 0;
|
86 |
+
|
87 |
this.devices = {
|
88 |
unknownUnknown: $('<div />')
|
89 |
};
|
90 |
+
/**
|
91 |
+
*
|
92 |
+
* @type {SmartSliderResponsive[]}
|
93 |
+
*/
|
94 |
+
this.responsives = [];
|
95 |
|
96 |
+
this.add(responsive);
|
97 |
|
98 |
var desktopWidth = responsive.parameters.sliderWidthToDevice['desktopPortrait'];
|
99 |
|
100 |
+
this.container = responsive.containerElement.closest('.n2-ss-container-device,.n2-ss-canvas-slider-container').add(responsive.containerElement.closest('.n2-ss-slider-outer-container'));
|
101 |
this.container.width(desktopWidth);
|
102 |
this.containerWidth = desktopWidth;
|
103 |
|
137 |
|
138 |
this.deviceOptions = $('#n2-ss-devices .n2-panel-option');
|
139 |
|
|
|
|
|
140 |
this.deviceOptions.each($.proxy(function (i, el) {
|
141 |
$(el).on({
|
142 |
+
mousedown: $.proxy(N2Classes.WindowManager.setMouseDownArea, null, 'zoomDeviceClicked'),
|
143 |
click: $.proxy(this.setDeviceMode, this)
|
144 |
});
|
145 |
}, this));
|
146 |
|
147 |
responsive.sliderElement.on('SliderDeviceOrientation', $.proxy(this.onDeviceOrientationChange, this));
|
148 |
+
}
|
149 |
+
|
150 |
+
var zoom = null;
|
151 |
+
Zoom.add = function (responsive) {
|
152 |
+
zoom = new Zoom(responsive);
|
153 |
+
|
154 |
+
Zoom.add = function (responsive) {
|
155 |
+
zoom.add(responsive);
|
156 |
+
};
|
157 |
};
|
158 |
|
159 |
Zoom.prototype.add = function (responsive) {
|
|
|
160 |
this.responsives.push(responsive);
|
161 |
+
this.setOrientation('portrait');
|
162 |
responsive.parameters.onResizeEnabled = 0;
|
163 |
responsive.parameters.forceFull = 0; // We should disable force full feature on admin dashboard as it won't render before the sidebar
|
164 |
responsive._getDevice = responsive._getDeviceZoom;
|
165 |
+
};
|
|
|
|
|
166 |
|
167 |
Zoom.prototype.onDeviceOrientationChange = function (e, modes) {
|
168 |
$('#n2-admin').removeClass('n2-ss-mode-' + modes.lastDevice + modes.lastOrientation)
|
171 |
this.devices[modes.device + modes.orientation].addClass('n2-active');
|
172 |
};
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
Zoom.prototype.initZoom = function () {
|
175 |
var zoom = $("#n2-ss-slider-zoom");
|
176 |
if (zoom.length > 0) {
|
180 |
}
|
181 |
|
182 |
this.zoom =
|
183 |
+
zoom.removeAttr('slide').prop('slide', false)
|
184 |
+
.nUISlider({
|
185 |
+
step: 1,
|
186 |
+
value: 1,
|
187 |
+
min: 0,
|
188 |
+
max: 102
|
189 |
+
});
|
190 |
+
this.$handle = zoom.data('nUISlider').handle;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
+
// Init the slider width
|
193 |
+
this.responsives[0].sliderElement.one('SliderResize', $.proxy(function (e) {
|
194 |
+
var newWidth = this.responsives[0].containerElement.width();
|
195 |
+
this.setContainerWidth(e, newWidth, true);
|
196 |
+
}, this));
|
197 |
|
198 |
+
this.zoom.on({
|
199 |
+
'slide.n2-ss-zoom': $.proxy(this.zoomChange, this),
|
200 |
+
'slidechange.n2-ss-zoom': $.proxy(this.zoomChange, this)
|
|
|
201 |
});
|
202 |
+
}
|
203 |
};
|
204 |
|
205 |
+
Zoom.prototype.zoomChange = function (e, ui) {
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
+
if (e.originalEvent !== undefined) {
|
208 |
+
var value = ui.value,
|
209 |
+
width;
|
210 |
var ratio = 1;
|
211 |
if (value < 50) {
|
212 |
ratio = nextend.smallestZoom / this.containerWidth + Math.max(value / 50, 0) * (1 - nextend.smallestZoom / this.containerWidth);
|
214 |
ratio = 1 + (value - 52) / 50;
|
215 |
}
|
216 |
width = parseInt(ratio * this.containerWidth);
|
|
|
217 |
|
218 |
+
this.setContainerWidth(e, width);
|
219 |
+
}
|
220 |
+
};
|
221 |
+
|
222 |
+
Zoom.prototype.setContainerWidth = function (e, targetWidth, syncSlider) {
|
223 |
+
if (this.currentContainerWidth != targetWidth) {
|
224 |
+
this.currentContainerWidth = targetWidth;
|
225 |
+
|
226 |
+
this.$handle.html(targetWidth + 'px');
|
227 |
+
this.container.width(targetWidth);
|
228 |
|
229 |
for (var i = 0; i < this.responsives.length; i++) {
|
230 |
+
this.responsives[i].doResize(e);
|
231 |
+
}
|
232 |
+
|
233 |
+
if (syncSlider) {
|
234 |
+
|
235 |
+
var ratio = targetWidth / this.containerWidth;
|
236 |
+
var v = 50;
|
237 |
+
if (ratio < 1) {
|
238 |
+
v = (ratio - nextend.smallestZoom / this.containerWidth) / (1 - nextend.smallestZoom / this.containerWidth) * 50;
|
239 |
+
} else if (ratio > 1) {
|
240 |
+
v = (ratio - 1) * 50 + 52;
|
241 |
}
|
242 |
+
|
243 |
+
this.zoom.nUISlider("option", 'value', v);
|
244 |
}
|
245 |
+
}
|
246 |
+
};
|
247 |
+
|
248 |
+
Zoom.prototype.setDeviceMode = function (e) {
|
249 |
+
var el = $(e.currentTarget);
|
250 |
+
if ((e.ctrlKey || e.metaKey) && this.responsives[0].slider.editor.fragmentEditor) {
|
251 |
+
var orientation = el.data('orientation');
|
252 |
+
this.responsives[0].slider.editor.fragmentEditor.copyOrResetMode(el.data('device') + orientation[0].toUpperCase() + orientation.substr(1));
|
253 |
+
} else {
|
254 |
+
|
255 |
+
this.setOrientation(el.data('orientation'));
|
256 |
+
this.setContainerWidth(e, this.getModeWidth(el.data('device')), true);
|
257 |
+
}
|
258 |
+
};
|
259 |
+
|
260 |
+
Zoom.prototype.getModeWidth = function (newMode) {
|
261 |
+
|
262 |
+
var responsive = this.responsives[0],
|
263 |
+
orientation;
|
264 |
+
if (responsive.orientationMode == N2Classes.SmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT) {
|
265 |
+
orientation = N2Classes.SmartSliderResponsive.DeviceOrientation.PORTRAIT;
|
266 |
} else {
|
267 |
+
orientation = N2Classes.SmartSliderResponsive.DeviceOrientation.LANDSCAPE;
|
|
|
268 |
}
|
269 |
+
var width = responsive.parameters.sliderWidthToDevice[newMode + N2Classes.SmartSliderResponsive._DeviceOrientation[orientation]];
|
270 |
+
|
271 |
+
if (newMode == 'mobile') {
|
272 |
+
switch (N2Classes.SmartSliderResponsive._DeviceOrientation[orientation]) {
|
273 |
+
case 'Portrait':
|
274 |
+
width = Math.max(nextend.smallestZoom, 320);
|
275 |
+
break;
|
276 |
+
}
|
277 |
}
|
278 |
+
|
279 |
+
return width;
|
280 |
};
|
281 |
|
282 |
+
Zoom.prototype.setOrientation = function (newOrientation) {
|
283 |
+
if (newOrientation == 'portrait') {
|
284 |
+
for (var i = 0; i < this.responsives.length; i++) {
|
285 |
+
this.responsives[i].orientationMode = N2Classes.SmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT;
|
286 |
+
}
|
287 |
+
} else {
|
288 |
+
for (var i = 0; i < this.responsives.length; i++) {
|
289 |
+
this.responsives[i].orientationMode = N2Classes.SmartSliderResponsive.OrientationMode.ADMIN_LANDSCAPE;
|
290 |
+
}
|
291 |
}
|
|
|
|
|
292 |
};
|
293 |
|
294 |
return Zoom;
|
295 |
});
|
296 |
+
N2D('CreateSlider', function ($, undefined) {
|
297 |
|
298 |
+
/**
|
299 |
+
* @memberOf N2Classes
|
300 |
+
*
|
301 |
+
* @param groupID
|
302 |
+
* @param ajaxUrl
|
303 |
+
* @param shouldSkipLicenseModal
|
304 |
+
* @constructor
|
305 |
+
*/
|
306 |
function CreateSlider(groupID, ajaxUrl, shouldSkipLicenseModal) {
|
307 |
this.addToGroupModal = null;
|
308 |
this.groupID = groupID;
|
315 |
|
316 |
}, this));
|
317 |
|
318 |
+
this.notificationStack = new N2Classes.NotificationStackModal($('body'));
|
319 |
$('.n2-ss-add-sample-slider').click($.proxy(function (e) {
|
320 |
e.preventDefault();
|
321 |
e.stopImmediatePropagation();
|
353 |
var size = [550, 390 + 130];
|
354 |
|
355 |
|
356 |
+
this.createSliderModal = new N2Classes.NextendModal({
|
357 |
zero: {
|
358 |
size: size,
|
359 |
title: n2_('Create Slider'),
|
383 |
sliderWidth = $('#createsliderwidth').val(1200),
|
384 |
sliderHeight = $('#createsliderheight').val(500);
|
385 |
|
386 |
+
sliderWidth.parent().addClass('n2-form-element-autocomplete');
|
387 |
+
sliderHeight.parent().addClass('n2-form-element-autocomplete');
|
388 |
|
389 |
this.createHeading(n2_('Preset')).appendTo(this.content);
|
390 |
var imageRadioHeight = 100
|
405 |
|
406 |
button.on('click', $.proxy(function () {
|
407 |
|
408 |
+
N2Classes.AjaxHelper.ajax({
|
409 |
type: "POST",
|
410 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(ajaxUrl, {
|
411 |
nextendaction: 'create'
|
412 |
}),
|
413 |
data: {
|
419 |
},
|
420 |
dataType: 'json'
|
421 |
}).done($.proxy(function (response) {
|
422 |
+
N2Classes.AjaxHelper.startLoading();
|
423 |
}, this));
|
424 |
|
425 |
}, this));
|
450 |
that.notificationStack.popStack();
|
451 |
},
|
452 |
importSlider = function (href) {
|
453 |
+
N2Classes.AjaxHelper.ajax({
|
454 |
type: "POST",
|
455 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(that.ajaxUrl, {
|
456 |
nextendaction: 'importDemo'
|
457 |
}),
|
458 |
data: {
|
459 |
groupID: that.groupID,
|
460 |
+
key: N2Classes.Base64.encode(href.replace(/^(http(s)?:)?\/\//, '//'))
|
461 |
},
|
462 |
dataType: 'json'
|
463 |
}).fail(function () {
|
487 |
};
|
488 |
|
489 |
this.notificationStack.enableStack();
|
490 |
+
N2Classes.Esc.add($.proxy(function () {
|
491 |
closeFrame();
|
492 |
return true;
|
493 |
}, this));
|
497 |
|
498 |
return CreateSlider;
|
499 |
});
|
500 |
+
N2D('ManageSliders', function ($, undefined) {
|
501 |
|
502 |
+
/**
|
503 |
+
* @memberOf N2Classes
|
504 |
+
*
|
505 |
+
* @param groupID
|
506 |
+
* @param ajaxUrl
|
507 |
+
* @param shouldSkipLicenseModal
|
508 |
+
* @constructor
|
509 |
+
*/
|
510 |
function ManageSliders(groupID, ajaxUrl, shouldSkipLicenseModal) {
|
|
|
511 |
this.groupID = groupID;
|
512 |
this.ajaxUrl = ajaxUrl;
|
513 |
this.sliders = [];
|
517 |
|
518 |
var sliders = this.slidersContainer.find('.n2-ss-box-slider');
|
519 |
for (var i = 0; i < sliders.length; i++) {
|
520 |
+
this.sliders.push(new N2Classes.Slider(this, sliders.eq(i)));
|
521 |
}
|
522 |
|
523 |
this.changed();
|
526 |
|
527 |
this.initOrderable();
|
528 |
|
529 |
+
this.create = new N2Classes.CreateSlider(groupID, ajaxUrl, shouldSkipLicenseModal);
|
530 |
this.initBulk();
|
531 |
}
|
532 |
|
536 |
};
|
537 |
|
538 |
ManageSliders.prototype.initSliders = function () {
|
|
|
539 |
var sliderNodes = this.slidersContainer.find('.n2-ss-box-slider'),
|
540 |
sliders = [];
|
541 |
for (var i = 0; i < sliderNodes.length; i++) {
|
549 |
|
550 |
ManageSliders.prototype.initOrderable = function () {
|
551 |
if (this.orderBy) {
|
552 |
+
var sortableObject = {
|
553 |
helper: 'clone',
|
554 |
+
items: "> .n2-ss-box-slider",
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
stop: $.proxy(this.saveOrder, this),
|
556 |
placeholder: 'n2-box-sortable-placeholder',
|
557 |
distance: 10
|
558 |
+
};
|
559 |
+
|
560 |
+
this.slidersContainer.nUISortable(sortableObject);
|
561 |
}
|
562 |
};
|
563 |
|
564 |
+
ManageSliders.prototype.saveOrder = function (e, ui) {
|
565 |
+
|
|
|
|
|
|
|
|
|
566 |
var sliderNodes = this.slidersContainer.find('.n2-ss-box-slider'),
|
567 |
sliders = [],
|
568 |
ids = [],
|
582 |
nextendcontroller: 'sliders',
|
583 |
nextendaction: 'order'
|
584 |
};
|
585 |
+
N2Classes.AjaxHelper.ajax({
|
586 |
type: 'POST',
|
587 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, queries),
|
588 |
data: {
|
589 |
groupID: this.groupID,
|
590 |
sliderorder: ids,
|
644 |
if (sliders.length > 1) {
|
645 |
title += ' and ' + (sliders.length - 1) + ' more';
|
646 |
}
|
647 |
+
N2Classes.NextendModal.deleteModal('slider-delete', title, $.proxy(function () {
|
648 |
+
N2Classes.AjaxHelper.ajax({
|
649 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
650 |
nextendcontroller: 'sliders',
|
651 |
nextendaction: 'delete'
|
652 |
}),
|
676 |
|
677 |
ManageSliders.prototype.exportSliders = function (ids, sliders) {
|
678 |
|
679 |
+
window.location.href = (N2Classes.AjaxHelper.makeFallbackUrl(this.ajaxUrl, {
|
680 |
nextendcontroller: 'sliders',
|
681 |
nextendaction: 'exportAll'
|
682 |
}) + '&' + $.param({sliders: ids, currentGroupID: this.groupID}));
|
683 |
};
|
684 |
|
|
|
685 |
ManageSliders.prototype.initBulk = function () {
|
686 |
|
687 |
this.selection = [];
|
761 |
this.leaveBulk();
|
762 |
} else {
|
763 |
if (skipGroups) {
|
764 |
+
N2Classes.Notification.notice('Please select one or more sliders for the action!');
|
765 |
} else {
|
766 |
+
N2Classes.Notification.notice('Please select one or more sliders or groups for the action!');
|
767 |
}
|
768 |
}
|
769 |
};
|
772 |
if (!this.isBulkSelection) {
|
773 |
this.isBulkSelection = true;
|
774 |
if (this.orderBy) {
|
775 |
+
this.slidersContainer.nUISortable('option', 'disabled', true);
|
776 |
}
|
777 |
$('#n2-admin').addClass('n2-ss-has-box-selection');
|
778 |
}
|
781 |
ManageSliders.prototype.leaveBulk = function () {
|
782 |
if (this.isBulkSelection) {
|
783 |
if (this.orderBy) {
|
784 |
+
this.slidersContainer.nUISortable('option', 'disabled', false);
|
785 |
}
|
786 |
$('#n2-admin').removeClass('n2-ss-has-box-selection');
|
787 |
|
795 |
|
796 |
return ManageSliders;
|
797 |
});
|
798 |
+
N2D('Slider', function ($, undefined) {
|
799 |
+
|
800 |
+
/**
|
801 |
+
* @memberOf N2Classes
|
802 |
+
*
|
803 |
+
* @param manager
|
804 |
+
* @param box
|
805 |
+
* @constructor
|
806 |
+
*/
|
807 |
function Slider(manager, box) {
|
808 |
this.selected = false;
|
809 |
this.manager = manager;
|
821 |
this.manager.hideMenu();
|
822 |
}, this))
|
823 |
.on('click.n2-slider', $.proxy(this.goToEdit, this));
|
|
|
824 |
this.box.find('.n2-ss-box-select').on('click', $.proxy(function (e) {
|
825 |
e.stopPropagation();
|
826 |
e.preventDefault();
|
834 |
};
|
835 |
|
836 |
Slider.prototype.goToEdit = function (e, isBlank) {
|
837 |
+
if (e.target.tagName !== 'A') {
|
838 |
+
var editUrl = this.box.data('editurl');
|
839 |
+
if (typeof isBlank !== 'undefined' && isBlank) {
|
840 |
+
window.open(editUrl, '_blank');
|
841 |
+
} else {
|
842 |
+
window.location = editUrl;
|
843 |
+
}
|
844 |
}
|
845 |
};
|
846 |
|
847 |
Slider.prototype.preview = function (e) {
|
848 |
e.stopPropagation();
|
849 |
e.preventDefault();
|
850 |
+
window.open(N2Classes.AjaxHelper.makeFallbackUrl(this.box.data('editurl'), {
|
851 |
nextendcontroller: 'preview',
|
852 |
nextendaction: 'index'
|
853 |
}), '_blank');
|
858 |
e.stopPropagation();
|
859 |
e.preventDefault();
|
860 |
var deferred = $.Deferred();
|
861 |
+
N2Classes.AjaxHelper.ajax({
|
862 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.box.data('editurl'), {
|
863 |
nextendcontroller: 'slider',
|
864 |
nextendaction: 'duplicate'
|
865 |
})
|
911 |
|
912 |
return Slider;
|
913 |
});
|
914 |
+
N2D('FormElementAnimationManager', ['FormElement'], function ($, undefined) {
|
915 |
|
916 |
+
/**
|
917 |
+
* @memberOf N2Classes
|
918 |
+
*
|
919 |
+
* @param id
|
920 |
+
* @param managerIdentifier
|
921 |
+
* @constructor
|
922 |
+
*/
|
923 |
function FormElementAnimationManager(id, managerIdentifier) {
|
924 |
this.element = $('#' + id);
|
925 |
this.managerIdentifier = managerIdentifier;
|
934 |
|
935 |
this.updateName(this.element.val());
|
936 |
|
937 |
+
N2Classes.FormElement.prototype.constructor.apply(this, arguments);
|
938 |
}
|
939 |
|
940 |
|
941 |
+
FormElementAnimationManager.prototype = Object.create(N2Classes.FormElement.prototype);
|
942 |
FormElementAnimationManager.prototype.constructor = FormElementAnimationManager;
|
943 |
|
944 |
|
984 |
|
985 |
return FormElementAnimationManager;
|
986 |
});
|
987 |
+
N2D('FormElementBackground', ['FormElement'], function ($, undefined) {
|
988 |
|
989 |
+
/**
|
990 |
+
*
|
991 |
+
* @memberOf N2Classes
|
992 |
+
*
|
993 |
+
* @param id
|
994 |
+
* @param value
|
995 |
+
* @constructor
|
996 |
+
*/
|
997 |
function FormElementBackground(id, value) {
|
998 |
this.value = '';
|
999 |
this.element = $('#' + id);
|
1010 |
this.insideChange(this.element.val());
|
1011 |
}, this));
|
1012 |
|
1013 |
+
N2Classes.FormElement.prototype.constructor.apply(this, arguments);
|
1014 |
};
|
1015 |
|
1016 |
+
FormElementBackground.prototype = Object.create(N2Classes.FormElement.prototype);
|
1017 |
FormElementBackground.prototype.constructor = FormElementBackground;
|
1018 |
|
1019 |
FormElementBackground.prototype.selectOption = function (e) {
|
1033 |
this.$container.removeClass('n2-ss-background-type-' + this.value);
|
1034 |
this.value = newValue;
|
1035 |
this.$container.addClass('n2-ss-background-type-' + this.value);
|
1036 |
+
};
|
1037 |
|
1038 |
FormElementBackground.prototype.insideChange = function (value) {
|
1039 |
this.setValue(value);
|
1052 |
return FormElementBackground;
|
1053 |
});
|
1054 |
|
1055 |
+
N2D('FormElementColumns', ['FormElement'], function ($, undefined) {
|
1056 |
|
1057 |
+
/**
|
1058 |
+
* @memberOf N2Classes
|
1059 |
+
*
|
1060 |
+
* @param id
|
1061 |
+
* @constructor
|
1062 |
+
*/
|
1063 |
function FormElementColumns(id) {
|
1064 |
this.denominators = {
|
1065 |
1: 100,
|
1070 |
6: 144
|
1071 |
};
|
1072 |
this.element = $('#' + id);
|
1073 |
+
N2Classes.FormElement.prototype.constructor.apply(this, arguments);
|
1074 |
this.$c = $('#' + id).parent();
|
1075 |
this.$container = this.$c.find('.n2-ss-columns-element-container');
|
1076 |
this.containerWidth = 284;
|
1077 |
this.maxWidth = 0;
|
1078 |
|
1079 |
|
1080 |
+
this.$container.nUISortable({
|
1081 |
axis: 'x',
|
|
|
1082 |
items: '.n2-ss-columns-element-column',
|
1083 |
+
helper: 'clone_hide',
|
1084 |
start: $.proxy(function (e, ui) {
|
1085 |
this.$container.addClass('n2-sortable-currently-sorted');
|
1086 |
+
ui.placeholder.css({
|
1087 |
+
width: ui.item.width(),
|
1088 |
+
visibility: 'hidden'
|
1089 |
+
});
|
1090 |
|
1091 |
var $columns = this.$container.find('.n2-ss-columns-element-column');
|
1092 |
ui.item.data('index', $columns.index(ui.item));
|
1093 |
|
1094 |
}, this),
|
1095 |
+
|
1096 |
stop: $.proxy(function (e, ui) {
|
1097 |
var $columns = this.$container.find('.n2-ss-columns-element-column');
|
1098 |
var oldIndex = ui.item.data('index'),
|
1115 |
});
|
1116 |
}
|
1117 |
|
1118 |
+
FormElementColumns.prototype = Object.create(N2Classes.FormElement.prototype);
|
1119 |
FormElementColumns.prototype.constructor = FormElementColumns;
|
1120 |
|
1121 |
|
1124 |
this.denominators[i] = i * 15;
|
1125 |
}
|
1126 |
return this.denominators[i];
|
1127 |
+
};
|
1128 |
|
1129 |
+
FormElementColumns.prototype.setRow = function (row) {
|
1130 |
+
this.currentRow = row;
|
1131 |
+
this.insideChange(row.getColumnsOrdered());
|
1132 |
+
};
|
1133 |
|
1134 |
FormElementColumns.prototype.setValue = function (newValue) {
|
1135 |
|
1136 |
+
};
|
1137 |
|
1138 |
FormElementColumns.prototype.insideChange = function (value) {
|
1139 |
this.start(value);
|
1140 |
+
};
|
1141 |
|
1142 |
FormElementColumns.prototype.activateColumn = function (e) {
|
1143 |
var clickedColIndex = this.$container.find('.n2-ss-columns-element-column').index(e.currentTarget);
|
1144 |
this.currentRow.activateColumn(clickedColIndex, e);
|
1145 |
+
};
|
1146 |
|
1147 |
FormElementColumns.prototype.start = function (value) {
|
1148 |
this.percentages = [];
|
1164 |
|
1165 |
this.makeResizable();
|
1166 |
|
1167 |
+
};
|
1168 |
|
1169 |
FormElementColumns.prototype.refreshMaxWidth = function () {
|
1170 |
this.maxWidth = this.containerWidth - (this.percentages.length - 1) * 15;
|
1171 |
+
};
|
1172 |
|
1173 |
FormElementColumns.prototype.updateColumn = function ($col, fraction) {
|
1174 |
$col.css('width', (this.maxWidth * fraction.valueOf()) + 'px')
|
1175 |
.html(Math.round(fraction.valueOf() * 100 * 10) / 10 + '%');
|
1176 |
+
};
|
1177 |
|
1178 |
FormElementColumns.prototype.makeResizable = function () {
|
1179 |
if (this.handles) {
|
1184 |
|
1185 |
this.handles = this.$container.find('.n2-ss-columns-element-handle')
|
1186 |
.on('mousedown', $.proxy(this._resizeStart, this));
|
1187 |
+
};
|
1188 |
|
1189 |
FormElementColumns.prototype._resizeStart = function (e) {
|
1190 |
var index = this.handles.index(e.currentTarget),
|
1196 |
$currentCol: this.$columns.eq(index),
|
1197 |
$nextCol: this.$columns.eq(index + 1),
|
1198 |
startX: Math.max(0, Math.min(e.clientX - cLeft, this.containerWidth)),
|
1199 |
+
};
|
1200 |
|
1201 |
this._resizeMove(e);
|
1202 |
|
1204 |
'mousemove.resizecol': $.proxy(this._resizeMove, this),
|
1205 |
'mouseup.resizecol mouseleave.resizecol': $.proxy(this._resizeStop, this)
|
1206 |
});
|
1207 |
+
};
|
1208 |
|
1209 |
FormElementColumns.prototype._resizeMove = function (e) {
|
1210 |
e.preventDefault();
|
1230 |
this.onColumnWidthChange(_percentages);
|
1231 |
|
1232 |
return [currentP, nextP];
|
1233 |
+
};
|
1234 |
|
1235 |
FormElementColumns.prototype._resizeStop = function (e) {
|
1236 |
var ret = this._resizeMove(e);
|
1240 |
delete this.resizeContext;
|
1241 |
|
1242 |
this.currentRow.setRealColsWidth(this.percentages);
|
1243 |
+
};
|
1244 |
|
1245 |
FormElementColumns.prototype.onColumnWidthChange = function (_percentages) {
|
1246 |
var percentages = [];
|
1248 |
percentages.push(_percentages[i].valueOf());
|
1249 |
}
|
1250 |
this.currentRow.updateColumnWidth(percentages);
|
1251 |
+
};
|
1252 |
|
1253 |
return FormElementColumns;
|
1254 |
});
|
2021 |
};
|
2022 |
root['Fraction'] = Fraction;
|
2023 |
|
2024 |
+
})(window);
|
2025 |
+
N2D('FormElementSliderType', function ($, undefined) {
|
2026 |
|
2027 |
+
/**
|
2028 |
+
* @memberOf N2Classes
|
2029 |
+
*
|
2030 |
+
* @param id
|
2031 |
+
* @constructor
|
2032 |
+
*/
|
2033 |
function FormElementSliderType(id) {
|
2034 |
this.element = $('#' + id);
|
2035 |
|
2036 |
this.setAttribute();
|
2037 |
|
2038 |
this.element.on('nextendChange', $.proxy(this.setAttribute, this));
|
2039 |
+
}
|
2040 |
|
2041 |
FormElementSliderType.prototype.setAttribute = function () {
|
2042 |
+
var val = this.element.val();
|
2043 |
+
$('#n2-admin')
|
2044 |
+
.data('slider-type', val)
|
2045 |
+
.attr('data-slider-type', val);
|
2046 |
|
2047 |
+
if (this.element.val() === 'block') {
|
|
|
|
|
2048 |
$('.n2-fm-shadow').trigger('click');
|
2049 |
}
|
2050 |
};
|
2052 |
return FormElementSliderType;
|
2053 |
});
|
2054 |
|
2055 |
+
N2D('FormElementSliderWidgetArea', ['FormElement'], function ($, undefined) {
|
2056 |
|
2057 |
+
/**
|
2058 |
+
* @memberOf N2Classes
|
2059 |
+
*
|
2060 |
+
* @param id
|
2061 |
+
* @constructor
|
2062 |
+
*/
|
2063 |
function FormElementSliderWidgetArea(id) {
|
2064 |
this.element = $('#' + id);
|
2065 |
|
2069 |
|
2070 |
this.areas.on('click', $.proxy(this.chooseArea, this));
|
2071 |
|
2072 |
+
N2Classes.FormElement.prototype.constructor.apply(this, arguments);
|
2073 |
+
}
|
2074 |
|
2075 |
|
2076 |
+
FormElementSliderWidgetArea.prototype = Object.create(N2Classes.FormElement.prototype);
|
2077 |
FormElementSliderWidgetArea.prototype.constructor = FormElementSliderWidgetArea;
|
2078 |
|
2079 |
|
2102 |
return FormElementSliderWidgetArea;
|
2103 |
});
|
2104 |
|
2105 |
+
N2D('FormElementWidgetPosition', function ($, undefined) {
|
2106 |
|
2107 |
+
/**
|
2108 |
+
* @memberOf N2Classes
|
2109 |
+
*
|
2110 |
+
* @param id
|
2111 |
+
* @constructor
|
2112 |
+
*/
|
2113 |
function FormElementWidgetPosition(id) {
|
2114 |
|
2115 |
this.element = $('#' + id + '-mode');
|
2120 |
this.element.on('nextendChange', $.proxy(this.onChange, this));
|
2121 |
|
2122 |
this.onChange();
|
2123 |
+
}
|
2124 |
|
2125 |
FormElementWidgetPosition.prototype.onChange = function () {
|
2126 |
var value = this.element.val();
|
2127 |
|
2128 |
+
if (value === 'advanced') {
|
2129 |
this.tabs.eq(2).css('display', '');
|
2130 |
this.tabs.eq(1).css('display', 'none');
|
2131 |
} else {
|
2137 |
return FormElementWidgetPosition;
|
2138 |
});
|
2139 |
|
2140 |
+
N2D('SmartSliderGeneratorRecords', function ($, undefined) {
|
2141 |
|
2142 |
+
/**
|
2143 |
+
* @memberOf N2Classes
|
2144 |
+
*
|
2145 |
+
* @param ajaxUrl
|
2146 |
+
* @constructor
|
2147 |
+
*/
|
2148 |
function SmartSliderGeneratorRecords(ajaxUrl) {
|
2149 |
this.ajaxUrl = ajaxUrl;
|
2150 |
|
2151 |
$("#generatorrecord-viewer").on("click", $.proxy(this.showRecords, this));
|
2152 |
+
}
|
2153 |
|
2154 |
SmartSliderGeneratorRecords.prototype.showRecords = function (e) {
|
2155 |
e.preventDefault();
|
2156 |
+
N2Classes.AjaxHelper.ajax({
|
2157 |
type: "POST",
|
2158 |
url: this.ajaxUrl,
|
2159 |
data: $("#smartslider-form").serialize(),
|
2160 |
dataType: "json"
|
2161 |
}).done(function (response) {
|
2162 |
+
var modal = new N2Classes.NextendModal({
|
2163 |
zero: {
|
2164 |
size: [
|
2165 |
1300,
|
2172 |
modal.content.css('overflow', 'auto');
|
2173 |
}).error(function (response) {
|
2174 |
if (response.status == 200) {
|
2175 |
+
var modal = new N2Classes.NextendModal({
|
2176 |
zero: {
|
2177 |
size: [
|
2178 |
1300,
|
2189 |
|
2190 |
return SmartSliderGeneratorRecords;
|
2191 |
});
|
2192 |
+
N2D('QuickSlides', function ($, undefined) {
|
2193 |
|
2194 |
+
/**
|
2195 |
+
* @memberOf N2Classes
|
2196 |
+
*
|
2197 |
+
* @param ajaxUrl
|
2198 |
+
* @constructor
|
2199 |
+
*/
|
2200 |
function QuickSlides(ajaxUrl) {
|
2201 |
|
2202 |
var button = $('#n2-quick-slides-edit');
|
2207 |
this.ajaxUrl = ajaxUrl;
|
2208 |
|
2209 |
button.on('click', $.proxy(this.openEdit, this));
|
2210 |
+
}
|
2211 |
|
2212 |
QuickSlides.prototype.openEdit = function (e) {
|
2213 |
e.preventDefault();
|
2214 |
var slides = $('#n2-ss-slides .n2-box-slide');
|
2215 |
|
2216 |
var that = this;
|
2217 |
+
this.modal = new N2Classes.NextendModal({
|
2218 |
zero: {
|
2219 |
fit: true,
|
2220 |
fitX: false,
|
2249 |
tr.append($('<td />').append(that.createTextarea('Description', 'description-' + id, slide.data('description'), 'width: 330px;height:24px;')));
|
2250 |
var link = slide.data('link').split('|*|');
|
2251 |
tr.append($('<td />').append(that.createLink('Link', 'link-' + id, link[0], 'width: 180px;')));
|
2252 |
+
tr.append($('<td />').append(that.createTarget('Target window', 'target-' + id, link.length > 1 ? link[1] : '_self', '')));
|
2253 |
|
2254 |
new N2Classes.FormElementUrl('link-' + id, nextend.NextendElementUrlParams);
|
2255 |
|
2279 |
this.hide(e);
|
2280 |
} else {
|
2281 |
this.hide(e);
|
2282 |
+
N2Classes.AjaxHelper.ajax({
|
2283 |
type: "POST",
|
2284 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(that.ajaxUrl),
|
2285 |
+
data: {changed: N2Classes.Base64.encode(JSON.stringify(changed))},
|
2286 |
dataType: 'json'
|
2287 |
}).done($.proxy(function (response) {
|
2288 |
var slides = response.data;
|
2346 |
if (arguments.length == 4) {
|
2347 |
style = arguments[3];
|
2348 |
}
|
2349 |
+
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>');
|
2350 |
nodes.find('select').val(value);
|
2351 |
return nodes;
|
2352 |
};
|
2353 |
|
2354 |
return QuickSlides;
|
2355 |
});
|
2356 |
+
N2D('Slide', function ($, undefined) {
|
2357 |
+
|
2358 |
+
/**
|
2359 |
+
* @memberOf N2Classes
|
2360 |
+
*
|
2361 |
+
* @param manager
|
2362 |
+
* @param box
|
2363 |
+
* @constructor
|
2364 |
+
*/
|
2365 |
function Slide(manager, box) {
|
2366 |
this.selected = false;
|
2367 |
this.manager = manager;
|
2396 |
Slide.prototype.setFirst = function (e) {
|
2397 |
e.stopPropagation();
|
2398 |
e.preventDefault();
|
2399 |
+
N2Classes.AjaxHelper.ajax({
|
2400 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.manager.ajaxUrl, {
|
2401 |
nextendaction: 'first'
|
2402 |
}),
|
2403 |
type: 'POST',
|
2441 |
this.invertSelection();
|
2442 |
e.preventDefault();
|
2443 |
} else {
|
2444 |
+
if (e.target.tagName !== 'A') {
|
2445 |
+
var editUrl = this.box.data('editurl');
|
2446 |
+
if (typeof isBlank !== 'undefined' && isBlank) {
|
2447 |
+
window.open(editUrl, '_blank');
|
2448 |
+
} else if (editUrl === location.href) {
|
2449 |
+
$("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible");
|
2450 |
+
} else {
|
2451 |
+
window.location = editUrl;
|
2452 |
+
}
|
2453 |
}
|
2454 |
}
|
2455 |
};
|
2458 |
e.stopPropagation();
|
2459 |
e.preventDefault();
|
2460 |
var deferred = $.Deferred();
|
2461 |
+
N2Classes.AjaxHelper.ajax({
|
2462 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.box.data('editurl'), {
|
2463 |
nextendaction: 'duplicate'
|
2464 |
})
|
2465 |
}).done($.proxy(function (response) {
|
2510 |
|
2511 |
Slide.prototype.publish = function (e) {
|
2512 |
this.switchPublished(e);
|
2513 |
+
};
|
2514 |
|
2515 |
Slide.prototype.unpublish = function (e) {
|
2516 |
this.switchPublished(e);
|
2517 |
+
};
|
2518 |
|
2519 |
Slide.prototype.generator = function (e) {
|
2520 |
window.location = this.box.data('generator');
|
2521 |
+
};
|
2522 |
|
2523 |
Slide.prototype.copy = function (e) {
|
2524 |
+
this.manager.showSliderSelector(n2_('Copy slide to ...'), $.proxy(function (data) {
|
2525 |
+
N2Classes.AjaxHelper.ajax({
|
2526 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.box.data('editurl'), {
|
2527 |
nextendaction: 'copy',
|
2528 |
+
targetSliderID: data.sliderID
|
2529 |
})
|
2530 |
});
|
2531 |
}, this));
|
2532 |
+
};
|
2533 |
|
2534 |
return Slide;
|
2535 |
});
|
2536 |
+
N2D('SlidesManager', function ($, undefined) {
|
2537 |
|
2538 |
+
/**
|
2539 |
+
* @memberOf N2Classes
|
2540 |
+
*
|
2541 |
+
* @constructor
|
2542 |
+
*/
|
2543 |
function SlidesManager(ajaxUrl, contentAjaxUrl, parameters, isUploadDisabled, uploadUrl, uploadDir) {
|
2544 |
this.quickPostModal = null;
|
2545 |
this.quickVideoModal = null;
|
2556 |
|
2557 |
var slides = this.slidesContainer.find('.n2-box-slide');
|
2558 |
for (var i = 0; i < slides.length; i++) {
|
2559 |
+
this.slides.push(new N2Classes.Slide(this, slides.eq(i)));
|
2560 |
}
|
2561 |
|
2562 |
+
$('body').attr('data-slides', this.slides.length);
|
2563 |
+
|
2564 |
+
$('#n2-ss-slides').find('.n2-ss-slides-create-action-box').on('mouseup', $.proxy(function (e) {
|
2565 |
+
e.preventDefault();
|
2566 |
+
var which = 0;
|
2567 |
+
if (e.which !== undefined) {
|
2568 |
+
which = e.which;
|
2569 |
+
}
|
2570 |
+
if (which <= 2) {
|
2571 |
+
switch ($(e.currentTarget).data('action')) {
|
2572 |
+
case 'image':
|
2573 |
+
this.addQuickImage(e);
|
2574 |
+
break;
|
2575 |
+
case 'video':
|
2576 |
+
this.addQuickVideo(e);
|
2577 |
+
break;
|
2578 |
+
case 'post':
|
2579 |
+
this.addQuickPost(e);
|
2580 |
+
break;
|
2581 |
+
case 'library':
|
2582 |
+
case 'empty':
|
2583 |
+
case 'static':
|
2584 |
+
case 'dynamic':
|
2585 |
+
if (which === 2) {
|
2586 |
+
window.open($(e.currentTarget).data('href'), '_blank').focus();
|
2587 |
+
} else {
|
2588 |
+
window.location = $(e.currentTarget).data('href');
|
2589 |
+
}
|
2590 |
+
break;
|
2591 |
+
}
|
2592 |
+
}
|
2593 |
+
}, this));
|
2594 |
|
2595 |
+
$('.n2-box-slide-dummy').on('click', $.proxy(this.addQuickImage, this));
|
|
|
|
|
2596 |
|
2597 |
this.initBulk();
|
2598 |
|
2599 |
|
2600 |
if (!isUploadDisabled) {
|
2601 |
var images = [];
|
2602 |
+
this.slidesContainer.nUIFileUpload({
|
2603 |
url: uploadUrl,
|
2604 |
pasteZone: false,
|
2605 |
dataType: 'json',
|
2606 |
paramName: 'image',
|
2607 |
+
dropZone: $('.n2-ss-slides-outer-container'),
|
2608 |
|
2609 |
add: $.proxy(function (e, data) {
|
2610 |
data.formData = {path: '/' + uploadDir};
|
2615 |
var response = data.result;
|
2616 |
if (response.data && response.data.name) {
|
2617 |
images.push({
|
2618 |
+
title: response.data.name.replace(/\.[^/.]+$/, ""),
|
2619 |
description: '',
|
2620 |
image: response.data.url
|
2621 |
});
|
2622 |
} else {
|
2623 |
+
N2Classes.AjaxHelper.notification(response);
|
2624 |
}
|
2625 |
|
2626 |
}, this),
|
2627 |
|
2628 |
fail: $.proxy(function (e, data) {
|
2629 |
+
N2Classes.AjaxHelper.notification(data.jqXHR.responseJSON);
|
2630 |
}, this),
|
2631 |
|
2632 |
start: function () {
|
2633 |
+
N2Classes.AjaxHelper.startLoading();
|
2634 |
},
|
2635 |
|
2636 |
stop: $.proxy(function () {
|
2638 |
this._addQuickImages(images);
|
2639 |
} else {
|
2640 |
setTimeout(function () {
|
2641 |
+
N2Classes.AjaxHelper.stopLoading();
|
2642 |
}, 100);
|
2643 |
}
|
2644 |
images = [];
|
2667 |
};
|
2668 |
|
2669 |
SlidesManager.prototype.initSlidesOrderable = function () {
|
2670 |
+
this.slidesContainer.nUISortable({
|
|
|
|
|
|
|
2671 |
items: ".n2-box-slide",
|
|
|
|
|
|
|
2672 |
stop: $.proxy(this.saveSlideOrder, this),
|
2673 |
placeholder: 'n2-box-sortable-placeholder n2-box-sortable-placeholder-small',
|
2674 |
+
distance: 10,
|
2675 |
+
helper: 'clone'
|
2676 |
});
|
2677 |
};
|
2678 |
|
2696 |
nextendcontroller: 'slides',
|
2697 |
nextendaction: 'order'
|
2698 |
};
|
2699 |
+
N2Classes.AjaxHelper.ajax({
|
2700 |
type: 'POST',
|
2701 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, queries),
|
2702 |
data: {
|
2703 |
slideorder: ids
|
2704 |
}
|
2709 |
};
|
2710 |
|
2711 |
SlidesManager.prototype.initSlides = function () {
|
|
|
2712 |
var slideNodes = this.slidesContainer.find('.n2-box-slide'),
|
2713 |
slides = [];
|
2714 |
for (var i = 0; i < slideNodes.length; i++) {
|
2719 |
this.changed();
|
2720 |
$(window).triggerHandler('SmartSliderSidebarSlidesChanged');
|
2721 |
|
2722 |
+
$('body').attr('data-slides', this.slides.length);
|
2723 |
};
|
2724 |
|
2725 |
SlidesManager.prototype.unsetFirst = function () {
|
2738 |
|
2739 |
boxes.insertBefore(this.slidesContainer.find('.n2-clear'));
|
2740 |
boxes.addClass('n2-ss-box-just-added').each($.proxy(function (i, el) {
|
2741 |
+
new N2Classes.Slide(this, $(el));
|
2742 |
}, this));
|
2743 |
this.initSlides();
|
2744 |
setTimeout(function () {
|
2745 |
boxes.removeClass('n2-ss-box-just-added');
|
2746 |
}, 200);
|
2747 |
+
};
|
2748 |
|
2749 |
+
SlidesManager.prototype._addQuickImages = function (_images) {
|
2750 |
+
var images = [];
|
2751 |
+
for (var i = 0; i < _images.length; i++) {
|
2752 |
+
if (_images[i].image.match(/\.(mp4)/i)) {
|
2753 |
+
N2Classes.Notification.error('Video is not supported!');
|
2754 |
+
|
2755 |
+
} else {
|
2756 |
+
images.push(_images[i]);
|
2757 |
}
|
2758 |
+
}
|
2759 |
+
if (images.length) {
|
2760 |
+
N2Classes.AjaxHelper.ajax({
|
2761 |
+
type: 'POST',
|
2762 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
2763 |
+
nextendaction: 'quickImages'
|
2764 |
+
}),
|
2765 |
+
data: {
|
2766 |
+
images: N2Classes.Base64.encode(JSON.stringify(images))
|
2767 |
+
}
|
2768 |
+
}).done($.proxy(function (response) {
|
2769 |
+
this.addBoxes($(response.data));
|
2770 |
+
}, this));
|
2771 |
+
}
|
2772 |
};
|
2773 |
|
2774 |
SlidesManager.prototype.addQuickVideo = function (e) {
|
2775 |
e.preventDefault();
|
2776 |
var manager = this;
|
2777 |
if (!this.quickVideoModal) {
|
2778 |
+
this.quickVideoModal = new N2Classes.NextendModal({
|
2779 |
zero: {
|
2780 |
size: [
|
2781 |
500,
|
2782 |
+
360
|
2783 |
],
|
2784 |
title: n2_('Add video'),
|
2785 |
back: false,
|
2808 |
html5Video = video.match(/\.(mp4)/i);
|
2809 |
|
2810 |
if (youtubeMatch) {
|
2811 |
+
N2Classes.AjaxHelper.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + encodeURI(youtubeMatch[2]) + '&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM').done($.proxy(function (data) {
|
2812 |
if (data.items.length) {
|
2813 |
var snippet = data.items[0].snippet;
|
2814 |
|
2824 |
});
|
2825 |
}
|
2826 |
}, this)).fail(function (data) {
|
2827 |
+
N2Classes.Notification.error(data.error.errors[0].message);
|
2828 |
});
|
2829 |
} else if (vimeoMatch) {
|
2830 |
+
N2Classes.AjaxHelper.getJSON('https://vimeo.com/api/v2/video/' + vimeoMatch[3] + '.json').done($.proxy(function (data) {
|
2831 |
manager._addQuickVideo(this, {
|
2832 |
type: 'vimeo',
|
2833 |
title: data[0].title,
|
2836 |
image: data[0].thumbnail_large
|
2837 |
});
|
2838 |
}, this)).fail(function (data) {
|
2839 |
+
N2Classes.Notification.error(data.responseText);
|
2840 |
});
|
2841 |
|
2842 |
} else if (html5Video) {
|
2843 |
+
N2Classes.Notification.error('This video url is not supported!');
|
2844 |
|
2845 |
} else {
|
2846 |
+
N2Classes.Notification.error('This video url is not supported!');
|
2847 |
}
|
2848 |
}, this)));
|
2849 |
}
|
2855 |
};
|
2856 |
|
2857 |
SlidesManager.prototype._addQuickVideo = function (modal, video) {
|
2858 |
+
N2Classes.AjaxHelper.ajax({
|
2859 |
type: 'POST',
|
2860 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
2861 |
nextendaction: 'quickVideo'
|
2862 |
}),
|
2863 |
data: {
|
2864 |
+
video: N2Classes.Base64.encode(encodeURIComponent(JSON.stringify(video)))
|
2865 |
}
|
2866 |
}).done($.proxy(function (response) {
|
2867 |
this.addBoxes($(response.data));
|
2868 |
|
2869 |
this.initSlides();
|
2870 |
}, this));
|
2871 |
+
if (modal) modal.hide();
|
2872 |
};
|
2873 |
|
2874 |
SlidesManager.prototype.addQuickPost = function (e) {
|
2878 |
cache = {},
|
2879 |
getContent = $.proxy(function (search) {
|
2880 |
if (typeof cache[search] == 'undefined') {
|
2881 |
+
cache[search] = N2Classes.AjaxHelper.ajax({
|
2882 |
type: "POST",
|
2883 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.contentAjaxUrl),
|
2884 |
data: {
|
2885 |
keyword: search
|
2886 |
},
|
2890 |
return cache[search];
|
2891 |
}, this);
|
2892 |
|
2893 |
+
this.quickPostModal = new N2Classes.NextendModal({
|
2894 |
zero: {
|
2895 |
size: [
|
2896 |
600,
|
2946 |
if (!post.image) {
|
2947 |
post.image = '';
|
2948 |
}
|
2949 |
+
N2Classes.AjaxHelper.ajax({
|
2950 |
type: 'POST',
|
2951 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
2952 |
nextendaction: 'quickPost'
|
2953 |
}),
|
2954 |
data: {
|
3024 |
this.enterBulk();
|
3025 |
}
|
3026 |
this.selection.push(slide);
|
3027 |
+
};
|
3028 |
|
3029 |
SlidesManager.prototype.removeSelection = function (slide) {
|
3030 |
this.selection.splice($.inArray(slide, this.selection), 1);
|
3031 |
if (this.selection.length == 0) {
|
3032 |
this.leaveBulk();
|
3033 |
}
|
3034 |
+
};
|
3035 |
|
3036 |
SlidesManager.prototype.bulkSelect = function (cb) {
|
3037 |
for (var i = 0; i < this.slides.length; i++) {
|
3051 |
if (ids.length) {
|
3052 |
this[action](ids, slides);
|
3053 |
} else {
|
3054 |
+
N2Classes.Notification.notice('Please select one or more slides for the action!');
|
3055 |
}
|
3056 |
};
|
3057 |
|
3058 |
SlidesManager.prototype.enterBulk = function () {
|
3059 |
if (!this.isBulkSelection) {
|
3060 |
this.isBulkSelection = true;
|
3061 |
+
this.slidesContainer.nUISortable('option', 'disabled', true);
|
3062 |
$('#n2-admin').addClass('n2-ss-has-box-selection');
|
3063 |
}
|
3064 |
};
|
3065 |
|
3066 |
SlidesManager.prototype.leaveBulk = function () {
|
3067 |
if (this.isBulkSelection) {
|
3068 |
+
this.slidesContainer.nUISortable('option', 'disabled', false);
|
3069 |
$('#n2-admin').removeClass('n2-ss-has-box-selection');
|
3070 |
|
3071 |
for (var i = 0; i < this.slides.length; i++) {
|
3082 |
if (slides.length > 1) {
|
3083 |
title += ' and ' + (slides.length - 1) + ' more';
|
3084 |
}
|
3085 |
+
N2Classes.NextendModal.deleteModal('slide-delete', title, $.proxy(function () {
|
3086 |
+
N2Classes.AjaxHelper.ajax({
|
3087 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3088 |
nextendaction: 'delete'
|
3089 |
}),
|
3090 |
type: 'POST',
|
3112 |
};
|
3113 |
|
3114 |
SlidesManager.prototype.copySlides = function (ids, slides) {
|
3115 |
+
this.showSliderSelector(n2_('Copy slide to ...'), $.proxy(function (data) {
|
3116 |
+
N2Classes.AjaxHelper.ajax({
|
3117 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3118 |
nextendaction: 'copySlides',
|
3119 |
+
targetSliderID: data.sliderID
|
3120 |
}),
|
3121 |
type: 'POST',
|
3122 |
data: {
|
3127 |
};
|
3128 |
|
3129 |
SlidesManager.prototype.publishSlides = function (ids, slides) {
|
3130 |
+
N2Classes.AjaxHelper.ajax({
|
3131 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3132 |
nextendaction: 'publish'
|
3133 |
}),
|
3134 |
type: 'POST',
|
3144 |
};
|
3145 |
|
3146 |
SlidesManager.prototype.unPublishSlides = function (ids, slides) {
|
3147 |
+
N2Classes.AjaxHelper.ajax({
|
3148 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
3149 |
nextendaction: 'unpublish'
|
3150 |
}),
|
3151 |
type: 'POST',
|
3170 |
if (action && typeof this.slide[action] === 'function') {
|
3171 |
this.slide[action](e);
|
3172 |
}
|
3173 |
+
|
3174 |
+
this.menu.removeClass('n2-active').off('mouseleave');
|
3175 |
}, this));
|
3176 |
|
3177 |
this.menu.find('.n2-button').on('click', $.proxy(function (e) {
|
3185 |
});
|
3186 |
}
|
3187 |
}, this));
|
3188 |
+
};
|
3189 |
|
3190 |
|
3191 |
SlidesManager.prototype.showMenu = function (slide) {
|
3192 |
this.slide = slide;
|
3193 |
this.menu.appendTo(slide.box);
|
3194 |
+
};
|
3195 |
|
3196 |
SlidesManager.prototype.hideMenu = function () {
|
3197 |
this.menu.detach();
|
3198 |
+
};
|
3199 |
|
3200 |
SlidesManager.prototype.showSliderSelector = function (title, cb) {
|
3201 |
+
var url = N2Classes.AjaxHelper.makeFallbackUrl(this.ajaxUrl, {
|
3202 |
nextendcontroller: 'sliders',
|
3203 |
nextendaction: 'choose'
|
3204 |
});
|
3205 |
+
this.sliderSelectorModal = new N2Classes.NextendModal({
|
3206 |
zero: {
|
3207 |
size: [
|
3208 |
970,
|
3219 |
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
3220 |
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", $.proxy(function (e) {
|
3221 |
if (e.source == (iframe[0].contentWindow || iframe[0].contentDocument)) {
|
3222 |
+
var message = e[e.message ? "message" : "data"];
|
3223 |
+
try {
|
3224 |
+
message = JSON.parse(message);
|
3225 |
+
if (message.action && message.action === 'ss3embed') {
|
3226 |
+
cb(message);
|
3227 |
+
}
|
3228 |
+
} catch (ex) {
|
3229 |
+
|
3230 |
+
}
|
3231 |
this.hide();
|
3232 |
}
|
3233 |
}, this), false);
|
3239 |
}
|
3240 |
}
|
3241 |
}, true);
|
3242 |
+
};
|
3243 |
|
3244 |
return SlidesManager;
|
3245 |
});
|
3246 |
+
N2D('SmartSliderSlideBackgroundAdmin', ['SmartSliderSlideBackground'], function ($, undefined) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3247 |
|
3248 |
+
/**
|
3249 |
+
* @memberOf N2Classes
|
3250 |
+
*
|
3251 |
+
* @param {N2Classes.FrontendSliderSlide} slide
|
3252 |
+
* @param {jQuery} element
|
3253 |
+
* @param {SmartSliderBackgrounds} manager
|
3254 |
+
* @constructor
|
3255 |
+
*/
|
3256 |
+
function SmartSliderSlideBackgroundAdmin(slide, element, manager) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3257 |
|
3258 |
+
this.types = {
|
3259 |
+
color: 'SmartSliderAdminSlideBackgroundColor',
|
3260 |
+
image: 'SmartSliderAdminSlideBackgroundImage',
|
3261 |
+
video: 'SmartSliderAdminSlideBackgroundVideo'
|
3262 |
+
};
|
3263 |
|
|
|
3264 |
this.allowVisualLoad = true;
|
3265 |
+
this.slider = slide.slider;
|
3266 |
|
|
|
3267 |
|
3268 |
+
this.editor = nextend.currentEditor;
|
|
|
3269 |
|
3270 |
+
N2Classes.SmartSliderSlideBackground.prototype.constructor.call(this, slide, element, manager);
|
3271 |
}
|
3272 |
|
3273 |
+
SmartSliderSlideBackgroundAdmin.prototype = Object.create(N2Classes.SmartSliderSlideBackground.prototype);
|
3274 |
+
SmartSliderSlideBackgroundAdmin.prototype.constructor = SmartSliderSlideBackgroundAdmin;
|
|
|
|
|
|
|
3275 |
|
3276 |
+
SmartSliderSlideBackgroundAdmin.prototype.setVisualLoad = function (state) {
|
|
|
|
|
|
|
|
|
|
|
|
|
3277 |
this.allowVisualLoad = state;
|
3278 |
};
|
3279 |
|
3280 |
+
SmartSliderSlideBackgroundAdmin.prototype.setType = function (type) {
|
3281 |
+
if (type === 'color') {
|
3282 |
+
if (!this.elements.color) {
|
3283 |
+
this.createColorElement(true);
|
3284 |
+
}
|
3285 |
+
|
3286 |
+
if (this.elements.image) {
|
3287 |
+
this.elements.image.kill();
|
3288 |
+
this.elements.image = false;
|
3289 |
+
}
|
3290 |
+
} else if (type === 'image') {
|
3291 |
+
if (!this.elements.color) {
|
3292 |
+
this.createColorElement(true);
|
3293 |
+
}
|
3294 |
+
|
3295 |
+
if (!this.elements.image) {
|
3296 |
+
this.createImageElement();
|
3297 |
+
}
|
3298 |
+
} else {
|
3299 |
}
|
3300 |
};
|
3301 |
|
3302 |
+
SmartSliderSlideBackgroundAdmin.prototype.setMode = function (newMode) {
|
3303 |
+
if (newMode === 'default') {
|
3304 |
+
newMode = this.slider.editor.options.slideBackgroundMode;
|
3305 |
}
|
3306 |
+
this.element.attr('data-mode', newMode);
|
3307 |
|
3308 |
+
if (this.elements.image) {
|
3309 |
+
this.elements.image.updateMode(newMode, this.mode);
|
3310 |
+
}
|
3311 |
|
3312 |
+
this.mode = newMode;
|
3313 |
};
|
3314 |
|
3315 |
+
SmartSliderSlideBackgroundAdmin.prototype.setFocus = function (x, y) {
|
3316 |
+
if (this.elements.image) {
|
3317 |
+
this.elements.image.updateFocus(x, y);
|
3318 |
+
}
|
3319 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3320 |
|
3321 |
+
SmartSliderSlideBackgroundAdmin.prototype.setImageOpacity = function (opacity) {
|
3322 |
+
if (this.elements.image) {
|
3323 |
+
this.elements.image.updateOpacity(opacity);
|
3324 |
}
|
3325 |
};
|
3326 |
|
3327 |
+
SmartSliderSlideBackgroundAdmin.prototype.setBlur = function (blur) {
|
3328 |
+
if (this.elements.image) {
|
3329 |
+
this.elements.image.updateBlur(blur);
|
3330 |
+
}
|
3331 |
};
|
3332 |
|
3333 |
+
SmartSliderSlideBackgroundAdmin.prototype.createColorElement = function (needRefresh) {
|
3334 |
+
needRefresh = needRefresh || false;
|
3335 |
+
this.elements.color = new N2Classes[this.types.color](this, $('<div class="n2-ss-slide-background-color"></div>')
|
3336 |
+
.appendTo(this.$wrapElement));
|
3337 |
|
3338 |
+
if (needRefresh) {
|
3339 |
+
this.elements.color.update(this.editor.settings.getBackgroundColor(), this.editor.settings.getBackgroundGradient(), this.editor.settings.getBackgroundColorEnd());
|
3340 |
+
}
|
3341 |
};
|
3342 |
|
3343 |
+
SmartSliderSlideBackgroundAdmin.prototype.updateColor = function (color, gradient, colorEnd) {
|
3344 |
+
if (!this.elements.color) {
|
3345 |
+
this.createColorElement();
|
3346 |
}
|
|
|
|
|
|
|
3347 |
|
3348 |
+
|
3349 |
+
this.elements.color.update(color, gradient, colorEnd);
|
3350 |
};
|
3351 |
|
3352 |
+
SmartSliderSlideBackgroundAdmin.prototype.createImageElement = function () {
|
3353 |
+
var settings = this.editor.settings,
|
3354 |
+
image = settings.getBackgroundImage();
|
3355 |
+
if (image !== '') {
|
3356 |
+
var imageUrl = nextend.imageHelper.fixed(image),
|
3357 |
+
$image = $('<img src="' + imageUrl + '" alt="" />')
|
3358 |
+
.attr({
|
3359 |
+
'data-hash': md5(image),
|
3360 |
+
'data-desktop': imageUrl,
|
3361 |
+
'data-opacity': settings.getBackgroundImageOpacity(),
|
3362 |
+
'data-blur': settings.getBackgroundImageBlur(),
|
3363 |
+
'data-x': settings.getBackgroundFocusX(),
|
3364 |
+
'data-y': settings.getBackgroundFocusY()
|
3365 |
+
})
|
3366 |
+
.appendTo(this.$wrapElement);
|
3367 |
+
this.elements.image = new N2Classes[this.types.image](this.slide, this.manager, this, $image);
|
3368 |
+
this.elements.image.preLoadAdmin(image);
|
3369 |
+
}
|
3370 |
};
|
3371 |
|
3372 |
+
SmartSliderSlideBackgroundAdmin.prototype.setImage = function (image) {
|
3373 |
+
if (this.elements.image) {
|
3374 |
+
this.elements.image.setDesktopSrc(image);
|
3375 |
+
} else if (image !== '') {
|
3376 |
+
if (this.editor.settings.getType() === 'image') {
|
3377 |
+
this.createImageElement(image);
|
|
|
|
|
|
|
|
|
|
|
|
|
3378 |
}
|
3379 |
}
|
|
|
3380 |
};
|
3381 |
|
3382 |
+
return SmartSliderSlideBackgroundAdmin;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3383 |
});
|
3384 |
+
N2D('EditorAbstract', function ($, undefined) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3385 |
|
3386 |
+
/**
|
3387 |
+
* @memberOf N2Classes
|
3388 |
+
*
|
3389 |
+
* @param {string} sliderElementID
|
3390 |
+
* @param {string} slideContentElementID
|
3391 |
+
* @param {object} options
|
3392 |
+
* @constructor
|
3393 |
+
* @abstract
|
3394 |
+
*/
|
3395 |
+
function EditorAbstract(sliderElementID, slideContentElementID, options) {
|
3396 |
|
3397 |
+
warnInternetExplorerUsers();
|
|
|
|
|
3398 |
|
3399 |
+
this.readyDeferred = $.Deferred();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3400 |
|
3401 |
+
this.sliderElementID = sliderElementID;
|
3402 |
+
this.slideContentElementID = slideContentElementID;
|
3403 |
+
|
3404 |
+
this.options = $.extend({
|
3405 |
+
slideAsFile: 0,
|
3406 |
+
isUploadDisabled: true,
|
3407 |
+
uploadUrl: '',
|
3408 |
+
uploadDir: ''
|
3409 |
+
}, options);
|
3410 |
+
|
3411 |
+
/**
|
3412 |
+
* @type {N2Classes.EditorAbstract}
|
3413 |
+
*/
|
3414 |
+
nextend.currentEditor = this;
|
3415 |
+
|
3416 |
+
/** @type {N2Classes.SmartSliderAbstract} */
|
3417 |
+
this.frontend = null;
|
3418 |
+
/** @type {N2Classes.Generator} */
|
3419 |
+
this.generator = null;
|
3420 |
+
/** @type {N2Classes.FragmentEditor} */
|
3421 |
+
this.fragmentEditor = null;
|
3422 |
+
|
3423 |
+
this.$editedElement = null;
|
3424 |
+
this.editedInstance = null;
|
3425 |
+
|
3426 |
+
N2R('documentReady', $.proxy(function ($) {
|
3427 |
+
if (typeof nextend.fontsDeferred !== 'undefined') {
|
3428 |
+
nextend.fontsDeferred.done($.proxy(this.startEditor, this));
|
3429 |
+
} else {
|
3430 |
+
this.startEditor();
|
3431 |
}
|
3432 |
+
}, this));
|
3433 |
+
}
|
3434 |
|
3435 |
+
/**
|
3436 |
+
* @abstract
|
3437 |
+
*/
|
3438 |
+
EditorAbstract.prototype.startEditor = function () {
|
3439 |
};
|
3440 |
|
3441 |
+
EditorAbstract.prototype.ready = function (fn) {
|
3442 |
+
this.readyDeferred.done(fn);
|
3443 |
+
};
|
3444 |
+
|
3445 |
+
EditorAbstract.prototype.getSelf = function () {
|
3446 |
+
return this;
|
3447 |
+
};
|
3448 |
+
|
3449 |
+
EditorAbstract.prototype.getAvailableDeviceModes = function () {
|
3450 |
+
return {
|
3451 |
+
"desktopPortrait": 1,
|
3452 |
+
"desktopLandscape": 0,
|
3453 |
+
"tabletPortrait": 1,
|
3454 |
+
"tabletLandscape": 1,
|
3455 |
+
"mobilePortrait": 1,
|
3456 |
+
"mobileLandscape": 1
|
3457 |
+
};
|
3458 |
+
};
|
3459 |
+
|
3460 |
+
EditorAbstract.prototype.getGeneratorVariables = function () {
|
3461 |
+
return this.$editedElement.data('variables');
|
3462 |
+
};
|
3463 |
+
|
3464 |
+
/**
|
3465 |
+
*
|
3466 |
+
* @returns {*} .n2-ss-layers-container
|
3467 |
+
*/
|
3468 |
+
EditorAbstract.prototype.getMainContainerElement = function () {
|
3469 |
+
return this.$editedElement.find('.n2-ss-layers-container').addBack().last();
|
3470 |
+
};
|
3471 |
+
|
3472 |
+
function warnInternetExplorerUsers() {
|
3473 |
+
var ie = isInternetExplorer();
|
3474 |
+
if (ie && ie < 10) {
|
3475 |
+
alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser);
|
3476 |
+
}
|
3477 |
+
}
|
3478 |
+
|
3479 |
+
function isInternetExplorer() {
|
3480 |
+
var myNav = navigator.userAgent.toLowerCase();
|
3481 |
+
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
|
3482 |
+
}
|
3483 |
+
|
3484 |
+
|
3485 |
+
return EditorAbstract;
|
3486 |
+
});
|
3487 |
+
N2D('EditorSlide', ['EditorAbstract'], function ($, undefined) {
|
3488 |
+
|
3489 |
+
/**
|
3490 |
+
* @memberOf N2Classes
|
3491 |
+
*
|
3492 |
+
* @param {string} sliderElementID
|
3493 |
+
* @param {string} slideContentElementID
|
3494 |
+
* @param {object} options
|
3495 |
+
* @constructor
|
3496 |
+
* @augments {EditorAbstract}
|
3497 |
+
*/
|
3498 |
+
function EditorSlide(sliderElementID, slideContentElementID, options) {
|
3499 |
+
|
3500 |
+
N2Classes.EditorAbstract.prototype.constructor.call(this, sliderElementID, slideContentElementID, $.extend({
|
3501 |
+
isAddSample: false,
|
3502 |
+
slideBackgroundMode: 'fill'
|
3503 |
+
}, options));
|
3504 |
+
|
3505 |
+
}
|
3506 |
+
|
3507 |
+
EditorSlide.prototype = Object.create(N2Classes.EditorAbstract.prototype);
|
3508 |
+
EditorSlide.prototype.constructor = EditorSlide;
|
3509 |
+
|
3510 |
+
|
3511 |
+
EditorSlide.prototype.startEditor = function () {
|
3512 |
+
|
3513 |
+
this.$slideContentElement = $('#' + this.slideContentElementID);
|
3514 |
+
this.slideStartValue = this.$slideContentElement.val();
|
3515 |
+
|
3516 |
+
N2R('#' + this.sliderElementID, $.proxy(function () {
|
3517 |
+
|
3518 |
+
/** @type {SmartSliderAbstract} */
|
3519 |
+
this.frontend = window[this.sliderElementID];
|
3520 |
+
this.frontend.editor = this;
|
3521 |
+
nextend.pre = 'div#' + this.frontend.elementID + ' ';
|
3522 |
+
|
3523 |
+
this.frontend.visible($.proxy(this.sliderStarted, this));
|
3524 |
+
}, this));
|
3525 |
+
};
|
3526 |
+
|
3527 |
+
EditorSlide.prototype.sliderStarted = function () {
|
3528 |
+
|
3529 |
+
$('body').addClass('n2-ss-slider-visible');
|
3530 |
+
var el = $("#n2-ss-slide-canvas-container"),
|
3531 |
+
tinyScrollbar = el.tinyscrollbar({
|
3532 |
+
axis: "x",
|
3533 |
+
wheel: false,
|
3534 |
+
wheelLock: false
|
3535 |
+
}).data('plugin_tinyscrollbar');
|
3536 |
+
if (typeof el.get(0).move === 'function') {
|
3537 |
+
el.get(0).move = null;
|
3538 |
+
}
|
3539 |
+
|
3540 |
+
this.frontend.sliderElement.on('SliderResize', function () {
|
3541 |
+
tinyScrollbar.update("relative");
|
3542 |
+
});
|
3543 |
+
|
3544 |
+
|
3545 |
+
this.$editedElement = this.frontend.sliderElement.find('.n2-ss-currently-edited-slide');
|
3546 |
+
this.editedInstance = this.$editedElement.data('slide');
|
3547 |
+
|
3548 |
+
var isStatic = this.$editedElement.hasClass('n2-ss-static-slide');
|
3549 |
+
|
3550 |
+
this.generator = new N2Classes.Generator(this);
|
3551 |
+
|
3552 |
+
this.generator.registerFields([
|
3553 |
+
'#slidetitle',
|
3554 |
+
'#sldedescription',
|
3555 |
+
'#slidethumbnail',
|
3556 |
+
'#slidebackgroundImage',
|
3557 |
+
'#slidebackgroundAlt',
|
3558 |
+
'#slidebackgroundTitle',
|
3559 |
+
'#slidebackgroundVideoMp4',
|
3560 |
+
'#slidebackgroundColor',
|
3561 |
+
'#slidebackgroundColorEnd',
|
3562 |
+
'#linkslidelink-1',
|
3563 |
+
'#layergenerator-visible',
|
3564 |
+
'#layergroup-generator-visible'
|
3565 |
+
]);
|
3566 |
+
|
3567 |
+
this.generator.registerGlobalField('slide', 'name', '#slidetitle');
|
3568 |
+
this.generator.registerGlobalField('slide', 'description', '#slidedescription');
|
3569 |
+
|
3570 |
+
this.getMainContainerElement().on('updateSize', $.proxy(this.updateSize, this));
|
3571 |
+
|
3572 |
+
this.settings = new N2Classes.SlideSettings(this, isStatic);
|
3573 |
+
|
3574 |
+
var fragmentEditorConfiguration = {};
|
3575 |
+
if (isStatic) {
|
3576 |
+
fragmentEditorConfiguration.snapSelector = '.n2-ss-static-slide .n2-ss-layer.nui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide';
|
3577 |
+
} else {
|
3578 |
+
fragmentEditorConfiguration.snapSelector = '.n2-ss-slide.n2-ss-slide-active .n2-ss-layer.nui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide';
|
3579 |
+
}
|
3580 |
+
|
3581 |
+
this.fragmentEditor = new N2Classes.FragmentEditor(this, this.getFrontendSlide().$element, fragmentEditorConfiguration, this.options);
|
3582 |
+
|
3583 |
+
this.getFrontendElement()
|
3584 |
+
.on({
|
3585 |
+
SliderResize: $.proxy(this.fragmentEditor.onResize, this.fragmentEditor),
|
3586 |
+
SliderDeviceOrientation: $.proxy(this.fragmentEditor.onChangeDeviceOrientation, this.fragmentEditor)
|
3587 |
+
});
|
3588 |
+
|
3589 |
+
this.readyDeferred.resolve();
|
3590 |
+
|
3591 |
+
|
3592 |
+
$('#smartslider-form').on({
|
3593 |
+
checkChanged: $.proxy(this.prepareFormForCheck, this),
|
3594 |
+
submit: $.proxy(this.onSlideSubmit, this)
|
3595 |
+
});
|
3596 |
+
|
3597 |
+
if (this.options.isAddSample) {
|
3598 |
+
this.startSampleSlides();
|
3599 |
+
}
|
3600 |
+
};
|
3601 |
+
|
3602 |
+
EditorSlide.prototype.prepareFormForCheck = function () {
|
3603 |
+
var data = JSON.stringify(this.fragmentEditor.getData()),
|
3604 |
+
startData = JSON.stringify(JSON.parse(N2Classes.Base64.decode(this.slideStartValue)));
|
3605 |
+
|
3606 |
+
this.$slideContentElement.val(startData == data ? this.slideStartValue : N2Classes.Base64.encode(data));
|
3607 |
+
};
|
3608 |
+
|
3609 |
+
EditorSlide.prototype.onSlideSubmit = function (e) {
|
3610 |
+
if (!nextend.isPreview) {
|
3611 |
+
this.prepareForm();
|
3612 |
+
e.preventDefault();
|
3613 |
+
|
3614 |
+
nextend.askToSave = false;
|
3615 |
+
|
3616 |
+
//$('#n2-admin').removeClass('n2-ss-add-slide-with-sample');
|
3617 |
+
|
3618 |
+
if (this.options.slideAsFile && typeof window.FormData !== undefined && typeof window.File !== 'undefined') {
|
3619 |
+
var fd = new FormData();
|
3620 |
+
var data = $('#smartslider-form').serializeArray();
|
3621 |
+
$.each(data, function (key, input) {
|
3622 |
+
if (input.name == 'slide[slide]') {
|
3623 |
+
try {
|
3624 |
+
fd.append('slide', new Blob([input.value]), "slide.txt");
|
3625 |
+
} catch (e) {
|
3626 |
+
try {
|
3627 |
+
fd.append('slide', new Blob([input.value]));
|
3628 |
+
} catch (e) {
|
3629 |
+
try {
|
3630 |
+
fd.append('slide', new File([input.value], "slide.txt"));
|
3631 |
+
} catch (e) {
|
3632 |
+
N2Classes.Notification.notice('Your browser does not support File api, please disable "Send slide as file" option in the global settings.');
|
3633 |
+
}
|
3634 |
+
}
|
3635 |
+
}
|
3636 |
+
} else {
|
3637 |
+
fd.append(input.name, input.value);
|
3638 |
+
}
|
3639 |
+
});
|
3640 |
+
|
3641 |
+
N2Classes.AjaxHelper.ajax({
|
3642 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(window.location.href),
|
3643 |
+
type: 'POST',
|
3644 |
+
data: fd,
|
3645 |
+
contentType: false,
|
3646 |
+
processData: false
|
3647 |
+
}).done($.proxy(this.afterSave, this));
|
3648 |
+
} else {
|
3649 |
+
N2Classes.AjaxHelper.ajax({
|
3650 |
+
type: 'POST',
|
3651 |
+
url: N2Classes.AjaxHelper.makeAjaxUrl(window.location.href),
|
3652 |
+
data: $('#smartslider-form').serialize(),
|
3653 |
+
dataType: 'json'
|
3654 |
+
}).done($.proxy(this.afterSave, this));
|
3655 |
+
}
|
3656 |
+
}
|
3657 |
+
};
|
3658 |
+
|
3659 |
+
EditorSlide.prototype.afterSave = function () {
|
3660 |
+
nextend.askToSave = true;
|
3661 |
+
$('#smartslider-form').trigger('saved');
|
3662 |
+
|
3663 |
+
$('.n2-ss-edit-slide-top-details .n2-h1').html($('#slidetitle').val());
|
3664 |
+
};
|
3665 |
+
|
3666 |
+
EditorSlide.prototype.prepareForm = function () {
|
3667 |
+
if (this.fragmentEditor.canvasSettings.ruler) {
|
3668 |
+
$('#slideguides').val(N2Classes.Base64.encode(JSON.stringify(this.fragmentEditor.canvasSettings.ruler.toArray())));
|
3669 |
+
}
|
3670 |
+
|
3671 |
+
this.$slideContentElement.val(N2Classes.Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.fragmentEditor.getData()))));
|
3672 |
+
};
|
3673 |
+
|
3674 |
+
EditorSlide.prototype.getLayout = function () {
|
3675 |
+
var propertiesRaw = $('#smartslider-form').serializeArray(),
|
3676 |
+
properties = {};
|
3677 |
+
|
3678 |
+
for (var i = 0; i < propertiesRaw.length; i++) {
|
3679 |
+
var m = propertiesRaw[i].name.match(/slide\[(.*?)\]/);
|
3680 |
+
if (m) {
|
3681 |
+
properties[m[1]] = propertiesRaw[i].value;
|
3682 |
+
}
|
3683 |
+
}
|
3684 |
+
delete properties['generator'];
|
3685 |
+
delete properties['published'];
|
3686 |
+
delete properties['publishdates'];
|
3687 |
+
delete properties['record-start'];
|
3688 |
+
delete properties['record-slides'];
|
3689 |
+
delete properties['slide'];
|
3690 |
+
|
3691 |
+
properties['slide'] = this.fragmentEditor.getData();
|
3692 |
+
return properties;
|
3693 |
+
};
|
3694 |
+
|
3695 |
+
EditorSlide.prototype.loadLayout = function (properties, slideDataOverwrite, layerOverwrite) {
|
3696 |
+
// we are working on references!
|
3697 |
+
var slide = properties['slide'];
|
3698 |
+
delete properties['slide'];
|
3699 |
+
if (layerOverwrite) {
|
3700 |
+
this.fragmentEditor.importLayers(slide, true);
|
3701 |
+
} else {
|
3702 |
+
this.fragmentEditor.importLayers(slide, false);
|
3703 |
+
}
|
3704 |
+
if (slideDataOverwrite) {
|
3705 |
+
for (var k in properties) {
|
3706 |
+
$('#slide' + k).val(properties[k]).trigger('change');
|
3707 |
+
}
|
3708 |
+
}
|
3709 |
+
properties['slide'] = slide;
|
3710 |
+
};
|
3711 |
+
|
3712 |
+
EditorSlide.prototype.copy = function () {
|
3713 |
+
var slide = {
|
3714 |
+
data: this.settings.getBackgroundData(),
|
3715 |
+
layers: this.fragmentEditor.getData()
|
3716 |
+
};
|
3717 |
+
$.jStorage.set('copiedSlide', JSON.stringify(slide));
|
3718 |
+
};
|
3719 |
+
|
3720 |
+
EditorSlide.prototype.paste = function () {
|
3721 |
+
var slide = $.jStorage.get('copiedSlide');
|
3722 |
+
if (slide) {
|
3723 |
+
slide = JSON.parse(slide);
|
3724 |
+
this.settings.setData(slide.data);
|
3725 |
+
|
3726 |
+
this.fragmentEditor.mainContainer.replaceLayers(slide.layers);
|
3727 |
+
}
|
3728 |
+
};
|
3729 |
+
|
3730 |
+
EditorSlide.prototype.hasClipboard = function () {
|
3731 |
+
var slide = $.jStorage.get('copiedSlide');
|
3732 |
+
if (slide) {
|
3733 |
+
return true;
|
3734 |
+
}
|
3735 |
+
return false;
|
3736 |
+
};
|
3737 |
+
|
3738 |
+
EditorSlide.prototype.startSampleSlides = function () {
|
3739 |
+
var sampleSlidesUrl = 'https://smartslider3.com/slides/' + window.N2SS3VERSION + '/free/';
|
3740 |
+
|
3741 |
+
|
3742 |
+
var that = this,
|
3743 |
+
eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
3744 |
+
|
3745 |
+
var $iframe = $('<iframe src="' + sampleSlidesUrl + '"></iframe>').prependTo('.n2-ss-sample-slides-container'),
|
3746 |
+
iframe = $iframe[0];
|
3747 |
+
|
3748 |
+
$('html, body').scrollTop($iframe.offset().top - $('#wpadminbar').height());
|
3749 |
+
|
3750 |
+
var $settings = $('.n2-ss-sample-slide-settings');
|
3751 |
+
|
3752 |
+
var $type = $('#slidebackground-type'),
|
3753 |
+
$backgroundImage = $('#slidebackgroundImage'),
|
3754 |
+
$sampleBackgroundImage = $('#n2-ss-sample-slide-setting-background-image')
|
3755 |
+
.on('click', function () {
|
3756 |
+
$backgroundImage.parent().find('.n2-form-element-button').trigger('click');
|
3757 |
+
}),
|
3758 |
+
cbUpdateBackgroundImage = function () {
|
3759 |
+
var image = $backgroundImage.val();
|
3760 |
+
if (image === '') {
|
3761 |
+
$settings.removeClass('n2-ss-has-image');
|
3762 |
+
$sampleBackgroundImage.css('background-image', 'url(' + nextend.imageHelper.fixed('$system$/images/placeholder/image.png') + ')');
|
3763 |
+
if ($type.val() !== 'color') {
|
3764 |
+
$type.val('color')
|
3765 |
+
.trigger('change');
|
3766 |
+
}
|
3767 |
+
} else {
|
3768 |
+
$settings.addClass('n2-ss-has-image');
|
3769 |
+
if ($type.val() !== 'image') {
|
3770 |
+
$type.val('image')
|
3771 |
+
.trigger('change');
|
3772 |
+
}
|
3773 |
+
$sampleBackgroundImage.css('background-image', 'url(' + nextend.imageHelper.fixed(image) + ')');
|
3774 |
+
}
|
3775 |
+
};
|
3776 |
+
|
3777 |
+
$sampleBackgroundImage.find('.n2-i-close').on('click', function (e) {
|
3778 |
+
e.stopPropagation();
|
3779 |
+
$backgroundImage.parent().find('.n2-form-element-clear').trigger('click');
|
3780 |
+
});
|
3781 |
+
|
3782 |
+
$backgroundImage.on('nextendChange', cbUpdateBackgroundImage);
|
3783 |
+
cbUpdateBackgroundImage();
|
3784 |
+
|
3785 |
+
var $opacityField = $('#slidebackgroundImageOpacity'),
|
3786 |
+
$opacitySlider = $('#n2-ss-sample-slide-setting-opacity-slider').removeAttr('slide').prop('slide', false).nUISlider({
|
3787 |
+
min: 0,
|
3788 |
+
max: 100,
|
3789 |
+
step: 1,
|
3790 |
+
slide: function (event, ui) {
|
3791 |
+
$opacityField.data('field').insideChange(ui.value);
|
3792 |
+
}
|
3793 |
+
}),
|
3794 |
+
cb = function (e) {
|
3795 |
+
$opacitySlider.nUISlider("option", 'value', $opacityField.val());
|
3796 |
+
};
|
3797 |
+
|
3798 |
+
$opacityField.on('nextendChange', cb);
|
3799 |
+
cb();
|
3800 |
+
|
3801 |
+
var $blurField = $('#slidebackgroundImageBlur'),
|
3802 |
+
$blurSlider = $('#n2-ss-sample-slide-setting-blur-slider').removeAttr('slide').prop('slide', false).nUISlider({
|
3803 |
+
min: 0,
|
3804 |
+
max: 40,
|
3805 |
+
step: 1,
|
3806 |
+
slide: function (event, ui) {
|
3807 |
+
$blurField.data('field').insideChange(ui.value);
|
3808 |
+
}
|
3809 |
+
}),
|
3810 |
+
cb2 = function (e) {
|
3811 |
+
$blurSlider.nUISlider("option", 'value', $blurField.val());
|
3812 |
+
};
|
3813 |
+
|
3814 |
+
$blurField.on('nextendChange', cb2);
|
3815 |
+
cb2();
|
3816 |
+
|
3817 |
+
var $colorField = $('#slidebackgroundColor'),
|
3818 |
+
$color = $('#n2-ss-sample-slide-setting-color')
|
3819 |
+
.n2spectrum({
|
3820 |
+
showAlpha: 1,
|
3821 |
+
preferredFormat: "hex8",
|
3822 |
+
showInput: false,
|
3823 |
+
showButtons: false,
|
3824 |
+
move: function () {
|
3825 |
+
var value = $color.n2spectrum("get").toHexString8();
|
3826 |
+
$color.val(value);
|
3827 |
+
$colorField.data('field').insideChange(value);
|
3828 |
+
},
|
3829 |
+
showSelectionPalette: true,
|
3830 |
+
showPalette: true,
|
3831 |
+
maxSelectionSize: 6,
|
3832 |
+
localStorageKey: 'color',
|
3833 |
+
palette: [
|
3834 |
+
['000000', '55aa39', '357cbd', 'bb4a28', '8757b2', '000000CC'],
|
3835 |
+
['81898d', '5cba3c', '4594e1', 'd85935', '9e74c2', '00000080'],
|
3836 |
+
['ced3d5', '27ae60', '01add3', 'e79d19', 'e264af', 'FFFFFFCC'],
|
3837 |
+
['ffffff', '2ecc71', '00c1c4', 'ecc31f', 'ec87c0', 'FFFFFF80']
|
3838 |
+
]
|
3839 |
+
}),
|
3840 |
+
cb3 = function (e) {
|
3841 |
+
var color = $colorField.val();
|
3842 |
+
if (color != $color.val()) {
|
3843 |
+
$color.n2spectrum("set", color);
|
3844 |
+
}
|
3845 |
+
};
|
3846 |
+
$colorField.on('nextendChange', cb3);
|
3847 |
+
cb3();
|
3848 |
+
|
3849 |
+
|
3850 |
+
var $gradientDir = $('#slidebackgroundGradient'),
|
3851 |
+
cb4 = function () {
|
3852 |
+
if ($gradientDir.val() == 'off') {
|
3853 |
+
$settings.removeClass('n2-ss-has-gradient');
|
3854 |
+
} else {
|
3855 |
+
$settings.addClass('n2-ss-has-gradient');
|
3856 |
+
}
|
3857 |
+
};
|
3858 |
+
$gradientDir.on('nextendChange', cb4);
|
3859 |
+
cb4();
|
3860 |
+
|
3861 |
+
var $gradientField = $('#slidebackgroundColorEnd'),
|
3862 |
+
gradient = $('#n2-ss-sample-slide-setting-gradient')
|
3863 |
+
.n2spectrum({
|
3864 |
+
showAlpha: 1,
|
3865 |
+
preferredFormat: "hex8",
|
3866 |
+
showInput: false,
|
3867 |
+
showButtons: false,
|
3868 |
+
move: function () {
|
3869 |
+
var value = gradient.n2spectrum("get").toHexString8();
|
3870 |
+
$gradientField.data('field').insideChange(value);
|
3871 |
+
},
|
3872 |
+
showSelectionPalette: true,
|
3873 |
+
showPalette: true,
|
3874 |
+
maxSelectionSize: 6,
|
3875 |
+
localStorageKey: 'color',
|
3876 |
+
palette: [
|
3877 |
+
['000000', '55aa39', '357cbd', 'bb4a28', '8757b2', '000000CC'],
|
3878 |
+
['81898d', '5cba3c', '4594e1', 'd85935', '9e74c2', '00000080'],
|
3879 |
+
['ced3d5', '27ae60', '01add3', 'e79d19', 'e264af', 'FFFFFFCC'],
|
3880 |
+
['ffffff', '2ecc71', '00c1c4', 'ecc31f', 'ec87c0', 'FFFFFF80']
|
3881 |
+
]
|
3882 |
+
}),
|
3883 |
+
cb5 = function (e) {
|
3884 |
+
gradient.n2spectrum("set", $gradientField.val());
|
3885 |
+
};
|
3886 |
+
$gradientField.on('outsideChange', cb5);
|
3887 |
+
cb5();
|
3888 |
+
|
3889 |
+
window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
|
3890 |
+
if (e.source == (iframe.contentWindow || iframe.contentDocument)) {
|
3891 |
+
var a = e[e.message ? "message" : "data"];
|
3892 |
+
if (a.key) {
|
3893 |
+
switch (a.key) {
|
3894 |
+
case 'sampleSlide':
|
3895 |
+
var slide = JSON.parse(a.data);
|
3896 |
+
that.settings.setData(slide.data, true);
|
3897 |
+
|
3898 |
+
that.fragmentEditor.mainContainer.replaceLayers(slide.layers);
|
3899 |
+
|
3900 |
+
if (that.fragmentEditor.currentEditorMode != 'content' && that.fragmentEditor.mainContent != undefined) {
|
3901 |
+
that.fragmentEditor.updateEditorMode('content');
|
3902 |
+
}
|
3903 |
+
break;
|
3904 |
+
|
3905 |
+
case 'ready':
|
3906 |
+
(iframe.contentWindow || iframe.contentDocument).postMessage({
|
3907 |
+
key: 'ackReady'
|
3908 |
+
}, "*");
|
3909 |
+
if (that.options.isAddSample) {
|
3910 |
+
(iframe.contentWindow || iframe.contentDocument).postMessage({
|
3911 |
+
key: 'create'
|
3912 |
+
}, "*");
|
3913 |
+
that.options.isAddSample = false;
|
3914 |
+
}
|
3915 |
+
break;
|
3916 |
+
}
|
3917 |
+
}
|
3918 |
+
}
|
3919 |
+
}, false);
|
3920 |
+
};
|
3921 |
+
|
3922 |
+
EditorSlide.prototype.getAvailableDeviceModes = function () {
|
3923 |
+
return this.frontend.responsive.parameters.deviceModes;
|
3924 |
+
};
|
3925 |
+
|
3926 |
+
EditorSlide.prototype.getSlideBackground = function () {
|
3927 |
+
return this.$editedElement.data('slideBackground');
|
3928 |
+
};
|
3929 |
+
|
3930 |
+
/**
|
3931 |
+
*
|
3932 |
+
* @returns {jQuery} #n2-ss-0
|
3933 |
+
*/
|
3934 |
+
EditorSlide.prototype.getFrontendElement = function () {
|
3935 |
+
return this.frontend.sliderElement;
|
3936 |
+
};
|
3937 |
+
|
3938 |
+
/**
|
3939 |
+
* @returns {FrontendSliderSlide}
|
3940 |
+
*/
|
3941 |
+
EditorSlide.prototype.getFrontendSlide = function () {
|
3942 |
+
return this.editedInstance;
|
3943 |
+
};
|
3944 |
+
|
3945 |
+
EditorSlide.prototype.getHorizontalRatio = function () {
|
3946 |
+
return this.frontend.responsive.lastRatios.slideW;
|
3947 |
+
};
|
3948 |
+
|
3949 |
+
EditorSlide.prototype.getVerticalRatio = function () {
|
3950 |
+
return this.frontend.responsive.lastRatios.slideH;
|
3951 |
+
};
|
3952 |
+
|
3953 |
+
EditorSlide.prototype.updateSize = function () {
|
3954 |
+
return this.frontend.responsive.doVerticalResize();
|
3955 |
+
};
|
3956 |
+
|
3957 |
+
EditorSlide.prototype.getDeviceMode = function () {
|
3958 |
+
return this.frontend.responsive.getNormalizedModeString();
|
3959 |
+
};
|
3960 |
+
|
3961 |
+
return EditorSlide;
|
3962 |
+
});
|
3963 |
+
N2D('Generator', ['EditorAbstract'], function ($, undefined) {
|
3964 |
+
"use strict";
|
3965 |
+
|
3966 |
+
/**
|
3967 |
+
* @memberOf N2Classes
|
3968 |
+
*
|
3969 |
+
* @param {EditorAbstract} editor
|
3970 |
+
* @constructor
|
3971 |
+
*/
|
3972 |
+
function Generator(editor) {
|
3973 |
+
|
3974 |
+
/**
|
3975 |
+
* @type {EditorAbstract}
|
3976 |
+
*/
|
3977 |
+
this.editor = editor;
|
3978 |
+
this._refreshTimeout = null;
|
3979 |
+
this.modal = false;
|
3980 |
+
this.group = 0;
|
3981 |
+
this.editor.generator = this;
|
3982 |
+
var variables = this.editor.getGeneratorVariables();
|
3983 |
+
if (variables) {
|
3984 |
+
this.variables = variables;
|
3985 |
+
|
3986 |
+
for (var i in this.variables) {
|
3987 |
+
if (!isNaN(parseFloat(i)) && isFinite(i)) {
|
3988 |
+
this.group = Math.max(this.group, parseInt(i) + 1);
|
3989 |
+
}
|
3990 |
+
}
|
3991 |
+
|
3992 |
+
this.fill = this.generatorFill;
|
3993 |
+
if (this.group > 0) {
|
3994 |
+
this.registerField = this.generatorRegisterField;
|
3995 |
+
|
3996 |
+
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>')
|
3997 |
+
.on('click', $.proxy(function (e) {
|
3998 |
+
e.preventDefault();
|
3999 |
+
this.showModal();
|
4000 |
+
}, this));
|
4001 |
+
|
4002 |
+
|
4003 |
+
$('body').addClass('n2-ss-dynamic-slide');
|
4004 |
+
}
|
4005 |
+
} else {
|
4006 |
+
this.variables = null;
|
4007 |
+
}
|
4008 |
+
}
|
4009 |
+
|
4010 |
+
Generator.prototype.isDynamicSlide = function () {
|
4011 |
+
return this.group > 0;
|
4012 |
};
|
4013 |
|
4014 |
Generator.prototype.splitTokens = function (input) {
|
4034 |
tokens.push(currentToken);
|
4035 |
}
|
4036 |
return tokens;
|
4037 |
+
};
|
4038 |
|
4039 |
Generator.prototype.fill = function (value) {
|
4040 |
return value;
|
4112 |
.replace(tags, function ($0, $1) {
|
4113 |
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
|
4114 |
});
|
4115 |
+
};
|
4116 |
|
4117 |
Generator.prototype.removehtml = function (variable) {
|
4118 |
return $('<div>' + variable + '</div>').text();
|
4196 |
return s.replace(re, '');
|
4197 |
};
|
4198 |
|
4199 |
+
Generator.prototype.registerFields = function (fields) {
|
4200 |
+
for (var i = 0; i < fields.length; i++) {
|
4201 |
+
this.registerField(fields[i]);
|
4202 |
+
}
|
4203 |
+
};
|
4204 |
+
|
4205 |
+
Generator.prototype.registerGlobalField = function (namespace, name, field) {
|
4206 |
+
if (this.variables !== null) {
|
4207 |
+
field = $(field).on('nextendChange', $.proxy(function () {
|
4208 |
+
this.variables[namespace][name] = field.val();
|
4209 |
+
this.refresh();
|
4210 |
+
}, this));
|
4211 |
+
}
|
4212 |
+
};
|
4213 |
+
|
4214 |
Generator.prototype.registerField = function (field) {
|
4215 |
};
|
4216 |
|
4217 |
Generator.prototype.generatorRegisterField = function (field) {
|
4218 |
+
field = $(field);
|
4219 |
var parent = field.parent();
|
4220 |
parent.on({
|
4221 |
mouseenter: $.proxy(function () {
|
4275 |
content = $('<div class="n2-generator-insert-variable"/>');
|
4276 |
|
4277 |
|
4278 |
+
var groupHeader = N2Classes.NextendModal.prototype.createHeading(n2_('Choose the group')).appendTo(content);
|
4279 |
var groupContainer = $('<div class="n2-group-container" />').appendTo(content);
|
4280 |
|
4281 |
|
4282 |
+
content.append(N2Classes.NextendModal.prototype.createHeading(n2_('Choose the variable')));
|
4283 |
var variableContainer = $('<div class="n2-variable-container webkit-scroll-fix" />').appendTo(content);
|
4284 |
|
4285 |
+
//content.append(N2Classes.NextendModal.prototype.createHeading('Functions'));
|
4286 |
var functionsContainer = $('<div class="n2-generator-functions-container n2-form-element-mixed" />')
|
4287 |
.appendTo($('<div class="n2-form" />').appendTo(content));
|
4288 |
|
4289 |
+
content.append(N2Classes.NextendModal.prototype.createHeading(n2_('Result')));
|
4290 |
resultContainer.appendTo(content);
|
4291 |
|
4292 |
|
4369 |
active.removelinebreaks = parseInt(removelinebreaks.val());
|
4370 |
updateResult();
|
4371 |
}, this));
|
4372 |
+
var removelinebreaksIndex = functionsContainer.find('#n2-generator-function-removelinebreaks-index');
|
4373 |
removelinebreaksIndex.on('change', $.proxy(function () {
|
4374 |
active.removelinebreaksIndex = parseInt(removelinebreaksIndex.val());
|
4375 |
updateResult();
|
4410 |
|
4411 |
var inited = false;
|
4412 |
|
4413 |
+
this.modal = new N2Classes.NextendModal({
|
4414 |
zero: {
|
4415 |
size: [
|
4416 |
1000,
|
4454 |
this.activeField.val(value).trigger('change');
|
4455 |
};
|
4456 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4457 |
|
4458 |
Generator.prototype.refresh = function () {
|
4459 |
if (this._refreshTimeout) {
|
4464 |
};
|
4465 |
|
4466 |
Generator.prototype._refresh = function () {
|
4467 |
+
var layers = this.editor.fragmentEditor.mainContainer.container.getAllLayers();
|
4468 |
for (var j = 0; j < layers.length; j++) {
|
4469 |
if (layers[j].type == 'layer') {
|
4470 |
layers[j].item.reRender();
|
4474 |
|
4475 |
return Generator;
|
4476 |
});
|
4477 |
+
N2D('History', function ($, undefined) {
|
4478 |
"use strict";
|
4479 |
|
4480 |
+
/**
|
4481 |
+
* @memberOf N2Classes
|
4482 |
+
*
|
4483 |
+
* @constructor
|
4484 |
+
*/
|
4485 |
function History() {
|
4486 |
this.historyStates = 50;
|
4487 |
this.enabled = this.historyStates != 0;
|
4501 |
this.undoBTN = $('#n2-ss-undo').on({
|
4502 |
click: $.proxy(this.undo, this),
|
4503 |
mousedown: function (e) {
|
4504 |
+
N2Classes.WindowManager.get().setMouseDownArea('undo', e);
|
4505 |
}
|
4506 |
});
|
4507 |
this.redoBTN = $('#n2-ss-redo').on({
|
4508 |
click: $.proxy(this.redo, this),
|
4509 |
mousedown: function (e) {
|
4510 |
+
N2Classes.WindowManager.get().setMouseDownArea('redo', e);
|
4511 |
}
|
4512 |
});
|
4513 |
this.updateUI();
|
4514 |
+
}
|
4515 |
+
|
4516 |
+
/**
|
4517 |
+
* @returns {History}
|
4518 |
+
*/
|
4519 |
+
History.get = function () {
|
4520 |
+
var history = new History();
|
4521 |
+
/**
|
4522 |
+
* @returns {History}
|
4523 |
+
*/
|
4524 |
+
History.get = function () {
|
4525 |
+
return history;
|
4526 |
+
};
|
4527 |
+
return history;
|
4528 |
};
|
4529 |
|
4530 |
History.prototype.updateUI = function () {
|
4554 |
|
4555 |
History.prototype.isEnabled = function () {
|
4556 |
return this.enabled && this.historyAddAllowed;
|
4557 |
+
};
|
4558 |
|
4559 |
/**
|
4560 |
*
|
4568 |
return batch;
|
4569 |
}
|
4570 |
return false;
|
4571 |
+
};
|
4572 |
|
4573 |
History.prototype.endBatch = function () {
|
4574 |
if (this.isEnabled()) {
|
4577 |
}
|
4578 |
this.currentBatch = this.currentBatch.parent;
|
4579 |
}
|
4580 |
+
};
|
4581 |
|
4582 |
History.prototype.addControl = function (mode) {
|
4583 |
return this.currentBatch._add(new Control(mode));
|
4584 |
+
};
|
4585 |
|
4586 |
History.prototype.addSimple = function (that, undoAction, redoAction, context) {
|
4587 |
if (this.isEnabled()) {
|
4588 |
return this.currentBatch._add(new Task(that, undoAction, redoAction, context));
|
4589 |
}
|
4590 |
return false;
|
4591 |
+
};
|
4592 |
|
4593 |
/**
|
4594 |
*
|
4613 |
return this.currentBatch._add(new TaskValue(that, action, action, context));
|
4614 |
}
|
4615 |
return false;
|
4616 |
+
};
|
4617 |
|
4618 |
History.prototype.getCurrentBatchStack = function () {
|
4619 |
if (this.currentBatch != this) {
|
4620 |
return this.currentBatch.tasks;
|
4621 |
}
|
4622 |
return this.tasks[this.tasks.length - 1];
|
4623 |
+
};
|
4624 |
|
4625 |
/**
|
4626 |
*
|
4727 |
Batch.prototype._add = function (task) {
|
4728 |
this.tasks.push(task);
|
4729 |
return task;
|
4730 |
+
};
|
4731 |
|
4732 |
Batch.prototype.invertUndo = function () {
|
4733 |
this.undo = function () {
|
4737 |
}
|
4738 |
}
|
4739 |
return true;
|
4740 |
+
};
|
4741 |
return this;
|
4742 |
+
};
|
4743 |
|
4744 |
Batch.prototype.undo = function () {
|
4745 |
for (var i = 0; i < this.tasks.length; i++) {
|
4748 |
}
|
4749 |
}
|
4750 |
return true;
|
4751 |
+
};
|
4752 |
|
4753 |
Batch.prototype.redo = function () {
|
4754 |
for (var i = 0; i < this.tasks.length; i++) {
|
4757 |
}
|
4758 |
}
|
4759 |
return true;
|
4760 |
+
};
|
4761 |
|
4762 |
Batch.prototype.isEqual = function () {
|
4763 |
return false;
|
4764 |
+
};
|
4765 |
|
4766 |
function Control(mode) {
|
4767 |
switch (mode) {
|
4768 |
case 'skipForwardUndos':
|
4769 |
this.undo = function () {
|
4770 |
return false;
|
4771 |
+
};
|
4772 |
break;
|
4773 |
}
|
4774 |
}
|
4776 |
|
4777 |
Control.prototype.undo = function () {
|
4778 |
return true;
|
4779 |
+
};
|
4780 |
|
4781 |
Control.prototype.redo = function () {
|
4782 |
return true;
|
4783 |
+
};
|
4784 |
|
4785 |
Control.prototype.isEqual = function () {
|
4786 |
return false;
|
4787 |
+
};
|
4788 |
|
4789 |
function Task(that, undoAction, redoAction, context) {
|
4790 |
this.that = that;
|
4797 |
Task.prototype.undo = function () {
|
4798 |
this.undoAction.apply(this.that.getSelf(), this.context);
|
4799 |
return true;
|
4800 |
+
};
|
4801 |
|
4802 |
Task.prototype.redo = function () {
|
4803 |
this.redoAction.apply(this.that.getSelf(), this.context);
|
4804 |
return true;
|
4805 |
+
};
|
4806 |
|
4807 |
Task.prototype.isEqual = function () {
|
4808 |
return false;
|
4809 |
+
};
|
4810 |
|
4811 |
function TaskValue() {
|
4812 |
Task.prototype.constructor.apply(this, arguments);
|
4818 |
TaskValue.prototype.setValues = function (undoValue, redoValue) {
|
4819 |
this.undoValue = undoValue;
|
4820 |
this.redoValue = redoValue;
|
4821 |
+
};
|
4822 |
|
4823 |
TaskValue.prototype.undo = function () {
|
4824 |
+
this.context.unshift(this.undoValue);
|
4825 |
this.undoAction.apply(this.that.getSelf(), this.context);
|
4826 |
this.context.shift();
|
4827 |
return true;
|
4828 |
+
};
|
4829 |
|
4830 |
TaskValue.prototype.redo = function () {
|
4831 |
+
this.context.unshift(this.redoValue);
|
4832 |
this.redoAction.apply(this.that.getSelf(), this.context);
|
4833 |
this.context.shift();
|
4834 |
return true;
|
4835 |
+
};
|
4836 |
|
4837 |
TaskValue.prototype.isEqual = function (that, action, context) {
|
4838 |
if (that == this.that && action == this.undoAction) {
|
4843 |
}
|
4844 |
this.setValues = function (undoValue, redoValue) {
|
4845 |
this.redoValue = redoValue;
|
4846 |
+
};
|
4847 |
return true;
|
4848 |
}
|
4849 |
return false;
|
4850 |
+
};
|
4851 |
|
4852 |
return History;
|
4853 |
});
|
4854 |
|
4855 |
+
N2D('InlineField', function ($, undefined) {
|
4856 |
|
4857 |
+
/**
|
4858 |
+
* @memberOf N2Classes
|
4859 |
+
*
|
4860 |
+
* @constructor
|
4861 |
+
*/
|
4862 |
function InlineField() {
|
4863 |
|
4864 |
this.$input = $('<input type="text" name="name" />')
|
4898 |
};
|
4899 |
|
4900 |
InlineField.prototype.destroy = function () {
|
4901 |
+
this.$input.off('blur');
|
4902 |
this.$form.remove();
|
4903 |
};
|
4904 |
|
4905 |
return InlineField;
|
4906 |
});
|
4907 |
+
N2D('SlideSettings', function ($, undefined) {
|
4908 |
"use strict";
|
4909 |
|
4910 |
+
/**
|
4911 |
+
* @memberOf N2Classes
|
4912 |
+
*
|
4913 |
+
* @param {EditorSlide} editor
|
4914 |
+
* @param {boolean} isStatic
|
4915 |
+
* @constructor
|
4916 |
+
*/
|
4917 |
+
function SlideSettings(editor, isStatic) {
|
4918 |
+
|
4919 |
+
/**
|
4920 |
+
* @type {EditorSlide}
|
4921 |
+
*/
|
4922 |
+
this.editor = editor;
|
4923 |
this.isStatic = isStatic;
|
4924 |
|
4925 |
var $fields = $('#smartslider-form').find('input[id][name^="slide"], textarea[id][name^="slide"]'),
|
4935 |
*/
|
4936 |
this.fields = fields;
|
4937 |
|
4938 |
+
this.slideBackground = this.editor.getSlideBackground();
|
4939 |
|
4940 |
if (!isStatic) {
|
4941 |
|
|
|
|
|
4942 |
// Auto fill thumbnail if empty
|
4943 |
+
var thumbnail = $('#slidethumbnail')
|
4944 |
+
.on('change, nextendChange', function () {
|
4945 |
+
var newThumbnail = thumbnail.val();
|
4946 |
+
if (newThumbnail === '') {
|
4947 |
+
newThumbnail = '$system$/images/placeholder/image.png';
|
4948 |
+
}
|
4949 |
+
$('.n2-ss-edit-slide-top-thumbnail img').attr('src', nextend.imageHelper.fixed(newThumbnail));
|
4950 |
+
});
|
4951 |
+
|
4952 |
+
var itemImage = null,
|
4953 |
+
currentSlideBackground = this.fields.backgroundImage.val(),
|
4954 |
+
updateThumbnailImage = $.proxy(function (image) {
|
4955 |
+
if ((image !== '' && image !== '$system$/images/placeholder/image.png') && (thumbnail.val() === '' || thumbnail.val() === currentSlideBackground)) {
|
4956 |
+
thumbnail.val(image).trigger('change');
|
4957 |
+
if (itemImage) {
|
4958 |
itemImage.off('.slidethumbnail');
|
4959 |
+
itemImage = null;
|
4960 |
}
|
4961 |
+
}
|
4962 |
+
}, this);
|
4963 |
+
|
4964 |
+
this.fields.backgroundImage.on('nextendChange.slidethumbnail', $.proxy(function () {
|
4965 |
+
var newSlideBackground = this.fields.backgroundImage.val();
|
4966 |
+
updateThumbnailImage(newSlideBackground);
|
4967 |
+
currentSlideBackground = newSlideBackground;
|
4968 |
+
}, this));
|
4969 |
+
|
4970 |
+
if (thumbnail.val() === '') {
|
4971 |
+
itemImage = $('#item_imageimage').on('nextendChange.slidethumbnail', $.proxy(function () {
|
4972 |
+
updateThumbnailImage(itemImage.val());
|
4973 |
}, this));
|
4974 |
}
|
4975 |
}
|
4987 |
$input.on('nextendChange', $.proxy(function () {
|
4988 |
var newValue = $input.val();
|
4989 |
|
4990 |
+
var task = N2Classes.History.get().addValue(this, this.historyUpdateSlideValue, [field]);
|
4991 |
if (task) {
|
4992 |
task.setValues(this.values[id], newValue);
|
4993 |
}
|
5045 |
};
|
5046 |
|
5047 |
SlideSettings.prototype.onChange = function (name, e) {
|
5048 |
+
name = name.replace(/-/g, '_');
|
5049 |
if (typeof this['sync_' + name] === 'function') {
|
5050 |
this['sync_' + name].call(this);
|
5051 |
}
|
5058 |
};
|
5059 |
|
5060 |
SlideSettings.prototype.updateBackgroundColor = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5061 |
|
5062 |
+
var color = this.getBackgroundColor(),
|
5063 |
+
gradient = this.getBackgroundGradient(),
|
5064 |
+
colorEnd;
|
5065 |
+
if (gradient !== 'off') {
|
5066 |
+
colorEnd = this.getBackgroundColorEnd();
|
5067 |
+
}
|
5068 |
+
this.slideBackground.updateColor(color, gradient, colorEnd);
|
5069 |
+
};
|
5070 |
+
|
5071 |
+
SlideSettings.prototype.sync_backgroundImage = function () {
|
5072 |
+
this.slideBackground.setImage(this.getBackgroundImage());
|
5073 |
+
};
|
5074 |
+
|
5075 |
+
SlideSettings.prototype.sync_background_type = function () {
|
5076 |
+
|
5077 |
+
this.slideBackground.setType(this.fields['background-type'].val());
|
5078 |
+
};
|
5079 |
+
|
5080 |
+
SlideSettings.prototype.getType = function () {
|
5081 |
+
return this.fields['background-type'].val();
|
5082 |
+
};
|
5083 |
+
|
5084 |
+
SlideSettings.prototype.sync_backgroundMode = function () {
|
5085 |
+
this.slideBackground.setMode(this.fields.backgroundMode.val());
|
5086 |
+
};
|
5087 |
+
|
5088 |
+
SlideSettings.prototype.sync_backgroundFocusY =
|
5089 |
+
SlideSettings.prototype.sync_backgroundFocusX = function () {
|
5090 |
+
this.slideBackground.setFocus(this.getBackgroundFocusX(), this.getBackgroundFocusY());
|
5091 |
+
};
|
5092 |
+
|
5093 |
+
SlideSettings.prototype.sync_backgroundImageOpacity = function () {
|
5094 |
+
this.slideBackground.setImageOpacity(this.getBackgroundImageOpacity());
|
5095 |
+
};
|
5096 |
+
|
5097 |
+
SlideSettings.prototype.getBackgroundImageOpacity = function () {
|
5098 |
+
return this.fields.backgroundImageOpacity.val();
|
5099 |
+
};
|
5100 |
+
|
5101 |
+
SlideSettings.prototype.sync_backgroundImageBlur = function () {
|
5102 |
+
this.slideBackground.setBlur(this.getBackgroundImageBlur());
|
5103 |
+
};
|
5104 |
+
|
5105 |
+
SlideSettings.prototype.getBackgroundColor = function () {
|
5106 |
+
return this.editor.generator.fill(this.fields.backgroundColor.val());
|
5107 |
+
};
|
5108 |
+
|
5109 |
+
SlideSettings.prototype.getBackgroundGradient = function () {
|
5110 |
+
return this.fields.backgroundGradient.val();
|
5111 |
+
};
|
5112 |
+
|
5113 |
+
SlideSettings.prototype.getBackgroundColorEnd = function () {
|
5114 |
+
return this.editor.generator.fill(this.fields.backgroundColorEnd.val());
|
5115 |
+
};
|
5116 |
+
|
5117 |
+
SlideSettings.prototype.getBackgroundImage = function () {
|
5118 |
+
return this.editor.generator.fill(this.fields.backgroundImage.val());
|
5119 |
+
};
|
5120 |
+
|
5121 |
+
SlideSettings.prototype.getBackgroundImageBlur = function () {
|
5122 |
+
return this.fields.backgroundImageBlur.val();
|
5123 |
+
};
|
5124 |
+
|
5125 |
+
SlideSettings.prototype.getBackgroundFocusX = function () {
|
5126 |
+
return this.fields.backgroundFocusX.val();
|
5127 |
+
};
|
5128 |
+
|
5129 |
+
SlideSettings.prototype.getBackgroundFocusY = function () {
|
5130 |
+
return this.fields.backgroundFocusY.val();
|
5131 |
+
};
|
5132 |
+
|
5133 |
+
|
5134 |
+
return SlideSettings;
|
5135 |
+
});
|
5136 |
+
N2D('FormElementStyleMode', function ($, undefined) {
|
5137 |
+
|
5138 |
+
/**
|
5139 |
+
* @memberOf N2Classes
|
5140 |
+
*
|
5141 |
+
* @param id
|
5142 |
+
* @constructor
|
5143 |
+
*/
|
5144 |
+
function FormElementStyleMode(id) {
|
5145 |
+
|
5146 |
+
this.$element = $('#' + id).on('nextendChange', $.proxy(function () {
|
5147 |
+
if (this.$element.val() == '') {
|
5148 |
+
this.$reset.css('visibility', 'hidden');
|
5149 |
+
} else {
|
5150 |
+
this.$reset.css('visibility', '');
|
5151 |
}
|
5152 |
+
}, this));
|
5153 |
+
|
5154 |
+
this.$container = this.$element.parent();
|
5155 |
+
this.$reset = this.$container.find('.n2-form-element-style-mode-reset')
|
5156 |
+
.on('click', $.proxy(function () {
|
5157 |
+
this.$element.triggerHandler('n2resetmode');
|
5158 |
+
}, this));
|
5159 |
+
|
5160 |
+
}
|
5161 |
+
|
5162 |
+
return FormElementStyleMode;
|
5163 |
+
});
|
5164 |
+
N2D('SmartSliderAdminSlideBackgroundColor', ['SmartSliderSlideBackgroundColor'], function ($, undefined) {
|
5165 |
+
|
5166 |
+
/**
|
5167 |
+
* @memberOf N2Classes
|
5168 |
+
*
|
5169 |
+
* @param {N2Classes.SmartSliderSlideBackground} background
|
5170 |
+
* @param $el
|
5171 |
+
* @constructor
|
5172 |
+
* @augments N2Classes.SmartSliderSlideBackgroundColor
|
5173 |
+
*/
|
5174 |
+
function SmartSliderAdminSlideBackgroundColor(background, $el) {
|
5175 |
+
|
5176 |
+
N2Classes.SmartSliderSlideBackgroundColor.prototype.constructor.apply(this, arguments);
|
5177 |
+
}
|
5178 |
+
|
5179 |
+
SmartSliderAdminSlideBackgroundColor.prototype = Object.create(N2Classes.SmartSliderSlideBackgroundColor.prototype);
|
5180 |
+
SmartSliderAdminSlideBackgroundColor.prototype.constructor = SmartSliderAdminSlideBackgroundColor;
|
5181 |
|
5182 |
+
SmartSliderAdminSlideBackgroundColor.prototype.update = function (color, gradient, colorEnd) {
|
5183 |
+
color = this.fixColor(color);
|
5184 |
+
this.$el.css({background: '', filter: ''});
|
5185 |
|
5186 |
+
if (gradient !== 'off') {
|
5187 |
+
this.updateGradient(color, gradient, colorEnd)
|
5188 |
} else {
|
5189 |
+
this.updateColor(color);
|
5190 |
+
}
|
5191 |
+
};
|
5192 |
+
|
5193 |
+
SmartSliderAdminSlideBackgroundColor.prototype.updateColor = function (color) {
|
5194 |
+
if (color.substr(6, 8) !== '00') {
|
5195 |
+
this.$el
|
5196 |
+
.css('background', '#' + color.substr(0, 6))
|
5197 |
+
.css('background', N2Color.hex2rgbaCSS(color));
|
5198 |
+
}
|
5199 |
+
};
|
5200 |
+
|
5201 |
+
SmartSliderAdminSlideBackgroundColor.prototype.updateGradient = function (color, gradient, colorEnd) {
|
5202 |
+
this.$el.css({background: '', filter: ''});
|
5203 |
+
|
5204 |
+
colorEnd = this.fixColor(colorEnd);
|
5205 |
+
|
5206 |
+
switch (gradient) {
|
5207 |
+
case 'horizontal':
|
5208 |
+
this.$el
|
5209 |
+
.css('background', '#' + color.substr(0, 6))
|
5210 |
+
.css('background', '-moz-linear-gradient(left, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5211 |
+
.css('background', ' -webkit-linear-gradient(left, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5212 |
+
.css('background', 'linear-gradient(to right, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5213 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + color.substr(0, 6) + '\', endColorstr=\'#' + colorEnd.substr(0, 6) + '\',GradientType=1)');
|
5214 |
+
break;
|
5215 |
+
case 'vertical':
|
5216 |
+
this.$el
|
5217 |
+
.css('background', '#' + color.substr(0, 6))
|
5218 |
+
.css('background', '-moz-linear-gradient(top, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5219 |
+
.css('background', ' -webkit-linear-gradient(top, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5220 |
+
.css('background', 'linear-gradient(to bottom, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5221 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + color.substr(0, 6) + '\', endColorstr=\'#' + colorEnd.substr(0, 6) + '\',GradientType=0)');
|
5222 |
+
break;
|
5223 |
+
case 'diagonal1':
|
5224 |
+
this.$el
|
5225 |
+
.css('background', '#' + color.substr(0, 6))
|
5226 |
+
.css('background', '-moz-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5227 |
+
.css('background', ' -webkit-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5228 |
+
.css('background', 'linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5229 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + color.substr(0, 6) + '\', endColorstr=\'#' + colorEnd.substr(0, 6) + '\',GradientType=1)');
|
5230 |
+
break;
|
5231 |
+
case 'diagonal2':
|
5232 |
+
this.$el
|
5233 |
+
.css('background', '#' + color.substr(0, 6))
|
5234 |
+
.css('background', '-moz-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5235 |
+
.css('background', ' -webkit-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5236 |
+
.css('background', 'linear-gradient(135deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorEnd) + ' 100%)')
|
5237 |
+
.css('background', 'filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#' + color.substr(0, 6) + '\', endColorstr=\'#' + colorEnd.substr(0, 6) + '\',GradientType=1)');
|
5238 |
+
break;
|
5239 |
+
}
|
5240 |
+
};
|
5241 |
+
|
5242 |
+
SmartSliderAdminSlideBackgroundColor.prototype.fixColor = function (color) {
|
5243 |
+
if (color.length && color.charAt(0) === '#') {
|
5244 |
+
color = color.substring(1);
|
5245 |
+
if (color.length === 6) {
|
5246 |
+
color += 'ff';
|
5247 |
}
|
5248 |
}
|
5249 |
+
return color;
|
5250 |
};
|
5251 |
|
5252 |
+
return SmartSliderAdminSlideBackgroundColor;
|
5253 |
+
});
|
5254 |
+
N2D('SmartSliderAdminSlideBackgroundImage', ['SmartSliderSlideBackgroundImage'], function ($, undefined) {
|
5255 |
+
|
5256 |
+
/**
|
5257 |
+
* @memberOf N2Classes
|
5258 |
+
*
|
5259 |
+
* @param {N2Classes.FrontendSliderSlide} slide
|
5260 |
+
* @param {N2Classes.SmartSliderBackgrounds} manager
|
5261 |
+
* @param {N2Classes.SmartSliderSlideBackground} background
|
5262 |
+
* @param $el
|
5263 |
+
* @constructor
|
5264 |
+
* @augments N2Classes.SmartSliderSlideBackgroundColor
|
5265 |
+
*/
|
5266 |
+
function SmartSliderAdminSlideBackgroundImage(slide, manager, background, $el) {
|
5267 |
+
|
5268 |
+
this.hash = $el.data('hash');
|
5269 |
+
|
5270 |
+
N2Classes.SmartSliderSlideBackgroundImage.prototype.constructor.apply(this, arguments);
|
5271 |
+
this.loadAllowed = true;
|
5272 |
+
|
5273 |
+
this.listenImageManager();
|
5274 |
+
}
|
5275 |
+
|
5276 |
+
SmartSliderAdminSlideBackgroundImage.prototype = Object.create(N2Classes.SmartSliderSlideBackgroundImage.prototype);
|
5277 |
+
SmartSliderAdminSlideBackgroundImage.prototype.constructor = SmartSliderAdminSlideBackgroundImage;
|
5278 |
+
|
5279 |
+
|
5280 |
+
SmartSliderAdminSlideBackgroundImage.prototype.listenImageManager = function () {
|
5281 |
+
if (this.hash !== '') {
|
5282 |
+
$(window).on(this.hash, $.proxy(this.onImageManagerChanged, this));
|
5283 |
+
}
|
5284 |
+
};
|
5285 |
+
|
5286 |
+
SmartSliderAdminSlideBackgroundImage.prototype.notListenImageManager = function () {
|
5287 |
+
if (this.hash !== '') {
|
5288 |
+
$(window).off(this.hash, null, $.proxy(this.onImageManagerChanged, this));
|
5289 |
+
}
|
5290 |
+
};
|
5291 |
+
|
5292 |
+
SmartSliderAdminSlideBackgroundImage.prototype.onImageManagerChanged = function (e, imageData) {
|
5293 |
+
this.tabletSrc = imageData.tablet.image;
|
5294 |
+
this.mobileSrc = imageData.mobile.image;
|
5295 |
+
|
5296 |
+
this.updateBackgroundToDevice(this.manager.device);
|
5297 |
+
};
|
5298 |
+
|
5299 |
+
SmartSliderAdminSlideBackgroundImage.prototype.preLoadAdmin = function (image) {
|
5300 |
+
this.preLoad();
|
5301 |
+
|
5302 |
+
if (image !== '' && this.background.allowVisualLoad) {
|
5303 |
+
this.notListenImageManager();
|
5304 |
+
|
5305 |
+
this.deferred.done($.proxy(function () {
|
5306 |
+
$.when(nextend.imageManager.getVisual(image))
|
5307 |
+
.done($.proxy(function (visual) {
|
5308 |
+
this.onImageManagerChanged(null, visual.value);
|
5309 |
+
this.listenImageManager();
|
5310 |
+
}, this));
|
5311 |
+
}, this));
|
5312 |
+
}
|
5313 |
};
|
5314 |
|
5315 |
+
SmartSliderAdminSlideBackgroundImage.prototype.setDesktopSrc = function (src) {
|
5316 |
+
this.notListenImageManager();
|
5317 |
+
this.desktopSrc = src;
|
5318 |
+
this.hash = md5(src);
|
5319 |
+
|
5320 |
+
if (src !== '' && this.background.allowVisualLoad) {
|
5321 |
+
var img = new Image();
|
5322 |
+
img.addEventListener("load", $.proxy(function () {
|
5323 |
+
$.when(nextend.imageManager.getVisual(src))
|
5324 |
+
.done($.proxy(function (visual) {
|
5325 |
+
this.onImageManagerChanged(null, visual.value);
|
5326 |
+
this.listenImageManager();
|
5327 |
+
}, this));
|
5328 |
+
}, this), false);
|
5329 |
+
img.src = nextend.imageHelper.fixed(src);
|
5330 |
} else {
|
5331 |
+
this.tabletSrc = '';
|
5332 |
+
this.mobileSrc = '';
|
5333 |
+
|
5334 |
+
this.setSrc(nextend.imageHelper.fixed(src));
|
5335 |
}
|
5336 |
};
|
5337 |
|
5338 |
+
SmartSliderAdminSlideBackgroundImage.prototype.setSrc = function (src) {
|
5339 |
+
N2Classes.SmartSliderSlideBackgroundImage.prototype.setSrc.call(this, nextend.imageHelper.fixed(src));
|
5340 |
+
};
|
5341 |
+
|
5342 |
+
SmartSliderAdminSlideBackgroundImage.prototype.startFixed = function () {
|
5343 |
+
|
5344 |
+
};
|
5345 |
+
|
5346 |
+
SmartSliderAdminSlideBackgroundImage.prototype.updateMode = function (newMode, oldMode) {
|
5347 |
+
if (newMode === 'blurfit') {
|
5348 |
+
if (this.$background.length === 1) {
|
5349 |
+
|
5350 |
+
// Clone image and use as front
|
5351 |
+
this.$background = this.$background.add(this.$background.clone()
|
5352 |
+
.insertAfter(this.$background));
|
5353 |
+
|
5354 |
+
// Blur the rear image
|
5355 |
+
var size = 7;
|
5356 |
+
this.$background.first().css({
|
5357 |
+
margin: '-' + (size * 2) + 'px',
|
5358 |
+
padding: (size * 2) + 'px'
|
5359 |
+
}).css(window.n2FilterProperty, 'blur(' + size + 'px)');
|
5360 |
+
}
|
5361 |
+
}
|
5362 |
+
|
5363 |
+
if (oldMode === 'blurfit' && newMode !== 'blurfit') {
|
5364 |
+
|
5365 |
+
// Remove front image
|
5366 |
+
this.$background.eq(1).remove();
|
5367 |
+
this.$background = this.$background.eq(0);
|
5368 |
+
|
5369 |
+
// Reset blur on the main image
|
5370 |
+
this.updateBlur(this.blur);
|
5371 |
+
}
|
5372 |
};
|
5373 |
|
5374 |
+
SmartSliderAdminSlideBackgroundImage.prototype.updateFocus = function (x, y) {
|
5375 |
+
this.$background.css('background-position', x + '% ' + y + '%');
|
5376 |
};
|
5377 |
|
5378 |
+
SmartSliderAdminSlideBackgroundImage.prototype.updateOpacity = function (opacity) {
|
5379 |
+
this.$background.css('opacity', opacity / 100);
|
5380 |
};
|
5381 |
|
5382 |
+
SmartSliderAdminSlideBackgroundImage.prototype.updateBlur = function (blur) {
|
5383 |
+
if (window.n2FilterProperty) {
|
5384 |
+
if (blur > 0) {
|
5385 |
+
this.$background.last().css({
|
5386 |
+
margin: '-' + (blur * 2) + 'px',
|
5387 |
+
padding: (blur * 2) + 'px'
|
5388 |
+
}).css(window.n2FilterProperty, 'blur(' + blur + 'px)');
|
5389 |
+
} else {
|
5390 |
+
this.$background.last().css({
|
5391 |
+
margin: '',
|
5392 |
+
padding: ''
|
5393 |
+
}).css(window.n2FilterProperty, '');
|
5394 |
+
}
|
5395 |
+
}
|
5396 |
+
this.blur = blur;
|
5397 |
};
|
5398 |
|
5399 |
+
SmartSliderAdminSlideBackgroundImage.prototype.kill = function () {
|
5400 |
+
this.notListenImageManager();
|
5401 |
+
this.$el.remove();
|
5402 |
+
this.$background.remove();
|
5403 |
};
|
5404 |
|
5405 |
+
return SmartSliderAdminSlideBackgroundImage;
|
5406 |
});
|
5407 |
+
N2D('LayerContainer', function ($, undefined) {
|
5408 |
"use strict";
|
5409 |
|
5410 |
+
/**
|
5411 |
+
* @memberOf N2Classes
|
5412 |
+
*
|
5413 |
+
* @param component
|
5414 |
+
* @param $ul
|
5415 |
+
* @param allowedPlacementMode
|
5416 |
+
* @param childrenSelector
|
5417 |
+
* @param allowedChildren
|
5418 |
+
* @constructor
|
5419 |
+
*/
|
5420 |
function LayerContainer(component, $ul, allowedPlacementMode, childrenSelector, allowedChildren) {
|
5421 |
this.component = component;
|
5422 |
this.$ul = $ul
|
5433 |
this.layerContainerElement = $layerContainerElement;
|
5434 |
};
|
5435 |
|
5436 |
+
LayerContainer.prototype.startWithExistingNodes = function (isEditorStart) {
|
5437 |
var nodes = this.layerContainerElement.find(this.childrenSelector);
|
5438 |
for (var i = 0; i < nodes.length; i++) {
|
5439 |
+
this._loadNode(nodes.eq(i), isEditorStart);
|
5440 |
}
|
5441 |
this.component.onChildCountChange();
|
5442 |
};
|
5445 |
return $.inArray(type, this.allowedChildren) !== -1;
|
5446 |
};
|
5447 |
|
5448 |
+
LayerContainer.prototype._loadNode = function ($el, isEditorStart) {
|
5449 |
+
var type = $el.data('sstype');
|
5450 |
if (this.isChildAllowed(type)) {
|
5451 |
var lastPlacement = $el.data('lastplacement'),
|
5452 |
removedPlacementData = {};
|
5453 |
if (lastPlacement !== undefined && lastPlacement != this.allowedPlacementMode) {
|
5454 |
switch (lastPlacement) {
|
5455 |
case 'absolute':
|
5456 |
+
removedPlacementData = N2Classes.PlacementAbsolute.cleanLayer($el);
|
5457 |
break;
|
5458 |
case 'normal':
|
5459 |
+
removedPlacementData = N2Classes.PlacementNormal.cleanLayer($el);
|
5460 |
break;
|
5461 |
}
|
5462 |
}
|
5464 |
var component;
|
5465 |
switch (type) {
|
5466 |
case 'layer':
|
5467 |
+
component = new N2Classes.Layer(this.component.fragmentEditor, this.component);
|
5468 |
|
5469 |
var itemClass = component.itemEditor.getItemClass($el.find('.n2-ss-item').data('item'));
|
5470 |
+
if (itemClass && N2Classes[itemClass].needSize) {
|
5471 |
if (removedPlacementData.desktopportraitheight !== undefined) {
|
5472 |
// If absolute layer pasted into normal position then we should force the absolute height
|
5473 |
// when the item has needSize property true.
|
5476 |
}
|
5477 |
break;
|
5478 |
case 'content':
|
5479 |
+
component = new N2Classes.Content(this.component.fragmentEditor, this.component);
|
5480 |
break;
|
5481 |
case 'row':
|
5482 |
+
component = new N2Classes.Row(this.component.fragmentEditor, this.component);
|
5483 |
break;
|
5484 |
case 'col':
|
5485 |
+
component = new N2Classes.Col(this.component.fragmentEditor, this.component);
|
5486 |
break;
|
5487 |
case 'group':
|
5488 |
break;
|
5489 |
}
|
5490 |
|
5491 |
if (component) {
|
5492 |
+
component.load($el, isEditorStart);
|
5493 |
+
if (!isEditorStart) {
|
5494 |
component.sync();
|
5495 |
}
|
5496 |
return component;
|
5522 |
|
5523 |
LayerContainer.prototype.append = function ($layer) {
|
5524 |
$layer.appendTo(this.layerContainerElement);
|
5525 |
+
var layer = this._loadNode($layer, false);
|
5526 |
this.component.onChildCountChange();
|
5527 |
return layer;
|
5528 |
};
|
5536 |
$layer.insertBefore(layers[index].layer);
|
5537 |
}
|
5538 |
|
5539 |
+
var layer = this._loadNode($layer, false);
|
5540 |
this.component.onChildCountChange();
|
5541 |
return layer;
|
5542 |
};
|
5568 |
var relatedLayer,
|
5569 |
isReversed = (this.allowedPlacementMode == 'absolute');
|
5570 |
if (isReversed) {
|
5571 |
+
relatedLayer = layer.getRootElement().prevAll('.n2-ss-layer, .n2-ss-layer-group').first().data('layerObject');
|
5572 |
} else {
|
5573 |
+
relatedLayer = layer.getRootElement().nextAll('.n2-ss-layer, .n2-ss-layer-group').first().data('layerObject');
|
5574 |
}
|
5575 |
|
5576 |
if (relatedLayer !== undefined) {
|
5770 |
|
5771 |
return LayerContainer;
|
5772 |
});
|
5773 |
+
N2D('LayerDataStorage', function ($, undefined) {
|
5774 |
"use strict";
|
5775 |
|
5776 |
+
/**
|
5777 |
+
* @memberOf N2Classes
|
5778 |
+
*
|
5779 |
+
* @constructor
|
5780 |
+
*/
|
5781 |
function LayerDataStorage() {
|
5782 |
this.isDeviceProp = {};
|
5783 |
this.propertyScope = {};
|
5790 |
mobilePortrait: {},
|
5791 |
mobileLandscape: {}
|
5792 |
};
|
5793 |
+
|
5794 |
+
this.advancedProperties = {};
|
5795 |
}
|
5796 |
|
5797 |
LayerDataStorage.prototype.getMode = function () {
|
5798 |
+
return this.fragmentEditor.getMode();
|
5799 |
+
};
|
5800 |
+
|
5801 |
+
LayerDataStorage.prototype.getProperties = function () {
|
5802 |
+
var properties = {};
|
5803 |
+
for (var k in this.property) {
|
5804 |
+
if (this.advancedProperties[k] !== undefined) {
|
5805 |
+
if (k == this.advancedProperties[k].getName()) {
|
5806 |
+
var value = this.property[k],
|
5807 |
+
baseName = this.advancedProperties[k].getBaseName();
|
5808 |
+
if (this.property[k] === undefined) {
|
5809 |
+
value = this.property[baseName];
|
5810 |
+
}
|
5811 |
+
properties[baseName] = value;
|
5812 |
+
}
|
5813 |
+
} else {
|
5814 |
+
properties[k] = this.property[k];
|
5815 |
+
}
|
5816 |
+
}
|
5817 |
+
return properties;
|
5818 |
};
|
5819 |
|
5820 |
LayerDataStorage.prototype.getRawProperty = function (name) {
|
5828 |
return undefined;
|
5829 |
}
|
5830 |
return this.property[name];
|
5831 |
+
};
|
5832 |
|
5833 |
LayerDataStorage.prototype.getProperty = function (name) {
|
5834 |
|
5856 |
this.render(name);
|
5857 |
}
|
5858 |
}
|
5859 |
+
};
|
5860 |
|
5861 |
LayerDataStorage.prototype.store = function (name, value, needRender, from) {
|
5862 |
|
5869 |
} else {
|
5870 |
oldValueFilled = oldValue = this.property[name];
|
5871 |
}
|
5872 |
+
var task = N2Classes.History.get().addValue(this, this.historyStore, [name, mode]);
|
5873 |
if (task) {
|
5874 |
task.setValues(oldValue, value);
|
5875 |
}
|
5883 |
if (needRender) {
|
5884 |
this.render(name, oldValueFilled, from);
|
5885 |
}
|
5886 |
+
};
|
5887 |
|
5888 |
LayerDataStorage.prototype.render = function (name, oldValue, from) {
|
5889 |
this.propertyScope[name]['_sync' + name](oldValue, from);
|
5890 |
};
|
5891 |
|
5892 |
LayerDataStorage.prototype.isDimensionPropertyAccepted = function (value) {
|
5893 |
+
return (value + '').match(/[0-9]+%/) || value == 'auto';
|
|
|
|
|
|
|
5894 |
};
|
5895 |
|
5896 |
LayerDataStorage.prototype.changeEditorMode = function (mode) {
|
5906 |
this.renderModeProperties(false);
|
5907 |
};
|
5908 |
|
5909 |
+
LayerDataStorage.prototype.renderModeProperties = function (isReset) {
|
5910 |
+
for (var k in this.isDeviceProp) {
|
5911 |
+
if (this.isDeviceProp[k]) {
|
5912 |
+
this.property[k] = this.getProperty(k);
|
5913 |
+
this.$.trigger('propertyChanged', [k, this.property[k]]);
|
5914 |
+
}
|
5915 |
}
|
5916 |
+
};
|
5917 |
|
5918 |
LayerDataStorage.prototype.historyResetMode = function (value, mode) {
|
5919 |
|
5920 |
this.deviceProperty[mode] = $.extend({}, value);
|
5921 |
|
5922 |
+
if (mode == this.fragmentEditor.getMode()) {
|
5923 |
this.renderModeProperties(true);
|
5924 |
}
|
5925 |
+
};
|
5926 |
|
5927 |
LayerDataStorage.prototype.resetMode = function (mode) {
|
5928 |
if (mode != 'desktopPortrait') {
|
5929 |
var undefined;
|
5930 |
|
5931 |
+
var task = N2Classes.History.get().addValue(this, this.historyResetMode, [mode]);
|
5932 |
if (task) {
|
5933 |
task.setValues($.extend({}, this.deviceProperty[mode]), {});
|
5934 |
}
|
5936 |
for (var k in this.deviceProperty[mode]) {
|
5937 |
this.deviceProperty[mode][k] = undefined;
|
5938 |
}
|
5939 |
+
if (mode == this.fragmentEditor.getMode()) {
|
5940 |
this.renderModeProperties(true);
|
5941 |
}
|
5942 |
}
|
5948 |
|
5949 |
this.deviceProperty[to] = $.extend({}, this.deviceProperty[to], this.deviceProperty[from]);
|
5950 |
|
5951 |
+
var task = N2Classes.History.get().addValue(this, this.historyResetMode, [to]);
|
5952 |
if (task) {
|
5953 |
task.setValues(originalValues, this.deviceProperty[to]);
|
5954 |
}
|
5960 |
return this.originalProperties[name];
|
5961 |
}
|
5962 |
return def;
|
5963 |
+
};
|
5964 |
|
5965 |
LayerDataStorage.prototype.createProperty = function (name, def, $layer, scope) {
|
5966 |
this.isDeviceProp[name] = false;
|
5973 |
} else {
|
5974 |
this.property[name] = this._getDefault(name, def);
|
5975 |
}
|
5976 |
+
};
|
5977 |
+
|
5978 |
+
/**
|
5979 |
+
* @param {LayerAdvancedProperty} advancedProperty
|
5980 |
+
* @param $layer
|
5981 |
+
* @param scope
|
5982 |
+
*/
|
5983 |
+
LayerDataStorage.prototype.createAdvancedProperty = function (advancedProperty, $layer, scope) {
|
5984 |
+
var names = advancedProperty.getNames();
|
5985 |
+
for (var k in names) {
|
5986 |
+
this.advancedProperties[k] = advancedProperty;
|
5987 |
+
this.createProperty(k, names[k], $layer, scope);
|
5988 |
+
}
|
5989 |
+
};
|
5990 |
+
|
5991 |
+
LayerDataStorage.prototype.syncAdvancedField = function (baseName) {
|
5992 |
+
var name = this.advancedProperties[baseName].getName(),
|
5993 |
+
value = this.property[name];
|
5994 |
+
if (this.property[name] === undefined) {
|
5995 |
+
value = this.property[baseName];
|
5996 |
+
}
|
5997 |
+
this.fragmentEditor.layerOptions.updateField(baseName, value);
|
5998 |
+
};
|
5999 |
|
6000 |
LayerDataStorage.prototype.createDeviceProperty = function (name, def, $layer, scope) {
|
6001 |
+
var k, defaultValue;
|
6002 |
this.isDeviceProp[name] = true;
|
6003 |
this.propertyScope[name] = scope || this;
|
6004 |
if ($layer) {
|
6005 |
+
for (k in this.deviceProperty) {
|
6006 |
this.deviceProperty[k][name] = $layer.data(k.toLowerCase() + name.toLowerCase());
|
6007 |
if (this.deviceProperty[k][name] === "") {
|
6008 |
this.deviceProperty[k][name] = undefined;
|
6009 |
}
|
6010 |
}
|
6011 |
+
for (k in this.deviceProperty) {
|
6012 |
if (this.deviceProperty[k][name] === undefined || this.deviceProperty[k][name] === "") {
|
6013 |
+
defaultValue = this._getDefault(k.toLowerCase() + name.toLowerCase());
|
6014 |
if (defaultValue !== undefined) {
|
6015 |
this.deviceProperty[k][name] = defaultValue;
|
6016 |
}
|
6017 |
}
|
6018 |
}
|
6019 |
+
for (k in def) {
|
6020 |
if (this.deviceProperty[k][name] === undefined || this.deviceProperty[k][name] === "") {
|
6021 |
this.deviceProperty[k][name] = def[k];
|
6022 |
}
|
6023 |
}
|
6024 |
} else {
|
6025 |
//Create layer
|
6026 |
+
for (k in def) {
|
6027 |
this.deviceProperty[k][name] = def[k];
|
6028 |
}
|
6029 |
+
for (k in this.deviceProperty) {
|
6030 |
+
defaultValue = this._getDefault(k.toLowerCase() + name.toLowerCase());
|
6031 |
if (defaultValue !== undefined) {
|
6032 |
this.deviceProperty[k][name] = defaultValue;
|
6033 |
}
|
6034 |
}
|
6035 |
}
|
6036 |
this.property[name] = this.deviceProperty.desktopPortrait[name];
|
6037 |
+
};
|
6038 |
|
6039 |
LayerDataStorage.prototype.removeProperty = function (name) {
|
6040 |
delete this.property[name];
|
6050 |
}
|
6051 |
delete this.isDeviceProp[name];
|
6052 |
delete this.propertyScope[name];
|
6053 |
+
};
|
6054 |
|
6055 |
LayerDataStorage.prototype.removeProperties = function (properties) {
|
6056 |
for (var i = 0; i < properties.length; i++) {
|
6057 |
this.removeProperty(properties[i]);
|
6058 |
}
|
6059 |
+
};
|
6060 |
|
6061 |
LayerDataStorage.prototype.getPropertiesData = function (properties) {
|
6062 |
var data = {};
|
6074 |
}
|
6075 |
}
|
6076 |
return data;
|
6077 |
+
};
|
6078 |
|
6079 |
LayerDataStorage.prototype.setProperty = function (name, value, from) {
|
6080 |
+
|
6081 |
+
if (this.advancedProperties[name] !== undefined) {
|
6082 |
+
name = this.advancedProperties[name].getName();
|
6083 |
+
}
|
6084 |
+
|
6085 |
if (this.propertyScope[name] !== undefined) {
|
6086 |
if (typeof this.propertyScope[name]['setProperty' + name] == 'function') {
|
6087 |
this.propertyScope[name]['setProperty' + name](name, value, from);
|
6088 |
} else {
|
6089 |
this._setProperty(name, value, from);
|
6090 |
}
|
6091 |
+
} else if (typeof this['setProperty' + name] == 'function') {
|
6092 |
+
this['setProperty' + name](name, value, from);
|
6093 |
}
|
6094 |
+
};
|
6095 |
|
6096 |
LayerDataStorage.prototype._setProperty = function (name, value, from) {
|
6097 |
|
6100 |
if (from != 'manager') {
|
6101 |
this.$.trigger('propertyChanged', [name, this.getProperty(name)]);
|
6102 |
}
|
6103 |
+
};
|
6104 |
+
|
6105 |
+
LayerDataStorage.prototype.onSyncFields = function () {
|
6106 |
+
|
6107 |
+
};
|
6108 |
+
|
6109 |
+
LayerDataStorage.prototype.resetStyleMode = function (name) {
|
6110 |
+
for (var k in this.advancedProperties) {
|
6111 |
+
this.advancedProperties[k].resetMode(name);
|
6112 |
+
}
|
6113 |
+
};
|
6114 |
|
6115 |
return LayerDataStorage;
|
6116 |
});
|
6117 |
+
N2D('FragmentEditor', function ($, undefined) {
|
6118 |
"use strict";
|
6119 |
var layerClass = '.n2-ss-layer',
|
6120 |
keys = {
|
6157 |
2: 'GROUP'
|
6158 |
};
|
6159 |
|
6160 |
+
/**
|
6161 |
+
* @memberOf N2Classes
|
6162 |
+
*
|
6163 |
+
* @param {EditorAbstract} editor
|
6164 |
+
* @param jQuery $editedElement
|
6165 |
+
* @param configuration
|
6166 |
+
* @param options
|
6167 |
+
* @constructor
|
6168 |
+
*/
|
6169 |
+
function FragmentEditor(editor, $editedElement, configuration, options) {
|
6170 |
this.mode = 'desktopPortrait';
|
6171 |
+
|
6172 |
+
/**
|
6173 |
+
* @type {EditorAbstract}
|
6174 |
+
*/
|
6175 |
+
this.editor = editor;
|
6176 |
+
this.$editedElement = $editedElement;
|
6177 |
+
this.configuration = configuration;
|
6178 |
this.ready = $.Deferred();
|
6179 |
|
6180 |
this.shouldPreventActivationBubble = false;
|
6181 |
|
6182 |
this.$ = $(this);
|
6183 |
|
6184 |
+
editor.fragmentEditor = this;
|
6185 |
|
6186 |
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" />');
|
6187 |
|
6188 |
this.initSelectMode();
|
6189 |
|
6190 |
+
this.layerWindow = new N2Classes.LayerWindow(this);
|
6191 |
|
6192 |
+
this.layerOptions = new N2Classes.ComponentSettings(this);
|
6193 |
|
6194 |
+
this.ui = new N2Classes.CanvasUserInterface(this);
|
6195 |
|
6196 |
+
/**
|
6197 |
+
* @type {MainContainer}
|
6198 |
+
*/
|
6199 |
+
this.mainContainer = new N2Classes.MainContainer(this);
|
6200 |
|
6201 |
+
this.itemEditor = new N2Classes.ItemManager(this, options);
|
6202 |
|
6203 |
this.mainContainer.lateInit();
|
6204 |
|
6205 |
this._initDeviceModeChange();
|
6206 |
|
6207 |
+
/**
|
6208 |
+
* @type {CanvasSettings}
|
6209 |
+
*/
|
6210 |
+
this.canvasSettings = new N2Classes.CanvasSettings(this);
|
6211 |
|
6212 |
this.layerOptions.startFeatures();
|
6213 |
|
6261 |
}, this));
|
6262 |
|
6263 |
this.isMultiDrag = false;
|
6264 |
+
}
|
6265 |
|
6266 |
+
FragmentEditor.prototype.updateEditorMode = function (mode) {
|
|
|
|
|
6267 |
this.currentEditorMode = mode;
|
6268 |
$('body').attr('data-editormode', this.currentEditorMode);
|
6269 |
};
|
6270 |
|
6271 |
+
FragmentEditor.prototype.getMode = function () {
|
6272 |
return this.mode;
|
6273 |
};
|
6274 |
|
6275 |
+
FragmentEditor.prototype.getResponsiveRatioHorizontal = function () {
|
6276 |
+
return this.editor.getHorizontalRatio();
|
|
|
|
|
|
|
|
|
|
|
6277 |
};
|
6278 |
|
6279 |
+
FragmentEditor.prototype.getResponsiveRatioVertical = function () {
|
6280 |
+
return this.editor.getVerticalRatio();
|
6281 |
+
};
|
6282 |
+
|
6283 |
+
FragmentEditor.prototype.setMainContent = function (layer) {
|
6284 |
this.mainContent = layer;
|
6285 |
+
};
|
6286 |
|
6287 |
+
FragmentEditor.prototype.isGroup = function (layer) {
|
6288 |
return false;
|
6289 |
|
6290 |
+
};
|
6291 |
|
6292 |
+
FragmentEditor.prototype.isRow = function (layer) {
|
6293 |
+
return layer instanceof N2Classes.Row;
|
6294 |
+
};
|
6295 |
|
6296 |
+
FragmentEditor.prototype.isCol = function (layer) {
|
6297 |
+
return layer instanceof N2Classes.Col;
|
6298 |
+
};
|
6299 |
|
6300 |
+
FragmentEditor.prototype.isLayer = function (layer) {
|
6301 |
+
return layer instanceof N2Classes.Layer;
|
6302 |
+
};
|
6303 |
|
6304 |
+
FragmentEditor.prototype.isContent = function (layer) {
|
6305 |
+
return layer instanceof N2Classes.Content;
|
6306 |
+
};
|
6307 |
|
6308 |
//<editor-fold desc="Initialize the device mode changer">
|
6309 |
|
6310 |
|
6311 |
+
FragmentEditor.prototype._initDeviceModeChange = function () {
|
6312 |
var resetButton = $('#layerresettodesktop').on('click', $.proxy(this.__onResetToDesktopClick, this));
|
6313 |
this.resetToDesktopTRElement = resetButton.closest('tr');
|
6314 |
this.resetToDesktopGlobalElement = $('#n2-ss-layer-reset-to-desktop').on('click', $.proxy(function () {
|
6319 |
|
6320 |
var showOn = $('#n2-ss-layer-show-on'),
|
6321 |
showOnShortCuts = {},
|
6322 |
+
deviceModes = this.editor.getAvailableDeviceModes();
|
6323 |
for (var k in deviceModes) {
|
6324 |
if (deviceModes[k]) {
|
6325 |
showOnShortCuts[k] = $('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-' + k + '"></i></div>').on('click', $.proxy(function (mode) {
|
6348 |
this.layerOptions.forms.global.mobileLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'mobileLandscape'));
|
6349 |
|
6350 |
$('#layershow').data('field').setAvailableDevices(deviceModes);
|
|
|
6351 |
|
6352 |
+
this.refreshMode();
|
|
|
|
|
|
|
6353 |
|
6354 |
this.ready.resolve();
|
6355 |
|
6356 |
+
}
|
6357 |
|
6358 |
/**
|
6359 |
* 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.
|
6360 |
*/
|
6361 |
+
FragmentEditor.prototype.refreshMode = function () {
|
6362 |
+
this.mode = this.editor.getDeviceMode();
|
6363 |
|
6364 |
+
this.resetToDesktopTRElement.css('display', (this.mode == 'desktopPortrait' ? 'none' : ''));
|
6365 |
+
this.resetToDesktopGlobalElement.css('display', (this.mode == 'desktopPortrait' ? 'none' : ''));
|
6366 |
|
6367 |
+
this.mainContainer.container.changeEditorModes(this.mode);
|
6368 |
};
|
6369 |
|
6370 |
+
FragmentEditor.prototype.onChangeDeviceOrientation = function () {
|
6371 |
+
this.refreshMode();
|
6372 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
6373 |
|
6374 |
+
FragmentEditor.prototype.onResize = function (ratios) {
|
6375 |
+
this.mainContainer.onResize(ratios);
|
6376 |
|
6377 |
+
if (this.canvasSettings.ruler) {
|
6378 |
+
this.canvasSettings.ruler.onResize();
|
6379 |
+
}
|
6380 |
};
|
6381 |
|
6382 |
/**
|
6383 |
* Reset the custom values of the current mode on the current layer to the desktop values.
|
6384 |
* @private
|
6385 |
*/
|
6386 |
+
FragmentEditor.prototype.__onResetToDesktopClick = function () {
|
6387 |
if (this.mainContainer.getSelectedLayer()) {
|
6388 |
var mode = this.getMode();
|
6389 |
this.mainContainer.getSelectedLayer().resetMode(mode);
|
6390 |
}
|
6391 |
};
|
6392 |
|
6393 |
+
FragmentEditor.prototype.copyOrResetMode = function (mode) {
|
6394 |
var currentMode = this.getMode();
|
6395 |
if (currentMode == 'desktopPortrait') {
|
6396 |
if (mode != 'desktopPortrait') {
|
6407 |
|
6408 |
//</editor-fold>
|
6409 |
|
6410 |
+
FragmentEditor.prototype.getSnap = function () {
|
6411 |
if (this.canvasSettings.get("n2-ss-snap-to-enabled")) {
|
6412 |
+
return $(this.configuration.snapSelector);
|
|
|
|
|
|
|
6413 |
}
|
6414 |
return false;
|
6415 |
};
|
6418 |
* Get the HTML code of the whole slide
|
6419 |
* @returns {string} HTML
|
6420 |
*/
|
6421 |
+
FragmentEditor.prototype.getHTML = function () {
|
6422 |
var node = $('<div></div>');
|
6423 |
|
6424 |
var list = this.mainContainer.container.getAllLayers();
|
6430 |
};
|
6431 |
|
6432 |
|
6433 |
+
FragmentEditor.prototype.getData = function () {
|
6434 |
return this.mainContainer.container.getData();
|
6435 |
};
|
6436 |
|
6437 |
+
FragmentEditor.prototype.importLayers = function (data, overwrite) {
|
6438 |
var group = this.mainContainer;
|
6439 |
|
6440 |
var layers = $.extend(true, [], data);
|
6462 |
|
6463 |
};
|
6464 |
|
6465 |
+
FragmentEditor.prototype.loadComponentWithNode = function (group, $component, needHistory, refresh) {
|
6466 |
|
6467 |
var component = group.container.append($component);
|
6468 |
|
6473 |
return component;
|
6474 |
};
|
6475 |
|
6476 |
+
FragmentEditor.prototype.insertComponentWithNode = function (group, $component, index, needHistory, refresh) {
|
6477 |
|
6478 |
var component = group.container.insertAt($component, index);
|
6479 |
|
6491 |
* @private
|
6492 |
*/
|
6493 |
|
6494 |
+
FragmentEditor.prototype.fixActiveLayer = function () {
|
6495 |
var selectedLayer = this.mainContainer.getSelectedLayer();
|
6496 |
if (selectedLayer == false || selectedLayer.isDeleted) {
|
6497 |
this.resetActiveLayer();
|
6498 |
}
|
6499 |
};
|
6500 |
|
6501 |
+
FragmentEditor.prototype.resetActiveLayer = function () {
|
6502 |
var layers = this.mainContainer.container.getSortedLayers();
|
6503 |
if (layers.length) {
|
6504 |
layers[layers.length - 1].activate();
|
6507 |
}
|
6508 |
};
|
6509 |
|
6510 |
+
FragmentEditor.prototype.changeActiveLayer = function (nextActiveLayer, preventExitFromSelection) {
|
6511 |
var layer = this.mainContainer.getSelectedLayer();
|
6512 |
if (layer && !layer.isDeleted) {
|
6513 |
// There is a chance that the layer already deleted
|
6524 |
|
6525 |
if (nextActiveLayer) {
|
6526 |
|
6527 |
+
this.layerOptions.changeActiveComponent(nextActiveLayer, nextActiveLayer.type, nextActiveLayer.placement.getType(), nextActiveLayer.getProperties());
|
6528 |
|
6529 |
nextActiveLayer.$.on({
|
6530 |
'propertyChanged.editor': $.proxy(this.layerOptions.onUpdateField, this.layerOptions),
|
6538 |
this.$.trigger('activeLayerChanged');
|
6539 |
};
|
6540 |
|
6541 |
+
FragmentEditor.prototype.highlight = function (layer) {
|
6542 |
this.$highlight.appendTo(layer.layer);
|
6543 |
+
};
|
6544 |
|
6545 |
+
FragmentEditor.prototype.deHighlight = function (layer) {
|
6546 |
this.$highlight.detach();
|
6547 |
+
};
|
6548 |
|
6549 |
+
FragmentEditor.prototype.delete = function () {
|
6550 |
if (this.mainContainer.getSelectedLayer()) {
|
6551 |
this.doActionOnActiveLayer('delete');
|
6552 |
}
|
6553 |
};
|
6554 |
|
6555 |
+
FragmentEditor.prototype.duplicate = function () {
|
6556 |
if (this.mainContainer.getSelectedLayer()) {
|
6557 |
this.doActionOnActiveLayer('duplicate', [this.selectMode == SELECT_MODE.ON ? false : true, false]);
|
6558 |
}
|
6559 |
};
|
6560 |
|
6561 |
+
FragmentEditor.prototype.copy = function (clickedLayer) {
|
6562 |
var requestedLayers;
|
6563 |
if (clickedLayer == undefined) {
|
6564 |
if (this.selectMode == 1) {
|
6587 |
}
|
6588 |
};
|
6589 |
|
6590 |
+
FragmentEditor.prototype.paste = function (target) {
|
6591 |
var clipboard = $.jStorage.get('ss3layersclipboard');
|
6592 |
if (clipboard) {
|
6593 |
var layers = JSON.parse(clipboard);
|
6607 |
}
|
6608 |
};
|
6609 |
|
6610 |
+
FragmentEditor.prototype.hasLayersOnClipboard = function () {
|
6611 |
if ($.jStorage.get('ss3layersclipboard')) {
|
6612 |
return true;
|
6613 |
}
|
6614 |
return false;
|
6615 |
+
};
|
6616 |
|
6617 |
+
FragmentEditor.prototype.addContextMenu = function () {
|
|
|
6618 |
|
6619 |
+
this.$editedElement.nextendContextMenu({
|
6620 |
onShow: $.proxy(function (e, contextMenu) {
|
6621 |
var $target = $(e.target);
|
6622 |
|
6649 |
}
|
6650 |
|
6651 |
contextMenu.addItem('Copy slide', 'n2-i-copy', $.proxy(function () {
|
6652 |
+
this.editor.copy();
|
6653 |
}, this));
|
6654 |
+
if (this.editor.hasClipboard()) {
|
6655 |
contextMenu.addItem('Paste slide', 'n2-i-paste', $.proxy(function () {
|
6656 |
+
this.editor.paste();
|
6657 |
}, this));
|
6658 |
}
|
6659 |
}, this)
|
6661 |
};
|
6662 |
|
6663 |
|
6664 |
+
FragmentEditor.prototype.initSelectMode = function () {
|
6665 |
this.selectMode = SELECT_MODE.OFF;
|
6666 |
this.selectedLayers = [];
|
6667 |
|
6682 |
break;
|
6683 |
}
|
6684 |
}, this))
|
6685 |
+
};
|
6686 |
|
6687 |
+
FragmentEditor.prototype.startSelection = function (isGroupMode) {
|
6688 |
if (isGroupMode) {
|
6689 |
if (this.selectMode == SELECT_MODE.ON) {
|
6690 |
this.exitSelectMode();
|
6693 |
} else {
|
6694 |
this.changeSelectMode(SELECT_MODE.ON);
|
6695 |
}
|
6696 |
+
};
|
6697 |
|
6698 |
+
FragmentEditor.prototype.changeSelectMode = function (targetMode) {
|
6699 |
var lastMode = this.selectMode;
|
6700 |
if (lastMode != targetMode) {
|
6701 |
|
6726 |
$('body').off('.n2-ss-selection');
|
6727 |
} else {
|
6728 |
$('body').on('mousedown.n2-ss-selection', $.proxy(function (e) {
|
6729 |
+
if (e.which != 3 && N2Classes.WindowManager.get().getCurrentWindow() == 'main') {
|
6730 |
+
if (N2Classes.WindowManager.get().mouseDownArea === false) {
|
6731 |
this.exitSelectMode();
|
6732 |
}
|
6733 |
}
|
6734 |
}, this));
|
6735 |
}
|
6736 |
}
|
6737 |
+
};
|
6738 |
|
6739 |
+
FragmentEditor.prototype.endSelection = function (isGroupMode) {
|
6740 |
if (isGroupMode && this.selectMode == SELECT_MODE.GROUP) {
|
6741 |
this.exitSelectMode();
|
6742 |
}
|
6743 |
+
};
|
6744 |
|
6745 |
+
FragmentEditor.prototype.selectLayer = function (layer, addActive) {
|
6746 |
if (layer.type != 'layer') {
|
6747 |
return true;
|
6748 |
}
|
6766 |
return true;
|
6767 |
};
|
6768 |
|
6769 |
+
FragmentEditor.prototype._selectLayer = function (layer) {
|
6770 |
|
6771 |
var index = $.inArray(layer, this.selectedLayers);
|
6772 |
if (index != -1) {
|
6813 |
this.selectedLayers[i].layerRow.addClass('n2-selected');
|
6814 |
this.selectedLayers[i].layer.addClass('n2-ss-layer-selected');
|
6815 |
}
|
6816 |
+
};
|
6817 |
|
6818 |
+
FragmentEditor.prototype.addSelection = function (layers, isGroupSelected) {
|
6819 |
if (!isGroupSelected) {
|
6820 |
this.changeSelectMode(SELECT_MODE.ON);
|
6821 |
}
|
6823 |
for (var i = 0; i < layers.length; i++) {
|
6824 |
this._selectLayer(layers[i], false);
|
6825 |
}
|
6826 |
+
};
|
6827 |
|
6828 |
+
FragmentEditor.prototype.exitSelectMode = function () {
|
6829 |
if (this.selectMode) {
|
6830 |
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6831 |
if (this.selectedLayers[i] != this.mainContainer.getSelectedLayer()) {
|
6838 |
this.selectedLayers = [];
|
6839 |
this.changeSelectMode(SELECT_MODE.OFF);
|
6840 |
}
|
6841 |
+
};
|
6842 |
|
6843 |
+
FragmentEditor.prototype.doActionOnActiveLayer = function (action, args) {
|
6844 |
if (this.selectMode == SELECT_MODE.ON) {
|
6845 |
|
6846 |
var selectedLayers = $.extend([], this.selectedLayers);
|
6853 |
selectedLayer[action].apply(selectedLayer, args);
|
6854 |
}
|
6855 |
}
|
6856 |
+
};
|
6857 |
|
6858 |
+
FragmentEditor.prototype.canvasDragStart = function (e, ui) {
|
6859 |
if (this.selectMode && this.currentEditorMode == 'canvas' && ui.mode == 'absolute') {
|
6860 |
|
6861 |
var targetFoundInSelection = false;
|
6886 |
|
6887 |
this.isMultiDrag = true;
|
6888 |
}
|
6889 |
+
};
|
6890 |
|
6891 |
+
FragmentEditor.prototype.canvasDragMove = function (e, ui) {
|
6892 |
if (this.isMultiDrag === true) {
|
6893 |
var movement = {
|
6894 |
left: ui.position.left + ui.canvasOffset.left - ui.originalOffset.left,
|
6895 |
top: ui.position.top + ui.canvasOffset.top - ui.originalOffset.top
|
6896 |
+
};
|
6897 |
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6898 |
var selectedLayer = this.selectedLayers[i];
|
6899 |
if (!this.isGroup(selectedLayer)) {
|
6912 |
}
|
6913 |
}
|
6914 |
}
|
6915 |
+
};
|
6916 |
|
6917 |
+
FragmentEditor.prototype.canvasDragStop = function (e, ui) {
|
6918 |
if (this.isMultiDrag === true) {
|
6919 |
for (var i = 0; i < this.selectedLayers.length; i++) {
|
6920 |
var selectedLayer = this.selectedLayers[i];
|
6941 |
return true;
|
6942 |
}
|
6943 |
return false;
|
6944 |
+
};
|
6945 |
|
6946 |
+
FragmentEditor.prototype.historyDeleteGroup = function (historicalGroup) {
|
6947 |
historicalGroup.getSelf().delete();
|
6948 |
+
};
|
6949 |
|
6950 |
+
FragmentEditor.prototype.historyCreateGroup = function (historicalGroup) {
|
6951 |
+
var group = new N2Classes.Group(this, this.mainContainer, {}, null);
|
6952 |
group.create();
|
6953 |
historicalGroup.setSelf(group);
|
6954 |
+
};
|
6955 |
|
6956 |
+
FragmentEditor.prototype.createGroupFromSelected = function () {
|
6957 |
var group;
|
6958 |
switch (this.selectMode) {
|
6959 |
case SELECT_MODE.ON:
|
6960 |
+
group = new N2Classes.Group(this, this.mainContainer, {}, null);
|
6961 |
group.create();
|
6962 |
|
6963 |
+
N2Classes.History.get().addSimple(this, this.historyDeleteGroup, this.historyCreateGroup, [group]);
|
6964 |
|
6965 |
group.addLayers(this.selectedLayers);
|
6966 |
|
6972 |
var activeLayer = this.mainContainer.getSelectedLayer();
|
6973 |
|
6974 |
// If the single layer is already in a group, we just activate that group
|
6975 |
+
if (activeLayer.group instanceof N2Classes.Group) {
|
6976 |
activeLayer.group.activate();
|
6977 |
} else {
|
6978 |
+
group = new N2Classes.Group(this, this.mainContainer, {}, null);
|
6979 |
group.create();
|
6980 |
|
6981 |
+
N2Classes.History.get().addSimple(this, this.historyDeleteGroup, this.historyCreateGroup, [group]);
|
6982 |
|
6983 |
group.addLayers([activeLayer]);
|
6984 |
|
6988 |
case SELECT_MODE.GROUP:
|
6989 |
break;
|
6990 |
}
|
6991 |
+
};
|
6992 |
|
6993 |
+
FragmentEditor.prototype.createRow = function (group) {
|
6994 |
+
var layer = new N2Classes.Row(this, group, {});
|
6995 |
layer.create();
|
6996 |
layer.hightlightStructure();
|
6997 |
return {
|
6998 |
layer: layer
|
6999 |
};
|
7000 |
+
};
|
7001 |
|
7002 |
+
FragmentEditor.prototype.createCol = function (group) {
|
7003 |
var activeGroup = group,
|
7004 |
layer = null;
|
7005 |
if (this.isCol(activeGroup)) {
|
7015 |
return {
|
7016 |
layer: layer
|
7017 |
};
|
7018 |
+
};
|
7019 |
|
7020 |
+
FragmentEditor.prototype.preventActivationBubbling = function () {
|
7021 |
if (!this.shouldPreventActivationBubble) {
|
7022 |
this.shouldPreventActivationBubble = true;
|
7023 |
return true;
|
7024 |
}
|
7025 |
return false;
|
7026 |
+
};
|
7027 |
|
7028 |
+
FragmentEditor.prototype.allowActivation = function () {
|
7029 |
this.shouldPreventActivationBubble = false;
|
7030 |
+
};
|
7031 |
|
7032 |
+
FragmentEditor.prototype.hotkeys = function () {
|
7033 |
$(window).on({
|
7034 |
keydown: $.proxy(function (e) {
|
7035 |
+
var isTimelineActive = false;
|
7036 |
+
if (e.target.tagName != 'TEXTAREA' && e.target.tagName != 'INPUT' && !isTimelineActive) {
|
7037 |
var hasSelectedLayer = this.mainContainer.getSelectedLayer(),
|
7038 |
keyCode = e.keyCode;
|
7039 |
|
7115 |
if (e.ctrlKey || e.metaKey) {
|
7116 |
if (keyCode == 90) {
|
7117 |
if (e.shiftKey) {
|
7118 |
+
if (N2Classes.History.get().redo()) {
|
7119 |
e.preventDefault();
|
7120 |
}
|
7121 |
} else {
|
7122 |
+
if (N2Classes.History.get().undo()) {
|
7123 |
e.preventDefault();
|
7124 |
}
|
7125 |
}
|
7128 |
e.preventDefault();
|
7129 |
} else if (keyCode == 68) {
|
7130 |
e.preventDefault();
|
7131 |
+
this.editor.copy();
|
7132 |
} else if (keyCode == 70) {
|
7133 |
e.preventDefault();
|
7134 |
+
this.editor.paste();
|
7135 |
} else if (keyCode == 67) {
|
7136 |
this.copy();
|
7137 |
} else if (keyCode == 86) {
|
7147 |
}
|
7148 |
}, this)
|
7149 |
});
|
7150 |
+
};
|
7151 |
|
7152 |
+
FragmentEditor.prototype.getSelf = function () {
|
7153 |
return this;
|
7154 |
+
};
|
7155 |
|
7156 |
+
return FragmentEditor;
|
7157 |
});
|
7158 |
+
N2D('CanvasUserInterface', function ($, undefined) {
|
7159 |
"use strict";
|
7160 |
|
7161 |
+
/**
|
7162 |
+
* @memberOf N2Classes
|
7163 |
+
*
|
7164 |
+
* @param fragmentEditor
|
7165 |
+
* @constructor
|
7166 |
+
*/
|
7167 |
+
function CanvasUserInterface(fragmentEditor) {
|
7168 |
+
this.fragmentEditor = fragmentEditor;
|
7169 |
this.isShown = !$.jStorage.get('ssLayersShown', false);
|
7170 |
this.tlHeight = $.jStorage.get('ssLayersHeight') || 200;
|
7171 |
|
7194 |
var h = this.$container.height();
|
7195 |
this.paneLeft.height(h - 48);
|
7196 |
this.paneRight.height(h - 48);
|
7197 |
+
};
|
7198 |
|
7199 |
CanvasUserInterface.prototype.onActivateLayer = function (layer) {
|
7200 |
|
7205 |
do {
|
7206 |
top += currentLayer.layerRow.get(0).offsetTop;
|
7207 |
currentLayer = currentLayer.group;
|
7208 |
+
} while (currentLayer !== this.fragmentEditor.mainContainer);
|
7209 |
|
7210 |
if (top < scrollTop || top > scrollTop + this.paneLeft.height() - 40) {
|
7211 |
this.paneLeft.scrollTop(top);
|
7212 |
this.paneRight.scrollTop(top);
|
7213 |
}
|
7214 |
+
};
|
7215 |
|
7216 |
CanvasUserInterface.prototype.fixScroll = function () {
|
7217 |
|
7239 |
}, this));
|
7240 |
|
7241 |
this.paneRight.on('mousewheel', cb);
|
7242 |
+
};
|
7243 |
|
7244 |
CanvasUserInterface.prototype.resizeStart = function (e) {
|
7245 |
if (!this.isShown) return;
|
7253 |
'mouseleave.n2-ss-tl-resize': $.proxy(this.resizeStop, this)
|
7254 |
});
|
7255 |
}
|
7256 |
+
};
|
7257 |
|
7258 |
CanvasUserInterface.prototype.resizeMove = function (e) {
|
7259 |
e.preventDefault();
|
7260 |
this.setTLHeight(this._calculateDesiredHeight(e));
|
7261 |
+
};
|
7262 |
|
7263 |
CanvasUserInterface.prototype.resizeStop = function (e) {
|
7264 |
e.preventDefault();
|
7269 |
this.tlHeight = h;
|
7270 |
$.jStorage.set('ssLayersHeight', h);
|
7271 |
$('#n2-admin').triggerHandler('resize');
|
7272 |
+
};
|
7273 |
|
7274 |
CanvasUserInterface.prototype._calculateDesiredHeight = function (e) {
|
7275 |
var h = this.startY - e.clientY + this.height - 48;
|
7276 |
return this.__calculateDesiredHeight(h);
|
7277 |
+
};
|
7278 |
|
7279 |
CanvasUserInterface.prototype.__calculateDesiredHeight = function (h) {
|
7280 |
return Math.round(Math.min(Math.max(40, h), (window.innerHeight || document.documentElement.clientHeight) / 2) / 40) * 40 + 48;
|
7281 |
+
};
|
7282 |
|
7283 |
|
7284 |
CanvasUserInterface.prototype.switchLayerList = function () {
|
7290 |
this.setTLHeight(48);
|
7291 |
}
|
7292 |
$.jStorage.set('ssLayersShown', this.isShown);
|
7293 |
+
};
|
7294 |
|
7295 |
CanvasUserInterface.prototype.setTLHeight = function (h) {
|
7296 |
h = Math.max(48, h);
|
7300 |
this.paneRight.height(h - 48);
|
7301 |
|
7302 |
nextend.triggerResize();
|
7303 |
+
};
|
7304 |
|
7305 |
CanvasUserInterface.prototype.activateAdd = function (x, y) {
|
7306 |
this.$add.css({
|
7307 |
left: x,
|
7308 |
top: y
|
7309 |
}).appendTo(this.$container);
|
7310 |
+
};
|
7311 |
|
7312 |
return CanvasUserInterface;
|
7313 |
});
|
7314 |
+
N2D('LayerFeatures', function ($, undefined) {
|
7315 |
"use strict";
|
7316 |
|
7317 |
var nameToIndex = {
|
7323 |
bottom: 2
|
7324 |
};
|
7325 |
|
7326 |
+
/**
|
7327 |
+
* @memberOf N2Classes
|
7328 |
+
*
|
7329 |
+
* @param fields
|
7330 |
+
* @param fragmentEditor
|
7331 |
+
* @constructor
|
7332 |
+
*/
|
7333 |
+
function LayerFeatures(fields, fragmentEditor) {
|
7334 |
this.fields = fields;
|
7335 |
+
this.fragmentEditor = fragmentEditor;
|
7336 |
|
7337 |
this.initParentLinker();
|
7338 |
this.initAlign();
|
7391 |
}
|
7392 |
break;
|
7393 |
}
|
7394 |
+
} else if (this.fragmentEditor.mainContainer.getSelectedLayer()) {
|
7395 |
var align = $(e.currentTarget).data('align');
|
7396 |
switch (align) {
|
7397 |
case 'left':
|
7473 |
row = $('<div class="n2-editor-header n2-h2 n2-uc"><span>' + headingLabel + '</span></div>');
|
7474 |
|
7475 |
heading.replaceWith(row);
|
7476 |
+
};
|
7477 |
|
7478 |
return LayerFeatures;
|
7479 |
});
|
7480 |
+
N2D('LayerWindow', function ($, undefined) {
|
7481 |
"use strict";
|
7482 |
|
7483 |
+
/**
|
7484 |
+
* @memberOf N2Classes
|
7485 |
+
*
|
7486 |
+
* @param fragmentEditor
|
7487 |
+
* @constructor
|
7488 |
+
*/
|
7489 |
+
function LayerWindow(fragmentEditor) {
|
7490 |
|
7491 |
this.isMinimized = false;
|
7492 |
this.detachedPosition = {
|
7499 |
this.lastHeight = this.detachedPosition.height;
|
7500 |
|
7501 |
this.admin = $('#n2-admin');
|
7502 |
+
this.sidebar = $('#n2-ss-layer-window').on('mousedown', $.proxy(N2Classes.WindowManager.setMouseDownArea, null, 'sidebarClicked'));
|
7503 |
|
7504 |
this.title = this.sidebar.find('.n2-ss-layer-window-title-inner');
|
|
|
7505 |
|
7506 |
+
this.fragmentEditor = fragmentEditor;
|
|
|
7507 |
|
7508 |
this.viewPanes = {
|
7509 |
layerEdit: $('#n2-tabbed-slide-editor-settings > .n2-tabs').addClass('n2-scrollable')
|
7523 |
e.preventDefault();
|
7524 |
e.returnValue = false;
|
7525 |
return false;
|
7526 |
+
};
|
7527 |
|
7528 |
if (!up && this.scrollHeight <= $(this).innerHeight() + this.scrollTop + 1) {
|
7529 |
return prevent();
|
7559 |
e.preventDefault();
|
7560 |
$('#n2-ss-layers-switcher > .n2-labels .n2-td').eq(0).trigger('click');
|
7561 |
$verticalBar.toggleClass('n2-active');
|
7562 |
+
});
|
7563 |
|
7564 |
$('.n2-ss-core-item').on('click', function (e) {
|
7565 |
$verticalBar.removeClass('n2-active');
|
7584 |
|
7585 |
this.detach();
|
7586 |
|
7587 |
+
$('#n2-admin').on('resize', $.proxy(this.resizeVerticalBar, this));
|
7588 |
|
7589 |
$(window).on('resize', $.proxy(this.onResize, this));
|
7590 |
|
7592 |
$('.n2-ss-slide-duplicate-layer').on('click', $.proxy(function (e) {
|
7593 |
e.preventDefault();
|
7594 |
this.duplicate();
|
7595 |
+
}, this.fragmentEditor));
|
7596 |
|
7597 |
$('.n2-ss-slide-delete-layer').on('click', $.proxy(function (e) {
|
7598 |
e.preventDefault();
|
7599 |
this.delete();
|
7600 |
+
}, this.fragmentEditor));
|
7601 |
|
7602 |
|
7603 |
$('body').on('mousedown', $.proxy(function (e) {
|
7604 |
+
if (N2Classes.WindowManager.get().getCurrentWindow() == 'main') {
|
7605 |
+
if (N2Classes.WindowManager.get().mouseDownArea === false) {
|
7606 |
this.hide();
|
7607 |
}
|
7608 |
}
|
7609 |
}, this));
|
7610 |
|
7611 |
+
var $devicespecific = $('<div id="n2-ss-devicespecific-settings"></div>'),
|
7612 |
+
modes = this.fragmentEditor.editor.getAvailableDeviceModes();
|
7613 |
|
|
|
7614 |
for (var k in modes) {
|
7615 |
if (modes[k]) {
|
7616 |
var mode = k.replace(/([A-Z])/g, ' $1').split(' '),
|
7637 |
$('#n2-ss-devices').find('[data-device="' + $target.data('device') + '"][data-orientation="' + $target.data('orientation') + '"]').trigger('click')
|
7638 |
}, this)
|
7639 |
});
|
7640 |
+
}
|
7641 |
|
7642 |
LayerWindow.prototype.toggleMinimize = function () {
|
7643 |
this.isMinimized = !this.isMinimized;
|
7645 |
if (!this.isMinimized) {
|
7646 |
this.onResize();
|
7647 |
}
|
7648 |
+
};
|
7649 |
+
|
7650 |
+
LayerWindow.prototype.magnetize = function () {
|
7651 |
+
if (!this.autoPosition) {
|
7652 |
+
|
7653 |
+
this.autoPosition = 1;
|
7654 |
+
$.jStorage.set('ssPanelAutoPosition', 1);
|
7655 |
+
|
7656 |
+
this.magnet.css('display', 'none');
|
7657 |
+
|
7658 |
+
var activeLayer = this.fragmentEditor.mainContainer.getSelectedLayer();
|
7659 |
+
if (activeLayer) {
|
7660 |
+
activeLayer.positionSidebar();
|
7661 |
+
}
|
7662 |
+
}
|
7663 |
+
};
|
7664 |
|
7665 |
LayerWindow.prototype.show = function (layer, of) {
|
7666 |
this.setTitle(layer);
|
7667 |
|
7668 |
$('body').addClass('n2-ss-layer-edit-visible');
|
7669 |
+
};
|
7670 |
|
7671 |
LayerWindow.prototype._show = function () {
|
7672 |
$('body').addClass('n2-ss-layer-edit-visible');
|
7673 |
+
};
|
7674 |
|
7675 |
LayerWindow.prototype.hide = function () {
|
7676 |
$('body').removeClass('n2-ss-layer-edit-visible');
|
7677 |
+
};
|
7678 |
|
7679 |
LayerWindow.prototype.isVisible = function () {
|
7680 |
return $('body').hasClass('n2-ss-layer-edit-visible');
|
7681 |
+
};
|
7682 |
|
7683 |
LayerWindow.prototype.hideWithDeferred = function (deferred) {
|
7684 |
if ($('body').hasClass('n2-ss-layer-edit-visible')) {
|
7685 |
this.hide();
|
7686 |
deferred.done($.proxy(this._show, this));
|
7687 |
}
|
7688 |
+
};
|
7689 |
|
7690 |
LayerWindow.prototype.setTitle = function (layer) {
|
7691 |
this.title.html(layer.getName());
|
7692 |
|
7693 |
this.updateGroupTitle(layer);
|
7694 |
+
};
|
7695 |
|
7696 |
LayerWindow.prototype.updateGroupTitle = function (layer) {
|
7697 |
var i;
|
7701 |
$('<span class="n2-window-title-structure-nav"><span>' + layer.label + '</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>')
|
7702 |
.on({
|
7703 |
mouseenter: $.proxy(function () {
|
7704 |
+
this.fragmentEditor.highlight(this);
|
7705 |
}, layer),
|
7706 |
mouseleave: $.proxy(function () {
|
7707 |
+
this.fragmentEditor.deHighlight(this);
|
7708 |
}, layer),
|
7709 |
click: $.proxy(function (e) {
|
7710 |
+
this.fragmentEditor.deHighlight(this);
|
7711 |
this.activate(e);
|
7712 |
}, layer)
|
7713 |
})
|
7714 |
.prependTo(this.$breadcrumb);
|
7715 |
+
if (layer.group && layer.group !== this.fragmentEditor.mainContainer) {
|
7716 |
layer = layer.group;
|
7717 |
} else {
|
7718 |
break;
|
7720 |
}
|
7721 |
|
7722 |
this.hasBreadcrumb = i > 0;
|
7723 |
+
this.$breadcrumb.toggleClass('n2-has-breadcrumb', this.hasBreadcrumb);
|
7724 |
this.onResize();
|
7725 |
+
};
|
7726 |
|
7727 |
LayerWindow.prototype.getLayerEditExcludedHeight = function () {
|
7728 |
return 85 + (this.hasBreadcrumb ? 23 : 0);
|
7730 |
|
7731 |
LayerWindow.prototype.resizeVerticalBar = function () {
|
7732 |
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);
|
7733 |
+
};
|
7734 |
|
7735 |
LayerWindow.prototype.onResize = function () {
|
7736 |
this.sidebar.css('display', 'block');
|
7763 |
this.sidebar.css(properties);
|
7764 |
this.sidebar.css('display', '');
|
7765 |
|
7766 |
+
};
|
7767 |
|
7768 |
LayerWindow.prototype.detach = function () {
|
7769 |
|
7776 |
this.sidebar.removeClass("n2-sidebar-fixed");
|
7777 |
|
7778 |
this.sidebar
|
7779 |
+
.nUIDraggable({
|
7780 |
distance: 5,
|
7781 |
handle: ".n2-ss-layer-window-title",
|
7782 |
containment: 'window',
|
7792 |
}, this),
|
7793 |
scroll: false
|
7794 |
})
|
7795 |
+
.nUIResizable({
|
7796 |
distance: 5,
|
7797 |
handles: "s",
|
7798 |
stop: $.proxy(function (event, ui) {
|
7801 |
|
7802 |
}, this),
|
7803 |
create: $.proxy(function (e, ui) {
|
7804 |
+
var handle = $(e.target).find('.nui-resizable-handle').addClass('n2-ss-layer-window-resizer');
|
7805 |
}, this)
|
7806 |
});
|
7807 |
|
7815 |
|
7816 |
return LayerWindow;
|
7817 |
});
|
7818 |
+
N2D('PositionDisplay', function ($, undefined) {
|
7819 |
"use strict";
|
7820 |
|
7821 |
+
/**
|
7822 |
+
* @memberOf N2Classes
|
7823 |
+
*
|
7824 |
+
* @constructor
|
7825 |
+
*/
|
7826 |
function PositionDisplay() {
|
7827 |
this.currentSource = '';
|
7828 |
+
$(window).ready($.proxy(this._ready, this));
|
7829 |
}
|
7830 |
|
7831 |
+
/**
|
7832 |
+
* @private
|
7833 |
+
*/
|
7834 |
+
PositionDisplay.prototype._ready = function () {
|
7835 |
this.$body = $('body');
|
7836 |
this.$el = $('<div class="n2 n2-ss-position-display"/>')
|
7837 |
.appendTo('body');
|
7838 |
+
};
|
7839 |
|
7840 |
PositionDisplay.prototype.show = function (source) {
|
7841 |
if (this.currentSource == '') {
|
7843 |
this.$el.addClass('n2-active');
|
7844 |
this.$body.addClass('n2-position-display-active');
|
7845 |
}
|
7846 |
+
};
|
7847 |
|
7848 |
PositionDisplay.prototype.update = function (e, source, html) {
|
7849 |
if (this.currentSource == source) {
|
7853 |
top: e.pageY + 10
|
7854 |
});
|
7855 |
}
|
7856 |
+
};
|
7857 |
|
7858 |
PositionDisplay.prototype.hide = function (source) {
|
7859 |
if (this.currentSource == source || source === undefined) {
|
7862 |
this.currentSource = '';
|
7863 |
}
|
7864 |
|
7865 |
+
};
|
7866 |
+
|
7867 |
|
7868 |
+
/**
|
7869 |
+
* @returns {PositionDisplay}
|
7870 |
+
*/
|
7871 |
+
PositionDisplay.get = function () {
|
7872 |
+
var positionDisplay = new PositionDisplay();
|
7873 |
+
PositionDisplay.get = function () {
|
7874 |
+
return positionDisplay;
|
7875 |
+
};
|
7876 |
+
return positionDisplay;
|
7877 |
+
};
|
7878 |
|
7879 |
return PositionDisplay;
|
7880 |
});
|
7881 |
+
N2D('Ruler', function ($, undefined) {
|
7882 |
"use strict";
|
7883 |
|
7884 |
+
/**
|
7885 |
+
* @memberOf N2Classes
|
7886 |
+
*
|
7887 |
+
* @param {EditorAbstract} editor
|
7888 |
+
* @param stored
|
7889 |
+
* @constructor
|
7890 |
+
*/
|
7891 |
+
function Ruler(editor, stored) {
|
7892 |
+
|
7893 |
+
this.editor = editor;
|
7894 |
+
|
7895 |
this.showGuides = 1;
|
7896 |
this.guides = [];
|
7897 |
this.container = $('<div class="n2-ruler-container" />').appendTo('#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container');
|
7905 |
this.horizontalSpans = $();
|
7906 |
|
7907 |
this.onResize();
|
|
|
7908 |
$(window).on('resize', $.proxy(this.onResize, this));
|
7909 |
|
7910 |
this.horizontal.on('mousedown', $.proxy(function (e) {
|
7922 |
|
7923 |
|
7924 |
try {
|
7925 |
+
stored = $.extend({vertical: [], horizontal: []}, JSON.parse(N2Classes.Base64.decode(stored)));
|
7926 |
for (var i = 0; i < stored.horizontal.length; i++) {
|
7927 |
var guide = new GuideHorizontal(this, this.horizontal);
|
7928 |
guide.setPosition(stored.horizontal[i]);
|
7933 |
}
|
7934 |
} catch (e) {
|
7935 |
}
|
|
|
7936 |
this.measureToolVertical();
|
7937 |
this.measureToolHorizontal();
|
7938 |
}
|
7939 |
|
7940 |
Ruler.prototype.addGuide = function (guide) {
|
7941 |
this.guides.push(guide);
|
7942 |
+
};
|
7943 |
|
7944 |
Ruler.prototype.removeGuide = function (guide) {
|
7945 |
this.guides.splice($.inArray(guide, this.guides), 1);
|
7946 |
+
};
|
7947 |
|
7948 |
Ruler.prototype.clearGuides = function () {
|
7949 |
for (var i = this.guides.length - 1; i >= 0; i--) {
|
7950 |
this.guides[i].delete();
|
7951 |
}
|
7952 |
+
};
|
|
|
|
|
|
|
|
|
7953 |
|
7954 |
Ruler.prototype.onResize = function () {
|
7955 |
+
var $container = $('.n2-ss-slider-outer-container'),
|
7956 |
+
width = $container.width(),
|
7957 |
+
height = $container.height();
|
|
|
7958 |
|
7959 |
this.container.css({
|
7960 |
width: width + 40,
|
7980 |
}
|
7981 |
this.verticalSpans = this.verticalSpans.add(mark);
|
7982 |
}
|
7983 |
+
};
|
7984 |
|
7985 |
Ruler.prototype.toArray = function () {
|
7986 |
var data = {
|
7995 |
}
|
7996 |
}
|
7997 |
return data;
|
7998 |
+
};
|
7999 |
|
8000 |
Ruler.prototype.measureToolVertical = function () {
|
8001 |
var guide = $('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>')
|
8007 |
if (!guideVisible) {
|
8008 |
guideVisible = true;
|
8009 |
guide.css('display', '');
|
8010 |
+
N2Classes.PositionDisplay.get().show('Guide');
|
8011 |
}
|
8012 |
}, this),
|
8013 |
hideGuide = $.proxy(function () {
|
8014 |
if (guideVisible) {
|
8015 |
guideVisible = false;
|
8016 |
guide.css('display', 'none');
|
8017 |
+
N2Classes.PositionDisplay.get().hide('Guide');
|
8018 |
}
|
8019 |
}, this);
|
8020 |
this.vertical.on({
|
8032 |
if (lastY != e.pageY) {
|
8033 |
var pos = e.pageY - offset;
|
8034 |
guide.css('top', pos);
|
8035 |
+
N2Classes.PositionDisplay.get().update(e, 'Guide', (pos - 40) + 'px');
|
8036 |
lastY = e.pageY;
|
8037 |
}
|
8038 |
}
|
8043 |
hideGuide();
|
8044 |
}, this)
|
8045 |
});
|
8046 |
+
};
|
8047 |
|
8048 |
Ruler.prototype.measureToolHorizontal = function () {
|
8049 |
var guide = $('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>')
|
8055 |
if (!guideVisible) {
|
8056 |
guideVisible = true;
|
8057 |
guide.css('display', '');
|
8058 |
+
N2Classes.PositionDisplay.get().show('Guide');
|
8059 |
}
|
8060 |
}, this),
|
8061 |
hideGuide = $.proxy(function () {
|
8062 |
if (guideVisible) {
|
8063 |
guideVisible = false;
|
8064 |
guide.css('display', 'none');
|
8065 |
+
N2Classes.PositionDisplay.get().hide('Guide');
|
8066 |
}
|
8067 |
}, this);
|
8068 |
|
8081 |
if (lastX != e.pageX) {
|
8082 |
var pos = Math.max(e.pageX - offset, 40);
|
8083 |
guide.css('left', pos);
|
8084 |
+
N2Classes.PositionDisplay.get().update(e, 'Guide', (pos - 40) + 'px');
|
8085 |
lastX = e.pageX;
|
8086 |
}
|
8087 |
}
|
8092 |
hideGuide();
|
8093 |
}, this)
|
8094 |
});
|
8095 |
+
};
|
8096 |
|
8097 |
+
/**
|
8098 |
+
*
|
8099 |
+
* @param {Ruler} ruler
|
8100 |
+
* @param {jQuery} container
|
8101 |
+
* @param e
|
8102 |
+
* @constructor
|
8103 |
+
* @abstract
|
8104 |
+
*/
|
8105 |
function Guide(ruler, container, e) {
|
8106 |
this.ruler = ruler;
|
8107 |
this.container = container;
|
8112 |
.on('mousedown', $.proxy(function (e) {
|
8113 |
e.preventDefault();
|
8114 |
e.stopPropagation();
|
8115 |
+
if (!ruler.editor.fragmentEditor.canvasSettings.settings['n2-ss-lock-guides']) {
|
8116 |
this.delete();
|
8117 |
}
|
8118 |
}, this));
|
8122 |
if (e) {
|
8123 |
this.create(e);
|
8124 |
}
|
|
|
8125 |
}
|
8126 |
|
8127 |
Guide.prototype._position = function (position, e) {
|
8128 |
return Math.max(0, position);
|
8129 |
+
};
|
8130 |
|
8131 |
Guide.prototype.setPosition = function (position) {
|
8132 |
this.position = position;
|
8133 |
this.refresh();
|
8134 |
+
};
|
8135 |
|
8136 |
Guide.prototype.refresh = function () {
|
8137 |
this.positionRender(this.position);
|
8138 |
+
};
|
8139 |
|
8140 |
Guide.prototype.delete = function () {
|
8141 |
this.ruler.removeGuide(this);
|
8142 |
this.guide.remove();
|
8143 |
+
};
|
8144 |
|
8145 |
+
/**
|
8146 |
+
*
|
8147 |
+
* @constructor
|
8148 |
+
* @implements Guide
|
8149 |
+
*/
|
8150 |
function GuideHorizontal() {
|
8151 |
Guide.prototype.constructor.apply(this, arguments);
|
8152 |
}
|
8161 |
|
8162 |
this.position = this._position((e.pageX - offset), e);
|
8163 |
this.positionRender(this.position);
|
8164 |
+
};
|
8165 |
|
8166 |
GuideHorizontal.prototype.rawPositionRender = function (value) {
|
8167 |
this.guide.css('left', Math.max(0, value) + 40);
|
8168 |
+
};
|
8169 |
|
8170 |
GuideHorizontal.prototype.positionRender = function (value) {
|
8171 |
this.guide.css('left', Math.max(0, value) + 40);
|
8172 |
+
};
|
8173 |
|
8174 |
+
/**
|
8175 |
+
*
|
8176 |
+
* @constructor
|
8177 |
+
* @implements Guide
|
8178 |
+
*/
|
8179 |
function GuideVertical() {
|
8180 |
Guide.prototype.constructor.apply(this, arguments);
|
8181 |
}
|
8188 |
var offset = Math.round(this.container.offset().top) + 40;
|
8189 |
this.position = this._position((e.pageY - offset), e);
|
8190 |
this.positionRender(this.position);
|
8191 |
+
};
|
8192 |
|
8193 |
GuideVertical.prototype.rawPositionRender = function (value) {
|
8194 |
this.guide.css('top', Math.max(0, value) + 40);
|
8195 |
+
};
|
8196 |
|
8197 |
GuideVertical.prototype.positionRender = function (value) {
|
8198 |
this.guide.css('top', Math.max(0, value) + 40);
|
8199 |
+
};
|
8200 |
|
8201 |
return Ruler;
|
8202 |
});
|
8203 |
+
N2D('CanvasSettings', function ($, undefined) {
|
8204 |
"use strict";
|
|
|
8205 |
|
8206 |
+
/**
|
8207 |
+
* @memberOf N2Classes
|
8208 |
+
*
|
8209 |
+
* @param {FragmentEditor} fragmentEditor
|
8210 |
+
* @constructor
|
8211 |
+
*/
|
8212 |
+
function CanvasSettings(fragmentEditor) {
|
8213 |
+
|
8214 |
+
/**
|
8215 |
+
* @type {FragmentEditor}
|
8216 |
+
*/
|
8217 |
+
this.fragmentEditor = fragmentEditor;
|
8218 |
|
8219 |
+
this.settings = {};
|
8220 |
var $settings = $('#n2-ss-slide-canvas-settings')
|
8221 |
.on('mouseleave', $.proxy(function () {
|
8222 |
$settings.removeClass('n2-active');
|
8231 |
this.snapTo();
|
8232 |
this.roundTo();
|
8233 |
this.colorScheme();
|
8234 |
+
if (!this.fragmentEditor.editor.options.isAddSample) {
|
8235 |
+
this.startRuler();
|
8236 |
}
|
8237 |
}
|
8238 |
|
8239 |
CanvasSettings.prototype._addSettings = function (hash, title, _default, cb) {
|
8240 |
this.settings[hash] = parseInt($.jStorage.get(hash, _default));
|
8241 |
+
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) {
|
8242 |
e.preventDefault();
|
8243 |
this.settings[hash] = (this.settings[hash] == 1 ? 0 : 1);
|
8244 |
$.jStorage.set(hash, this.settings[hash]);
|
8248 |
|
8249 |
row.toggleClass('n2-setting-enabled', this.settings[hash] == 1);
|
8250 |
cb(this.settings[hash], true);
|
8251 |
+
};
|
8252 |
|
8253 |
CanvasSettings.prototype._addAction = function (title, cb) {
|
8254 |
+
$('<a href="#" class="n2-panel-action">' + title + '</a>').on('click', $.proxy(function (e) {
|
8255 |
e.preventDefault();
|
8256 |
cb();
|
8257 |
}, this)).appendTo(this.$settingsPanel);
|
8258 |
+
};
|
8259 |
|
8260 |
CanvasSettings.prototype.get = function (name) {
|
8261 |
return this.settings[name];
|
8262 |
+
};
|
8263 |
|
8264 |
CanvasSettings.prototype.snapTo = function () {
|
8265 |
|
8268 |
for (var i = 0; i < layers.length; i++) {
|
8269 |
layers[i].placement.doAction('snap');
|
8270 |
}
|
8271 |
+
}, this.fragmentEditor));
|
8272 |
};
|
8273 |
|
8274 |
CanvasSettings.prototype.roundTo = function () {
|
8291 |
};
|
8292 |
|
8293 |
|
8294 |
+
CanvasSettings.prototype.startRuler = function () {
|
8295 |
+
this.ruler = new N2Classes.Ruler(this.fragmentEditor.editor, $('#slideguides').val());
|
8296 |
|
8297 |
var editor = $('#n2-ss-slide-canvas-container');
|
8298 |
this._addSettings("n2-ss-ruler-enabled", n2_('Ruler'), 1, $.proxy(function (value) {
|
8302 |
|
8303 |
|
8304 |
this._addSettings("n2-ss-show-guides", n2_('Show Guides'), 1, $.proxy(function (value) {
|
8305 |
+
this.ruler.showGuides = value;
|
8306 |
editor.toggleClass('n2-ss-show-guides', value == 1);
|
8307 |
}, this));
|
8308 |
this._addSettings("n2-ss-lock-guides", n2_('Lock Guides'), 0, $.proxy(function (value) {
|
8310 |
}, this));
|
8311 |
|
8312 |
this._addAction('Clear Guides', $.proxy(function () {
|
8313 |
+
this.ruler.clearGuides();
|
8314 |
}, this))
|
8315 |
};
|
8316 |
|
8317 |
return CanvasSettings;
|
8318 |
});
|
8319 |
+
N2D('PlacementAbsolute', ['PlacementAbstract'], function ($, undefined) {
|
8320 |
"use strict";
|
8321 |
|
8322 |
var rAFShim = (function () {
|
8323 |
var timeLast = 0;
|
8324 |
|
8325 |
return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
|
8326 |
+
var timeCurrent = (new Date()).getTime(),
|
8327 |
+
timeDelta;
|
8328 |
|
8329 |
+
/* Dynamically set delay on a per-tick basis to match 60fps. */
|
8330 |
+
/* Technique by Erik Moller. MIT license: https://gist.github.com/paulirish/1579671 */
|
8331 |
+
timeDelta = Math.max(0, 16 - (timeCurrent - timeLast));
|
8332 |
+
timeLast = timeCurrent + timeDelta;
|
8333 |
|
8334 |
+
return setTimeout(function () {
|
8335 |
+
callback(timeCurrent + timeDelta);
|
8336 |
+
}, timeDelta);
|
8337 |
+
};
|
8338 |
})(),
|
8339 |
resizeCollection = {
|
8340 |
raf: false,
|
8362 |
};
|
8363 |
|
8364 |
/**
|
8365 |
+
* @memberOf N2Classes
|
8366 |
*
|
8367 |
* @param placement
|
8368 |
* @param layer
|
8369 |
+
* @param fragmentEditor
|
8370 |
* @constructor
|
8371 |
* @augments PlacementAbstract
|
|
|
8372 |
*/
|
8373 |
+
function PlacementAbsolute(placement, layer, fragmentEditor) {
|
8374 |
this.type = 'absolute';
|
8375 |
|
8376 |
this.transferredProperties = {};
|
8377 |
|
8378 |
+
N2Classes.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
8379 |
|
8380 |
this.doThrottledTheResize = this.doTheResize;
|
8381 |
this._triggerLayerResizedThrottled = NextendThrottle(this._triggerLayerResized, 30);
|
8385 |
this.children = [];
|
8386 |
}
|
8387 |
|
8388 |
+
PlacementAbsolute.prototype = Object.create(N2Classes.PlacementAbstract.prototype);
|
8389 |
PlacementAbsolute.prototype.constructor = PlacementAbsolute;
|
8390 |
|
8391 |
PlacementAbsolute.prototype.start = function () {
|
8392 |
this.$layer = this.layer.layer;
|
8393 |
this.$layerRow = this.layer.layerRow;
|
8394 |
+
};
|
8395 |
|
8396 |
PlacementAbsolute.prototype.preActivation = function (lastPlacement) {
|
8397 |
if (lastPlacement.type == 'normal') {
|
8400 |
this.transferredProperties.height = height;
|
8401 |
}
|
8402 |
}
|
8403 |
+
};
|
8404 |
|
8405 |
PlacementAbsolute.prototype.activated = function (properties) {
|
8406 |
var delayedActivate = false,
|
8417 |
} else {
|
8418 |
this._activated(properties);
|
8419 |
}
|
8420 |
+
};
|
8421 |
|
8422 |
PlacementAbsolute.prototype.activatedAfterParentReady = function (properties) {
|
8423 |
var parentid = this.$layer.data('parentid');
|
8439 |
} else {
|
8440 |
this._activated(properties);
|
8441 |
}
|
8442 |
+
};
|
8443 |
|
8444 |
PlacementAbsolute.prototype._activated = function (properties) {
|
8445 |
this.loadProperties($.extend(properties, this.transferredProperties));
|
8514 |
});
|
8515 |
|
8516 |
this.alignMarker.remove();
|
8517 |
+
this.$layer.nUIResizable('destroy');
|
8518 |
this.$layer.off('.n2-ss-absolute');
|
8519 |
|
8520 |
this.$layer.triggerHandler('LayerUnavailable');
|
8529 |
this.chainParent.remove();
|
8530 |
|
8531 |
return historicalData;
|
8532 |
+
};
|
8533 |
|
8534 |
PlacementAbsolute.prototype.loadProperties = function (options) {
|
8535 |
this.layer.createProperty('parentid', null, this.layer.layer, this);
|
8574 |
}
|
8575 |
}, this)
|
8576 |
}).appendTo(this.$layer);
|
8577 |
+
};
|
8578 |
|
8579 |
|
8580 |
PlacementAbsolute.prototype.triggerLayerResized = function (isThrottled, ratios) {
|
8588 |
PlacementAbsolute.prototype._triggerLayerResized = function (isThrottled, ratios) {
|
8589 |
if (!this.layer.isDeleted) {
|
8590 |
this.$layer.triggerHandler('LayerResized', [ratios || {
|
8591 |
+
slideW: this.fragmentEditor.getResponsiveRatioHorizontal(),
|
8592 |
+
slideH: this.fragmentEditor.getResponsiveRatioVertical()
|
8593 |
}, isThrottled || false]);
|
8594 |
}
|
8595 |
};
|
8607 |
*/
|
8608 |
PlacementAbsolute.prototype.___makeLayerResizeable = function () {
|
8609 |
this._resizableJustClick = false;
|
8610 |
+
this.$layer.nUIResizable({
|
8611 |
handles: 'n, e, s, w, ne, se, sw, nw',
|
8612 |
+
_containment: this.fragmentEditor.mainContainer.layer,
|
8613 |
start: $.proxy(this.____makeLayerResizeableStart, this),
|
8614 |
resize: $.proxy(this.____makeLayerResizeableResize, this),
|
8615 |
stop: $.proxy(this.____makeLayerResizeableStop, this),
|
8616 |
create: $.proxy(function () {
|
8617 |
+
this.$layer.find('.nui-resizable-handle, .n2-ss-layer-cc').on({
|
8618 |
mousedown: $.proxy(function (e) {
|
8619 |
this._resizableJustClick = [e.clientX, e.clientY];
|
8620 |
}, this),
|
8621 |
mouseup: $.proxy(function (e) {
|
8622 |
if (this._resizableJustClick && Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0] - e.clientX, 2) + Math.pow(this._resizableJustClick[1] - e.clientY, 2))) < 1) {
|
8623 |
var $target = $(e.currentTarget),
|
8624 |
+
layerFeatures = this.fragmentEditor.layerOptions.layerFeatures;
|
8625 |
+
if ($target.hasClass('nui-resizable-nw')) {
|
8626 |
layerFeatures.horizontalAlign('left', false);
|
8627 |
layerFeatures.verticalAlign('top', false);
|
8628 |
+
} else if ($target.hasClass('nui-resizable-w')) {
|
8629 |
layerFeatures.horizontalAlign('left', false);
|
8630 |
layerFeatures.verticalAlign('middle', false);
|
8631 |
+
} else if ($target.hasClass('nui-resizable-sw')) {
|
8632 |
layerFeatures.horizontalAlign('left', false);
|
8633 |
layerFeatures.verticalAlign('bottom', false);
|
8634 |
+
} else if ($target.hasClass('nui-resizable-n')) {
|
8635 |
layerFeatures.horizontalAlign('center', false);
|
8636 |
layerFeatures.verticalAlign('top', false);
|
8637 |
} else if ($target.hasClass('n2-ss-layer-cc')) {
|
8638 |
layerFeatures.horizontalAlign('center', false);
|
8639 |
layerFeatures.verticalAlign('middle', false);
|
8640 |
+
} else if ($target.hasClass('nui-resizable-s')) {
|
8641 |
layerFeatures.horizontalAlign('center', false);
|
8642 |
layerFeatures.verticalAlign('bottom', false);
|
8643 |
+
} else if ($target.hasClass('nui-resizable-ne')) {
|
8644 |
layerFeatures.horizontalAlign('right', false);
|
8645 |
layerFeatures.verticalAlign('top', false);
|
8646 |
+
} else if ($target.hasClass('nui-resizable-e')) {
|
8647 |
layerFeatures.horizontalAlign('right', false);
|
8648 |
layerFeatures.verticalAlign('middle', false);
|
8649 |
+
} else if ($target.hasClass('nui-resizable-se')) {
|
8650 |
layerFeatures.horizontalAlign('right', false);
|
8651 |
layerFeatures.verticalAlign('bottom', false);
|
8652 |
}
|
8657 |
}, this),
|
8658 |
smartguides: $.proxy(function () {
|
8659 |
this.$layer.triggerHandler('LayerParent');
|
8660 |
+
return this.fragmentEditor.getSnap();
|
8661 |
}, this),
|
8662 |
tolerance: 5
|
8663 |
})
|
8664 |
.on({
|
8665 |
'mousedown.n2-ss-absolute': $.proxy(function (e) {
|
8666 |
+
if (!this.layer.status != N2Classes.ComponentAbstract.STATUS.LOCKED) {
|
8667 |
+
N2Classes.PositionDisplay.get().show('Canvas');
|
8668 |
|
8669 |
+
N2Classes.PositionDisplay.get().update(e, 'Canvas', 'W: ' + parseInt(this.$layer.width()) + 'px<br />H: ' + parseInt(this.$layer.height()) + 'px');
|
8670 |
|
8671 |
}
|
8672 |
if (document.activeElement) {
|
8674 |
}
|
8675 |
}, this),
|
8676 |
'mouseup.n2-ss-absolute': $.proxy(function (e) {
|
8677 |
+
N2Classes.PositionDisplay.get().hide('Canvas');
|
8678 |
}, this)
|
8679 |
});
|
8680 |
};
|
8682 |
PlacementAbsolute.prototype.____makeLayerResizeableStart = function (event, ui) {
|
8683 |
this.preventActivation = true;
|
8684 |
this.resizableDeferred = $.Deferred();
|
8685 |
+
this.fragmentEditor.layerWindow.hideWithDeferred(this.resizableDeferred);
|
8686 |
$('body').addClass('n2-ss-resize-layer');
|
8687 |
if (this._resizableJustClick) {
|
8688 |
this._resizableJustClick = false;
|
8689 |
}
|
8690 |
this.____makeLayerResizeableResize(event, ui);
|
8691 |
+
N2Classes.PositionDisplay.get().show('Canvas');
|
8692 |
};
|
8693 |
|
8694 |
PlacementAbsolute.prototype.____makeLayerResizeableResize = function (e, ui) {
|
8695 |
|
8696 |
|
8697 |
+
N2Classes.PositionDisplay.get().update(e, 'Canvas', 'W: ' + ui.size.width + 'px<br />H: ' + ui.size.height + 'px');
|
8698 |
|
8699 |
this.triggerLayerResized();
|
8700 |
};
|
8721 |
}
|
8722 |
}
|
8723 |
|
8724 |
+
var ratioSizeH = this.fragmentEditor.getResponsiveRatioHorizontal(),
|
8725 |
+
ratioSizeV = this.fragmentEditor.getResponsiveRatioVertical();
|
8726 |
|
8727 |
if (!parseInt(this.layer.getProperty('responsivesize'))) {
|
8728 |
ratioSizeH = ratioSizeV = 1;
|
8742 |
|
8743 |
this.$layer.triggerHandler('LayerUnParent');
|
8744 |
|
8745 |
+
N2Classes.PositionDisplay.get().hide('Canvas');
|
8746 |
|
8747 |
setTimeout($.proxy(function () {
|
8748 |
this.preventActivation = false;
|
8749 |
}, this), 80);
|
8750 |
|
8751 |
+
//this.fragmentEditor.panel.positionMenu(this.$layer);
|
8752 |
};
|
8753 |
//</editor-fold>
|
8754 |
|
8781 |
height = this.layer.getProperty('height');
|
8782 |
}
|
8783 |
|
8784 |
+
var task = N2Classes.History.get().addValue(this.layer, this.layer.historyStoreOnPlacement, ['historyStorePosition', mode]);
|
8785 |
if (task) {
|
8786 |
task.setValues({
|
8787 |
align: this.layer.getRawProperty('align'),
|
8800 |
});
|
8801 |
}
|
8802 |
|
8803 |
+
N2Classes.History.get().off();
|
8804 |
|
8805 |
this.layer.store('width', width, true, 'layer');
|
8806 |
this.layer.$.trigger('propertyChanged', ['width', width]);
|
8820 |
this.layer.store('top', top, true, 'layer');
|
8821 |
this.layer.$.trigger('propertyChanged', ['top', top]);
|
8822 |
|
8823 |
+
N2Classes.History.get().on();
|
8824 |
|
8825 |
};
|
8826 |
|
8836 |
this.layer.historyStore(values.top, 'top', mode);
|
8837 |
|
8838 |
this.triggerLayerResized();
|
8839 |
+
};
|
8840 |
|
8841 |
PlacementAbsolute.prototype.calculatePositionLeft = function (align, left) {
|
8842 |
+
var ratioH = this.fragmentEditor.getResponsiveRatioHorizontal();
|
8843 |
|
8844 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8845 |
ratioH = 1;
|
8883 |
left = -Math.round((p.left - left) * (1 / ratioH));
|
8884 |
break;
|
8885 |
case 'center':
|
8886 |
+
left = -Math.round((p.left - left - this.$layer.width() / 2) * (1 / ratioH));
|
8887 |
break;
|
8888 |
case 'right':
|
8889 |
left = -Math.round((p.left - left - this.$layer.width()) * (1 / ratioH));
|
8891 |
}
|
8892 |
|
8893 |
return left;
|
8894 |
+
};
|
8895 |
|
8896 |
|
8897 |
PlacementAbsolute.prototype.calculatePositionTop = function (valign, top) {
|
8898 |
+
var ratioV = this.fragmentEditor.getResponsiveRatioVertical();
|
8899 |
|
8900 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
8901 |
ratioV = 1;
|
8947 |
}
|
8948 |
|
8949 |
return top;
|
8950 |
+
};
|
8951 |
|
8952 |
PlacementAbsolute.prototype.moveX = function (x) {
|
8953 |
|
8966 |
this.layer.store('left', left, true);
|
8967 |
this.layer.$.trigger('propertyChanged', ['left', left]);
|
8968 |
|
8969 |
+
};
|
8970 |
|
8971 |
PlacementAbsolute.prototype.setPositionTop = function (top) {
|
8972 |
|
8974 |
|
8975 |
this.layer.store('top', top, true);
|
8976 |
this.layer.$.trigger('propertyChanged', ['top', top]);
|
8977 |
+
};
|
8978 |
|
8979 |
PlacementAbsolute.prototype.setPosition = function (left, top) {
|
8980 |
this.setPositionLeft(left);
|
8981 |
this.setPositionTop(top);
|
8982 |
+
};
|
8983 |
|
8984 |
PlacementAbsolute.prototype.setDeviceBasedAlign = function () {
|
8985 |
var mode = this.layer.getMode();
|
8996 |
PlacementAbsolute.prototype.setPropertyresponsiveposition =
|
8997 |
PlacementAbsolute.prototype.setPropertyresponsivesize = function (name, value, from) {
|
8998 |
this.layer._setProperty(name, parseInt(value), from);
|
8999 |
+
};
|
9000 |
|
9001 |
|
9002 |
PlacementAbsolute.prototype.setPropertywidth =
|
9013 |
}, this), 50);
|
9014 |
|
9015 |
this.layer._setProperty(name, v, from);
|
9016 |
+
};
|
9017 |
|
9018 |
PlacementAbsolute.prototype.setPropertyleft =
|
9019 |
PlacementAbsolute.prototype.setPropertytop = function (name, value, from) {
|
9022 |
this.layer.$.trigger('propertyChanged', [name, v]);
|
9023 |
}
|
9024 |
this.layer._setProperty(name, v, from);
|
9025 |
+
};
|
9026 |
|
9027 |
PlacementAbsolute.prototype.render = function (name) {
|
9028 |
this['_sync' + name]();
|
9042 |
|
9043 |
PlacementAbsolute.prototype.onResize = function (isForced) {
|
9044 |
this.resize({
|
9045 |
+
slideW: this.fragmentEditor.getResponsiveRatioHorizontal(),
|
9046 |
+
slideH: this.fragmentEditor.getResponsiveRatioVertical()
|
9047 |
}, isForced);
|
9048 |
};
|
9049 |
|
9079 |
|
9080 |
if (!this.layer.isDimensionPropertyAccepted(value)) {
|
9081 |
if (parseInt(this.layer.getProperty('responsivesize'))) {
|
9082 |
+
var ratio = this.fragmentEditor.getResponsiveRatioHorizontal();
|
9083 |
value = (value * ratio);
|
9084 |
}
|
9085 |
value += 'px';
|
9092 |
var value = this.layer.getProperty('height');
|
9093 |
if (!this.layer.isDimensionPropertyAccepted(value)) {
|
9094 |
if (parseInt(this.layer.getProperty('responsivesize'))) {
|
9095 |
+
var ratio = this.fragmentEditor.getResponsiveRatioVertical();
|
9096 |
value = (value * ratio);
|
9097 |
}
|
9098 |
value += 'px';
|
9124 |
var value = this.layer.getProperty('left');
|
9125 |
|
9126 |
if (parseInt(this.layer.getProperty('responsiveposition'))) {
|
9127 |
+
var ratio = this.fragmentEditor.getResponsiveRatioHorizontal();
|
9128 |
value = (value * ratio);
|
9129 |
}
|
9130 |
|
9193 |
var value = this.layer.getProperty('top');
|
9194 |
|
9195 |
if (parseInt(this.layer.getProperty('responsiveposition'))) {
|
9196 |
+
var ratio = this.fragmentEditor.getResponsiveRatioVertical();
|
9197 |
value = (value * ratio);
|
9198 |
}
|
9199 |
|
9274 |
this.layer.render(prop, null, 'history');
|
9275 |
this.layer.render(prop2, null, 'history');
|
9276 |
}
|
9277 |
+
};
|
9278 |
|
9279 |
PlacementAbsolute.prototype.setPropertyalign = function (name, value, from) {
|
9280 |
var oldValue = this.layer.getProperty(name),
|
9281 |
oldLeft = this.layer.getRawProperty('left');
|
9282 |
|
9283 |
+
N2Classes.History.get().off();
|
9284 |
this.layer._setProperty(name, value, from);
|
9285 |
+
N2Classes.History.get().on();
|
9286 |
|
9287 |
+
var task = N2Classes.History.get().addValue(this.layer, this.layer.historyStoreOnPlacement, ['historyStoreDoubleProp', this.layer.getMode(), 'align', 'left']);
|
9288 |
if (task) {
|
9289 |
task.setValues({
|
9290 |
value: oldValue,
|
9294 |
value2: this.layer.getRawProperty('left')
|
9295 |
});
|
9296 |
}
|
9297 |
+
};
|
9298 |
|
9299 |
PlacementAbsolute.prototype.setPropertyvalign = function (name, value, from) {
|
9300 |
var oldValue = this.layer.getProperty(name),
|
9301 |
oldTop = this.layer.getRawProperty('top');
|
9302 |
|
9303 |
+
N2Classes.History.get().off();
|
9304 |
this.layer._setProperty(name, value, from);
|
9305 |
+
N2Classes.History.get().on();
|
9306 |
|
9307 |
+
var task = N2Classes.History.get().addValue(this.layer, this.layer.historyStoreOnPlacement, ['historyStoreDoubleProp', this.layer.getMode(), 'valign', 'top']);
|
9308 |
if (task) {
|
9309 |
task.setValues({
|
9310 |
value: oldValue,
|
9314 |
value2: this.layer.getRawProperty('top')
|
9315 |
});
|
9316 |
}
|
9317 |
+
};
|
9318 |
|
9319 |
PlacementAbsolute.prototype._syncalign = function (oldValue, from) {
|
9320 |
var value = this.layer.getProperty('align');
|
9348 |
this.layer.setProperty('height', 'auto', 'layer');
|
9349 |
|
9350 |
var layerWidth = this.$layer.width();
|
9351 |
+
if (Math.abs(this.fragmentEditor.mainContainer.layer.width() - this.$layer.position().left - layerWidth) < 2) {
|
9352 |
this.layer.setProperty('width', layerWidth, 'layer');
|
9353 |
}
|
9354 |
}
|
9366 |
|
9367 |
PlacementAbsolute.prototype.changeStatus = function (oldStatus, newStatus) {
|
9368 |
|
9369 |
+
if (oldStatus == N2Classes.ComponentAbstract.STATUS.LOCKED) {
|
9370 |
+
this.layer.nUIResizable("enable");
|
9371 |
}
|
9372 |
|
9373 |
|
9374 |
+
if (newStatus == N2Classes.ComponentAbstract.STATUS.LOCKED) {
|
9375 |
+
this.$layer.nUIResizable("disable");
|
9376 |
}
|
9377 |
+
};
|
9378 |
|
9379 |
PlacementAbsolute.prototype.getParent = function () {
|
9380 |
return $('#' + this.layer.getProperty('parentid')).data('layerObject');
|
9448 |
|
9449 |
PlacementAbsolute.prototype.addChild = function (childPlacement) {
|
9450 |
this.children.push(childPlacement);
|
9451 |
+
};
|
9452 |
|
9453 |
PlacementAbsolute.prototype.removeChild = function (childPlacement) {
|
9454 |
this.children.splice($.inArray(childPlacement, this.children), 1);
|
9455 |
+
};
|
9456 |
|
9457 |
PlacementAbsolute.prototype.unlink = function (e) {
|
9458 |
if (e) e.preventDefault();
|
9501 |
PlacementAbsolute.prototype.snap = function () {
|
9502 |
this.$layer.nextendResizable("option", "smartguides", $.proxy(function () {
|
9503 |
this.$layer.triggerHandler('LayerParent');
|
9504 |
+
return this.fragmentEditor.getSnap();
|
9505 |
}, this));
|
9506 |
};
|
9507 |
|
9545 |
} else {
|
9546 |
left = this.$layer.parent().width() / 2;
|
9547 |
}
|
9548 |
+
var ratio = this.fragmentEditor.getResponsiveRatioHorizontal();
|
9549 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
9550 |
ratio = 1;
|
9551 |
}
|
9559 |
} else {
|
9560 |
top = this.$layer.parent().height() / 2;
|
9561 |
}
|
9562 |
+
var ratio = this.fragmentEditor.getResponsiveRatioVertical();
|
9563 |
if (!parseInt(this.layer.getProperty('responsiveposition'))) {
|
9564 |
ratio = 1;
|
9565 |
}
|
9574 |
index = 0;
|
9575 |
}
|
9576 |
return index;
|
9577 |
+
};
|
9578 |
|
9579 |
PlacementAbsolute.prototype.renderIndex = function (index) {
|
9580 |
//this.layer.layer.css('zIndex', index + 1);
|
9581 |
+
};
|
9582 |
|
9583 |
PlacementAbsolute.prototype.sync = function () {
|
9584 |
|
9592 |
|
9593 |
this._syncparentid();
|
9594 |
|
9595 |
+
};
|
9596 |
|
9597 |
PlacementAbsolute.prototype.delete = function () {
|
9598 |
|
9600 |
if (parentId) {
|
9601 |
this.unSubscribeParent('delete');
|
9602 |
}
|
9603 |
+
};
|
9604 |
|
9605 |
PlacementAbsolute.prototype.isParentOrChild = function () {
|
9606 |
return this.parent || this.children.length > 0;
|
9607 |
+
};
|
9608 |
|
9609 |
return PlacementAbsolute;
|
9610 |
});
|
9611 |
+
N2D('PlacementContent', ['PlacementAbstract'], function ($, undefined) {
|
9612 |
"use strict";
|
9613 |
|
9614 |
/**
|
9615 |
+
* @memberOf N2Classes
|
9616 |
*
|
|
|
9617 |
* @param placement
|
9618 |
* @param layer
|
9619 |
+
* @param fragmentEditor
|
9620 |
* @constructor
|
9621 |
*/
|
9622 |
+
function PlacementContent(placement, layer, fragmentEditor) {
|
9623 |
this.type = 'content';
|
9624 |
|
9625 |
+
N2Classes.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
9626 |
}
|
9627 |
|
9628 |
+
PlacementContent.prototype = Object.create(N2Classes.PlacementAbstract.prototype);
|
9629 |
PlacementContent.prototype.constructor = PlacementContent;
|
9630 |
|
9631 |
return PlacementContent;
|
9632 |
});
|
9633 |
+
N2D('PlacementDefault', ['PlacementAbstract'], function ($, undefined) {
|
9634 |
"use strict";
|
9635 |
|
9636 |
/**
|
9637 |
+
* @memberOf N2Classes
|
9638 |
*
|
|
|
9639 |
* @param placement
|
9640 |
* @param layer
|
9641 |
+
* @param fragmentEditor
|
9642 |
* @constructor
|
9643 |
*/
|
9644 |
+
function PlacementDefault(placement, layer, fragmentEditor) {
|
9645 |
this.type = 'default';
|
9646 |
|
9647 |
+
N2Classes.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
9648 |
}
|
9649 |
|
9650 |
+
PlacementDefault.prototype = Object.create(N2Classes.PlacementAbstract.prototype);
|
9651 |
PlacementDefault.prototype.constructor = PlacementDefault;
|
9652 |
|
9653 |
PlacementDefault.prototype.start = function () {
|
9654 |
this.$layer = this.layer.layer;
|
9655 |
+
};
|
9656 |
|
9657 |
|
9658 |
PlacementDefault.prototype.activated = function (properties) {
|
9659 |
|
9660 |
this.startUISizing();
|
9661 |
+
};
|
9662 |
|
9663 |
PlacementDefault.prototype.deActivated = function (newMode) {
|
9664 |
+
this.$layer.nUINormalSizing('destroy');
|
9665 |
+
};
|
9666 |
|
9667 |
PlacementDefault.prototype.startUISizing = function () {
|
9668 |
var needSize = false;
|
9669 |
if (this.layer.item && this.layer.item.needSize) {
|
9670 |
needSize = true;
|
9671 |
}
|
9672 |
+
this.$layer.nUINormalSizing({
|
9673 |
start: $.proxy(function (e, prop) {
|
9674 |
+
N2Classes.PositionDisplay.get().show('NormalSizing');
|
9675 |
+
if (prop === 'maxwidth') {
|
9676 |
+
this.layer.layer.attr('data-has-maxwidth', '1');
|
9677 |
}
|
9678 |
}, this),
|
9679 |
resizeMaxWidth: $.proxy(function (e, ui) {
|
9680 |
|
9681 |
+
N2Classes.PositionDisplay.get().update(e, 'NormalSizing', 'Max-width: ' + (ui.value == 0 ? 'none' : (ui.value + 'px')));
|
9682 |
|
9683 |
}, this),
|
9684 |
stopMaxWidth: $.proxy(function (e, ui) {
|
9685 |
+
N2Classes.PositionDisplay.get().hide('NormalSizing');
|
9686 |
this.layer.setProperty('maxwidth', ui.value);
|
9687 |
}, this)
|
9688 |
});
|
9689 |
+
};
|
9690 |
|
9691 |
return PlacementDefault;
|
9692 |
});
|
9693 |
+
N2D('PlacementNormal', ['PlacementAbstract'], function ($, undefined) {
|
9694 |
"use strict";
|
9695 |
|
9696 |
/**
|
9697 |
+
* @memberOf N2Classes
|
9698 |
*
|
9699 |
* @param placement
|
9700 |
* @param layer
|
9701 |
+
* @param fragmentEditor
|
9702 |
* @constructor
|
9703 |
* @augments PlacementAbstract
|
9704 |
+
|
9705 |
*/
|
9706 |
+
function PlacementNormal(placement, layer, fragmentEditor) {
|
9707 |
this.type = 'normal';
|
9708 |
|
9709 |
this.transferredProperties = {};
|
9710 |
|
9711 |
+
N2Classes.PlacementAbstract.prototype.constructor.apply(this, arguments);
|
9712 |
}
|
9713 |
|
9714 |
+
PlacementNormal.prototype = Object.create(N2Classes.PlacementAbstract.prototype);
|
9715 |
PlacementNormal.prototype.constructor = PlacementNormal;
|
9716 |
|
9717 |
PlacementNormal.prototype.start = function () {
|
9765 |
];
|
9766 |
|
9767 |
$layer
|
9768 |
+
.attr('data-has-maxwidth', '0')
|
9769 |
.removeAttr('data-cssselfalign')
|
9770 |
.css({
|
9771 |
position: '',
|
9794 |
|
9795 |
PlacementNormal.prototype.deActivated = function (newMode) {
|
9796 |
this.layer.$.off('.placementnormal');
|
9797 |
+
this.$layer.nUISpacing('destroy');
|
9798 |
+
this.$layer.nUINormalSizing('destroy');
|
9799 |
|
9800 |
+
this.layer.layer.attr('data-has-maxwidth', '0');
|
9801 |
this.layer.layer.removeAttr('data-cssselfalign');
|
9802 |
|
9803 |
var properties = ['margin', 'height', 'maxwidth', 'selfalign'],
|
9838 |
this.layer.layer.css('margin', margin);
|
9839 |
this.layer.update();
|
9840 |
|
9841 |
+
this.$layer.nUISpacing('option', 'current', margin);
|
9842 |
};
|
9843 |
|
9844 |
PlacementNormal.prototype.startUISpacing = function () {
|
9845 |
+
this.$layer.nUISpacing({
|
9846 |
mode: 'margin',
|
9847 |
sync: {
|
9848 |
n: 'margin-top',
|
9852 |
},
|
9853 |
handles: 'n, s, e, w',
|
9854 |
start: $.proxy(function (e, ui) {
|
9855 |
+
N2Classes.PositionDisplay.get().show('Spacing');
|
9856 |
}, this),
|
9857 |
spacing: $.proxy(function (e, ui) {
|
9858 |
var html = '';
|
9860 |
html += 'Margin ' + k + ': ' + ui.changed[k] + 'px<br>';
|
9861 |
}
|
9862 |
|
9863 |
+
N2Classes.PositionDisplay.get().update(e, 'Spacing', html);
|
9864 |
}, this),
|
9865 |
stop: $.proxy(this.onSpacingStop, this),
|
9866 |
});
|
9867 |
};
|
9868 |
|
9869 |
PlacementNormal.prototype.onSpacingStop = function (event, ui) {
|
9870 |
+
N2Classes.PositionDisplay.get().hide('Spacing');
|
9871 |
var margin = this.layer.getProperty('margin').split('|*|'),
|
9872 |
ratioH = 1,
|
9873 |
ratioV = 1;
|
9874 |
if (margin[margin.length - 1] == 'px+' && Math.abs(parseFloat(this.$layer.css('fontSize')) - this.layer.baseSize) > 1) {
|
9875 |
+
ratioH = this.fragmentEditor.getResponsiveRatioHorizontal();
|
9876 |
+
ratioV = this.fragmentEditor.getResponsiveRatioVertical();
|
9877 |
}
|
9878 |
|
9879 |
for (var k in ui.changed) {
|
9902 |
if (this.layer.item && this.layer.item.needSize) {
|
9903 |
needSize = true;
|
9904 |
}
|
9905 |
+
this.$layer.nUINormalSizing({
|
9906 |
height: needSize,
|
9907 |
syncWidth: true,
|
9908 |
start: $.proxy(function (e, prop) {
|
9909 |
+
N2Classes.PositionDisplay.get().show('NormalSizing');
|
9910 |
+
if (prop === 'maxwidth') {
|
9911 |
+
this.layer.layer.attr('data-has-maxwidth', '1');
|
9912 |
}
|
9913 |
}, this),
|
9914 |
resizeMaxWidth: $.proxy(function (e, ui) {
|
9915 |
+
N2Classes.PositionDisplay.get().update(e, 'NormalSizing', 'Max-width: ' + (ui.value == 0 ? 'none' : (ui.value + 'px')));
|
9916 |
|
9917 |
}, this),
|
9918 |
stopMaxWidth: $.proxy(function (e, ui) {
|
9919 |
+
N2Classes.PositionDisplay.get().hide('NormalSizing');
|
9920 |
this.layer.setProperty('maxwidth', ui.value);
|
9921 |
}, this),
|
9922 |
resizeHeight: $.proxy(function (e, ui) {
|
9923 |
+
N2Classes.PositionDisplay.get().update(e, 'NormalSizing', 'Height: ' + ui.value + 'px');
|
9924 |
|
9925 |
}, this),
|
9926 |
stopHeight: $.proxy(function (e, ui) {
|
9927 |
+
N2Classes.PositionDisplay.get().hide('NormalSizing');
|
9928 |
var ratio = 1;
|
9929 |
if (parseInt(this.$layer.css('fontSize')) != this.layer.baseSize) {
|
9930 |
+
ratio = this.fragmentEditor.getResponsiveRatioHorizontal();
|
9931 |
}
|
9932 |
var value = Math.round(value / ratio);
|
9933 |
|
9934 |
this.layer.setProperty('height', ui.value);
|
9935 |
}, this)
|
9936 |
});
|
9937 |
+
};
|
9938 |
|
9939 |
PlacementNormal.prototype._syncheight = function () {
|
9940 |
var height = parseInt(this.layer.getProperty('height'));
|
9960 |
var value = parseInt(this.layer.getProperty('maxwidth'));
|
9961 |
if (value <= 0 || isNaN(value)) {
|
9962 |
this.layer.layer.css('maxWidth', '')
|
9963 |
+
.attr('data-has-maxwidth', '0');
|
9964 |
} else {
|
9965 |
this.layer.layer.css('maxWidth', value + 'px')
|
9966 |
+
.attr('data-has-maxwidth', '1');
|
9967 |
}
|
9968 |
|
9969 |
this.layer.update();
|
9971 |
|
9972 |
PlacementNormal.prototype._syncselfalign = function () {
|
9973 |
this.layer.layer.attr('data-cssselfalign', this.layer.getProperty('selfalign'));
|
9974 |
+
};
|
9975 |
|
9976 |
PlacementNormal.prototype.sync = function () {
|
9977 |
this._syncmargin();
|
9978 |
this._syncheight();
|
9979 |
this._syncmaxwidth();
|
9980 |
+
};
|
9981 |
|
9982 |
return PlacementNormal;
|
9983 |
});
|
9984 |
+
N2D('Placement', function ($, undefined) {
|
9985 |
"use strict";
|
9986 |
|
9987 |
/**
|
9988 |
+
* @memberOf N2Classes
|
9989 |
+
*
|
9990 |
* @param layer
|
9991 |
* @constructor
|
9992 |
*/
|
9993 |
function Placement(layer) {
|
9994 |
this.layer = layer;
|
9995 |
+
this.fragmentEditor = layer.fragmentEditor;
|
9996 |
this.modes = {};
|
9997 |
this.current = null;
|
9998 |
this.isTransferHandled = false;
|
10003 |
Placement.prototype.allow = function (mode) {
|
10004 |
switch (mode) {
|
10005 |
case 'absolute':
|
10006 |
+
this.modes.absolute = new N2Classes.PlacementAbsolute(this, this.layer, this.fragmentEditor);
|
10007 |
break;
|
10008 |
case 'normal':
|
10009 |
+
this.modes.normal = new N2Classes.PlacementNormal(this, this.layer, this.fragmentEditor);
|
10010 |
break;
|
10011 |
case 'group':
|
10012 |
+
this.modes.absolute = new N2Classes.PlacementGroup(this, this.layer, this.fragmentEditor);
|
10013 |
break;
|
10014 |
case 'content':
|
10015 |
+
this.modes.absolute = new N2Classes.PlacementContent(this, this.layer, this.fragmentEditor);
|
10016 |
break;
|
10017 |
case 'default':
|
10018 |
+
this.modes['default'] = new N2Classes.PlacementDefault(this, this.layer, this.fragmentEditor);
|
10019 |
break;
|
10020 |
}
|
10021 |
+
};
|
10022 |
|
10023 |
Placement.prototype.start = function () {
|
10024 |
for (var k in this.modes) {
|
10025 |
this.modes[k].start();
|
10026 |
}
|
10027 |
+
};
|
10028 |
|
10029 |
Placement.prototype.setMode = function (mode, properties) {
|
10030 |
var historicalData = false;
|
10049 |
throw new Exception('Layer placement(' + mode + ') not allowed for the container', this.layer);
|
10050 |
}
|
10051 |
return historicalData;
|
10052 |
+
};
|
10053 |
|
10054 |
Placement.prototype.doAction = function (action) {
|
10055 |
try {
|
10057 |
} catch (e) {
|
10058 |
|
10059 |
}
|
10060 |
+
};
|
10061 |
|
10062 |
Placement.prototype.getType = function () {
|
10063 |
return this.current.type;
|
10064 |
+
};
|
10065 |
|
10066 |
Placement.prototype.onResize = function (isForced) {
|
10067 |
if (typeof this.current.onResize == 'function') {
|
10068 |
this.current.onResize(isForced);
|
10069 |
}
|
10070 |
+
};
|
10071 |
|
10072 |
Placement.prototype.updatePosition = function () {
|
10073 |
this.current.updatePosition();
|
10074 |
+
};
|
10075 |
|
10076 |
Placement.prototype.getIndex = function () {
|
10077 |
return this.current.getIndex();
|
10078 |
+
};
|
10079 |
|
10080 |
Placement.prototype.renderIndex = function (index) {
|
10081 |
return this.current.renderIndex(index);
|
10082 |
+
};
|
10083 |
|
10084 |
Placement.prototype.doLinearResize = function (ratios) {
|
10085 |
this.current.doLinearResize(ratios);
|
10086 |
+
};
|
10087 |
|
10088 |
Placement.prototype.sync = function () {
|
10089 |
this.current.sync();
|
10090 |
+
};
|
10091 |
|
10092 |
Placement.prototype.renderModeProperties = function (isReset) {
|
10093 |
|
10095 |
this.layer.adjustFontSize(this.layer.getProperty('adaptivefont'), fontSize, false);
|
10096 |
|
10097 |
this.current._renderModeProperties(isReset);
|
10098 |
+
};
|
10099 |
|
10100 |
Placement.prototype.delete = function () {
|
10101 |
this.current.delete();
|
10102 |
+
};
|
10103 |
|
10104 |
return Placement;
|
10105 |
});
|
10106 |
+
N2D('PlacementAbstract', ['Placement'], function ($, undefined) {
|
10107 |
"use strict";
|
10108 |
|
10109 |
/**
|
10110 |
+
* @memberOf N2Classes
|
10111 |
+
*
|
10112 |
* @param placement
|
10113 |
* @param {ComponentAbstract} layer
|
10114 |
+
* @param fragmentEditor
|
10115 |
* @constructor
|
10116 |
*/
|
10117 |
+
function PlacementAbstract(placement, layer, fragmentEditor) {
|
10118 |
this.placement = placement;
|
10119 |
/**
|
10120 |
* @type {ComponentAbstract}
|
10121 |
*/
|
10122 |
this.layer = layer;
|
10123 |
+
this.fragmentEditor = fragmentEditor;
|
10124 |
}
|
10125 |
|
10126 |
PlacementAbstract.prototype.start = function () {
|
10127 |
|
10128 |
+
};
|
10129 |
|
10130 |
PlacementAbstract.prototype.preActivation = function (lastPlacement) {
|
10131 |
|
10132 |
+
};
|
10133 |
|
10134 |
PlacementAbstract.prototype.activated = function () {
|
10135 |
|
10136 |
+
};
|
10137 |
|
10138 |
PlacementAbstract.prototype.deActivated = function (newMode) {
|
10139 |
|
10140 |
return false;
|
10141 |
+
};
|
10142 |
|
10143 |
PlacementAbstract.prototype.updatePosition = function () {
|
10144 |
this.layer.group.update();
|
10145 |
+
};
|
10146 |
|
10147 |
PlacementAbstract.prototype._renderModeProperties = function (isReset) {
|
10148 |
|
10149 |
+
};
|
10150 |
|
10151 |
PlacementAbstract.prototype._hide = function () {
|
10152 |
};
|
10153 |
|
10154 |
PlacementAbstract.prototype._show = function () {
|
10155 |
+
};
|
10156 |
|
10157 |
PlacementAbstract.prototype.snap = function () {
|
10158 |
return false;
|
10159 |
+
};
|
10160 |
|
10161 |
PlacementAbstract.prototype.getIndex = function () {
|
10162 |
return this.layer.layer.index();
|
10163 |
+
};
|
10164 |
|
10165 |
PlacementAbstract.prototype.renderIndex = function (index) {
|
10166 |
|
10167 |
+
};
|
10168 |
|
10169 |
PlacementAbstract.prototype.doLinearResize = function (ratios) {
|
10170 |
};
|
10171 |
|
10172 |
PlacementAbstract.prototype.sync = function () {
|
10173 |
|
10174 |
+
};
|
10175 |
|
10176 |
PlacementAbstract.prototype.delete = function () {
|
10177 |
+
};
|
10178 |
|
10179 |
|
10180 |
PlacementAbstract.prototype.triggerLayerResized = function (isThrottled, ratios) {
|
10181 |
|
10182 |
+
};
|
10183 |
|
10184 |
PlacementAbstract.prototype.changeStatus = function (oldStatus, newStatus) {
|
10185 |
|
10186 |
+
};
|
10187 |
|
10188 |
return PlacementAbstract;
|
10189 |
});
|
10190 |
+
N2D('Item', function ($, undefined) {
|
10191 |
"use strict";
|
10192 |
|
10193 |
/**
|
10194 |
+
* @memberOf N2Classes
|
10195 |
+
*
|
10196 |
* @constructor
|
|
|
10197 |
*/
|
10198 |
function Item($item, layer, itemEditor) {
|
|
|
10199 |
if (this.type === undefined) {
|
10200 |
this.type = $item.data('item');
|
10201 |
}
|
10202 |
|
10203 |
this.needSize = this.constructor.needSize;
|
10204 |
|
10205 |
+
this.fragmentEditor = itemEditor.fragmentEditor;
|
10206 |
+
/**
|
10207 |
+
* @type {Generator}
|
10208 |
+
*/
|
10209 |
+
this.generator = this.fragmentEditor.editor.generator;
|
10210 |
+
|
10211 |
this.self = this;
|
10212 |
this.$item = $item;
|
10213 |
this.layer = layer;
|
10223 |
this.values = $.parseJSON(this.values);
|
10224 |
}
|
10225 |
|
10226 |
+
this.pre = 'div#' + this.fragmentEditor.editor.frontend.elementID + ' ';
|
10227 |
this.defaultValues = itemEditor.getItemForm(this.type).values;
|
10228 |
|
10229 |
this.added();
|
10241 |
|
10242 |
|
10243 |
$('<div/>')
|
10244 |
+
.addClass('n2-ss-item-overlay')
|
10245 |
.css('zIndex', 89)
|
10246 |
.appendTo(this.$item);
|
10247 |
|
10294 |
|
10295 |
Item.prototype.render = function (data, originalData) {
|
10296 |
this.layer.layer.triggerHandler('itemRender');
|
10297 |
+
this.$item.html('');
|
10298 |
|
10299 |
this.parseAll(data);
|
10300 |
this._render(data);
|
10303 |
this.itemEditor.lastValues[this.type] = this.values = originalData;
|
10304 |
|
10305 |
$('<div/>')
|
10306 |
+
.addClass('n2-ss-item-overlay')
|
10307 |
.css('zIndex', 89)
|
10308 |
.appendTo(this.$item);
|
10309 |
|
10345 |
var item = '';
|
10346 |
if (base64) {
|
10347 |
|
10348 |
+
item = '[' + this.type + ' values="' + N2Classes.Base64.encode(JSON.stringify(this.values)) + '"]';
|
10349 |
} else {
|
10350 |
item = $('<div class="n2-ss-item n2-ss-item-' + this.type + '"></div>')
|
10351 |
.attr('data-item', this.type)
|
10420 |
|
10421 |
for (var i = 0; i < this.needFill.length; i++) {
|
10422 |
if (typeof data[this.needFill[i]] !== 'undefined') {
|
10423 |
+
data[this.needFill[i]] = this.generator.fill(data[this.needFill[i]] + '');
|
10424 |
}
|
10425 |
}
|
10426 |
};
|
10430 |
};
|
10431 |
|
10432 |
Item.prototype.resizeLayerToImage = function (image) {
|
10433 |
+
var layer = this.layer,
|
10434 |
+
$image = $("<img/>")
|
10435 |
+
.attr("src", image)
|
10436 |
+
.on('load', $.proxy(function () {
|
10437 |
+
var width = $image[0].width,
|
10438 |
+
height = $image[0].height;
|
10439 |
+
|
10440 |
+
if (width > 0 && height > 0) {
|
10441 |
+
var $containerElement = this.fragmentEditor.editor.getMainContainerElement(),
|
10442 |
+
maxWidth = $containerElement.width(),
|
10443 |
+
maxHeight = $containerElement.height();
|
10444 |
+
|
10445 |
+
if (width > maxWidth) {
|
10446 |
+
height = height * maxWidth / width;
|
10447 |
+
width = maxWidth;
|
10448 |
+
}
|
10449 |
+
if (height > maxHeight) {
|
10450 |
+
width = width * maxHeight / height;
|
10451 |
+
//height = maxHeight;
|
10452 |
+
}
|
10453 |
+
N2Classes.History.get().off();
|
10454 |
+
layer.setProperty('width', width);
|
10455 |
+
layer.setProperty('height', 'auto');
|
10456 |
+
N2Classes.History.get().on();
|
10457 |
}
|
10458 |
+
}, this));
|
|
|
|
|
|
|
|
|
|
|
10459 |
};
|
10460 |
|
10461 |
Item.prototype.fitLayer = function (item) {
|
10464 |
|
10465 |
return Item;
|
10466 |
});
|
10467 |
+
N2D('ItemManager', function ($, undefined) {
|
10468 |
"use strict";
|
10469 |
|
10470 |
+
/**
|
10471 |
+
* @memberOf N2Classes
|
10472 |
+
*
|
10473 |
+
* @param {FragmentEditor} fragmentEditor
|
10474 |
+
* @param options
|
10475 |
+
* @constructor
|
10476 |
+
*/
|
10477 |
+
function ItemManager(fragmentEditor, options) {
|
10478 |
this.suppressChange = false;
|
10479 |
|
10480 |
this.activeItemOriginalData = null;
|
10481 |
|
10482 |
+
this.fragmentEditor = fragmentEditor;
|
10483 |
|
10484 |
this.lastValues = {};
|
10485 |
|
10489 |
this.activeForm = false;
|
10490 |
|
10491 |
if (!options.isUploadDisabled) {
|
10492 |
+
var dropArea = $('#n2-ss-slide-canvas-container-inner');
|
10493 |
+
dropArea.nUIFileUpload({
|
10494 |
url: options.uploadUrl,
|
10495 |
pasteZone: false,
|
10496 |
+
dropZone: dropArea,
|
10497 |
dataType: 'json',
|
10498 |
paramName: 'image',
|
10499 |
add: function (e, data) {
|
10509 |
});
|
10510 |
item.activate(null, null, true);
|
10511 |
} else {
|
10512 |
+
N2Classes.AjaxHelper.notification(response);
|
10513 |
}
|
10514 |
|
10515 |
}, this),
|
10516 |
fail: function (e, data) {
|
10517 |
+
N2Classes.AjaxHelper.notification(data.jqXHR.responseJSON);
|
10518 |
},
|
10519 |
|
10520 |
start: function () {
|
10521 |
+
N2Classes.AjaxHelper.startLoading();
|
10522 |
},
|
10523 |
|
10524 |
stop: function () {
|
10525 |
setTimeout(function () {
|
10526 |
+
N2Classes.AjaxHelper.stopLoading();
|
10527 |
}, 100);
|
10528 |
}
|
10529 |
});
|
10531 |
}
|
10532 |
|
10533 |
ItemManager.prototype.setActiveItem = function (item, context, force) {
|
10534 |
+
// Must be called through N2Classes.Item.activate();
|
10535 |
if (item != this.activeItem || force) {
|
10536 |
this.activeItemOriginalData = null;
|
10537 |
|
10572 |
|
10573 |
ItemManager.prototype.focusFirst = function (context) {
|
10574 |
var field = this.activeForm.fields.eq(0).data('field');
|
10575 |
+
if (this.fragmentEditor.editor.generator.isDynamicSlide() && field.connectedField && field.connectedField instanceof N2Classes.FormElementImage) {
|
10576 |
|
10577 |
} else {
|
10578 |
this.activeForm.fields.eq(0).data('field').focus(typeof context !== 'undefined' && context);
|
10581 |
|
10582 |
ItemManager.prototype.startItems = function () {
|
10583 |
|
10584 |
+
$('.n2-ss-core-item').nUICanvasItem({
|
10585 |
+
canvasUIManager: this.fragmentEditor.mainContainer.canvasUIManager,
|
10586 |
distance: 5,
|
10587 |
$layer: function () {
|
10588 |
return this.element.clone();
|
10591 |
switch (targetContainer.layer.type) {
|
10592 |
case 'content':
|
10593 |
case 'col':
|
10594 |
+
N2Classes.History.get().startBatch();
|
10595 |
var item = this.createLayerItem(targetContainer.layer, itemOptions.$layer.data(), 'click');
|
10596 |
+
N2Classes.History.get().addControl('skipForwardUndos');
|
10597 |
|
10598 |
targetContainer.layer.container.insertLayerAt(item.layer, targetIndex);
|
10599 |
item.layer.changeGroup(false, targetContainer.layer);
|
10600 |
|
10601 |
+
N2Classes.History.get().endBatch();
|
10602 |
|
10603 |
break;
|
10604 |
|
10606 |
var col = targetContainer.layer.createCol();
|
10607 |
targetContainer.layer.moveCol(col.getIndex(), targetIndex);
|
10608 |
|
10609 |
+
N2Classes.History.get().startBatch();
|
10610 |
var item = this.createLayerItem(col, itemOptions.$layer.data(), 'click');
|
10611 |
+
N2Classes.History.get().addControl('skipForwardUndos');
|
10612 |
|
10613 |
col.container.insertLayerAt(item.layer, 0);
|
10614 |
item.layer.changeGroup(false, col);
|
10615 |
|
10616 |
+
N2Classes.History.get().endBatch();
|
10617 |
|
10618 |
break;
|
10619 |
default:
|
10620 |
+
var mainContainerOffset = this.fragmentEditor.mainContainer.layer.offset(),
|
10621 |
+
item = this.createLayerItem(this.fragmentEditor.mainContainer, itemOptions.$layer.data(), 'click');
|
10622 |
+
item.layer.placement.current.setPosition(e.pageX - mainContainerOffset.left - 20, e.pageY - mainContainerOffset.top - 20);
|
10623 |
|
10624 |
break;
|
10625 |
}
|
10628 |
$('#n2-ss-add-sidebar').removeClass('n2-active');
|
10629 |
}
|
10630 |
}).on('click', $.proxy(function (e) {
|
10631 |
+
this.createLayerItem(this.fragmentEditor.mainContainer.getActiveGroup(), $(e.currentTarget).data(), 'click');
|
10632 |
}, this));
|
10633 |
|
10634 |
|
10649 |
$('#n2-ss-layers-switcher > .n2-labels .n2-td').eq(1).trigger('click');
|
10650 |
}, this),
|
10651 |
mousedown: $.proxy(function (e) {
|
10652 |
+
$('.n2-ss-core-item[data-sstype="' + $(e.currentTarget).data('structureshortcut') + '"]').trigger(e);
|
10653 |
}, this)
|
10654 |
});
|
10655 |
};
|
10656 |
|
10657 |
ItemManager.prototype.createLayerItem = function (group, data, interaction, props) {
|
10658 |
+
group = group || this.fragmentEditor.mainContainer.getActiveGroup();
|
10659 |
var type = data.item;
|
10660 |
if (type == 'structure') {
|
10661 |
+
var layer = new N2Classes.Row(this.fragmentEditor, group, {});
|
10662 |
+
layer.create(data.sstype);
|
10663 |
layer.hightlightStructure();
|
10664 |
|
10665 |
return {
|
10681 |
layer.activate();
|
10682 |
}
|
10683 |
|
10684 |
+
this.fragmentEditor.layerWindow.switchTab('item');
|
10685 |
|
10686 |
+
N2Classes.History.get().addSimple(this, this.historyDelete, this.historyCreate, [group, layer, data]);
|
10687 |
|
10688 |
return layer.item;
|
10689 |
}
|
10694 |
return this.lastValues[type];
|
10695 |
}
|
10696 |
return {};
|
10697 |
+
};
|
10698 |
|
10699 |
ItemManager.prototype.getItemClass = function (type) {
|
10700 |
+
var itemClass = 'Item' + N2Classes.StringHelper.capitalize(type);
|
10701 |
+
if (typeof N2Classes[itemClass] === 'undefined') {
|
10702 |
return 'Item';
|
10703 |
}
|
10704 |
return itemClass;
|
10705 |
+
};
|
10706 |
|
10707 |
ItemManager.prototype._createLayer = function ($item, group, properties) {
|
10708 |
+
var defaultAlign = this.fragmentEditor.layerOptions.layerFeatures.layerDefault;
|
10709 |
for (var k in defaultAlign) {
|
10710 |
if (defaultAlign[k] !== null) {
|
10711 |
properties[k] = defaultAlign[k];
|
10712 |
}
|
10713 |
}
|
10714 |
|
10715 |
+
var newLayer = new N2Classes.Layer(this.fragmentEditor, group, properties);
|
10716 |
|
10717 |
newLayer.create(function (layer) {
|
10718 |
return layer._createLayer()
|
10768 |
}, this));
|
10769 |
|
10770 |
if (e && e.type == 'nextendChange') {
|
10771 |
+
var task = N2Classes.History.get().addValue(this, this.historyUpdateCurrentItem, [this.activeItem]);
|
10772 |
if (task) {
|
10773 |
task.setValues(this.activeItemOriginalData, $.extend({}, originalData));
|
10774 |
}
|
10787 |
if (this.activeItem == maybeOldActiveItem) {
|
10788 |
maybeOldActiveItem.activate(null, null, true);
|
10789 |
}
|
10790 |
+
};
|
10791 |
|
10792 |
ItemManager.prototype.updateCurrentItemDeBounced = NextendDeBounce(function (e) {
|
10793 |
this.updateCurrentItem(e);
|
10795 |
|
10796 |
ItemManager.prototype.historyDelete = function (historyGroup, historyLayer) {
|
10797 |
historyLayer.getSelf().delete();
|
10798 |
+
};
|
10799 |
|
10800 |
ItemManager.prototype.historyCreate = function (historyGroup, historyLayer, data) {
|
10801 |
var item = this.createLayerItem(historyGroup.getSelf(), data);
|
10802 |
historyLayer.setSelf(item.layer);
|
10803 |
+
};
|
10804 |
|
10805 |
ItemManager.prototype.historyCreateStructure = function (historyGroup, historyLayer, data) {
|
10806 |
var obj = this.createLayerItem(historyGroup.getSelf(), data);
|
10807 |
historyLayer.setSelf(obj.layer);
|
10808 |
+
};
|
10809 |
|
10810 |
ItemManager.prototype.getSelf = function () {
|
10811 |
return this;
|
10812 |
+
};
|
10813 |
|
10814 |
return ItemManager;
|
10815 |
});
|
10816 |
+
N2D('PluginActivatable', function ($, undefined) {
|
10817 |
"use strict";
|
10818 |
|
10819 |
+
/**
|
10820 |
+
* @memberOf N2Classes
|
10821 |
+
*
|
10822 |
+
* @constructor
|
10823 |
+
*/
|
10824 |
function PluginActivatable() {
|
10825 |
this.isActive = false;
|
10826 |
this.preventActivation = false;
|
10831 |
if (document.activeElement) {
|
10832 |
document.activeElement.blur();
|
10833 |
}
|
10834 |
+
if (e && (e.ctrlKey || e.metaKey) && this.fragmentEditor.mainContainer.getSelectedLayer()) {
|
10835 |
return !this.select();
|
10836 |
} else {
|
10837 |
+
if (e && e.which == 3 && this.fragmentEditor.selectMode) {
|
10838 |
return false;
|
10839 |
}
|
10840 |
|
10841 |
if (!preventExitFromSelection) {
|
10842 |
+
this.fragmentEditor.exitSelectMode();
|
10843 |
}
|
10844 |
}
|
10845 |
|
10849 |
|
10850 |
|
10851 |
// Set the layer active if it is not active currently
|
10852 |
+
if (this.fragmentEditor.mainContainer.getSelectedLayer() !== this) {
|
10853 |
this.layerRow.addClass('n2-active');
|
10854 |
this.layer.addClass('n2-active');
|
10855 |
this.layer.triggerHandler('n2-ss-activate');
|
10856 |
+
this.fragmentEditor.changeActiveLayer(this, preventExitFromSelection);
|
10857 |
nextend.activeLayer = this.layer;
|
10858 |
|
10859 |
|
10860 |
+
this.fragmentEditor.ui.onActivateLayer(this);
|
10861 |
}
|
10862 |
this.isActive = true;
|
10863 |
return true;
|
10875 |
|
10876 |
return PluginActivatable;
|
10877 |
});
|
10878 |
+
N2D('PluginEditableName', function ($, undefined) {
|
10879 |
"use strict";
|
10880 |
var dblClickInterval = 300,
|
10881 |
timeout = null;
|
10882 |
|
10883 |
+
/**
|
10884 |
+
* @memberOf N2Classes
|
10885 |
+
*
|
10886 |
+
* @constructor
|
10887 |
+
*/
|
10888 |
function PluginEditableName() {
|
10889 |
}
|
10890 |
|
10891 |
PluginEditableName.prototype.addProperties = function ($layer) {
|
10892 |
this.createProperty('name', this.label, $layer);
|
10893 |
this.createProperty('nameSynced', 1, $layer);
|
10894 |
+
};
|
10895 |
|
10896 |
PluginEditableName.prototype.makeNameEditable = function () {
|
10897 |
this.layerTitleSpan.on({
|
10908 |
}
|
10909 |
}, this)
|
10910 |
})
|
10911 |
+
};
|
10912 |
|
10913 |
PluginEditableName.prototype.editName = function () {
|
10914 |
+
var input = new N2Classes.InlineField();
|
10915 |
|
10916 |
input.$input.on({
|
10917 |
valueChanged: $.proxy(function (e, newName) {
|
10956 |
|
10957 |
return PluginEditableName;
|
10958 |
});
|
10959 |
+
N2D('PluginShowOn', function ($, undefined) {
|
10960 |
"use strict";
|
10961 |
|
10962 |
+
/**
|
10963 |
+
* @memberOf N2Classes
|
10964 |
+
*
|
10965 |
+
* @constructor
|
10966 |
+
*/
|
10967 |
function PluginShowOn() {
|
10968 |
|
10969 |
}
|
10977 |
this.createProperty('tabletLandscape', 1, $layer);
|
10978 |
this.createProperty('mobilePortrait', 1, $layer);
|
10979 |
this.createProperty('mobileLandscape', 1, $layer);
|
10980 |
+
};
|
10981 |
|
10982 |
PluginShowOn.prototype._hide = function () {
|
10983 |
this.layer.css('display', 'none');
|
10986 |
};
|
10987 |
|
10988 |
PluginShowOn.prototype._show = function () {
|
10989 |
+
if (parseInt(this.property[this.fragmentEditor.getMode()])) {
|
10990 |
this.layer.css('display', '');
|
10991 |
this.showsOnCurrent = true;
|
10992 |
}
|
11039 |
|
11040 |
return PluginShowOn;
|
11041 |
});
|
11042 |
+
N2D('Col', ['ContentAbstract'], function ($, undefined) {
|
11043 |
"use strict";
|
11044 |
|
11045 |
/**
|
11046 |
+
* @memberOf N2Classes
|
11047 |
+
*
|
11048 |
+
* @param fragmentEditor
|
11049 |
+
* @param group
|
11050 |
+
* @param properties
|
11051 |
* @constructor
|
11052 |
+
|
11053 |
+
* @augments ContentAbstract
|
11054 |
*/
|
11055 |
+
function Col(fragmentEditor, group, properties) {
|
11056 |
this.label = 'Col';
|
11057 |
this.type = 'col';
|
11058 |
|
11059 |
this.innerContainer = '> .n2-ss-layer-col';
|
11060 |
|
11061 |
+
this.localStyle = [
|
11062 |
+
{
|
11063 |
+
group: 'normal', selector: '-inner', css: {
|
11064 |
+
transition: 'transition:all .3s;transition-property:border,background-image,background-color,border-radius,box-shadow;'
|
11065 |
+
}
|
11066 |
+
},
|
11067 |
+
{group: 'hover', selector: '-inner:HOVER', css: {}}
|
11068 |
+
];
|
11069 |
+
|
11070 |
+
N2Classes.ContentAbstract.prototype.constructor.call(this, fragmentEditor, group, properties);
|
11071 |
|
11072 |
this.placement.allow('default');
|
11073 |
}
|
11074 |
|
11075 |
+
Col.prototype = Object.create(N2Classes.ContentAbstract.prototype);
|
11076 |
Col.prototype.constructor = Col;
|
11077 |
|
11078 |
Col.prototype._createLayer = function () {
|
11079 |
return $('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>')
|
11080 |
+
.attr('data-sstype', this.type);
|
11081 |
};
|
11082 |
|
11083 |
Col.prototype.addProperties = function ($layer) {
|
11084 |
|
11085 |
+
N2Classes.ContentAbstract.prototype.addProperties.call(this, $layer);
|
11086 |
|
11087 |
this.createProperty('colwidth', '1', $layer);
|
11088 |
this.createProperty('link', '#|*|_self', $layer);
|
|
|
|
|
11089 |
|
11090 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('borderradius', 0, {
|
11091 |
+
"-hover": undefined
|
11092 |
+
}, this, "stylemode"), $layer);
|
11093 |
+
|
11094 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('boxshadow', '0|*|0|*|0|*|0|*|00000080', {
|
11095 |
+
"-hover": undefined
|
11096 |
+
}, this, "stylemode"), $layer);
|
11097 |
+
|
11098 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('borderwidth', '1|*|1|*|1|*|1', {
|
11099 |
+
"-hover": undefined
|
11100 |
+
}, this, "stylemode"), $layer);
|
11101 |
+
|
11102 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('borderstyle', 'none', {
|
11103 |
+
"-hover": undefined
|
11104 |
+
}, this, "stylemode"), $layer);
|
11105 |
+
|
11106 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('bordercolor', 'ffffffff', {
|
11107 |
+
"-hover": undefined
|
11108 |
+
}, this, "stylemode"), $layer);
|
11109 |
|
11110 |
this.createDeviceProperty('order', {desktopPortrait: 0}, $layer);
|
11111 |
};
|
11112 |
|
11113 |
Col.prototype.create = function () {
|
11114 |
+
N2Classes.ContentAbstract.prototype.create.call(this);
|
11115 |
|
11116 |
this._syncorder();
|
11117 |
|
11123 |
this._onReady();
|
11124 |
};
|
11125 |
|
11126 |
+
Col.prototype.load = function ($layer, isEditorStart) {
|
11127 |
|
11128 |
+
N2Classes.ContentAbstract.prototype.load.call(this, $layer, isEditorStart);
|
11129 |
|
11130 |
this._syncorder();
|
11131 |
|
11150 |
Col.prototype.createRow = function () {
|
11151 |
this.$content = this.layer.find('.n2-ss-layer-content:first');
|
11152 |
|
11153 |
+
this.container = new N2Classes.LayerContainer(this, $('<ul class="n2-list n2-h4 n2-list-orderable" />'), 'normal', '> .n2-ss-layer', ['row', 'layer']);
|
11154 |
this.container.setLayerContainerElement(this.$content);
|
11155 |
|
11156 |
+
this.addClassElement(this.layer);
|
11157 |
+
this.addClassElement(this.$content, '-inner');
|
11158 |
+
|
11159 |
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)),
|
11160 |
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 () {
|
11161 |
this.duplicate(true, false)
|
11177 |
|
11178 |
Col.prototype._start = function (isCreate) {
|
11179 |
|
11180 |
+
N2Classes.ContentAbstract.prototype._start.call(this, isCreate);
|
11181 |
|
11182 |
if (isCreate) {
|
11183 |
this.highlight(2000);
|
11198 |
if (order == 0) {
|
11199 |
this.layer.css('order', '');
|
11200 |
} else {
|
11201 |
+
this.layer.css('order', order * 2);
|
11202 |
}
|
11203 |
|
11204 |
this.group.refreshUI();
|
11205 |
};
|
11206 |
|
11207 |
Col.prototype._synccolwidth = function () {
|
11208 |
+
this.widthPercentage = ((new Fraction(this.getProperty('colwidth'))).valueOf() * 100);
|
11209 |
+
//this.layer.css('width', this.widthPercentage + '%');
|
11210 |
this.group.refreshUI();
|
11211 |
};
|
11212 |
|
11213 |
+
Col.prototype.getWidthPercentage = function () {
|
11214 |
+
return this.widthPercentage;
|
11215 |
};
|
11216 |
|
11217 |
+
Col.prototype._synclink = function () {
|
|
|
11218 |
};
|
11219 |
|
11220 |
+
Col.prototype._syncborderradius =
|
11221 |
+
Col.prototype['_syncborderradius-hover'] = function () {
|
11222 |
+
var borderRadius = this.getProperty('borderradius');
|
11223 |
+
if (borderRadius > 0) {
|
11224 |
+
this.addLocalStyle('normal', 'borderradius', 'border-radius:' + borderRadius + 'px;');
|
11225 |
+
}
|
11226 |
+
|
11227 |
+
var borderRadiusHover = this.getProperty('borderradius-hover');
|
11228 |
+
if (borderRadiusHover && borderRadiusHover != borderRadius) {
|
11229 |
+
this.addLocalStyle('hover', 'borderradius', 'border-radius:' + borderRadiusHover + 'px;');
|
11230 |
+
}
|
11231 |
+
};
|
11232 |
+
|
11233 |
Col.prototype._syncborderwidth =
|
11234 |
Col.prototype._syncbordercolor =
|
11235 |
+
Col.prototype._syncborderstyle =
|
11236 |
+
Col.prototype['_syncborderstyle-hover'] =
|
11237 |
+
Col.prototype['_syncbordercolor-hover'] =
|
11238 |
+
Col.prototype['_syncborderwidth-hover'] = function () {
|
11239 |
+
this._syncborder();
|
11240 |
+
};
|
11241 |
|
11242 |
Col.prototype._syncborder = function () {
|
11243 |
+
var borderstyle = this.getProperty('borderstyle'),
|
11244 |
+
bordercolor = this.getProperty('bordercolor'),
|
11245 |
+
borderwidth = this.getProperty('borderwidth');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11246 |
|
11247 |
+
this.addLocalStyle('normal', 'border', this.getBorderCSS(borderstyle, bordercolor, borderwidth));
|
11248 |
+
|
11249 |
+
var hoverStyle = '',
|
11250 |
+
isHoverDifferent = false,
|
11251 |
+
borderstyleHover = this.getProperty('borderstyle-hover'),
|
11252 |
+
bordercolorHover = this.getProperty('bordercolor-hover'),
|
11253 |
+
borderwidthHover = this.getProperty('borderwidth-hover');
|
11254 |
+
|
11255 |
+
if (borderstyleHover !== undefined && borderstyleHover != borderstyle) {
|
11256 |
+
isHoverDifferent = true;
|
11257 |
+
}
|
11258 |
+
if (bordercolorHover !== undefined && bordercolorHover != bordercolor) {
|
11259 |
+
isHoverDifferent = true;
|
11260 |
+
}
|
11261 |
+
if (borderwidthHover !== undefined && borderwidthHover != borderwidth) {
|
11262 |
+
isHoverDifferent = true;
|
11263 |
+
}
|
11264 |
+
|
11265 |
+
if (isHoverDifferent) {
|
11266 |
+
if (borderstyleHover === undefined) {
|
11267 |
+
borderstyleHover = borderstyle;
|
11268 |
+
}
|
11269 |
+
if (bordercolorHover === undefined) {
|
11270 |
+
bordercolorHover = bordercolor;
|
11271 |
+
}
|
11272 |
+
if (borderwidthHover === undefined) {
|
11273 |
+
borderwidthHover = borderwidth;
|
11274 |
+
}
|
11275 |
+
hoverStyle = this.getBorderCSS(borderstyleHover, bordercolorHover, borderwidthHover);
|
11276 |
+
}
|
11277 |
+
this.addLocalStyle('hover', 'border', hoverStyle);
|
11278 |
+
|
11279 |
+
this.update();
|
11280 |
+
};
|
11281 |
+
|
11282 |
+
Col.prototype.getBorderCSS = function (borderStyle, borderColor, borderWidth) {
|
11283 |
+
var style = '';
|
11284 |
+
if (borderStyle != 'none') {
|
11285 |
+
style += 'border-color:' + N2Color.hex2rgbaCSS(borderColor) + ';';
|
11286 |
+
style += 'border-style:' + borderStyle + ';';
|
11287 |
+
borderWidth = borderWidth.split('|*|');
|
11288 |
+
var unit = 'px';
|
11289 |
+
|
11290 |
+
style += 'border-width:' + borderWidth.join(unit + ' ') + unit + ';';
|
11291 |
+
}
|
11292 |
+
return style;
|
11293 |
};
|
11294 |
|
11295 |
+
Col.prototype._syncboxshadow =
|
11296 |
+
Col.prototype['_syncboxshadow-hover'] = function () {
|
11297 |
+
|
11298 |
+
var boxShadow = this.getProperty('boxshadow');
|
11299 |
+
this.addLocalStyle('normal', 'boxshadow', this.getBoxShadowCSS(boxShadow.split('|*|')));
|
11300 |
+
|
11301 |
+
var hoverStyle = '',
|
11302 |
+
boxShadowHover = this.getProperty('boxshadow-hover');
|
11303 |
+
if (boxShadowHover !== undefined && boxShadowHover != boxShadow) {
|
11304 |
+
hoverStyle = this.getBoxShadowCSS(boxShadowHover.split('|*|'));
|
11305 |
+
}
|
11306 |
+
this.addLocalStyle('hover', 'boxshadow', hoverStyle);
|
11307 |
+
};
|
11308 |
+
|
11309 |
+
Col.prototype.getBoxShadowCSS = function (boxShadow) {
|
11310 |
if ((boxShadow[0] != 0 || boxShadow[1] != 0 || boxShadow[2] != 0 || boxShadow[3] != 0) && N2Color.hex2alpha(boxShadow[4]) != 0) {
|
11311 |
+
return 'box-shadow:' + boxShadow[0] + 'px ' + boxShadow[1] + 'px ' + boxShadow[2] + 'px ' + boxShadow[3] + 'px ' + N2Color.hex2rgbaCSS(boxShadow[4]) + ';';
|
|
|
|
|
11312 |
}
|
11313 |
+
return '';
|
11314 |
};
|
11315 |
|
11316 |
Col.prototype.delete = function () {
|
11322 |
};
|
11323 |
|
11324 |
Col.prototype.getHTML = function (base64) {
|
11325 |
+
var layer = N2Classes.ComponentAbstract.prototype.getHTML.call(this, base64);
|
11326 |
|
11327 |
layer.attr('data-rowcolumns', this.group.getColumns());
|
11328 |
return layer;
|
11331 |
Col.prototype.renderModeProperties = function (isReset) {
|
11332 |
this._syncorder();
|
11333 |
|
11334 |
+
N2Classes.ContentAbstract.prototype.renderModeProperties.call(this, isReset);
|
11335 |
};
|
11336 |
|
11337 |
Col.prototype.update = function () {
|
11338 |
|
11339 |
this.group._syncwrapafter();
|
11340 |
+
N2Classes.ComponentAbstract.prototype.update.call(this);
|
11341 |
+
};
|
11342 |
+
|
11343 |
+
Col.prototype.setPropertystylemode = function () {
|
11344 |
+
N2Classes.ContentAbstract.prototype.setPropertystylemode.apply(this, arguments);
|
11345 |
+
|
11346 |
+
this.syncAdvancedField('borderradius');
|
11347 |
+
this.syncAdvancedField('boxshadow');
|
11348 |
+
this.syncAdvancedField('borderwidth');
|
11349 |
+
this.syncAdvancedField('borderstyle');
|
11350 |
+
this.syncAdvancedField('bordercolor');
|
11351 |
+
};
|
11352 |
+
|
11353 |
+
Col.prototype.getOrderedIndex = function () {
|
11354 |
+
return this.group.getOrderedColumns().indexOf(this);
|
11355 |
};
|
11356 |
|
11357 |
return Col;
|
11358 |
});
|
11359 |
var dependencies = ['LayerDataStorage', 'PluginEditableName'];
|
11360 |
+
N2D('ComponentAbstract', dependencies, function ($, undefined) {
|
11361 |
"use strict";
|
11362 |
|
11363 |
var i = 0;
|
11364 |
window.layers = [];
|
11365 |
|
11366 |
+
/**
|
11367 |
+
* @memberOf N2Classes
|
11368 |
+
*
|
11369 |
+
* @param {FragmentEditor} fragmentEditor
|
11370 |
+
* @param group
|
11371 |
+
* @param properties
|
11372 |
+
* @constructor
|
11373 |
+
* @augments PluginActivatable
|
11374 |
+
* @augments LayerDataStorage
|
11375 |
+
* @augments PluginEditableName
|
11376 |
+
* @augments PluginAnimatable
|
11377 |
+
* @augments PluginShowOn
|
11378 |
+
*/
|
11379 |
+
function ComponentAbstract(fragmentEditor, group, properties) {
|
11380 |
|
11381 |
this.wraps = {};
|
11382 |
this.counter = i++;
|
11383 |
window.layers[this.counter] = this;
|
11384 |
this.self = this;
|
11385 |
this.originalProperties = properties || {};
|
11386 |
+
N2Classes.LayerDataStorage.prototype.constructor.call(this);
|
11387 |
this.readyDeferred = $.Deferred();
|
11388 |
this.readyDeferred.done($.proxy(this.onReady, this));
|
11389 |
this.isDeleteStarted = false;
|
11397 |
|
11398 |
this.status = ComponentAbstract.STATUS.UNDEFINED;
|
11399 |
|
11400 |
+
this.fragmentEditor = fragmentEditor;
|
11401 |
this.group = group;
|
11402 |
|
11403 |
+
this.classElements = [];
|
11404 |
+
|
11405 |
+
this.localStyleSyncThrottled = NextendThrottle(this.localStyleSync, 50);
|
11406 |
|
11407 |
+
|
11408 |
+
N2Classes.PluginActivatable.prototype.constructor.call(this);
|
11409 |
|
11410 |
/** @type {Placement} */
|
11411 |
+
this.placement = new N2Classes.Placement(this);
|
11412 |
|
11413 |
this.readyDeferred.done($.proxy(this.addUILabels, this));
|
11414 |
|
11429 |
};
|
11430 |
|
11431 |
|
11432 |
+
for (var k in N2Classes.PluginActivatable.prototype) {
|
11433 |
+
ComponentAbstract.prototype[k] = N2Classes.PluginActivatable.prototype[k];
|
11434 |
}
|
11435 |
|
11436 |
+
for (var k in N2Classes.LayerDataStorage.prototype) {
|
11437 |
+
ComponentAbstract.prototype[k] = N2Classes.LayerDataStorage.prototype[k];
|
11438 |
}
|
11439 |
|
11440 |
+
for (var k in N2Classes.PluginEditableName.prototype) {
|
11441 |
+
ComponentAbstract.prototype[k] = N2Classes.PluginEditableName.prototype[k];
|
11442 |
}
|
11443 |
|
11444 |
+
for (var k in N2Classes.PluginShowOn.prototype) {
|
11445 |
+
ComponentAbstract.prototype[k] = N2Classes.PluginShowOn.prototype[k];
|
11446 |
}
|
11447 |
|
11448 |
ComponentAbstract.prototype.addUILabels = function () {
|
11482 |
}, this)
|
11483 |
})
|
11484 |
.appendTo(this.uiLabel);
|
11485 |
+
};
|
11486 |
|
11487 |
ComponentAbstract.prototype.getUILabel = function () {
|
11488 |
return this.label;
|
11489 |
+
};
|
11490 |
|
11491 |
ComponentAbstract.prototype.up = function (e) {
|
11492 |
e.stopImmediatePropagation();
|
11493 |
this.group.activate(e);
|
11494 |
+
};
|
11495 |
|
11496 |
ComponentAbstract.prototype.addProperties = function ($layer) {
|
11497 |
|
11498 |
this.createProperty('id', null, $layer, this);
|
11499 |
+
this.createProperty('uniqueclass', null, $layer, this);
|
11500 |
|
11501 |
this.createProperty('class', '', $layer);
|
11502 |
this.createProperty('crop', 'visible', $layer);
|
11505 |
this.createProperty('adaptivefont', 0, $layer);
|
11506 |
|
11507 |
this.createDeviceProperty('fontsize', {desktopPortrait: 100}, $layer);
|
11508 |
+
N2Classes.PluginShowOn.prototype.addProperties.call(this, $layer);
|
11509 |
+
N2Classes.PluginEditableName.prototype.addProperties.call(this, $layer);
|
11510 |
+
};
|
11511 |
|
11512 |
ComponentAbstract.prototype.getRootElement = function () {
|
11513 |
return this.layer;
|
11514 |
+
};
|
11515 |
|
11516 |
ComponentAbstract.prototype.create = function (cb, useCreatedLayerProperties) {
|
11517 |
useCreatedLayerProperties = useCreatedLayerProperties || false;
|
11540 |
this.$.triggerHandler('create');
|
11541 |
|
11542 |
this._start(true);
|
11543 |
+
};
|
11544 |
|
11545 |
+
ComponentAbstract.prototype.load = function ($layer, isEditorStart) {
|
11546 |
|
11547 |
this.addProperties($layer);
|
11548 |
|
11559 |
} else {
|
11560 |
this.changeStatus(ComponentAbstract.STATUS.NORMAL);
|
11561 |
}
|
11562 |
+
|
11563 |
+
if (!isEditorStart) {
|
11564 |
+
this.regenerateUniqueClass();
|
11565 |
+
}
|
11566 |
+
};
|
11567 |
|
11568 |
ComponentAbstract.prototype._start = function (isCreate) {
|
11569 |
this.createRow();
|
11582 |
this.setGroup(this.group);
|
11583 |
|
11584 |
|
11585 |
+
this.fragmentEditor.$.triggerHandler('layerCreated', this);
|
11586 |
|
11587 |
if (isCreate) {
|
11588 |
this.refreshBaseSize();
|
11597 |
this.layer.removeClass('n2-ss-layer-under-creation');
|
11598 |
}
|
11599 |
}, this), 300);
|
11600 |
+
};
|
11601 |
|
11602 |
|
11603 |
ComponentAbstract.prototype._onReady = function () {
|
11610 |
mouseover: $.proxy(this.markOver, this),
|
11611 |
mouseout: $.proxy(this.markOut, this)
|
11612 |
});
|
11613 |
+
};
|
11614 |
|
11615 |
ComponentAbstract.prototype.isReady = function () {
|
11616 |
return this.readyDeferred.state() == 'resolved';
|
11617 |
+
};
|
11618 |
|
11619 |
ComponentAbstract.prototype.getName = function () {
|
11620 |
return this.property.name;
|
11621 |
+
};
|
11622 |
|
11623 |
ComponentAbstract.prototype.setGroup = function (group) {
|
11624 |
+
this.group.$.off('baseSizeUpdated.sslayer' + this.counter);
|
11625 |
|
11626 |
this.group = group;
|
11627 |
this.placement.setMode(group.container.allowedPlacementMode);
|
11630 |
if (this.isReady()) {
|
11631 |
this.refreshBaseSize();
|
11632 |
}
|
11633 |
+
this.group.$.on('baseSizeUpdated.sslayer' + this.counter, this.proxyRefreshBaseSize);
|
11634 |
};
|
11635 |
|
11636 |
ComponentAbstract.prototype.changeGroup = function (originalIndex, newGroup) {
|
11637 |
var originalGroup = this.group;
|
11638 |
+
originalGroup.$.off('baseSizeUpdated.sslayer' + this.counter);
|
11639 |
|
11640 |
this.group = newGroup;
|
11641 |
var originalPlacementData = this.placement.setMode(newGroup.container.allowedPlacementMode);
|
11642 |
newGroup.container.syncLayerRow(this);
|
11643 |
|
11644 |
this.refreshBaseSize();
|
11645 |
+
newGroup.$.on('baseSizeUpdated.sslayer' + this.counter, this.proxyRefreshBaseSize);
|
11646 |
|
11647 |
this.userGroupChange(originalGroup, originalIndex, originalPlacementData, newGroup, this.getIndex());
|
11648 |
|
11649 |
originalGroup.update();
|
11650 |
+
};
|
11651 |
|
11652 |
ComponentAbstract.prototype.userGroupChange = function (originalGroup, originalIndex, originalPlacementData, newGroup, newIndex) {
|
11653 |
if (originalGroup == newGroup) {
|
11654 |
this.userIndexChange(originalIndex, newIndex);
|
11655 |
} else {
|
11656 |
+
var task = N2Classes.History.get().addValue(this, this.historyUserGroupChange, []);
|
11657 |
|
11658 |
if (task) {
|
11659 |
task.setValues({
|
11666 |
});
|
11667 |
}
|
11668 |
}
|
11669 |
+
};
|
11670 |
|
11671 |
ComponentAbstract.prototype.historyUserGroupChange = function (data) {
|
11672 |
var originalGroup = this.group,
|
11674 |
index = data.index;
|
11675 |
group.container.insertLayerAt(this, index);
|
11676 |
|
11677 |
+
this.group.$.off('baseSizeUpdated.sslayer' + this.counter);
|
11678 |
|
11679 |
this.group = group;
|
11680 |
if (data.placementData) {
|
11684 |
group.container.syncLayerRow(this);
|
11685 |
|
11686 |
this.refreshBaseSize();
|
11687 |
+
this.group.$.on('baseSizeUpdated.sslayer' + this.counter, this.proxyRefreshBaseSize);
|
11688 |
|
11689 |
|
11690 |
group.onChildCountChange();
|
11698 |
|
11699 |
ComponentAbstract.prototype.userIndexChange = function (originalIndex, newIndex) {
|
11700 |
|
11701 |
+
var task = N2Classes.History.get().addValue(this, this.historyUserIndexChange);
|
11702 |
if (task) {
|
11703 |
task.setValues(originalIndex, newIndex);
|
11704 |
}
|
11705 |
this.group.container.insertLayerAt(this, newIndex);
|
11706 |
+
};
|
11707 |
|
11708 |
ComponentAbstract.prototype.historyUserIndexChange = function (value) {
|
11709 |
this.group.container.insertLayerAt(this, value);
|
11710 |
+
};
|
11711 |
|
11712 |
|
11713 |
ComponentAbstract.prototype._createLayerListRow = function (actions) {
|
11714 |
this.layerRow = $('<li class="n2-ss-layerlist-row"></li>')
|
11715 |
.data('layer', this)
|
11716 |
.on({
|
11717 |
+
mousedown: $.proxy(N2Classes.WindowManager.setMouseDownArea, null, 'layerRowClicked')
|
11718 |
})
|
11719 |
.appendTo(this.group.container.$ul);
|
11720 |
this.layerTitleSpan = $('<span class="n2-ucf">' + this.property.name + '</span>');
|
11724 |
this.layerTitle = $('<div class="n2-ss-layer-title"></div>')
|
11725 |
.on({
|
11726 |
mouseenter: $.proxy(function () {
|
11727 |
+
this.fragmentEditor.highlight(this);
|
11728 |
}, this),
|
11729 |
mouseleave: $.proxy(function () {
|
11730 |
+
this.fragmentEditor.deHighlight(this);
|
11731 |
}, this),
|
11732 |
})
|
11733 |
.append(this.layerTitleSpan)
|
11743 |
|
11744 |
nextend.tooltip.add(this.layerRow);
|
11745 |
|
11746 |
+
this.layerRow.nUILayerListItem({
|
11747 |
+
UIManager: this.fragmentEditor.mainContainer.layerListUIManager,
|
11748 |
layer: this,
|
11749 |
$item: this.layerRow
|
11750 |
});
|
11751 |
|
11752 |
return this.layerRow;
|
11753 |
+
};
|
11754 |
|
11755 |
ComponentAbstract.prototype.select = function (e) {
|
11756 |
+
return this.fragmentEditor.selectLayer(this, true);
|
11757 |
};
|
11758 |
|
11759 |
ComponentAbstract.prototype.update = function () {
|
11763 |
|
11764 |
ComponentAbstract.prototype.updateThrottled = function () {
|
11765 |
this.placement.updatePositionThrottled();
|
11766 |
+
};
|
11767 |
|
11768 |
ComponentAbstract.prototype.positionSidebar = function () {
|
11769 |
+
this.fragmentEditor.layerWindow.show(this, this.layer);
|
11770 |
+
};
|
11771 |
|
11772 |
ComponentAbstract.prototype.showEditor = function () {
|
11773 |
+
this.fragmentEditor.layerWindow._show();
|
11774 |
+
};
|
11775 |
|
11776 |
ComponentAbstract.prototype.highlight = function (hideInterval) {
|
11777 |
hideInterval = hideInterval || 2000;
|
11783 |
this.isHighlighted = setTimeout($.proxy(function () {
|
11784 |
this.layer.removeClass('n2-highlight');
|
11785 |
}, this), hideInterval);
|
11786 |
+
};
|
11787 |
|
11788 |
ComponentAbstract.prototype.setPropertydesktopPortrait =
|
11789 |
ComponentAbstract.prototype.setPropertydesktopLandscape =
|
11792 |
ComponentAbstract.prototype.setPropertymobilePortrait =
|
11793 |
ComponentAbstract.prototype.setPropertymobileLandscape = function (name, value, from) {
|
11794 |
this._setProperty(name, parseInt(value), from);
|
11795 |
+
};
|
11796 |
|
11797 |
ComponentAbstract.prototype.getHTML = function (base64) {
|
11798 |
var $layer = this._createLayer();
|
11827 |
$layer.attr('id', id);
|
11828 |
}
|
11829 |
|
11830 |
+
if (this.status > N2Classes.ComponentAbstract.STATUS.NORMAL) {
|
11831 |
$layer.attr('data-status', this.status);
|
11832 |
}
|
11833 |
|
11854 |
$component.attr('data-parentid', '');
|
11855 |
|
11856 |
}
|
11857 |
+
/*
|
11858 |
+
console.log($component.find('[data-uniqueclass]').addBack('[data-uniqueclass]'));
|
11859 |
+
var uniqueclass = $component.attr('data-uniqueclass');
|
11860 |
+
if (uniqueclass) {
|
11861 |
+
$component.removeClass(uniqueclass);
|
11862 |
+
uniqueclass = $.fn.generateUniqueClass('n-uc-');
|
11863 |
+
$component.attr('data-uniqueclass', uniqueclass);
|
11864 |
+
$component.addClass(uniqueclass);
|
11865 |
+
}
|
11866 |
+
*/
|
11867 |
+
var newComponent = this.fragmentEditor.insertComponentWithNode(this.group, $component, this.getIndex() + 1, false, true);
|
11868 |
|
11869 |
this.layerRow.trigger('mouseleave');
|
11870 |
|
11872 |
newComponent.activate();
|
11873 |
}
|
11874 |
|
11875 |
+
N2Classes.History.get().addSimple(this, this.historyDeleteDuplicated, this.historyDuplicate, [newComponent, newComponent.container ? newComponent.container.getAllLayers() : false]);
|
11876 |
|
11877 |
return newComponent;
|
11878 |
};
|
11879 |
|
11880 |
ComponentAbstract.prototype.historyDeleteDuplicated = function (historicalNewComponent) {
|
11881 |
historicalNewComponent.getSelf().delete();
|
11882 |
+
};
|
11883 |
|
11884 |
ComponentAbstract.prototype.historyDuplicate = function (historicalNewComponent, historicalAllLayers) {
|
11885 |
var newComponent = this.duplicate(false, false);
|
11891 |
historicalAllLayers[i].setSelf(newAllLayers[i]);
|
11892 |
}
|
11893 |
}
|
11894 |
+
};
|
11895 |
|
11896 |
ComponentAbstract.prototype.historyDelete = function () {
|
11897 |
this.delete();
|
11898 |
+
};
|
11899 |
|
11900 |
ComponentAbstract.prototype.historyRestore = function ($component, historicalGroup, index, historicalAllLayers) {
|
11901 |
+
var newComponent = this.fragmentEditor.insertComponentWithNode(this.group.getSelf(), $component.clone(), index, false, true);
|
11902 |
this.setSelf(newComponent);
|
11903 |
|
11904 |
if (historicalAllLayers) {
|
11907 |
historicalAllLayers[i].setSelf(newAllLayers[i]);
|
11908 |
}
|
11909 |
}
|
11910 |
+
};
|
11911 |
|
11912 |
ComponentAbstract.prototype.delete = function () {
|
11913 |
+
N2Classes.PositionDisplay.get().hide();
|
11914 |
nextend.tooltip.onLeave();
|
11915 |
this._delete();
|
11916 |
+
};
|
11917 |
|
11918 |
ComponentAbstract.prototype._delete = function () {
|
11919 |
|
11920 |
this.isDeleteStarted = true;
|
11921 |
|
11922 |
+
if (this.fragmentEditor.mainContainer.getSelectedLayer() == this) {
|
11923 |
+
this.fragmentEditor.layerWindow.hide();
|
11924 |
}
|
11925 |
|
11926 |
if (this.isHighlighted) {
|
11928 |
this.isHighlighted = false;
|
11929 |
}
|
11930 |
|
11931 |
+
N2Classes.History.get().startBatch();
|
11932 |
+
N2Classes.History.get().addSimple(this, this.historyRestore, this.historyDelete, [this.getHTML(false), this.group, this.getIndex(), this.container ? this.container.getAllLayers() : false]);
|
11933 |
|
11934 |
this.deActivate();
|
11935 |
|
11936 |
if (this.container != undefined) {
|
11937 |
+
N2Classes.History.get().off();
|
11938 |
var layers = this.container.getSortedLayers();
|
11939 |
for (var i = 0; i < layers.length; i++) {
|
11940 |
layers[i]._delete();
|
11941 |
}
|
11942 |
+
N2Classes.History.get().on();
|
11943 |
}
|
11944 |
+
N2Classes.History.get().endBatch();
|
11945 |
|
11946 |
if (this.item != undefined) {
|
11947 |
this.item.delete();
|
11954 |
|
11955 |
this.isDeleted = true;
|
11956 |
|
11957 |
+
this.fragmentEditor.mainContainer.layerDeleted(this);
|
11958 |
|
11959 |
this.layer.triggerHandler('LayerDeleted');
|
11960 |
this.getRootElement().remove();
|
11963 |
this.group.update();
|
11964 |
|
11965 |
|
11966 |
+
this.group.$.off('baseSizeUpdated.sslayer' + this.counter);
|
11967 |
this.$.trigger('layerDeleted');
|
11968 |
|
11969 |
if (this.markTimer) {
|
11970 |
clearTimeout(this.markTimer);
|
11971 |
}
|
11972 |
|
11973 |
+
//delete this.fragmentEditor;
|
11974 |
delete this.layer;
|
11975 |
delete this.itemEditor;
|
11976 |
this.group.onChildCountChange();
|
11977 |
+
};
|
11978 |
|
11979 |
ComponentAbstract.prototype.getData = function (params) {
|
11980 |
var data = {
|
11982 |
lastplacement: this.placement.getType()
|
11983 |
};
|
11984 |
|
11985 |
+
if (this.status > N2Classes.ComponentAbstract.STATUS.NORMAL) {
|
11986 |
data.status = this.status;
|
11987 |
}
|
11988 |
|
12056 |
}
|
12057 |
this.layer.addClass('n2-ss-mouse-over-delayed');
|
12058 |
this.uiLabel.removeClass('invisible');
|
12059 |
+
};
|
12060 |
|
12061 |
ComponentAbstract.prototype.markOut = function (e) {
|
12062 |
this.layer.removeClass('n2-ss-mouse-over');
|
12076 |
this.uiLabel.removeClass('invisible');
|
12077 |
this.markTimer = null;
|
12078 |
}, this), 10);
|
12079 |
+
};
|
12080 |
|
12081 |
ComponentAbstract.prototype.markEnter = function (e) {
|
12082 |
this.layer.addClass('n2-ss-mouse-hover');
|
12083 |
this.group.markEnter();
|
12084 |
+
};
|
12085 |
|
12086 |
ComponentAbstract.prototype.markLeave = function (e) {
|
12087 |
this.layer.removeClass('n2-ss-mouse-hover');
|
12088 |
this.group.markLeave();
|
12089 |
+
};
|
12090 |
|
12091 |
|
12092 |
ComponentAbstract.prototype.formSetname = function (options, value) {
|
12130 |
}
|
12131 |
}
|
12132 |
this.placement.sync();
|
12133 |
+
};
|
12134 |
|
12135 |
ComponentAbstract.prototype._syncid = function () {
|
12136 |
var value = this.getProperty('id');
|
12150 |
return id;
|
12151 |
};
|
12152 |
|
12153 |
+
ComponentAbstract.prototype.requestUniqueClass = function () {
|
12154 |
+
var uniqueClass = this.getProperty('uniqueclass');
|
12155 |
+
if (!uniqueClass) {
|
12156 |
+
uniqueClass = $.fn.generateUniqueClass('n-uc-');
|
12157 |
+
this.setProperty('uniqueclass', uniqueClass, 'layer');
|
12158 |
+
}
|
12159 |
+
return uniqueClass;
|
12160 |
+
};
|
12161 |
+
|
12162 |
+
/**
|
12163 |
+
* Used when duplicate or paste node to prevent class name conflicts
|
12164 |
+
*/
|
12165 |
+
ComponentAbstract.prototype.regenerateUniqueClass = function () {
|
12166 |
+
if (this.getProperty('uniqueclass')) {
|
12167 |
+
this.setProperty('uniqueclass', $.fn.generateUniqueClass('n-uc-'), 'layer');
|
12168 |
+
}
|
12169 |
+
};
|
12170 |
+
|
12171 |
+
ComponentAbstract.prototype._syncuniqueclass = function () {
|
12172 |
+
var value = this.getProperty('uniqueclass');
|
12173 |
+
|
12174 |
+
for (var i = 0; i < this.classElements.length; i++) {
|
12175 |
+
this.classElements[i].$el
|
12176 |
+
.removeClass(function (index, className) {
|
12177 |
+
return (className.match(/n-uc-[a-z0-9\-]+/gi) || []).join(' ');
|
12178 |
+
})
|
12179 |
+
.addClass(value + this.classElements[i].postfix);
|
12180 |
+
}
|
12181 |
+
};
|
12182 |
+
|
12183 |
ComponentAbstract.prototype._syncfontsize = function () {
|
12184 |
this.adjustFontSize(this.getProperty('adaptivefont'), this.getProperty('fontsize'), true);
|
12185 |
};
|
12211 |
this.baseSize = this.group.baseSize * fontSize / 100;
|
12212 |
}
|
12213 |
this.$.triggerHandler('baseSizeUpdated');
|
12214 |
+
};
|
12215 |
|
12216 |
ComponentAbstract.prototype.getFontSize = function () {
|
12217 |
return parseInt(this.getProperty('fontsize'));
|
12218 |
+
};
|
12219 |
|
12220 |
ComponentAbstract.prototype.isAdaptiveFont = function () {
|
12221 |
return parseInt(this.getProperty('adaptivefont'));
|
12222 |
+
};
|
12223 |
|
12224 |
ComponentAbstract.prototype._synccrop = function () {
|
12225 |
var value = this.getProperty('crop');
|
12250 |
} else {
|
12251 |
this.removeWrap('rotation');
|
12252 |
}
|
12253 |
+
};
|
12254 |
|
12255 |
ComponentAbstract.prototype.addWrap = function (key, html) {
|
12256 |
if (this.wraps[key] === undefined) {
|
12278 |
}
|
12279 |
}
|
12280 |
return this.wraps[key];
|
12281 |
+
};
|
12282 |
|
12283 |
ComponentAbstract.prototype.removeWrap = function (key) {
|
12284 |
if (this.wraps[key] !== undefined) {
|
12302 |
this.wraps[key].remove();
|
12303 |
delete this.wraps[key];
|
12304 |
}
|
12305 |
+
};
|
12306 |
|
12307 |
ComponentAbstract.prototype.getContents = function () {
|
12308 |
return false;
|
12309 |
+
};
|
12310 |
|
12311 |
ComponentAbstract.prototype._syncclass = function () {
|
12312 |
if (this._lastClasses !== false) {
|
12340 |
|
12341 |
ComponentAbstract.prototype.renderModeProperties = function (isReset) {
|
12342 |
|
12343 |
+
N2Classes.LayerDataStorage.prototype.renderModeProperties.call(this);
|
12344 |
|
12345 |
|
12346 |
this.placement.renderModeProperties(isReset);
|
12347 |
+
};
|
12348 |
|
12349 |
ComponentAbstract.prototype.getIndex = function () {
|
12350 |
return this.group.container.getLayerIndex(this.layer);
|
12351 |
+
};
|
12352 |
|
12353 |
ComponentAbstract.prototype.toString = function () {
|
12354 |
return this.type + ' #' + this.counter;
|
12355 |
+
};
|
12356 |
|
12357 |
ComponentAbstract.prototype.setSelf = function (self) {
|
12358 |
if (self === undefined) {
|
12363 |
}
|
12364 |
this.self = self;
|
12365 |
|
12366 |
+
};
|
12367 |
|
12368 |
ComponentAbstract.prototype.getSelf = function () {
|
12369 |
if (this.self !== this) {
|
12370 |
this.self = this.self.getSelf();
|
12371 |
}
|
12372 |
return this.self;
|
12373 |
+
};
|
12374 |
|
12375 |
ComponentAbstract.prototype.historyStoreOnPlacement = function () {
|
12376 |
var args = Array.prototype.slice.call(arguments);
|
12377 |
args.splice(1, 1);
|
12378 |
this.placement.current[arguments[1]].apply(this.placement.current, args);
|
12379 |
+
};
|
12380 |
|
12381 |
ComponentAbstract.prototype.getDroppable = function () {
|
12382 |
return false;
|
12383 |
+
};
|
12384 |
|
12385 |
ComponentAbstract.prototype.onCanvasUpdate = function (originalIndex, targetGroup, newIndex) {
|
12386 |
|
12391 |
}
|
12392 |
} else {
|
12393 |
var oldAbsoluteParent;
|
12394 |
+
if (this.fragmentEditor.isCol(this.group)) {
|
12395 |
oldAbsoluteParent = this;
|
12396 |
while (oldAbsoluteParent && (!oldAbsoluteParent.placement || oldAbsoluteParent.placement.getType() !== 'absolute')) {
|
12397 |
oldAbsoluteParent = oldAbsoluteParent.group;
|
12415 |
absoluteParent.placement.updatePosition();
|
12416 |
}
|
12417 |
}
|
12418 |
+
};
|
12419 |
|
12420 |
ComponentAbstract.prototype.setStatusNormal = function () {
|
12421 |
this.changeStatus(ComponentAbstract.STATUS.NORMAL);
|
12454 |
|
12455 |
this.placement.current.changeStatus(oldStatus, this.status);
|
12456 |
|
12457 |
+
};
|
12458 |
|
12459 |
ComponentAbstract.prototype.moveX = function (x) {
|
12460 |
if (this.placement.getType() == 'absolute') {
|
12461 |
this.placement.current.moveX(x);
|
12462 |
}
|
12463 |
+
};
|
12464 |
|
12465 |
ComponentAbstract.prototype.moveY = function (y) {
|
12466 |
if (this.placement.getType() == 'absolute') {
|
12467 |
this.placement.current.moveY(y);
|
12468 |
}
|
12469 |
+
};
|
12470 |
+
|
12471 |
+
ComponentAbstract.prototype.localStyleSync = function () {
|
12472 |
+
if (this.localStyle !== undefined) {
|
12473 |
+
var rulesToDelete = [],
|
12474 |
+
css = '';
|
12475 |
+
if (this.$localStyle !== undefined) {
|
12476 |
+
this.$localStyle.remove();
|
12477 |
+
delete this.$localStyle;
|
12478 |
+
}
|
12479 |
+
|
12480 |
+
for (var i = 0; i < this.localStyle.length; i++) {
|
12481 |
+
|
12482 |
+
var rule = '@rule' + this.localStyle[i].selector,
|
12483 |
+
style = '';
|
12484 |
+
rulesToDelete.push(rule);
|
12485 |
+
|
12486 |
+
if (Object.keys(this.localStyle[i].css).length === 1 && this.localStyle[i].css.transition !== undefined) {
|
12487 |
+
continue;
|
12488 |
+
}
|
12489 |
+
for (var k in this.localStyle[i].css) {
|
12490 |
+
style += this.localStyle[i].css[k];
|
12491 |
+
}
|
12492 |
+
if (style != '') {
|
12493 |
+
css += rule + '{' + style + '}';
|
12494 |
+
}
|
12495 |
+
}
|
12496 |
+
|
12497 |
+
var className = this.getProperty('uniqueclass');
|
12498 |
+
if (className) {
|
12499 |
+
// We have to remove all previous rules before adding new ones.
|
12500 |
+
for (var i = 0; i < rulesToDelete.length; i++) {
|
12501 |
+
nextend.css.deleteRule(rulesToDelete[i].replace(/@rule/g, window.nextend.pre + '.' + className));
|
12502 |
+
}
|
12503 |
+
}
|
12504 |
+
if (css != '') {
|
12505 |
+
if (!className) {
|
12506 |
+
className = this.requestUniqueClass();
|
12507 |
+
}
|
12508 |
+
this.$localStyle = $("<style>" + css.replace(/@rule/g, window.nextend.pre + '.' + className) + "</style>").appendTo("head");
|
12509 |
+
}
|
12510 |
+
}
|
12511 |
+
};
|
12512 |
+
|
12513 |
+
ComponentAbstract.prototype.addLocalStyle = function (group, name, style) {
|
12514 |
+
for (var i = 0; i < this.localStyle.length; i++) {
|
12515 |
+
if (this.localStyle[i].group === group) {
|
12516 |
+
if (style === '') {
|
12517 |
+
if (this.localStyle[i].css[name] !== undefined) {
|
12518 |
+
delete this.localStyle[i].css[name];
|
12519 |
+
}
|
12520 |
+
} else {
|
12521 |
+
this.localStyle[i].css[name] = style;
|
12522 |
+
}
|
12523 |
+
this.localStyleSyncThrottled();
|
12524 |
+
break;
|
12525 |
+
}
|
12526 |
+
}
|
12527 |
+
};
|
12528 |
+
|
12529 |
+
ComponentAbstract.prototype.addClassElement = function ($el, postfix) {
|
12530 |
+
if (arguments.length < 2) postfix = '';
|
12531 |
+
this.classElements.push({
|
12532 |
+
$el: $el,
|
12533 |
+
postfix: postfix
|
12534 |
+
});
|
12535 |
+
};
|
12536 |
|
12537 |
return ComponentAbstract;
|
12538 |
});
|
12539 |
+
N2D('Content', ['ContentAbstract'], function ($, undefined) {
|
12540 |
"use strict";
|
12541 |
|
12542 |
/**
|
12543 |
+
* @memberOf N2Classes
|
12544 |
+
*
|
12545 |
* @constructor
|
12546 |
* @augments ComponentAbstract
|
|
|
12547 |
*/
|
12548 |
+
function Content(fragmentEditor, group, properties) {
|
12549 |
this.label = n2_('Content');
|
12550 |
this.type = 'content';
|
12551 |
|
12553 |
|
12554 |
this._defaults = $.extend({verticalalign: 'center'}, this._defaults);
|
12555 |
|
12556 |
+
|
12557 |
+
this.localStyle = [
|
12558 |
+
{
|
12559 |
+
group: 'normal', selector: '', css: {
|
12560 |
+
transition: 'transition:all .3s;transition-property:border,background-image,background-color,border-radius,box-shadow;'
|
12561 |
+
}
|
12562 |
+
},
|
12563 |
+
{group: 'hover', selector: ':HOVER', css: {}}
|
12564 |
+
];
|
12565 |
+
|
12566 |
+
N2Classes.ContentAbstract.prototype.constructor.call(this, fragmentEditor, group, properties);
|
12567 |
|
12568 |
this.placement.allow('content');
|
12569 |
|
12570 |
+
fragmentEditor.setMainContent(this);
|
12571 |
}
|
12572 |
|
12573 |
+
Content.prototype = Object.create(N2Classes.ContentAbstract.prototype);
|
12574 |
Content.prototype.constructor = Content;
|
12575 |
|
12576 |
Content.prototype.addUILabels = function () {
|
12577 |
this.markTimer = null;
|
12578 |
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>')
|
12579 |
.appendTo(this.layer);
|
12580 |
+
};
|
12581 |
|
12582 |
Content.prototype.addProperties = function ($layer) {
|
12583 |
|
12584 |
+
N2Classes.ContentAbstract.prototype.addProperties.call(this, $layer);
|
12585 |
|
12586 |
this.createDeviceProperty('selfalign', {desktopPortrait: 'inherit'}, $layer);
|
12587 |
|
12588 |
+
};
|
12589 |
|
12590 |
Content.prototype.getRootElement = function () {
|
12591 |
+
return this.layer;
|
12592 |
+
};
|
12593 |
|
12594 |
Content.prototype.getBackgroundElement = function () {
|
12595 |
+
return this.layer;
|
12596 |
+
};
|
12597 |
|
12598 |
Content.prototype._createLayer = function () {
|
12599 |
return $('<div class="n2-ss-layer n2-ss-content-empty"><div class="n2-ss-section-main-content n2-ss-layer-content"></div></div>')
|
12600 |
+
.attr('data-sstype', this.type);
|
12601 |
+
};
|
12602 |
|
12603 |
Content.prototype.createRow = function () {
|
12604 |
+
|
12605 |
+
this.addClassElement(this.layer);
|
|
|
|
|
|
|
|
|
|
|
12606 |
|
12607 |
this.$content = this.layer.find('.n2-ss-layer-content:first');
|
12608 |
|
12609 |
var status = $('<div class="n2-ss-layer-status"></div>'),
|
12610 |
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));
|
12611 |
|
12612 |
+
this.container = new N2Classes.LayerContainer(this, $('<ul class="n2-list n2-h4 n2-list-orderable" />'), 'normal', '> .n2-ss-layer', ['row', 'layer']);
|
12613 |
this.container.setLayerContainerElement(this.$content);
|
12614 |
|
12615 |
|
12616 |
$('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(status).on('click', $.proxy(function (e) {
|
12617 |
e.preventDefault();
|
12618 |
+
if (this.status == N2Classes.ComponentAbstract.STATUS.HIDDEN) {
|
12619 |
this.setStatusNormal();
|
12620 |
} else {
|
12621 |
+
this.changeStatus(N2Classes.ComponentAbstract.STATUS.HIDDEN);
|
12622 |
}
|
12623 |
}, this));
|
12624 |
|
12634 |
this.container.$ul.appendTo(this.layerRow);
|
12635 |
|
12636 |
this.readyDeferred.done($.proxy(this._syncopened, this));
|
12637 |
+
};
|
12638 |
|
12639 |
Content.prototype.create = function () {
|
12640 |
|
12641 |
this.originalProperties.adaptivefont = 1;
|
12642 |
|
12643 |
+
N2Classes.ContentAbstract.prototype.create.call(this);
|
12644 |
|
12645 |
this._syncselfalign();
|
12646 |
|
12647 |
this._onReady();
|
12648 |
+
};
|
12649 |
|
12650 |
+
Content.prototype.load = function ($layer, isEditorStart) {
|
12651 |
|
12652 |
+
N2Classes.ContentAbstract.prototype.load.call(this, $layer, isEditorStart);
|
12653 |
|
12654 |
this._syncselfalign();
|
12655 |
|
12656 |
this._onReady();
|
12657 |
+
};
|
12658 |
+
|
12659 |
Content.prototype._onReady = function () {
|
12660 |
+
N2Classes.ContentAbstract.prototype._onReady.call(this);
|
12661 |
this.startUISizing();
|
12662 |
+
};
|
12663 |
|
12664 |
Content.prototype.startUISizing = function () {
|
12665 |
+
this.layer.nUINormalSizing({
|
12666 |
start: $.proxy(function (e, prop) {
|
12667 |
+
N2Classes.PositionDisplay.get().show('NormalSizing');
|
12668 |
+
if (prop === 'maxwidth') {
|
12669 |
+
this.layer.attr('data-has-maxwidth', '1');
|
12670 |
}
|
12671 |
}, this),
|
12672 |
resizeMaxWidth: $.proxy(function (e, ui) {
|
12673 |
|
12674 |
+
N2Classes.PositionDisplay.get().update(e, 'NormalSizing', 'Max-width: ' + (ui.value == 0 ? 'none' : (ui.value + 'px')));
|
12675 |
|
12676 |
}, this),
|
12677 |
stopMaxWidth: $.proxy(function (e, ui) {
|
12678 |
+
N2Classes.PositionDisplay.get().hide('NormalSizing');
|
12679 |
this.setProperty('maxwidth', ui.value);
|
12680 |
}, this)
|
12681 |
});
|
12682 |
+
};
|
12683 |
|
12684 |
Content.prototype.delete = function () {
|
12685 |
var layers = this.container.getSortedLayers();
|
12686 |
for (var i = 0; i < layers.length; i++) {
|
12687 |
layers[i].delete();
|
12688 |
}
|
12689 |
+
};
|
12690 |
|
12691 |
Content.prototype.remove = function () {
|
12692 |
this._delete();
|
12693 |
+
};
|
12694 |
|
12695 |
Content.prototype.update = function () {
|
12696 |
+
this.fragmentEditor.editor.getMainContainerElement().triggerHandler('updateSize');
|
12697 |
+
};
|
12698 |
|
12699 |
Content.prototype.onChildCountChange = function () {
|
12700 |
|
12701 |
var layers = this.container.getSortedLayers();
|
12702 |
|
12703 |
this.layer.toggleClass('n2-ss-content-empty', layers.length == 0);
|
12704 |
+
};
|
12705 |
|
12706 |
Content.prototype.renderModeProperties = function (isReset) {
|
12707 |
+
N2Classes.ContentAbstract.prototype.renderModeProperties.call(this, isReset);
|
12708 |
|
12709 |
this._syncselfalign();
|
12710 |
+
};
|
12711 |
|
12712 |
Content.prototype._syncselfalign = function () {
|
12713 |
this.layer.attr('data-cssselfalign', this.getProperty('selfalign'));
|
12714 |
+
};
|
12715 |
|
12716 |
Content.prototype.duplicate = function (needActivate) {
|
12717 |
console.error('Content can not be duplicated!');
|
12718 |
+
};
|
12719 |
|
12720 |
return Content;
|
12721 |
});
|
12722 |
+
N2D('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], function ($, undefined) {
|
12723 |
"use strict";
|
12724 |
|
12725 |
+
/**
|
12726 |
+
* @memberOf N2Classes
|
12727 |
+
*
|
12728 |
+
* @param fragmentEditor
|
12729 |
+
* @param group
|
12730 |
+
* @param properties
|
12731 |
+
* @constructor
|
12732 |
+
* @augments ComponentAbstract
|
12733 |
+
*/
|
12734 |
+
function ContentAbstract(fragmentEditor, group, properties) {
|
12735 |
|
12736 |
this._defaults = $.extend({verticalalign: 'flex-start'}, this._defaults);
|
12737 |
|
12738 |
this._syncbgThrottled = NextendThrottle(this._syncbgThrottled, 50);
|
12739 |
|
12740 |
+
this.stylemode = '';
|
12741 |
+
|
12742 |
+
N2Classes.ComponentAbstract.prototype.constructor.call(this, fragmentEditor, group, properties);
|
12743 |
}
|
12744 |
|
12745 |
+
ContentAbstract.prototype = Object.create(N2Classes.ComponentAbstract.prototype);
|
12746 |
ContentAbstract.prototype.constructor = ContentAbstract;
|
12747 |
|
12748 |
ContentAbstract.prototype.addProperties = function ($layer) {
|
12749 |
|
12750 |
this.createProperty('opened', 1, $layer, this);
|
12751 |
|
12752 |
+
N2Classes.ComponentAbstract.prototype.addProperties.call(this, $layer);
|
12753 |
|
12754 |
this.createProperty('bgimage', '', $layer);
|
12755 |
this.createProperty('bgimagex', 50, $layer);
|
12756 |
this.createProperty('bgimagey', 50, $layer);
|
12757 |
this.createProperty('bgimageparallax', 0, $layer);
|
12758 |
+
|
12759 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('bgcolor', '00000000', {
|
12760 |
+
"-hover": undefined
|
12761 |
+
}, this, "stylemode"), $layer);
|
12762 |
+
|
12763 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('bgcolorgradient', 'off', {
|
12764 |
+
"-hover": undefined
|
12765 |
+
}, this, "stylemode"), $layer);
|
12766 |
+
|
12767 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('bgcolorgradientend', '00000000', {
|
12768 |
+
"-hover": undefined
|
12769 |
+
}, this, "stylemode"), $layer);
|
12770 |
+
|
12771 |
this.createProperty('verticalalign', this._defaults.verticalalign, $layer);
|
12772 |
|
12773 |
this.createDeviceProperty('maxwidth', {desktopPortrait: 0}, $layer);
|
12774 |
|
12775 |
this.createDeviceProperty('inneralign', {desktopPortrait: 'inherit'}, $layer);
|
12776 |
this.createDeviceProperty('padding', {desktopPortrait: '10|*|10|*|10|*|10|*|px+'}, $layer);
|
12777 |
+
|
12778 |
+
|
12779 |
+
this.$.on('baseSizeUpdated.contentAbstract', $.proxy(this._syncpadding, this));
|
12780 |
+
};
|
12781 |
|
12782 |
ContentAbstract.prototype.getBackgroundElement = function () {
|
12783 |
return this.$content;
|
12784 |
+
};
|
12785 |
|
12786 |
ContentAbstract.prototype.getPaddingElement = function () {
|
12787 |
return this.$content;
|
12788 |
+
};
|
12789 |
|
12790 |
ContentAbstract.prototype.create = function () {
|
12791 |
+
N2Classes.ComponentAbstract.prototype.create.call(this);
|
12792 |
|
12793 |
this.initUI();
|
12794 |
|
12798 |
this._syncpadding();
|
12799 |
this._syncinneralign();
|
12800 |
this._syncbgThrottled();
|
12801 |
+
};
|
12802 |
|
12803 |
+
ContentAbstract.prototype.load = function ($layer, isEditorStart) {
|
12804 |
|
12805 |
+
N2Classes.ComponentAbstract.prototype.load.call(this, $layer, isEditorStart);
|
12806 |
|
12807 |
this.initUI();
|
12808 |
|
12812 |
this._syncinneralign();
|
12813 |
this._syncbgThrottled();
|
12814 |
|
12815 |
+
this.container.startWithExistingNodes(isEditorStart);
|
12816 |
+
};
|
12817 |
|
12818 |
ContentAbstract.prototype.initUI = function () {
|
12819 |
|
12820 |
this.layer.on({
|
12821 |
+
mousedown: $.proxy(N2Classes.WindowManager.setMouseDownArea, null, 'layerClicked'),
|
12822 |
click: $.proxy(function (e) {
|
12823 |
+
if (!nextend.shouldPreventMouseUp && this.fragmentEditor.preventActivationBubbling()) {
|
12824 |
this.activate(e);
|
12825 |
}
|
12826 |
}, this),
|
12830 |
}, this)
|
12831 |
});
|
12832 |
|
12833 |
+
this.getPaddingElement().nUISpacing({
|
|
|
12834 |
handles: 'n, s, e, w',
|
12835 |
start: $.proxy(function (e, ui) {
|
12836 |
+
N2Classes.PositionDisplay.get().show('Spacing');
|
12837 |
}, this),
|
12838 |
spacing: $.proxy(function (e, ui) {
|
12839 |
var html = '';
|
12841 |
html += 'Padding ' + k + ': ' + ui.changed[k] + 'px<br>';
|
12842 |
}
|
12843 |
|
12844 |
+
N2Classes.PositionDisplay.get().update(e, 'Spacing', html);
|
12845 |
}, this),
|
12846 |
stop: $.proxy(this.onSpacingStop, this),
|
12847 |
});
|
12848 |
+
};
|
12849 |
|
12850 |
ContentAbstract.prototype.onSpacingStop = function (event, ui) {
|
12851 |
+
N2Classes.PositionDisplay.get().hide('Spacing');
|
12852 |
var padding = this.getPadding().split('|*|'),
|
12853 |
ratioH = 1,
|
12854 |
ratioV = 1;
|
12855 |
|
12856 |
if (padding[padding.length - 1] == 'px+' && Math.abs(parseFloat(this.layer.css('fontSize')) - this.baseSize) > 1) {
|
12857 |
+
ratioH = this.fragmentEditor.getResponsiveRatioHorizontal();
|
12858 |
+
ratioV = this.fragmentEditor.getResponsiveRatioVertical();
|
12859 |
}
|
12860 |
|
12861 |
for (var k in ui.changed) {
|
12904 |
|
12905 |
ContentAbstract.prototype.getPadding = function () {
|
12906 |
return this.getProperty('padding');
|
12907 |
+
};
|
12908 |
|
12909 |
ContentAbstract.prototype._syncpadding = function () {
|
12910 |
var padding = this.getPadding().split('|*|'),
|
12921 |
this.getPaddingElement().css('padding', css);
|
12922 |
this.update();
|
12923 |
|
12924 |
+
this.getPaddingElement().nUISpacing('option', 'current', css);
|
12925 |
+
};
|
12926 |
|
12927 |
ContentAbstract.prototype._syncmaxwidth = function () {
|
12928 |
var value = parseInt(this.getProperty('maxwidth'));
|
12929 |
if (value <= 0 || isNaN(value)) {
|
12930 |
this.layer.css('maxWidth', '')
|
12931 |
+
.attr('data-has-maxwidth', '0');
|
12932 |
} else {
|
12933 |
this.layer.css('maxWidth', value + 'px')
|
12934 |
+
.attr('data-has-maxwidth', '1');
|
12935 |
}
|
12936 |
|
12937 |
this.update();
|
12939 |
|
12940 |
ContentAbstract.prototype.getInnerAlign = function () {
|
12941 |
return this.getProperty('inneralign');
|
12942 |
+
};
|
12943 |
|
12944 |
ContentAbstract.prototype._syncinneralign = function () {
|
12945 |
this.layer.attr('data-csstextalign', this.getInnerAlign());
|
12946 |
+
};
|
12947 |
|
12948 |
ContentAbstract.prototype.getVerticalAlign = function () {
|
12949 |
return this.getProperty('verticalalign');
|
12950 |
+
};
|
12951 |
|
12952 |
ContentAbstract.prototype._syncverticalalign = function () {
|
12953 |
this.$content.attr('data-verticalalign', this.getVerticalAlign());
|
12954 |
+
};
|
12955 |
|
12956 |
ContentAbstract.prototype._syncbgimage =
|
12957 |
ContentAbstract.prototype._syncbgimagex =
|
12959 |
ContentAbstract.prototype._syncbgimageparallax =
|
12960 |
ContentAbstract.prototype._syncbgcolor =
|
12961 |
ContentAbstract.prototype._syncbgcolorgradient =
|
12962 |
+
ContentAbstract.prototype._syncbgcolorgradientend =
|
12963 |
+
ContentAbstract.prototype['_syncbgcolor-hover'] =
|
12964 |
+
ContentAbstract.prototype['_syncbgcolorgradient-hover'] =
|
12965 |
+
ContentAbstract.prototype['_syncbgcolorgradientend-hover'] = function () {
|
12966 |
+
this._syncbgThrottled();
|
12967 |
+
};
|
12968 |
|
12969 |
|
12970 |
ContentAbstract.prototype._syncbgThrottled = function () {
|
12971 |
var background = '',
|
12972 |
+
image = this.fragmentEditor.editor.generator.fill(this.getProperty('bgimage')),
|
12973 |
+
gradientBackgroundProps = '';
|
12974 |
if (image != '') {
|
12975 |
var x = parseInt(this.getProperty('bgimagex'));
|
12976 |
if (!isFinite(x)) {
|
12980 |
if (!isFinite(y)) {
|
12981 |
y = 50;
|
12982 |
}
|
12983 |
+
background += 'URL("' + nextend.imageHelper.fixed(image) + '") ' + x + '% ' + y + '% / cover no-repeat' + (this.getProperty('bgimageparallax') == 1 ? ' fixed' : '');
|
12984 |
+
gradientBackgroundProps = ' ' + x + '% ' + y + '% / cover no-repeat' + (this.getProperty('bgimageparallax') == 1 ? ' fixed' : '')
|
12985 |
}
|
12986 |
var color = this.getProperty('bgcolor'),
|
12987 |
gradient = this.getProperty('bgcolorgradient'),
|
12988 |
colorend = this.getProperty('bgcolorgradientend');
|
12989 |
|
12990 |
+
var normalStyle = this.getBackgroundCSS(color, gradient, colorend, background, gradientBackgroundProps);
|
12991 |
+
|
12992 |
+
this.addLocalStyle('normal', 'bgcolor', normalStyle);
|
12993 |
+
|
12994 |
+
|
12995 |
+
var hoverStyle = '',
|
12996 |
+
isHoverDifferent = false,
|
12997 |
+
colorHover = this.getProperty('bgcolor-hover'),
|
12998 |
+
gradientHover = this.getProperty('bgcolorgradient-hover'),
|
12999 |
+
colorendHover = this.getProperty('bgcolorgradientend-hover');
|
13000 |
+
|
13001 |
+
if (colorHover !== undefined && colorHover != color) {
|
13002 |
+
isHoverDifferent = true;
|
13003 |
+
}
|
13004 |
+
if (gradientHover !== undefined && gradientHover != gradient) {
|
13005 |
+
isHoverDifferent = true;
|
13006 |
+
}
|
13007 |
+
if (colorendHover !== undefined && colorendHover != colorend) {
|
13008 |
+
isHoverDifferent = true;
|
13009 |
+
}
|
13010 |
+
|
13011 |
+
if (isHoverDifferent) {
|
13012 |
+
if (colorHover === undefined) {
|
13013 |
+
colorHover = color;
|
13014 |
+
}
|
13015 |
+
if (gradientHover === undefined) {
|
13016 |
+
gradientHover = gradient;
|
13017 |
+
}
|
13018 |
+
if (colorendHover === undefined) {
|
13019 |
+
colorendHover = colorend;
|
13020 |
+
}
|
13021 |
+
hoverStyle = this.getBackgroundCSS(colorHover, gradientHover, colorendHover, background, gradientBackgroundProps);
|
13022 |
+
}
|
13023 |
+
this.addLocalStyle('hover', 'bgcolor', hoverStyle);
|
13024 |
+
};
|
13025 |
+
|
13026 |
+
ContentAbstract.prototype.getBackgroundCSS = function (color, gradient, colorend, backgroundImage, gradientBackgroundProps) {
|
13027 |
if (N2Color.hex2alpha(color) != 0 || (gradient != 'off' && N2Color.hex2alpha(colorend) != 0)) {
|
13028 |
var after = '';
|
13029 |
+
if (backgroundImage != '') {
|
13030 |
+
after = gradientBackgroundProps + ',' + backgroundImage;
|
13031 |
}
|
13032 |
switch (gradient) {
|
13033 |
case 'horizontal':
|
13034 |
+
return 'background:-moz-linear-gradient(left, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13035 |
+
+ 'background:-webkit-linear-gradient(left, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13036 |
+
+ 'background:linear-gradient(to right, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
13037 |
case 'vertical':
|
13038 |
+
return 'background:-moz-linear-gradient(top, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13039 |
+
+ 'background:-webkit-linear-gradient(top, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13040 |
+
+ 'background:linear-gradient(to bottom, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
13041 |
case 'diagonal1':
|
13042 |
+
return 'background:-moz-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13043 |
+
+ 'background:-webkit-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13044 |
+
+ 'background:linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
13045 |
case 'diagonal2':
|
13046 |
+
return 'background:-moz-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13047 |
+
+ 'background:-webkit-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
13048 |
+
+ 'background:linear-gradient(135deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
13049 |
case 'off':
|
13050 |
default:
|
13051 |
+
if (backgroundImage != '') {
|
13052 |
+
return "background: linear-gradient(" + N2Color.hex2rgbaCSS(color) + ", " + N2Color.hex2rgbaCSS(color) + ")" + after + ';';
|
|
|
|
|
13053 |
}
|
13054 |
+
return 'background:' + N2Color.hex2rgbaCSS(color) + ';';
|
|
|
13055 |
}
|
13056 |
+
} else if (backgroundImage != '') {
|
13057 |
+
return 'background:' + backgroundImage + ';';
|
13058 |
}
|
13059 |
+
return '';
|
13060 |
};
|
13061 |
|
13062 |
ContentAbstract.prototype.getData = function (params) {
|
13063 |
+
var data = N2Classes.ComponentAbstract.prototype.getData.call(this, params);
|
13064 |
|
13065 |
if (params.layersIncluded) {
|
13066 |
data.layers = this.container.getData(params);
|
13073 |
this.layer.toggleClass('n2-ss-content-empty', this.container.getLayerCount() == 0);
|
13074 |
|
13075 |
this.update();
|
13076 |
+
};
|
13077 |
|
13078 |
ContentAbstract.prototype.renderModeProperties = function (isReset) {
|
13079 |
+
N2Classes.ComponentAbstract.prototype.renderModeProperties.call(this, isReset);
|
13080 |
|
13081 |
this._syncmaxwidth();
|
13082 |
|
13083 |
this._syncpadding();
|
13084 |
this._syncinneralign();
|
13085 |
+
};
|
13086 |
|
13087 |
ContentAbstract.prototype.getDroppable = function () {
|
13088 |
if (!this.layer.is(":visible") || this.status == N2Classes.ComponentAbstract.STATUS.HIDDEN || this.status == N2Classes.ComponentAbstract.STATUS.LOCKED) {
|
13094 |
placement: 'normal',
|
13095 |
axis: 'y'
|
13096 |
}
|
13097 |
+
};
|
13098 |
|
13099 |
ContentAbstract.prototype.getLLDroppable = function (layer) {
|
13100 |
switch (layer.type) {
|
13107 |
break;
|
13108 |
}
|
13109 |
return false;
|
13110 |
+
};
|
13111 |
|
13112 |
ContentAbstract.prototype.getContents = function () {
|
13113 |
return this.$content;
|
13114 |
+
};
|
13115 |
+
|
13116 |
+
ContentAbstract.prototype.setPropertystylemode = function (name, value, from) {
|
13117 |
+
this.stylemode = value;
|
13118 |
+
|
13119 |
+
this.syncAdvancedField('bgcolor');
|
13120 |
+
this.syncAdvancedField('bgcolorgradient');
|
13121 |
+
this.syncAdvancedField('bgcolorgradientend');
|
13122 |
+
};
|
13123 |
+
|
13124 |
+
ContentAbstract.prototype.onSyncFields = function () {
|
13125 |
+
this.fragmentEditor.layerOptions.updateField('stylemode', this.stylemode);
|
13126 |
+
};
|
13127 |
|
13128 |
return ContentAbstract;
|
13129 |
});
|
13130 |
+
N2D('Layer', ['ComponentAbstract'], function ($, undefined) {
|
13131 |
"use strict";
|
13132 |
|
13133 |
/**
|
13134 |
+
* @memberOf N2Classes
|
13135 |
+
*
|
13136 |
* @constructor
|
13137 |
* @augments ComponentAbstract
|
|
|
13138 |
*/
|
13139 |
+
function Layer(fragmentEditor, group, properties) {
|
13140 |
this.label = n2_('Layer');
|
13141 |
this.type = 'layer';
|
13142 |
|
13143 |
this.parent = false;
|
13144 |
|
13145 |
+
this.itemEditor = fragmentEditor.itemEditor;
|
13146 |
|
13147 |
+
N2Classes.ComponentAbstract.prototype.constructor.call(this, fragmentEditor, group, properties);
|
13148 |
|
13149 |
this.placement.allow('absolute');
|
13150 |
this.placement.allow('normal');
|
13152 |
this.$.on('load create', $.proxy(this.startItem, this));
|
13153 |
};
|
13154 |
|
13155 |
+
Layer.prototype = Object.create(N2Classes.ComponentAbstract.prototype);
|
13156 |
Layer.prototype.constructor = Layer;
|
13157 |
|
13158 |
|
13159 |
Layer.prototype.create = function () {
|
13160 |
|
13161 |
+
N2Classes.ComponentAbstract.prototype.create.apply(this, arguments);
|
13162 |
|
13163 |
this.initUI();
|
13164 |
|
13165 |
this._onReady();
|
13166 |
+
};
|
13167 |
|
13168 |
+
Layer.prototype.load = function ($layer, isEditorStart) {
|
13169 |
|
13170 |
+
N2Classes.ComponentAbstract.prototype.load.call(this, $layer, isEditorStart);
|
13171 |
|
13172 |
this.initUI();
|
13173 |
|
13174 |
this._onReady();
|
13175 |
+
};
|
13176 |
|
13177 |
Layer.prototype.startItem = function () {
|
13178 |
var $item = this.layer.find('.n2-ss-item');
|
13179 |
|
13180 |
+
new N2Classes[this.itemEditor.getItemClass($item.data('item'))]($item, this, this.itemEditor);
|
13181 |
|
13182 |
+
this.layer.nUICanvasItem({
|
13183 |
+
canvasUIManager: this.fragmentEditor.mainContainer.canvasUIManager,
|
13184 |
layer: this,
|
13185 |
$layer: this.layer
|
13186 |
});
|
13188 |
if (this.item.needSize) {
|
13189 |
this.layer.addClass('n2-ss-layer-needsize');
|
13190 |
}
|
13191 |
+
};
|
13192 |
|
13193 |
Layer.prototype.initUI = function () {
|
13194 |
|
13195 |
this.layer.on({
|
13196 |
+
mousedown: $.proxy(N2Classes.WindowManager.setMouseDownArea, null, 'layerClicked'),
|
13197 |
click: $.proxy(function (e) {
|
13198 |
+
if (this.fragmentEditor.preventActivationBubbling()) {
|
13199 |
this.activate(e);
|
13200 |
}
|
13201 |
}, this),
|
13202 |
dblclick: $.proxy(function (e) {
|
13203 |
+
if (!N2Classes.WindowManager.get().isPreventDblClick) {
|
13204 |
e.stopPropagation();
|
13205 |
$('[data-tab="item"]').trigger('click');
|
13206 |
this.item.itemEditor.focusFirst('dblclick');
|
13207 |
}
|
13208 |
}, this)
|
13209 |
});
|
13210 |
+
};
|
13211 |
|
13212 |
Layer.prototype.getContent = function () {
|
13213 |
|
13217 |
$content = $content.find(selector);
|
13218 |
}
|
13219 |
return $content;
|
13220 |
+
};
|
13221 |
|
13222 |
Layer.prototype._createLayer = function () {
|
13223 |
return $('<div class="n2-ss-layer"></div>')
|
13224 |
+
.attr('data-sstype', this.type);
|
13225 |
+
};
|
13226 |
|
13227 |
Layer.prototype.createRow = function () {
|
13228 |
var status = $('<div class="n2-ss-layer-status"></div>'),
|
13233 |
|
13234 |
$('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(status).on('click', $.proxy(function (e) {
|
13235 |
e.preventDefault();
|
13236 |
+
if (this.status == N2Classes.ComponentAbstract.STATUS.HIDDEN) {
|
13237 |
this.setStatusNormal();
|
13238 |
} else {
|
13239 |
+
this.changeStatus(N2Classes.ComponentAbstract.STATUS.HIDDEN);
|
13240 |
}
|
13241 |
}, this));
|
13242 |
|
13254 |
*/
|
13255 |
Layer.prototype.activate = function (e, context, preventExitFromSelection) {
|
13256 |
|
13257 |
+
N2Classes.PluginActivatable.prototype.activate.call(this, e, context, preventExitFromSelection);
|
13258 |
|
13259 |
if (this.item) {
|
13260 |
this.item.activate(null, context);
|
13265 |
|
13266 |
Layer.prototype.getHTML = function (base64) {
|
13267 |
|
13268 |
+
var $node = N2Classes.ComponentAbstract.prototype.getHTML.call(this, base64);
|
13269 |
|
13270 |
var $item = this.item.getHTML(base64);
|
13271 |
$node.attr('style', $node.attr('style') + this.getStyleText())
|
13275 |
};
|
13276 |
|
13277 |
Layer.prototype.getData = function (params) {
|
13278 |
+
var data = N2Classes.ComponentAbstract.prototype.getData.call(this, params);
|
13279 |
|
13280 |
if (params.itemsIncluded) {
|
13281 |
data.item = this.item.getData();
|
13296 |
|
13297 |
Layer.prototype.getContents = function () {
|
13298 |
return this.item.$item;
|
13299 |
+
};
|
13300 |
|
13301 |
Layer.prototype.setSelf = function (self) {
|
13302 |
if (this.self != this) {
|
13304 |
}
|
13305 |
this.self = self;
|
13306 |
this.item.setSelf(self.item);
|
13307 |
+
};
|
13308 |
|
13309 |
Layer.prototype.getSelf = function () {
|
13310 |
if (this.self !== this) {
|
13311 |
this.self = this.self.getSelf();
|
13312 |
}
|
13313 |
return this.self;
|
13314 |
+
};
|
13315 |
|
13316 |
return Layer;
|
13317 |
});
|
13318 |
+
N2D('LayerAdvancedProperty', function ($, undefined) {
|
13319 |
+
"use strict";
|
13320 |
+
|
13321 |
+
/**
|
13322 |
+
* @memberOf N2Classes
|
13323 |
+
*
|
13324 |
+
* @param basename
|
13325 |
+
* @param def
|
13326 |
+
* @param modesDef
|
13327 |
+
* @param obj
|
13328 |
+
* @param propName
|
13329 |
+
* @constructor
|
13330 |
+
*/
|
13331 |
+
function LayerAdvancedProperty(basename, def, modesDef, obj, propName) {
|
13332 |
+
this.basename = basename;
|
13333 |
+
this.def = def;
|
13334 |
+
this.modesDef = modesDef;
|
13335 |
+
this.obj = obj;
|
13336 |
+
this.propName = propName;
|
13337 |
+
}
|
13338 |
+
|
13339 |
+
LayerAdvancedProperty.prototype.getBaseName = function () {
|
13340 |
+
return this.basename;
|
13341 |
+
};
|
13342 |
+
|
13343 |
+
/**
|
13344 |
+
*
|
13345 |
+
* @returns {object}
|
13346 |
+
*/
|
13347 |
+
LayerAdvancedProperty.prototype.getNames = function () {
|
13348 |
+
var a = {};
|
13349 |
+
a[this.basename] = this.def;
|
13350 |
+
for (var k in this.modesDef) {
|
13351 |
+
a[this.basename + k] = this.modesDef[k];
|
13352 |
+
}
|
13353 |
+
return a;
|
13354 |
+
};
|
13355 |
+
|
13356 |
+
LayerAdvancedProperty.prototype.getCurrentMode = function () {
|
13357 |
+
return this.obj[this.propName];
|
13358 |
+
};
|
13359 |
+
|
13360 |
+
LayerAdvancedProperty.prototype.getName = function () {
|
13361 |
+
var currentMode = this.getCurrentMode();
|
13362 |
+
if (currentMode !== '') {
|
13363 |
+
return this.basename + currentMode;
|
13364 |
+
}
|
13365 |
+
return this.basename;
|
13366 |
+
};
|
13367 |
+
|
13368 |
+
LayerAdvancedProperty.prototype.getDefault = function () {
|
13369 |
+
var currentMode = this.getCurrentMode();
|
13370 |
+
if (currentMode !== '') {
|
13371 |
+
return this.modesDef[currentMode];
|
13372 |
+
}
|
13373 |
+
return this.def;
|
13374 |
+
};
|
13375 |
+
|
13376 |
+
LayerAdvancedProperty.prototype.resetMode = function (name) {
|
13377 |
+
if (this.propName == name) {
|
13378 |
+
var currentMode = this.getCurrentMode();
|
13379 |
+
if (currentMode !== '') {
|
13380 |
+
var oldValue = this.obj.property[this.basename + currentMode];
|
13381 |
+
this.obj.property[this.basename + currentMode] = this.modesDef[currentMode];
|
13382 |
+
this.obj.syncAdvancedField(this.basename);
|
13383 |
+
|
13384 |
+
this.obj.render(this.basename + currentMode, oldValue, 'manager');
|
13385 |
+
}
|
13386 |
+
}
|
13387 |
+
};
|
13388 |
+
|
13389 |
+
return LayerAdvancedProperty;
|
13390 |
+
});
|
13391 |
+
N2D('MainContainer', ['LayerContainer'], function ($, undefined) {
|
13392 |
"use strict";
|
13393 |
|
13394 |
+
/**
|
13395 |
+
* @memberOf N2Classes
|
13396 |
+
*
|
13397 |
+
* @param {FragmentEditor} fragmentEditor
|
13398 |
+
* @constructor
|
13399 |
+
*/
|
13400 |
+
function MainContainer(fragmentEditor) {
|
13401 |
|
13402 |
this.baseSize = 16;
|
13403 |
|
13404 |
this.activeLayer = null;
|
13405 |
|
13406 |
+
this.$ = fragmentEditor.$;
|
13407 |
|
13408 |
this.isActiveGroupBlurred = true;
|
13409 |
|
13410 |
this.isMainGroup = true;
|
13411 |
+
this.fragmentEditor = fragmentEditor;
|
13412 |
+
this.layer = fragmentEditor.editor.getMainContainerElement();
|
13413 |
|
13414 |
+
this.layer.nUICanvas({
|
13415 |
mainContainer: this,
|
13416 |
tolerance: 5,
|
13417 |
smartguides: $.proxy(function (context) {
|
13418 |
context.$layer.triggerHandler('LayerParent');
|
13419 |
+
return this.fragmentEditor.getSnap();
|
13420 |
}, this),
|
13421 |
display: {
|
13422 |
hidden: true,
|
13423 |
show: $.proxy(function () {
|
13424 |
+
N2Classes.PositionDisplay.get().show('Canvas');
|
13425 |
}, this),
|
13426 |
update: $.proxy(function (e, position) {
|
13427 |
+
N2Classes.PositionDisplay.get().update(e, 'Canvas', 'L: ' + parseInt(position.left | 0) + 'px<br />T: ' + parseInt(position.top | 0) + 'px');
|
13428 |
|
13429 |
}, this),
|
13430 |
hide: $.proxy(function () {
|
13431 |
+
N2Classes.PositionDisplay.get().hide('Canvas');
|
13432 |
}, this)
|
13433 |
},
|
13434 |
start: $.proxy(function (e, ui) {
|
13435 |
+
this.fragmentEditor.canvasDragStart(e, ui);
|
13436 |
}, this),
|
13437 |
drag: $.proxy(function (e, ui) {
|
13438 |
+
this.fragmentEditor.canvasDragMove(e, ui);
|
13439 |
|
13440 |
if (ui.layer) ui.layer.placement.current.triggerLayerResized();
|
13441 |
}, this),
|
13442 |
stop: $.proxy(function (e, ui) {
|
13443 |
+
this.fragmentEditor.canvasDragStop(e, ui);
|
13444 |
|
13445 |
if (ui.layer) ui.layer.placement.current.triggerLayerResized();
|
13446 |
}, this)
|
13447 |
});
|
13448 |
+
this.canvasUIManager = this.layer.nUICanvas('instance');
|
13449 |
|
13450 |
+
this.layer.nUILayerList({
|
13451 |
mainContainer: this,
|
13452 |
$fixed: $('#n2-ss-layers'),
|
13453 |
$scrolled: $('#n2-ss-layer-list')
|
13454 |
});
|
13455 |
+
this.layerListUIManager = this.layer.nUILayerList('instance');
|
13456 |
|
13457 |
this.layer.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />');
|
13458 |
|
13459 |
+
this.container = new N2Classes.LayerContainer(this, $('#n2-ss-layer-list').find('ul'), 'absolute', '> .n2-ss-layer, > .n2-ss-layer-group', ['content', 'row', 'layer', 'group']);
|
13460 |
|
13461 |
this.layerRow = this.container.$ul;
|
13462 |
|
13467 |
|
13468 |
MainContainer.prototype.lateInit = function () {
|
13469 |
|
13470 |
+
this.container.startWithExistingNodes(true);
|
13471 |
|
13472 |
this.layer.parent().on('click', $.proxy(function () {
|
13473 |
+
if (this.fragmentEditor.shouldPreventActivationBubble) {
|
13474 |
this.blurActiveGroup();
|
13475 |
} else {
|
13476 |
this.unBlurActiveGroup();
|
13477 |
}
|
13478 |
+
this.fragmentEditor.allowActivation();
|
13479 |
}, this));
|
|
|
|
|
|
|
13480 |
};
|
13481 |
|
13482 |
+
MainContainer.prototype.onResize = function (ratios) {
|
|
|
13483 |
var sortedLayerList = this.getEverySortedLayers();
|
13484 |
|
13485 |
for (var i = 0; i < sortedLayerList.length; i++) {
|
13529 |
if (this.isActiveGroupBlurred) {
|
13530 |
var group = this,
|
13531 |
activeLayer = this.activeLayer;
|
13532 |
+
if (this.fragmentEditor.isGroup(activeLayer) || this.fragmentEditor.isCol(activeLayer) || this.fragmentEditor.isContent(activeLayer)) {
|
13533 |
group = activeLayer;
|
13534 |
+
} else if (this.fragmentEditor.isRow(activeLayer)) {
|
13535 |
group = activeLayer.container.getSortedLayers()[0];
|
13536 |
} else if (activeLayer) {
|
13537 |
group = activeLayer.group;
|
13538 |
}
|
13539 |
+
switch (this.fragmentEditor.currentEditorMode) {
|
13540 |
case 'content':
|
13541 |
if (group == this) {
|
13542 |
+
group = this.fragmentEditor.mainContent;
|
13543 |
}
|
13544 |
break;
|
13545 |
case 'canvas':
|
13546 |
+
if (group == this.fragmentEditor.mainContent) {
|
13547 |
group = this;
|
13548 |
}
|
13549 |
break;
|
13551 |
|
13552 |
return group;
|
13553 |
}
|
13554 |
+
switch (this.fragmentEditor.currentEditorMode) {
|
13555 |
case 'content':
|
13556 |
+
return this.fragmentEditor.mainContent;
|
13557 |
}
|
13558 |
return this;
|
13559 |
};
|
13580 |
|
13581 |
MainContainer.prototype.layerDeleted = function (layer) {
|
13582 |
|
13583 |
+
var i = this.fragmentEditor.selectedLayers.length;
|
13584 |
while (i--) {
|
13585 |
+
if (layer == this.fragmentEditor.selectedLayers[i]) {
|
13586 |
+
this.fragmentEditor.selectedLayers.splice(i, 1);
|
13587 |
}
|
13588 |
}
|
13589 |
|
13595 |
MainContainer.prototype._afterLayerDeletedDeBounced = NextendDeBounce(function (layer) {
|
13596 |
|
13597 |
if (!this.activeLayer || this.activeLayer.isDeleted) {
|
13598 |
+
this.fragmentEditor.resetActiveLayer();
|
13599 |
}
|
13600 |
}, 50);
|
13601 |
|
13628 |
return this;
|
13629 |
};
|
13630 |
|
13631 |
+
MainContainer.prototype.createLayerAnimations = function () {
|
13632 |
+
|
13633 |
+
var horizontalRatio = this.fragmentEditor.editor.getHorizontalRatio(),
|
13634 |
+
verticalRatio = this.fragmentEditor.editor.getVerticalRatio(),
|
13635 |
+
animations = [],
|
13636 |
+
children = this.container.getSortedLayers();
|
13637 |
for (var i = 0; i < children.length; i++) {
|
13638 |
animations.push.apply(animations, children[i].createLayerAnimations(horizontalRatio, verticalRatio));
|
13639 |
}
|
13641 |
};
|
13642 |
|
13643 |
MainContainer.prototype.getDroppables = function (exclude) {
|
13644 |
+
var editorMode = this.fragmentEditor.currentEditorMode,
|
13645 |
droppables = [],
|
13646 |
layers;
|
13647 |
|
13648 |
if (editorMode == 'canvas') {
|
13649 |
droppables.push(this.getDroppable());
|
13650 |
layers = this.container.getSortedLayers();
|
13651 |
+
var index = $.inArray(this.fragmentEditor.mainContent, layers);
|
13652 |
if (index > -1) {
|
13653 |
layers.splice(index, 1);
|
13654 |
}
|
13655 |
} else if (editorMode == 'content') {
|
13656 |
+
layers = [this.fragmentEditor.mainContent]
|
13657 |
}
|
13658 |
|
13659 |
for (var i = 0; i < layers.length; i++) {
|
13705 |
|
13706 |
this.deleteLayers();
|
13707 |
|
13708 |
+
this.fragmentEditor.mainContent.remove();
|
13709 |
|
13710 |
|
13711 |
for (var i = 0; i < layerNodes.length; i++) {
|
13712 |
layers.push(this.container.append(layerNodes[i]));
|
13713 |
}
|
13714 |
|
13715 |
+
this.fragmentEditor.refreshMode();
|
13716 |
|
13717 |
this.container.layerContainerElement.n2imagesLoaded()
|
13718 |
+
.always($.proxy(this.fragmentEditor.refreshMode, this.fragmentEditor));
|
13719 |
|
13720 |
if (!this.getSelectedLayer()) {
|
13721 |
if (layers.length > 0) {
|
13723 |
}
|
13724 |
}
|
13725 |
|
13726 |
+
if (N2Classes.History.get().isEnabled()) {
|
13727 |
+
N2Classes.History.get().addSimple(this, this.historyDeleteAll, this.historyReplaceLayers, [layersData, layers, this.container.getAllLayers()]);
|
13728 |
}
|
13729 |
|
13730 |
return layers;
|
13735 |
historicalLayers[i].getSelf().delete();
|
13736 |
}
|
13737 |
|
13738 |
+
this.fragmentEditor.mainContent.getSelf().remove();
|
13739 |
};
|
13740 |
|
13741 |
MainContainer.prototype.historyReplaceLayers = function (layersData, historicalLayers, historicalAllLayers) {
|
13757 |
layers.push(group.container.append(layerNodes[i]));
|
13758 |
}
|
13759 |
|
13760 |
+
this.fragmentEditor.refreshMode();
|
13761 |
|
13762 |
+
N2Classes.History.get().addSimple(this, this.historyDeleteLayers, this.historyAddLayers, [layersData, layers, group]);
|
13763 |
|
13764 |
return layers;
|
13765 |
};
|
13783 |
switch (layers[i].type) {
|
13784 |
case 'group':
|
13785 |
console.error('Group data to layer not implemented!');
|
13786 |
+
//new N2Classes.Group(this, this.mainContainer, false, layers[i].data, layers[i]);
|
13787 |
break;
|
13788 |
case 'row':
|
13789 |
nodes.push(this.buildRowNode(layers[i], $targetGroupContent));
|
13831 |
case 'object':
|
13832 |
this._idTranslation[layerData.parentid].done($.proxy(function ($_layer, originalID, newID) {
|
13833 |
$_layer.data('parentid', newID);
|
13834 |
+
}, this, $layer));
|
13835 |
break;
|
13836 |
default:
|
13837 |
layerData.parentid = '';
|
13842 |
|
13843 |
MainContainer.prototype.buildContentNode = function (layerData, $targetGroupContent) {
|
13844 |
|
13845 |
+
var $layer = $("<div class='n2-ss-layer' data-sstype='content'/>"),
|
13846 |
$content = $("<div class='n2-ss-section-main-content n2-ss-layer-content' />").appendTo($layer);
|
13847 |
for (var k in layerData) {
|
13848 |
$layer.data(k, layerData[k]);
|
13859 |
|
13860 |
MainContainer.prototype.buildRowNode = function (layerData, $targetGroupContent) {
|
13861 |
|
13862 |
+
var $layer = $("<div class='n2-ss-layer' data-sstype='row'/>"),
|
13863 |
$content = $("<div class='n2-ss-layer-row' />").appendTo($layer);
|
13864 |
|
13865 |
this._buildNodePrepareID($layer, layerData);
|
13878 |
|
13879 |
MainContainer.prototype.buildColNode = function (layerData, $targetGroupContent) {
|
13880 |
|
13881 |
+
var $layer = $("<div class='n2-ss-layer' data-sstype='col'/>"),
|
13882 |
$content = $("<div class='n2-ss-layer-col n2-ss-layer-content' />").appendTo($layer);
|
13883 |
for (var k in layerData) {
|
13884 |
$layer.data(k, layerData[k]);
|
13895 |
|
13896 |
MainContainer.prototype.buildLayerNode = function (layerData, $targetGroupContent) {
|
13897 |
|
13898 |
+
var $layer = $("<div class='n2-ss-layer' data-sstype='layer'></div>")
|
13899 |
.attr('style', layerData.style);
|
13900 |
|
13901 |
var storedIndex = 1;
|
13930 |
|
13931 |
return MainContainer;
|
13932 |
});
|
13933 |
+
N2D('Row', ['LayerContainer', 'ComponentAbstract'], function ($, undefined) {
|
13934 |
"use strict";
|
13935 |
|
13936 |
/**
|
13937 |
+
* @memberOf N2Classes
|
13938 |
+
*
|
13939 |
+
* @param fragmentEditor
|
13940 |
+
* @param group
|
13941 |
+
* @param properties
|
13942 |
* @constructor
|
13943 |
* @augments ComponentAbstract
|
|
|
13944 |
*/
|
13945 |
+
function Row(fragmentEditor, group, properties) {
|
13946 |
this.label = n2_('Row');
|
13947 |
this.type = 'row';
|
13948 |
|
13949 |
this._syncbgThrottled = NextendThrottle(this._syncbgThrottled, 50);
|
13950 |
|
13951 |
+
this.innerContainer = '> .n2-ss-layer-row > .n2-ss-layer-row-inner';
|
13952 |
+
|
13953 |
+
this.localStyle = [
|
13954 |
+
{
|
13955 |
+
group: 'normal', selector: '-inner', css: {
|
13956 |
+
transition: 'transition:all .3s;transition-property:border,background-image,background-color,border-radius,box-shadow;'
|
13957 |
+
}
|
13958 |
+
},
|
13959 |
+
{group: 'hover', selector: '-inner:HOVER', css: {}}
|
13960 |
+
];
|
13961 |
|
13962 |
this.columnsField = $('#layerrow-columns').data('field');
|
13963 |
|
13964 |
this.refreshUI = NextendDeBounce(this.refreshUI, 100);
|
13965 |
|
13966 |
+
this.stylemode = '';
|
13967 |
+
|
13968 |
+
N2Classes.ComponentAbstract.prototype.constructor.call(this, fragmentEditor, group, properties);
|
13969 |
|
13970 |
this.placement.allow('absolute');
|
13971 |
this.placement.allow('normal');
|
13972 |
}
|
13973 |
|
13974 |
+
Row.prototype = Object.create(N2Classes.ComponentAbstract.prototype);
|
13975 |
Row.prototype.constructor = Row;
|
13976 |
|
13977 |
Row.prototype.addProperties = function ($layer) {
|
13978 |
|
13979 |
this.createProperty('opened', 1, $layer, this);
|
13980 |
|
13981 |
+
N2Classes.ComponentAbstract.prototype.addProperties.call(this, $layer);
|
13982 |
+
|
13983 |
+
|
13984 |
+
this.createProperty('link', '#|*|_self', $layer);
|
13985 |
+
|
13986 |
this.createProperty('bgimage', '', $layer);
|
13987 |
this.createProperty('bgimagex', 50, $layer);
|
13988 |
this.createProperty('bgimagey', 50, $layer);
|
13989 |
this.createProperty('bgimageparallax', 0, $layer);
|
|
|
|
|
|
|
13990 |
|
13991 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('bgcolor', '00000000', {
|
13992 |
+
"-hover": undefined
|
13993 |
+
}, this, "stylemode"), $layer);
|
13994 |
+
|
13995 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('bgcolorgradient', 'off', {
|
13996 |
+
"-hover": undefined
|
13997 |
+
}, this, "stylemode"), $layer);
|
13998 |
+
|
13999 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('bgcolorgradientend', '00000000', {
|
14000 |
+
"-hover": undefined
|
14001 |
+
}, this, "stylemode"), $layer);
|
14002 |
+
|
14003 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('borderradius', 0, {
|
14004 |
+
"-hover": undefined
|
14005 |
+
}, this, "stylemode"), $layer);
|
14006 |
+
|
14007 |
+
this.createAdvancedProperty(new N2Classes.LayerAdvancedProperty('boxshadow', '0|*|0|*|0|*|0|*|00000080', {
|
14008 |
+
"-hover": undefined
|
14009 |
+
}, this, "stylemode"), $layer);
|
14010 |
|
14011 |
this.createProperty('fullwidth', 1, $layer);
|
14012 |
this.createProperty('stretch', 0, $layer);
|
14016 |
this.createDeviceProperty('padding', {desktopPortrait: '10|*|10|*|10|*|10|*|px+'}, $layer);
|
14017 |
this.createDeviceProperty('gutter', {desktopPortrait: 20}, $layer);
|
14018 |
this.createDeviceProperty('wrapafter', {desktopPortrait: 0, mobilePortrait: 1, mobileLandscape: 1}, $layer);
|
14019 |
+
|
14020 |
+
this.$.on('baseSizeUpdated.row', $.proxy(this._syncpadding, this));
|
14021 |
+
};
|
14022 |
|
14023 |
Row.prototype.historyDeleteSelf = function () {
|
14024 |
this.delete();
|
14025 |
+
};
|
14026 |
|
14027 |
Row.prototype.historyCreateSelf = function (historyGroup, preset, historyCols) {
|
14028 |
+
var newLayer = new N2Classes.Row(this.fragmentEditor, historyGroup.getSelf(), {});
|
14029 |
newLayer.create(preset);
|
14030 |
|
14031 |
this.setSelf(newLayer);
|
14034 |
for (var i = 0; i < newCols.length; i++) {
|
14035 |
historyCols[i].setSelf(newCols[i]);
|
14036 |
}
|
14037 |
+
};
|
14038 |
|
14039 |
Row.prototype.create = function (preset) {
|
14040 |
var cb,
|
14041 |
_createRawRow = function (cols) {
|
14042 |
+
return $("<div class='n2-ss-layer' />")
|
14043 |
+
.append($("<div class='n2-ss-layer-row' />")
|
14044 |
+
.append($("<div class='n2-ss-layer-row-inner' />")
|
14045 |
+
.append(cols)))
|
14046 |
+
.attr('data-sstype', 'row');
|
14047 |
},
|
14048 |
_createRawCol = function (inner) {
|
14049 |
+
return $("<div class='n2-ss-layer' data-sstype='col'/>").append($("<div class='n2-ss-layer-col n2-ss-layer-content' />").append(inner));
|
14050 |
};
|
14051 |
switch (preset) {
|
14052 |
case '2col':
|
14102 |
};
|
14103 |
}
|
14104 |
|
14105 |
+
if (this.group.container.allowedPlacementMode === 'absolute') {
|
14106 |
this.originalProperties = $.extend({
|
14107 |
width: '100%',
|
14108 |
align: 'center',
|
14111 |
}, this.originalProperties);
|
14112 |
}
|
14113 |
|
14114 |
+
N2Classes.ComponentAbstract.prototype.create.call(this, cb, true);
|
14115 |
|
14116 |
this.initUI();
|
14117 |
|
14118 |
+
this.container.startWithExistingNodes(false);
|
14119 |
|
14120 |
this._syncpadding();
|
14121 |
this._syncinneralign();
|
14130 |
this.container.renderModeProperties();
|
14131 |
|
14132 |
|
14133 |
+
N2Classes.History.get().addSimple(this, this.historyDeleteSelf, this.historyCreateSelf, [this.group, preset, this.container.getSortedLayers()]);
|
14134 |
|
14135 |
this._onReady();
|
14136 |
+
};
|
14137 |
|
14138 |
+
Row.prototype.load = function ($layer, isEditorStart) {
|
14139 |
|
14140 |
+
N2Classes.ComponentAbstract.prototype.load.call(this, $layer, isEditorStart);
|
14141 |
|
14142 |
this.initUI();
|
14143 |
|
14144 |
+
this.container.startWithExistingNodes(isEditorStart);
|
14145 |
|
14146 |
this._syncpadding();
|
14147 |
this._syncinneralign();
|
14152 |
this._syncboxshadow();
|
14153 |
|
14154 |
this._onReady();
|
14155 |
+
};
|
14156 |
|
14157 |
Row.prototype.initUI = function () {
|
14158 |
|
14159 |
+
this.layer.nUICanvasItem({
|
14160 |
+
canvasUIManager: this.fragmentEditor.mainContainer.canvasUIManager,
|
14161 |
layer: this,
|
14162 |
$layer: this.layer
|
14163 |
});
|
14164 |
|
14165 |
this.layer.on({
|
14166 |
+
mousedown: $.proxy(N2Classes.WindowManager.setMouseDownArea, null, 'layerClicked'),
|
14167 |
click: $.proxy(function (e) {
|
14168 |
+
if (!nextend.shouldPreventMouseUp && this.fragmentEditor.preventActivationBubbling()) {
|
14169 |
this.activate(e);
|
14170 |
}
|
14171 |
}, this),
|
14175 |
}, this)
|
14176 |
});
|
14177 |
|
14178 |
+
this.$row.nUISpacing({
|
14179 |
handles: 'n, s, e, w',
|
14180 |
start: $.proxy(function (e, ui) {
|
14181 |
+
N2Classes.PositionDisplay.get().show('Spacing');
|
14182 |
}, this),
|
14183 |
spacing: $.proxy(function (e, ui) {
|
14184 |
var html = '';
|
14185 |
for (var k in ui.changed) {
|
14186 |
html += 'Padding ' + k + ': ' + ui.changed[k] + 'px<br>';
|
14187 |
}
|
14188 |
+
N2Classes.PositionDisplay.get().update(e, 'Spacing', html);
|
14189 |
}, this),
|
14190 |
stop: $.proxy(this.____makeLayerResizeableStop, this),
|
14191 |
});
|
14192 |
|
14193 |
+
this.$row.nUIColumns({
|
14194 |
columns: '1',
|
14195 |
gutter: this.getGutter(),
|
14196 |
start: $.proxy(function (e, ui) {
|
14197 |
+
N2Classes.PositionDisplay.get().show('Columns');
|
14198 |
}, this),
|
14199 |
colwidth: $.proxy(function (e, ui) {
|
14200 |
this.updateColumnWidth(ui.currentPercent);
|
14201 |
|
14202 |
+
N2Classes.PositionDisplay.get().update(e, 'Columns', Math.round(ui.currentPercent[ui.index] * 100) + '% — ' + Math.round(ui.currentPercent[ui.index + 1] * 100) + '%');
|
14203 |
|
14204 |
|
14205 |
}, this),
|
14206 |
stop: $.proxy(function (e, ui) {
|
14207 |
+
N2Classes.PositionDisplay.get().hide('Columns');
|
14208 |
|
14209 |
this.setRealColsWidth(ui.currentFractions);
|
14210 |
}, this)
|
14211 |
});
|
14212 |
|
14213 |
+
var context = {};
|
14214 |
+
|
14215 |
+
this.$rowInner.nUISortableRow({
|
14216 |
distance: 10,
|
14217 |
+
helper: 'clone_hide',
|
14218 |
forceHelperSize: true,
|
14219 |
forcePlaceholderSize: true,
|
14220 |
items: '> .n2-ss-layer',
|
14221 |
handle: " > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self",
|
14222 |
start: $.proxy(function (e, ui) {
|
14223 |
+
context.originalPrevLayer = ui.item.prevAll('.n2-ss-layer').not(ui.placeholder).first()
|
14224 |
+
.data('layerObject');
|
14225 |
|
14226 |
var parts = this.getColumns().split('+');
|
14227 |
|
14228 |
ui.placeholder.css({
|
14229 |
width: ((new Fraction(parts[ui.item.data('layerObject').getIndex()])).valueOf() * 100) + '%',
|
|
|
14230 |
visibility: 'visible',
|
14231 |
+
margin: this.getGutter() + 'px'
|
|
|
14232 |
});
|
14233 |
if (ui.helper.hasClass('n2-ss-last-in-row')) {
|
14234 |
ui.placeholder.addClass('n2-ss-last-in-row');
|
14239 |
ui.placeholder.attr('data-r', ui.helper.attr('data-r'));
|
14240 |
|
14241 |
}, this),
|
14242 |
+
beforestop: $.proxy(function (e, ui) {
|
14243 |
+
ui.placeholder.detach();
|
14244 |
+
context.layer = ui.item.data('layerObject');
|
14245 |
+
context.oldIndex = context.layer.getOrderedIndex();
|
14246 |
+
}, this),
|
14247 |
stop: $.proxy(function (e, ui) {
|
14248 |
+
var layer = context.layer,
|
14249 |
+
oldIndex = context.oldIndex,
|
14250 |
+
newIndex = 0;
|
14251 |
|
14252 |
+
if (context.originalPrevLayer) {
|
14253 |
+
layer.layer.insertAfter(context.originalPrevLayer.layer);
|
14254 |
+
} else {
|
14255 |
+
layer.layer.prependTo(layer.group.container.layerContainerElement);
|
14256 |
+
}
|
14257 |
|
14258 |
+
switch (ui.lastPosition[1]) {
|
14259 |
+
case 'before':
|
14260 |
+
newIndex = ui.lastPosition[0].data('layerObject').getOrderedIndex();
|
14261 |
+
if (newIndex > oldIndex) {
|
14262 |
+
newIndex--;
|
14263 |
+
}
|
14264 |
+
break;
|
14265 |
+
case 'after':
|
14266 |
+
newIndex = ui.lastPosition[0].data('layerObject').getOrderedIndex();
|
14267 |
+
if (newIndex < oldIndex) {
|
14268 |
+
newIndex++;
|
14269 |
+
}
|
14270 |
+
break;
|
14271 |
}
|
14272 |
+
if (oldIndex !== newIndex) {
|
14273 |
this.moveCol(oldIndex, newIndex);
|
14274 |
}
|
14275 |
}, this)
|
14276 |
});
|
14277 |
+
};
|
14278 |
|
14279 |
Row.prototype.____makeLayerResizeableStop = function (event, ui) {
|
14280 |
+
N2Classes.PositionDisplay.get().hide('Spacing');
|
14281 |
var padding = this.getPadding().split('|*|'),
|
14282 |
ratioH = 1,
|
14283 |
ratioV = 1;
|
14284 |
|
14285 |
if (padding[padding.length - 1] == 'px+' && Math.abs(parseFloat(this.layer.css('fontSize')) - this.baseSize) > 1) {
|
14286 |
+
ratioH = this.fragmentEditor.getResponsiveRatioHorizontal();
|
14287 |
+
ratioV = this.fragmentEditor.getResponsiveRatioVertical();
|
14288 |
}
|
14289 |
|
14290 |
for (var k in ui.changed) {
|
14309 |
};
|
14310 |
|
14311 |
Row.prototype._createLayer = function () {
|
14312 |
+
return $('<div class="n2-ss-layer"><div class="n2-ss-layer-row"><div class="n2-ss-layer-row-inner"></div></div></div>')
|
14313 |
+
.attr('data-sstype', this.type);
|
14314 |
+
};
|
14315 |
|
14316 |
Row.prototype.historyDeleteCol = function (historicalRow, historicalCol) {
|
14317 |
historicalCol.getSelf().delete();
|
14318 |
+
};
|
14319 |
|
14320 |
Row.prototype.historyCreateCol = function (historicalRow, historicalCol) {
|
14321 |
var newCol = historicalRow.getSelf().createCol();
|
14322 |
historicalCol.setSelf(newCol);
|
14323 |
+
};
|
14324 |
|
14325 |
Row.prototype.createCol = function () {
|
14326 |
|
14327 |
+
var col = new N2Classes.Col(this.fragmentEditor, this, {});
|
14328 |
+
N2Classes.History.get().addSimple(this, this.historyDeleteCol, this.historyCreateCol, [this, col]);
|
14329 |
col.create();
|
14330 |
if (this.isReady()) {
|
14331 |
this.placement.updatePosition();
|
14332 |
}
|
14333 |
|
14334 |
return col;
|
14335 |
+
};
|
14336 |
|
14337 |
Row.prototype.createRow = function () {
|
14338 |
this.$row = this.layer.find('.n2-ss-layer-row:first');
|
14339 |
+
this.$rowInner = this.$row.find('.n2-ss-layer-row-inner:first');
|
14340 |
+
|
14341 |
+
//Fix for Slide Library 3.2 --> 3.3 change
|
14342 |
+
if (this.$rowInner.length === 0) {
|
14343 |
+
this.$rowInner = $('<div class="n2-ss-layer-row-inner"></div>').append(this.$row.find('> *')).appendTo(this.$row);
|
14344 |
+
}
|
14345 |
+
|
14346 |
+
this.container = new N2Classes.LayerContainer(this, $('<ul class="n2-list n2-h4 n2-list-orderable" />'), 'default', ' > .n2-ss-layer', ['col']);
|
14347 |
+
this.container.setLayerContainerElement(this.$rowInner);
|
14348 |
+
|
14349 |
+
this.addClassElement(this.layer);
|
14350 |
+
this.addClassElement(this.$row, '-inner');
|
14351 |
|
14352 |
var status = $('<div class="n2-ss-layer-status"></div>'),
|
14353 |
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)),
|
14357 |
|
14358 |
$('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(status).on('click', $.proxy(function (e) {
|
14359 |
e.preventDefault();
|
14360 |
+
if (this.status == N2Classes.ComponentAbstract.STATUS.HIDDEN) {
|
14361 |
this.setStatusNormal();
|
14362 |
} else {
|
14363 |
+
this.changeStatus(N2Classes.ComponentAbstract.STATUS.HIDDEN);
|
14364 |
}
|
14365 |
}, this));
|
14366 |
|
14376 |
this.container.$ul.appendTo(this.layerRow);
|
14377 |
|
14378 |
this.readyDeferred.done($.proxy(this._syncopened, this));
|
14379 |
+
};
|
14380 |
+
|
14381 |
Row.prototype.activate = function () {
|
14382 |
+
N2Classes.PluginActivatable.prototype.activate.apply(this, arguments);
|
14383 |
|
14384 |
this.columnsField.setRow(this);
|
14385 |
+
};
|
14386 |
|
14387 |
Row.prototype.switchOpened = function (e) {
|
14388 |
e.preventDefault();
|
14414 |
columns.push(layers[i].getProperty('colwidth'));
|
14415 |
}
|
14416 |
return columns.join('+');
|
14417 |
+
};
|
14418 |
|
14419 |
Row.prototype.getColumnsOrdered = function () {
|
14420 |
var layers = this.getOrderedColumns(),
|
14423 |
columns.push(layers[i].getProperty('colwidth'));
|
14424 |
}
|
14425 |
return columns.join('+');
|
14426 |
+
};
|
14427 |
|
14428 |
Row.prototype._synccolumns = function () {
|
14429 |
var layers = this.container.getSortedLayers();
|
14431 |
layers[i]._synccolwidth();
|
14432 |
}
|
14433 |
this.update();
|
14434 |
+
};
|
14435 |
|
14436 |
Row.prototype.getPadding = function () {
|
14437 |
return this.getProperty('padding');
|
14438 |
+
};
|
14439 |
|
14440 |
Row.prototype._syncpadding = function () {
|
14441 |
var padding = this.getPadding().split('|*|'),
|
14451 |
|
14452 |
var css = padding.join(unit + ' ') + unit;
|
14453 |
this.$row.css('padding', css);
|
14454 |
+
this.$row.nUISpacing('option', 'current', css);
|
14455 |
|
14456 |
this.update();
|
14457 |
+
};
|
14458 |
|
14459 |
Row.prototype.getGutter = function () {
|
14460 |
return this.getProperty('gutter');
|
14461 |
+
};
|
14462 |
|
14463 |
Row.prototype._syncgutter = function () {
|
14464 |
+
var gutterValue = this.getGutter(),
|
14465 |
+
sideGutterValue = gutterValue / 2,
|
14466 |
cols = this.container.getSortedLayers();
|
14467 |
if (cols.length > 0) {
|
14468 |
for (var i = cols.length - 1; i >= 0; i--) {
|
14469 |
cols[i].layer
|
14470 |
+
.css('margin', sideGutterValue + 'px');
|
|
|
14471 |
}
|
14472 |
}
|
14473 |
+
|
14474 |
+
this.$rowInner.css({
|
14475 |
+
width: 'calc(100% + ' + gutterValue + 'px)',
|
14476 |
+
margin: -sideGutterValue + 'px'
|
14477 |
+
});
|
14478 |
+
|
14479 |
+
this.$row.nUIColumns('option', 'gutter', this.getGutter());
|
14480 |
+
|
14481 |
+
this._syncwrapafter();
|
14482 |
+
|
14483 |
this.update();
|
14484 |
+
};
|
14485 |
|
14486 |
Row.prototype._syncwrapafter = function () {
|
14487 |
if (!this.isDeleted && !this.isDeleteStarted) {
|
14488 |
var wrapAfter = parseInt(this.getProperty('wrapafter')),
|
14489 |
columns = this.getOrderedColumns(),
|
14490 |
+
isWrapped = false,
|
14491 |
+
i;
|
14492 |
|
14493 |
+
for (i = columns.length - 1; i >= 0; i--) {
|
14494 |
if (!columns[i].showsOnCurrent) {
|
14495 |
columns.splice(i, 1);
|
14496 |
}
|
14497 |
}
|
14498 |
|
14499 |
+
// columnsLength can be 0 if all the columns hidden in the row
|
14500 |
+
var columnsLength = columns.length;
|
14501 |
|
14502 |
+
if (wrapAfter > 0 && wrapAfter < columnsLength) {
|
14503 |
isWrapped = true;
|
14504 |
}
|
14505 |
|
14506 |
+
this.$row.attr('row-wrapped', isWrapped ? 1 : 0);
|
|
|
|
|
14507 |
|
14508 |
if (isWrapped) {
|
14509 |
+
var flexLines = [];
|
14510 |
+
for (i = 0; i < columnsLength; i++) {
|
14511 |
+
var row = Math.floor(i / wrapAfter);
|
14512 |
+
if (typeof flexLines[row] === 'undefined') {
|
14513 |
+
flexLines[row] = [];
|
14514 |
+
}
|
14515 |
+
flexLines[row].push(columns[i]);
|
14516 |
+
columns[i].layer
|
14517 |
+
.attr('data-r', row)
|
14518 |
+
.toggleClass('n2-ss-last-in-row', (i + 1) % wrapAfter === 0 || i === columnsLength - 1);
|
14519 |
+
}
|
14520 |
+
|
14521 |
+
var gutterValue = this.getGutter();
|
14522 |
+
for (i = 0; i < flexLines.length; i++) {
|
14523 |
+
var flexLine = flexLines[i],
|
14524 |
+
sumWidth = 0,
|
14525 |
+
j;
|
14526 |
+
for (j = 0; j < flexLine.length; j++) {
|
14527 |
+
sumWidth += flexLine[j].getWidthPercentage();
|
14528 |
+
}
|
14529 |
+
for (j = 0; j < flexLine.length; j++) {
|
14530 |
+
flexLine[j].layer.css('width', 'calc(' + (flexLine[j].getWidthPercentage() / sumWidth * 100) + '% - ' + gutterValue + 'px)');
|
14531 |
}
|
14532 |
}
|
14533 |
} else {
|
14534 |
+
var sumWidth = 0;
|
14535 |
+
for (i = 0; i < columnsLength; i++) {
|
14536 |
+
sumWidth += columns[i].getWidthPercentage();
|
14537 |
+
}
|
14538 |
+
for (i = 0; i < columnsLength; i++) {
|
14539 |
columns[i].layer
|
14540 |
+
.css('width', (columns[i].getWidthPercentage() / sumWidth * 100) + '%')
|
14541 |
.removeClass('n2-ss-last-in-row')
|
14542 |
.attr('data-r', 0);
|
14543 |
}
|
14544 |
+
if (columnsLength > 0) {
|
14545 |
+
columns[columnsLength - 1].layer.addClass('n2-ss-last-in-row');
|
|
|
|
|
14546 |
}
|
14547 |
}
|
14548 |
|
14549 |
this.update();
|
14550 |
}
|
14551 |
+
};
|
14552 |
|
14553 |
Row.prototype.getOrderedColumns = function () {
|
14554 |
return this.container.getSortedLayers().sort(function (a, b) {
|
14555 |
return a.getRealOrder() - b.getRealOrder();
|
14556 |
});
|
14557 |
+
};
|
14558 |
|
14559 |
Row.prototype.getInnerAlign = function () {
|
14560 |
return this.getProperty('inneralign');
|
14561 |
+
};
|
14562 |
|
14563 |
Row.prototype._syncinneralign = function () {
|
14564 |
this.layer.attr('data-csstextalign', this.getInnerAlign());
|
14565 |
+
};
|
14566 |
|
14567 |
Row.prototype._syncfullwidth = function () {
|
14568 |
+
this.layer.attr('data-frontend-fullwidth', this.getProperty('fullwidth') == 0 ? '0' : '1')
|
14569 |
+
};
|
14570 |
|
14571 |
Row.prototype._syncstretch = function () {
|
14572 |
this.layer.toggleClass('n2-ss-stretch-layer', this.getProperty('stretch') == 1);
|
14573 |
+
};
|
14574 |
|
14575 |
+
Row.prototype._syncborderradius =
|
14576 |
+
Row.prototype['_syncborderradius-hover'] = function () {
|
14577 |
+
var borderRadius = this.getProperty('borderradius');
|
14578 |
+
if (borderRadius > 0) {
|
14579 |
+
this.addLocalStyle('normal', 'borderradius', 'border-radius:' + borderRadius + 'px;');
|
14580 |
+
}
|
14581 |
+
|
14582 |
+
var borderRadiusHover = this.getProperty('borderradius-hover');
|
14583 |
+
if (borderRadiusHover && borderRadiusHover != borderRadius) {
|
14584 |
+
this.addLocalStyle('hover', 'borderradius', 'border-radius:' + borderRadiusHover + 'px;');
|
14585 |
+
}
|
14586 |
+
};
|
14587 |
+
|
14588 |
+
Row.prototype._syncboxshadow =
|
14589 |
+
Row.prototype['_syncboxshadow-hover'] = function () {
|
14590 |
+
var boxShadow = this.getProperty('boxshadow');
|
14591 |
+
this.addLocalStyle('normal', 'boxshadow', this.getBoxShadowCSS(boxShadow.split('|*|')));
|
14592 |
+
|
14593 |
+
var hoverStyle = '',
|
14594 |
+
boxShadowHover = this.getProperty('boxshadow-hover');
|
14595 |
+
if (boxShadowHover !== undefined && boxShadowHover != boxShadow) {
|
14596 |
+
hoverStyle = this.getBoxShadowCSS(boxShadowHover.split('|*|'));
|
14597 |
+
}
|
14598 |
+
this.addLocalStyle('hover', 'boxshadow', hoverStyle);
|
14599 |
+
};
|
14600 |
|
14601 |
+
Row.prototype.getBoxShadowCSS = function (boxShadow) {
|
|
|
14602 |
if ((boxShadow[0] != 0 || boxShadow[1] != 0 || boxShadow[2] != 0 || boxShadow[3] != 0) && N2Color.hex2alpha(boxShadow[4]) != 0) {
|
14603 |
+
return 'box-shadow:' + boxShadow[0] + 'px ' + boxShadow[1] + 'px ' + boxShadow[2] + 'px ' + boxShadow[3] + 'px ' + N2Color.hex2rgbaCSS(boxShadow[4]) + ';';
|
|
|
|
|
14604 |
}
|
14605 |
+
return '';
|
14606 |
+
};
|
14607 |
+
|
14608 |
+
Row.prototype._synclink = function () {
|
14609 |
+
};
|
14610 |
|
14611 |
Row.prototype._syncbgimage =
|
14612 |
Row.prototype._syncbgimagex =
|
14614 |
Row.prototype._syncbgimageparallax =
|
14615 |
Row.prototype._syncbgcolor =
|
14616 |
Row.prototype._syncbgcolorgradient =
|
14617 |
+
Row.prototype._syncbgcolorgradientend =
|
14618 |
+
Row.prototype['_syncbgcolor-hover'] =
|
14619 |
+
Row.prototype['_syncbgcolorgradient-hover'] =
|
14620 |
+
Row.prototype['_syncbgcolorgradientend-hover'] = function () {
|
14621 |
+
this._syncbgThrottled();
|
14622 |
+
};
|
14623 |
+
|
14624 |
|
14625 |
Row.prototype._syncbgThrottled = function () {
|
14626 |
var background = '',
|
14627 |
+
image = this.fragmentEditor.editor.generator.fill(this.getProperty('bgimage')),
|
14628 |
+
gradientBackgroundProps = '';
|
14629 |
if (image != '') {
|
14630 |
var x = parseInt(this.getProperty('bgimagex'));
|
14631 |
if (!isFinite(x)) {
|
14635 |
if (!isFinite(y)) {
|
14636 |
y = 50;
|
14637 |
}
|
14638 |
+
background += 'URL("' + nextend.imageHelper.fixed(image) + '") ' + x + '% ' + y + '% / cover no-repeat' + (this.getProperty('bgimageparallax') == 1 ? ' fixed' : '');
|
14639 |
+
gradientBackgroundProps = ' ' + x + '% ' + y + '% / cover no-repeat' + (this.getProperty('bgimageparallax') == 1 ? ' fixed' : '');
|
14640 |
}
|
14641 |
var color = this.getProperty('bgcolor'),
|
14642 |
gradient = this.getProperty('bgcolorgradient'),
|
14643 |
colorend = this.getProperty('bgcolorgradientend');
|
14644 |
|
14645 |
+
var normalStyle = this.getBackgroundCSS(color, gradient, colorend, background, gradientBackgroundProps);
|
14646 |
+
|
14647 |
+
this.addLocalStyle('normal', 'bgcolor', normalStyle);
|
14648 |
+
|
14649 |
+
|
14650 |
+
var hoverStyle = '',
|
14651 |
+
isHoverDifferent = false,
|
14652 |
+
colorHover = this.getProperty('bgcolor-hover'),
|
14653 |
+
gradientHover = this.getProperty('bgcolorgradient-hover'),
|
14654 |
+
colorendHover = this.getProperty('bgcolorgradientend-hover');
|
14655 |
+
|
14656 |
+
if (colorHover !== undefined && colorHover != color) {
|
14657 |
+
isHoverDifferent = true;
|
14658 |
+
}
|
14659 |
+
if (gradientHover !== undefined && gradientHover != gradient) {
|
14660 |
+
isHoverDifferent = true;
|
14661 |
+
}
|
14662 |
+
if (colorendHover !== undefined && colorendHover != colorend) {
|
14663 |
+
isHoverDifferent = true;
|
14664 |
+
}
|
14665 |
+
|
14666 |
+
if (isHoverDifferent) {
|
14667 |
+
if (colorHover === undefined) {
|
14668 |
+
colorHover = color;
|
14669 |
+
}
|
14670 |
+
if (gradientHover === undefined) {
|
14671 |
+
gradientHover = gradient;
|
14672 |
+
}
|
14673 |
+
if (colorendHover === undefined) {
|
14674 |
+
colorendHover = colorend;
|
14675 |
+
}
|
14676 |
+
hoverStyle = this.getBackgroundCSS(colorHover, gradientHover, colorendHover, background, gradientBackgroundProps);
|
14677 |
+
}
|
14678 |
+
this.addLocalStyle('hover', 'bgcolor', hoverStyle);
|
14679 |
+
};
|
14680 |
+
|
14681 |
+
Row.prototype.getBackgroundCSS = function (color, gradient, colorend, backgroundImage, gradientBackgroundProps) {
|
14682 |
+
if (N2Color.hex2alpha(color) != 0 || (gradient != 'off' && N2Color.hex2alpha(colorend) != 0)) {
|
14683 |
var after = '';
|
14684 |
+
if (backgroundImage != '') {
|
14685 |
+
after = gradientBackgroundProps + ',' + backgroundImage;
|
14686 |
}
|
14687 |
switch (gradient) {
|
14688 |
case 'horizontal':
|
14689 |
+
return 'background:-moz-linear-gradient(left, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14690 |
+
+ 'background:-webkit-linear-gradient(left, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14691 |
+
+ 'background:linear-gradient(to right, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
14692 |
case 'vertical':
|
14693 |
+
return 'background:-moz-linear-gradient(top, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14694 |
+
+ 'background:-webkit-linear-gradient(top, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14695 |
+
+ 'background:linear-gradient(to bottom, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
14696 |
case 'diagonal1':
|
14697 |
+
return 'background:-moz-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14698 |
+
+ 'background:-webkit-linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14699 |
+
+ 'background:linear-gradient(45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
14700 |
case 'diagonal2':
|
14701 |
+
return 'background:-moz-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14702 |
+
+ 'background:-webkit-linear-gradient(-45deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';'
|
14703 |
+
+ 'background:linear-gradient(135deg, ' + N2Color.hex2rgbaCSS(color) + ' 0%,' + N2Color.hex2rgbaCSS(colorend) + ' 100%)' + after + ';';
|
|
|
|
|
14704 |
case 'off':
|
14705 |
default:
|
14706 |
+
if (backgroundImage != '') {
|
14707 |
+
return "background: linear-gradient(" + N2Color.hex2rgbaCSS(color) + ", " + N2Color.hex2rgbaCSS(color) + ")" + after + ';';
|
|
|
|
|
14708 |
}
|
14709 |
+
return 'background:' + N2Color.hex2rgbaCSS(color) + ';';
|
|
|
14710 |
}
|
14711 |
+
} else if (backgroundImage != '') {
|
14712 |
+
return 'background:' + backgroundImage + ';';
|
14713 |
}
|
14714 |
+
return '';
|
14715 |
};
|
14716 |
|
14717 |
Row.prototype.getData = function (params) {
|
14718 |
+
var data = N2Classes.ComponentAbstract.prototype.getData.call(this, params);
|
14719 |
|
14720 |
if (params.itemsIncluded) {
|
14721 |
data.cols = this.container.getData(params);
|
14734 |
if (this.getMode() == 'desktopPortrait') {
|
14735 |
this._moveCol(oldIndex, newIndex);
|
14736 |
|
14737 |
+
var task = N2Classes.History.get().addValue(this, this.historyMoveCol, []);
|
14738 |
if (task) {
|
14739 |
task.setValues({
|
14740 |
oldIndex: newIndex,
|
14754 |
}
|
14755 |
this.refreshUI();
|
14756 |
}
|
14757 |
+
};
|
14758 |
+
|
14759 |
Row.prototype._moveCol = function (oldIndex, newIndex) {
|
14760 |
|
14761 |
var layers = this.container.getSortedLayers();
|
|
|
|
|
|
|
14762 |
this.container.insertLayerAt(layers[oldIndex], newIndex);
|
14763 |
|
14764 |
this.refreshUI();
|
14765 |
+
};
|
14766 |
|
14767 |
Row.prototype.historyMoveCol = function (data) {
|
14768 |
|
14769 |
this._moveCol(data.oldIndex, data.newIndex);
|
14770 |
+
};
|
14771 |
|
14772 |
Row.prototype.setColsWidth = function (fractions) {
|
14773 |
var cols = this.container.getSortedLayers();
|
14774 |
for (var i = 0; i < fractions.length; i++) {
|
14775 |
cols[i].setProperty('colwidth', fractions[i].toFraction());
|
14776 |
}
|
14777 |
+
|
14778 |
+
this._syncwrapafter();
|
14779 |
this.update();
|
14780 |
|
14781 |
this.refreshUI();
|
14782 |
+
};
|
14783 |
|
14784 |
Row.prototype.setRealColsWidth = function (fractions) {
|
14785 |
var cols = this.getOrderedColumns();
|
14786 |
for (var i = 0; i < fractions.length; i++) {
|
14787 |
cols[i].setProperty('colwidth', fractions[i].toFraction());
|
14788 |
}
|
14789 |
+
|
14790 |
+
this._syncwrapafter();
|
14791 |
this.update();
|
14792 |
|
14793 |
this.refreshUI();
|
14794 |
+
};
|
14795 |
|
14796 |
Row.prototype.updateColumnWidth = function (widths) {
|
14797 |
+
var wrapAfter = parseInt(this.getProperty('wrapafter')),
|
14798 |
+
columns = this.getOrderedColumns(),
|
14799 |
+
i;
|
14800 |
+
|
14801 |
+
for (i = columns.length - 1; i >= 0; i--) {
|
14802 |
+
if (!columns[i].showsOnCurrent) {
|
14803 |
+
columns.splice(i, 1);
|
14804 |
+
widths.splice(i, 1);
|
14805 |
+
}
|
14806 |
}
|
14807 |
+
|
14808 |
+
var columnsLength = columns.length;
|
14809 |
+
|
14810 |
+
if (wrapAfter > 0 && wrapAfter < columnsLength) {
|
14811 |
+
var flexLines = [];
|
14812 |
+
for (i = 0; i < columnsLength; i++) {
|
14813 |
+
var row = Math.floor(i / wrapAfter);
|
14814 |
+
if (typeof flexLines[row] === 'undefined') {
|
14815 |
+
flexLines[row] = [];
|
14816 |
+
}
|
14817 |
+
columns[i]._tempWidth = widths[i];
|
14818 |
+
flexLines[row].push(columns[i]);
|
14819 |
+
}
|
14820 |
+
|
14821 |
+
var gutterValue = this.getGutter();
|
14822 |
+
for (i = 0; i < flexLines.length; i++) {
|
14823 |
+
var flexLine = flexLines[i],
|
14824 |
+
sumWidth = 0,
|
14825 |
+
j;
|
14826 |
+
for (j = 0; j < flexLine.length; j++) {
|
14827 |
+
sumWidth += flexLine[j]._tempWidth;
|
14828 |
+
}
|
14829 |
+
for (j = 0; j < flexLine.length; j++) {
|
14830 |
+
flexLine[j].layer.css('width', 'calc(' + (flexLine[j]._tempWidth / sumWidth * 100) + '% - ' + gutterValue + 'px)');
|
14831 |
+
}
|
14832 |
+
}
|
14833 |
+
} else {
|
14834 |
+
for (i = 0; i < columnsLength; i++) {
|
14835 |
+
columns[i].layer.css('width', (widths[i] * 100) + '%');
|
14836 |
+
}
|
14837 |
+
}
|
14838 |
+
|
14839 |
+
this.update();
|
14840 |
+
};
|
14841 |
|
14842 |
Row.prototype.activateColumn = function (index, e) {
|
14843 |
this.container.getSortedLayers()[index].activate(e);
|
14844 |
+
};
|
14845 |
|
14846 |
Row.prototype.onChildCountChange = function () {
|
14847 |
if (!this.isDeleted && !this.isDeleteStarted) {
|
14866 |
this.refreshUI();
|
14867 |
}
|
14868 |
this._syncgutter();
|
|
|
14869 |
}
|
14870 |
+
};
|
14871 |
|
14872 |
Row.prototype.renderModeProperties = function (isReset) {
|
14873 |
+
N2Classes.ComponentAbstract.prototype.renderModeProperties.call(this, isReset);
|
14874 |
|
14875 |
this._syncpadding();
|
14876 |
this._syncinneralign();
|
|
|
14877 |
this._syncgutter();
|
14878 |
|
14879 |
if (this.isActive) {
|
14880 |
this.columnsField.setRow(this);
|
14881 |
}
|
14882 |
+
};
|
14883 |
|
14884 |
Row.prototype.hightlightStructure = function (hideInterval) {
|
14885 |
|
14894 |
this.layer.removeClass('n2-highlight-structure');
|
14895 |
}
|
14896 |
}, this), hideInterval);
|
14897 |
+
};
|
14898 |
|
14899 |
Row.prototype.refreshUI = function () {
|
14900 |
if (!this.isDeleteStarted) {
|
14902 |
this.columnsField.setRow(this);
|
14903 |
}
|
14904 |
this._syncwrapafter();
|
14905 |
+
this.$row.nUIColumns('option', 'columns', this.getColumnsOrdered());
|
14906 |
}
|
14907 |
+
};
|
14908 |
|
14909 |
Row.prototype.getDroppable = function () {
|
14910 |
if (!this.layer.is(":visible") || this.status == N2Classes.ComponentAbstract.STATUS.HIDDEN || this.status == N2Classes.ComponentAbstract.STATUS.LOCKED) {
|
14916 |
placement: 'normal',
|
14917 |
axis: 'x'
|
14918 |
}
|
14919 |
+
};
|
14920 |
|
14921 |
Row.prototype.getLLDroppable = function (layer) {
|
14922 |
switch (layer.type) {
|
14930 |
break;
|
14931 |
}
|
14932 |
return false;
|
14933 |
+
};
|
14934 |
|
14935 |
Row.prototype.getContents = function () {
|
14936 |
return this.$row;
|
14937 |
+
};
|
14938 |
+
|
14939 |
+
Row.prototype.setPropertystylemode = function (name, value, from) {
|
14940 |
+
this.stylemode = value;
|
14941 |
+
|
14942 |
+
this.syncAdvancedField('bgcolor');
|
14943 |
+
this.syncAdvancedField('bgcolorgradient');
|
14944 |
+
this.syncAdvancedField('bgcolorgradientend');
|
14945 |
+
this.syncAdvancedField('borderradius');
|
14946 |
+
this.syncAdvancedField('boxshadow');
|
14947 |
+
};
|
14948 |
+
|
14949 |
+
Row.prototype.onSyncFields = function () {
|
14950 |
+
this.fragmentEditor.layerOptions.updateField('stylemode', this.stylemode);
|
14951 |
+
};
|
14952 |
|
14953 |
return Row;
|
14954 |
});
|
14955 |
+
N2D('ComponentSettings', function ($, undefined) {
|
14956 |
"use strict";
|
14957 |
|
14958 |
+
/**
|
14959 |
+
* @memberOf N2Classes
|
14960 |
+
*
|
14961 |
+
* @param {FragmentEditor} fragmentEditor
|
14962 |
+
* @constructor
|
14963 |
+
*/
|
14964 |
+
function ComponentSettings(fragmentEditor) {
|
14965 |
this.componentType = 'undefined';
|
14966 |
this.placementType = 'undefined';
|
14967 |
|
14968 |
+
$('html')
|
14969 |
+
.attr('data-component', '')
|
14970 |
+
.attr('data-placement', '');
|
14971 |
|
14972 |
this.currentForm = {};
|
14973 |
|
14987 |
},
|
14988 |
global: {
|
14989 |
id: $('#layerid'),
|
14990 |
+
uniqueclass: $('#layeruniqueclass'),
|
14991 |
desktopPortrait: $('#layershow-desktop-portrait'),
|
14992 |
desktopLandscape: $('#layershow-desktop-landscape'),
|
14993 |
tabletPortrait: $('#layershow-tablet-portrait'),
|
15009 |
stop: $('#layeronstop')
|
15010 |
}
|
15011 |
};
|
15012 |
+
this.fragmentEditor = fragmentEditor;
|
15013 |
|
15014 |
+
var availableDeviceModes = fragmentEditor.editor.getAvailableDeviceModes();
|
15015 |
|
15016 |
+
if (!availableDeviceModes.desktopLandscape) {
|
|
|
15017 |
this.forms.global.desktopLandscape.closest('.n2-mixed-group').css('display', 'none');
|
15018 |
}
|
15019 |
+
if (!availableDeviceModes.tabletPortrait) {
|
15020 |
this.forms.global.tabletPortrait.closest('.n2-mixed-group').css('display', 'none');
|
15021 |
}
|
15022 |
+
if (!availableDeviceModes.tabletLandscape) {
|
15023 |
this.forms.global.tabletLandscape.closest('.n2-mixed-group').css('display', 'none');
|
15024 |
}
|
15025 |
+
if (!availableDeviceModes.mobilePortrait) {
|
15026 |
this.forms.global.mobilePortrait.closest('.n2-mixed-group').css('display', 'none');
|
15027 |
}
|
15028 |
+
if (!availableDeviceModes.mobileLandscape) {
|
15029 |
this.forms.global.mobileLandscape.closest('.n2-mixed-group').css('display', 'none');
|
15030 |
}
|
15031 |
|
15040 |
height: $('#layerheight'),
|
15041 |
responsivesize: $('#layerresponsive-size'),
|
15042 |
align: $('#layeralign'),
|
15043 |
+
valign: $('#layervalign')
|
15044 |
};
|
15045 |
|
15046 |
this.forms.placement.normal = {
|
15047 |
margin: $('#layernormal-margin'),
|
15048 |
height: $('#layernormal-height'),
|
15049 |
maxwidth: $('#layernormal-maxwidth'),
|
15050 |
+
selfalign: $('#layernormal-selfalign')
|
15051 |
};
|
15052 |
|
15053 |
this.forms.component.content = {
|
15056 |
padding: $('#layercontent-padding'),
|
15057 |
inneralign: $('#layercontent-inneralign'),
|
15058 |
verticalalign: $('#layercontent-verticalalign'),
|
15059 |
+
stylemode: $('#layercontent-style-mode').on('n2resetmode', $.proxy(this.resetStyleMode, this, 'stylemode')),
|
15060 |
bgcolor: $('#layercontent-background-color'),
|
15061 |
bgimage: $('#layercontent-background-image'),
|
15062 |
bgimagex: $('#layercontent-background-focus-x'),
|
15066 |
bgcolorgradientend: $('#layercontent-background-color-end'),
|
15067 |
opened: $('#layercontent-opened')
|
15068 |
};
|
15069 |
+
fragmentEditor.editor.generator.registerField(this.forms.component.content.bgimage);
|
15070 |
|
15071 |
this.forms.component.row = {
|
15072 |
padding: $('#layerrow-padding'),
|
15075 |
stretch: $('#layerrow-stretch'),
|
15076 |
wrapafter: $('#layerrow-wrap-after'),
|
15077 |
inneralign: $('#layerrow-inneralign'),
|
15078 |
+
link: $('#layerrow-link'),
|
15079 |
bgimage: $('#layerrow-background-image'),
|
15080 |
bgimagex: $('#layerrow-background-focus-x'),
|
15081 |
bgimagey: $('#layerrow-background-focus-y'),
|
15082 |
bgimageparallax: $('#layerrow-background-parallax'),
|
15083 |
+
stylemode: $('#layerrow-style-mode').on('n2resetmode', $.proxy(this.resetStyleMode, this, 'stylemode')),
|
15084 |
bgcolor: $('#layerrow-background-color'),
|
15085 |
bgcolorgradient: $('#layerrow-background-gradient'),
|
15086 |
bgcolorgradientend: $('#layerrow-background-color-end'),
|
15088 |
boxshadow: $('#layerrow-boxshadow'),
|
15089 |
opened: $('#layerrow-opened')
|
15090 |
};
|
15091 |
+
fragmentEditor.editor.generator.registerField(this.forms.component.row.bgimage);
|
15092 |
|
15093 |
this.forms.component.col = {
|
15094 |
maxwidth: $('#layercol-maxwidth'),
|
15095 |
padding: $('#layercol-padding'),
|
15096 |
inneralign: $('#layercol-inneralign'),
|
15097 |
verticalalign: $('#layercol-verticalalign'),
|
|
|
15098 |
link: $('#layercol-link'),
|
15099 |
bgimage: $('#layercol-background-image'),
|
15100 |
bgimagex: $('#layercol-background-focus-x'),
|
15101 |
bgimagey: $('#layercol-background-focus-y'),
|
15102 |
bgimageparallax: $('#layercol-background-parallax'),
|
15103 |
+
stylemode: $('#layercol-style-mode').on('n2resetmode', $.proxy(this.resetStyleMode, this, 'stylemode')),
|
15104 |
+
bgcolor: $('#layercol-background-color'),
|
15105 |
bgcolorgradient: $('#layercol-background-gradient'),
|
15106 |
bgcolorgradientend: $('#layercol-background-color-end'),
|
15107 |
borderradius: $('#layercol-border-radius'),
|
15113 |
colwidth: $('#layercol-colwidth'),
|
15114 |
order: $('#layercol-order')
|
15115 |
};
|
15116 |
+
fragmentEditor.editor.generator.registerField($('#col-linklayerlink-1'));
|
15117 |
+
fragmentEditor.editor.generator.registerField(this.forms.component.col.bgimage);
|
15118 |
}
|
15119 |
|
15120 |
ComponentSettings.prototype.changeActiveComponent = function (layer, componentType, placementType, properties) {
|
15123 |
if (this.componentType != componentType) {
|
15124 |
|
15125 |
$('html').attr('data-component', componentType);
|
15126 |
+
var pane = $('#n2-tabbed-slide-editor-settings').data('pane');
|
15127 |
+
|
15128 |
switch (componentType) {
|
15129 |
case 'content':
|
15130 |
+
pane.showTabs(['content', 'animations', 'position']);
|
15131 |
break;
|
15132 |
case 'layer':
|
15133 |
+
pane.showTabs(['item', 'style', 'animations', 'position']);
|
15134 |
break;
|
15135 |
case 'group':
|
15136 |
+
pane.showTabs(['group', 'animations']);
|
15137 |
break;
|
15138 |
case 'row':
|
15139 |
+
pane.showTabs(['row', 'animations', 'position']);
|
15140 |
break;
|
15141 |
case 'col':
|
15142 |
+
pane.showTabs(['column', 'animations', 'position']);
|
15143 |
break;
|
15144 |
|
15145 |
}
|
15149 |
|
15150 |
this.changeActiveComponentPlacement(placementType);
|
15151 |
this.syncFields(properties);
|
15152 |
+
};
|
15153 |
|
15154 |
ComponentSettings.prototype.changeActiveComponentPlacement = function (placementType, properties) {
|
15155 |
|
15159 |
}
|
15160 |
|
15161 |
this.syncFields(properties);
|
15162 |
+
};
|
15163 |
|
15164 |
ComponentSettings.prototype.syncFields = function (properties) {
|
15165 |
if (typeof properties == 'object') {
|
15167 |
|
15168 |
for (var name in properties) {
|
15169 |
if (typeof properties[name] !== undefined) {
|
15170 |
+
|
15171 |
this.updateField(name, properties[name]);
|
15172 |
} else {
|
15173 |
console.error('Value is undefined for: ' + name);
|
15174 |
}
|
15175 |
}
|
15176 |
|
15177 |
+
this.currentLayer.onSyncFields();
|
15178 |
+
|
15179 |
for (var k in this.currentForm) {
|
15180 |
this.currentForm[k].off('.layeroptions').on('outsideChange.layeroptions', $.proxy(this.activeComponentPropertyChanged, this, k));
|
15181 |
}
|
15182 |
}
|
15183 |
+
};
|
15184 |
|
15185 |
ComponentSettings.prototype.onUpdateField = function (e, name, value) {
|
15186 |
if (e.target == this.currentLayer) {
|
15187 |
this.updateField(name, value);
|
15188 |
}
|
15189 |
+
};
|
15190 |
|
15191 |
ComponentSettings.prototype.updateField = function (name, value) {
|
15192 |
if (typeof this.currentLayer['formSet' + name] === 'function') {
|
15197 |
if (field !== undefined) {
|
15198 |
field.insideChange(value);
|
15199 |
}
|
|
|
|
|
15200 |
}
|
15201 |
}
|
15202 |
+
};
|
15203 |
|
15204 |
ComponentSettings.prototype.activeComponentPropertyChanged = function (name, e) {
|
15205 |
if (this.currentLayer && !this.currentLayer.isDeleted) {
|
15206 |
+
this.updateLayerProperty(name);
|
|
|
|
|
15207 |
} else {
|
15208 |
var field = this.currentForm[name].data('field');
|
15209 |
if (typeof field !== 'undefined' && field !== null) {
|
15212 |
}
|
15213 |
};
|
15214 |
|
15215 |
+
ComponentSettings.prototype.updateLayerProperty = function (name) {
|
15216 |
+
var value = this.currentForm[name].val();
|
15217 |
+
this.currentLayer.setProperty(name, value, 'manager');
|
15218 |
+
};
|
15219 |
+
|
15220 |
ComponentSettings.prototype.startFeatures = function () {
|
15221 |
+
this.layerFeatures = new N2Classes.LayerFeatures(this.forms.placement.absolute, this.fragmentEditor);
|
15222 |
|
15223 |
var globalAdaptiveFont = $('#n2-ss-layer-adaptive-font').on('click', $.proxy(function () {
|
15224 |
this.currentForm.adaptivefont.data('field').onoff.trigger('click');
|
15234 |
|
15235 |
|
15236 |
new N2Classes.FormElementNumber("n2-ss-layer-font-size", -Number.MAX_VALUE, Number.MAX_VALUE);
|
15237 |
+
new N2Classes.FormElementNumberSlider("n2-ss-layer-font-size", {
|
15238 |
min: 50,
|
15239 |
max: 300,
|
15240 |
step: 5
|
15248 |
this.forms.global.fontsize.on('nextendChange', $.proxy(function () {
|
15249 |
globalFontSize.data('field').insideChange(this.forms.global.fontsize.val());
|
15250 |
}, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15251 |
};
|
15252 |
|
15253 |
+
ComponentSettings.prototype.resetStyleMode = function (name, e) {
|
15254 |
+
this.currentLayer.resetStyleMode(name);
|
|
|
|
|
|
|
|
|
15255 |
};
|
15256 |
|
15257 |
+
return ComponentSettings;
|
15258 |
+
});
|
15259 |
+
N2D('BgAnimationEditor', ['NextendFragmentEditorController'], function ($, undefined) {
|
|
|
15260 |
|
15261 |
+
/**
|
15262 |
+
* @memberOf N2Classes
|
15263 |
+
*
|
15264 |
+
* @constructor
|
15265 |
+
*/
|
15266 |
function BgAnimationEditor() {
|
15267 |
this.parameters = {
|
15268 |
shiftedBackgroundAnimation: 0
|
15269 |
};
|
15270 |
+
|
15271 |
+
this.$css = $('<style></style>').appendTo('head');
|
15272 |
+
this.backgroundAnimations = {
|
15273 |
+
color: 'eeeeeeff'
|
15274 |
+
};
|
15275 |
+
|
15276 |
+
N2Classes.NextendFragmentEditorController.prototype.constructor.call(this, false);
|
15277 |
|
15278 |
this.bgAnimationElement = $('.n2-bg-animation');
|
15279 |
this.slides = $('.n2-bg-animation-slide');
|
15286 |
this.directionTab.element.on('nextendChange.n2-editor', $.proxy(this.directionTabChanged, this));
|
15287 |
|
15288 |
if (!nModernizr.csstransforms3d || !nModernizr.csstransformspreserve3d) {
|
15289 |
+
N2Classes.Notification.error('Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ')
|
15290 |
}
|
|
|
15291 |
|
15292 |
+
|
15293 |
+
this.$colorField = $('#n2-background-animationcolor')
|
15294 |
+
.on('nextendChange', $.proxy(this.changeColor, this));
|
15295 |
+
}
|
15296 |
+
|
15297 |
+
BgAnimationEditor.prototype = Object.create(N2Classes.NextendFragmentEditorController.prototype);
|
15298 |
BgAnimationEditor.prototype.constructor = BgAnimationEditor;
|
15299 |
|
15300 |
BgAnimationEditor.prototype.loadDefaults = function () {
|
15301 |
+
N2Classes.NextendFragmentEditorController.prototype.loadDefaults.call(this);
|
15302 |
this.type = 'backgroundanimation';
|
15303 |
this.current = 0;
|
15304 |
this.animationProperties = false;
|
15321 |
this.direction = parseInt(this.directionTab.element.val());
|
15322 |
};
|
15323 |
|
15324 |
+
BgAnimationEditor.prototype.start = function (data) {
|
15325 |
+
if (data.color !== undefined) {
|
15326 |
+
this.$colorField.data('field').insideChange(data.color);
|
15327 |
+
this.backgroundAnimations.color = data.color;
|
15328 |
+
} else {
|
15329 |
+
$('#n2-tab-background-animation-form').remove();
|
15330 |
+
this.$css.html('.n2-3d-side,.tile-colored-overlay{background: ' + nextend.currentEditor.frontend.parameters.bgAnimationsColor + ';}');
|
15331 |
+
}
|
15332 |
if (this.animationProperties) {
|
15333 |
if (!this.timeline) {
|
15334 |
this.next();
|
15338 |
}
|
15339 |
};
|
15340 |
|
15341 |
+
BgAnimationEditor.prototype.changeColor = function () {
|
15342 |
+
this.backgroundAnimations.color = this.$colorField.val();
|
15343 |
+
this.$css.html('.n2-3d-side,.tile-colored-overlay{background: ' + N2Color.hex2rgbaCSS(this.backgroundAnimations.color) + ';}');
|
15344 |
+
};
|
15345 |
+
|
15346 |
BgAnimationEditor.prototype.pause = function () {
|
15347 |
if (this.timeline) {
|
15348 |
this.timeline.pause();
|
15405 |
|
15406 |
return BgAnimationEditor;
|
15407 |
});
|
15408 |
+
|
15409 |
+
N2D('BgAnimationManager', ['NextendVisualManagerMultipleSelection'], function ($, undefined) {
|
15410 |
+
|
15411 |
+
/**
|
15412 |
+
* @memberOf N2Classes
|
15413 |
+
*
|
15414 |
+
* @constructor
|
15415 |
+
*/
|
15416 |
+
function BgAnimationManager() {
|
15417 |
+
this.type = 'backgroundanimation';
|
15418 |
+
N2Classes.NextendVisualManagerMultipleSelection.prototype.constructor.apply(this, arguments);
|
15419 |
+
}
|
15420 |
+
|
15421 |
+
BgAnimationManager.prototype = Object.create(N2Classes.NextendVisualManagerMultipleSelection.prototype);
|
15422 |
+
BgAnimationManager.prototype.constructor = BgAnimationManager;
|
15423 |
+
|
15424 |
+
BgAnimationManager.prototype.loadDefaults = function () {
|
15425 |
+
N2Classes.NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this, arguments);
|
15426 |
+
this.type = 'backgroundanimation';
|
15427 |
+
this.labels = {
|
15428 |
+
visual: 'Background animation',
|
15429 |
+
visuals: 'Background animations'
|
15430 |
+
};
|
15431 |
+
};
|
15432 |
+
|
15433 |
+
BgAnimationManager.prototype.initController = function () {
|
15434 |
+
return new N2Classes.BgAnimationEditor();
|
15435 |
+
};
|
15436 |
+
|
15437 |
+
BgAnimationManager.prototype.createVisual = function (visual, set) {
|
15438 |
+
return new N2Classes.NextendVisualWithSetRowMultipleSelection(visual, set, this);
|
15439 |
+
};
|
15440 |
+
|
15441 |
+
BgAnimationManager.prototype.show = function (data, saveCallback) {
|
15442 |
+
var controllerParameters = {};
|
15443 |
+
|
15444 |
+
var $colorField = $('#sliderbackground-animation-color');
|
15445 |
+
if ($colorField.length) {
|
15446 |
+
controllerParameters.color = $colorField.val();
|
15447 |
+
}
|
15448 |
+
N2Classes.NextendVisualManagerMultipleSelection.prototype.show.call(this, data, saveCallback, controllerParameters);
|
15449 |
+
};
|
15450 |
+
|
15451 |
+
BgAnimationManager.prototype.getAsString = function () {
|
15452 |
+
|
15453 |
+
var $colorField = $('#sliderbackground-animation-color');
|
15454 |
+
if ($colorField.length) {
|
15455 |
+
$colorField.val($('#n2-background-animationcolor').val());
|
15456 |
+
}
|
15457 |
+
return N2Classes.NextendVisualManagerMultipleSelection.prototype.getAsString.call(this);
|
15458 |
+
};
|
15459 |
+
|
15460 |
+
return BgAnimationManager;
|
15461 |
+
});
|
15462 |
+
|
15463 |
+
N2D('nUICanvasItem', ['nUIMouse'], function ($, undefined) {
|
15464 |
+
"use strict";
|
15465 |
+
|
15466 |
+
/**
|
15467 |
+
* @memberOf N2Classes
|
15468 |
+
*
|
15469 |
+
* @class
|
15470 |
+
* @constructor
|
15471 |
+
* @augments nUIMouse
|
15472 |
+
|
15473 |
+
* @this nUICanvasItem
|
15474 |
+
*/
|
15475 |
+
function nUICanvasItem(element, options) {
|
15476 |
+
this.element = $(element);
|
15477 |
+
|
15478 |
+
this.widgetName = this.widgetName || 'nUICanvasItem';
|
15479 |
+
this.widgetEventPrefix = "canvasItem";
|
15480 |
+
|
15481 |
+
this.options = $.extend({
|
15482 |
+
canvasUIManager: null,
|
15483 |
+
layer: false,
|
15484 |
+
$layer: null,
|
15485 |
+
distance: 2,
|
15486 |
+
onCreate: function () {
|
15487 |
+
|
15488 |
+
}
|
15489 |
+
}, this.options, options);
|
15490 |
+
|
15491 |
+
N2Classes.nUIMouse.prototype.constructor.apply(this, arguments);
|
15492 |
+
|
15493 |
+
this.create();
|
15494 |
+
}
|
15495 |
+
|
15496 |
+
nUICanvasItem.prototype = Object.create(N2Classes.nUIMouse.prototype);
|
15497 |
+
nUICanvasItem.prototype.constructor = nUICanvasItem;
|
15498 |
+
|
15499 |
+
nUICanvasItem.prototype.create = function () {
|
15500 |
+
|
15501 |
+
if (typeof this.options.$layer === 'function') {
|
15502 |
+
this.options.$layer = this.options.$layer.call(this, this);
|
15503 |
+
}
|
15504 |
+
|
15505 |
+
this._mouseInit();
|
15506 |
+
};
|
15507 |
+
nUICanvasItem.prototype._mouseCapture = function (event, overrideHandle) {
|
15508 |
+
return this.options.canvasUIManager._mouseCapture(this.options, event, overrideHandle);
|
15509 |
+
};
|
15510 |
+
|
15511 |
+
nUICanvasItem.prototype._mouseStart = function (event, overrideHandle, noActivation) {
|
15512 |
+
this._trigger('start');
|
15513 |
+
return this.options.canvasUIManager._mouseStart(this.options, event, overrideHandle, noActivation);
|
15514 |
+
};
|
15515 |
+
|
15516 |
+
nUICanvasItem.prototype._mouseDrag = function (event) {
|
15517 |
+
return this.options.canvasUIManager._mouseDrag(this.options, event);
|
15518 |
+
};
|
15519 |
+
|
15520 |
+
nUICanvasItem.prototype._mouseStop = function (event, noPropagation) {
|
15521 |
+
return this.options.canvasUIManager._mouseStop(this.options, event, noPropagation);
|
15522 |
+
|
15523 |
+
};
|
15524 |
+
|
15525 |
+
nUICanvasItem.prototype._destroy = function () {
|
15526 |
+
this._mouseDestroy();
|
15527 |
+
|
15528 |
+
return this;
|
15529 |
+
};
|
15530 |
+
|
15531 |
+
N2Classes.nUIWidgetBase.register('nUICanvasItem');
|
15532 |
+
|
15533 |
+
return nUICanvasItem;
|
15534 |
+
});
|
15535 |
+
N2D('nUICanvas', ['nUIWidgetBase'], function ($, undefined) {
|
15536 |
+
"use strict";
|
15537 |
+
|
15538 |
+
/**
|
15539 |
+
* @memberOf N2Classes
|
15540 |
+
*
|
15541 |
+
* @class
|
15542 |
+
* @constructor
|
15543 |
+
* @augments nUIWidgetBase
|
15544 |
+
|
15545 |
+
* @this nUICanvas
|
15546 |
+
*/
|
15547 |
+
function nUICanvas(element, options) {
|
15548 |
+
this.element = $(element);
|
15549 |
+
|
15550 |
+
this.widgetName = this.widgetName || 'nUICanvas';
|
15551 |
+
this.widgetEventPrefix = "canvas";
|
15552 |
+
|
15553 |
+
this.options = $.extend({
|
15554 |
+
mainContainer: null,
|
15555 |
+
display: false,
|
15556 |
+
}, this.options, options);
|
15557 |
+
|
15558 |
+
N2Classes.nUIWidgetBase.prototype.constructor.apply(this, arguments);
|
15559 |
+
}
|
15560 |
+
|
15561 |
+
nUICanvas.prototype = Object.create(N2Classes.nUIWidgetBase.prototype);
|
15562 |
+
nUICanvas.prototype.constructor = nUICanvas;
|
15563 |
+
|
15564 |
+
nUICanvas.plugins = {};
|
15565 |
+
|
15566 |
+
nUICanvas.prototype._mouseCapture = function (itemOptions, event, overrideHandle) {
|
15567 |
+
return $(event.target).closest(".nui-resizable-handle, .nui-normal-sizing-handle, .nui-spacing-handle").length == 0;
|
15568 |
+
};
|
15569 |
+
|
15570 |
+
nUICanvas.prototype._mouseStart = function (itemOptions, event, overrideHandle, noActivation) {
|
15571 |
+
|
15572 |
+
$('body').addClass('n2-ss-move-layer');
|
15573 |
+
|
15574 |
+
this.dragDeferred = $.Deferred();
|
15575 |
+
this.options.mainContainer.fragmentEditor.layerWindow.hideWithDeferred(this.dragDeferred);
|
15576 |
+
|
15577 |
+
this.context = {
|
15578 |
+
placeholder: $('<div class="n2-ss-layer-placeholder" />'),
|
15579 |
+
mouse: {
|
15580 |
+
offset: {
|
15581 |
+
left: event.pageX,
|
15582 |
+
top: event.pageY
|
15583 |
+
}
|
15584 |
+
},
|
15585 |
+
canvas: {
|
15586 |
+
offset: this.options.mainContainer.layer.offset(),
|
15587 |
+
size: {
|
15588 |
+
width: this.options.mainContainer.layer.outerWidth(),
|
15589 |
+
height: this.options.mainContainer.layer.outerHeight()
|
15590 |
+
}
|
15591 |
+
},
|
15592 |
+
$layer: itemOptions.$layer
|
15593 |
+
};
|
15594 |
+
|
15595 |
+
var css = {
|
15596 |
+
position: 'absolute',
|
15597 |
+
right: 'auto',
|
15598 |
+
bottom: 'auto'
|
15599 |
+
};
|
15600 |
+
|
15601 |
+
if (!itemOptions.layer) {
|
15602 |
+
this.startMode = 'create';
|
15603 |
+
|
15604 |
+
this.context.layer = {
|
15605 |
+
offset: {
|
15606 |
+
left: 0,
|
15607 |
+
top: 0
|
15608 |
+
}
|
15609 |
+
};
|
15610 |
+
|
15611 |
+
itemOptions.$layer.appendTo('body');
|
15612 |
+
} else {
|
15613 |
+
this.startMode = itemOptions.layer.placement.getType();
|
15614 |
+
|
15615 |
+
this.context.layer = {
|
15616 |
+
offset: itemOptions.$layer.offset()
|
15617 |
+
};
|
15618 |
+
|
15619 |
+
this.context.originalIndex = itemOptions.layer.getIndex();
|
15620 |
+
|
15621 |
+
if (this.startMode == 'normal') {
|
15622 |
+
|
15623 |
+
css.width = itemOptions.$layer.width();
|
15624 |
+
//css.height = itemOptions.$layer.height();
|
15625 |
+
|
15626 |
+
itemOptions.$layer.appendTo(this.options.mainContainer.layer);
|
15627 |
+
}
|
15628 |
+
}
|
15629 |
+
|
15630 |
+
itemOptions.$layer
|
15631 |
+
.addClass('n2-canvas-item-drag')
|
15632 |
+
.css(css);
|
15633 |
+
|
15634 |
+
this._cacheMargins(itemOptions.$layer);
|
15635 |
+
|
15636 |
+
this.context.size = {
|
15637 |
+
width: itemOptions.$layer.outerWidth(),
|
15638 |
+
height: itemOptions.$layer.outerHeight()
|
15639 |
+
};
|
15640 |
+
|
15641 |
+
|
15642 |
+
this.context.droppables = this.options.mainContainer.getDroppables(itemOptions.layer);
|
15643 |
+
|
15644 |
+
this._cacheContainers();
|
15645 |
+
|
15646 |
+
this._trigger("start", event, {
|
15647 |
+
layer: itemOptions.layer,
|
15648 |
+
mode: this.startMode
|
15649 |
+
});
|
15650 |
+
|
15651 |
+
this._mouseDrag(itemOptions, event);
|
15652 |
+
};
|
15653 |
+
|
15654 |
+
nUICanvas.prototype._mouseDrag = function (itemOptions, event) {
|
15655 |
+
var position;
|
15656 |
+
if (this.startMode == 'create') {
|
15657 |
+
position = {
|
15658 |
+
top: event.pageY - this.context.canvas.offset.top - 20,
|
15659 |
+
left: event.pageX - this.context.canvas.offset.left - 20
|
15660 |
+
};
|
15661 |
+
} else {
|
15662 |
+
position = {
|
15663 |
+
top: this.context.layer.offset.top - this.context.canvas.offset.top + event.pageY - this.context.mouse.offset.top,
|
15664 |
+
left: this.context.layer.offset.left - this.context.canvas.offset.left + event.pageX - this.context.mouse.offset.left
|
15665 |
+
};
|
15666 |
+
}
|
15667 |
+
|
15668 |
+
var targetContainer = this._findInnerContainer(event);
|
15669 |
+
if (targetContainer === false && this.startMode != 'create') {
|
15670 |
+
targetContainer = this.context.droppables[0];
|
15671 |
+
}
|
15672 |
+
if (targetContainer) {
|
15673 |
+
if (targetContainer.placement == 'normal') {
|
15674 |
+
|
15675 |
+
if (typeof targetContainer.layers === "undefined") {
|
15676 |
+
targetContainer.layers = this._cacheContainerLayers(targetContainer);
|
15677 |
+
}
|
15678 |
+
|
15679 |
+
var targetIndex = this._findNormalIndex(event, targetContainer);
|
15680 |
+
if (targetIndex > 0) {
|
15681 |
+
this.context.placeholder.css('order', targetContainer.layers[targetIndex - 1].layer.layer.css('order'));
|
15682 |
+
this.context.placeholder.insertAfter(targetContainer.layers[targetIndex - 1].layer.layer);
|
15683 |
+
} else {
|
15684 |
+
this.context.placeholder.css('order', 0);
|
15685 |
+
this.context.placeholder.prependTo(targetContainer.$container);
|
15686 |
+
}
|
15687 |
+
|
15688 |
+
this.context.targetIndex = targetIndex;
|
15689 |
+
} else {
|
15690 |
+
this.context.placeholder.detach();
|
15691 |
+
}
|
15692 |
+
} else {
|
15693 |
+
this.context.placeholder.detach();
|
15694 |
+
}
|
15695 |
+
|
15696 |
+
this.context.targetContainer = targetContainer;
|
15697 |
+
|
15698 |
+
|
15699 |
+
this._trigger("drag", event, {
|
15700 |
+
layer: itemOptions.layer,
|
15701 |
+
originalOffset: this.context.layer.offset,
|
15702 |
+
position: position,
|
15703 |
+
canvasOffset: this.context.canvas.offset,
|
15704 |
+
offset: {
|
15705 |
+
left: position.left + this.context.canvas.offset.left,
|
15706 |
+
top: position.top + this.context.canvas.offset.top
|
15707 |
+
}
|
15708 |
+
});
|
15709 |
+
|
15710 |
+
if (this.startMode == 'create') {
|
15711 |
+
position.left += this.context.canvas.offset.left;
|
15712 |
+
position.top += this.context.canvas.offset.top;
|
15713 |
+
}
|
15714 |
+
|
15715 |
+
itemOptions.$layer.css(position);
|
15716 |
+
|
15717 |
+
this._displayPosition(event, position);
|
15718 |
+
};
|
15719 |
+
|
15720 |
+
nUICanvas.prototype._mouseStop = function (itemOptions, event, noPropagation) {
|
15721 |
+
this.context.placeholder.remove();
|
15722 |
+
|
15723 |
+
var targetIndex = this.context.targetIndex,
|
15724 |
+
targetContainer = this.context.targetContainer;
|
15725 |
+
|
15726 |
+
itemOptions.$layer
|
15727 |
+
.removeClass('n2-canvas-item-drag');
|
15728 |
+
|
15729 |
+
if (this.startMode == 'create') {
|
15730 |
+
if (targetContainer) {
|
15731 |
+
itemOptions.onCreate.call(this, event, itemOptions, targetContainer, targetIndex);
|
15732 |
+
}
|
15733 |
+
itemOptions.$layer.detach();
|
15734 |
+
|
15735 |
+
} else {
|
15736 |
+
if (targetContainer === undefined) {
|
15737 |
+
targetContainer = this.options.mainContainer.layer;
|
15738 |
+
}
|
15739 |
+
|
15740 |
+
if (this.startMode == 'absolute' && targetContainer.placement == 'absolute') {
|
15741 |
+
|
15742 |
+
// Simple drag on the canvas on an absolute layer. Just update its position!
|
15743 |
+
var left = parseInt(itemOptions.$layer.css('left')),
|
15744 |
+
top = parseInt(itemOptions.$layer.css('top'));
|
15745 |
+
|
15746 |
+
itemOptions.$layer.css({
|
15747 |
+
position: '',
|
15748 |
+
right: '',
|
15749 |
+
bottom: '',
|
15750 |
+
});
|
15751 |
+
|
15752 |
+
itemOptions.layer.placement.current.setPosition(left, top);
|
15753 |
+
|
15754 |
+
} else if (targetContainer.placement == 'absolute') {
|
15755 |
+
|
15756 |
+
// Layer moved from a normal container to the canvas.
|
15757 |
+
|
15758 |
+
var left = parseInt(itemOptions.$layer.css('left')),
|
15759 |
+
top = parseInt(itemOptions.$layer.css('top'));
|
15760 |
+
|
15761 |
+
itemOptions.$layer.css({
|
15762 |
+
position: '',
|
15763 |
+
right: '',
|
15764 |
+
bottom: '',
|
15765 |
+
});
|
15766 |
+
|
15767 |
+
var width = itemOptions.$layer.width(),
|
15768 |
+
height = itemOptions.$layer.height();
|
15769 |
+
|
15770 |
+
itemOptions.layer.group.onChildCountChange();
|
15771 |
+
|
15772 |
+
var oldAbsoluteGroup = itemOptions.layer;
|
15773 |
+
while (oldAbsoluteGroup && (!oldAbsoluteGroup.placement || oldAbsoluteGroup.placement.getType() !== 'absolute')) {
|
15774 |
+
oldAbsoluteGroup = oldAbsoluteGroup.group;
|
15775 |
+
}
|
15776 |
+
|
15777 |
+
N2Classes.History.get().startBatch();
|
15778 |
+
// Set the new group, which will trigger this current placement to activate
|
15779 |
+
itemOptions.layer.changeGroup(this.context.originalIndex, this.options.mainContainer);
|
15780 |
+
N2Classes.History.get().addControl('skipForwardUndos');
|
15781 |
+
|
15782 |
+
if (itemOptions.layer.type == 'layer' && itemOptions.layer.item) {
|
15783 |
+
if (!itemOptions.layer.item.needSize) {
|
15784 |
+
height = 'auto';
|
15785 |
+
width++; //Prevent text layers to wrap line ending to new line after drag
|
15786 |
+
}
|
15787 |
+
}
|
15788 |
+
|
15789 |
+
// As this placement activated, we have to set these values from the closest absolute parent
|
15790 |
+
var targetAlign = oldAbsoluteGroup ? oldAbsoluteGroup.getProperty('align') : 'center',
|
15791 |
+
targetValign = oldAbsoluteGroup ? oldAbsoluteGroup.getProperty('valign') : 'middle';
|
15792 |
+
|
15793 |
+
itemOptions.layer.placement.current._setPosition(targetAlign, targetValign, left, top, width, height, true);
|
15794 |
+
|
15795 |
+
N2Classes.History.get().endBatch();
|
15796 |
+
|
15797 |
+
} else if (targetContainer.placement == 'normal') {
|
15798 |
+
itemOptions.$layer.css({
|
15799 |
+
position: 'relative',
|
15800 |
+
width: '',
|
15801 |
+
left: '',
|
15802 |
+
top: ''
|
15803 |
+
});
|
15804 |
+
|
15805 |
+
switch (targetContainer.layer.type) {
|
15806 |
+
|
15807 |
+
case 'content':
|
15808 |
+
case 'col':
|
15809 |
+
if (targetIndex > 0) {
|
15810 |
+
itemOptions.$layer.insertAfter(targetContainer.layers[targetIndex - 1].layer.layer);
|
15811 |
+
} else {
|
15812 |
+
itemOptions.$layer.prependTo(targetContainer.$container);
|
15813 |
+
}
|
15814 |
+
|
15815 |
+
itemOptions.layer.onCanvasUpdate(this.context.originalIndex, targetContainer.layer, targetIndex);
|
15816 |
+
break;
|
15817 |
+
|
15818 |
+
case 'row':
|
15819 |
+
var col = targetContainer.layer.createCol();
|
15820 |
+
targetContainer.layer.moveCol(col.getIndex(), targetIndex);
|
15821 |
+
|
15822 |
+
itemOptions.$layer.prependTo(col.$content);
|
15823 |
+
itemOptions.layer.onCanvasUpdate(this.context.originalIndex, col, 0);
|
15824 |
+
|
15825 |
+
break;
|
15826 |
+
}
|
15827 |
+
|
15828 |
+
//itemOptions.layer.placement.current._syncheight(); // we should sync back the height of the normal layer
|
15829 |
+
}
|
15830 |
+
}
|
15831 |
+
|
15832 |
+
delete this.context;
|
15833 |
+
|
15834 |
+
if (this.options.display) {
|
15835 |
+
this.options.display.hide();
|
15836 |
+
}
|
15837 |
+
|
15838 |
+
this._trigger("stop", event, {
|
15839 |
+
layer: itemOptions.layer
|
15840 |
+
});
|
15841 |
+
|
15842 |
+
this.dragDeferred.resolve();
|
15843 |
+
|
15844 |
+
|
15845 |
+
$('body').removeClass('n2-ss-move-layer');
|
15846 |
+
};
|
15847 |
+
|
15848 |
+
nUICanvas.prototype.cancel = function (itemOptions) {
|
15849 |
+
};
|
15850 |
+
|
15851 |
+
nUICanvas.prototype._cacheContainers = function () {
|
15852 |
+
for (var i = 0; i < this.context.droppables.length; i++) {
|
15853 |
+
var obj = this.context.droppables[i];
|
15854 |
+
obj.offset = obj.$container.offset();
|
15855 |
+
obj.size = {
|
15856 |
+
width: obj.$container.outerWidth(),
|
15857 |
+
height: obj.$container.outerHeight()
|
15858 |
+
};
|
15859 |
+
obj.offset.right = obj.offset.left + obj.size.width;
|
15860 |
+
obj.offset.bottom = obj.offset.top + obj.size.height;
|
15861 |
+
}
|
15862 |
+
};
|
15863 |
+
|
15864 |
+
nUICanvas.prototype._findInnerContainer = function (event) {
|
15865 |
+
for (var i = this.context.droppables.length - 1; i >= 0; i--) {
|
15866 |
+
var obj = this.context.droppables[i];
|
15867 |
+
if (obj.offset.left <= event.pageX && obj.offset.right >= event.pageX && obj.offset.top <= event.pageY && obj.offset.bottom >= event.pageY) {
|
15868 |
+
return obj;
|
15869 |
+
}
|
15870 |
+
}
|
15871 |
+
return false;
|
15872 |
+
};
|
15873 |
+
|
15874 |
+
nUICanvas.prototype._cacheContainerLayers = function (droppable) {
|
15875 |
+
var layerObjects = [],
|
15876 |
+
layers = droppable.layer.container.getSortedLayers();
|
15877 |
+
|
15878 |
+
for (var i = 0; i < layers.length; i++) {
|
15879 |
+
var obj = {
|
15880 |
+
layer: layers[i]
|
15881 |
+
};
|
15882 |
+
obj.offset = obj.layer.layer.offset();
|
15883 |
+
obj.size = {
|
15884 |
+
width: obj.layer.layer.outerWidth(),
|
15885 |
+
height: obj.layer.layer.outerHeight()
|
15886 |
+
};
|
15887 |
+
obj.offset.right = obj.offset.left + obj.size.width / 2;
|
15888 |
+
obj.offset.bottom = obj.offset.top + obj.size.height / 2;
|
15889 |
+
layerObjects.push(obj);
|
15890 |
+
}
|
15891 |
+
|
15892 |
+
return layerObjects;
|
15893 |
+
};
|
15894 |
+
|
15895 |
+
nUICanvas.prototype._findNormalIndex = function (event, targetContainer) {
|
15896 |
+
var index = -1;
|
15897 |
+
|
15898 |
+
switch (targetContainer.axis) {
|
15899 |
+
case 'y':
|
15900 |
+
for (var i = 0; i < targetContainer.layers.length; i++) {
|
15901 |
+
var obj = targetContainer.layers[i];
|
15902 |
+
if (event.pageY <= obj.offset.bottom) {
|
15903 |
+
index = i;
|
15904 |
+
break;
|
15905 |
+
}
|
15906 |
+
}
|
15907 |
+
break;
|
15908 |
+
case 'x':
|
15909 |
+
for (var i = 0; i < targetContainer.layers.length; i++) {
|
15910 |
+
var obj = targetContainer.layers[i];
|
15911 |
+
if (event.pageX <= obj.offset.right) {
|
15912 |
+
index = i;
|
15913 |
+
break;
|
15914 |
+
}
|
15915 |
+
}
|
15916 |
+
break;
|
15917 |
+
}
|
15918 |
+
|
15919 |
+
if (index === -1) {
|
15920 |
+
index = targetContainer.layers.length;
|
15921 |
+
}
|
15922 |
+
|
15923 |
+
return index;
|
15924 |
+
};
|
15925 |
+
|
15926 |
+
nUICanvas.prototype._displayPosition = function (event, position) {
|
15927 |
+
|
15928 |
+
if (this.options.display) {
|
15929 |
+
if (this.context.targetContainer && this.context.targetContainer.placement == 'absolute') {
|
15930 |
+
if (this.options.display.hidden) {
|
15931 |
+
this.options.display.show();
|
15932 |
+
}
|
15933 |
+
if (this.startMode == 'create') {
|
15934 |
+
position.left -= this.context.canvas.offset.left;
|
15935 |
+
position.top -= this.context.canvas.offset.top;
|
15936 |
+
}
|
15937 |
+
this.options.display.update(event, position);
|
15938 |
+
} else {
|
15939 |
+
if (this.options.display.hidden) {
|
15940 |
+
this.options.display.hide();
|
15941 |
+
}
|
15942 |
+
}
|
15943 |
+
}
|
15944 |
+
};
|
15945 |
+
|
15946 |
+
nUICanvas.prototype._trigger = function (type, event, ui) {
|
15947 |
+
ui = ui || {};
|
15948 |
+
|
15949 |
+
this.callPlugin(type, [event, ui]);
|
15950 |
+
|
15951 |
+
|
15952 |
+
return N2Classes.nUIWidgetBase.prototype._trigger.apply(this, arguments);
|
15953 |
+
};
|
15954 |
+
|
15955 |
+
nUICanvas.prototype._cacheMargins = function (layer) {
|
15956 |
+
this.margins = {
|
15957 |
+
left: ( parseInt(layer.css("marginLeft"), 10) || 0 ),
|
15958 |
+
top: ( parseInt(layer.css("marginTop"), 10) || 0 ),
|
15959 |
+
right: ( parseInt(layer.css("marginRight"), 10) || 0 ),
|
15960 |
+
bottom: ( parseInt(layer.css("marginBottom"), 10) || 0 )
|
15961 |
+
};
|
15962 |
+
};
|
15963 |
+
|
15964 |
+
N2Classes.nUIWidgetBase.register('nUICanvas');
|
15965 |
+
|
15966 |
+
|
15967 |
+
N2Classes.nUIWidgetBase.addPlugin(nUICanvas, "smartguides", {
|
15968 |
+
start: function (event, ui) {
|
15969 |
+
var inst = $(this).data("nUICanvas"), o = inst.options;
|
15970 |
+
|
15971 |
+
if (inst.startMode == 'create') return;
|
15972 |
+
|
15973 |
+
inst.gridH = $('<div class="n2-grid n2-grid-h"></div>').appendTo(o.mainContainer.layer);
|
15974 |
+
inst.gridV = $('<div class="n2-grid n2-grid-v"></div>').appendTo(o.mainContainer.layer);
|
15975 |
+
inst.elements = [];
|
15976 |
+
if (typeof o.smartguides == 'function') {
|
15977 |
+
var guides = $(o.smartguides(inst.context)).not(inst.context.$layer);
|
15978 |
+
if (guides && guides.length) {
|
15979 |
+
guides.each(function () {
|
15980 |
+
var $t = $(this);
|
15981 |
+
var $o = $t.offset();
|
15982 |
+
if (this != inst.element[0]) inst.elements.push({
|
15983 |
+
item: this,
|
15984 |
+
width: $t.outerWidth(), height: $t.outerHeight(),
|
15985 |
+
top: Math.round($o.top), left: Math.round($o.left),
|
15986 |
+
backgroundColor: ''
|
15987 |
+
});
|
15988 |
+
});
|
15989 |
+
}
|
15990 |
+
var $o = o.mainContainer.layer.offset();
|
15991 |
+
inst.elements.push({
|
15992 |
+
width: o.mainContainer.layer.width(), height: o.mainContainer.layer.height(),
|
15993 |
+
top: Math.round($o.top), left: Math.round($o.left),
|
15994 |
+
backgroundColor: '#ff4aff'
|
15995 |
+
});
|
15996 |
+
}
|
15997 |
+
},
|
15998 |
+
|
15999 |
+
stop: function (event, ui) {
|
16000 |
+
var inst = $(this).data("nUICanvas");
|
16001 |
+
|
16002 |
+
if (inst.startMode == 'create') return;
|
16003 |
+
|
16004 |
+
inst.gridH.remove();
|
16005 |
+
inst.gridV.remove();
|
16006 |
+
},
|
16007 |
+
|
16008 |
+
drag: function (event, ui) {
|
16009 |
+
var vElement = false,
|
16010 |
+
hElement = false,
|
16011 |
+
inst = $(this).data("nUICanvas"),
|
16012 |
+
o = inst.options,
|
16013 |
+
verticalTolerance = o.tolerance,
|
16014 |
+
horizontalTolerance = o.tolerance;
|
16015 |
+
|
16016 |
+
if (inst.startMode == 'create') return;
|
16017 |
+
|
16018 |
+
inst.gridH.css({"display": "none"});
|
16019 |
+
inst.gridV.css({"display": "none"});
|
16020 |
+
|
16021 |
+
if (inst.context.targetContainer && inst.context.targetContainer.placement == 'absolute') {
|
16022 |
+
|
16023 |
+
var container = inst.elements[inst.elements.length - 1],
|
16024 |
+
setGridV = function (left) {
|
16025 |
+
inst.gridV.css({left: Math.min(left, container.width - 1), display: "block"});
|
16026 |
+
},
|
16027 |
+
setGridH = function (top) {
|
16028 |
+
inst.gridH.css({top: Math.min(top, container.height - 1), display: "block"});
|
16029 |
+
};
|
16030 |
+
|
16031 |
+
var ctrlKey = event.ctrlKey || event.metaKey,
|
16032 |
+
altKey = event.altKey;
|
16033 |
+
if (ctrlKey && altKey) {
|
16034 |
+
return;
|
16035 |
+
} else if (ctrlKey) {
|
16036 |
+
vElement = true;
|
16037 |
+
} else if (altKey) {
|
16038 |
+
hElement = true;
|
16039 |
+
}
|
16040 |
+
var x1 = ui.offset.left, x2 = x1 + inst.context.size.width,
|
16041 |
+
y1 = ui.offset.top, y2 = y1 + inst.context.size.height,
|
16042 |
+
xc = (x1 + x2) / 2,
|
16043 |
+
yc = (y1 + y2) / 2;
|
16044 |
+
|
16045 |
+
if (!vElement) {
|
16046 |
+
for (var i = inst.elements.length - 1; i >= 0; i--) {
|
16047 |
+
if (verticalTolerance == 0) break;
|
16048 |
+
|
16049 |
+
var l = inst.elements[i].left,
|
16050 |
+
r = l + inst.elements[i].width,
|
16051 |
+
hc = (l + r) / 2;
|
16052 |
+
|
16053 |
+
var v = true,
|
16054 |
+
c;
|
16055 |
+
if ((c = Math.abs(l - x2)) < verticalTolerance) {
|
16056 |
+
ui.position.left = l - inst.context.size.width - inst.context.canvas.offset.left - inst.margins.left;
|
16057 |
+
setGridV(ui.position.left + inst.context.size.width);
|
16058 |
+
} else if ((c = Math.abs(l - x1)) < verticalTolerance) {
|
16059 |
+
ui.position.left = l - inst.context.canvas.offset.left - inst.margins.left;
|
16060 |
+
setGridV(ui.position.left);
|
16061 |
+
} else if ((c = Math.abs(r - x1)) < verticalTolerance) {
|
16062 |
+
ui.position.left = r - inst.context.canvas.offset.left - inst.margins.left;
|
16063 |
+
setGridV(ui.position.left);
|
16064 |
+
} else if ((c = Math.abs(r - x2)) < verticalTolerance) {
|
16065 |
+
ui.position.left = r - inst.context.size.width - inst.context.canvas.offset.left - inst.margins.left;
|
16066 |
+
setGridV(ui.position.left + inst.context.size.width);
|
16067 |
+
} else if ((c = Math.abs(hc - x2)) < verticalTolerance) {
|
16068 |
+
ui.position.left = hc - inst.context.size.width - inst.context.canvas.offset.left - inst.margins.left;
|
16069 |
+
setGridV(ui.position.left + inst.context.size.width);
|
16070 |
+
} else if ((c = Math.abs(hc - x1)) < verticalTolerance) {
|
16071 |
+
ui.position.left = hc - inst.context.canvas.offset.left - inst.margins.left;
|
16072 |
+
setGridV(ui.position.left);
|
16073 |
+
} else if ((c = Math.abs(hc - xc)) < verticalTolerance) {
|
16074 |
+
ui.position.left = hc - inst.context.size.width / 2 - inst.context.canvas.offset.left - inst.margins.left;
|
16075 |
+
setGridV(ui.position.left + inst.context.size.width / 2);
|
16076 |
+
} else {
|
16077 |
+
v = false;
|
16078 |
+
}
|
16079 |
+
|
16080 |
+
if (v) {
|
16081 |
+
vElement = inst.elements[i];
|
16082 |
+
verticalTolerance = Math.min(c, verticalTolerance);
|
16083 |
+
}
|
16084 |
+
}
|
16085 |
+
}
|
16086 |
+
|
16087 |
+
if (!hElement) {
|
16088 |
+
for (var i = inst.elements.length - 1; i >= 0; i--) {
|
16089 |
+
if (horizontalTolerance == 0) break;
|
16090 |
+
|
16091 |
+
var t = inst.elements[i].top,
|
16092 |
+
b = t + inst.elements[i].height,
|
16093 |
+
vc = (t + b) / 2;
|
16094 |
+
|
16095 |
+
var h = true,
|
16096 |
+
c;
|
16097 |
+
if ((c = Math.abs(t - y2)) < horizontalTolerance) {
|
16098 |
+
ui.position.top = t - inst.context.size.height - inst.context.canvas.offset.top - inst.margins.top;
|
16099 |
+
setGridH(ui.position.top + inst.context.size.height);
|
16100 |
+
} else if ((c = Math.abs(t - y1)) < horizontalTolerance) {
|
16101 |
+
ui.position.top = t - inst.context.canvas.offset.top - inst.margins.top;
|
16102 |
+
setGridH(ui.position.top);
|
16103 |
+
} else if ((c = Math.abs(b - y1)) < horizontalTolerance) {
|
16104 |
+
ui.position.top = b - inst.context.canvas.offset.top - inst.margins.top;
|
16105 |
+
setGridH(ui.position.top);
|
16106 |
+
} else if ((c = Math.abs(b - y2)) < horizontalTolerance) {
|
16107 |
+
ui.position.top = b - inst.context.size.height - inst.context.canvas.offset.top - inst.margins.top;
|
16108 |
+
setGridH(ui.position.top + inst.context.size.height);
|
16109 |
+
} else if ((c = Math.abs(vc - y2)) < horizontalTolerance) {
|
16110 |
+
ui.position.top = vc - inst.context.size.height - inst.context.canvas.offset.top - inst.margins.top;
|
16111 |
+
setGridH(ui.position.top + inst.context.size.height);
|
16112 |
+
} else if ((c = Math.abs(vc - y1)) < horizontalTolerance) {
|
16113 |
+
ui.position.top = vc - inst.context.canvas.offset.top - inst.margins.top;
|
16114 |
+
setGridH(ui.position.top);
|
16115 |
+
} else if ((c = Math.abs(vc - yc)) < horizontalTolerance) {
|
16116 |
+
ui.position.top = vc - inst.context.size.height / 2 - inst.context.canvas.offset.top - inst.margins.top;
|
16117 |
+
setGridH(ui.position.top + inst.context.size.height / 2);
|
16118 |
+
} else {
|
16119 |
+
h = false;
|
16120 |
+
}
|
16121 |
+
|
16122 |
+
if (h) {
|
16123 |
+
hElement = inst.elements[i];
|
16124 |
+
horizontalTolerance = Math.min(c, horizontalTolerance);
|
16125 |
+
}
|
16126 |
+
}
|
16127 |
+
}
|
16128 |
+
|
16129 |
+
if (vElement && vElement !== true) {
|
16130 |
+
inst.gridV.css('backgroundColor', vElement.backgroundColor);
|
16131 |
+
}
|
16132 |
+
if (hElement && hElement !== true) {
|
16133 |
+
inst.gridH.css('backgroundColor', hElement.backgroundColor);
|
16134 |
+
}
|
16135 |
+
}
|
16136 |
+
}
|
16137 |
+
});
|
16138 |
+
|
16139 |
+
return nUICanvas;
|
16140 |
+
});
|
16141 |
+
N2D('nUIColumns', ['nUIMouse'], function ($, undefined) {
|
16142 |
+
"use strict";
|
16143 |
+
|
16144 |
+
/**
|
16145 |
+
* @memberOf N2Classes
|
16146 |
+
*
|
16147 |
+
* @class
|
16148 |
+
* @constructor
|
16149 |
+
* @augments nUIMouse
|
16150 |
+
|
16151 |
+
* @this nUIColumns
|
16152 |
+
*/
|
16153 |
+
function nUIColumns(element, options) {
|
16154 |
+
this.element = $(element);
|
16155 |
+
|
16156 |
+
this.widgetName = this.widgetName || 'nUIColumns';
|
16157 |
+
this.widgetEventPrefix = "columns";
|
16158 |
+
|
16159 |
+
this.options = $.extend({
|
16160 |
+
columns: '1',
|
16161 |
+
gutter: 0,
|
16162 |
+
denominators: {
|
16163 |
+
1: 100,
|
16164 |
+
2: 100,
|
16165 |
+
3: 144,
|
16166 |
+
4: 100,
|
16167 |
+
5: 100,
|
16168 |
+
6: 144
|
16169 |
+
},
|
16170 |
+
// Callbacks
|
16171 |
+
drag: null,
|
16172 |
+
start: null,
|
16173 |
+
stop: null
|
16174 |
+
}, this.options, options);
|
16175 |
+
|
16176 |
+
N2Classes.nUIMouse.prototype.constructor.apply(this, arguments);
|
16177 |
+
|
16178 |
+
this.create();
|
16179 |
+
}
|
16180 |
+
|
16181 |
+
nUIColumns.prototype = Object.create(N2Classes.nUIMouse.prototype);
|
16182 |
+
nUIColumns.prototype.constructor = nUIColumns;
|
16183 |
+
|
16184 |
+
nUIColumns.prototype.create = function () {
|
16185 |
+
|
16186 |
+
this._setupHandles();
|
16187 |
+
|
16188 |
+
$(window).on('resize', $.proxy(this._resize, this));
|
16189 |
+
|
16190 |
+
this._mouseInit();
|
16191 |
+
};
|
16192 |
+
|
16193 |
+
nUIColumns.prototype._destroy = function () {
|
16194 |
+
|
16195 |
+
this._mouseDestroy();
|
16196 |
+
this.element
|
16197 |
+
.removeData("uiNextendColumns")
|
16198 |
+
.off(".columns")
|
16199 |
+
.find("> .ui-column-width-handle")
|
16200 |
+
.remove();
|
16201 |
+
|
16202 |
+
return this;
|
16203 |
+
};
|
16204 |
+
|
16205 |
+
nUIColumns.prototype.getDenominator = function (i) {
|
16206 |
+
if (this.options.denominators[i] === undefined) {
|
16207 |
+
this.options.denominators[i] = i * 15;
|
16208 |
+
}
|
16209 |
+
return this.options.denominators[i];
|
16210 |
+
};
|
16211 |
+
|
16212 |
+
nUIColumns.prototype._setupHandles = function () {
|
16213 |
+
var o = this.options, handle, i, n, axis;
|
16214 |
+
|
16215 |
+
this.fractions = [];
|
16216 |
+
|
16217 |
+
var columnWidths = o.columns.split('+');
|
16218 |
+
for (var i = 0; i < columnWidths.length; i++) {
|
16219 |
+
this.fractions.push(new Fraction(columnWidths[i]));
|
16220 |
+
}
|
16221 |
+
this.currentDenominator = this.getDenominator(this.fractions.length);
|
16222 |
+
|
16223 |
+
var currentPercent = 0;
|
16224 |
+
for (i = 0; i < this.fractions.length - 1; i++) {
|
16225 |
+
axis = $("<div class='ui-column-width-handle'>");
|
16226 |
+
|
16227 |
+
currentPercent += this.fractions[i].valueOf() * 100;
|
16228 |
+
axis
|
16229 |
+
.data('i', i)
|
16230 |
+
.data('percent', currentPercent)
|
16231 |
+
.appendTo(this.element)
|
16232 |
+
.on('mousedown', $.proxy(this._mouseDown, this));
|
16233 |
+
}
|
16234 |
+
|
16235 |
+
this.handles = this.element.find('> .ui-column-width-handle');
|
16236 |
+
|
16237 |
+
this.handles.css({
|
16238 |
+
'-ms-user-select': 'none',
|
16239 |
+
'-moz-user-select': '-moz-none',
|
16240 |
+
'-khtml-user-select': 'none',
|
16241 |
+
'-webkit-user-select': 'none',
|
16242 |
+
'user-select': 'none'
|
16243 |
+
});
|
16244 |
+
|
16245 |
+
this._resize();
|
16246 |
+
};
|
16247 |
+
|
16248 |
+
nUIColumns.prototype._resize = function () {
|
16249 |
+
this.paddingLeft = parseInt(this.element.css('paddingLeft'));
|
16250 |
+
this.paddingRight = parseInt(this.element.css('paddingRight'));
|
16251 |
+
|
16252 |
+
var containerWidth = this.element.width();
|
16253 |
+
|
16254 |
+
this.outerWidth = containerWidth + this.paddingLeft + this.paddingRight;
|
16255 |
+
this.innerWidth = containerWidth - this.handles.length * this.options.gutter;
|
16256 |
+
|
16257 |
+
for (var i = 0; i < this.handles.length; i++) {
|
16258 |
+
var currentPercent = this.handles.eq(i).data('percent');
|
16259 |
+
this._updateResizer(i, currentPercent);
|
16260 |
+
}
|
16261 |
+
};
|
16262 |
+
|
16263 |
+
nUIColumns.prototype._updateResizer = function (i, currentPercent) {
|
16264 |
+
this.handles.eq(i).css({
|
16265 |
+
left: currentPercent + '%',
|
16266 |
+
marginLeft: -2 + this.paddingLeft + (i + 0.5) * this.options.gutter + (this.innerWidth - this.outerWidth) * currentPercent / 100
|
16267 |
+
})
|
16268 |
+
};
|
16269 |
+
|
16270 |
+
nUIColumns.prototype._removeHandles = function () {
|
16271 |
+
this.handles.remove();
|
16272 |
+
};
|
16273 |
+
|
16274 |
+
nUIColumns.prototype.setOption = function (key, value) {
|
16275 |
+
N2Classes.nUIWidgetBase.prototype.setOption.apply(this, arguments);
|
16276 |
+
|
16277 |
+
switch (key) {
|
16278 |
+
case "columns":
|
16279 |
+
this._removeHandles();
|
16280 |
+
this._setupHandles();
|
16281 |
+
break;
|
16282 |
+
case "gutter":
|
16283 |
+
this._resize();
|
16284 |
+
}
|
16285 |
+
};
|
16286 |
+
|
16287 |
+
nUIColumns.prototype._mouseCapture = function (event) {
|
16288 |
+
var i, handle,
|
16289 |
+
capture = false;
|
16290 |
+
|
16291 |
+
for (i = 0; i < this.handles.length; i++) {
|
16292 |
+
handle = this.handles[i];
|
16293 |
+
if (handle === event.target) {
|
16294 |
+
capture = true;
|
16295 |
+
}
|
16296 |
+
}
|
16297 |
+
|
16298 |
+
return !this.options.disabled && capture;
|
16299 |
+
};
|
16300 |
+
|
16301 |
+
nUIColumns.prototype._mouseStart = function (event) {
|
16302 |
+
var index = $(event.target).data('i'),
|
16303 |
+
cLeft = this.element.offset().left + 10,
|
16304 |
+
containerWidth = this.element.width() - 20;
|
16305 |
+
|
16306 |
+
this.resizeContext = {
|
16307 |
+
index: index,
|
16308 |
+
cLeft: cLeft,
|
16309 |
+
containerWidth: containerWidth,
|
16310 |
+
startX: Math.max(0, Math.min(event.clientX - cLeft, containerWidth)),
|
16311 |
+
};
|
16312 |
+
|
16313 |
+
this.currentFractions = [];
|
16314 |
+
this.currentPercent = [];
|
16315 |
+
for (var i = 0; i < this.fractions.length; i++) {
|
16316 |
+
this.currentFractions.push(this.fractions[i].clone());
|
16317 |
+
this.currentPercent.push(this.fractions[i].valueOf());
|
16318 |
+
}
|
16319 |
+
|
16320 |
+
this.resizing = true;
|
16321 |
+
|
16322 |
+
$("body").css("cursor", "ew-resize");
|
16323 |
+
|
16324 |
+
this.element.addClass("ui-column-width-resizing");
|
16325 |
+
this._trigger("start", event, this.ui());
|
16326 |
+
return true;
|
16327 |
+
};
|
16328 |
+
|
16329 |
+
nUIColumns.prototype._mouseDrag = function (event) {
|
16330 |
+
|
16331 |
+
var currentX = Math.max(0, Math.min(event.clientX - this.resizeContext.cLeft, this.resizeContext.containerWidth)),
|
16332 |
+
fractionDifference = new Fraction(Math.round((currentX - this.resizeContext.startX) / (this.resizeContext.containerWidth / this.currentDenominator)), this.currentDenominator);
|
16333 |
+
|
16334 |
+
if (fractionDifference.compare(this.fractions[this.resizeContext.index].clone().mul(-1)) < 0) {
|
16335 |
+
fractionDifference = this.fractions[this.resizeContext.index].clone().mul(-1);
|
16336 |
+
}
|
16337 |
+
if (fractionDifference.compare(this.fractions[this.resizeContext.index + 1]) > 0) {
|
16338 |
+
fractionDifference = this.fractions[this.resizeContext.index + 1].clone();
|
16339 |
+
}
|
16340 |
+
|
16341 |
+
this.currentFractions[this.resizeContext.index] = this.fractions[this.resizeContext.index].add(fractionDifference);
|
16342 |
+
this.currentFractions[this.resizeContext.index + 1] = this.fractions[this.resizeContext.index + 1].sub(fractionDifference);
|
16343 |
+
|
16344 |
+
var currentPercent = 0;
|
16345 |
+
this.currentPercent = [];
|
16346 |
+
for (var i = 0; i < this.currentFractions.length; i++) {
|
16347 |
+
var width = this.currentFractions[i].valueOf();
|
16348 |
+
this.currentPercent.push(width);
|
16349 |
+
currentPercent += width * 100;
|
16350 |
+
this._updateResizer(i, currentPercent);
|
16351 |
+
}
|
16352 |
+
|
16353 |
+
this._trigger("colwidth", event, this.ui());
|
16354 |
+
};
|
16355 |
+
|
16356 |
+
nUIColumns.prototype._mouseStop = function (event) {
|
16357 |
+
|
16358 |
+
this.resizing = false;
|
16359 |
+
|
16360 |
+
$("body").css("cursor", "auto");
|
16361 |
+
|
16362 |
+
this._trigger("stop", event, this.ui());
|
16363 |
+
|
16364 |
+
this.fractions = this.currentFractions;
|
16365 |
+
|
16366 |
+
nextend.preventMouseUp();
|
16367 |
+
return false;
|
16368 |
+
};
|
16369 |
+
|
16370 |
+
nUIColumns.prototype.ui = function () {
|
16371 |
+
return {
|
16372 |
+
element: this.element,
|
16373 |
+
originalFractions: this.fractions,
|
16374 |
+
currentFractions: this.currentFractions,
|
16375 |
+
currentPercent: this.currentPercent,
|
16376 |
+
index: this.resizeContext.index
|
16377 |
+
};
|
16378 |
+
};
|
16379 |
+
|
16380 |
+
N2Classes.nUIWidgetBase.register('nUIColumns');
|
16381 |
+
|
16382 |
+
return nUIColumns;
|
16383 |
+
});
|
16384 |
+
N2D('nUILayerListItem', ['nUIMouse'], function ($, undefined) {
|
16385 |
+
"use strict";
|
16386 |
+
|
16387 |
+
/**
|
16388 |
+
* @memberOf N2Classes
|
16389 |
+
*
|
16390 |
+
* @class
|
16391 |
+
* @constructor
|
16392 |
+
* @augments nUIMouse
|
16393 |
+
|
16394 |
+
* @this nUILayerListItem
|
16395 |
+
*/
|
16396 |
+
function nUILayerListItem(element, options) {
|
16397 |
+
this.element = $(element);
|
16398 |
+
|
16399 |
+
this.widgetName = this.widgetName || 'nUILayerListItem';
|
16400 |
+
this.widgetEventPrefix = "layerListItem";
|
16401 |
+
|
16402 |
+
this.options = $.extend({
|
16403 |
+
UIManager: null,
|
16404 |
+
layer: false,
|
16405 |
+
$layer: null,
|
16406 |
+
distance: 2
|
16407 |
+
}, this.options, options);
|
16408 |
+
|
16409 |
+
N2Classes.nUIMouse.prototype.constructor.apply(this, arguments);
|
16410 |
+
|
16411 |
+
this.create();
|
16412 |
+
}
|
16413 |
+
|
16414 |
+
nUILayerListItem.prototype = Object.create(N2Classes.nUIMouse.prototype);
|
16415 |
+
nUILayerListItem.prototype.constructor = nUILayerListItem;
|
16416 |
+
|
16417 |
+
nUILayerListItem.prototype.create = function () {
|
16418 |
+
|
16419 |
+
this._mouseInit();
|
16420 |
+
};
|
16421 |
+
|
16422 |
+
nUILayerListItem.prototype._mouseCapture = function (event, overrideHandle) {
|
16423 |
+
return this.options.UIManager._mouseCapture(this.options, event, overrideHandle);
|
16424 |
+
};
|
16425 |
+
|
16426 |
+
nUILayerListItem.prototype._mouseStart = function (event, overrideHandle, noActivation) {
|
16427 |
+
this._trigger('start');
|
16428 |
+
return this.options.UIManager._mouseStart(this.options, event, overrideHandle, noActivation);
|
16429 |
+
};
|
16430 |
+
|
16431 |
+
nUILayerListItem.prototype._mouseDrag = function (event) {
|
16432 |
+
return this.options.UIManager._mouseDrag(this.options, event);
|
16433 |
+
};
|
16434 |
+
|
16435 |
+
nUILayerListItem.prototype._mouseStop = function (event, noPropagation) {
|
16436 |
+
return this.options.UIManager._mouseStop(this.options, event, noPropagation);
|
16437 |
+
|
16438 |
+
};
|
16439 |
+
|
16440 |
+
nUILayerListItem.prototype._destroy = function () {
|
16441 |
+
this._mouseDestroy();
|
16442 |
+
return this;
|
16443 |
+
};
|
16444 |
+
|
16445 |
+
N2Classes.nUIWidgetBase.register('nUILayerListItem');
|
16446 |
+
|
16447 |
+
return nUILayerListItem;
|
16448 |
+
});
|
16449 |
+
N2D('nUILayerList', ['nUIWidgetBase'], function ($, undefined) {
|
16450 |
+
"use strict";
|
16451 |
+
|
16452 |
+
/**
|
16453 |
+
* @memberOf N2Classes
|
16454 |
+
*
|
16455 |
+
* @class
|
16456 |
+
* @constructor
|
16457 |
+
* @augments nUIWidgetBase
|
16458 |
+
|
16459 |
+
* @this nUILayerList
|
16460 |
+
*/
|
16461 |
+
function nUILayerList(element, options) {
|
16462 |
+
this.element = $(element);
|
16463 |
+
|
16464 |
+
this.widgetName = this.widgetName || 'nUILayerList';
|
16465 |
+
this.widgetEventPrefix = "layerList";
|
16466 |
+
|
16467 |
+
this.options = $.extend({
|
16468 |
+
$fixed: null,
|
16469 |
+
$scrolled: null
|
16470 |
+
}, this.options, options);
|
16471 |
+
|
16472 |
+
N2Classes.nUIWidgetBase.prototype.constructor.apply(this, arguments);
|
16473 |
+
|
16474 |
+
this.create();
|
16475 |
+
}
|
16476 |
+
|
16477 |
+
nUILayerList.prototype = Object.create(N2Classes.nUIWidgetBase.prototype);
|
16478 |
+
nUILayerList.prototype.constructor = nUILayerList;
|
16479 |
+
|
16480 |
+
nUILayerList.prototype.create = function () {
|
16481 |
+
|
16482 |
+
this.scrollTimeout = null;
|
16483 |
+
};
|
16484 |
+
|
16485 |
+
|
16486 |
+
nUILayerList.prototype._mouseCapture = function (itemOptions, event, overrideHandle) {
|
16487 |
+
return true;
|
16488 |
+
};
|
16489 |
+
|
16490 |
+
nUILayerList.prototype._mouseStart = function (itemOptions, event, overrideHandle, noActivation) {
|
16491 |
+
|
16492 |
+
this.scrolledTop = this.options.$scrolled.offset().top;
|
16493 |
+
this.scrolledHeight = this.options.$scrolled.height();
|
16494 |
+
this.scrolledScroll = this.options.$scrolled.scrollTop();
|
16495 |
+
this.scrolledMaxHeight = this.options.$scrolled[0].scrollHeight - this.scrolledHeight;
|
16496 |
+
|
16497 |
+
$('body').addClass('n2-ss-layer-list-move-layer');
|
16498 |
+
|
16499 |
+
this.context = {
|
16500 |
+
placeholder: $('<div class="nextend-sortable-placeholder"><div></div></div>'),
|
16501 |
+
mouse: {
|
16502 |
+
y: event.pageY,
|
16503 |
+
topModifier: itemOptions.$item.offset().top - event.pageY
|
16504 |
+
},
|
16505 |
+
$item: itemOptions.$item,
|
16506 |
+
$clone: itemOptions.$item.clone()
|
16507 |
+
};
|
16508 |
+
|
16509 |
+
this.context.$clone.addClass('n2-ss-ll-dragging').appendTo(this.options.$scrolled.find('> ul'));
|
16510 |
+
|
16511 |
+
this.context.droppables = this.options.mainContainer.getLLDroppables(itemOptions.layer);
|
16512 |
+
|
16513 |
+
this._cacheContainers();
|
16514 |
+
|
16515 |
+
this._trigger("start", event);
|
16516 |
+
|
16517 |
+
this._mouseDrag(itemOptions, event);
|
16518 |
+
};
|
16519 |
+
|
16520 |
+
nUILayerList.prototype._scrollUp = function () {
|
16521 |
+
if (this.scrolledTop > 0) {
|
16522 |
+
if (this.scrollTimeout === null) {
|
16523 |
+
this.scrollTimeout = setInterval($.proxy(function () {
|
16524 |
+
this.scrolledScroll -= 30;
|
16525 |
+
this.options.$scrolled.scrollTop(this.scrolledScroll);
|
16526 |
+
}, this), 100);
|
16527 |
+
this.scrolledScroll -= 30;
|
16528 |
+
this.options.$scrolled.scrollTop(this.scrolledScroll);
|
16529 |
+
}
|
16530 |
+
}
|
16531 |
+
};
|
16532 |
+
|
16533 |
+
nUILayerList.prototype._scrollDown = function () {
|
16534 |
+
if (this.scrollTimeout === null) {
|
16535 |
+
this.scrollTimeout = setInterval($.proxy(function () {
|
16536 |
+
this.scrolledScroll += 30;
|
16537 |
+
this.options.$scrolled.scrollTop(Math.min(this.scrolledScroll, this.scrolledMaxHeight));
|
16538 |
+
}, this), 100);
|
16539 |
+
this.scrolledScroll += 30;
|
16540 |
+
this.options.$scrolled.scrollTop(Math.min(this.scrolledScroll, this.scrolledMaxHeight));
|
16541 |
+
}
|
16542 |
+
};
|
16543 |
+
|
16544 |
+
nUILayerList.prototype._mouseDrag = function (itemOptions, event) {
|
16545 |
+
|
16546 |
+
this.scrolledTop = this.options.$scrolled.offset().top;
|
16547 |
+
|
16548 |
+
if (this.scrolledHeight > 60) {
|
16549 |
+
if (event.pageY < this.scrolledTop + 30) {
|
16550 |
+
this._scrollUp();
|
16551 |
+
} else if (event.pageY > this.scrolledTop + this.scrolledHeight - 30) {
|
16552 |
+
this._scrollDown();
|
16553 |
+
} else {
|
16554 |
+
clearInterval(this.scrollTimeout);
|
16555 |
+
this.scrollTimeout = null;
|
16556 |
+
}
|
16557 |
+
}
|
16558 |
+
|
16559 |
+
|
16560 |
+
this.scrolledScroll = this.options.$scrolled.scrollTop();
|
16561 |
+
|
16562 |
+
var y = event.pageY - this.scrolledTop + this.scrolledScroll;
|
16563 |
+
|
16564 |
+
var targetContainer = this._findInnerContainer(y);
|
16565 |
+
if (targetContainer === false) {
|
16566 |
+
targetContainer = this.context.droppables[0];
|
16567 |
+
}
|
16568 |
+
|
16569 |
+
if (typeof targetContainer.layers === "undefined") {
|
16570 |
+
targetContainer.layers = this._cacheContainerLayers(targetContainer);
|
16571 |
+
}
|
16572 |
+
|
16573 |
+
var targetIndex = this._findNormalIndex(y, targetContainer);
|
16574 |
+
|
16575 |
+
if (targetIndex > 0) {
|
16576 |
+
this.context.placeholder.insertAfter(targetContainer.layers[targetIndex - 1].layer.layerRow);
|
16577 |
+
} else {
|
16578 |
+
this.context.placeholder.prependTo(targetContainer.$container);
|
16579 |
+
}
|
16580 |
+
|
16581 |
+
this.context.targetIndex = targetIndex;
|
16582 |
+
if (this.context.targetContainer && this.context.targetContainer != targetContainer) {
|
16583 |
+
this.context.targetContainer.layer.layerRow.removeClass('n2-ss-ll-dragging-parent');
|
16584 |
+
}
|
16585 |
+
|
16586 |
+
this.context.targetContainer = targetContainer;
|
16587 |
+
this.context.targetContainer.layer.layerRow.addClass('n2-ss-ll-dragging-parent');
|
16588 |
+
|
16589 |
+
this.context.$clone.css({
|
16590 |
+
top: y + this.context.mouse.topModifier
|
16591 |
+
});
|
16592 |
+
|
16593 |
+
};
|
16594 |
+
|
16595 |
+
nUILayerList.prototype._mouseStop = function (itemOptions, event, noPropagation) {
|
16596 |
+
|
16597 |
+
if (this.scrollTimeout !== null) {
|
16598 |
+
clearInterval(this.scrollTimeout);
|
16599 |
+
this.scrollTimeout = null;
|
16600 |
+
}
|
16601 |
+
|
16602 |
+
this.context.placeholder.remove();
|
16603 |
+
|
16604 |
+
this.context.$clone.remove();
|
16605 |
+
|
16606 |
+
this.context.targetContainer.layer.layerRow.removeClass('n2-ss-ll-dragging-parent');
|
16607 |
+
|
16608 |
+
var targetIndex = this.context.targetIndex,
|
16609 |
+
targetContainer = this.context.targetContainer,
|
16610 |
+
originalIndex = itemOptions.layer.getIndex(),
|
16611 |
+
newIndex = -1;
|
16612 |
+
|
16613 |
+
|
16614 |
+
if (this.context.targetContainer.layers.length == 0) {
|
16615 |
+
newIndex = 0;
|
16616 |
+
} else {
|
16617 |
+
var nextLayer = false,
|
16618 |
+
prevLayer = false;
|
16619 |
+
|
16620 |
+
if (this.context.targetContainer.layers[targetIndex]) {
|
16621 |
+
nextLayer = this.context.targetContainer.layers[targetIndex].layer;
|
16622 |
+
}
|
16623 |
+
|
16624 |
+
if (this.context.targetContainer.layers[targetIndex - 1]) {
|
16625 |
+
prevLayer = this.context.targetContainer.layers[targetIndex - 1].layer;
|
16626 |
+
}
|
16627 |
+
|
16628 |
+
if (nextLayer == itemOptions.layer || prevLayer == itemOptions.layer) {
|
16629 |
+
newIndex = -1;
|
16630 |
+
} else {
|
16631 |
+
if (targetContainer.layer.container.allowedPlacementMode == 'absolute') {
|
16632 |
+
if (nextLayer) {
|
16633 |
+
//itemOptions.layer.layer.detach();
|
16634 |
+
newIndex = nextLayer.getIndex() + 1;
|
16635 |
+
} else if (prevLayer) {
|
16636 |
+
//itemOptions.layer.layer.detach();
|
16637 |
+
newIndex = prevLayer.getIndex();
|
16638 |
+
}
|
16639 |
+
} else {
|
16640 |
+
if (prevLayer) {
|
16641 |
+
//itemOptions.layer.layer.detach();
|
16642 |
+
newIndex = prevLayer.getIndex() + 1;
|
16643 |
+
} else if (nextLayer) {
|
16644 |
+
//itemOptions.layer.layer.detach();
|
16645 |
+
newIndex = nextLayer.getIndex();
|
16646 |
+
}
|
16647 |
+
}
|
16648 |
+
}
|
16649 |
+
}
|
16650 |
+
if (newIndex >= 0) {
|
16651 |
+
if (itemOptions.layer.type == 'col') {
|
16652 |
+
if (newIndex > originalIndex) {
|
16653 |
+
newIndex--;
|
16654 |
+
}
|
16655 |
+
targetContainer.layer.moveCol(originalIndex, newIndex);
|
16656 |
+
} else {
|
16657 |
+
targetContainer.layer.container.insertLayerAt(itemOptions.layer, newIndex);
|
16658 |
+
itemOptions.layer.onCanvasUpdate(originalIndex, targetContainer.layer, newIndex);
|
16659 |
+
}
|
16660 |
+
}
|
16661 |
+
|
16662 |
+
delete this.context;
|
16663 |
+
|
16664 |
+
this._trigger("stop", event);
|
16665 |
+
|
16666 |
+
|
16667 |
+
$('body').removeClass('n2-ss-layer-list-move-layer');
|
16668 |
+
};
|
16669 |
+
|
16670 |
+
nUILayerList.prototype.cancel = function (itemOptions) {
|
16671 |
+
};
|
16672 |
+
|
16673 |
+
nUILayerList.prototype._cacheContainers = function () {
|
16674 |
+
for (var i = 0; i < this.context.droppables.length; i++) {
|
16675 |
+
var obj = this.context.droppables[i];
|
16676 |
+
obj.top = obj.$container.offset().top - this.scrolledTop + this.scrolledScroll - 15;
|
16677 |
+
obj.height = obj.$container.outerHeight();
|
16678 |
+
obj.bottom = obj.top + obj.height + 15;
|
16679 |
+
}
|
16680 |
+
};
|
16681 |
+
|
16682 |
+
nUILayerList.prototype._findInnerContainer = function (y) {
|
16683 |
+
for (var i = this.context.droppables.length - 1; i >= 0; i--) {
|
16684 |
+
var obj = this.context.droppables[i];
|
16685 |
+
if (obj.top <= y && obj.bottom >= y) {
|
16686 |
+
return obj;
|
16687 |
+
}
|
16688 |
+
}
|
16689 |
+
return false;
|
16690 |
+
};
|
16691 |
+
|
16692 |
+
nUILayerList.prototype._cacheContainerLayers = function (droppable) {
|
16693 |
+
var layerObjects = [],
|
16694 |
+
layers = droppable.layer.container.getSortedLayers();
|
16695 |
+
|
16696 |
+
for (var i = 0; i < layers.length; i++) {
|
16697 |
+
//if (layers[i].layerRow[0] === this.context.$item[0]) continue;
|
16698 |
+
var obj = {
|
16699 |
+
layer: layers[i]
|
16700 |
+
};
|
16701 |
+
obj.top = obj.layer.layerRow.offset().top - this.scrolledTop + this.scrolledScroll;
|
16702 |
+
obj.height = obj.layer.layerRow.outerHeight();
|
16703 |
+
obj.bottom = obj.top + obj.height / 2;
|
16704 |
+
obj.index = i;
|
16705 |
+
layerObjects.push(obj);
|
16706 |
+
}
|
16707 |
+
|
16708 |
+
if (droppable.layer.container.allowedPlacementMode == 'absolute') {
|
16709 |
+
layerObjects.reverse();
|
16710 |
+
}
|
16711 |
+
|
16712 |
+
return layerObjects;
|
16713 |
+
};
|
16714 |
+
|
16715 |
+
nUILayerList.prototype._findNormalIndex = function (y, targetContainer) {
|
16716 |
+
for (var i = 0; i < targetContainer.layers.length; i++) {
|
16717 |
+
var obj = targetContainer.layers[i];
|
16718 |
+
if (y <= obj.bottom) {
|
16719 |
+
return i;
|
16720 |
+
}
|
16721 |
+
}
|
16722 |
+
return targetContainer.layers.length;
|
16723 |
+
};
|
16724 |
+
|
16725 |
+
N2Classes.nUIWidgetBase.register('nUILayerList');
|
16726 |
+
|
16727 |
+
return nUILayerList;
|
16728 |
+
});
|
16729 |
+
N2D('ItemButton', ['Item'], function ($, undefined) {
|
16730 |
+
"use strict";
|
16731 |
+
|
16732 |
+
/**
|
16733 |
+
* @memberOf N2Classes
|
16734 |
+
*
|
16735 |
+
* @constructor
|
16736 |
+
* @augments Item
|
16737 |
+
*/
|
16738 |
+
function ItemButton() {
|
16739 |
+
this.type = 'button';
|
16740 |
+
N2Classes.Item.prototype.constructor.apply(this, arguments);
|
16741 |
+
}
|
16742 |
+
|
16743 |
+
ItemButton.prototype = Object.create(N2Classes.Item.prototype);
|
16744 |
+
ItemButton.prototype.constructor = ItemButton;
|
16745 |
+
|
16746 |
+
ItemButton.needSize = false;
|
16747 |
+
|
16748 |
+
ItemButton.prototype.added = function () {
|
16749 |
+
this.needFill = ['content'];
|
16750 |
+
this.addedFont('link', 'font');
|
16751 |
+
this.addedStyle('button', 'style');
|
16752 |
+
|
16753 |
+
this.generator.registerFields(['#item_buttoncontent', '#linkitem_buttonlink-1']);
|
16754 |
+
};
|
16755 |
+
|
16756 |
+
ItemButton.prototype.getName = function (data) {
|
16757 |
+
return data.content;
|
16758 |
+
};
|
16759 |
+
|
16760 |
+
ItemButton.prototype.parseAll = function (data) {
|
16761 |
+
var link = data.link.split('|*|');
|
16762 |
+
data.url = link[0];
|
16763 |
+
data.target = link[1];
|
16764 |
+
delete data.link;
|
16765 |
+
|
16766 |
+
data.classes = '';
|
16767 |
+
|
16768 |
+
if (parseInt(data.fullwidth)) {
|
16769 |
+
data.classes += ' n2-ss-fullwidth';
|
16770 |
+
}
|
16771 |
+
|
16772 |
+
if (parseInt(data.nowrap)) {
|
16773 |
+
data.classes += ' n2-ss-nowrap';
|
16774 |
+
}
|
16775 |
+
|
16776 |
+
N2Classes.Item.prototype.parseAll.apply(this, arguments);
|
16777 |
+
};
|
16778 |
+
|
16779 |
+
ItemButton.prototype._render = function (data) {
|
16780 |
+
var $node = $('<div class="n2-ss-button-container n2-ow ' + data.fontclass + ' ' + data.classes + '" />'),
|
16781 |
+
$link = $('<a href="#" onclick="return false;" class="' + data.styleclass + ' ' + data.class + ' n2-ow"></a>').appendTo($node),
|
16782 |
+
$label = $('<span><span>' + data.content + '</span></span>').appendTo($link);
|
16783 |
+
|
16784 |
+
this.$item.append($node);
|
16785 |
+
};
|
16786 |
+
|
16787 |
+
return ItemButton;
|
16788 |
+
});
|
16789 |
+
N2D('ItemHeading', ['Item'], function ($, undefined) {
|
16790 |
+
"use strict";
|
16791 |
+
|
16792 |
+
/**
|
16793 |
+
* @memberOf N2Classes
|
16794 |
+
*
|
16795 |
+
* @constructor
|
16796 |
+
* @augments Item
|
16797 |
+
*/
|
16798 |
+
function ItemHeading() {
|
16799 |
+
this.type = 'heading';
|
16800 |
+
N2Classes.Item.prototype.constructor.apply(this, arguments);
|
16801 |
+
}
|
16802 |
+
|
16803 |
+
ItemHeading.prototype = Object.create(N2Classes.Item.prototype);
|
16804 |
+
ItemHeading.prototype.constructor = ItemHeading;
|
16805 |
+
|
16806 |
+
ItemHeading.needSize = false;
|
16807 |
+
|
16808 |
+
ItemHeading.prototype.getDefault = function () {
|
16809 |
+
return {
|
16810 |
+
link: '#|*|_self',
|
16811 |
+
font: '',
|
16812 |
+
style: ''
|
16813 |
+
}
|
16814 |
+
};
|
16815 |
+
|
16816 |
+
ItemHeading.prototype.added = function () {
|
16817 |
+
this.needFill = ['heading'];
|
16818 |
+
|
16819 |
+
this.addedFont('hover', 'font');
|
16820 |
+
this.addedStyle('heading', 'style');
|
16821 |
+
|
16822 |
+
this.generator.registerFields(['#item_headingheading', '#linkitem_headinglink-1']);
|
16823 |
+
};
|
16824 |
+
|
16825 |
+
ItemHeading.prototype.getName = function (data) {
|
16826 |
+
return data.heading;
|
16827 |
+
};
|
16828 |
+
|
16829 |
+
ItemHeading.prototype.parseAll = function (data) {
|
16830 |
+
data.uid = $.fn.uid();
|
16831 |
+
|
16832 |
+
var link = data.link.split('|*|');
|
16833 |
+
data.url = link[0];
|
16834 |
+
data.target = link[1];
|
16835 |
+
delete data.link;
|
16836 |
+
|
16837 |
+
|
16838 |
+
if (parseInt(data.fullwidth)) {
|
16839 |
+
data.display = 'block';
|
16840 |
+
} else {
|
16841 |
+
data.display = 'inline-block';
|
16842 |
+
}
|
16843 |
+
|
16844 |
+
data.extrastyle = parseInt(data.nowrap) ? 'white-space: nowrap;' : '';
|
16845 |
+
|
16846 |
+
data.heading = $('<div>' + data.heading + '</div>').text().replace(/\n/g, '<br />');
|
16847 |
+
data.priority = 2;
|
16848 |
+
data.class = '';
|
16849 |
+
|
16850 |
+
|
16851 |
+
N2Classes.Item.prototype.parseAll.apply(this, arguments);
|
16852 |
+
|
16853 |
+
if (data['url'] == '#' || data['url'] == '') {
|
16854 |
+
data['afontclass'] = '';
|
16855 |
+
data['astyleclass'] = '';
|
16856 |
+
} else {
|
16857 |
+
data['afontclass'] = data['fontclass'];
|
16858 |
+
data['fontclass'] = '';
|
16859 |
+
data['astyleclass'] = data['styleclass'];
|
16860 |
+
data['styleclass'] = '';
|
16861 |
+
}
|
16862 |
+
};
|
16863 |
+
|
16864 |
+
ItemHeading.prototype._render = function (data) {
|
16865 |
+
var $node = $('<div class="n2-ow" />'),
|
16866 |
+
$heading = $('<div id="' + data.uid + '" style="' + data.extrastyle + '"></div>')
|
16867 |
+
.addClass('n2-ow ' + data.fontclass + ' ' + data.styleclass + ' ' + data.class)
|
16868 |
+
.css({
|
16869 |
+
display: data.display
|
16870 |
+
}).appendTo($node);
|
16871 |
+
|
16872 |
+
if (data['url'] == '#' || data['url'] == '') {
|
16873 |
+
$heading.html(data.heading);
|
16874 |
+
} else {
|
16875 |
+
$heading.append($('<a style="display:' + data.display + ';" href="#" class="' + data.afontclass + ' ' + data.astyleclass + ' n2-ow" onclick="return false;">' + data.heading + '</a>'));
|
16876 |
+
}
|
16877 |
+
|
16878 |
+
this.$item.append($node);
|
16879 |
+
};
|
16880 |
+
|
16881 |
+
return ItemHeading;
|
16882 |
+
});
|
16883 |
+
N2D('ItemImage', ['Item'], function ($, undefined) {
|
16884 |
+
"use strict";
|
16885 |
+
|
16886 |
+
/**
|
16887 |
+
* @memberOf N2Classes
|
16888 |
+
*
|
16889 |
+
* @constructor
|
16890 |
+
* @augments N2Classes.Item
|
16891 |
+
*/
|
16892 |
+
function ItemImage() {
|
16893 |
+
this.type = 'image';
|
16894 |
+
N2Classes.Item.prototype.constructor.apply(this, arguments);
|
16895 |
+
}
|
16896 |
+
|
16897 |
+
ItemImage.prototype = Object.create(N2Classes.Item.prototype);
|
16898 |
+
ItemImage.prototype.constructor = ItemImage;
|
16899 |
+
|
16900 |
+
ItemImage.needSize = false;
|
16901 |
+
|
16902 |
+
ItemImage.prototype.getDefault = function () {
|
16903 |
+
return {
|
16904 |
+
size: 'auto|*|auto',
|
16905 |
+
link: '#|*|_self',
|
16906 |
+
style: ''
|
16907 |
+
}
|
16908 |
+
};
|
16909 |
+
|
16910 |
+
ItemImage.prototype.added = function () {
|
16911 |
+
this.needFill = ['image'];
|
16912 |
+
|
16913 |
+
this.generator.registerFields(['#item_imageimage', '#item_imagealt', '#item_imagetitle', '#linkitem_imagelink-1']);
|
16914 |
+
};
|
16915 |
+
|
16916 |
+
ItemImage.prototype.getName = function (data) {
|
16917 |
+
return data.image.split('/').pop();
|
16918 |
+
};
|
16919 |
+
|
16920 |
+
ItemImage.prototype.parseAll = function (data) {
|
16921 |
+
var size = data.size.split('|*|');
|
16922 |
+
data.width = size[0];
|
16923 |
+
data.height = size[1];
|
16924 |
+
delete data.size;
|
16925 |
+
|
16926 |
+
var link = data.link.split('|*|');
|
16927 |
+
data.url = link[0];
|
16928 |
+
data.target = link[1];
|
16929 |
+
delete data.link;
|
16930 |
+
|
16931 |
+
N2Classes.Item.prototype.parseAll.apply(this, arguments);
|
16932 |
+
|
16933 |
+
if (data.image != this.values.image) {
|
16934 |
+
data.image = nextend.imageHelper.fixed(data.image);
|
16935 |
+
|
16936 |
+
if (this.layer.placement.getType() == 'absolute') {
|
16937 |
+
this.resizeLayerToImage(data.image);
|
16938 |
+
}
|
16939 |
+
} else {
|
16940 |
+
data.image = nextend.imageHelper.fixed(data.image);
|
16941 |
+
}
|
16942 |
+
|
16943 |
+
};
|
16944 |
+
|
16945 |
+
ItemImage.prototype.fitLayer = function () {
|
16946 |
+
if (this.layer.placement.getType() == 'absolute') {
|
16947 |
+
this.resizeLayerToImage(nextend.imageHelper.fixed(this.values.image));
|
16948 |
+
}
|
16949 |
+
return true;
|
16950 |
+
};
|
16951 |
+
|
16952 |
+
ItemImage.prototype._render = function (data) {
|
16953 |
+
data.styleclass = '';
|
16954 |
+
|
16955 |
+
var $node = $('<div class="' + data.styleclass + ' n2-ss-img-wrapper n2-ow" style="overflow:hidden"></div>'),
|
16956 |
+
$a = $node;
|
16957 |
+
|
16958 |
+
if (data['url'] != '#' && data['url'] != '') {
|
16959 |
+
$a = $('<a href="#" class="n2-ow" onclick="return false;" style="display: block;background: none !important;"></a>').appendTo($node);
|
16960 |
+
}
|
16961 |
+
|
16962 |
+
$('<img class="n2-ow ' + data.cssclass + '" src="' + data.image + '"/>').css({
|
16963 |
+
display: 'inline-block',
|
16964 |
+
maxWidth: '100%',
|
16965 |
+
width: data.width,
|
16966 |
+
height: data.height
|
16967 |
+
}).appendTo($a);
|
16968 |
+
|
16969 |
+
this.$item.append($node);
|
16970 |
+
};
|
16971 |
+
|
16972 |
+
return ItemImage;
|
16973 |
+
});
|
16974 |
+
N2D('ItemText', ['Item'], function ($, undefined) {
|
16975 |
+
"use strict";
|
16976 |
+
|
16977 |
+
/**
|
16978 |
+
* @memberOf N2Classes
|
16979 |
+
*
|
16980 |
+
* @constructor
|
16981 |
+
* @augments Item
|
16982 |
+
*/
|
16983 |
+
function ItemText() {
|
16984 |
+
this.type = 'text';
|
16985 |
+
N2Classes.Item.prototype.constructor.apply(this, arguments);
|
16986 |
+
}
|
16987 |
+
|
16988 |
+
ItemText.prototype = Object.create(N2Classes.Item.prototype);
|
16989 |
+
ItemText.prototype.constructor = ItemText;
|
16990 |
+
|
16991 |
+
ItemText.needSize = false;
|
16992 |
+
|
16993 |
+
ItemText.prototype.getDefault = function () {
|
16994 |
+
return {
|
16995 |
+
contentmobile: '',
|
16996 |
+
contenttablet: '',
|
16997 |
+
font: '',
|
16998 |
+
style: ''
|
16999 |
+
}
|
17000 |
+
};
|
17001 |
+
|
17002 |
+
ItemText.prototype.added = function () {
|
17003 |
+
this.needFill = ['content', 'contenttablet', 'contentmobile'];
|
17004 |
+
|
17005 |
+
this.addedFont('paragraph', 'font');
|
17006 |
+
this.addedStyle('heading', 'style');
|
17007 |
+
|
17008 |
+
this.generator.registerFields(['#item_textcontent', '#item_textcontenttablet', '#item_textcontentmobile']);
|
17009 |
+
};
|
17010 |
+
|
17011 |
+
ItemText.prototype.getName = function (data) {
|
17012 |
+
return data.content;
|
17013 |
+
};
|
17014 |
+
|
17015 |
+
ItemText.prototype.parseAll = function (data) {
|
17016 |
+
N2Classes.Item.prototype.parseAll.apply(this, arguments);
|
17017 |
+
|
17018 |
+
data['p'] = _wp_Autop(data['content']);
|
17019 |
+
data['ptablet'] = _wp_Autop(data['contenttablet']);
|
17020 |
+
data['pmobile'] = _wp_Autop(data['contentmobile']);
|
17021 |
+
};
|
17022 |
+
|
17023 |
+
|
17024 |
+
ItemText.prototype._render = function (data) {
|
17025 |
+
var $content = $('<div class="n2-ss-desktop n2-ow n2-ow-all">' + data.p + '</div>').appendTo(this.$item);
|
17026 |
+
|
17027 |
+
if (data['contenttablet'] == '') {
|
17028 |
+
$content.addClass('n2-ss-tablet');
|
17029 |
+
} else {
|
17030 |
+
$content = $('<div class="n2-ss-tablet n2-ow n2-ow-all">' + data.ptablet + '</div>').appendTo(this.$item);
|
17031 |
+
}
|
17032 |
+
|
17033 |
+
if (data['contentmobile'] == '') {
|
17034 |
+
$content.addClass('n2-ss-mobile');
|
17035 |
+
} else {
|
17036 |
+
$('<div class="n2-ss-mobile n2-ow n2-ow-all">' + data.pmobile + '</div>').appendTo(this.$item);
|
17037 |
+
}
|
17038 |
+
|
17039 |
+
this.$item.find('p').addClass(data.fontclass + ' ' + data.styleclass);
|
17040 |
+
|
17041 |
+
};
|
17042 |
+
|
17043 |
+
function _wp_Autop(text) {
|
17044 |
+
var preserve_linebreaks = false,
|
17045 |
+
preserve_br = false,
|
17046 |
+
blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
|
17047 |
+
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
|
17048 |
+
'|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
|
17049 |
+
|
17050 |
+
// Normalize line breaks.
|
17051 |
+
text = text.replace(/\r\n|\r/g, '\n') + "\n";
|
17052 |
+
|
17053 |
+
if (text.indexOf('\n') === -1) {
|
17054 |
+
return text;
|
17055 |
+
}
|
17056 |
+
|
17057 |
+
// Remove line breaks from <object>.
|
17058 |
+
if (text.indexOf('<object') !== -1) {
|
17059 |
+
text = text.replace(/<object[\s\S]+?<\/object>/g, function (a) {
|
17060 |
+
return a.replace(/\n+/g, '');
|
17061 |
+
});
|
17062 |
+
}
|
17063 |
+
|
17064 |
+
// Remove line breaks from tags.
|
17065 |
+
text = text.replace(/<[^<>]+>/g, function (a) {
|
17066 |
+
return a.replace(/[\n\t ]+/g, ' ');
|
17067 |
+
});
|
17068 |
+
|
17069 |
+
// Preserve line breaks in <pre> and <script> tags.
|
17070 |
+
if (text.indexOf('<pre') !== -1 || text.indexOf('<script') !== -1) {
|
17071 |
+
preserve_linebreaks = true;
|
17072 |
+
text = text.replace(/<(pre|script)[^>]*>[\s\S]*?<\/\1>/g, function (a) {
|
17073 |
+
return a.replace(/\n/g, '<wp-line-break>');
|
17074 |
+
});
|
17075 |
+
}
|
17076 |
+
|
17077 |
+
if (text.indexOf('<figcaption') !== -1) {
|
17078 |
+
text = text.replace(/\s*(<figcaption[^>]*>)/g, '$1');
|
17079 |
+
text = text.replace(/<\/figcaption>\s*/g, '</figcaption>');
|
17080 |
+
}
|
17081 |
+
|
17082 |
+
// Keep <br> tags inside captions.
|
17083 |
+
if (text.indexOf('[caption') !== -1) {
|
17084 |
+
preserve_br = true;
|
17085 |
+
|
17086 |
+
text = text.replace(/\[caption[\s\S]+?\[\/caption\]/g, function (a) {
|
17087 |
+
a = a.replace(/<br([^>]*)>/g, '<wp-temp-br$1>');
|
17088 |
+
|
17089 |
+
a = a.replace(/<[^<>]+>/g, function (b) {
|
17090 |
+
return b.replace(/[\n\t ]+/, ' ');
|
17091 |
+
});
|
17092 |
+
|
17093 |
+
return a.replace(/\s*\n\s*/g, '<wp-temp-br />');
|
17094 |
+
});
|
17095 |
+
}
|
17096 |
+
|
17097 |
+
text = text + '\n\n';
|
17098 |
+
text = text.replace(/<br \/>\s*<br \/>/gi, '\n\n');
|
17099 |
+
|
17100 |
+
// Pad block tags with two line breaks.
|
17101 |
+
text = text.replace(new RegExp('(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi'), '\n\n$1');
|
17102 |
+
text = text.replace(new RegExp('(</(?:' + blocklist + ')>)', 'gi'), '$1\n\n');
|
17103 |
+
text = text.replace(/<hr( [^>]*)?>/gi, '<hr$1>\n\n');
|
17104 |
+
|
17105 |
+
// Remove white space chars around <option>.
|
17106 |
+
text = text.replace(/\s*<option/gi, '<option');
|
17107 |
+
text = text.replace(/<\/option>\s*/gi, '</option>');
|
17108 |
+
|
17109 |
+
// Normalize multiple line breaks and white space chars.
|
17110 |
+
text = text.replace(/\n\s*\n+/g, '\n\n');
|
17111 |
+
|
17112 |
+
// Convert two line breaks to a paragraph.
|
17113 |
+
text = text.replace(/([\s\S]+?)\n\n/g, '<p>$1</p>\n');
|
17114 |
+
|
17115 |
+
// Remove empty paragraphs.
|
17116 |
+
text = text.replace(/<p>\s*?<\/p>/gi, '');
|
17117 |
+
|
17118 |
+
// Remove <p> tags that are around block tags.
|
17119 |
+
text = text.replace(new RegExp('<p>\\s*(</?(?:' + blocklist + ')(?: [^>]*)?>)\\s*</p>', 'gi'), '$1');
|
17120 |
+
text = text.replace(/<p>(<li.+?)<\/p>/gi, '$1');
|
17121 |
+
|
17122 |
+
// Fix <p> in blockquotes.
|
17123 |
+
text = text.replace(/<p>\s*<blockquote([^>]*)>/gi, '<blockquote$1><p>');
|
17124 |
+
text = text.replace(/<\/blockquote>\s*<\/p>/gi, '</p></blockquote>');
|
17125 |
+
|
17126 |
+
// Remove <p> tags that are wrapped around block tags.
|
17127 |
+
text = text.replace(new RegExp('<p>\\s*(</?(?:' + blocklist + ')(?: [^>]*)?>)', 'gi'), '$1');
|
17128 |
+
text = text.replace(new RegExp('(</?(?:' + blocklist + ')(?: [^>]*)?>)\\s*</p>', 'gi'), '$1');
|
17129 |
+
|
17130 |
+
text = text.replace(/(<br[^>]*>)\s*\n/gi, '$1');
|
17131 |
+
|
17132 |
+
// Add <br> tags.
|
17133 |
+
text = text.replace(/\s*\n/g, '<br />\n');
|
17134 |
+
|
17135 |
+
// Remove <br> tags that are around block tags.
|
17136 |
+
text = text.replace(new RegExp('(</?(?:' + blocklist + ')[^>]*>)\\s*<br />', 'gi'), '$1');
|
17137 |
+
text = text.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi, '$1');
|
17138 |
+
|
17139 |
+
// Remove <p> and <br> around captions.
|
17140 |
+
text = text.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi, '[caption$1[/caption]');
|
17141 |
+
|
17142 |
+
// Make sure there is <p> when there is </p> inside block tags that can contain other blocks.
|
17143 |
+
text = text.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g, function (a, b, c) {
|
17144 |
+
if (c.match(/<p( [^>]*)?>/)) {
|
17145 |
+
return a;
|
17146 |
+
}
|
17147 |
+
|
17148 |
+
return b + '<p>' + c + '</p>';
|
17149 |
+
});
|
17150 |
+
|
17151 |
+
// Restore the line breaks in <pre> and <script> tags.
|
17152 |
+
if (preserve_linebreaks) {
|
17153 |
+
text = text.replace(/<wp-line-break>/g, '\n');
|
17154 |
+
}
|
17155 |
+
|
17156 |
+
// Restore the <br> tags in captions.
|
17157 |
+
if (preserve_br) {
|
17158 |
+
text = text.replace(/<wp-temp-br([^>]*)>/g, '<br$1>');
|
17159 |
+
}
|
17160 |
+
|
17161 |
+
return text;
|
17162 |
+
}
|
17163 |
+
|
17164 |
+
return ItemText;
|
17165 |
+
});
|
17166 |
+
N2D('ItemVimeo', ['Item'], function ($, undefined) {
|
17167 |
+
"use strict";
|
17168 |
+
|
17169 |
+
/**
|
17170 |
+
* @memberOf N2Classes
|
17171 |
+
*
|
17172 |
+
* @constructor
|
17173 |
+
* @augments Item
|
17174 |
+
*/
|
17175 |
+
function ItemVimeo() {
|
17176 |
+
this.type = 'vimeo';
|
17177 |
+
N2Classes.Item.prototype.constructor.apply(this, arguments);
|
17178 |
+
}
|
17179 |
+
|
17180 |
+
ItemVimeo.prototype = Object.create(N2Classes.Item.prototype);
|
17181 |
+
ItemVimeo.prototype.constructor = ItemVimeo;
|
17182 |
+
|
17183 |
+
ItemVimeo.needSize = true;
|
17184 |
+
|
17185 |
+
ItemVimeo.prototype.added = function () {
|
17186 |
+
this.needFill = ['vimeourl'];
|
17187 |
+
|
17188 |
+
this.generator.registerField('#item_vimeovimeourl');
|
17189 |
+
};
|
17190 |
+
|
17191 |
+
ItemVimeo.prototype.getName = function (data) {
|
17192 |
+
return data.vimeourl;
|
17193 |
+
};
|
17194 |
+
|
17195 |
+
ItemVimeo.prototype.parseAll = function (data) {
|
17196 |
+
var vimeoChanged = this.values.vimeourl != data.vimeourl;
|
17197 |
+
|
17198 |
+
N2Classes.Item.prototype.parseAll.apply(this, arguments);
|
17199 |
+
|
17200 |
+
if (data.image == '') {
|
17201 |
+
data.image = '$system$/images/placeholder/video.png';
|
17202 |
+
}
|
17203 |
+
|
17204 |
+
data.image = nextend.imageHelper.fixed(data.image);
|
17205 |
+
|
17206 |
+
if (vimeoChanged && data.vimeourl != '') {
|
17207 |
+
var vimeoRegexp = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,
|
17208 |
+
vimeoMatch = data.vimeourl.match(vimeoRegexp);
|
17209 |
+
|
17210 |
+
var videoCode = false;
|
17211 |
+
if (vimeoMatch) {
|
17212 |
+
videoCode = vimeoMatch[3];
|
17213 |
+
} else if (data.vimeourl.match(/^[0-9]+$/)) {
|
17214 |
+
videoCode = data.vimeourl;
|
17215 |
+
}
|
17216 |
+
|
17217 |
+
if (videoCode) {
|
17218 |
+
N2Classes.AjaxHelper.getJSON('https://vimeo.com/api/v2/video/' + encodeURI(videoCode) + '.json').done($.proxy(function (data) {
|
17219 |
+
$('#item_vimeoimage').val(data[0].thumbnail_large).trigger('change');
|
17220 |
+
}, this)).fail(function (data) {
|
17221 |
+
N2Classes.Notification.error(data.responseText);
|
17222 |
+
});
|
17223 |
+
} else {
|
17224 |
+
N2Classes.Notification.error('The provided URL does not match any known Vimeo url or code!');
|
17225 |
+
}
|
17226 |
+
}
|
17227 |
+
};
|
17228 |
+
|
17229 |
+
ItemVimeo.prototype._render = function (data) {
|
17230 |
+
|
17231 |
+
var $node = $('<div class="n2-ow"></div>').css({
|
17232 |
+
width: '100%',
|
17233 |
+
height: '100%',
|
17234 |
+
minHeight: '50px',
|
17235 |
+
background: 'url(' + data.image + ') no-repeat 50% 50%',
|
17236 |
+
backgroundSize: 'cover'
|
17237 |
+
});
|
17238 |
+
|
17239 |
+
$('<div class="n2-video-play n2-ow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><g fill="none" fill-rule="evenodd"><circle cx="24" cy="24" r="24" fill="#000" opacity=".6"/><path fill="#FFF" d="M19.8 32c-.124 0-.247-.028-.36-.08-.264-.116-.436-.375-.44-.664V16.744c.005-.29.176-.55.44-.666.273-.126.592-.1.84.07l10.4 7.257c.2.132.32.355.32.595s-.12.463-.32.595l-10.4 7.256c-.14.1-.31.15-.48.15z"/></g></svg></div>')
|
17240 |
+
.appendTo($node);
|
17241 |
+
|
17242 |
+
this.$item.append($node);
|
17243 |
+
};
|
17244 |
+
|
17245 |
+
ItemVimeo.prototype.fitLayer = function () {
|
17246 |
+
return true;
|
17247 |
+
};
|
17248 |
+
|
17249 |
+
return ItemVimeo;
|
17250 |
+
});
|
17251 |
+
N2D('ItemYoutube', ['Item'], function ($, undefined) {
|
17252 |
+
"use strict";
|
17253 |
+
|
17254 |
+
/**
|
17255 |
+
* @memberOf N2Classes
|
17256 |
+
*
|
17257 |
+
* @constructor
|
17258 |
+
* @augments Item
|
17259 |
+
*/
|
17260 |
+
function ItemYoutube() {
|
17261 |
+
this.type = 'youtube';
|
17262 |
+
N2Classes.Item.prototype.constructor.apply(this, arguments);
|
17263 |
+
}
|
17264 |
+
|
17265 |
+
ItemYoutube.prototype = Object.create(N2Classes.Item.prototype);
|
17266 |
+
ItemYoutube.prototype.constructor = ItemYoutube;
|
17267 |
+
|
17268 |
+
ItemYoutube.needSize = true;
|
17269 |
+
|
17270 |
+
ItemYoutube.prototype.added = function () {
|
17271 |
+
this.needFill = ['youtubeurl', 'image', 'start'];
|
17272 |
+
|
17273 |
+
this.generator.registerFields(['#item_youtubeyoutubeurl', '#item_youtubeimage', '#item_youtubestart']);
|
17274 |
+
};
|
17275 |
+
|
17276 |
+
ItemYoutube.prototype.getName = function (data) {
|
17277 |
+
return data.youtubeurl;
|
17278 |
+
};
|
17279 |
+
|
17280 |
+
ItemYoutube.prototype.parseAll = function (data) {
|
17281 |
+
|
17282 |
+
var youTubeChanged = this.values.youtubeurl !== data.youtubeurl;
|
17283 |
+
|
17284 |
+
N2Classes.Item.prototype.parseAll.apply(this, arguments);
|
17285 |
+
|
17286 |
+
if (data.image === '') {
|
17287 |
+
data.image = '$system$/images/placeholder/video.png';
|
17288 |
+
}
|
17289 |
+
|
17290 |
+
data.image = nextend.imageHelper.fixed(data.image);
|
17291 |
+
|
17292 |
+
if (youTubeChanged) {
|
17293 |
+
var youtubeRegexp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,
|
17294 |
+
youtubeMatch = data.youtubeurl.match(youtubeRegexp);
|
17295 |
+
|
17296 |
+
if (youtubeMatch) {
|
17297 |
+
N2Classes.AjaxHelper.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + encodeURI(youtubeMatch[2]) + '&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM').done($.proxy(function (_data) {
|
17298 |
+
if (_data.items.length) {
|
17299 |
+
|
17300 |
+
var thumbnails = _data.items[0].snippet.thumbnails,
|
17301 |
+
thumbnail = thumbnails.maxres || thumbnails.standard || thumbnails.high || thumbnails.medium || thumbnails.default,
|
17302 |
+
url = thumbnail.url;
|
17303 |
+
if (this.values.youtubeurl == '{video_url}') {
|
17304 |
+
url = url.replace(youtubeMatch[2], '{video_id}');
|
17305 |
+
}
|
17306 |
+
$('#item_youtubeimage').val(url).trigger('change');
|
17307 |
+
}
|
17308 |
+
}, this)).fail(function (data) {
|
17309 |
+
N2Classes.Notification.error(data.error.errors[0].message);
|
17310 |
+
});
|
17311 |
+
} else {
|
17312 |
+
N2Classes.Notification.error('The provided URL does not match any known YouTube url or code!');
|
17313 |
+
}
|
17314 |
+
}
|
17315 |
+
};
|
17316 |
+
|
17317 |
+
ItemYoutube.prototype.fitLayer = function () {
|
17318 |
+
return true;
|
17319 |
+
};
|
17320 |
+
|
17321 |
+
ItemYoutube.prototype._render = function (node, data) {
|
17322 |
+
if (!parseInt(data.playbutton)) {
|
17323 |
+
node.find('.n2-video-play').remove();
|
17324 |
+
}
|
17325 |
+
return node;
|
17326 |
+
};
|
17327 |
+
|
17328 |
+
ItemYoutube.prototype._render = function (data) {
|
17329 |
+
|
17330 |
+
var $node = $('<div class="n2-ow"></div>').css({
|
17331 |
+
width: '100%',
|
17332 |
+
height: '100%',
|
17333 |
+
minHeight: '50px',
|
17334 |
+
background: 'url(' + data.image + ') no-repeat 50% 50%',
|
17335 |
+
backgroundSize: 'cover'
|
17336 |
+
});
|
17337 |
+
|
17338 |
+
if (parseInt(data.playbutton)) {
|
17339 |
+
$('<div class="n2-video-play n2-ow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><g fill="none" fill-rule="evenodd"><circle cx="24" cy="24" r="24" fill="#000" opacity=".6"/><path fill="#FFF" d="M19.8 32c-.124 0-.247-.028-.36-.08-.264-.116-.436-.375-.44-.664V16.744c.005-.29.176-.55.44-.666.273-.126.592-.1.84.07l10.4 7.257c.2.132.32.355.32.595s-.12.463-.32.595l-10.4 7.256c-.14.1-.31.15-.48.15z"/></g></svg></div>')
|
17340 |
+
.appendTo($node);
|
17341 |
+
}
|
17342 |
+
|
17343 |
+
this.$item.append($node);
|
17344 |
+
};
|
17345 |
+
|
17346 |
+
return ItemYoutube;
|
17347 |
+
});
|
17348 |
+
N2D('smartslider-backend')
|
library/media/dist/smartslider-backend.min.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
-
N2Require("ContextMenu",[],[],function(t,e,i){function n(e,i){this.isActive=!1,this.$el=e.data("nextendcontextmenu",this),this.parameters=t.extend({selector:!1,onShow:function(){}},i),this.$menu=t('<div class="n2-context-menu"></div>').on("mousedown",function(){nextend.context.setMouseDownArea("context-menu")}).appendTo("body"),this.parameters.selector?this.$el.on("contextmenu",this.parameters.selector,t.proxy(this.onShowContextMenu,this)):this.$el.on("contextmenu",t.proxy(this.onShowContextMenu,this))}return n.prototype.onShowContextMenu=function(e){e.preventDefault(),this.clearItems(),this.parameters.onShow.call(this,e,this),this.hasItems&&(e.stopPropagation(),this.isActive=!0,this.$menu.css({left:e.pageX,top:e.pageY}),t("html").on("mouseleave.nextendcontextmenu, click.nextendcontextmenu",t.proxy(this.onHide,this))),this.$menu.toggleClass("n2-active",this.hasItems)},n.prototype.onHide=function(){t("html").off(".nextendcontextmenu"),this.$menu.removeClass("n2-active"),this.isActive=!1},n.prototype.clearItems=function(){this.isActive&&this.onHide(),this.hasItems=!1,this.$menu.html("")},n.prototype.addItem=function(e,i,n){this.hasItems=!0,this.$menu.append(t('<div><i class="n2-i '+i+'"></i><span>'+e+"</span></div>").on("click",n))},t.fn.nextendContextMenu=function(e){return this.each(function(){new n(t(this),e)})},n}),N2Require("Zoom",[],[],function(t,e,i){function n(e){this.key="n2-ss-editor-device-lock-mode",this.devices={unknownUnknown:t("<div />")},this.responsives=[e],e.setOrientation("portrait"),e.parameters.onResizeEnabled=0,e.parameters.forceFull=0,e._getDevice=e._getDeviceZoom,this.lock=t("#n2-ss-lock").on("click",t.proxy(this.switchLock,this));var i=e.parameters.sliderWidthToDevice.desktopPortrait;this.container=e.containerElement.closest(".n2-ss-container-device").addBack(),this.container.width(i),this.containerWidth=i,this.initZoom();var n=t("#n2-ss-devices .n2-tr"),r=e.parameters.deviceModes;this.devices.desktopPortrait=t('<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(n),r.desktopLandscape?this.devices.desktopLandscape=t('<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(n):this.devices.desktopLandscape=this.devices.desktopPortrait,r.tabletPortrait?this.devices.tabletPortrait=t('<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(n):this.devices.tabletPortrait=this.devices.desktopPortrait,r.tabletLandscape?this.devices.tabletLandscape=t('<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(n):this.devices.tabletLandscape=this.devices.desktopLandscape,r.mobilePortrait?this.devices.mobilePortrait=t('<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(n):this.devices.mobilePortrait=this.devices.tabletPortrait,r.mobileLandscape?this.devices.mobileLandscape=t('<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(n):this.devices.mobileLandscape=this.devices.tabletLandscape,this.deviceOptions=t("#n2-ss-devices .n2-panel-option"),this.deviceOptions.each(t.proxy(function(e,i){t(i).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"zoomDeviceClicked"),click:t.proxy(this.setDeviceMode,this)})},this)),e.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onDeviceOrientationChange,this))}var r=null;return nextend.ssBeforeResponsive=function(){r=new n(this),nextend.ssBeforeResponsive=function(){r.add(this)}},n.prototype.add=function(t){this.responsives.push(t),t.setOrientation("portrait"),t.parameters.onResizeEnabled=0,t.parameters.forceFull=0,t._getDevice=t._getDeviceZoom},n.prototype.onDeviceOrientationChange=function(e,i){t("#n2-admin").removeClass("n2-ss-mode-"+i.lastDevice+i.lastOrientation).addClass("n2-ss-mode-"+i.device+i.orientation),this.devices[i.lastDevice+i.lastOrientation].removeClass("n2-active"),this.devices[i.device+i.orientation].addClass("n2-active")},n.prototype.setDeviceMode=function(e){var i=t(e.currentTarget);if((e.ctrlKey||e.metaKey)&&nextend.smartSlider.canvasManager){var n=i.data("orientation");nextend.smartSlider.canvasManager.copyOrResetMode(i.data("device")+n[0].toUpperCase()+n.substr(1))}else for(var r=0;r<this.responsives.length;r++)this.responsives[r].setOrientation(i.data("orientation")),this.responsives[r].setMode(i.data("device"),this.responsives[r])},n.prototype.switchLock=function(e){e.preventDefault(),this.lock.toggleClass("n2-active"),this.lock.hasClass("n2-active")?(this.setZoomSyncMode(),this.zoomChange(e,this.zoom.slider("value"),"sync",!1),t.jStorage.set(this.key,"sync")):(this.setZoomFixMode(),t.jStorage.set(this.key,"fix"))},n.prototype.initZoom=function(){var e=t("#n2-ss-slider-zoom");e.length>0&&("undefined"!=typeof e[0].slide&&(e[0].slide=null),this.zoom=e.removeAttr("slide").prop("slide",!1).slider({range:"min",step:1,value:1,min:0,max:102}),this.responsives[0].sliderElement.on("SliderResize",t.proxy(this.sliderResize,this)),"fix"==t.jStorage.get(this.key,"sync")?this.setZoomFixMode():(this.setZoomSyncMode(),this.lock.addClass("n2-active")))},n.prototype.sliderResize=function(t,e){this.setZoom()},n.prototype.setZoomFixMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this)})},n.prototype.setZoomSyncMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this)})},n.prototype.zoomChangeFixMode=function(t,e){this.zoomChange(t,e.value,"fix",e)},n.prototype.zoomChangeSyncMode=function(t,e){this.zoomChange(t,e.value,"sync",e)},n.prototype.zoomChange=function(t,e,n,r){var s;if(t.originalEvent!==i){var o=1;50>e?o=nextend.smallestZoom/this.containerWidth+Math.max(e/50,0)*(1-nextend.smallestZoom/this.containerWidth):e>52&&(o=1+(e-52)/50),s=parseInt(o*this.containerWidth),this.container.width(s);for(var a=1;a<this.responsives.length;a++)this.responsives[a].containerElement.width(s);for(var a=0;a<this.responsives.length;a++)switch(n){case"sync":this.responsives[a].doResize(t);break;default:this.responsives[a].doResize(t,!0)}}else s=this.container.last().width(),this.container.width(s);r&&(r.handle.innerHTML=s+"px")},n.prototype.setZoom=function(){var t=this.responsives[0].containerElement.width()/this.containerWidth,e=50;1>t?e=(t-nextend.smallestZoom/this.containerWidth)/(1-nextend.smallestZoom/this.containerWidth)*50:t>1&&(e=50*(t-1)+52);this.zoom.slider("value");this.zoom.slider("value",e)},n}),N2Require("CreateSlider",[],[],function(t,e,i){function n(e,i,n){this.addToGroupModal=null,this.groupID=e,this.ajaxUrl=i,this.shouldSkipLicenseModal=n,t(".n2-ss-create-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showModal()},this)),this.notificationStack=new NextendNotificationCenterStackModal(t("body")),t(".n2-ss-add-sample-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showDemoSliders()},this)),"createslider"==window.location.hash.substring(1)&&this.showModal()}return n.prototype.showModal=function(){if(!this.createSliderModal){var e=this,i=this.ajaxUrl,n=[];n.push({key:"default",name:n2_("Default"),image:"$ss$/admin/images/sliderpresets/default.png"}),n.push({key:"fullwidth",name:n2_("Full width"),image:"$ss$/admin/images/sliderpresets/fullwidth.png"}),n.push({key:"thumbnailhorizontal",name:n2_("Thumbnail - horizontal"),image:"$ss$/admin/images/sliderpresets/thumbnailhorizontal.png"});var r=[550,520];this.createSliderModal=new NextendModal({zero:{size:r,title:n2_("Create Slider"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Create")+"</a>"],fn:{show:function(){var r=this.controls.find(".n2-button-green"),s=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),r.trigger("click")});s.append(this.createInput(n2_("Slider name"),"createslidertitle","width: 240px;")),s.append(this.createInputUnit(n2_("Width"),"createsliderwidth","px","width: 30px;")),s.append(this.createInputUnit(n2_("Height"),"createsliderheight","px","width: 30px;")),new N2Classes.FormElementAutocompleteSimple("createsliderwidth",["1920","1200","1000","800","600","400"]),new N2Classes.FormElementAutocompleteSimple("createsliderheight",["800","600","500","400","300","200"]);var o=t("#createslidertitle").val(n2_("Slider")).focus(),a=t("#createsliderwidth").val(1200),l=t("#createsliderheight").val(500);a.parent().addClass("n2-form-element-autocomplete ui-front"),l.parent().addClass("n2-form-element-autocomplete ui-front"),this.createHeading(n2_("Preset")).appendTo(this.content);var h=100,d=this.createImageRadio(n).css("height",h).appendTo(this.content),c=d.find("input");d.css("overflow","hidden"),this.createHeading(n2_("Import Sample Sliders")).appendTo(this.content),t('<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>").on("click",t.proxy(function(){this.hide(),e.showDemoSliders()},this)).appendTo(this.content),r.on("click",t.proxy(function(){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(i,{nextendaction:"create"}),data:{groupID:e.groupID,sliderTitle:o.val(),sliderSizeWidth:a.val(),sliderSizeHeight:l.val(),preset:c.val()},dataType:"json"}).done(t.proxy(function(t){NextendAjaxHelper.startLoading()},this))},this))}}}})}this.createSliderModal.show()},n.prototype.showDemoSliders=function(){var e=this;t("body").css("overflow","hidden");var i=0,n=t('<iframe src="//smartslider3.com/demo-import/?pro='+i+"&version="+N2SS3VERSION+"&utm_campaign="+N2SS3C+"&utm_source=import-slider-frame&utm_medium=smartslider-"+N2PLATFORM+"-"+(i?"pro":"free")+'" frameborder="0"></iframe>').css({position:"fixed",zIndex:1e5,left:0,top:0,width:"100%",height:"100%"}).appendTo("body"),r=function(){t("body").css("overflow",""),n.remove(),window.removeEventListener("message",o,!1),e.notificationStack.popStack()},s=function(t){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(e.ajaxUrl,{nextendaction:"importDemo"}),data:{groupID:e.groupID,key:Base64.encode(t.replace(/^(http(s)?:)?\/\//,"//"))},dataType:"json"}).fail(function(){})},o=function(t){if("http://smartslider3.com"===t.origin||"https://smartslider3.com"===t.origin){var e=t.data;switch(e.key){case"importSlider":return void("function"==typeof nextend.joinCommunity?nextend.joinCommunity(function(){s(e.data.href)}):s(e.data.href));case"closeWindow":r()}}};this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return r(),!0},this)),window.addEventListener("message",o,!1)},n}),N2Require("ManageSliders",[],[],function(t,e,i){function n(i,n,r){this.preventSort=!1,this.groupID=i,this.ajaxUrl=n,this.sliders=[],this.sliderPanel=t("#n2-ss-slider-container"),this.orderBy="ordering"==this.sliderPanel.data("orderby"),this.slidersContainer=this.sliderPanel.find(".n2-ss-sliders-container");for(var s=this.slidersContainer.find(".n2-ss-box-slider"),o=0;o<s.length;o++)this.sliders.push(new e.Slider(this,s.eq(o)));this.changed(),this.initMenu(),this.initOrderable(),this.create=new e.CreateSlider(i,n,r),this.initBulk()}return n.prototype.changed=function(){t("html").attr("data-sliders",this.sliders.length)},n.prototype.initSliders=function(){for(var e=(this.sliders.length,this.slidersContainer.find(".n2-ss-box-slider")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slider");i.push(r)}this.sliders=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidersChanged")},n.prototype.initOrderable=function(){this.orderBy&&this.slidersContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",connectWith:".n2-ss-box-slider-group",items:".n2-ss-box-slider",start:function(t,e){e.item.show()},stop:t.proxy(this.saveOrder,this),placeholder:"n2-box-sortable-placeholder",distance:10})},n.prototype.saveOrder=function(e){if(this.preventSort)return this.slidersContainer.sortable("cancel"),void(this.preventSort=!1);for(var i=this.slidersContainer.find(".n2-ss-box-slider"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slider");n.push(a),r.push(a.getId())}for(var o=0;o<this.sliders.length;o++)s.push(this.sliders[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidersOrderChanged");var l={nextendcontroller:"sliders",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{groupID:this.groupID,sliderorder:r,isReversed:"DESC"==this.sliderPanel.data("orderbydirection")?1:0}}),this.sliders=n}},n.prototype.initMenu=function(){this.slider=null,this.menu=t("#n2-ss-slider-menu").detach().addClass("n2-inited"),this.menuActions={duplicate:this.menu.find(".n2-ss-duplicate").on("click",t.proxy(function(t){this.slider.duplicate(t)},this)),"delete":this.menu.find(".n2-ss-delete").on("click",t.proxy(function(t){this.slider["delete"](t)},this)),preview:this.menu.find(".n2-ss-preview").on("click",t.proxy(function(t){this.slider.preview(t)},this))},this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slider=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.hasClass("n2-active")&&this.menu.removeClass("n2-active").off("mouseleave"),this.menu.detach()},n.prototype.deleteSliders=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slider-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"delete"}),type:"POST",data:{sliders:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSliders(),this.leaveBulk()},this))},this))},n.prototype.duplicateSliders=function(e,i){for(var n=0;n<this.sliders.length;n++)this.sliders[n].selected&&this.sliders[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.exportSliders=function(e,i){window.location.href=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"exportAll"})+"&"+t.param({sliders:e,currentGroupID:this.groupID})},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this));t(".n2-bulk-actions").find("a").on("click",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"duplicate":this.bulkAction("duplicateSliders",!1);break;case"delete":this.bulkAction("deleteSliders",!1);break;case"export":this.bulkAction("exportSliders",!1);break;case"addToGroup":this.bulkAction("addToGroup",!0)}},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.sliders.length;e++)t(this.sliders[e])},n.prototype.bulkAction=function(t,e){var i=[],n=[];this.bulkSelect(function(t){!t.selected||e&&t.isGroup||(i.push(t),n.push(t.getId()))}),n.length?(this[t](n,i),this.leaveBulk()):e?nextend.notificationCenter.notice("Please select one or more sliders for the action!"):nextend.notificationCenter.notice("Please select one or more sliders or groups for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.orderBy&&this.slidersContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.orderBy&&this.slidersContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.sliders.length;e++)this.sliders[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n}),N2Require("Slider",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slider",this).addClass("n2-clickable"),this.isGroup=this.box.hasClass("n2-ss-box-slider-group"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slider",t.proxy(this.goToEdit,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("sliderid")},n.prototype.goToEdit=function(t,e){var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):window.location=i},n.prototype.preview=function(t){t.stopPropagation(),t.preventDefault(),window.open(NextendAjaxHelper.makeFallbackUrl(this.box.data("editurl"),{nextendcontroller:"preview",nextendaction:"index"}),"_blank")},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendcontroller:"slider",nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSliders(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSliders([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n}),N2Require("FormElementAnimationManager",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.managerIdentifier=n,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.show=function(e){e.preventDefault(),nextend[this.managerIdentifier].show(this.element.val(),t.proxy(this.save,this))},n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.save=function(t,e){this.val(e)},n.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},n.prototype.updateName=function(t){t=""==t?n2_("Disabled"):t.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(t)},n}),N2Require("FormElementBackground",["FormElement"],[],function(t,e,i){function n(i,n){this.value="",this.element=t("#"+i),this.$container=this.element.closest(".n2-form-tab"),this.panel=t("#"+i+"-panel"),this.setValue(n),this.options=this.panel.find(".n2-subform-image-option").on("click",t.proxy(this.selectOption,this)),this.active=this.getIndex(this.options.filter(".n2-active").get(0)),this.element.on("change",t.proxy(function(){this.insideChange(this.element.val())},this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.selectOption=function(e){var i=this.getIndex(e.currentTarget);if(i!=this.active){this.options.eq(i).addClass("n2-active"),this.options.eq(this.active).removeClass("n2-active"),this.active=i;var n=t(e.currentTarget).data("value");this.insideChange(n)}},n.prototype.setValue=function(t){this.$container.removeClass("n2-ss-background-type-"+this.value),this.value=t,this.$container.addClass("n2-ss-background-type-"+this.value)},n.prototype.insideChange=function(t){this.setValue(t),this.element.val(t),this.options.removeClass("n2-active"),this.options.filter('[data-value="'+t+'"]').addClass("n2-active"),this.triggerInsideChange()},n.prototype.getIndex=function(e){return t.inArray(e,this.options)},n}),N2Require("FormElementColumns",["FormElement"],[],function(t,e,i){function n(i){this.denominators={1:100,2:100,3:144,4:100,5:100,6:144},this.element=t("#"+i),e.FormElement.prototype.constructor.apply(this,arguments),this.$c=t("#"+i).parent(),this.$container=this.$c.find(".n2-ss-columns-element-container"),this.containerWidth=284,this.maxWidth=0,this.$container.sortable({axis:"x",tolerance:"pointer",items:".n2-ss-columns-element-column",helper:"clone",start:t.proxy(function(t,e){this.$container.addClass("n2-sortable-currently-sorted"),e.placeholder.css("width",e.item.width());var i=this.$container.find(".n2-ss-columns-element-column");e.item.data("index",i.index(e.item))},this),stop:t.proxy(function(t,e){var i=this.$container.find(".n2-ss-columns-element-column"),n=e.item.data("index"),r=i.index(e.item);n!=r&&(this.currentRow.moveCol(n,r),e.item.data("index",null)),this.makeResizable(),this.$container.removeClass("n2-sortable-currently-sorted")},this)}),this.$c.find(".n2-ss-columns-element-add-col").on({click:t.proxy(function(){this.currentRow.createCol()},this)})}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.getDenominator=function(t){return this.denominators[t]===i&&(this.denominators[t]=15*t),this.denominators[t]},n.prototype.setRow=function(t){this.currentRow=t,this.insideChange(t.getColumnsOrdered())},n.prototype.setValue=function(t){},n.prototype.insideChange=function(t){this.start(t)},n.prototype.activateColumn=function(t){var e=this.$container.find(".n2-ss-columns-element-column").index(t.currentTarget);this.currentRow.activateColumn(e,t)},n.prototype.start=function(e){this.percentages=[];for(var i=e.split("+"),n=0;n<i.length;n++)this.percentages.push(new Fraction(i[n]));this.refreshMaxWidth(),this.$container.empty();for(var n=0;n<this.percentages.length;n++)this.updateColumn(t('<div class="n2-ss-columns-element-column">').on("click",t.proxy(this.activateColumn,this)).appendTo(this.$container),this.percentages[n]);this.makeResizable()},n.prototype.refreshMaxWidth=function(){this.maxWidth=this.containerWidth-15*(this.percentages.length-1)},n.prototype.updateColumn=function(t,e){t.css("width",this.maxWidth*e.valueOf()+"px").html(Math.round(100*e.valueOf()*10)/10+"%")},n.prototype.makeResizable=function(){this.handles&&this.handles.remove(),this.$columns=this.$container.find(".n2-ss-columns-element-column"),t('<div class="n2-ss-columns-element-handle"><div class="n2-i n2-i-more"></div></div>').insertAfter(this.$columns.not(this.$columns.last())),this.handles=this.$container.find(".n2-ss-columns-element-handle").on("mousedown",t.proxy(this._resizeStart,this))},n.prototype._resizeStart=function(e){var i=this.handles.index(e.currentTarget),n=this.$container.offset().left+8;this.resizeContext={index:i,cLeft:n,$currentCol:this.$columns.eq(i),$nextCol:this.$columns.eq(i+1),startX:Math.max(0,Math.min(e.clientX-n,this.containerWidth))},this._resizeMove(e),t("html").off(".resizecol").on({"mousemove.resizecol":t.proxy(this._resizeMove,this),"mouseup.resizecol mouseleave.resizecol":t.proxy(this._resizeStop,this)})},n.prototype._resizeMove=function(e){e.preventDefault();var i=Math.max(0,Math.min(e.clientX-this.resizeContext.cLeft,this.containerWidth)),n=this.getDenominator(this.percentages.length),r=new Fraction(Math.round((i-this.resizeContext.startX)/(this.maxWidth/n)),n);r.compare(this.percentages[this.resizeContext.index].clone().mul(-1))<0&&(r=this.percentages[this.resizeContext.index].clone().mul(-1)),r.compare(this.percentages[this.resizeContext.index+1])>0&&(r=this.percentages[this.resizeContext.index+1].clone());var s=this.percentages[this.resizeContext.index].add(r),o=this.percentages[this.resizeContext.index+1].sub(r);this.updateColumn(this.resizeContext.$currentCol,s),this.updateColumn(this.resizeContext.$nextCol,o);var a=t.extend([],this.percentages);return a[this.resizeContext.index]=s,a[this.resizeContext.index+1]=o,this.onColumnWidthChange(a),[s,o]},n.prototype._resizeStop=function(e){var i=this._resizeMove(e);this.percentages[this.resizeContext.index]=i[0],this.percentages[this.resizeContext.index+1]=i[1],t("html").off(".resizecol"),delete this.resizeContext,this.currentRow.setRealColsWidth(this.percentages)},n.prototype.onColumnWidthChange=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].valueOf());this.currentRow.updateColumnWidth(e)},n}),function(t){"use strict";function e(t,e){return isNaN(t=parseInt(t,10))&&i(),t*e}function i(){throw"Invalid Param"}function n(t,e){return this instanceof n?(o(t,e),t=n.REDUCE?d(s.d,s.n):1,this.s=s.s,this.n=s.n/t,void(this.d=s.d/t)):new n(t,e)}var r=2e3,s={s:1,n:0,d:1},o=function(t,n){var r,o=0,a=1,l=1,h=0,d=0,c=0,p=1,u=1,y=0,g=1,f=1,v=1,m=1e7;if(void 0===t||null===t);else if(void 0!==n)o=t,a=n,l=o*a;else switch(typeof t){case"object":"d"in t&&"n"in t?(o=t.n,a=t.d,"s"in t&&(o*=t.s)):0 in t?(o=t[0],1 in t&&(a=t[1])):i(),l=o*a;break;case"number":if(0>t&&(l=t,t=-t),t%1===0)o=t;else if(t>0){for(t>=1&&(u=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)),t/=u);m>=g&&m>=v;){if(r=(y+f)/(g+v),t===r){m>=g+v?(o=y+f,a=g+v):v>g?(o=f,a=v):(o=y,a=g);break}t>r?(y+=f,g+=v):(f+=y,v+=g),g>m?(o=f,a=v):(o=y,a=g)}o*=u}else(isNaN(t)||isNaN(n))&&(a=o=NaN);break;case"string":if(g=t.match(/\d+|./g),"-"===g[y]?(l=-1,y++):"+"===g[y]&&y++,g.length===y+1?d=e(g[y++],l):"."===g[y+1]||"."===g[y]?("."!==g[y]&&(h=e(g[y++],l)),y++,(y+1===g.length||"("===g[y+1]&&")"===g[y+3]||"'"===g[y+1]&&"'"===g[y+3])&&(d=e(g[y],l),p=Math.pow(10,g[y].length),y++),("("===g[y]&&")"===g[y+2]||"'"===g[y]&&"'"===g[y+2])&&(c=e(g[y+1],l),u=Math.pow(10,g[y+1].length)-1,y+=3)):"/"===g[y+1]||":"===g[y+1]?(d=e(g[y],l),p=e(g[y+2],1),y+=3):"/"===g[y+3]&&" "===g[y+1]&&(h=e(g[y],l),d=e(g[y+2],l),p=e(g[y+4],1),y+=5),g.length<=y){a=p*u,l=o=c+a*h+u*d;break}default:i()}if(0===a)throw"DIV/0";s.s=0>l?-1:1,s.n=Math.abs(o),s.d=Math.abs(a)},a=function(t,e,i){for(var n=1;e>0;t=t*t%i,e>>=1)1&e&&(n=n*t%i);return n},l=function(t,e){for(;e%2===0;e/=2);for(;e%5===0;e/=5);if(1===e)return 0;for(var i=10%e,n=1;1!==i;n++)if(i=10*i%e,n>r)return 0;return n},h=function(t,e,i){for(var n=1,r=a(10,i,e),s=0;300>s;s++){if(n===r)return s;n=10*n%e,r=10*r%e}return 0},d=function(t,e){if(!t)return e;if(!e)return t;for(;;){if(t%=e,!t)return e;if(e%=t,!e)return t}};n.REDUCE=1,n.prototype={s:1,n:0,d:1,abs:function(){return new n(this.n,this.d)},neg:function(){return new n(-this.s*this.n,this.d)},add:function(t,e){return o(t,e),new n(this.s*this.n*s.d+s.s*this.d*s.n,this.d*s.d)},sub:function(t,e){return o(t,e),new n(this.s*this.n*s.d-s.s*this.d*s.n,this.d*s.d)},mul:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.n,this.d*s.d)},div:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.d,this.d*s.n)},clone:function(){return new n(this)},mod:function(t,e){return isNaN(this.n)||isNaN(this.d)?new n(NaN):void 0===t?new n(this.s*this.n%this.d,1):(o(t,e),0===s.n&&0===this.d&&n(0,0),new n(this.s*s.d*this.n%(s.n*this.d),s.d*this.d))},gcd:function(t,e){return o(t,e),new n(d(s.n,this.n),s.d*this.d/d(s.d,this.d))},lcm:function(t,e){return o(t,e),0===s.n&&0===this.n?new n:new n(s.n*this.n/d(s.n,this.n),d(s.d,this.d))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.floor(t*this.s*this.n/this.d),t)},round:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.round(t*this.s*this.n/this.d),t)},inverse:function(){return new n(this.s*this.d,this.n)},pow:function(t){return 0>t?new n(Math.pow(this.s*this.d,-t),Math.pow(this.n,-t)):new n(Math.pow(this.s*this.n,t),Math.pow(this.d,t))},equals:function(t,e){return o(t,e),this.s*this.n*s.d===s.s*s.n*this.d},compare:function(t,e){o(t,e);var i=this.s*this.n*s.d-s.s*s.n*this.d;return(i>0)-(0>i)},divisible:function(t,e){return o(t,e),!(!(s.n*this.d)||this.n*s.d%(s.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,i+=" ",n%=r),i+=n,i+="/",i+=r),i},toLatex:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,n%=r),i+="\\frac{",i+=n,i+="}{",i+=r,i+="}"),i},toContinued:function(){var t,e=this.n,i=this.d,n=[];do n.push(Math.floor(e/i)),t=e%i,e=i,i=t;while(1!==e);return n},toString:function(){var t,e=this.n,i=this.d;if(isNaN(e)||isNaN(i))return"NaN";n.REDUCE||(t=d(e,i),e/=t,i/=t);for(var r=String(e).split(""),s=0,o=[~this.s?"":"-","",""],a="",c=l(e,i),p=h(e,i,c),u=-1,y=1,g=15+c+p+r.length,f=0;g>f;f++,s*=10){if(f<r.length?s+=Number(r[f]):(y=2,u++),c>0)if(u===p)o[y]+=a+"(",a="";else if(u===c+p){o[y]+=a+")";break}s>=i?(o[y]+=a+(s/i|0),a="",s%=i):y>1?a+="0":o[y]&&(o[y]+="0")}return o[0]+=o[1]||"0",o[2]?o[0]+"."+o[2]:o[0]}},t.Fraction=n}(this),N2Require("FormElementSliderType",[],[],function(t,e,i){function n(e){this.element=t("#"+e),this.setAttribute(),this.element.on("nextendChange",t.proxy(this.setAttribute,this))}return n.prototype.setAttribute=function(){t("#n2-admin").attr("data-slider-type",this.element.val()),"block"==this.element.val()&&t(".n2-fm-shadow").trigger("click")},n}),N2Require("FormElementSliderWidgetArea",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i),this.area=t("#"+i+"_area"),this.areas=this.area.find(".n2-area"),this.areas.on("click",t.proxy(this.chooseArea,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.chooseArea=function(e){var i=parseInt(t(e.target).data("area"));this.element.val(i),this.setSelected(i),this.triggerOutsideChange()},n.prototype.insideChange=function(t){t=parseInt(t),this.element.val(t),this.setSelected(t),this.triggerInsideChange()},n.prototype.setSelected=function(t){this.areas.removeClass("n2-active"),this.areas.eq(t-1).addClass("n2-active")},n}),N2Require("FormElementWidgetPosition",[],[],function(t,e,i){function n(e){this.element=t("#"+e+"-mode"),this.container=this.element.closest(".n2-form-element-mixed"),this.tabs=this.container.find("> .n2-mixed-group"),this.element.on("nextendChange",t.proxy(this.onChange,this)),this.onChange()}return n.prototype.onChange=function(){var t=this.element.val();"advanced"==t?(this.tabs.eq(2).css("display",""),this.tabs.eq(1).css("display","none")):(this.tabs.eq(1).css("display",""),
|
2 |
-
this.tabs.eq(2).css("display","none"))},n}),N2Require("SmartSliderGeneratorRecords",[],[],function(t,e,i){function n(e){this.ajaxUrl=e,t("#generatorrecord-viewer").on("click",t.proxy(this.showRecords,this))}return n.prototype.showRecords=function(e){e.preventDefault(),NextendAjaxHelper.ajax({type:"POST",url:this.ajaxUrl,data:t("#smartslider-form").serialize(),dataType:"json"}).done(function(t){var e=new NextendModal({zero:{size:[1300,700],title:"Records",content:t.data.html}},!0);e.content.css("overflow","auto")}).error(function(t){if(200==t.status){var e=new NextendModal({zero:{size:[1300,700],title:"Response",content:t.responseText}},!0);e.content.css("overflow","auto")}})},n}),N2Require("QuickSlides",[],[],function(t,e,i){function n(e){var i=t("#n2-quick-slides-edit");i.length<1||(this.ajaxUrl=e,i.on("click",t.proxy(this.openEdit,this)))}return n.prototype.openEdit=function(e){e.preventDefault();var i=t("#n2-ss-slides .n2-box-slide"),n=this;this.modal=new NextendModal({zero:{fit:!0,fitX:!1,overflow:"auto",size:[1200,700],title:n2_("Quick Edit - Slides"),back:!1,close:!0,content:'<form class="n2-form"><table></table></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Save")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button-green"),r=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}),s=r.find("table");i.each(t.proxy(function(e,i){var r=t(i),o=t("<tr />").appendTo(s),a=r.data("slideid");o.append(t("<td />").append('<img src="'+r.data("image")+'" style="width:100px;"/>')),o.append(t("<td />").append(n.createInput("Name","title-"+a,r.data("title"),"width: 240px;"))),o.append(t("<td />").append(n.createTextarea("Description","description-"+a,r.data("description"),"width: 330px;height:24px;")));var l=r.data("link").split("|*|");o.append(t("<td />").append(n.createLink("Link","link-"+a,l[0],"width: 180px;"))),o.append(t("<td />").append(n.createTarget("Target","target-"+a,l.length>1?l[1]:"_self",""))),new N2Classes.FormElementUrl("link-"+a,nextend.NextendElementUrlParams)},this)),e.on("click",t.proxy(function(e){var r={};i.each(t.proxy(function(e,i){var n=t(i),s=n.data("slideid"),o=t("#title-"+s).val(),a=t("#description-"+s).val(),l=t("#link-"+s).val()+"|*|"+t("#target-"+s).val();o==n.data("title")&&a==n.data("description")&&l==n.data("link")||(r[s]={name:o,description:a,link:l})},this)),jQuery.isEmptyObject(r)?this.hide(e):(this.hide(e),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(n.ajaxUrl),data:{changed:Base64.encode(JSON.stringify(r))},dataType:"json"}).done(t.proxy(function(e){var i=e.data;for(var n in i){var r=t('.n2-box-slide[data-slideid="'+n+'"]');r.find(".n2-box-placeholder a.n2-h4").html(i[n].title),r.attr("data-title",i[n].rawTitle),r.data("title",i[n].rawTitle),r.attr("data-description",i[n].rawDescription),r.data("description",i[n].rawDescription),r.attr("data-link",i[n].rawLink),r.data("link",i[n].rawLink)}},this)))},this))}}}}),this.modal.setCustomClass("n2-ss-quick-slides-edit-modal"),this.modal.show()},n.prototype.createInput=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTextarea=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+i+'" class="n2-h5" autocomplete="off" style="resize:y;'+r+'"></textarea></div></div></div></div>');return s.find("textarea").val(n),s},n.prototype.createLink=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="'+i+'_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTarget=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="'+i+'" autocomplete="off" style="'+r+'"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');return s.find("select").val(n),s},n}),N2Require("Slide",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slide",this).addClass("n2-clickable"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slide",t.proxy(this.goToEdit,this)),this.publishElement=this.box.find(".n2-slide-published").on("click",t.proxy(this.switchPublished,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("slideid")},n.prototype.setFirst=function(e){e.stopPropagation(),e.preventDefault(),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl,{nextendaction:"first"}),type:"POST",data:{id:this.getId()}}).done(t.proxy(function(){this.manager.unsetFirst(),this.box.addClass("n2-slide-state-first")},this))},n.prototype.unsetFirst=function(){this.box.removeClass("n2-slide-state-first")},n.prototype.switchPublished=function(t){t.stopPropagation(),t.preventDefault(),this.isPublished()?this.manager.unPublishSlides([this.getId()],[this]):this.manager.publishSlides([this.getId()],[this])},n.prototype.isPublished=function(){return this.box.hasClass("n2-slide-state-published")},n.prototype.published=function(){this.box.addClass("n2-slide-state-published")},n.prototype.unPublished=function(){this.box.removeClass("n2-slide-state-published")},n.prototype.goToEdit=function(t,e){if(this.manager.isBulkSelection)this.invertSelection(),t.preventDefault();else{var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):i==location.href?n2("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible"):window.location=i}},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSlides(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSlides([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n.prototype.publish=function(t){this.switchPublished(t)},n.prototype.unpublish=function(t){this.switchPublished(t)},n.prototype.generator=function(t){window.location=this.box.data("generator")},n.prototype.copy=function(e){this.manager.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"copy",targetSliderID:t})})},this))},n}),N2Require("SlidesManager",[],[],function(t,e,i){function n(i,n,r,s,o,a){this.quickPostModal=null,this.quickVideoModal=null,this.parameters=r,this.slides=[],this.ajaxUrl=i,this.contentAjaxUrl=n,this.slidesPanel=t("#n2-ss-slides-container"),this.slidesContainer=this.slidesPanel.find(".n2-ss-slides-container"),this.initMenu(),this.initSlidesOrderable();for(var l=this.slidesContainer.find(".n2-box-slide"),h=0;h<l.length;h++)this.slides.push(new e.Slide(this,l.eq(h)));if(t("html").attr("data-slides",this.slides.length),t(".n2-add-quick-image, .n2-box-slide-dummy").on("click",t.proxy(this.addQuickImage,this)),t(".n2-add-quick-video").on("click",t.proxy(this.addQuickVideo,this)),t(".n2-add-quick-post").on("click",t.proxy(this.addQuickPost,this)),this.initBulk(),!s){var d=[];this.slidesContainer.fileupload({url:o,pasteZone:!1,dataType:"json",paramName:"image",dropZone:t("undefined"==typeof nextend.smartSlider?document:".n2-ss-slides-outer-container"),add:t.proxy(function(t,e){e.formData={path:"/"+a},e.submit()},this),done:t.proxy(function(t,e){var i=e.result;i.data&&i.data.name?d.push({title:i.data.name,description:"",image:i.data.url}):NextendAjaxHelper.notification(i)},this),fail:t.proxy(function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},this),start:function(){NextendAjaxHelper.startLoading()},stop:t.proxy(function(){d.length?this._addQuickImages(d):setTimeout(function(){NextendAjaxHelper.stopLoading()},100),d=[]},this)});var c=null;this.slidesContainer.on("dragover",t.proxy(function(e){null!==c?(clearTimeout(c),c=null):this.slidesContainer.addClass("n2-drag-over"),c=setTimeout(t.proxy(function(){this.slidesContainer.removeClass("n2-drag-over"),c=null},this),400)},this))}}return n.prototype.changed=function(){},n.prototype.initSlidesOrderable=function(){this.slidesContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",items:".n2-box-slide",start:function(t,e){e.item.show()},stop:t.proxy(this.saveSlideOrder,this),placeholder:"n2-box-sortable-placeholder n2-box-sortable-placeholder-small",distance:10})},n.prototype.saveSlideOrder=function(e){for(var i=this.slidesContainer.find(".n2-box-slide"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slide");n.push(a),r.push(a.getId())}for(var o=0;o<this.slides.length;o++)s.push(this.slides[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidesOrderChanged");var l={nextendcontroller:"slides",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{slideorder:r}}),this.slides=n,this.changed()}},n.prototype.initSlides=function(){for(var e=(this.slides.length,this.slidesContainer.find(".n2-box-slide")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slide");i.push(r)}this.slides=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidesChanged"),t("html").attr("data-slides",this.slides.length)},n.prototype.unsetFirst=function(){for(var t=0;t<this.slides.length;t++)this.slides[t].unsetFirst();this.changed()},n.prototype.addQuickImage=function(e){e.preventDefault(),nextend.imageHelper.openMultipleLightbox(t.proxy(this._addQuickImages,this))},n.prototype.addBoxes=function(i){i.insertBefore(this.slidesContainer.find(".n2-clear")),i.addClass("n2-ss-box-just-added").each(t.proxy(function(i,n){new e.Slide(this,t(n))},this)),this.initSlides(),setTimeout(function(){i.removeClass("n2-ss-box-just-added")},200)},n.prototype._addQuickImages=function(e){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickImages"}),data:{images:Base64.encode(JSON.stringify(e))}}).done(t.proxy(function(e){this.addBoxes(t(e.data))},this))},n.prototype.addQuickVideo=function(e){e.preventDefault();var i=this;this.quickVideoModal||(this.quickVideoModal=new NextendModal({zero:{size:[500,350],title:n2_("Add video"),back:!1,close:!0,content:'<form class="n2-form"></form>',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>"],fn:{show:function(){var e=this.controls.find(".n2-button"),n=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createInput(n2_("Video url"),"n2-slide-video-url","width: 446px;")),this.content.find("#n2-slide-video-url").focus());this.content.append(this.createHeading(n2_("Examples"))),this.content.append(this.createTable([["YouTube","https://www.youtube.com/watch?v=lsq09izc1H4"],["Vimeo","https://vimeo.com/144598279"]],["",""])),e.on("click",t.proxy(t.proxy(function(e){e.preventDefault();var r=n.val(),s=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,o=r.match(s),a=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,l=r.match(a),h=r.match(/\.(mp4)/i);o?NextendAjaxHelper.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+encodeURI(o[2])+"&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM").done(t.proxy(function(t){if(t.items.length){var e=t.items[0].snippet,n=t.items[0].snippet.thumbnails,s=n.maxres||n.standard||n.high||n.medium||n["default"];i._addQuickVideo(this,{type:"youtube",title:e.title,description:e.description,image:s.url,video:r})}},this)).fail(function(t){nextend.notificationCenter.error(t.error.errors[0].message)}):l?NextendAjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+l[3]+".json").done(t.proxy(function(t){i._addQuickVideo(this,{type:"vimeo",title:t[0].title,description:t[0].description,video:l[3],image:t[0].thumbnail_large})},this)).fail(function(t){nextend.notificationCenter.error(t.responseText)}):h?nextend.notificationCenter.error("This video url is not supported!"):nextend.notificationCenter.error("This video url is not supported!")},this)))}}}})),this.quickVideoModal.show()},n.prototype._addQuickVideo=function(e,i){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickVideo"}),data:{video:Base64.encode(encodeURIComponent(JSON.stringify(i)))}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.addQuickPost=function(e){if(e.preventDefault(),!this.quickPostModal){var i=this,n={},r=t.proxy(function(t){return"undefined"==typeof n[t]&&(n[t]=NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),data:{keyword:t},dataType:"json"})),n[t]},this);this.quickPostModal=new NextendModal({zero:{size:[600,430],title:n2_("Add post"),back:!1,close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-ss-keyword","width:546px;"));var e=t("#n2-ss-keyword"),n=this.createHeading("").appendTo(this.content),s=this.createResult().appendTo(this.content),o="";e.on("keyup",t.proxy(function(){o=e.val(),r(o).done(t.proxy(function(r){if(e.val()==o){""==o?n.html(n2_("No search term specified. Showing recent items.")):n.html(n2_printf(n2_('Showing items match for "%s"'),o));for(var a=r.data,l=[],h=this,d=0;d<a.length;d++)l.push([a[d].title,a[d].info,t('<div class="n2-button n2-button-normal n2-button-xs n2-button-green n2-radius-s n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{post:a[d]},function(t){i._addQuickPost(h,t.data.post)})]);s.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(s))}},this))},this)).trigger("keyup").focus()}}}})}this.quickPostModal.show()},n.prototype._addQuickPost=function(e,i){i.image||(i.image=""),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickPost"}),data:{post:i}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this)),e.eq(2).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.select():t.deSelect()})},this)),e.eq(3).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.deSelect():t.select()})},this)),t(".n2-bulk-actions a").on("click",t.proxy(function(e){var i=t(e.currentTarget).data("action");i&&(e.preventDefault(),this.bulkAction(i))},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.slides.length;e++)t(this.slides[e])},n.prototype.bulkAction=function(t){var e=[],i=[];this.bulkSelect(function(t){t.selected&&(e.push(t),i.push(t.getId()))}),i.length?this[t](i,e):nextend.notificationCenter.notice("Please select one or more slides for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.slidesContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.slidesContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.slides.length;e++)this.slides[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n.prototype.deleteSlides=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slide-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"delete"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSlides(),this.leaveBulk()},this))},this))},n.prototype.duplicateSlides=function(e,i){for(var n=0;n<this.slides.length;n++)this.slides[n].selected&&this.slides[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.copySlides=function(e,i){this.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"copySlides",targetSliderID:t}),type:"POST",data:{slides:e}})},this))},n.prototype.publishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"publish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].published();this.changed()},this))},n.prototype.unPublishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"unpublish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].unPublished();this.changed()},this))},n.prototype.initMenu=function(){this.slide=null,this.menu=t("#n2-ss-slide-menu").detach().addClass("n2-inited"),this.menu.find("li").on("click",t.proxy(function(e){e.stopPropagation();var i=t(e.currentTarget).data("action");i&&"function"==typeof this.slide[i]&&this.slide[i](e)},this)),this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slide=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.detach()},n.prototype.showSliderSelector=function(e,i){var n=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"choose"});this.sliderSelectorModal=new NextendModal({zero:{size:[970,600],title:e,back:!1,close:!0,content:"",fn:{show:function(){var e=t('<iframe src="'+n+'" width="970" height="540" style="margin: 0 -20px 0 -20px;"></iframe>').appendTo(this.content),r=window.addEventListener?"addEventListener":"attachEvent";window[r]("attachEvent"==r?"onmessage":"message",t.proxy(function(t){if(t.source==(e[0].contentWindow||e[0].contentDocument)){var n=t[t.message?"message":"data"];i(n),this.hide()}},this),!1)},destroy:function(){this.destroy()}}}},!0)},n}),N2Require("SlideAdmin",[],[],function(t,e,i){function n(){this.layerAnimationManager=null,this.slideEditManager=null,this.frontend=null,this.generator=null,this.canvasManager=null,this.history=null,this.$currentSlideElement=null}return n.prototype.startEditor=function(t,i,n){return null===this.slideEditManager&&(this.slideEditManager=new e.SlideEditManager(t,i,n)),this.slideEditManager},window.nextend.pre="div#n2-ss-0 ",window.nextend.smartSlider=new n,n}),N2Require("SmartSliderBackgroundImageAdmin",["SmartSliderBackgroundImage"],[],function(t,e,i){function n(t,i,n){this.allowVisualLoad=!0,this.hash=i.data("hash"),e.SmartSliderBackgroundImage.prototype.constructor.call(this,t,i,n),this.loadAllowed=!0,this.listenImageManager()}return n.prototype=Object.create(e.SmartSliderBackgroundImage.prototype),n.prototype.constructor=n,n.prototype.startColorMode=function(){this.$background=t('<div class="n2-ss-background-image"/>').appendTo(this.$mask),this.loadDeferred.resolve()},n.prototype.setVisualLoad=function(t){this.allowVisualLoad=t},n.prototype.listenImageManager=function(){""!=this.hash&&t(window).on(this.hash,t.proxy(this.onImageManagerChanged,this))},n.prototype.notListenImageManager=function(){""!=this.hash&&t(window).off(this.hash,null,t.proxy(this.onImageManagerChanged,this))},n.prototype.onImageManagerChanged=function(t,e){this.tabletSrc=e.tablet.image,this.mobileSrc=e.mobile.image,this.updateBackgroundToDevice(this.manager.device)},n.prototype.setDesktopSrc=function(e){if(this.notListenImageManager(),this.desktopSrc=e,this.hash=md5(e),""!=e&&this.allowVisualLoad){var i=new Image;i.addEventListener("load",t.proxy(function(){t.when(nextend.imageManager.getVisual(e)).done(t.proxy(function(t){this.onImageManagerChanged(null,t.value),this.listenImageManager()},this))},this),!1),i.src=nextend.imageHelper.fixed(e)}else this.tabletSrc="",this.mobileSrc="",this.setSrc(nextend.imageHelper.fixed(e))},n.prototype.setSrc=function(t){e.SmartSliderBackgroundImage.prototype.setSrc.call(this,nextend.imageHelper.fixed(t))},n.prototype.startFixed=function(){},n.prototype.setMode=function(t){"default"==t&&(t=nextend.smartSlider.slideBackgroundMode),this.element.attr("data-mode",t),this.mode=t},n.prototype.setFocus=function(t,e){this.$background.css("background-position",t+"% "+e+"%")},n.prototype.setOpacity=function(t){this.opacity=t,this.$background.css("opacity",t)},n.prototype.setBlur=function(t){window.n2FilterProperty&&(t>0?this.$background.css({margin:"-"+2*t+"px",padding:2*t+"px"}).css(window.n2FilterProperty,"blur("+t+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),this.blur=t},n}),N2Require("SlideEditManager",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,n){this.readyDeferred=t.Deferred(),this.options=t.extend({slideAsFile:0,isUploadDisabled:!0,uploadUrl:"",uploadDir:"",isAddSample:!1},n),this.warnInternetExplorerUsers(),this.$slideContentElement=t("#"+i),this.slideStartValue=this.$slideContentElement.val(),window[e].visible(t.proxy(this.sliderStarted,this))}return r.prototype.startSampleSlides=function(){var e="https://smartslider3.com/slides/"+window.N2SS3VERSION+"/free/",i=this,r=window.addEventListener?"addEventListener":"attachEvent",s=t('<iframe src="'+e+'"></iframe>').prependTo(".n2-ss-sample-slides-container"),o=s[0];t("html, body").scrollTop(s.offset().top-t("#wpadminbar").height());var a=t(".n2-ss-sample-slide-settings"),l=t("#slidebackgroundImage"),h=t("#n2-ss-sample-slide-setting-background-image").on("click",function(){l.parent().find(".n2-form-element-button").trigger("click")}),d=function(){var e=l.val();""===e?(a.removeClass("n2-ss-has-image"),h.css("background-image","url(//nextenddev.no-ip.org/roland/wordpress1/wp-content/plugins/nextend-smart-slider3-pro/nextend/media/images/placeholder/image.png)"),t("#slidebackground-type").val("color").trigger("change")):(a.addClass("n2-ss-has-image"),t("#slidebackground-type").val("image").trigger("change"),h.css("background-image","url("+nextend.imageHelper.fixed(e)+")"))};h.find(".n2-i-close").on("click",function(t){t.stopPropagation(),l.parent().find(".n2-form-element-clear").trigger("click")}),l.on("nextendChange",d),d();var c=t("#slidebackgroundImageOpacity"),p=t("#n2-ss-sample-slide-setting-opacity-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:100,step:1,slide:function(t,e){c.data("field").insideChange(e.value)}}),u=function(t){p.slider("value",c.val())};c.on("nextendChange",u),u();var y=t("#slidebackgroundImageBlur"),g=t("#n2-ss-sample-slide-setting-blur-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:40,step:1,slide:function(t,e){y.data("field").insideChange(e.value)}}),f=function(t){g.slider("value",y.val())};y.on("nextendChange",f),f();var v=t("#slidebackgroundColor"),m=t("#n2-ss-sample-slide-setting-color").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=m.n2spectrum("get").toHexString8();m.val(t),v.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),b=function(t){var e=v.val();e!=m.val()&&m.n2spectrum("set",e)};v.on("nextendChange",b),b();var x=t("#slidebackgroundGradient"),C=function(){"off"==x.val()?a.removeClass("n2-ss-has-gradient"):a.addClass("n2-ss-has-gradient")};x.on("nextendChange",C),C();var S=t("#slidebackgroundColorEnd"),w=t("#n2-ss-sample-slide-setting-gradient").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=w.n2spectrum("get").toHexString8();S.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),k=function(t){w.n2spectrum("set",S.val())};S.on("outsideChange",k),k(),window[r]("attachEvent"==r?"onmessage":"message",function(t){if(t.source==(o.contentWindow||o.contentDocument)){var e=t[t.message?"message":"data"];if(e.key)switch(e.key){case"sampleSlide":var r=JSON.parse(e.data);i.settings.setData(r.data,!0),i.canvasManager.mainContainer.replaceLayers(r.layers),"content"!=i.canvasManager.currentEditorMode&&i.canvasManager.mainContent!=n&&i.canvasManager.updateEditorMode("content");break;case"ready":(o.contentWindow||o.contentDocument).postMessage({key:"ackReady"},"*"),i.options.isAddSample&&((o.contentWindow||o.contentDocument).postMessage({key:"create"},"*"),i.options.isAddSample=!1)}}},!1)},r.prototype.sliderStarted=function(){i.history=new e.History,i.frontend=window["n2-ss-0"],i.frontend.visible(function(){t("body").addClass("n2-ss-slider-visible");var e=t("#n2-ss-slide-canvas-container"),i=e.tinyscrollbar({axis:"x",wheel:!1,wheelLock:!1}).data("plugin_tinyscrollbar");"function"==typeof e.get(0).move&&(e.get(0).move=null),this.sliderElement.on("SliderResize",function(){i.update("relative")})}),i.$currentSlideElement=i.frontend.sliderElement.find(".n2-ss-currently-edited-slide");var n=i.$currentSlideElement.hasClass("n2-ss-static-slide");new e.Generator,this.settings=new e.SlideSettings(n),this.canvasManager=new e.CanvasManager(this,n,this.options),this.readyDeferred.resolve(),t("#smartslider-form").on({checkChanged:t.proxy(this.prepareFormForCheck,this),submit:t.proxy(this.onSlideSubmit,this)}),this.options.isAddSample&&this.startSampleSlides()},r.prototype.ready=function(t){this.readyDeferred.done(t)},r.prototype.prepareFormForCheck=function(){var t=JSON.stringify(this.canvasManager.getData()),e=JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));this.$slideContentElement.val(e==t?this.slideStartValue:Base64.encode(t))},r.prototype.onSlideSubmit=function(e){if(!nextend.isPreview)if(this.prepareForm(),e.preventDefault(),nextend.askToSave=!1,this.options.slideAsFile&&typeof window.FormData!==n&&"undefined"!=typeof window.File){var i=new FormData,r=t("#smartslider-form").serializeArray();t.each(r,function(t,e){if("slide[slide]"==e.name)try{i.append("slide",new Blob([e.value]),"slide.txt")}catch(n){try{i.append("slide",new Blob([e.value]))}catch(n){try{i.append("slide",new File([e.value],"slide.txt"))}catch(n){nextend.notificationCenter.notice('Your browser does not support File api, please disable "Send slide as file" option in the global settings.')}}}else i.append(e.name,e.value)}),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(window.location.href),type:"POST",data:i,contentType:!1,processData:!1}).done(t.proxy(this.afterSave,this))}else NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.location.href),data:t("#smartslider-form").serialize(),dataType:"json"}).done(t.proxy(this.afterSave,this))},r.prototype.afterSave=function(){nextend.askToSave=!0,t("#smartslider-form").trigger("saved"),t(".n2-ss-edit-slide-top-details .n2-h1").html(t("#slidetitle").val())},r.prototype.prepareForm=function(){i.ruler&&t("#slideguides").val(Base64.encode(JSON.stringify(i.ruler.toArray()))),this.$slideContentElement.val(Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.canvasManager.getData()))))},r.prototype.warnInternetExplorerUsers=function(){var t=this.isInternetExplorer();t&&10>t&&alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser)},r.prototype.isInternetExplorer=function(){var t=navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):!1},r.prototype.getLayout=function(){for(var e=t("#smartslider-form").serializeArray(),i={},n=0;n<e.length;n++){var r=e[n].name.match(/slide\[(.*?)\]/);r&&(i[r[1]]=e[n].value)}return delete i.generator,delete i.published,delete i.publishdates,delete i["record-start"],delete i["record-slides"],delete i.slide,i.slide=this.canvasManager.getData(),i},r.prototype.loadLayout=function(e,i,n){var r=e.slide;if(delete e.slide,n?this.canvasManager.importLayers(r,!0):this.canvasManager.importLayers(r,!1),i)for(var s in e)t("#slide"+s).val(e[s]).trigger("change");e.slide=r},r.prototype.getSelf=function(){return this},r.prototype.copySlide=function(){var e={data:this.settings.getBackgroundData(),layers:this.canvasManager.getData()};t.jStorage.set("copiedSlide",JSON.stringify(e))},r.prototype.pasteSlide=function(){var e=t.jStorage.get("copiedSlide");e&&(e=JSON.parse(e),this.settings.setData(e.data),this.canvasManager.mainContainer.replaceLayers(e.layers))},r.prototype.hasCopiedSlide=function(){var e=t.jStorage.get("copiedSlide");return!!e},r}),N2Require("Generator",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(){this._refreshTimeout=null,this.modal=!1,this.group=0,i.generator=this;var e=i.$currentSlideElement.data("variables");if(e){this.variables=e;for(var n in this.variables)!isNaN(parseFloat(n))&&isFinite(n)&&(this.group=Math.max(this.group,parseInt(n)+1));this.fill=this.generatorFill,this.group>0&&(this.registerField=this.generatorRegisterField,
|
3 |
-
this.button=t('<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>').on("click",t.proxy(function(t){t.preventDefault(),this.showModal()},this)),this.registerField(t("#slidetitle")),this.registerField(t("#slidedescription")),this.registerField(t("#slidethumbnail")),this.registerField(t("#slidebackgroundImage")),this.registerField(t("#slidebackgroundAlt")),this.registerField(t("#slidebackgroundTitle")),this.registerField(t("#slidebackgroundVideoMp4")),this.registerField(t("#slidebackgroundColor")),this.registerField(t("#slidebackgroundColorEnd")),this.registerField(t("#linkslidelink_0")),this.registerField(t("#layergenerator-visible")),this.registerField(t("#layergroup-generator-visible")),t("body").addClass("n2-ss-dynamic-slide")),this.initSlideDataRefresh()}else this.variables=null}return r.prototype.isDynamicSlide=function(){return this.group>0},r.prototype.splitTokens=function(t){for(var e=[],i="",n=0,r=0;r<t.length;r++){var s=t[r];","===s&&0===n?(e.push(i),i=""):(i+=s,"("===s?n++:")"===s&&n--)}return i.length&&e.push(i),e},r.prototype.fill=function(t){return t},r.prototype.generatorFill=function(e){return e.replace(/{((([a-z]+)\(([^}]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g,t.proxy(this.parseFunction,this))},r.prototype.parseFunction=function(t,e,i,n,r,s){if("undefined"==typeof s){for(var o=this.splitTokens(r),a=0;a<o.length;a++)o[a]=this.parseVariable(o[a]);return"function"==typeof this[n]?this[n].apply(this,o):t}return this.parseVariable(s)},r.prototype.parseVariable=function(t){var e=t.match(/^("|')(.*)("|')$/);if(e)return e[2];var i=t.match(/((([a-z]+)\(([^}]+)\)))/);if(i)return this.parseFunction.apply(this,i);var n=t.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);if(n){var r=n[3];if("undefined"==typeof r)r=0;else{var s=parseInt(r);isNaN(s)||(r=Math.max(r,1)-1)}return"undefined"!=typeof this.variables[r]&&"undefined"!=typeof this.variables[r][n[1]]?this.variables[r][n[1]]:""}return t},r.prototype.fallback=function(t,e){return""==t?e:t},r.prototype.cleanhtml=function(t){return this.stripTags(t,"<p><a><b><br /><br/><i>")},r.prototype.stripTags=function(t,e){e=(((e||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var i=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,n=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return t.replace(n,"").replace(i,function(t,i){return e.indexOf("<"+i.toLowerCase()+">")>-1?t:""})},r.prototype.removehtml=function(e){return t("<div>"+e+"</div>").text()},r.prototype.splitbychars=function(t,e,i){return t.substr(e,i)},r.prototype.splitbywords=function(t,e,i){var n=t,r=n.length,s=Math.max(0,0==e?0:n.indexOf(" ",e)),o=Math.max(0,i>r?r:n.indexOf(" ",i));return 0==o&&r>=i&&(o=r),n.substr(s,o)},r.prototype.findimage=function(t,e){var i=t,n=/(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[2]?r.push(s[2]):"undefined"!=typeof s[6]&&r.push(s[6]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.findlink=function(t,e){var i=t,n=/href=["\']?([^"\'>]+)["\']?/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[1]&&r.push(s[1]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.removevarlink=function(t){var e=String(t),i=/<a href=\"(.*?)\">(.*?)<\/a>/g;return e.replace(i,"")},r.prototype.removelinebreaks=function(t){var e=String(t),i=/\r?\n|\r/g;return e.replace(i,"")},r.prototype.registerField=function(t){},r.prototype.generatorRegisterField=function(e){var i=e.parent();i.on({mouseenter:t.proxy(function(){this.activeField=e,this.button.prependTo(i)},this)})},r.prototype.getModal=function(){var e=this;if(!this.modal){var i={key:"",group:1,filter:"no",split:"no",splitStart:0,splitLength:300,findImage:0,findImageIndex:1,findLink:0,findLinkIndex:1,removeVarLink:0,removelinebreaks:0},n=function(){var t=i.key+"/"+i.group;return i.findImage&&(t="findimage("+t+","+Math.max(1,i.findImageIndex)+")"),i.findLink&&(t="findlink("+t+","+Math.max(1,i.findLinkIndex)+")"),i.removeVarLink&&(t="removevarlink("+t+")"),i.removelinebreaks&&(t="removelinebreaks("+t+")"),"no"!=i.filter&&(t=i.filter+"("+t+")"),"no"!=i.split&&i.splitStart>=0&&i.splitLength>0&&(t=i.split+"("+t+","+i.splitStart+","+i.splitLength+")"),"{"+t+"}"},r=t('<div class="n2-generator-result-container" />'),s=function(){r.html(t("<div/>").text(e.fill(n())).html())},o=e.group,a=null,l=null,h=t('<div class="n2-generator-insert-variable"/>'),d=NextendModal.prototype.createHeading(n2_("Choose the group")).appendTo(h),c=t('<div class="n2-group-container" />').appendTo(h);h.append(NextendModal.prototype.createHeading(n2_("Choose the variable")));var p=t('<div class="n2-variable-container webkit-scroll-fix" />').appendTo(h),u=t('<div class="n2-generator-functions-container n2-form-element-mixed" />').appendTo(t('<div class="n2-form" />').appendTo(h));h.append(NextendModal.prototype.createHeading(n2_("Result"))),r.appendTo(h),t('<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>").appendTo(u);var y=u.find("#n2-generator-function-filter");y.on("change",t.proxy(function(){i.filter=y.val(),s()},this)),t('<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>').appendTo(u);var g=u.find("#n2-generator-function-split");g.on("change",t.proxy(function(){i.split=g.val(),s()},this));var f=u.find("#n2-generator-function-split-start");f.on("change",t.proxy(function(){i.splitStart=parseInt(f.val()),s()},this));var v=u.find("#n2-generator-function-split-length");v.on("change",t.proxy(function(){i.splitLength=parseInt(v.val()),s()},this)),t('<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>').appendTo(u);var m=u.find("#n2-generator-function-findimage");m.on("nextendChange",t.proxy(function(){i.findImage=parseInt(m.val()),s()},this));var b=u.find("#n2-generator-function-findimage-index");b.on("change",t.proxy(function(){i.findImageIndex=parseInt(b.val()),s()},this)),t('<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>').appendTo(u);var x=u.find("#n2-generator-function-findlink");x.on("nextendChange",t.proxy(function(){i.findLink=parseInt(x.val()),s()},this));var C=u.find("#n2-generator-function-findlink-index");C.on("change",t.proxy(function(){i.findLinkIndex=parseInt(C.val()),s()},this)),t('<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>').appendTo(u);var S=u.find("#n2-generator-function-removevarlink");S.on("nextendChange",t.proxy(function(){i.removeVarLink=parseInt(S.val()),s()},this));var w=u.find("#n2-generator-function-removevarlink-index");w.on("change",t.proxy(function(){i.removeVarLinkIndex=parseInt(w.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Remove line breaks")+'</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-removelinebreaks"></div></div></div>').appendTo(u);var k=u.find("#n2-generator-function-removelinebreaks");k.on("nextendChange",t.proxy(function(){i.removelinebreaks=parseInt(k.val()),s()},this));var P=u.find("#n2-generator-function-removelinebreaks-index");P.on("change",t.proxy(function(){i.removelinebreaksIndex=parseInt(P.val()),s()},this));for(var M in this.variables[0])t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+M+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),a.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.key=e,s()},this,M)).appendTo(p);a=p.find("a"),a.eq(0).trigger("click"),1==o&&(d.css("display","none"),c.css("display","none"));for(var L=0;o>L;L++)t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+(L+1)+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),l.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.group=e+1,s()},this,L)).appendTo(c);l=c.find("a"),l.eq(0).trigger("click");var D=!1;this.modal=new NextendModal({zero:{size:[1e3,o>1?670:600],title:n2_("Insert variable"),back:!1,close:!0,content:h,controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green">'+n2_("Insert")+"</a>"],fn:{show:function(){D||(new N2Classes.FormElementOnoff("n2-generator-function-findimage"),new N2Classes.FormElementOnoff("n2-generator-function-findlink"),new N2Classes.FormElementOnoff("n2-generator-function-removevarlink"),new N2Classes.FormElementOnoff("n2-generator-function-removelinebreaks"),D=!0),this.controls.find(".n2-button").on("click",t.proxy(function(t){t.preventDefault(),e.insert(n()),this.hide(t)},this))}}}},!1),this.modal.setCustomClass("n2-ss-generator-modal")}return this.modal},r.prototype.showModal=function(){this.getModal().show()},r.prototype.insert=function(t){this.activeField.val(t).trigger("change")},r.prototype.initSlideDataRefresh=function(){var e=t("#slidetitle").on("nextendChange",t.proxy(function(){this.variables.slide.name=e.val(),this.refresh()},this)),i=t("#slidedescription").on("nextendChange",t.proxy(function(){this.variables.slide.description=i.val(),this.refresh()},this))},r.prototype.refresh=function(){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),this._refreshTimeout=setTimeout(t.proxy(this._refresh,this),100)},r.prototype._refresh=function(){for(var t=i.canvasManager.mainContainer.container.getAllLayers(),e=0;e<t.length;e++)"layer"==t[e].type&&t[e].item.reRender()},r}),N2Require("History",[],[],function(t,e,i){"use strict";function n(){this.historyStates=50,this.enabled=0!=this.historyStates,this.historyAddAllowed=!0,this.isBatched=!1,this.currentBatch=this,this.index=-1,this.stackedOff=[],this.tasks=[],this.preventUndoRedo=!1,this.undoBTN=t("#n2-ss-undo").on({click:t.proxy(this.undo,this),mousedown:function(t){nextend.context.setMouseDownArea("undo",t)}}),this.redoBTN=t("#n2-ss-redo").on({click:t.proxy(this.redo,this),mousedown:function(t){nextend.context.setMouseDownArea("redo",t)}}),this.updateUI()}function r(t){this.parent=t,this.tasks=[]}function s(t){switch(t){case"skipForwardUndos":this.undo=function(){return!1}}}function o(t,e,i,n){this.that=t,this.undoAction=e,this.redoAction=i,this.context=n||[]}function a(){o.prototype.constructor.apply(this,arguments)}return n.prototype.updateUI=function(){0==this.index||0==this.tasks.length?this.undoBTN.removeClass("n2-active"):this.undoBTN.addClass("n2-active"),-1==this.index||this.index>=this.tasks.length?this.redoBTN.removeClass("n2-active"):this.redoBTN.addClass("n2-active")},n.prototype.throttleUndoRedo=function(){return this.preventUndoRedo?!0:(this.preventUndoRedo=!0,setTimeout(t.proxy(function(){this.preventUndoRedo=!1},this),100),!1)},n.prototype.isEnabled=function(){return this.enabled&&this.historyAddAllowed},n.prototype.startBatch=function(){if(this.isEnabled()){var t=new r(this.currentBatch);return this.currentBatch._add(t),this.currentBatch=t,t}return!1},n.prototype.endBatch=function(){this.isEnabled()&&(this.currentBatch.parent==i,this.currentBatch=this.currentBatch.parent)},n.prototype.addControl=function(t){return this.currentBatch._add(new s(t))},n.prototype.addSimple=function(t,e,i,n){return this.isEnabled()?this.currentBatch._add(new o(t,e,i,n)):!1},n.prototype.addValue=function(t,e,i){if(this.isEnabled()){if(this.isBatched||this.currentBatch!=this)for(var n=this.getCurrentBatchStack(),r=0;r<n.length;r++)if(n[r].isEqual(t,e,i))return n.push(n.splice(r,1)[0]),n[n.length-1];return this.currentBatch._add(new a(t,e,e,i))}return!1},n.prototype.getCurrentBatchStack=function(){return this.currentBatch!=this?this.currentBatch.tasks:this.tasks[this.tasks.length-1]},n.prototype._add=function(e){return-1!=this.index&&this.tasks.splice(this.index,this.tasks.length),this.index=-1,this.isBatched?this.tasks[this.tasks.length-1].push(e):(this.tasks.push([e]),this.isBatched=!0,setTimeout(t.proxy(function(){this.isBatched=!1},this),100)),this.tasks.length>this.historyStates&&this.tasks.unshift(),this.updateUI(),e},n.prototype.off=function(){this.historyAddAllowed=!1,this.stackedOff.push(1)},n.prototype.on=function(){this.stackedOff.pop(),0==this.stackedOff.length&&(this.historyAddAllowed=!0)},n.prototype.undo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1==this.index?this.index=this.tasks.length-1:this.index--,this.index>=0)for(var e=this.tasks[this.index],i=e.length-1;i>=0&&e[i].undo();i--);else this.index=0;return this.on(),this.updateUI(),!0},n.prototype.redo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1!=this.index&&this.index<this.tasks.length){var e=this.tasks[this.index];this.index++;for(var i=0;i<e.length&&e[i].redo();i++);}return this.on(),this.updateUI(),!0},r.prototype._add=function(t){return this.tasks.push(t),t},r.prototype.invertUndo=function(){return this.undo=function(){for(var t=this.tasks.length-1;t>=0&&this.tasks[t].undo();t--);return!0},this},r.prototype.undo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].undo();t++);return!0},r.prototype.redo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].redo();t++);return!0},r.prototype.isEqual=function(){return!1},s.prototype.undo=function(){return!0},s.prototype.redo=function(){return!0},s.prototype.isEqual=function(){return!1},o.prototype.undo=function(){return this.undoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.redo=function(){return this.redoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.isEqual=function(){return!1},a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype.setValues=function(t,e){this.undoValue=t,this.redoValue=e},a.prototype.undo=function(){return this.context.unshift(this.undoValue),this.undoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.redo=function(){return this.context.unshift(this.redoValue),this.redoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.isEqual=function(t,e,i){if(t==this.that&&e==this.undoAction){for(var n=0;n<i.length;n++)if(i[n]!=this.context[n])return!1;return this.setValues=function(t,e){this.redoValue=e},!0}return!1},n}),N2Require("InlineField",[],[],function(t,e,i){function n(){this.$input=t('<input type="text" name="name" />').on({mouseup:function(t){t.stopPropagation()},keyup:t.proxy(function(t){27==t.keyCode&&this.cancel()},this),blur:t.proxy(this.save,this)}),this.$form=t('<form class="n2-inline-form"></form>').append(this.$input).on("submit",t.proxy(this.save,this))}return n.prototype.injectNode=function(t,e){this.$input.val(e),t.append(this.$form),this.$input.focus()},n.prototype.save=function(t){t.preventDefault(),this.$input.trigger("valueChanged",[this.$input.val()]),this.$input.off("blur"),this.destroy()},n.prototype.cancel=function(){this.$input.trigger("cancel"),this.destroy()},n.prototype.destroy=function(){this.$input.off("blur"),this.$form.remove()},n}),N2Require("SlideSettings",["SlideEditManager"],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isStatic=e;var n=t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]'),r={};if(n.each(t.proxy(function(e,i){var n=t(i),s=n.attr("name").match(/slide\[(.*)\]/)[1];r[s]=n.on("nextendChange",t.proxy(this.onChange,this,s))},this)),this.fields=r,this.slideBackground=i.$currentSlideElement.data("slideBackground"),!e){this.$slideMask=this.slideBackground.$mask;var s=t("#slidethumbnail");if(""==s.val()){var o=t("#item_imageimage"),a=t.proxy(function(t){""!=t&&"$system$/images/placeholder/image.png"!=t&&(s.val(t).trigger("change"),this.fields.backgroundImage.off(".slidethumbnail"),o.off(".slidethumbnail"))},this);this.fields.backgroundImage.on("nextendChange.slidethumbnail",t.proxy(function(){a(this.fields.backgroundImage.val())},this)),o.on("nextendChange.slidethumbnail",t.proxy(function(){a(o.val())},this))}}this.createHistory()}r.prototype.createHistory=function(){this.values={},t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]').not("#slideslide").each(t.proxy(function(e,n){var r=t(n),s=r.data("field"),o=r.attr("id");this.values[o]=r.val(),r.on("nextendChange",t.proxy(function(){var t=r.val(),e=i.history.addValue(this,this.historyUpdateSlideValue,[s]);e&&e.setValues(this.values[o],t),this.values[o]=t},this))},this))},r.prototype.getSelf=function(){return this},r.prototype.historyUpdateSlideValue=function(t,e){e.insideChange(t)},r.prototype.getAllData=function(){var t={};for(var e in this.fields)t[e]=this.fields[e].val();return t};var s=["thumbnail","background-type","backgroundColor","backgroundGradient","backgroundColorEnd","backgroundImage","backgroundImageOpacity","backgroundImageBlur","backgroundFocusX","backgroundFocusY","backgroundMode"];return r.prototype.getBackgroundData=function(){for(var t={},e=0;e<s.length;e++)t[s[e]]=this.fields[s[e]].val();return t},r.prototype.setData=function(t,e){e&&this.slideBackground.setVisualLoad(!1);for(var i in t)this.fields[i].val(t[i]).trigger("change");e&&this.slideBackground.setVisualLoad(!1)},r.prototype.onChange=function(t,e){"function"==typeof this["sync_"+t]&&this["sync_"+t].call(this)},r.prototype.sync_backgroundColor=r.prototype.sync_backgroundGradient=r.prototype.sync_backgroundColorEnd=function(){this.updateBackgroundColor()},r.prototype.updateBackgroundColor=function(){var t=i.generator.fill(this.fields.backgroundColor.val()),e=this.fields.backgroundGradient.val();if(t.length&&"#"==t.charAt(0)&&(t=t.substring(1),6==t.length&&(t+="ff")),"off"!=e){var n=i.generator.fill(this.fields.backgroundColorEnd.val()),r=this.$slideMask.css({background:"",filter:""});switch(n.length&&"#"==n.charAt(0)&&(n=n.substring(1),6==n.length&&(n+="ff")),e){case"horizontal":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=1)");break;case"vertical":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=0)");break;case"diagonal1":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=1)");break;case"diagonal2":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=1)")}}else"00"==t.substr(6,8)?this.$slideMask.css("background",""):this.$slideMask.css("background","#"+t.substr(0,6)).css("background",N2Color.hex2rgbaCSS(t));this.slideBackground.element.find(".n2-ss-slide-bg-video-color-overlay").css("background",this.$slideMask.css("background"))},r.prototype.sync_backgroundImage=function(){this["sync_background-type"]()},r.prototype["sync_background-type"]=function(){var t=this.fields["background-type"].val();"color"==t?this.slideBackground.setDesktopSrc(""):this.slideBackground.setDesktopSrc(i.generator.fill(this.fields.backgroundImage.val()))},r.prototype.sync_backgroundMode=function(){this.slideBackground.setMode(this.fields.backgroundMode.val())},r.prototype.sync_backgroundFocusY=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundFocusX=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundImageOpacity=function(){this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val()/100)},r.prototype.sync_backgroundImageBlur=function(){this.slideBackground.setBlur(this.fields.backgroundImageBlur.val())},r}),N2Require("LayerContainer",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e,i,n,r){this.component=t,this.$ul=e.data("container",this),this.allowedPlacementMode=i,this.childrenSelector=n,this.allowedChildren=r,this.layerContainerElement=t.layer}return r.prototype.setLayerContainerElement=function(t){this.layerContainerElement=t},r.prototype.startWithExistingNodes=function(){for(var t=this.layerContainerElement.find(this.childrenSelector),e=0;e<t.length;e++)this._loadNode(t.eq(e),!1);this.component.onChildCountChange()},r.prototype.isChildAllowed=function(e){return-1!==t.inArray(e,this.allowedChildren)},r.prototype._loadNode=function(t,i){var r=t.data("type");if(this.isChildAllowed(r)){var s=t.data("lastplacement"),o={};if(s!==n&&s!=this.allowedPlacementMode)switch(s){case"absolute":o=e.PlacementAbsolute.cleanLayer(t);break;case"normal":o=e.PlacementNormal.cleanLayer(t)}var a;switch(r){case"layer":a=new e.Layer(this.component.canvasManager,this.component);var l=a.itemEditor.getItemClass(t.find(".n2-ss-item").data("item"));l&&e[l].needSize&&o.desktopportraitheight!==n&&t.data("desktopportraitheight",o.desktopportraitheight);break;case"content":a=new e.Content(this.component.canvasManager,this.component);break;case"row":a=new e.Row(this.component.canvasManager,this.component);break;case"col":a=new e.Col(this.component.canvasManager,this.component);break;case"group":}if(a)return a.load(t),i&&a.sync(),a}else console.error(r+" is not allowed in "+this.component.label);return!1},r.prototype.getLayerCount=function(){return this.layerContainerElement.find(this.childrenSelector).length},r.prototype.getLayerIndex=function(t){return this.layerContainerElement.find(this.childrenSelector).index(t)},r.prototype.getSortedLayers=function(){var e=[];return this.layerContainerElement.find(this.childrenSelector).each(function(i,r){var s=t(r).data("layerObject");s!==n&&e.push(s)}),e},r.prototype.append=function(t){t.appendTo(this.layerContainerElement);var e=this._loadNode(t,!0);return this.component.onChildCountChange(),e},r.prototype.insertAt=function(t,e){var i=this.getSortedLayers();e>=i.length?t.appendTo(this.layerContainerElement):t.insertBefore(i[e].layer);var n=this._loadNode(t,!0);return this.component.onChildCountChange(),n},r.prototype.insert=function(t){t.getRootElement().appendTo(this.layerContainerElement)},r.prototype.insertLayerAt=function(e,i){var n=this.getSortedLayers(),r=t.inArray(e,n);"-1"!=r&&i>r&&i++,i>=n.length?e.getRootElement().appendTo(this.layerContainerElement):e.getRootElement().insertBefore(n[i].getRootElement()),this.syncLayerRow(e)},r.prototype.syncLayerRow=function(t){var e,i="absolute"==this.allowedPlacementMode;e=i?t.getRootElement().prevAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"):t.getRootElement().nextAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"),e!==n?t.layerRow.insertBefore(e.layerRow):this.$ul.append(t.layerRow),t.animations&&t.animations.syncRow(e,i)},r.prototype.getChildLayersRecursive=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)t?i.push(e[n].layer[0]):i.push(e[n]),e[n].container&&i.push.apply(i,e[n].container.getChildLayersRecursive(t));return i},r.prototype.moveLayerToGroup=function(t,e){this.moveLayersToGroup([t],[e])},r.prototype.moveLayersToGroup=function(e,i){i=i||[];for(var n=[],r=0;r<e.length;r++){var s=e[r],o=s.group,a=s.getIndex();"undefined"!=typeof i[r]?this.insertLayerAt(s,i[r]):this.insert(s),s.changeGroup(a,this.component),this!=o&&-1==t.inArray(o,n)&&n.push(o)}for(var r=0;r<n.length;r++)n[r].update()},r.prototype.activateFirst=function(){var t=this.getSortedLayers();t.length>0&&t[t.length-1].activate()},r.prototype.resetModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].resetMode(t),e[i].container!=n&&e[i].container.resetModes(t)},r.prototype.copyModes=function(t,e){for(var i=this.getSortedLayers(),r=0;r<i.length;r++)i[r].copyMode(t,e),i[r].container!=n&&i[r].container.copyModes(t,e)},r.prototype.changeEditorModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].changeEditorMode(t),e[i].container!=n&&e[i].container.changeEditorModes(t)},r.prototype.renderModeProperties=function(){for(var t=this.getSortedLayers(),e=0;e<t.length;e++)t[e].renderModeProperties(),t[e].container!=n&&t[e].container.renderModeProperties()},r.prototype.getAllLayers=function(t){t=t||[];for(var e=this.getSortedLayers(),i=0;i<e.length;i++)t.push(e[i]),e[i].container!=n&&e[i].container.getAllLayers(t);return t},r.prototype.getData=function(e){e=t.extend({layersIncluded:!0,itemsIncluded:!0},e);var i=[],n=this.getSortedLayers();if("absolute"==this.allowedPlacementMode)for(var r=n.length-1;r>=0;r--)i.push(n[r].getData(e));else for(var r=0;r<n.length;r++)i.push(n[r].getData(e));return i},r.prototype.getHTML=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)i.push(e[n].getHTML(t));return i},r.prototype.getDroppables=function(t){for(var e=[],i=this.getSortedLayers(),n=0;n<i.length;n++)if(i[n]!=t){var r=i[n].getDroppable();"object"==typeof r&&e.push(r),"hidden"!=r&&i[n].container&&e.push.apply(e,i[n].container.getDroppables(t))}return e},r.prototype.getLLDroppables=function(t){var e=[],i=this.component.getLLDroppable(t);i&&e.push(i);for(var n=this.getSortedLayers(),r=0;r<n.length;r++)n[r].container&&n[r]!=t&&e.push.apply(e,n[r].container.getLLDroppables(t));return e},r}),N2Require("LayerDataStorage",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.isDeviceProp={},this.propertyScope={},this.property={},this.deviceProperty={desktopPortrait:{},desktopLandscape:{},tabletPortrait:{},tabletLandscape:{},mobilePortrait:{},mobileLandscape:{}}}return r.prototype.getMode=function(){return this.canvasManager.getMode()},r.prototype.getRawProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e];return i[t]!==n?i[t]:n}return this.property[t]},r.prototype.getProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e],n=this.deviceProperty.desktopPortrait;if("undefined"!=typeof i[t])return i[t];if("undefined"!=typeof n[t])return n[t]}return this.property[t]},r.prototype.historyStore=function(t,e,i){if(!this.isDeleteStarted){var n=this.getMode();this.isDeviceProp[e]&&i!=n?(this.deviceProperty[i][e]=t,this.render(e)):(this.store(e,t,!0,"history"),this.$.trigger("propertyChanged",[e,this.getProperty(e)]))}},r.prototype.store=function(t,e,n,r){var s,o,a=this.getMode();this.isDeviceProp[t]?(s=this.deviceProperty[a][t],o=this.getProperty(t)):o=s=this.property[t];var l=i.history.addValue(this,this.historyStore,[t,a]);l&&l.setValues(s,e),this.property[t]=e,this.isDeviceProp[t]&&(this.deviceProperty[a][t]=e),n&&this.render(t,o,r)},r.prototype.render=function(t,e,i){this.propertyScope[t]["_sync"+t](e,i)},r.prototype.isDimensionPropertyAccepted=function(t){return!(!(t+"").match(/[0-9]+%/)&&"auto"!=t)},r.prototype.changeEditorMode=function(t){var e=parseInt(this.property[t]);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.renderModeProperties(!1)},r.prototype.renderModeProperties=function(){for(var t in this.property)this.property[t]=this.getProperty(t),this.$.trigger("propertyChanged",[t,this.property[t]])},r.prototype.historyResetMode=function(e,i){this.deviceProperty[i]=t.extend({},e),i==this.canvasManager.getMode()&&this.renderModeProperties(!0)},r.prototype.resetMode=function(e){
|
4 |
-
if("desktopPortrait"!=e){var n,r=i.history.addValue(this,this.historyResetMode,[e]);r&&r.setValues(t.extend({},this.deviceProperty[e]),{});for(var s in this.deviceProperty[e])this.deviceProperty[e][s]=n;e==this.canvasManager.getMode()&&this.renderModeProperties(!0)}},r.prototype.copyMode=function(e,n){if(e!=n){var r=this.deviceProperty[n];this.deviceProperty[n]=t.extend({},this.deviceProperty[n],this.deviceProperty[e]);var s=i.history.addValue(this,this.historyResetMode,[n]);s&&s.setValues(r,this.deviceProperty[n])}},r.prototype._getDefault=function(t,e){return this.originalProperties[t]!==n?this.originalProperties[t]:e},r.prototype.createProperty=function(t,e,i,r){this.isDeviceProp[t]=!1,this.propertyScope[t]=r||this,i?(this.property[t]=i.data(t.toLowerCase()),this.property[t]===n&&(this.property[t]=this._getDefault(t,e))):this.property[t]=this._getDefault(t,e)},r.prototype.createDeviceProperty=function(t,e,i,r){if(this.isDeviceProp[t]=!0,this.propertyScope[t]=r||this,i){for(var s in this.deviceProperty)this.deviceProperty[s][t]=i.data(s.toLowerCase()+t.toLowerCase()),""===this.deviceProperty[s][t]&&(this.deviceProperty[s][t]=n);for(var s in this.deviceProperty)if(this.deviceProperty[s][t]===n||""===this.deviceProperty[s][t]){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}for(var s in e)this.deviceProperty[s][t]!==n&&""!==this.deviceProperty[s][t]||(this.deviceProperty[s][t]=e[s])}else{for(var s in e)this.deviceProperty[s][t]=e[s];for(var s in this.deviceProperty){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}}this.property[t]=this.deviceProperty.desktopPortrait[t]},r.prototype.removeProperty=function(t){if(delete this.property[t],this.layer.removeData(t.toLowerCase()).removeAttr("data-"+t.toLowerCase()),this.isDeviceProp[t])for(var e in this.deviceProperty)delete this.deviceProperty[e][t],this.layer.removeData(e.toLowerCase()+t.toLowerCase()).removeAttr("data-"+e.toLowerCase()+t.toLowerCase());delete this.isDeviceProp[t],delete this.propertyScope[t]},r.prototype.removeProperties=function(t){for(var e=0;e<t.length;e++)this.removeProperty(t[e])},r.prototype.getPropertiesData=function(t){for(var e={},i=0;i<t.length;i++){var r=t[i];if(this.property[r]!==n&&(e[r]=this.property[r]),this.isDeviceProp[r])for(var s in this.deviceProperty)this.deviceProperty[s][r]!==n&&(e[s.toLowerCase()+r]=this.deviceProperty[s][r])}return e},r.prototype.setProperty=function(t,e,i){this.propertyScope[t]!==n&&("function"==typeof this.propertyScope[t]["setProperty"+t]?this.propertyScope[t]["setProperty"+t](t,e,i):this._setProperty(t,e,i))},r.prototype._setProperty=function(t,e,i){this.store(t,e,!0,i),"manager"!=i&&this.$.trigger("propertyChanged",[t,this.getProperty(t)])},r}),N2Require("CanvasManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(n,r,s){this.mode="desktopPortrait",this.slideEditManager=n,this.isStatic=r,this.ready=t.Deferred(),this.shouldPreventActivationBubble=!1,this.$=t(this),i.canvasManager=this,this.$highlight=t('<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" />'),this.initSelectMode(),this.layerWindow=new e.LayerWindow(this),this.layerOptions=new e.ComponentSettings(this),this.ui=new e.CanvasUserInterface(this),this.mainContainer=new e.MainContainer(this),this.itemEditor=new e.ItemManager(this,s),this.mainContainer.lateInit(),this._initDeviceModeChange(),this.canvasSettings=new e.CanvasSettings(this),this.layerOptions.startFeatures(),this.hotkeys(),this.addContextMenu(),this.mainContainer.refreshHasLayers();var o=t("#n2-ss-editor-mode .n2-radio-option"),a=t.proxy(function(t){switch(this.updateEditorMode(t),t){case"content":o.eq(0).addClass("n2-active"),o.eq(1).removeClass("n2-active");break;case"canvas":o.eq(0).removeClass("n2-active"),o.eq(1).addClass("n2-active")}},this);if(this.mainContent&&this.mainContent.container.getLayerCount())a("content");else{var l=this.mainContainer.container.getSortedLayers();if(this.mainContent&&l.length>1||!this.mainContent&&l.length>0)a("canvas");else{var h=t.jStorage.get("editormode");h||(h="content",t.jStorage.set("editormode",h)),a(h)}}o.on("click",t.proxy(function(e){o.removeClass("n2-active");var i=t(e.currentTarget),n=i.data("mode");i.addClass("n2-active"),n!=this.currentEditorMode&&(this.updateEditorMode(n),t.jStorage.set("editormode",n))},this)),this.isMultiDrag=!1}var s={16:0,38:0,40:0,37:0,39:0},o={97:"left",98:"center",99:"right",100:"left",101:"center",102:"right",103:"left",104:"center",105:"right"},a={97:"bottom",98:"bottom",99:"bottom",100:"middle",101:"middle",102:"middle",103:"top",104:"top",105:"top"},l={OFF:0,ON:1,GROUP:2};return r.prototype.updateEditorMode=function(e){this.currentEditorMode=e,t("body").attr("data-editormode",this.currentEditorMode)},r.prototype.getMode=function(){return this.mode},r.prototype.getResponsiveRatio=function(t){return"h"==t?i.frontend.responsive.lastRatios.slideW:"v"==t?i.frontend.responsive.lastRatios.slideH:0},r.prototype.setMainContent=function(t){this.mainContent=t},r.prototype.isGroup=function(t){return!1},r.prototype.isRow=function(t){return t instanceof e.Row},r.prototype.isCol=function(t){return t instanceof e.Col},r.prototype.isLayer=function(t){return t instanceof e.Layer},r.prototype.isContent=function(t){return t instanceof e.Content},r.prototype._initDeviceModeChange=function(){var e=t("#layerresettodesktop").on("click",t.proxy(this.__onResetToDesktopClick,this));this.resetToDesktopTRElement=e.closest("tr"),this.resetToDesktopGlobalElement=t("#n2-ss-layer-reset-to-desktop").on("click",t.proxy(function(){"block"==this.resetToDesktopTRElement.css("display")&&e.trigger("click")},this));var n=t("#n2-ss-layer-show-on"),r={},s=i.frontend.responsive.parameters.deviceModes;for(var o in s)s[o]&&(r[o]=t('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-'+o+'"></i></div>').on("click",t.proxy(function(t){this.layerOptions.currentForm[t].data("field").onoff.trigger("click")},this,o)).appendTo(n));n.children().first().addClass("n2-first"),n.children().last().addClass("n2-last"),this.globalShowOnDeviceCB=function(t){"undefined"!=typeof r[t]&&r[t].toggleClass("n2-active",1==this.layerOptions.currentForm[t].val())},this.layerOptions.forms.global.desktopPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopPortrait")),this.layerOptions.forms.global.desktopLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopLandscape")),this.layerOptions.forms.global.tabletPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletPortrait")),this.layerOptions.forms.global.tabletLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletLandscape")),this.layerOptions.forms.global.mobilePortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobilePortrait")),this.layerOptions.forms.global.mobileLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobileLandscape")),t("#layershow").data("field").setAvailableDevices(s),t("#layergroup-show").data("field").setAvailableDevices(s),this.__onChangeDeviceOrientation(),i.frontend.sliderElement.on("SliderDeviceOrientation",t.proxy(function(){this.__onChangeDeviceOrientation()},this)),this.ready.resolve()},r.prototype.refreshMode=function(){this.__onChangeDeviceOrientation(),i.frontend.responsive.reTriggerSliderDeviceOrientation()},r.prototype.__onChangeDeviceOrientation=function(){this.mode=i.frontend.responsive.getNormalizedModeString(),this.resetToDesktopTRElement.css("display","desktopPortrait"==this.mode?"none":""),this.resetToDesktopGlobalElement.css("display","desktopPortrait"==this.mode?"none":""),this.mainContainer.container.changeEditorModes(this.mode)},r.prototype.__onResetToDesktopClick=function(){if(this.mainContainer.getSelectedLayer()){var t=this.getMode();this.mainContainer.getSelectedLayer().resetMode(t)}},r.prototype.copyOrResetMode=function(t){var e=this.getMode();"desktopPortrait"==e?"desktopPortrait"!=t&&this.mainContainer.container.resetModes(t):t==e?this.mainContainer.container.resetModes(t):this.mainContainer.container.copyModes(e,t)},r.prototype.getSnap=function(){return this.canvasSettings.get("n2-ss-snap-to-enabled")?t(this.isStatic?".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":".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"):!1},r.prototype.getHTML=function(){for(var e=t("<div></div>"),i=this.mainContainer.container.getAllLayers(),n=0;n<i.length;n++)e.append(i[n].getHTML(!0));return e.html()},r.prototype.getData=function(){return this.mainContainer.container.getData()},r.prototype.importLayers=function(e,i){var n=(this.mainContainer,t.extend(!0,[],e));i&&this.mainContainer.deleteLayers(),this._idTranslation={};for(var r=this.dataToLayers(n),s=0;s<r.length;s++)this.mainContainer.container.append(r[s]);if(this.refreshMode(),!this.mainContainer.getSelectedLayer()){var n=this.mainContainer.container.getSortedLayers();n.length>0&&n[0].activate()}},r.prototype.loadComponentWithNode=function(t,e,i,n){var r=t.container.append(e);return n&&this.refreshMode(),r},r.prototype.insertComponentWithNode=function(t,e,i,n,r){var s=t.container.insertAt(e,i);return r&&this.refreshMode(),s},r.prototype.fixActiveLayer=function(){var t=this.mainContainer.getSelectedLayer();(0==t||t.isDeleted)&&this.resetActiveLayer()},r.prototype.resetActiveLayer=function(){var t=this.mainContainer.container.getSortedLayers();t.length?t[t.length-1].activate():this.changeActiveLayer(null)},r.prototype.changeActiveLayer=function(e,i){var n=this.mainContainer.getSelectedLayer();n&&!n.isDeleted&&(n.$.off("propertyChanged.editor").off(".active"),n.deActivate()),this.mainContainer.activeLayer=e,i||this.exitSelectMode(),e&&(this.layerOptions.changeActiveComponent(e,e.type,e.placement.getType(),e.property),e.$.on({"propertyChanged.editor":t.proxy(this.layerOptions.onUpdateField,this.layerOptions),"placementChanged.active":t.proxy(function(t,i,n){this.layerOptions.changeActiveComponentPlacement(i,e.property)},this)})),this.$.trigger("activeLayerChanged")},r.prototype.highlight=function(t){this.$highlight.appendTo(t.layer)},r.prototype.deHighlight=function(t){this.$highlight.detach()},r.prototype["delete"]=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("delete")},r.prototype.duplicate=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("duplicate",[this.selectMode!=l.ON,!1])},r.prototype.copy=function(e){var i;if(e==n)if(1==this.selectMode)i=this.selectedLayers;else{var r=this.mainContainer.getSelectedLayer();r&&(i=this.isCol(r)||this.isContent(r)?r.container.getSortedLayers():[r])}else i=this.isCol(e)||this.isContent(e)?e.container.getSortedLayers():[e];var s=this.mainContainer.getLayerData(i);s.length&&t.jStorage.set("ss3layersclipboard",JSON.stringify(s))},r.prototype.paste=function(e){var i=t.jStorage.get("ss3layersclipboard");if(i){var r=JSON.parse(i);if(r.length){var s;s=e!==n&&e?this.isCol(e)||this.isContent(e)?e:e.group:this.mainContainer.getActiveGroup(),this.mainContainer.addLayers(r,s)}}},r.prototype.hasLayersOnClipboard=function(){return!!t.jStorage.get("ss3layersclipboard")},r.prototype.addContextMenu=function(){t("#n2-ss-0 .n2-ss-currently-edited-slide").nextendContextMenu({onShow:t.proxy(function(e,i){var n=t(e.target),r=n.closest(".n2-ss-layer"),s=r.data("layerObject");s||(s=this.mainContainer.getSelectedLayer()),s&&(this.isCol(s)||this.isContent(s)?i.addItem("Copy child layers","n2-i-copy",t.proxy(function(){this.copy(s)},this)):i.addItem("Copy layer","n2-i-copy",t.proxy(function(){this.selectMode==l.ON?this.copy():this.copy(s)},this))),this.hasLayersOnClipboard()&&i.addItem("Paste layer(s)","n2-i-paste",t.proxy(function(){this.paste(s)},this)),i.addItem("Copy slide","n2-i-copy",t.proxy(function(){this.slideEditManager.copySlide()},this)),this.slideEditManager.hasCopiedSlide()&&i.addItem("Paste slide","n2-i-paste",t.proxy(function(){this.slideEditManager.pasteSlide()},this))},this)})},r.prototype.initSelectMode=function(){this.selectMode=l.OFF,this.selectedLayers=[],t(".n2-ss-layer-list-top-bar .n2-button").on("mousedown",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"delete":this["delete"]();break;case"duplicate":this.duplicate();break;case"group":this.createGroupFromSelected();break;case"cancel":this.exitSelectMode()}},this))},r.prototype.startSelection=function(t){t?(this.selectMode==l.ON&&this.exitSelectMode(),this.changeSelectMode(l.GROUP)):this.changeSelectMode(l.ON)},r.prototype.changeSelectMode=function(e){var i=this.selectMode;i!=e&&(i==l.ON?t("#n2-admin").removeClass("n2-ss-select-layer-mode-on"):i==l.GROUP&&t("#n2-admin").removeClass("n2-ss-select-layer-mode-group"),this.selectMode=e,i==l.GROUP&&e==l.ON&&this.selectedLayers[0].activate(null,null,!0),e==l.OFF?t("#n2-admin").removeClass("n2-ss-select-layer-mode"):(t("#n2-admin").addClass("n2-ss-select-layer-mode"),e==l.ON?t("#n2-admin").addClass("n2-ss-select-layer-mode-on"):e==l.GROUP&&t("#n2-admin").addClass("n2-ss-select-layer-mode-group")),this.selectMode==l.OFF?t("body").off(".n2-ss-selection"):t("body").on("mousedown.n2-ss-selection",t.proxy(function(t){3!=event.which&&"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.exitSelectMode()},this)))},r.prototype.endSelection=function(t){t&&this.selectMode==l.GROUP&&this.exitSelectMode()},r.prototype.selectLayer=function(t,e){if("layer"!=t.type)return!0;if(this.selectMode!=l.ON){var i=this.mainContainer.getSelectedLayer();if("layer"!=i.type)return t.activate(null),!0;this.startSelection(!1),e&&this.selectedLayers.push(i)}return this._selectLayer(t),!0},r.prototype._selectLayer=function(e){var i=t.inArray(e,this.selectedLayers);if(-1!=i){if(this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.exitSelectMode(),!1;var n=this.selectedLayers[i];if(this.selectedLayers.splice(i,1),e.layerRow.removeClass("n2-selected"),e.layer.removeClass("n2-ss-layer-selected"),this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.selectedLayers[0].activate(),this.exitSelectMode(),!1;n===this.mainContainer.getSelectedLayer()&&this.selectedLayers[0].activate(!1,null,!0)}else{for(var r=this.selectedLayers.length,s=0;s<this.selectedLayers.length;s++)if(e.layer.add(this.selectedLayers[s].layer).index(this.selectedLayers[s].layer)>0){r=s;break}this.selectedLayers.splice(r,0,e)}for(var s=0;s<this.selectedLayers.length;s++)this.selectedLayers[s].layerRow.addClass("n2-selected"),this.selectedLayers[s].layer.addClass("n2-ss-layer-selected")},r.prototype.addSelection=function(t,e){e||this.changeSelectMode(l.ON);for(var i=0;i<t.length;i++)this._selectLayer(t[i],!1)},r.prototype.exitSelectMode=function(){if(this.selectMode){for(var e=0;e<this.selectedLayers.length;e++)this.selectedLayers[e]!=this.mainContainer.getSelectedLayer()&&this.selectedLayers[e].layerRow.removeClass("n2-active"),this.selectedLayers[e].layerRow.removeClass("n2-selected"),this.selectedLayers[e].layer.removeClass("n2-ss-layer-selected");t("#n2-admin").removeClass("n2-ss-select-layer-mode"),this.selectedLayers=[],this.changeSelectMode(l.OFF)}},r.prototype.doActionOnActiveLayer=function(e,i){if(this.selectMode==l.ON)for(var n=t.extend([],this.selectedLayers),r=0;r<n.length;r++)n[r][e].apply(n[r],i);else{var s=this.mainContainer.getSelectedLayer();s&&s[e].apply(s,i)}},r.prototype.canvasDragStart=function(t,e){if(this.selectMode&&"canvas"==this.currentEditorMode&&"absolute"==e.mode){for(var i=!1,n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n],s=r.layer;if(s[0]!=e.layer.layer[0]){var o=s.css("display");"none"==o&&s.css("display",""),r._originalPosition=s.position(),"none"==o&&s.css("display","none")}else i=!0}i||this.exitSelectMode(),this.isMultiDrag=!0}},r.prototype.canvasDragMove=function(t,e){if(this.isMultiDrag===!0)for(var i={left:e.position.left+e.canvasOffset.left-e.originalOffset.left,top:e.position.top+e.canvasOffset.top-e.originalOffset.top},n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n];if(!this.isGroup(r)){var s=r.layer;s[0]!=e.layer.layer[0]&&(s.css({left:r._originalPosition.left+i.left,top:r._originalPosition.top+i.top,bottom:"auto",right:"auto"}),r.placement.doAction("triggerLayerResized"))}}},r.prototype.canvasDragStop=function(t,e){if(this.isMultiDrag===!0){for(var i=0;i<this.selectedLayers.length;i++){var n=this.selectedLayers[i];if(!this.isGroup(n)){var r=n.layer;if(r[0]!=e.layer.layer[0]){var s=r.css("display");"none"==s&&r.css("display","block");var o=parseInt(n.layer.css("left")),a=parseInt(n.layer.css("top"));n.placement.current.setPosition(o,a),n.placement.doAction("triggerLayerResized"),"none"==s&&r.css("display","none")}}}return this.isMultiDrag=!1,!0}return!1},r.prototype.historyDeleteGroup=function(t){t.getSelf()["delete"]()},r.prototype.historyCreateGroup=function(t){var i=new e.Group(this,this.mainContainer,{},null);i.create(),t.setSelf(i)},r.prototype.createGroupFromSelected=function(){var t;switch(this.selectMode){case l.ON:t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers(this.selectedLayers),this.exitSelectMode(),t.activate();break;case l.OFF:var n=this.mainContainer.getSelectedLayer();n.group instanceof e.Group?n.group.activate():(t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers([n]),t.activate());break;case l.GROUP:}},r.prototype.createRow=function(t){var i=new e.Row(this,t,{});return i.create(),i.hightlightStructure(),{layer:i}},r.prototype.createCol=function(t){var e=t,i=null;if(this.isCol(e))i=e.group.createCol();else if(this.isRow(e))i=e.createCol();else{if(!this.isCol(e.group))return this.createRow(t);i=e.group.group.createCol()}return i.activate(null),{layer:i}},r.prototype.preventActivationBubbling=function(){return this.shouldPreventActivationBubble?!1:(this.shouldPreventActivationBubble=!0,!0)},r.prototype.allowActivation=function(){this.shouldPreventActivationBubble=!1},r.prototype.hotkeys=function(){t(window).on({keydown:t.proxy(function(e){if(!("TEXTAREA"==e.target.tagName||"INPUT"==e.target.tagName||i.layerAnimationManager&&i.layerAnimationManager.timelineControl&&i.layerAnimationManager.timelineControl.isActivated())){var n=this.mainContainer.getSelectedLayer(),r=e.keyCode;if(r>=49&&57>=r){var l=e.originalEvent.location||e.originalEvent.keyLocation||0;3==l&&(r+=48)}if(n)if(46==r||8==r)this["delete"](),e.preventDefault();else if(35==r)this.duplicate(),e.preventDefault();else if(16==r)s[r]=1;else if(38==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(40==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(37==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(39==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(r>=97&&105>=r){var d=o[r],c=a[r],p=!1;this.layerOptions.forms.placement.absolute.align.val()==d&&this.layerOptions.forms.placement.absolute.valign.val()==c&&(p=!0),this.layerOptions.layerFeatures.horizontalAlign(d,p),this.layerOptions.layerFeatures.verticalAlign(c,p)}else if(65==r){e.preventDefault();var u=this.mainContainer.getSelectedLayer();u&&"absolute"==u.placement.getType()&&u.placement.current.fit()}(e.ctrlKey||e.metaKey)&&(90==r?e.shiftKey?i.history.redo()&&e.preventDefault():i.history.undo()&&e.preventDefault():71==r?(this.createGroupFromSelected(),e.preventDefault()):68==r?(e.preventDefault(),this.slideEditManager.copySlide()):70==r?(e.preventDefault(),this.slideEditManager.pasteSlide()):67==r?this.copy():86==r&&this.paste())}},this),keyup:t.proxy(function(t){"undefined"!=typeof s[t.keyCode]&&s[t.keyCode]&&(clearInterval(s[t.keyCode]),s[t.keyCode]=0)},this)})},r.prototype.getSelf=function(){return this},r}),N2Require("CanvasUserInterface",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.isShown=!t.jStorage.get("ssLayersShown",!1),this.tlHeight=t.jStorage.get("ssLayersHeight")||200,this.$container=t("#n2-ss-layers"),this.fixScroll(),this.switchLayerList(),this.topBar=t(".n2-ss-layer-list-top-bar").on("mousedown",t.proxy(this.resizeStart,this)),this.topBar.find(".n2-ss-layer-list-opener").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),t(".n2-ss-slide-show-layers").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),this.onResize(),t(window).on("resize",t.proxy(this.onResize,this))}return r.prototype.onResize=function(){var t=this.$container.height();this.paneLeft.height(t-48),this.paneRight.height(t-48)},r.prototype.onActivateLayer=function(t){var e=this.paneLeft.scrollTop(),i=0,n=t;do i+=n.layerRow.get(0).offsetTop,n=n.group;while(n!==this.canvasManager.mainContainer);(e>i||i>e+this.paneLeft.height()-40)&&(this.paneLeft.scrollTop(i),this.paneRight.scrollTop(i))},r.prototype.fixScroll=function(){this.paneLeft=t(".n2-ss-layers-sidebar-rows"),this.paneRight=t(".n2-ss-timeline-content-layers-container");var e=t.proxy(function(t){var e=this.paneLeft.scrollTop();t.originalEvent.deltaY>0?e+=40:e-=40,e=40*Math.round(e/40),this.paneLeft.scrollTop(e),this.paneRight.scrollTop(e),t.preventDefault()},this);this.paneLeft.on("mousewheel",e),this.paneLeft.on("scroll",t.proxy(function(t){var e=this.paneLeft.scrollTop();this.paneRight.scrollTop(e),t.preventDefault()},this)),this.paneRight.on("mousewheel",e)},r.prototype.resizeStart=function(e){this.isShown&&(e.target==this.topBar[0]||t(e.target).hasClass("n2-h2"))&&(e.preventDefault(),this.startY=e.clientY,this.height=this.$container.height(),t("body").on({"mousemove.n2-ss-tl-resize":t.proxy(this.resizeMove,this),"mouseup.n2-ss-tl-resize":t.proxy(this.resizeStop,this),"mouseleave.n2-ss-tl-resize":t.proxy(this.resizeStop,this)}))},r.prototype.resizeMove=function(t){t.preventDefault(),this.setTLHeight(this._calculateDesiredHeight(t))},r.prototype.resizeStop=function(e){e.preventDefault(),t("body").off(".n2-ss-tl-resize");var i=this._calculateDesiredHeight(e);this.setTLHeight(i),this.tlHeight=i,t.jStorage.set("ssLayersHeight",i),t("#n2-admin").triggerHandler("resize")},r.prototype._calculateDesiredHeight=function(t){var e=this.startY-t.clientY+this.height-48;return this.__calculateDesiredHeight(e)},r.prototype.__calculateDesiredHeight=function(t){return 40*Math.round(Math.min(Math.max(40,t),(window.innerHeight||document.documentElement.clientHeight)/2)/40)+48},r.prototype.switchLayerList=function(){this.isShown=!this.isShown,this.$container.toggleClass("n2-active",this.isShown),this.isShown?this.setTLHeight(this.tlHeight):this.setTLHeight(48),t.jStorage.set("ssLayersShown",this.isShown)},r.prototype.setTLHeight=function(t){t=Math.max(48,t),this.$container.height(t),t=this.$container.height(),this.paneLeft.height(t-48),this.paneRight.height(t-48),nextend.triggerResize()},r.prototype.activateAdd=function(t,e){this.$add.css({left:t,top:e}).appendTo(this.$container)},r}),N2Require("LayerFeatures",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e){this.fields=t,this.canvasManager=e,this.initParentLinker(),this.initAlign(),this.initEvents()}var s={left:0,center:1,right:2,top:0,middle:1,bottom:2};return r.prototype.initParentLinker=function(){var e=this.fields.parentid.data("field");t("#n2-ss-layer-parent-linker").on({click:function(t){e.click(t)}})},r.prototype.initAlign=function(){this.layerDefault={align:null,valign:null};var e=t("#n2-ss-layer-horizontal-align .n2-radio-option"),i=t("#n2-ss-layer-vertical-align .n2-radio-option");e.add(i).on("click",t.proxy(function(n){if(n.ctrlKey||n.metaKey){var r=t(n.currentTarget),s=r.hasClass("n2-sub-active"),o=r.data("align");switch(o){case"left":case"center":case"right":e.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-horizontal-align",null),this.layerDefault.align=null):(t.jStorage.set("ss-item-horizontal-align",o),this.layerDefault.align=o,r.addClass("n2-sub-active"));break;case"top":case"middle":case"bottom":i.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-vertical-align",null),this.layerDefault.valign=null):(t.jStorage.set("ss-item-vertical-align",o),this.layerDefault.valign=o,r.addClass("n2-sub-active"))}}else if(this.canvasManager.mainContainer.getSelectedLayer()){var o=t(n.currentTarget).data("align");switch(o){case"left":case"center":case"right":this.horizontalAlign(o,!0);break;case"top":case"middle":case"bottom":this.verticalAlign(o,!0)}}},this)),this.fields.align.on("nextendChange",t.proxy(function(){switch(e.removeClass("n2-active"),this.fields.align.val()){case"left":e.eq(0).addClass("n2-active");break;case"center":e.eq(1).addClass("n2-active");break;case"right":e.eq(2).addClass("n2-active")}},this)),this.fields.valign.on("nextendChange",t.proxy(function(){switch(i.removeClass("n2-active"),this.fields.valign.val()){case"top":i.eq(0).addClass("n2-active");break;case"middle":i.eq(1).addClass("n2-active");break;case"bottom":i.eq(2).addClass("n2-active")}},this));var n=t.jStorage.get("ss-item-horizontal-align",null),r=t.jStorage.get("ss-item-vertical-align",null);null!=n&&(e.eq(s[n]).addClass("n2-sub-active"),this.layerDefault.align=n),null!=r&&(i.eq(s[r]).addClass("n2-sub-active"),this.layerDefault.valign=r)},r.prototype.horizontalAlign=function(t,e){this.fields.align.val()!=t?this.fields.align.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.left.val(0).trigger("change")},r.prototype.verticalAlign=function(t,e){this.fields.valign.val()!=t?this.fields.valign.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.top.val(0).trigger("change")},r.prototype.initEvents=function(){var e=t("#n2-tab-events"),i=e.find(".n2-h3"),n=i.html(),r=t('<div class="n2-editor-header n2-h2 n2-uc"><span>'+n+"</span></div>");i.replaceWith(r)},r}),N2Require("LayerWindow",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isMinimized=!1,this.detachedPosition={left:t.jStorage.get("ssPanelLeft")||200,top:t.jStorage.get("ssPanelTop")||100,height:t.jStorage.get("ssPanelHeight")||400},this.hasBreadcrumb=!1,this.lastHeight=this.detachedPosition.height,this.admin=t("#n2-admin"),this.sidebar=t("#n2-ss-layer-window").on("mousedown",t.proxy(nextend.context.setMouseDownArea,nextend.context,"sidebarClicked")),this.title=this.sidebar.find(".n2-ss-layer-window-title-inner"),this.sidebarTD=this.sidebar.parent(),this.canvasManager=e,i.layerWindow=this,this.viewPanes={layerEdit:t("#n2-tabbed-slide-editor-settings > .n2-tabs").addClass("n2-scrollable")};for(var n in this.viewPanes)this.viewPanes[n].on("DOMMouseScroll mousewheel",function(e){var i=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(i=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(i=e.originalEvent.deltaY<0),e.originalEvent.detail&&(i=e.originalEvent.detail<0));var n=function(){return e.stopPropagation(),e.preventDefault(),e.returnValue=!1,!1};return!i&&this.scrollHeight<=t(this).innerHeight()+this.scrollTop+1?n():i&&0>=this.scrollTop-1?n():void 0});this.panelHeading=t("#n2-tabbed-slide-editor-settings").find(".n2-sidebar-tab-switcher .n2-td");var r=this.sidebar.find(".n2-ss-layer-window-title-nav-left");t('<a href="#"><i class="n2-i n2-i-minimize n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.toggleMinimize()},this)).appendTo(r);var s=this.sidebar.find(".n2-ss-layer-window-title-nav-right");t('<a href="#"><i class="n2-i n2-i-closewindow n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.hide()},this)).appendTo(s),nextend.tooltip.add(s),this.$breadcrumb=t('<div class="n2-ss-layer-window-breadcrumb"></div>').insertAfter("#n2-tabbed-slide-editor-settings > .n2-sidebar-tab-switcher");var o=t("#n2-ss-add-sidebar");t(".n2-ss-add-layer-button").on("click",function(e){e.preventDefault(),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(0).trigger("click"),o.toggleClass("n2-active")}),t(".n2-ss-core-item").on("click",function(t){o.removeClass("n2-active")});var a=t("#wpadminbar, .navbar-fixed-top").height()+t(".n2-top-bar").height();this.$verticalBarInner=t(".n2-ss-add-sidebar-inner").each(function(){var e=t(this);e.fixTo(e.parent(),{top:a})}),this.$resizeInnerContainer=t("#n2-ss-layers-switcher_0, #n2-ss-layers-switcher_1"),this.extraHeightToRemove=60,this.$resizeInnerContainer.length||(this.extraHeightToRemove=0,this.$resizeInnerContainer=this.$verticalBarInner),this.$resizeInnerContainer.css("overflow","auto"),this.detach(),t("#n2-admin").on("resize",t.proxy(this.resizeVerticalBar,this)),t(window).on("resize",t.proxy(this.onResize,this)),t(".n2-ss-slide-duplicate-layer").on("click",t.proxy(function(t){t.preventDefault(),this.duplicate()},this.canvasManager)),t(".n2-ss-slide-delete-layer").on("click",t.proxy(function(t){t.preventDefault(),this["delete"]()},this.canvasManager)),t("body").on("mousedown",t.proxy(function(t){"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.hide()},this));var l=t('<div id="n2-ss-devicespecific-settings"></div>'),h=nextend.smartSlider.frontend.responsive.parameters.deviceModes;for(var n in h)if(h[n]){var d=n.replace(/([A-Z])/g," $1").split(" "),c=d[0],p=d[1].toLowerCase();l.append('<i class="n2-i n2-it n2-i-mini-'+c+"-"+p+'" data-device="'+c+'" data-orientation="'+p+'"></i>')}var u={mouseenter:t.proxy(function(t){l.appendTo(t.currentTarget)},this),mouseleave:t.proxy(function(t){l.detach()},this)};this.sidebar.find("[data-devicespecific] label").prepend('<span class="n2-i n2-i-mini-desktop-portrait"></span>'),this.sidebar.find("[data-devicespecific] label").on(u),l.find(".n2-i").on({click:t.proxy(function(e){e.preventDefault();var i=t(e.currentTarget);t("#n2-ss-devices").find('[data-device="'+i.data("device")+'"][data-orientation="'+i.data("orientation")+'"]').trigger("click")},this)})}return r.prototype.toggleMinimize=function(){this.isMinimized=!this.isMinimized,this.sidebar.toggleClass("n2-ss-layer-window-minized",this.isMinimized),this.isMinimized||this.onResize()},r.prototype.show=function(e,i){this.setTitle(e),t("body").addClass("n2-ss-layer-edit-visible")},r.prototype._show=function(){t("body").addClass("n2-ss-layer-edit-visible")},r.prototype.hide=function(){t("body").removeClass("n2-ss-layer-edit-visible")},r.prototype.isVisible=function(){return t("body").hasClass("n2-ss-layer-edit-visible")},r.prototype.hideWithDeferred=function(e){t("body").hasClass("n2-ss-layer-edit-visible")&&(this.hide(),e.done(t.proxy(this._show,this)))},r.prototype.setTitle=function(t){this.title.html(t.getName()),this.updateGroupTitle(t)},r.prototype.updateGroupTitle=function(e){var i;for(this.$breadcrumb.html(""),i=0;5>i&&(t('<span class="n2-window-title-structure-nav"><span>'+e.label+'</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},e),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},e),click:t.proxy(function(t){this.canvasManager.deHighlight(this),this.activate(t)},e)}).prependTo(this.$breadcrumb),e.group&&e.group!==this.canvasManager.mainContainer);i++)e=e.group;this.hasBreadcrumb=i>0,this.$breadcrumb.toggleClass("n2-has-breadcrumb",this.hasBreadcrumb),this.onResize()},r.prototype.getLayerEditExcludedHeight=function(){
|
5 |
-
return 85+(this.hasBreadcrumb?23:0)},r.prototype.resizeVerticalBar=function(){this.$resizeInnerContainer.height((window.innerHeight||document.documentElement.clientHeight)-(t("#n2-ss-layers").is(":visible")&&t("#n2-ss-layers").hasClass("n2-active")?t("#n2-ss-layers").height():0)-t("#wpadminbar, .navbar-fixed-top").height()-t(".n2-top-bar").height()-this.extraHeightToRemove)},r.prototype.onResize=function(){this.sidebar.css("display","block"),this.resizeVerticalBar();var t=window.innerHeight||document.documentElement.clientHeight,e=this.sidebar.height()-this.getLayerEditExcludedHeight();this.viewPanes.layerEdit.height(e);var i={},n=window.innerWidth||document.documentElement.clientWidth,r=this.sidebar[0].getBoundingClientRect();r.left<0?i.left=0:r.left+r.width>n&&(i.left=Math.max(0,n-r.width)),r.height>t-r.top&&(i.top=t-r.top-r.height+r.top,i.top<0&&(this.lastHeight=i.height=r.height+i.top,i.top=0)),this.sidebar.css(i),this.sidebar.css("display","")},r.prototype.detach=function(){this.sidebar.css(this.detachedPosition),this.sidebar.appendTo(this.admin),this.admin.addClass("n2-sidebar-hidden"),t(window).off(".n2-ss-panel"),this.sidebar.removeClass("n2-sidebar-fixed"),this.sidebar.draggable({distance:5,handle:".n2-ss-layer-window-title",containment:"window",stop:t.proxy(function(e,i){this.sidebar.css("height",this.lastHeight);var n=this.sidebar[0].getBoundingClientRect();this.detachedPosition.left=n.left,this.detachedPosition.top=n.top,t.jStorage.set("ssPanelLeft",n.left),t.jStorage.set("ssPanelTop",n.top)},this),scroll:!1}).resizable({distance:5,handles:"s",stop:t.proxy(function(e,i){this.lastHeight=this.detachedPosition.height=this.sidebar.height(),t.jStorage.set("ssPanelHeight",this.detachedPosition.height)},this),create:t.proxy(function(e,i){t(e.target).find(".ui-resizable-handle").addClass("n2-ss-layer-window-resizer")},this)}),this.onResize(),nextend.triggerResize()},r.prototype.switchTab=function(t){this.panelHeading.filter('[data-tab="'+t+'"]').trigger("click")},r}),N2Require("PositionDisplay",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.currentSource="",t(window).ready(t.proxy(this.ready,this))}return r.prototype.ready=function(){this.$body=t("body"),this.$el=t('<div class="n2 n2-ss-position-display"/>').appendTo("body")},r.prototype.show=function(t){""==this.currentSource&&(this.currentSource=t,this.$el.addClass("n2-active"),this.$body.addClass("n2-position-display-active"))},r.prototype.update=function(t,e,i){this.currentSource==e&&this.$el.html(i).css({left:t.pageX+10,top:t.pageY+10})},r.prototype.hide=function(t){this.currentSource!=t&&t!==n||(this.$body.removeClass("n2-position-display-active"),this.$el.removeClass("n2-active"),this.currentSource="")},i.positionDisplay=new r,r}),N2Require("Ruler",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.showGuides=1,this.guides=[],this.container=t('<div class="n2-ruler-container" />').appendTo("#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container"),this.scale=10,this.vertical=t('<div class="n2-ruler n2-ruler-vertical unselectable"></div>').appendTo(".n2-ss-slider-real-container"),this.horizontal=t('<div class="n2-ruler n2-ruler-horizontal unselectable"></div>').appendTo(this.container),this.verticalSpans=t(),this.horizontalSpans=t(),this.onResize(),nextend.smartSlider.frontend.sliderElement.on("SliderResize",t.proxy(this.onSliderResize,this)),t(window).on("resize",t.proxy(this.onResize,this)),this.horizontal.on("mousedown",t.proxy(function(t){this.showGuides&&new o(this,this.horizontal,t)},this)),this.vertical.on("mousedown",t.proxy(function(t){this.showGuides&&new a(this,this.vertical,t)},this));try{e=t.extend({vertical:[],horizontal:[]},JSON.parse(Base64.decode(e)));for(var i=0;i<e.horizontal.length;i++){var n=new o(this,this.horizontal);n.setPosition(e.horizontal[i])}for(var i=0;i<e.vertical.length;i++){var n=new a(this,this.vertical);n.setPosition(e.vertical[i])}}catch(r){}nextend.ruler=this,this.measureToolVertical(),this.measureToolHorizontal()}function s(e,i,n){this.ruler=e,this.container=i,this.position=0,this.guide=t('<div class="n2-ruler-guide n2-ruler-user-guide"><div class="n2-ruler-guide-border"></div><div class="n2-ruler-guide-handle"></div></div>').appendTo(i).on("mousedown",t.proxy(function(t){t.preventDefault(),t.stopPropagation(),nextend.smartSlider.canvasManager.canvasSettings.settings["n2-ss-lock-guides"]||this["delete"]()},this)),this.ruler.addGuide(this),n&&this.create(n)}function o(){s.prototype.constructor.apply(this,arguments)}function a(){s.prototype.constructor.apply(this,arguments)}return r.prototype.addGuide=function(t){this.guides.push(t)},r.prototype.removeGuide=function(e){this.guides.splice(t.inArray(e,this.guides),1)},r.prototype.clearGuides=function(){for(var t=this.guides.length-1;t>=0;t--)this.guides[t]["delete"]()},r.prototype.onSliderResize=function(t,e){this.onResize()},r.prototype.onResize=function(){var e=nextend.smartSlider.frontend.responsive.responsiveDimensions,i=Math.max(e.slider.width,t("#n2-ss-slide-canvas-container").outerWidth(!0)-40),n=Math.max(e.slider.height,t("#n2-ss-slide-canvas-container").outerHeight(!0));this.container.css({width:i+40,height:n+40});for(var r=this.horizontalSpans.length-3;r<i/this.scale;r++){var s=t("<span />").appendTo(this.horizontal);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.horizontalSpans=this.horizontalSpans.add(s)}for(var r=this.verticalSpans.length-3;r<n/this.scale;r++){var s=t("<span />").appendTo(this.vertical);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.verticalSpans=this.verticalSpans.add(s)}},r.prototype.toArray=function(){for(var t={horizontal:[],vertical:[]},e=0;e<this.guides.length;e++)this.guides[e]instanceof o?t.horizontal.push(this.guides[e].position):this.guides[e]instanceof a&&t.vertical.push(this.guides[e].position);return t},r.prototype.measureToolVertical=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.vertical),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.vertical.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.vertical.offset().top);r(),this.vertical.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageY){var l=n.pageY-a;e.css("top",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageY}},this))}},this),mouseleave:t.proxy(function(){this.vertical.off(".n2-ruler-measure-tool"),s()},this)})},r.prototype.measureToolHorizontal=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.horizontal),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.horizontal.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.horizontal.offset().left);r(),this.horizontal.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageX){var l=Math.max(n.pageX-a,40);e.css("left",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageX}},this))}},this),mouseleave:t.proxy(function(){this.horizontal.off(".n2-ruler-measure-tool"),s()},this)})},s.prototype._position=function(t,e){return Math.max(0,t)},s.prototype.setPosition=function(t){this.position=t,this.refresh()},s.prototype.refresh=function(){this.positionRender(this.position)},s.prototype["delete"]=function(){this.ruler.removeGuide(this),this.guide.remove()},o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.prototype.create=function(t){var e=Math.round(this.container.offset().left)+40;this.position=this._position(t.pageX-e,t),this.positionRender(this.position)},o.prototype.rawPositionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},o.prototype.positionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.create=function(t){var e=Math.round(this.container.offset().top)+40;this.position=this._position(t.pageY-e,t),this.positionRender(this.position)},a.prototype.rawPositionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},a.prototype.positionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},r}),N2Require("CanvasSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.settings={};var i=t("#n2-ss-slide-canvas-settings").on("mouseleave",t.proxy(function(){i.removeClass("n2-active")},this));i.find("> a").on("click",function(t){t.preventDefault(),i.toggleClass("n2-active")}),this.$settingsPanel=i.find(".n2-ss-settings-panel-inner"),this.snapTo(),this.roundTo(),this.colorScheme(),this.canvasManager.slideEditManager.options.isAddSample||this.ruler()}return r.prototype._addSettings=function(e,i,n,r){this.settings[e]=parseInt(t.jStorage.get(e,n));var s=t('<a href="">'+i+'<span class="n2-setting-tick"><i class="n2-i n2-it n2-i-tick2"></i></span></a>').on("click",t.proxy(function(i){i.preventDefault(),this.settings[e]=1==this.settings[e]?0:1,t.jStorage.set(e,this.settings[e]),s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!1)},this)).appendTo(this.$settingsPanel);s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!0)},r.prototype._addAction=function(e,i){t('<a href="" class="n2-panel-action">'+e+"</a>").on("click",t.proxy(function(t){t.preventDefault(),i()},this)).appendTo(this.$settingsPanel)},r.prototype.get=function(t){return this.settings[t]},r.prototype.snapTo=function(){this._addSettings("n2-ss-snap-to-enabled",n2_("Smart Snap"),1,t.proxy(function(t){for(var e=this.mainContainer.container.getSortedLayers(),i=0;i<e.length;i++)e[i].placement.doAction("snap")},this.canvasManager))},r.prototype.roundTo=function(){this._addSettings("n2-ss-round-to-enabled",n2_("Round to 5px"),1,function(t){1==t?nextend.roundTo=5:nextend.roundTo=1})},r.prototype.colorScheme=function(){var e=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-theme-dark",n2_("Dark Mode"),0,function(t){e.toggleClass("n2-ss-theme-dark",1==t)})},r.prototype.ruler=function(){i.ruler=new e.Ruler(t("#slideguides").val());var n=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-ruler-enabled",n2_("Ruler"),1,t.proxy(function(t){n.toggleClass("n2-ss-has-ruler",1==t),nextend.triggerResize()},this)),this._addSettings("n2-ss-show-guides",n2_("Show Guides"),1,t.proxy(function(t){nextend.ruler.showGuides=t,n.toggleClass("n2-ss-show-guides",1==t)},this)),this._addSettings("n2-ss-lock-guides",n2_("Lock Guides"),0,t.proxy(function(t){n.toggleClass("n2-ss-lock-guides",1==t)},this)),this._addAction("Clear Guides",t.proxy(function(){nextend.ruler.clearGuides()},this))},r}),N2Require("PlacementAbsolute",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="absolute",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments),this.doThrottledTheResize=this.doTheResize,this._triggerLayerResizedThrottled=NextendThrottle(this._triggerLayerResized,30),this.parentIsVisible=!0,this.children=[]}var s=function(){var t=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){var i,n=(new Date).getTime();return i=Math.max(0,16-(n-t)),t=n+i,setTimeout(function(){e(n+i)},i)}}(),o={raf:!1,ratios:null,isThrottled:!1,layers:[]},a=function(){o.raf===!1&&(o.raf=!0,s(function(){for(var t=0;t<o.layers.length;t++)o.layers[t].isDeleted||o.layers[t].doTheResize(o.ratios,!0,o.isThrottled);o={raf:!1,ratios:null,isThrottled:!1,layers:[]}}))};return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer,this.$layerRow=this.layer.layerRow},r.prototype.preActivation=function(t){if("normal"==t.type){var e=this.layer.getProperty("height");e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);n.length>0?this.activatedAfterParentReady(e):setTimeout(t.proxy(function(){this.activatedAfterParentReady(e)},this),300)}else this._activated(e)},r.prototype.activatedAfterParentReady=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);if(n.length>0){var r=n.data("layerObject");r?r.readyDeferred.done(t.proxy(this._activated,this,e)):n.on("layerStarted",t.proxy(function(i,n){n.readyDeferred.done(t.proxy(this._activated,this,e))},this))}else this.$layer.data("parentid",""),this._activated(e)}else this._activated(e)},r.prototype._activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.$layer.css("zIndex",""),this.___makeLayerAlign(),this.___makeLayerResizeable()},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""});for(var i=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[a+s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){var e=this.layer.getProperty("parentid");e&&""!=e&&(this.$layer.removeAttr("data-parentid"),this.unSubscribeParent()),this.$layer.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""}),this.alignMarker.remove(),this.$layer.nextendResizable("destroy"),this.$layer.off(".n2-ss-absolute"),this.$layer.triggerHandler("LayerUnavailable");var i=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],n=this.layer.getPropertiesData(i);return this.layer.removeProperties(i),this.chainParent.remove(),n},r.prototype.loadProperties=function(e){this.layer.createProperty("parentid",null,this.layer.layer,this),this.layer.createProperty("responsiveposition",1,this.layer.layer,this),this.layer.createProperty("responsivesize",1,this.layer.layer,this),this.layer.createDeviceProperty("parentalign",{desktopPortrait:"center"},this.layer.layer,this),this.layer.createDeviceProperty("parentvalign",{desktopPortrait:"middle"},this.layer.layer,this),this.layer.createDeviceProperty("align",{desktopPortrait:e.align||"center"},this.layer.layer,this),this.layer.createDeviceProperty("valign",{desktopPortrait:e.valign||"middle"},this.layer.layer,this),this.layer.createDeviceProperty("left",{desktopPortrait:e.left||0},this.layer.layer,this),this.layer.createDeviceProperty("top",{desktopPortrait:e.top||0},this.layer.layer,this),this.layer.createDeviceProperty("width",{desktopPortrait:e.width||"auto"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:e.height||"auto"},this.layer.layer,this);var i=this.layer.layer;this.subscribeParentCallbacks={},this.layer.getProperty("parentid")&&this.subscribeParent(),i.attr({"data-align":this.layer.getProperty("align"),"data-valign":this.layer.getProperty("valign")});var n=null;this.chainParent=t('<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({click:t.proxy(this.unlink,this),mouseenter:t.proxy(function(){n=t("#"+this.layer.getProperty("parentid")).addClass("n2-highlight")},this),mouseleave:t.proxy(function(){n&&(n.removeClass("n2-highlight"),n=null)},this)}).appendTo(this.$layer)},r.prototype.triggerLayerResized=function(t,e){t?this._triggerLayerResized(t,e):this._triggerLayerResizedThrottled(!0,e)},r.prototype._triggerLayerResized=function(t,e){this.layer.isDeleted||this.$layer.triggerHandler("LayerResized",[e||{slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t||!1])},r.prototype.___makeLayerAlign=function(){this.alignMarker=t('<div class="n2-ss-layer-cc" />').appendTo(this.$layer)},r.prototype.___makeLayerResizeable=function(){this._resizableJustClick=!1,this.$layer.nextendResizable({handles:"n, e, s, w, ne, se, sw, nw",_containment:this.canvasManager.mainContainer.layer,start:t.proxy(this.____makeLayerResizeableStart,this),resize:t.proxy(this.____makeLayerResizeableResize,this),stop:t.proxy(this.____makeLayerResizeableStop,this),create:t.proxy(function(){this.$layer.find(".ui-resizable-handle, .n2-ss-layer-cc").on({mousedown:t.proxy(function(t){this._resizableJustClick=[t.clientX,t.clientY]},this),mouseup:t.proxy(function(e){if(this._resizableJustClick&&Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0]-e.clientX,2)+Math.pow(this._resizableJustClick[1]-e.clientY,2)))<1){var i=t(e.currentTarget),n=this.canvasManager.layerOptions.layerFeatures;i.hasClass("ui-resizable-nw")?(n.horizontalAlign("left",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-w")?(n.horizontalAlign("left",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-sw")?(n.horizontalAlign("left",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-n")?(n.horizontalAlign("center",!1),n.verticalAlign("top",!1)):i.hasClass("n2-ss-layer-cc")?(n.horizontalAlign("center",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-s")?(n.horizontalAlign("center",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-ne")?(n.horizontalAlign("right",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-e")?(n.horizontalAlign("right",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-se")&&(n.horizontalAlign("right",!1),n.verticalAlign("bottom",!1))}this._resizableJustClick=!1},this)})},this),smartguides:t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),tolerance:5}).on({"mousedown.n2-ss-absolute":t.proxy(function(t){!this.layer.status!=e.ComponentAbstract.STATUS.LOCKED&&(i.positionDisplay.show("Canvas"),i.positionDisplay.update(t,"Canvas","W: "+parseInt(this.$layer.width())+"px<br />H: "+parseInt(this.$layer.height())+"px")),document.activeElement&&document.activeElement.blur()},this),"mouseup.n2-ss-absolute":t.proxy(function(t){i.positionDisplay.hide("Canvas")},this)})},r.prototype.____makeLayerResizeableStart=function(e,n){this.preventActivation=!0,this.resizableDeferred=t.Deferred(),this.canvasManager.layerWindow.hideWithDeferred(this.resizableDeferred),t("body").addClass("n2-ss-resize-layer"),this._resizableJustClick&&(this._resizableJustClick=!1),this.____makeLayerResizeableResize(e,n),i.positionDisplay.show("Canvas")},r.prototype.____makeLayerResizeableResize=function(t,e){i.positionDisplay.update(t,"Canvas","W: "+e.size.width+"px<br />H: "+e.size.height+"px"),this.triggerLayerResized()},r.prototype.____makeLayerResizeableStop=function(e,n){t("body").removeClass("n2-ss-resize-layer"),this.resizableDeferred.resolve();var r=!1;if("n"==n.axis||"s"==n.axis||n.originalSize.width==n.size.width){var s=this.layer.getProperty("width");this.layer.isDimensionPropertyAccepted(s)&&(r=!0,this._syncwidth())}var o=!1;if("e"==n.axis||"w"==n.axis||n.originalSize.height==n.size.height){var s=this.layer.getProperty("height");this.layer.isDimensionPropertyAccepted(s)&&(o=!0,this._syncheight())}var a=this.canvasManager.getResponsiveRatio("h"),l=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsivesize"))||(a=l=1);var h=null;r||(h=Math.round(n.size.width*(1/a)));var d=null;o||(d=Math.round(n.size.height*(1/l))),this._setPosition(null,null,n.position.left,n.position.top,h,d,!0),this.triggerLayerResized(),this.$layer.triggerHandler("LayerUnParent"),i.positionDisplay.hide("Canvas"),setTimeout(t.proxy(function(){this.preventActivation=!1},this),80)},r.prototype._setPosition=function(t,e,n,r,s,o,a){var l=this.layer.getMode();null===t&&(t=this.layer.getProperty("align")),null===e&&(e=this.layer.getProperty("valign")),null===n?n=this.layer.getProperty("left"):a&&(n=this.calculatePositionLeft(t,n)),null===r?r=this.layer.getProperty("top"):a&&(r=this.calculatePositionTop(e,r)),null===s&&(s=this.layer.getProperty("width")),null===o&&(o=this.layer.getProperty("height"));var h=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStorePosition",l]);h&&h.setValues({align:this.layer.getRawProperty("align"),valign:this.layer.getRawProperty("valign"),left:this.layer.getRawProperty("left"),top:this.layer.getRawProperty("top"),width:this.layer.getRawProperty("width"),height:this.layer.getRawProperty("height")},{align:t,valign:e,left:n,top:r,width:s,height:o}),i.history.off(),this.layer.store("width",s,!0,"layer"),this.layer.$.trigger("propertyChanged",["width",s]),this.layer.store("height",o,!0,"layer"),this.layer.$.trigger("propertyChanged",["height",o]),this.layer.store("align",t,!0,"layer"),this.layer.$.trigger("propertyChanged",["align",t]),this.layer.store("valign",e,!0,"layer"),this.layer.$.trigger("propertyChanged",["valign",e]),this.layer.store("left",n,!0,"layer"),this.layer.$.trigger("propertyChanged",["left",n]),this.layer.store("top",r,!0,"layer"),this.layer.$.trigger("propertyChanged",["top",r]),i.history.on()},r.prototype.historyStorePosition=function(t,e){this.layer.historyStore(t.align,"align",e),this.layer.historyStore(t.valign,"valign",e),this.layer.historyStore(t.width,"width",e),this.layer.historyStore(t.height,"height",e),this.layer.historyStore(t.left,"left",e),this.layer.historyStore(t.top,"top",e),this.triggerLayerResized()},r.prototype.calculatePositionLeft=function(t,e){var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={left:0,leftMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentalign")){case"right":r.left=s.left+n.width();break;case"center":r.left=s.left+n.width()/2;break;default:r.left=s.left}}else switch(n=this.$layer.parent(),t){case"center":r.left+=n.width()/2;break;case"right":r.left+=n.width()}var e;switch(t){case"left":e=-Math.round((r.left-e)*(1/i));break;case"center":e=-Math.round((r.left-e-this.$layer.width()/2)*(1/i));break;case"right":e=-Math.round((r.left-e-this.$layer.width())*(1/i))}return e},r.prototype.calculatePositionTop=function(t,e){var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={top:0,topMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentvalign")){case"bottom":r.top=s.top+n.height();break;case"middle":r.top=s.top+n.height()/2;break;default:r.top=s.top}}else switch(n=this.$layer.parent(),t){case"middle":r.top+=n.height()/2;break;case"bottom":r.top+=n.height()}var e;switch(t){case"top":e=-Math.round((r.top-e)*(1/i));break;case"middle":e=-Math.round((r.top-e-this.$layer.height()/2)*(1/i));break;case"bottom":e=-Math.round((r.top-e-this.$layer.height())*(1/i))}return e},r.prototype.moveX=function(t){this._setPosition(null,null,this.layer.getProperty("left")+t,null,null,null,!1)},r.prototype.moveY=function(t){this._setPosition(null,null,null,this.layer.getProperty("top")+t,null,null,!1)},r.prototype.setPositionLeft=function(t){t=this.calculatePositionLeft(this.layer.getProperty("align"),t),this.layer.store("left",t,!0),this.layer.$.trigger("propertyChanged",["left",t])},r.prototype.setPositionTop=function(t){t=this.calculatePositionTop(this.layer.getProperty("valign"),t),this.layer.store("top",t,!0),this.layer.$.trigger("propertyChanged",["top",t])},r.prototype.setPosition=function(t,e){this.setPositionLeft(t),this.setPositionTop(e)},r.prototype.setDeviceBasedAlign=function(){var t=this.layer.getMode();"undefined"==typeof this.layer.deviceProperty[t].align&&this.layer.setProperty("align",this.layer.getProperty("align"),"layer"),"undefined"==typeof this.layer.deviceProperty[t].valign&&this.layer.setProperty("valign",this.layer.getProperty("valign"),"layer")},r.prototype.setPropertyresponsiveposition=r.prototype.setPropertyresponsivesize=function(t,e,i){this.layer._setProperty(t,parseInt(e),i)},r.prototype.setPropertywidth=r.prototype.setPropertyheight=function(e,i,n){var r=i;this.layer.isDimensionPropertyAccepted(i)||(r=~~i,r!=i&&this.layer.$.trigger("propertyChanged",[e,r])),setTimeout(t.proxy(function(){this.onResize(!1)},this),50),this.layer._setProperty(e,r,n)},r.prototype.setPropertyleft=r.prototype.setPropertytop=function(t,e,i){var n=~~e;n!=e&&this.layer.$.trigger("propertyChanged",[t,n]),this.layer._setProperty(t,n,i)},r.prototype.render=function(t){this["_sync"+t]()},r.prototype.renderWithModifier=function(t,e,i){try{"width"!=t&&"height"!=t||!this.layer.isDimensionPropertyAccepted(e)?this["_sync"+t](Math.round(e*i)):this["_sync"+t](e)}catch(n){console.error("_sync"+t)}},r.prototype.onResize=function(t){this.resize({slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t)},r.prototype.resize=function(t,e){this.parent&&!e||this.addToResizeCollection(this,t,!1)},r.prototype.addToResizeCollection=function(t,e,i){o.ratios=e,o.isThrottled=i;for(var n=0;n<o.layers.length;n++)if(o.layers[n]==this){o.layers.splice(n,1);break}o.layers.push(t),a(),this.triggerLayerResized(i,e)},r.prototype._syncresponsiveposition=function(){this.onResize(!1)},r.prototype._syncwidth=function(){var t=this.layer.getProperty("width");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}t+="px"}this.$layer.css("width",t)},r.prototype._syncheight=function(){var t=this.layer.getProperty("height");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}t+="px"}this.$layer.css("height",t)},r.prototype._syncparentalign=function(){var t=this.layer.getProperty("parentalign");this.$layer.data("parentalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncparentvalign=function(){var t=this.layer.getProperty("parentvalign");this.$layer.data("parentvalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncleft=function(){var t=this.layer.getProperty("left");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("align"),r=this.layer.getProperty("parentalign"),s=0;switch(r){case"right":s=i.left+this.parent.width();break;case"center":s=i.left+this.parent.width()/2;break;default:s=i.left}switch(n){case"right":this.$layer.css({left:"auto",right:this.$layer.parent().width()-s-t+"px"});break;case"center":this.$layer.css({left:s+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:s+t+"px",right:"auto"})}}else switch(this.layer.getProperty("align")){case"right":this.$layer.css({left:"auto",right:-t+"px"});break;case"center":this.$layer.css({left:this.$layer.parent().width()/2+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:t+"px",right:"auto"})}this.triggerLayerResized()},r.prototype._synctop=function(){var t=this.layer.getProperty("top");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("valign"),r=this.layer.getProperty("parentvalign"),s=0;switch(r){case"bottom":s=i.top+this.parent.height();break;case"middle":s=i.top+this.parent.height()/2;break;default:s=i.top}switch(n){case"bottom":this.$layer.css({top:"auto",bottom:this.$layer.parent().height()-s-t+"px"});break;case"middle":this.$layer.css({top:s+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:s+t+"px",bottom:"auto"})}}else switch(this.layer.getProperty("valign")){case"bottom":this.$layer.css({top:"auto",bottom:-t+"px"});break;case"middle":this.$layer.css({top:this.$layer.parent().height()/2+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:t+"px",bottom:"auto"})}this.triggerLayerResized()},r.prototype._syncresponsivesize=function(){this.onResize(!1)},r.prototype.historyStoreDoubleProp=function(t,e,i,n){var r=this.layer.getMode();e==r?(this.layer._setProperty(i,t.value,"history"),this.layer._setProperty(n,t.value2,"history")):(this.layer.deviceProperty[e][i]=t.value,this.layer.deviceProperty[e][n]=t.value2,this.layer.$.trigger("propertyChanged",[i,this.layer.getProperty(i)]),this.layer.$.trigger("propertyChanged",[n,this.layer.getProperty(n)]),this.layer.render(i,null,"history"),this.layer.render(n,null,"history"))},r.prototype.setPropertyalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("left");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"align","left"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("left")})},r.prototype.setPropertyvalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("top");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"valign","top"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("top")})},r.prototype._syncalign=function(t,e){var i=this.layer.getProperty("align");this.$layer.attr("data-align",i),"history"!=e&&i!=t&&this.setPositionLeft(this.$layer.position().left)},r.prototype._syncvalign=function(t,e){var i=this.layer.getProperty("valign");this.$layer.attr("data-valign",i),"history"!=e&&i!=t&&this.setPositionTop(this.$layer.position().top)},r.prototype.fit=function(){var t=this.$layer.get(0);this.$layer.position();if(t.scrollWidth>0&&t.scrollHeight>0){var e=!1;if(this.layer.item&&(e=this.layer.item.fitLayer()),!e){this.layer.setProperty("width","auto","layer"),this.layer.setProperty("height","auto","layer");var i=this.$layer.width();Math.abs(this.canvasManager.mainContainer.layer.width()-this.$layer.position().left-i)<2&&this.layer.setProperty("width",i,"layer")}}},r.prototype.hide=function(t){this.layer.store(t?t:this.layer.getMode(),0,!0)},r.prototype.show=function(t){this.layer.store(t?t:this.layer.getMode(),1,!0)},r.prototype.changeStatus=function(t,i){t==e.ComponentAbstract.STATUS.LOCKED&&this.layer.nextendResizable("enable"),i==e.ComponentAbstract.STATUS.LOCKED&&this.$layer.nextendResizable("disable")},r.prototype.getParent=function(){return t("#"+this.layer.getProperty("parentid")).data("layerObject")},r.prototype.subscribeParent=function(){var e=this,i=t("#"+this.layer.property.parentid);this.parent&&!i.is(this.parent)&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1),this.parent||(this.subscribeParentCallbacks={LayerResized:function(){e.resizeParent.apply(e,arguments)},LayerParent:function(){e.$layer.addClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerParent")},LayerUnParent:function(){e.$layer.removeClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerUnParent");
|
6 |
-
},LayerDeleted:function(t){e.layer.setProperty("parentid","","layer")},LayerUnavailable:function(t){e.layer.setProperty("parentid","","layer"),e.layer.setProperty("left",0,"layer"),e.layer.setProperty("top",0,"layer")},LayerShowChange:function(t,i,n){e.layer.getMode()==i&&(e.parentIsVisible=n)},"n2-ss-activate":function(){e.$layerRow.addClass("n2-parent-active")},"n2-ss-deactivate":function(){e.$layerRow.removeClass("n2-parent-active")},LayerGetDataWithChildren:function(t,i,n){e.layer.getDataWithChildren(i,n)}},this.parent=i.on(this.subscribeParentCallbacks),this.parent.data("layerObject").placement.current.addChild(this),this.$layer.addClass("n2-ss-layer-has-parent"))},r.prototype.unSubscribeParent=function(t){if(this.$layerRow.removeClass("n2-parent-active"),this.$layer.removeClass("n2-ss-layer-has-parent"),this.parent&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1,this.subscribeParentCallbacks={},"delete"!=t)){var e=this.$layer.position();this._setPosition(null,null,e.left,e.top,null,null,!0)}},r.prototype.addChild=function(t){this.children.push(t)},r.prototype.removeChild=function(e){this.children.splice(t.inArray(e,this.children),1)},r.prototype.unlink=function(t){t&&t.preventDefault(),this.layer.setProperty("parentid","","layer")},r.prototype.parentPicked=function(t,e,i,n,r){this.layer.setProperty("parentid","","layer"),this.layer.setProperty("align",n,"layer"),this.layer.setProperty("valign",r,"layer"),this.layer.setProperty("parentalign",e,"layer"),this.layer.setProperty("parentvalign",i,"layer"),this.layer.setProperty("parentid",t.requestID(),"layer");var s;for(var o in this.layer.deviceProperty)"desktopPortrait"!=o&&(this.layer.deviceProperty[o].left=s,this.layer.deviceProperty[o].top=s,this.layer.deviceProperty[o].valign=s,this.layer.deviceProperty[o].align=s)},r.prototype._syncparentid=function(){var e=this.layer.getProperty("parentid");if(e&&""!=e)if(0==t("#"+e).length)this.layer.setProperty("parentid","","layer");else{this.$layer.attr("data-parentid",e).addClass("n2-ss-layer-has-parent"),this.subscribeParent();var i=this.$layer.position();this._setPosition(null,null,i.left,i.top,null,null,!0)}else this.$layer.removeAttr("data-parentid"),this.unSubscribeParent()},r.prototype.snap=function(){this.$layer.nextendResizable("option","smartguides",t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this))},r.prototype._renderModeProperties=function(t){this.$layer.attr("data-align",this.layer.property.align),this.$layer.attr("data-valign",this.layer.property.valign),t&&this.onResize(!0)},r.prototype.doLinearResize=function(t){this.doThrottledTheResize(t,!0)},r.prototype.doTheResize=function(t,e,i){this.render("width"),this.render("height"),this.render("left"),this.render("top"),e||this.triggerLayerResized(i,t)},r.prototype.resizeParent=function(t,e,i){this.addToResizeCollection(this,e,i)},r.prototype.updatePosition=function(){var t=this.parent;if("center"==this.layer.getProperty("align")){var e=0;e=t?t.position().left+t.width()/2:this.$layer.parent().width()/2;var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("left",e-this.$layer.width()/2+this.layer.getProperty("left")*i)}if("middle"==this.layer.getProperty("valign")){var n=0;n=t?t.position().top+t.height()/2:this.$layer.parent().height()/2;var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("top",n-this.$layer.height()/2+this.layer.getProperty("top")*i)}this.triggerLayerResized()},r.prototype.getIndex=function(){var t=parseInt(this.$layer.css("zIndex"));return isNaN(t)&&(t=0),t},r.prototype.renderIndex=function(t){},r.prototype.sync=function(){this._syncalign(null,"history"),this._syncvalign(null,"history"),this._syncwidth(),this._syncheight(),this._synctop(),this._syncleft(),this._syncparentid()},r.prototype["delete"]=function(){var t=this.layer.getProperty("parentid");t&&this.unSubscribeParent("delete")},r.prototype.isParentOrChild=function(){return this.parent||this.children.length>0},r}),N2Require("PlacementContent",["PlacementAbstract"],[],function(t,e,i){"use strict";function n(t,i,n){this.type="content",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.PlacementAbstract.prototype),n.prototype.constructor=n,n}),N2Require("PlacementDefault",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="default",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.activated=function(t){this.startUISizing()},r.prototype.deActivated=function(t){this.$layer.nextendNormalSizing("destroy")},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this)})},r}),N2Require("PlacementNormal",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="normal",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.preActivation=function(t){if("absolute"==t.type&&this.layer.item&&this.layer.item.needSize){var e=this.layer.getProperty("height");e.match&&e.match(/[0-9]+%$/)?this.transferredProperties.height=Math.max(100,parseInt(this.$layer.parent().height()*parseInt(e)/100)):e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncmargin,this)),this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncheight,this)),this.startUISpacing(),this.startUISizing(),this.$layer.on({mousedown:t.proxy(function(t){t.stopPropagation()})})},r.prototype.loadProperties=function(t){this.layer.createDeviceProperty("margin",{desktopPortrait:"0|*|0|*|0|*|0|*|px+"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:t.height||0},this.layer.layer,this),this.layer.createDeviceProperty("maxwidth",{desktopPortrait:0},this.layer.layer,this),this.layer.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},this.layer.layer,this)},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeClass("n2-ss-has-maxwidth").removeAttr("data-cssselfalign").css({position:"",margin:"",height:"",maxWidth:""});for(var i=["margin","height","maxwidth","selfalign"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){this.layer.$.off(".placementnormal"),this.$layer.nextendSpacing("destroy"),this.$layer.nextendNormalSizing("destroy"),this.layer.layer.removeClass("n2-ss-has-maxwidth"),this.layer.layer.removeAttr("data-cssselfalign");var e=["margin","height","maxwidth","selfalign"],i=this.layer.getPropertiesData(e);return this.layer.removeProperties(e),this.layer.layer.css({position:"",margin:"",height:"",maxWidth:""}),i},r.prototype._renderModeProperties=function(t){this._syncmargin(),this._syncheight(),this._syncmaxwidth(),this._syncselfalign()},r.prototype._syncmargin=function(){var t=this.layer.getProperty("margin").split("|*|"),e=t.pop(),i=this.layer.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var t=t.join(e+" ")+e;this.layer.layer.css("margin",t),this.layer.update(),this.$layer.nextendSpacing("option","current",t)},r.prototype.startUISpacing=function(){this.$layer.nextendSpacing({mode:"margin",sync:{n:"margin-top",e:"margin-right",s:"margin-bottom",w:"margin-left"},handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Margin "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.layer.getProperty("margin").split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.$layer.css("fontSize"))-this.layer.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.layer.setProperty("margin",r.join("|*|")),t("#layernormal-margin").data("field").insideChange(r.join("|*|"))},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({height:e,syncWidth:!0,start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this),resizeHeight:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Height: "+e.value+"px")},this),stopHeight:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing");var n=1;parseInt(this.$layer.css("fontSize"))!=this.layer.baseSize&&(n=this.canvasManager.getResponsiveRatio("h"));var r=Math.round(r/n);this.layer.setProperty("height",e.value)},this)})},r.prototype._syncheight=function(){var t=parseInt(this.layer.getProperty("height"));if(t>0){var e="px",i=this.layer.baseSize;i>0&&(e="em",t=parseInt(t)/i),this.layer.layer.css("height",t+e)}else this.layer.layer.css("height","");this.layer.update()},r.prototype._syncmaxwidth=function(){var t=parseInt(this.layer.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.layer.update()},r.prototype._syncselfalign=function(){this.layer.layer.attr("data-cssselfalign",this.layer.getProperty("selfalign"))},r.prototype.sync=function(){this._syncmargin(),this._syncheight(),this._syncmaxwidth()},r}),N2Require("Placement",[],[],function(t,e,i){"use strict";function n(t){this.layer=t,this.canvasManager=t.canvasManager,this.modes={},this.current=null,this.isTransferHandled=!1,this.updatePositionThrottled=NextendDeBounce(this.updatePosition,200)}return n.prototype.allow=function(t){switch(t){case"absolute":this.modes.absolute=new e.PlacementAbsolute(this,this.layer,this.canvasManager);break;case"normal":this.modes.normal=new e.PlacementNormal(this,this.layer,this.canvasManager);break;case"group":this.modes.absolute=new e.PlacementGroup(this,this.layer,this.canvasManager);break;case"content":this.modes.absolute=new e.PlacementContent(this,this.layer,this.canvasManager);break;case"default":this.modes["default"]=new e.PlacementDefault(this,this.layer,this.canvasManager)}},n.prototype.start=function(){for(var t in this.modes)this.modes[t].start()},n.prototype.setMode=function(t,e){var i=!1;if(e=e||{},"undefined"==typeof this.modes[t])throw new Exception("Layer placement("+t+") not allowed for the container",this.layer);if(this.current!=this.modes[t]){var n;this.current&&(this.modes[t].preActivation(this.current),n=this.current.type,i=this.current.deActivated(this.modes[t])),this.current=this.modes[t],this.layer.layer.attr("data-pm",this.current.type),this.current.activated(e),this.layer.$.triggerHandler("placementChanged",[this.current.type,n])}return i},n.prototype.doAction=function(t){try{return this.current[t].apply(this.current,Array.prototype.slice.call(arguments,1))}catch(e){}},n.prototype.getType=function(){return this.current.type},n.prototype.onResize=function(t){"function"==typeof this.current.onResize&&this.current.onResize(t)},n.prototype.updatePosition=function(){this.current.updatePosition()},n.prototype.getIndex=function(){return this.current.getIndex()},n.prototype.renderIndex=function(t){return this.current.renderIndex(t)},n.prototype.doLinearResize=function(t){this.current.doLinearResize(t)},n.prototype.sync=function(){this.current.sync()},n.prototype.renderModeProperties=function(t){var e=this.layer.getProperty("fontsize");this.layer.adjustFontSize(this.layer.getProperty("adaptivefont"),e,!1),this.current._renderModeProperties(t)},n.prototype["delete"]=function(){this.current["delete"]()},n}),N2Require("PlacementAbstract",["Placement"],[],function(t,e,i){"use strict";function n(t,e,i){this.placement=t,this.layer=e,this.canvasManager=i}return n.prototype.start=function(){},n.prototype.preActivation=function(t){},n.prototype.activated=function(){},n.prototype.deActivated=function(t){return!1},n.prototype.updatePosition=function(){this.layer.group.update()},n.prototype._renderModeProperties=function(t){},n.prototype._hide=function(){},n.prototype._show=function(){},n.prototype.snap=function(){return!1},n.prototype.getIndex=function(){return this.layer.layer.index()},n.prototype.renderIndex=function(t){},n.prototype.doLinearResize=function(t){},n.prototype.sync=function(){},n.prototype["delete"]=function(){},n.prototype.triggerLayerResized=function(t,e){},n.prototype.changeStatus=function(t,e){},n}),N2Require("Item",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,r){this.type===n&&(this.type=e.data("item")),this.needSize=this.constructor.needSize,this.self=this,this.$item=e,this.layer=i,this.itemEditor=r,this.fonts=[],this.styles=[],this.needFill=[],this.values=this.$item.data("itemvalues"),"object"!=typeof this.values&&(this.values=t.parseJSON(this.values)),this.pre="div#"+nextend.smartSlider.frontend.sliderElement.attr("id")+" ",this.defaultValues=r.getItemForm(this.type).values,this.added(),this.$item.data("item",this),this.$item.appendTo(this.layer.getContent()),this.layer.item=this,0===this.$item.children().length&&this.layer.readyDeferred.done(t.proxy(this.reRender,this)),t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item),this.$item.find("a").on("click",function(t){t.preventDefault()}),t(window).trigger("ItemCreated")}return r.needSize=!1,r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!=this&&(this.self=this.self.getSelf()),this.self},r.prototype.changeValue=function(e,i){this==this.itemEditor.activeItem?t("#item_"+this.type+e).data("field").insideChange(i):this.values[e]=i},r.prototype.activate=function(t,e,i){this.itemEditor.setActiveItem(this,e,i)&&(nextend.basicCSS.activate("ss3item"+this.type,this.values,{font:this.fonts,style:this.styles}),this.itemEditor.lastValues[this.type]=this.values)},r.prototype.deActivate=function(){nextend.basicCSS.deActivate()},r.prototype.render=function(e,i){this.layer.layer.triggerHandler("itemRender"),this.$item.html(""),this.parseAll(e),this._render(e),this.itemEditor.lastValues[this.type]=this.values=i,t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item);var n=this.getName(e);n=n===!1||""==n||"Layer"==n?this.type:n.replace(/[<>]/gi,""),this.layer.rename(n,!1),this.layer.update(),this.$item.find("a").on("click",function(t){t.preventDefault()})},r.prototype._render=function(t){},r.prototype.reRender=function(e){this.values=t.extend({},this.getDefault(),this.values,e),this.render(t.extend({},this.values),this.values)},r.prototype["delete"]=function(){this.$item.trigger("mouseleave"),this.$item.remove(),this.itemEditor.activeItem==this&&(this.itemEditor.activeItem=null)},r.prototype.getHTML=function(e){var i="";return i=e?"["+this.type+' values="'+Base64.encode(JSON.stringify(this.values))+'"]':t('<div class="n2-ss-item n2-ss-item-'+this.type+'"></div>').attr("data-item",this.type).attr("data-itemvalues",JSON.stringify(this.values))},r.prototype.getData=function(){return{type:this.type,values:this.values}},r.prototype.getDefault=function(){return{}},r.prototype.added=function(){},r.prototype.addedFont=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.fonts.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.fontManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.addedStyle=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.styles.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.styleManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.parseAll=function(t){for(var e=0;e<this.fonts.length;e++)t[this.fonts[e].name+"class"]=nextend.fontManager.getClass(t[this.fonts[e].name],this.fonts[e].mode)+" ";for(var e=0;e<this.styles.length;e++)t[this.styles[e].name+"class"]=nextend.styleManager.getClass(t[this.styles[e].name],this.styles[e].mode)+" ";for(var e=0;e<this.needFill.length;e++)"undefined"!=typeof t[this.needFill[e]]&&(t[this.needFill[e]]=nextend.smartSlider.generator.fill(t[this.needFill[e]]+""))},r.prototype.getName=function(t){return"Layer"},r.prototype.resizeLayerToImage=function(e){var n=this.layer;t("<img/>").attr("src",e).on("load",function(){var t=i.frontend.dimensions.slide,e=this.width,r=this.height,s=t.width,o=t.height;e>0&&r>0&&(e>s&&(r=r*s/e,e=s),r>o&&(e=e*o/r),nextend.smartSlider.history.off(),n.setProperty("width",e),n.setProperty("height","auto"),nextend.smartSlider.history.on())})},r.prototype.fitLayer=function(t){return!1},r}),N2Require("ItemManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,n){this.suppressChange=!1,this.activeItemOriginalData=null,this.canvasManager=e,this.lastValues={},this.startItems(),this.forms={},this.activeForm=!1,n.isUploadDisabled||i.frontend.sliderElement.fileupload({url:n.uploadUrl,pasteZone:!1,dropZone:i.frontend.sliderElement,dataType:"json",paramName:"image",add:function(t,e){e.formData={path:"/"+n.uploadDir},e.submit()},done:t.proxy(function(t,e){var i=e.result;if(i.data&&i.data.name){var n=this.createLayerItem(!1,{item:"image"});n.reRender({image:i.data.url}),n.activate(null,null,!0)}else NextendAjaxHelper.notification(i)},this),fail:function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},start:function(){NextendAjaxHelper.startLoading()},stop:function(){setTimeout(function(){NextendAjaxHelper.stopLoading()},100)}})}return r.prototype.setActiveItem=function(e,i,n){if(e!=this.activeItem||n){this.activeItemOriginalData=null;var r=e.type;this.activeForm&&this.activeForm.form.css("display","none"),this.activeItem&&this.activeItem.deActivate(),this.activeForm=this.getItemForm(r);var s=t.extend({},this.activeForm.values,e.values);this.activeItem=e,this.suppressChange=!0;for(var o in s){var a=t("#item_"+r+o).data("field");a&&a.insideChange(s[o])}return this.suppressChange=!1,this.activeForm.form.css("display","block"),this.focusFirst(i),!0}return!1},r.prototype.focusFirst=function(t){var e=this.activeForm.fields.eq(0).data("field");nextend.smartSlider.generator.isDynamicSlide()&&e.connectedField&&e.connectedField instanceof N2Classes.FormElementImage||this.activeForm.fields.eq(0).data("field").focus("undefined"!=typeof t&&t)},r.prototype.startItems=function(){t(".n2-ss-core-item").nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,distance:5,$layer:function(){return this.element.clone()},onCreate:t.proxy(function(t,e,n,r){switch(n.layer.type){case"content":case"col":i.history.startBatch();var s=this.createLayerItem(n.layer,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),n.layer.container.insertLayerAt(s.layer,r),s.layer.changeGroup(!1,n.layer),i.history.endBatch();break;case"row":var o=n.layer.createCol();n.layer.moveCol(o.getIndex(),r),i.history.startBatch();var s=this.createLayerItem(o,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),o.container.insertLayerAt(s.layer,0),s.layer.changeGroup(!1,o),i.history.endBatch();break;default:var a=nextend.smartSlider.$currentSlideElement.offset(),s=this.createLayerItem(this.canvasManager.mainContainer,e.$layer.data(),"click");s.layer.placement.current.setPosition(t.pageX-a.left-20,t.pageY-a.top-20)}},this),start:function(){t("#n2-ss-add-sidebar").removeClass("n2-active")}}).on("click",t.proxy(function(e){this.createLayerItem(this.canvasManager.mainContainer.getActiveGroup(),t(e.currentTarget).data(),"click")},this)),t("[data-itemshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger(e)},this)}),t("[data-structureshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t(".n2-ss-add-layer-button").trigger("click"),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(1).trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-type="'+t(e.currentTarget).data("structureshortcut")+'"]').trigger(e)},this)})},r.prototype.createLayerItem=function(n,r,s,o){n=n||this.canvasManager.mainContainer.getActiveGroup();var a=r.item;if("structure"==a){var l=new e.Row(this.canvasManager,n,{});return l.create(r.type),l.hightlightStructure(),{layer:l}}var h=this.getItemForm(a),d=t("<div></div>").attr("data-item",a).data("itemvalues",t.extend(!0,{},h.values,this.getLastValues(a))).addClass("n2-ss-item n2-ss-item-"+a),l=this._createLayer(d,n,t.extend(t(".n2-ss-core-item-"+a).data("layerproperties"),o));return s&&"click"==s?setTimeout(function(){l.layer.trigger("mousedown",["create"]).trigger("mouseup",["create"]).trigger("click",["create"])},500):l.activate(),i.layerWindow.switchTab("item"),i.history.addSimple(this,this.historyDelete,this.historyCreate,[n,l,r]),l.item},r.prototype.getLastValues=function(t){return this.lastValues[t]!==n?this.lastValues[t]:{}},r.prototype.getItemClass=function(t){var i="Item"+t.capitalize();return"undefined"==typeof e[i]?"Item":i},r.prototype._createLayer=function(t,i,n){var r=this.canvasManager.layerOptions.layerFeatures.layerDefault;for(var s in r)null!==r[s]&&(n[s]=r[s]);var o=new e.Layer(this.canvasManager,i,n);return o.create(function(e){return e._createLayer().append(t)}),o},r.prototype.getItemForm=function(e){if(this.forms[e]===n){var i=t("#smartslider-slide-toolbox-item-type-"+e),r={form:i,values:i.data("itemvalues"),fields:i.find('[name^="item_'+e+'"]'),fieldNameRegexp:new RegExp("item_"+e+"\\[(.*?)\\]","")};r.fields.on({nextendChange:t.proxy(this.updateCurrentItem,this),keydown:t.proxy(this.updateCurrentItemDeBounced,this)}),this.forms[e]=r}return this.forms[e]},r.prototype.updateCurrentItem=function(e){if(!this.suppressChange){null===this.activeItemOriginalData&&(this.activeItemOriginalData=t.extend({},this.activeItem.values));var n={},r={};if(this.activeForm.fields.each(t.proxy(function(e,i){var i=t(i),s=i.attr("name").match(this.activeForm.fieldNameRegexp)[1];r[s]=n[s]=i.val()},this)),e&&"nextendChange"==e.type){var s=i.history.addValue(this,this.historyUpdateCurrentItem,[this.activeItem]);s&&s.setValues(this.activeItemOriginalData,t.extend({},r)),this.activeItemOriginalData=null}this.activeItem.render(t.extend({},this.activeItem.getDefault(),n),r)}},r.prototype.historyUpdateCurrentItem=function(e,i){var n=i.getSelf();n.reRender(t.extend(!0,{},e)),n.values=e,this.activeItem==n&&n.activate(null,null,!0)},r.prototype.updateCurrentItemDeBounced=NextendDeBounce(function(t){this.updateCurrentItem(t)},100),r.prototype.historyDelete=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreate=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.historyCreateStructure=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.getSelf=function(){return this},r}),N2Require("PluginActivatable",[],[],function(t,e,i){"use strict";function n(){this.isActive=!1,this.preventActivation=!1}return n.prototype.activate=function(t,e,i){return this.preventActivation?!1:(document.activeElement&&document.activeElement.blur(),t&&(t.ctrlKey||t.metaKey)&&this.canvasManager.mainContainer.getSelectedLayer()?!this.select():t&&3==t.which&&this.canvasManager.selectMode?!1:(i||this.canvasManager.exitSelectMode(),t&&this.positionSidebar(),this.canvasManager.mainContainer.getSelectedLayer()!==this&&(this.layerRow.addClass("n2-active"),this.layer.addClass("n2-active"),this.layer.triggerHandler("n2-ss-activate"),this.canvasManager.changeActiveLayer(this,i),nextend.activeLayer=this.layer,this.canvasManager.ui.onActivateLayer(this)),this.isActive=!0,!0))},n.prototype.deActivate=function(){this.isActive=!1,this.layer===i&&console.error(),this.layer.removeClass("n2-active"),this.layerRow.removeClass("n2-active"),this.layer.triggerHandler("n2-ss-deactivate")},n}),N2Require("PluginEditableName",[],[],function(t,e,i){"use strict";function n(){}var r=300,s=null;return n.prototype.addProperties=function(t){this.createProperty("name",this.label,t),this.createProperty("nameSynced",1,t)},n.prototype.makeNameEditable=function(){this.layerTitleSpan.on({mouseup:t.proxy(function(e){s?(clearTimeout(s),s=null,this.editName()):(this.activate(e),s=setTimeout(t.proxy(function(){s=null},this),r))},this)})},n.prototype.editName=function(){var i=new e.InlineField;i.$input.on({valueChanged:t.proxy(function(t,e){this.rename(e,!0),this.layerTitleSpan.css("display","inline")},this),cancel:t.proxy(function(){this.layerTitleSpan.css("display","inline")},this)}),this.layerTitleSpan.css("display","none"),i.injectNode(this.layerTitle,this.property.name)},n.prototype.rename=function(t,e){if(this.property.nameSynced||e){if(e&&(this.property.nameSynced=0),""==t){if(e)return this.property.nameSynced=1,this.item.reRender(),!1;t="Layer #"+(this.group.getLayerCount()+1)}t=t.substr(0,35),this.property.name!=t&&(this.property.name=t,this.layerTitleSpan.html(t),this.$.trigger("layerRenamed",t))}},n}),N2Require("PluginShowOn",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){}return r.prototype.addProperties=function(t){this.showsOnCurrent=!0,this.createProperty("generatorvisible","",t),this.createProperty("desktopPortrait",1,t),this.createProperty("desktopLandscape",1,t),this.createProperty("tabletPortrait",1,t),this.createProperty("tabletLandscape",1,t),this.createProperty("mobilePortrait",1,t),this.createProperty("mobileLandscape",1,t)},r.prototype._hide=function(){this.layer.css("display","none"),this.showsOnCurrent=!1,this.update()},r.prototype._show=function(){parseInt(this.property[this.canvasManager.getMode()])&&(this.layer.css("display",""),this.showsOnCurrent=!0),this.update()},r.prototype._syncdesktopPortrait=function(){var t=this.getProperty("desktopPortrait");this.__syncShowOnDevice("desktopPortrait",t)},r.prototype._syncdesktopLandscape=function(){var t=this.getProperty("desktopLandscape");this.__syncShowOnDevice("desktopLandscape",t)},r.prototype._synctabletPortrait=function(){var t=this.getProperty("tabletPortrait");this.__syncShowOnDevice("tabletPortrait",t)},r.prototype._synctabletLandscape=function(){var t=this.getProperty("tabletLandscape");this.__syncShowOnDevice("tabletLandscape",t)},r.prototype._syncmobilePortrait=function(){var t=this.getProperty("mobilePortrait");this.__syncShowOnDevice("mobilePortrait",t)},r.prototype._syncmobileLandscape=function(){var t=this.getProperty("mobileLandscape");this.__syncShowOnDevice("mobileLandscape",t)},r.prototype.__syncShowOnDevice=function(t,e){if(this.getMode()==t){var e=parseInt(e);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.placement.doAction("triggerLayerResized")}},r}),N2Require("Col",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.label="Col",this.type="col",this.innerContainer="> .n2-ss-layer-col",e.ContentAbstract.prototype.constructor.call(this,t,i,n),this.placement.allow("default")}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>').attr("data-type",this.type)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createProperty("colwidth","1",t),this.createProperty("link","#|*|_self",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("borderwidth","1|*|1|*|1|*|1",t),this.createProperty("borderstyle","none",t),this.createProperty("bordercolor","ffffffff",t),this.createDeviceProperty("order",{desktopPortrait:0},t)},r.prototype.create=function(){e.ContentAbstract.prototype.create.call(this),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady();var i=t.data("rowcolumns")+"";if(i!=n&&"resolved"==this.group.readyDeferred.state()){for(var r=i.split("+"),s=0;s<r.length;s++)r[s]=new Fraction(r[s]);this.group.setColsWidth(r)}},r.prototype.createRow=function(){this.$content=this.layer.find(".n2-ss-layer-content:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content);var i=t('<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",t.proxy(this["delete"],this)),n=t('<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",t.proxy(function(){this.duplicate(!0,!1)},this));this._createLayerListRow([t('<div class="n2-actions"></div>').append(n).append(i)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<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).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype._start=function(t){e.ContentAbstract.prototype._start.call(this,t),t&&this.highlight(2e3)},r.prototype.getRealOrder=function(){var t=this.getProperty("order");return 0==t?10:t},r.prototype._syncorder=function(){var t=this.getProperty("order");0==t?this.layer.css("order",""):this.layer.css("order",t),this.group.refreshUI()},r.prototype._synccolwidth=function(){this.layer.css("width",100*new Fraction(this.getProperty("colwidth")).valueOf()+"%"),this.group.refreshUI()},r.prototype._synclink=function(){},r.prototype._syncborderradius=function(){this.$content.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncborderwidth=r.prototype._syncbordercolor=r.prototype._syncborderstyle=function(){
|
7 |
-
this._syncborder()},r.prototype._syncborder=function(){var t=this.getProperty("borderstyle");if("none"!=t){this.$content.css("border-color",N2Color.hex2rgbaCSS(this.getProperty("bordercolor"))),this.$content.css("border-style",this.getProperty("borderstyle"));var e=this.getProperty("borderwidth").split("|*|"),i="px";this.$content.css("border-width",e.join(i+" ")+i)}else this.$content.css("border","");this.update()},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$content.css("box-shadow",""):this.$content.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype["delete"]=function(){this.group.container.getLayerCount()>1?this._delete():this.group["delete"]()},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t);return i.attr("data-rowcolumns",this.group.getColumns()),i},r.prototype.renderModeProperties=function(t){this._syncorder(),e.ContentAbstract.prototype.renderModeProperties.call(this,t)},r.prototype.update=function(){this.group._syncwrapafter(),e.ComponentAbstract.prototype.update.call(this)},r});var dependencies=["LayerDataStorage","PluginEditableName"];N2Require("ComponentAbstract",dependencies,["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,o){this.wraps={},this.counter=s++,window.layers[this.counter]=this,this.self=this,this.originalProperties=o||{},e.LayerDataStorage.prototype.constructor.call(this),this.readyDeferred=t.Deferred(),this.readyDeferred.done(t.proxy(this.onReady,this)),this.isDeleteStarted=!1,this.isDeleted=!1,this._lastClasses=!1,this.$=t(this),this.proxyRefreshBaseSize=t.proxy(this.refreshBaseSize,this),this.status=r.STATUS.UNDEFINED,this.canvasManager=i,this.group=n,e.PluginActivatable.prototype.constructor.call(this),this.placement=new e.Placement(this),this.readyDeferred.done(t.proxy(this.addUILabels,this))}var s=0;window.layers=[],r.STATUS={UNDEFINED:0,NORMAL:1,LOCKED:2,HIDDEN:3},r.STATUS_INV={0:"UNDEFINED",1:"NORMAL",2:"LOCKED",3:"HIDDEN"};for(var o in e.PluginActivatable.prototype)r.prototype[o]=e.PluginActivatable.prototype[o];for(var o in e.LayerDataStorage.prototype)r.prototype[o]=e.LayerDataStorage.prototype[o];for(var o in e.PluginEditableName.prototype)r.prototype[o]=e.PluginEditableName.prototype[o];for(var o in e.PluginShowOn.prototype)r.prototype[o]=e.PluginShowOn.prototype[o];return r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<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>").appendTo(this.layer),nextend.tooltip.addElement(t('<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>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(t){this.up(t)},this)}).appendTo(this.uiLabel),"Select parent"),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-duplicate"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this.duplicate()},this)}).appendTo(this.uiLabel),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-trash"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this["delete"]()},this)}).appendTo(this.uiLabel)},r.prototype.getUILabel=function(){return this.label},r.prototype.up=function(t){t.stopImmediatePropagation(),this.group.activate(t)},r.prototype.addProperties=function(t){this.createProperty("id",null,t,this),this.createProperty("class","",t),this.createProperty("crop","visible",t),this.createProperty("rotation",0,t),this.createProperty("parallax",0,t),this.createProperty("adaptivefont",0,t),this.createDeviceProperty("fontsize",{desktopPortrait:100},t),e.PluginShowOn.prototype.addProperties.call(this,t),e.PluginEditableName.prototype.addProperties.call(this,t)},r.prototype.getRootElement=function(){return this.layer},r.prototype.create=function(t,e){e=e||!1,e||this.addProperties(!1),"function"==typeof t?this.layer=t.call(null,this):this.layer=this._createLayer(),this.layer.addClass("n2-ss-layer-under-creation"),e&&this.addProperties(this.layer),this.layer.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.group.container.insert(this),this.group.onChildCountChange(),this.$.triggerHandler("create"),this._start(!0)},r.prototype.load=function(t){this.addProperties(t),this.layer=t.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.$.triggerHandler("load"),this._start(!1);var e=t.data("status");null!==e&&"undefined"!=typeof e?this.changeStatus(e):this.changeStatus(r.STATUS.NORMAL)},r.prototype._start=function(e){this.createRow();var i=this.layer.find("> .n2-ss-layer-mask");i.length&&(this.wraps.mask=i),this._synccrop(),this._syncrotation(),this.placement.start(),this.placement.setMode(this.group.container.allowedPlacementMode,this.originalProperties),this.setGroup(this.group),this.canvasManager.$.triggerHandler("layerCreated",this),e&&(this.refreshBaseSize(),this.$.triggerHandler("created")),setTimeout(t.proxy(function(){this.isDeleted||(this.placement.onResize(!0),this.layer.css("visibility",""),this.layer.removeClass("n2-ss-layer-under-creation"))},this),300)},r.prototype._onReady=function(){this.originalProperties={},this.readyDeferred.resolve(),this.layer.on({mouseover:t.proxy(this.markOver,this),mouseout:t.proxy(this.markOut,this)})},r.prototype.isReady=function(){return"resolved"==this.readyDeferred.state()},r.prototype.getName=function(){return this.property.name},r.prototype.setGroup=function(t){this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=t,this.placement.setMode(t.container.allowedPlacementMode),t.container.syncLayerRow(this),this.isReady()&&this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize)},r.prototype.changeGroup=function(t,e){var i=this.group;i.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=e;var n=this.placement.setMode(e.container.allowedPlacementMode);e.container.syncLayerRow(this),this.refreshBaseSize(),e.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),this.userGroupChange(i,t,n,e,this.getIndex()),i.update()},r.prototype.userGroupChange=function(t,e,n,r,s){if(t==r)this.userIndexChange(e,s);else{var o=i.history.addValue(this,this.historyUserGroupChange,[]);o&&o.setValues({historyGroup:t,index:e,placementData:n},{historyGroup:r,index:s})}},r.prototype.historyUserGroupChange=function(t){var e=this.group,i=t.historyGroup.getSelf(),n=t.index;i.container.insertLayerAt(this,n),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=i,t.placementData&&this.layer.data(t.placementData),this.placement.setMode(i.container.allowedPlacementMode),i.container.syncLayerRow(this),this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),i.onChildCountChange(),t.placementData&&this.placement.sync(),e.update()},r.prototype.userIndexChange=function(t,e){var n=i.history.addValue(this,this.historyUserIndexChange);n&&n.setValues(t,e),this.group.container.insertLayerAt(this,e)},r.prototype.historyUserIndexChange=function(t){this.group.container.insertLayerAt(this,t)},r.prototype._createLayerListRow=function(e){return this.layerRow=t('<li class="n2-ss-layerlist-row"></li>').data("layer",this).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerRowClicked")}).appendTo(this.group.container.$ul),this.layerTitleSpan=t('<span class="n2-ucf">'+this.property.name+"</span>"),this.makeNameEditable(),this.layerTitle=t('<div class="n2-ss-layer-title"></div>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},this),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},this)}).append(this.layerTitleSpan).append(e).appendTo(this.layerRow).on({mouseup:t.proxy(function(t){nextend.shouldPreventMouseUp||"DIV"!==t.target.tagName||this.activate(t)},this)}),nextend.tooltip.add(this.layerRow),this.layerRow.nextendLayerListItem({UIManager:this.canvasManager.mainContainer.layerListUIManager,layer:this,$item:this.layerRow}),this.layerRow},r.prototype.select=function(t){return this.canvasManager.selectLayer(this,!0)},r.prototype.update=function(){this.readyDeferred.done(t.proxy(this.placement.updatePositionThrottled,this.placement))},r.prototype.updateThrottled=function(){this.placement.updatePositionThrottled()},r.prototype.positionSidebar=function(){this.canvasManager.layerWindow.show(this,this.layer)},r.prototype.showEditor=function(){this.canvasManager.layerWindow._show()},r.prototype.highlight=function(e){e=e||2e3,this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),this.layer.addClass("n2-highlight"),this.isHighlighted=setTimeout(t.proxy(function(){this.layer.removeClass("n2-highlight")},this),e)},r.prototype.setPropertydesktopPortrait=r.prototype.setPropertydesktopLandscape=r.prototype.setPropertytabletPortrait=r.prototype.setPropertytabletLandscape=r.prototype.setPropertymobilePortrait=r.prototype.setPropertymobileLandscape=function(t,e,i){this._setProperty(t,parseInt(e),i)},r.prototype.getHTML=function(t){var i=this._createLayer();for(var r in this.property)"width"!=r&&"height"!=r&&"left"!=r&&"top"!=r&&i.attr("data-"+r.toLowerCase(),this.property[r]);for(var r in this.deviceProperty)for(var s in this.deviceProperty[r])i.attr("data-"+r.toLowerCase()+s,this.deviceProperty[r][s]);for(var r in this.deviceProperty.desktop)i.css(r,this.deviceProperty.desktop[r]+"px");if(this.container!=n){var o=i;this.innerContainer!=n&&(o=i.find(this.innerContainer)),o.append(this.container.getHTML(t))}var a=this.getProperty("id");return a&&""!=a&&i.attr("id",a),this.status>e.ComponentAbstract.STATUS.NORMAL&&i.attr("data-status",this.status),i},r.prototype.duplicate=function(e){var n=this.getHTML(!1);if("absolute"==this.placement.getType()){var r=n.attr("id");r&&(r=t.fn.uid(),n.attr("id",r),n.attr("data-id",r)),n.attr("data-parentid")?(n.data("desktopportraittop",0),n.data("desktopportraitleft",0)):(n.data("desktopportraittop",n.data("desktopportraittop")+40),n.data("desktopportraitleft",n.data("desktopportraitleft")+40)),n.attr("data-parentid","")}var s=this.canvasManager.insertComponentWithNode(this.group,n,this.getIndex()+1,!1,!0);return this.layerRow.trigger("mouseleave"),e&&s.activate(),i.history.addSimple(this,this.historyDeleteDuplicated,this.historyDuplicate,[s,s.container?s.container.getAllLayers():!1]),s},r.prototype.historyDeleteDuplicated=function(t){t.getSelf()["delete"]()},r.prototype.historyDuplicate=function(t,e){var i=this.duplicate(!1,!1);if(t.setSelf(i),e)for(var n=i.container.getAllLayers(),r=0;r<n.length;r++)e[r].setSelf(n[r])},r.prototype.historyDelete=function(){this["delete"]()},r.prototype.historyRestore=function(t,e,i,n){var r=this.canvasManager.insertComponentWithNode(this.group.getSelf(),t.clone(),i,!1,!0);if(this.setSelf(r),n)for(var s=r.container.getAllLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype["delete"]=function(){i.positionDisplay.hide(),nextend.tooltip.onLeave(),this._delete()},r.prototype._delete=function(){if(this.isDeleteStarted=!0,this.canvasManager.mainContainer.getSelectedLayer()==this&&this.canvasManager.layerWindow.hide(),this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),i.history.startBatch(),i.history.addSimple(this,this.historyRestore,this.historyDelete,[this.getHTML(!1),this.group,this.getIndex(),this.container?this.container.getAllLayers():!1]),this.deActivate(),this.container!=n){i.history.off();for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._delete();i.history.on()}i.history.endBatch(),this.item!=n&&this.item["delete"](),this.placement["delete"](),this.layer.trigger("mouseup"),this.isDeleted=!0,this.canvasManager.mainContainer.layerDeleted(this),this.layer.triggerHandler("LayerDeleted"),this.getRootElement().remove(),this.layerRow.remove(),this.group.update(),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.$.trigger("layerDeleted"),this.markTimer&&clearTimeout(this.markTimer),delete this.layer,delete this.itemEditor,this.group.onChildCountChange()},r.prototype.getData=function(i){var n={type:this.type,lastplacement:this.placement.getType()};this.status>e.ComponentAbstract.STATUS.NORMAL&&(n.status=this.status);var r=t.extend({},this.property);for(var s in this.deviceProperty)for(var o in this.deviceProperty[s]){delete r[o];var a=this.deviceProperty[s][o];if("undefined"!=typeof a){switch(o){case"width":case"height":this.isDimensionPropertyAccepted(a)||(a=parseFloat(a));break;case"fontsize":case"left":case"top":case"gutter":case"wrap":a=parseFloat(a)}n[s.toLowerCase()+o]=a}}for(var l in r)n[l.toLowerCase()]=r[l];return n},r.prototype.onChildCountChange=function(){},r.prototype.getDataWithChildren=function(e,i){return-1==t.inArray(this,i)&&(i.push(this),e.push(this.getData({layersIncluded:!0,itemsIncluded:!0})),this.layer.triggerHandler("LayerGetDataWithChildren",[e,i])),e},r.prototype.markOver=function(t){this.layer.addClass("n2-ss-mouse-over"),t.stopPropagation(),this.group.markEnter(),this.markTimer&&clearTimeout(this.markTimer),this.layer.addClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible")},r.prototype.markOut=function(e){this.layer.removeClass("n2-ss-mouse-over"),e&&e.stopPropagation(),this.group.markLeave(),this.markTimer&&clearTimeout(this.markTimer),this.isActive||this.uiLabel.addClass("invisible"),this.markTimer=setTimeout(t.proxy(function(){this.layer.removeClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible"),this.markTimer=null},this),10)},r.prototype.markEnter=function(t){this.layer.addClass("n2-ss-mouse-hover"),this.group.markEnter()},r.prototype.markLeave=function(t){this.layer.removeClass("n2-ss-mouse-hover"),this.group.markLeave()},r.prototype.formSetname=function(t,e){},r.prototype.formSetnameSynced=function(t,e){},r.prototype.formSetdesktopPortrait=function(t,e){t.currentForm.desktopPortrait.data("field").insideChange(e)},r.prototype.formSetdesktopLandscape=function(t,e){t.currentForm.desktopLandscape.data("field").insideChange(e)},r.prototype.formSettabletPortrait=function(t,e){t.currentForm.tabletPortrait.data("field").insideChange(e)},r.prototype.formSettabletLandscape=function(t,e){t.currentForm.tabletLandscape.data("field").insideChange(e)},r.prototype.formSetmobilePortrait=function(t,e){t.currentForm.mobilePortrait.data("field").insideChange(e)},r.prototype.formSetmobileLandscape=function(t,e){t.currentForm.mobileLandscape.data("field").insideChange(e)},r.prototype.sync=function(){if(this._syncid(),this.container)for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e].sync();this.placement.sync()},r.prototype._syncid=function(){var t=this.getProperty("id");t&&""!=t?this.layer.attr("id",t):this.layer.removeAttr("id")},r.prototype.requestID=function(){var e=this.getProperty("id");return e||(e=t.fn.uid(),this.setProperty("id",e,"layer")),e},r.prototype._syncfontsize=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype._syncadaptivefont=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype.adjustFontSize=function(t,e,i){e=parseInt(e),parseInt(t)?this.layer.css("font-size",16*e/100+"px"):100!=e?this.layer.css("font-size",e+"%"):this.layer.css("font-size",""),this.refreshBaseSize(),i&&this.update()},r.prototype.refreshBaseSize=function(){var t=this.getFontSize();this.isAdaptiveFont()?this.baseSize=16*t/100:this.baseSize=this.group.baseSize*t/100,this.$.triggerHandler("baseSizeUpdated")},r.prototype.getFontSize=function(){return parseInt(this.getProperty("fontsize"))},r.prototype.isAdaptiveFont=function(){return parseInt(this.getProperty("adaptivefont"))},r.prototype._synccrop=function(){var t=this.getProperty("crop");"auto"==t&&(t="hidden"),"mask"==t?(t="hidden",this.addWrap("mask","<div class='n2-ss-layer-mask'></div>")):(this.removeWrap("mask"),this.layer.data("animatableselector",null)),this.layer.css("overflow",t)},r.prototype._syncrotation=function(){var t=parseFloat(this.getProperty("rotation"));if(t/360!=0){var e=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(e[0],{rotationZ:t})}else this.removeWrap("rotation")},r.prototype.addWrap=function(e,i){if(this.wraps[e]===n){var r=t(i);switch(this.wraps[e]=r,e){case"mask":r.appendTo(this.layer),this.wraps.rotation!==n?r.append(this.wraps.rotation):r.append(this.getContents()),this.layer.data("animatableselector",".n2-ss-layer-mask:first");break;case"rotation":this.wraps.mask!==n?r.appendTo(this.wraps.mask):r.appendTo(this.layer),r.append(this.getContents())}}return this.wraps[e]},r.prototype.removeWrap=function(t){if(this.wraps[t]!==n){switch(t){case"mask":this.wraps.rotation!==n?this.layer.append(this.wraps.rotation):this.layer.append(this.getContents());break;case"rotation":this.wraps.mask!==n?this.wraps.mask.append(this.getContents()):this.layer.append(this.getContents())}this.wraps[t].remove(),delete this.wraps[t]}},r.prototype.getContents=function(){return!1},r.prototype._syncclass=function(){this._lastClasses!==!1&&this.layer.removeClass(this._lastClasses);var t=this.getProperty("class");t&&""!=t?(this.layer.addClass(t),this._lastClasses=t):this._lastClasses=!1},r.prototype._syncparallax=function(){},r.prototype._syncgeneratorvisible=function(){},r.prototype._syncmouseenter=r.prototype._syncclick=r.prototype._syncmouseleave=r.prototype._syncplay=r.prototype._syncpause=r.prototype._syncstop=function(){},r.prototype.renderModeProperties=function(t){e.LayerDataStorage.prototype.renderModeProperties.call(this),this.placement.renderModeProperties(t)},r.prototype.getIndex=function(){return this.group.container.getLayerIndex(this.layer)},r.prototype.toString=function(){return this.type+" #"+this.counter},r.prototype.setSelf=function(t){t===n&&console.error(t),this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r.prototype.historyStoreOnPlacement=function(){var t=Array.prototype.slice.call(arguments);t.splice(1,1),this.placement.current[arguments[1]].apply(this.placement.current,t)},r.prototype.getDroppable=function(){return!1},r.prototype.onCanvasUpdate=function(t,e,i){if(this.group==e)t!=i&&this.userIndexChange(t,i);else{var n;if(this.canvasManager.isCol(this.group))for(n=this;n&&(!n.placement||"absolute"!==n.placement.getType());)n=n.group;this.changeGroup(t,e),e.onChildCountChange();for(var r=this;r&&(!r.placement||"absolute"!==r.placement.getType());)r=r.group;n&&n!=r&&n.placement.updatePosition(),r&&r.placement.updatePosition()}},r.prototype.setStatusNormal=function(){this.changeStatus(r.STATUS.NORMAL)},r.prototype.changeStatus=function(t){var e=this.status;switch(t==this.status&&(t=r.STATUS.NORMAL),this.status){case r.STATUS.HIDDEN:this.getRootElement().removeAttr("data-visibility"),this.layerRow.removeClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.removeClass("n2-ss-layer-locked"),this.layerRow.removeClass("n2-ss-layer-status-locked")}switch(this.status=t,this.status){case r.STATUS.HIDDEN:this.getRootElement().attr("data-visibility","hidden"),this.layerRow.addClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.addClass("n2-ss-layer-locked"),this.layerRow.addClass("n2-ss-layer-status-locked")}this.placement.current.changeStatus(e,this.status)},r.prototype.moveX=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveX(t)},r.prototype.moveY=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveY(t)},r}),N2Require("Content",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Content"),this.type="content",this.innerContainer="> .n2-ss-layer-content",this._defaults=t.extend({verticalalign:"center"},this._defaults),e.ContentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("content"),i.setMainContent(this)}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<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>").appendTo(this.layer)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},t)},r.prototype.getRootElement=function(){return this.$outerSection},r.prototype.getBackgroundElement=function(){return this.$outerSection},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer n2-ss-content-empty"><div class="n2-ss-section-main-content n2-ss-layer-content"></div></div>').attr("data-type",this.type)},r.prototype.createRow=function(){this.$outerSection=this.layer.parent(),this.$outerSection.hasClass("n2-ss-section-outer")||(this.$outerSection=t('<div class="n2-ss-section-outer"></div>').insertAfter(this.layer).append(this.layer)),this.$outerSection.data("layerObject",this),this.$content=this.layer.find(".n2-ss-layer-content:first");var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<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",t.proxy(this["delete"],this));this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content),t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(n)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<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).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.create=function(){this.originalProperties.adaptivefont=1,e.ContentAbstract.prototype.create.call(this),this._syncselfalign(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncselfalign(),this._onReady()},r.prototype._onReady=function(){e.ContentAbstract.prototype._onReady.call(this),this.startUISizing()},r.prototype.startUISizing=function(){this.layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.setProperty("maxwidth",e.value)},this)})},r.prototype["delete"]=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.remove=function(){this._delete()},r.prototype.update=function(){nextend.smartSlider.frontend.responsive.doVerticalResize()},r.prototype.onChildCountChange=function(){var t=this.container.getSortedLayers();this.layer.toggleClass("n2-ss-content-empty",0==t.length)},r.prototype.renderModeProperties=function(t){e.ContentAbstract.prototype.renderModeProperties.call(this,t),this._syncselfalign()},r.prototype._syncselfalign=function(){this.layer.attr("data-cssselfalign",this.getProperty("selfalign"))},r.prototype.duplicate=function(t){console.error("Content can not be duplicated!")},r}),N2Require("ContentAbstract",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this._defaults=t.extend({verticalalign:"flex-start"},this._defaults),this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),e.ComponentAbstract.prototype.constructor.call(this,i,n,r)}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("verticalalign",this._defaults.verticalalign,t),this.createDeviceProperty("maxwidth",{desktopPortrait:0},t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t)},r.prototype.getBackgroundElement=function(){return this.$content},r.prototype.getPaddingElement=function(){return this.$content},r.prototype.create=function(){e.ComponentAbstract.prototype.create.call(this),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled(),this.container.startWithExistingNodes()},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="layer"]').trigger("click")},this)}),this.getPaddingElement().nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layercol-padding").data("field").insideChange(r.join("|*|"))},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.getPaddingElement().css("padding",r),this.update(),this.getPaddingElement().nextendSpacing("option","current",r)},r.prototype._syncmaxwidth=function(){var t=parseInt(this.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.update()},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype.getVerticalAlign=function(){return this.getProperty("verticalalign")},r.prototype._syncverticalalign=function(){this.$content.attr("data-verticalalign",this.getVerticalAlign())},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=nextend.smartSlider.generator.fill(this.getProperty("bgimage"));if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.getBackgroundElement().css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.getBackgroundElement().css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.getBackgroundElement().css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.getBackgroundElement().css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.getBackgroundElement().css("background",t)}}else this.getBackgroundElement().css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.layersIncluded&&(i.layers=this.container.getData(t)),i},r.prototype.onChildCountChange=function(){this.layer.toggleClass("n2-ss-content-empty",0==this.container.getLayerCount()),this.update()},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign()},r.prototype.getDroppable=function(){return this.layer.is(":visible")&&this.status!=N2Classes.ComponentAbstract.STATUS.HIDDEN&&this.status!=N2Classes.ComponentAbstract.STATUS.LOCKED?{$container:this.$content,layer:this,placement:"normal",axis:"y"}:"hidden"},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":return{$container:this.container.$ul,
|
8 |
-
layer:this}}return!1},r.prototype.getContents=function(){return this.$content},r}),N2Require("Layer",["ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Layer"),this.type="layer",this.parent=!1,this.itemEditor=i.itemEditor,e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal"),this.$.on("load create",t.proxy(this.startItem,this))}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.create=function(){e.ComponentAbstract.prototype.create.apply(this,arguments),this.initUI(),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._onReady()},r.prototype.startItem=function(){var t=this.layer.find(".n2-ss-item");new(e[this.itemEditor.getItemClass(t.data("item"))])(t,this,this.itemEditor),this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.item.needSize&&this.layer.addClass("n2-ss-layer-needsize")},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){nextend.context.isPreventDblClick||(e.stopPropagation(),t('[data-tab="item"]').trigger("click"),this.item.itemEditor.focusFirst("dblclick"))},this)})},r.prototype.getContent=function(){var t=this.layer,e=t.data("animatableselector");return e&&(t=t.find(e)),t},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"></div>').attr("data-type",this.type)},r.prototype.createRow=function(){var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<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",t.proxy(this["delete"],this)),r=t('<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",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-layer-row")},r.prototype.activate=function(t,i,n){e.PluginActivatable.prototype.activate.call(this,t,i,n),this.item?this.item.activate(null,i):console.error("The layer do not have item on it!")},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t),n=this.item.getHTML(t);return i.attr("style",i.attr("style")+this.getStyleText()).append(n),i},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.item=this.item.getData()),i},r.prototype.getStyleText=function(){var t="",e=this.property.crop;return"auto"!=e&&"mask"!=e||(e="hidden"),t+="overflow:"+e+";"},r.prototype.getContents=function(){return this.item.$item},r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t,this.item.setSelf(t.item)},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r}),N2Require("MainContainer",["LayerContainer"],["smartSlider"],function(t,e,i,n){"use strict";function r(n){this.baseSize=16,this.activeLayer=null,this.$=n.$,this.isActiveGroupBlurred=!0,this.isMainGroup=!0,this.canvasManager=n,this.layer=i.$currentSlideElement.find(".n2-ss-layers-container").addBack().last(),this.layer.nextendCanvas({mainContainer:this,tolerance:5,smartguides:t.proxy(function(t){return t.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),display:{hidden:!0,show:t.proxy(function(){i.positionDisplay.show("Canvas")},this),update:t.proxy(function(t,e){i.positionDisplay.update(t,"Canvas","L: "+parseInt(0|e.left)+"px<br />T: "+parseInt(0|e.top)+"px")},this),hide:t.proxy(function(){i.positionDisplay.hide("Canvas")},this)},start:t.proxy(function(t,e){this.canvasManager.canvasDragStart(t,e)},this),drag:t.proxy(function(t,e){this.canvasManager.canvasDragMove(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this),stop:t.proxy(function(t,e){this.canvasManager.canvasDragStop(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this)}),this.canvasUIManager=this.layer.data("uiNextendCanvas"),this.layer.nextendLayerList({mainContainer:this,$fixed:t("#n2-ss-layers"),$scrolled:t("#n2-ss-layer-list")}),this.layerListUIManager=this.layer.data("uiNextendLayerList"),this.layer.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />'),this.container=new e.LayerContainer(this,t("#n2-ss-layer-list").find("ul"),"absolute","> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group",["content","row","layer","group"]),this.layerRow=this.container.$ul,this.$.on("layerCreated",t.proxy(function(){this.refreshHasLayers()},this))}return r.prototype.lateInit=function(){this.container.startWithExistingNodes(),this.layer.parent().on("click",t.proxy(function(){this.canvasManager.shouldPreventActivationBubble?this.blurActiveGroup():this.unBlurActiveGroup(),this.canvasManager.allowActivation()},this)),i.frontend.sliderElement.on("SliderResize",t.proxy(this.onResize,this))},r.prototype.onResize=function(t,e){for(var i=this.getEverySortedLayers(),n=0;n<i.length;n++)i[n].placement.doLinearResize(e)},r.prototype.getEverySortedLayers=function(){for(var t=this.container.getChildLayersRecursive(!1),e={},i=t.length-1;i>=0;i--)"undefined"!=typeof t[i].property.parentid&&t[i].property.parentid&&("undefined"==typeof e[t[i].property.parentid]&&(e[t[i].property.parentid]=[]),e[t[i].property.parentid].push(t[i]),t.splice(i,1));for(var i=0;i<t.length;i++)"undefined"!=typeof t[i].property.id&&t[i].property.id&&"undefined"!=typeof e[t[i].property.id]&&(e[t[i].property.id].unshift(0),e[t[i].property.id].unshift(i+1),t.splice.apply(t,e[t[i].property.id]),delete e[t[i].property.id]);return t},r.prototype.deleteLayers=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.blurActiveGroup=function(){this.isActiveGroupBlurred=!0},r.prototype.unBlurActiveGroup=function(){this.isActiveGroupBlurred=!1},r.prototype.getActiveGroup=function(){if(this.isActiveGroupBlurred){var t=this,e=this.activeLayer;switch(this.canvasManager.isGroup(e)||this.canvasManager.isCol(e)||this.canvasManager.isContent(e)?t=e:this.canvasManager.isRow(e)?t=e.container.getSortedLayers()[0]:e&&(t=e.group),this.canvasManager.currentEditorMode){case"content":t==this&&(t=this.canvasManager.mainContent);break;case"canvas":t==this.canvasManager.mainContent&&(t=this)}return t}switch(this.canvasManager.currentEditorMode){case"content":return this.canvasManager.mainContent}return this},r.prototype.getSelectedLayer=function(){return null==this.activeLayer?!1:this.activeLayer},r.prototype.getLayerData=function(t){if(t===n)return[];for(var e=[],i=[],r=0;r<t.length;r++)t[r].getDataWithChildren(e,i);return e},r.prototype.layerDeleted=function(t){for(var e=this.canvasManager.selectedLayers.length;e--;)t==this.canvasManager.selectedLayers[e]&&this.canvasManager.selectedLayers.splice(e,1);this._afterLayerDeletedDeBounced(t),this.refreshHasLayers()},r.prototype._afterLayerDeletedDeBounced=NextendDeBounce(function(t){this.activeLayer&&!this.activeLayer.isDeleted||this.canvasManager.resetActiveLayer()},50),r.prototype.refreshHasLayers=function(){t("body").toggleClass("n2-ss-has-layers",this.container.getLayerCount()>0),nextend.triggerResize()},r.prototype.getName=function(){return"Slide"},r.prototype.update=function(){},r.prototype.onChildCountChange=function(){},r.prototype.markEnter=function(t){},r.prototype.markLeave=function(t){},r.prototype.getSelf=function(){return this},r.prototype.createLayerAnimations=function(t,e){for(var i=[],n=this.container.getSortedLayers(),r=0;r<n.length;r++)i.push.apply(i,n[r].createLayerAnimations(t,e));return i},r.prototype.getDroppables=function(e){var i,n=this.canvasManager.currentEditorMode,r=[];if("canvas"==n){r.push(this.getDroppable()),i=this.container.getSortedLayers();var s=t.inArray(this.canvasManager.mainContent,i);s>-1&&i.splice(s,1)}else"content"==n&&(i=[this.canvasManager.mainContent]);for(var o=0;o<i.length;o++)if(i[o]!=e){var a=i[o].getDroppable();"object"==typeof a&&r.push(a),"hidden"!=a&&i[o].container&&r.push.apply(r,i[o].container.getDroppables(e))}return r},r.prototype.getLLDroppables=function(t){return this.container.getLLDroppables(t)},r.prototype.getDroppable=function(){return{$container:this.layer,layer:this,placement:"absolute"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":case"group":case"content":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.replaceLayers=function(e){this._idTranslation={};var n=this.dataToLayers(t.extend(!0,[],e).reverse()),r=[];this.deleteLayers(),this.canvasManager.mainContent.remove();for(var s=0;s<n.length;s++)r.push(this.container.append(n[s]));return this.canvasManager.refreshMode(),this.container.layerContainerElement.n2imagesLoaded().always(t.proxy(this.canvasManager.refreshMode,this.canvasManager)),this.getSelectedLayer()||r.length>0&&r[0].activate(),i.history.isEnabled()&&i.history.addSimple(this,this.historyDeleteAll,this.historyReplaceLayers,[e,r,this.container.getAllLayers()]),r},r.prototype.historyDeleteAll=function(t,e){for(var i=0;i<e.length;i++)e[i].getSelf()["delete"]();this.canvasManager.mainContent.getSelf().remove()},r.prototype.historyReplaceLayers=function(t,e,i){this.replaceLayers(t);for(var n=this.container.getAllLayers(),r=0;r<i.length;r++)i[r].setSelf(n[r])},r.prototype.addLayers=function(e,n){this._idTranslation={};for(var r=this.dataToLayers(t.extend(!0,[],e)),s=[],o=0;o<r.length;o++)s.push(n.container.append(r[o]));return this.canvasManager.refreshMode(),i.history.addSimple(this,this.historyDeleteLayers,this.historyAddLayers,[e,s,n]),s},r.prototype.historyDeleteLayers=function(t,e,i){for(var n=0;n<e.length;n++)e[n].getSelf()["delete"]()},r.prototype.historyAddLayers=function(t,e,i){for(var n=this.addLayers(t,i.getSelf()),r=0;r<e.length;r++)e[r].setSelf(n[r])},r.prototype.dataToLayers=function(t,e){for(var i=[],n=0;n<t.length;n++)switch(t[n].type){case"group":console.error("Group data to layer not implemented!");break;case"row":i.push(this.buildRowNode(t[n],e));break;case"col":i.push(this.buildColNode(t[n],e));break;case"content":i.push(this.buildContentNode(t[n],e));break;case"layer":default:i.push(this.buildLayerNode(t[n],e))}return i},r.prototype._buildNodePrepareID=function(e,i){if(i.id){var n=t.fn.uid(),r=!1;"object"==typeof this._idTranslation[i.id]&&(r=this._idTranslation[i.id]),this._idTranslation[i.id]=n,i.id=n,e.attr("id",n),r&&r.resolve(i.id,n)}if(i.parentid)switch(typeof this._idTranslation[i.parentid]){case"string":i.parentid=this._idTranslation[i.parentid];break;case"undefined":this._idTranslation[i.parentid]=t.Deferred();case"object":this._idTranslation[i.parentid].done(t.proxy(function(t,e,i){t.data("parentid",i)},this,e));break;default:i.parentid=""}},r.prototype.buildContentNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='content'/>"),s=t("<div class='n2-ss-section-main-content n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildRowNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='row'/>"),s=t("<div class='n2-ss-layer-row' />").appendTo(r);this._buildNodePrepareID(r,e);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.cols,s),r},r.prototype.buildColNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='col'/>"),s=t("<div class='n2-ss-layer-col n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildLayerNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='layer'></div>").attr("style",e.style),s=1;e.zIndex&&(s=e.zIndex),this._buildNodePrepareID(r,e),e.items!==n&&(e.item=e.items[0],delete e.items),t('<div class="n2-ss-item n2-ss-item-'+e.item.type+'"></div>').data("item",e.item.type).data("itemvalues",e.item.values).appendTo(r),delete e.style,delete e.item;for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),r},r}),N2Require("Row",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Row"),this.type="row",this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),this.innerContainer="> .n2-ss-layer-row",this.columnsField=t("#layerrow-columns").data("field"),this.refreshUI=NextendDeBounce(this.refreshUI,100),e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal")}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("fullwidth",1,t),this.createProperty("stretch",0,t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t),this.createDeviceProperty("gutter",{desktopPortrait:20},t),this.createDeviceProperty("wrapafter",{desktopPortrait:0,mobilePortrait:1,mobileLandscape:1},t)},r.prototype.historyDeleteSelf=function(){this["delete"]()},r.prototype.historyCreateSelf=function(t,i,n){var r=new e.Row(this.canvasManager,t.getSelf(),{});r.create(i),this.setSelf(r);for(var s=r.container.getSortedLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype.create=function(n){var r,s=function(e){return t("<div class='n2-ss-layer' />").append(t("<div class='n2-ss-layer-row' />").append(e)).attr("data-type","row")},o=function(e){return t("<div class='n2-ss-layer' data-type='col'/>").append(t("<div class='n2-ss-layer-col n2-ss-layer-content' />").append(e))};switch(n){case"2col":r=function(t){return s([o(),o()])};break;case"2col-60-40":r=function(t){return s([o().data("colwidth","6/10"),o().data("colwidth","4/10")])};break;case"2col-40-60":r=function(t){return s([o().data("colwidth","4/10"),o().data("colwidth","6/10")])};break;case"2col-80-20":r=function(t){return s([o().data("colwidth","8/10"),o().data("colwidth","2/10")])};break;case"2col-20-80":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","8/10")])};break;case"3col":r=function(t){return s([o(),o(),o()])};break;case"3col-20-60-20":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","6/10"),o().data("colwidth","2/10")])};break;case"4col":r=function(t){return s([o(),o(),o(),o()])};break;case"special":r=function(t){var e=s([o(),o()]);return s([o().data("colwidth","1/5"),o(e).data("colwidth","4/5")])};break;default:r=function(t){return s([o()])}}"absolute"==this.group.container.allowedPlacementMode&&(this.originalProperties=t.extend({width:"100%",align:"center",valign:"top",top:20},this.originalProperties)),e.ComponentAbstract.prototype.create.call(this,r,!0),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this.renderModeProperties(),this.container.renderModeProperties(),i.history.addSimple(this,this.historyDeleteSelf,this.historyCreateSelf,[this.group,n,this.container.getSortedLayers()]),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.initUI=function(){this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="row"]').trigger("click")},this)}),this.$row.nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.____makeLayerResizeableStop,this)}),this.$row.nextendColumns({columns:"1",gutter:this.getGutter(),start:t.proxy(function(t,e){i.positionDisplay.show("Columns")},this),colwidth:t.proxy(function(t,e){this.updateColumnWidth(e.currentPercent),i.positionDisplay.update(t,"Columns",Math.round(100*e.currentPercent[e.index])+"% — "+Math.round(100*e.currentPercent[e.index+1])+"%")},this),stop:t.proxy(function(t,e){i.positionDisplay.hide("Columns"),this.setRealColsWidth(e.currentFractions)},this)}),this.$row.sortable({distance:10,tolerance:"pointer",forceHelperSize:!0,forcePlaceholderSize:!0,items:"> .n2-ss-layer",handle:" > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self",start:t.proxy(function(t,e){var i=this.getColumns().split("+");e.placeholder.css({width:100*new Fraction(i[e.item.data("layerObject").getIndex()]).valueOf()+"%",height:e.helper.height(),visibility:"visible",marginRight:this.getGutter()+"px",marginTop:this.getGutter()+"px"}),e.helper.hasClass("n2-ss-last-in-row")&&e.placeholder.addClass("n2-ss-last-in-row"),e.placeholder.css("order",e.helper.css("order")),e.placeholder.attr("data-r",e.helper.attr("data-r"))},this),stop:t.proxy(function(t,e){var i=e.item.data("layerObject"),n=e.item.prevAll(".n2-ss-layer, .n2-ss-layer-group").first().data("layerObject");this.$row.sortable("cancel");var r=i.getIndex(),s=0;n&&(s=n.getIndex(),r>s&&s++),r!=s&&this.moveCol(r,s)},this)})},r.prototype.____makeLayerResizeableStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layerrow-padding").data("field").insideChange(r.join("|*|"))},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-row"></div></div>').attr("data-type",this.type)},r.prototype.historyDeleteCol=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreateCol=function(t,e){var i=t.getSelf().createCol();e.setSelf(i)},r.prototype.createCol=function(){var t=new e.Col(this.canvasManager,this,{});return i.history.addSimple(this,this.historyDeleteCol,this.historyCreateCol,[this,t]),t.create(),this.isReady()&&this.placement.updatePosition(),t},r.prototype.createRow=function(){this.$row=this.layer.find(".n2-ss-layer-row:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"default","> .n2-ss-layer",["col"]),this.container.setLayerContainerElement(this.$row);var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<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",t.proxy(this["delete"],this)),r=t('<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",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-row-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-row"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.activate=function(){e.PluginActivatable.prototype.activate.apply(this,arguments),this.columnsField.setRow(this)},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getColumns=function(){for(var t=this.container.getSortedLayers(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype.getColumnsOrdered=function(){for(var t=this.getOrderedColumns(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype._synccolumns=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._synccolwidth();this.update()},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.$row.css("padding",r),this.$row.nextendSpacing("option","current",r),this.update()},r.prototype.getGutter=function(){return this.getProperty("gutter")},r.prototype._syncgutter=function(){var t=this.getGutter()+"px",e=this.container.getSortedLayers();if(e.length>0)for(var i=e.length-1;i>=0;i--)e[i].layer.css("marginRight",t).css("marginTop",t);this.$row.nextendColumns("option","gutter",this.getGutter()),this.update()},r.prototype._syncwrapafter=function(){if(!this.isDeleted&&!this.isDeleteStarted){for(var e=parseInt(this.getProperty("wrapafter")),i=this.getOrderedColumns(),n=!1,r=i.length-1;r>=0;r--)i[r].showsOnCurrent||i.splice(r,1);var s=i.length;if(e>0&&s>e&&(n=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",n),n)for(var r=0;s>r;r++){var o=parseInt(r/e);if(i[r].layer.attr("data-r",o),(r+1)%e==0||r==s-1){var a=i[r].getProperty("order");0==a&&(a=10),t('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[r].layer.addClass("n2-ss-last-in-row"))}else i[r].layer.removeClass("n2-ss-last-in-row")}else{for(var r=0;s>r;r++)i[r].layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i.length>0?i[s-1].layer.addClass("n2-ss-last-in-row"):console.error("The row does not have col.")}this.update()}},r.prototype.getOrderedColumns=function(){return this.container.getSortedLayers().sort(function(t,e){return t.getRealOrder()-e.getRealOrder()})},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype._syncfullwidth=function(){this.layer.toggleClass("n2-ss-autowidth",0==this.getProperty("fullwidth"))},r.prototype._syncstretch=function(){this.layer.toggleClass("n2-ss-stretch-layer",1==this.getProperty("stretch"))},r.prototype._syncborderradius=function(){this.$row.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$row.css("box-shadow",""):this.$row.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=nextend.smartSlider.generator.fill(this.getProperty("bgimage"));if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.$row.css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.$row.css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.$row.css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.$row.css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.$row.css("background",t)}}else this.$row.css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.cols=this.container.getData(t)),i},r.prototype.moveCol=function(t,e){if("desktopPortrait"==this.getMode()){this._moveCol(t,e);var n=i.history.addValue(this,this.historyMoveCol,[]);n&&n.setValues({oldIndex:e,newIndex:t},{oldIndex:t,newIndex:e})}else{var r=this.getOrderedColumns(),s=r[t];r.splice(t,1),r.splice(e,0,s);for(var o=0;o<r.length;o++)r[o].setProperty("order",o+1);this.refreshUI()}},r.prototype._moveCol=function(t,e){var i=this.container.getSortedLayers();e>t&&e++,this.container.insertLayerAt(i[t],e),this.refreshUI()},r.prototype.historyMoveCol=function(t){this._moveCol(t.oldIndex,t.newIndex)},r.prototype.setColsWidth=function(t){for(var e=this.container.getSortedLayers(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.setRealColsWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.updateColumnWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<e.length;i++)e[i].layer.css("width",100*t[i]+"%");this.update()},r.prototype.activateColumn=function(t,e){this.container.getSortedLayers()[t].activate(e)},r.prototype.onChildCountChange=function(){if(!this.isDeleted&&!this.isDeleteStarted){var t=this.container.getSortedLayers(),e=t.length;if(e){for(var i=this.getColumns().split("+"),n=0,r=0;r<i.length;r++)n=new Fraction(i[r]).add(n);if(1!=n.valueOf())for(var r=0;e>r;r++)t[r].setProperty("colwidth","1/"+e);else for(var r=0;e>r;r++)t[r]._synccolwidth();this.refreshUI()}this._syncgutter(),this._syncwrapafter()}},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncpadding(),this._syncinneralign(),this._syncwrapafter(),this._syncgutter(),this.isActive&&this.columnsField.setRow(this)},r.prototype.hightlightStructure=function(e){e=e||4e3,this.isStructureHighlighted&&(clearTimeout(this.isStructureHighlighted),this.isStructureHighlighted=!1),this.layer.addClass("n2-highlight-structure"),this.isStructureHighlighted=setTimeout(t.proxy(function(){this.isDeleted||this.layer.removeClass("n2-highlight-structure")},this),e)},r.prototype.refreshUI=function(){this.isDeleteStarted||(this.isActive&&this.columnsField.setRow(this),this._syncwrapafter(),this.$row.nextendColumns("option","columns",this.getColumnsOrdered()))},r.prototype.getDroppable=function(){return this.layer.is(":visible")&&this.status!=N2Classes.ComponentAbstract.STATUS.HIDDEN&&this.status!=N2Classes.ComponentAbstract.STATUS.LOCKED?{$container:this.$row,layer:this,placement:"normal",axis:"x"}:"hidden"},r.prototype.getLLDroppable=function(t){switch(t.type){case"col":if(t.group==this)return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$row},r}),N2Require("ComponentSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.componentType="undefined",this.placementType="undefined",t("html").attr("data-component",""),t("html").attr("data-placement",""),this.currentForm={},this.forms={undefined:null,placement:{absolute:{},normal:{},"default":{}},component:{content:{},layer:{},row:{},col:{},group:{}},global:{id:t("#layerid"),desktopPortrait:t("#layershow-desktop-portrait"),desktopLandscape:t("#layershow-desktop-landscape"),tabletPortrait:t("#layershow-tablet-portrait"),tabletLandscape:t("#layershow-tablet-landscape"),mobilePortrait:t("#layershow-mobile-portrait"),mobileLandscape:t("#layershow-mobile-landscape"),"class":t("#layerclass"),generatorvisible:t("#layergenerator-visible"),crop:t("#layercrop"),rotation:t("#layerrotation"),parallax:t("#layerparallax"),fontsize:t("#layerfont-size"),adaptivefont:t("#layeradaptive-font"),mouseenter:t("#layeronmouseenter"),click:t("#layeronclick"),mouseleave:t("#layeronmouseleave"),play:t("#layeronplay"),pause:t("#layeronpause"),stop:t("#layeronstop")}},this.canvasManager=e;var n=i.frontend.responsive;n.enabled("desktop","Landscape")||this.forms.global.desktopLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Portrait")||this.forms.global.tabletPortrait.closest(".n2-mixed-group").css("display","none"),
|
9 |
-
n.enabled("tablet","Landscape")||this.forms.global.tabletLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Portrait")||this.forms.global.mobilePortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Landscape")||this.forms.global.mobileLandscape.closest(".n2-mixed-group").css("display","none"),this.forms.placement.absolute={parentid:t("#layerparentid"),parentalign:t("#layerparentalign"),parentvalign:t("#layerparentvalign"),left:t("#layerleft"),top:t("#layertop"),responsiveposition:t("#layerresponsive-position"),width:t("#layerwidth"),height:t("#layerheight"),responsivesize:t("#layerresponsive-size"),align:t("#layeralign"),valign:t("#layervalign")},this.forms.placement.normal={margin:t("#layernormal-margin"),height:t("#layernormal-height"),maxwidth:t("#layernormal-maxwidth"),selfalign:t("#layernormal-selfalign")},this.forms.component.content={maxwidth:t("#layercontent-maxwidth"),selfalign:t("#layercontent-selfalign"),padding:t("#layercontent-padding"),inneralign:t("#layercontent-inneralign"),verticalalign:t("#layercontent-verticalalign"),bgcolor:t("#layercontent-background-color"),bgimage:t("#layercontent-background-image"),bgimagex:t("#layercontent-background-focus-x"),bgimagey:t("#layercontent-background-focus-y"),bgimageparallax:t("#layercontent-background-parallax"),bgcolorgradient:t("#layercontent-background-gradient"),bgcolorgradientend:t("#layercontent-background-color-end"),opened:t("#layercontent-opened")},i.generator.registerField(this.forms.component.content.bgimage),this.forms.component.row={padding:t("#layerrow-padding"),gutter:t("#layerrow-gutter"),fullwidth:t("#layerrow-fullwidth"),stretch:t("#layerrow-stretch"),wrapafter:t("#layerrow-wrap-after"),inneralign:t("#layerrow-inneralign"),bgimage:t("#layerrow-background-image"),bgimagex:t("#layerrow-background-focus-x"),bgimagey:t("#layerrow-background-focus-y"),bgimageparallax:t("#layerrow-background-parallax"),bgcolor:t("#layerrow-background-color"),bgcolorgradient:t("#layerrow-background-gradient"),bgcolorgradientend:t("#layerrow-background-color-end"),borderradius:t("#layerrow-border-radius"),boxshadow:t("#layerrow-boxshadow"),opened:t("#layerrow-opened")},i.generator.registerField(this.forms.component.row.bgimage),this.forms.component.col={maxwidth:t("#layercol-maxwidth"),padding:t("#layercol-padding"),inneralign:t("#layercol-inneralign"),verticalalign:t("#layercol-verticalalign"),bgcolor:t("#layercol-background-color"),link:t("#layercol-link"),bgimage:t("#layercol-background-image"),bgimagex:t("#layercol-background-focus-x"),bgimagey:t("#layercol-background-focus-y"),bgimageparallax:t("#layercol-background-parallax"),bgcolorgradient:t("#layercol-background-gradient"),bgcolorgradientend:t("#layercol-background-color-end"),borderradius:t("#layercol-border-radius"),boxshadow:t("#layercol-boxshadow"),borderwidth:t("#layercol-border-width"),borderstyle:t("#layercol-border-style"),bordercolor:t("#layercol-border-color"),opened:t("#layercol-opened"),colwidth:t("#layercol-colwidth"),order:t("#layercol-order")},i.generator.registerField(t("#col-linklayercol-link_0")),i.generator.registerField(this.forms.component.col.bgimage)}return r.prototype.changeActiveComponent=function(e,i,n,r){if(this.currentLayer=e,this.componentType!=i){switch(t("html").attr("data-component",i),i){case"content":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["content","animations","position"]);break;case"layer":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["item","style","animations","position"]);break;case"group":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["group","animations"]);break;case"row":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["row","animations","position"]);break;case"col":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["column","animations","position"])}this.componentType=i}this.changeActiveComponentPlacement(n),this.syncFields(r)},r.prototype.changeActiveComponentPlacement=function(e,i){this.placementType!=e&&(t("html").attr("data-placement",e),this.placementType=e),this.syncFields(i)},r.prototype.syncFields=function(e){if("object"==typeof e){this.currentForm=t.extend({},this.forms.global,this.forms.component[this.componentType],this.forms.placement[this.placementType]);for(var i in e)typeof e[i]!==n?this.updateField(i,e[i]):console.error("Value is undefined for: "+i);for(var r in this.currentForm)this.currentForm[r].off(".layeroptions").on("outsideChange.layeroptions",t.proxy(this.activeComponentPropertyChanged,this,r))}},r.prototype.onUpdateField=function(t,e,i){t.target==this.currentLayer&&this.updateField(e,i)},r.prototype.updateField=function(t,e){if("function"==typeof this.currentLayer["formSet"+t])this.currentLayer["formSet"+t](this,e);else if(this.currentForm[t]!==n){var i=this.currentForm[t].data("field");i!==n&&i.insideChange(e)}else console.error("field not available: "+t+":"+e,this.currentForm)},r.prototype.activeComponentPropertyChanged=function(t,e){if(this.currentLayer&&!this.currentLayer.isDeleted){var i=this.currentForm[t].val();this.currentLayer.setProperty(t,i,"manager")}else{var n=this.currentForm[t].data("field");"undefined"!=typeof n&&null!==n&&n.insideChange("")}},r.prototype.startFeatures=function(){this.layerFeatures=new e.LayerFeatures(this.forms.placement.absolute,this.canvasManager);var i=t("#n2-ss-layer-adaptive-font").on("click",t.proxy(function(){this.currentForm.adaptivefont.data("field").onoff.trigger("click")},this));this.forms.global.adaptivefont.on("nextendChange",t.proxy(function(){1==this.currentForm.adaptivefont.val()?i.addClass("n2-active"):i.removeClass("n2-active")},this)),new N2Classes.FormElementNumber("n2-ss-layer-font-size",-Number.MAX_VALUE,Number.MAX_VALUE),new N2Classes.FormElementAutocompleteSlider("n2-ss-layer-font-size",{min:50,max:300,step:5});var n=t("#n2-ss-layer-font-size").on("outsideChange",t.proxy(function(){var t=parseInt(n.val());this.currentForm.fontsize.val(t).trigger("change")},this));this.forms.global.fontsize.on("nextendChange",t.proxy(function(){n.data("field").insideChange(this.forms.global.fontsize.val())},this))},r}),N2Require("BgAnimationManager",[],[],function(t,e,i){function n(){this.type="backgroundanimation",NextendVisualManagerMultipleSelection.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(NextendVisualManagerMultipleSelection.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this,arguments),this.type="backgroundanimation",this.labels={visual:"Background animation",visuals:"Background animations"}},n.prototype.initController=function(){return new e.BgAnimationEditor},n.prototype.createVisual=function(t,e){return new NextendVisualWithSetRowMultipleSelection(t,e,this)},n}),N2Require("BgAnimationEditor",[],[],function(t,e,i){function n(){this.parameters={shiftedBackgroundAnimation:0},NextendVisualEditorController.prototype.constructor.call(this,!1),this.bgAnimationElement=t(".n2-bg-animation"),this.slides=t(".n2-bg-animation-slide"),this.bgImages=t(".n2-bg-animation-slide-bg"),NextendTween.set(this.bgImages,{rotationZ:1e-4}),this.directionTab=new N2Classes.FormElementRadio("n2-background-animation-preview-tabs",["0","1"]),this.directionTab.element.on("nextendChange.n2-editor",t.proxy(this.directionTabChanged,this)),nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d||nextend.notificationCenter.error("Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ")}return n.prototype=Object.create(NextendVisualEditorController.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualEditorController.prototype.loadDefaults.call(this),this.type="backgroundanimation",this.current=0,this.animationProperties=!1,this.direction=0},n.prototype.get=function(){return null},n.prototype.load=function(t,e,i,n){this.lightbox.addClass("n2-editor-loaded")},n.prototype.setTabs=function(t){},n.prototype.directionTabChanged=function(){this.direction=parseInt(this.directionTab.element.val())},n.prototype.start=function(){this.animationProperties&&(this.timeline?this.timeline.play():this.next())},n.prototype.pause=function(){this.timeline&&this.timeline.pause()},n.prototype.next=function(){this.timeline=new NextendTimeline({paused:!0,onComplete:t.proxy(this.ended,this)});var e=this.bgImages.eq(this.current),i=this.bgImages.eq(1-this.current);nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d?(this.currentAnimation=new N2Classes["SmartSliderBackgroundAnimation"+this.animationProperties.type](this,e,i,this.animationProperties,1,this.direction),this.slides.eq(this.current).css("zIndex",2),this.slides.eq(1-this.current).css("zIndex",3),this.timeline.to(this.slides.eq(this.current),.5,{opacity:0},this.currentAnimation.getExtraDelay()),this.timeline.to(this.slides.eq(1-this.current),.5,{opacity:1},this.currentAnimation.getExtraDelay()),this.currentAnimation.postSetup()):(this.timeline.to(this.slides.eq(this.current),1.5,{opacity:0},0),this.timeline.to(this.slides.eq(1-this.current),1.5,{opacity:1},0)),this.current=1-this.current,this.timeline.play()},n.prototype.ended=function(){this.currentAnimation&&this.currentAnimation.ended(),this.next()},n.prototype.setAnimationProperties=function(t){var e=this.animationProperties;this.animationProperties=t,e||this.next()},n});
|
1 |
+
(function(){var t=this;t.N2_=t.N2_||{r:[],d:[]},t.N2R=t.N2R||function(){t.N2_.r.push(arguments)},t.N2D=t.N2D||function(){t.N2_.d.push(arguments)}}).call(window),N2D("ContextMenu",function(t,e){function i(e,i){this.isActive=!1,this.$el=e.data("nextendcontextmenu",this),this.parameters=t.extend({selector:!1,onShow:function(){}},i),this.$menu=t('<div class="n2-context-menu"></div>').on("mousedown",function(){N2Classes.WindowManager.get().setMouseDownArea("context-menu")}).appendTo("body"),this.parameters.selector?this.$el.on("contextmenu",this.parameters.selector,t.proxy(this.onShowContextMenu,this)):this.$el.on("contextmenu",t.proxy(this.onShowContextMenu,this))}return i.prototype.onShowContextMenu=function(e){e.preventDefault(),this.clearItems(),this.parameters.onShow.call(this,e,this),this.hasItems&&(e.stopPropagation(),this.isActive=!0,this.$menu.css({left:e.pageX,top:e.pageY}),t("html").on("mouseleave.nextendcontextmenu, click.nextendcontextmenu",t.proxy(this.onHide,this))),this.$menu.toggleClass("n2-active",this.hasItems)},i.prototype.onHide=function(){t("html").off(".nextendcontextmenu"),this.$menu.removeClass("n2-active"),this.isActive=!1},i.prototype.clearItems=function(){this.isActive&&this.onHide(),this.hasItems=!1,this.$menu.html("")},i.prototype.addItem=function(e,i,s){this.hasItems=!0,this.$menu.append(t('<div><i class="n2-i '+i+'"></i><span>'+e+"</span></div>").on("click",s))},t.fn.nextendContextMenu=function(e){return this.each(function(){new i(t(this),e)})},i}),N2D("Zoom",function(t,e){function i(e){this.currentContainerWidth=0,this.devices={unknownUnknown:t("<div />")},this.responsives=[],this.add(e);var i=e.parameters.sliderWidthToDevice.desktopPortrait;this.container=e.containerElement.closest(".n2-ss-container-device,.n2-ss-canvas-slider-container").add(e.containerElement.closest(".n2-ss-slider-outer-container")),this.container.width(i),this.containerWidth=i,this.initZoom();var s=t("#n2-ss-devices .n2-tr"),r=e.parameters.deviceModes;this.devices.desktopPortrait=t('<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(s),r.desktopLandscape?this.devices.desktopLandscape=t('<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(s):this.devices.desktopLandscape=this.devices.desktopPortrait,r.tabletPortrait?this.devices.tabletPortrait=t('<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(s):this.devices.tabletPortrait=this.devices.desktopPortrait,r.tabletLandscape?this.devices.tabletLandscape=t('<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(s):this.devices.tabletLandscape=this.devices.desktopLandscape,r.mobilePortrait?this.devices.mobilePortrait=t('<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(s):this.devices.mobilePortrait=this.devices.tabletPortrait,r.mobileLandscape?this.devices.mobileLandscape=t('<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(s):this.devices.mobileLandscape=this.devices.tabletLandscape,this.deviceOptions=t("#n2-ss-devices .n2-panel-option"),this.deviceOptions.each(t.proxy(function(e,i){t(i).on({mousedown:t.proxy(N2Classes.WindowManager.setMouseDownArea,null,"zoomDeviceClicked"),click:t.proxy(this.setDeviceMode,this)})},this)),e.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onDeviceOrientationChange,this))}var s=null;return i.add=function(t){s=new i(t),i.add=function(t){s.add(t)}},i.prototype.add=function(t){this.responsives.push(t),this.setOrientation("portrait"),t.parameters.onResizeEnabled=0,t.parameters.forceFull=0,t._getDevice=t._getDeviceZoom},i.prototype.onDeviceOrientationChange=function(e,i){t("#n2-admin").removeClass("n2-ss-mode-"+i.lastDevice+i.lastOrientation).addClass("n2-ss-mode-"+i.device+i.orientation),this.devices[i.lastDevice+i.lastOrientation].removeClass("n2-active"),this.devices[i.device+i.orientation].addClass("n2-active")},i.prototype.initZoom=function(){var e=t("#n2-ss-slider-zoom");e.length>0&&("undefined"!=typeof e[0].slide&&(e[0].slide=null),this.zoom=e.removeAttr("slide").prop("slide",!1).nUISlider({step:1,value:1,min:0,max:102}),this.$handle=e.data("nUISlider").handle,this.responsives[0].sliderElement.one("SliderResize",t.proxy(function(t){var e=this.responsives[0].containerElement.width();this.setContainerWidth(t,e,!0)},this)),this.zoom.on({"slide.n2-ss-zoom":t.proxy(this.zoomChange,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChange,this)}))},i.prototype.zoomChange=function(t,i){if(t.originalEvent!==e){var s,r=i.value,n=1;50>r?n=nextend.smallestZoom/this.containerWidth+Math.max(r/50,0)*(1-nextend.smallestZoom/this.containerWidth):r>52&&(n=1+(r-52)/50),s=parseInt(n*this.containerWidth),this.setContainerWidth(t,s)}},i.prototype.setContainerWidth=function(t,e,i){if(this.currentContainerWidth!=e){this.currentContainerWidth=e,this.$handle.html(e+"px"),this.container.width(e);for(var s=0;s<this.responsives.length;s++)this.responsives[s].doResize(t);if(i){var r=e/this.containerWidth,n=50;1>r?n=(r-nextend.smallestZoom/this.containerWidth)/(1-nextend.smallestZoom/this.containerWidth)*50:r>1&&(n=50*(r-1)+52),this.zoom.nUISlider("option","value",n)}}},i.prototype.setDeviceMode=function(e){var i=t(e.currentTarget);if((e.ctrlKey||e.metaKey)&&this.responsives[0].slider.editor.fragmentEditor){var s=i.data("orientation");this.responsives[0].slider.editor.fragmentEditor.copyOrResetMode(i.data("device")+s[0].toUpperCase()+s.substr(1))}else this.setOrientation(i.data("orientation")),this.setContainerWidth(e,this.getModeWidth(i.data("device")),!0)},i.prototype.getModeWidth=function(t){var e,i=this.responsives[0];e=i.orientationMode==N2Classes.SmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT?N2Classes.SmartSliderResponsive.DeviceOrientation.PORTRAIT:N2Classes.SmartSliderResponsive.DeviceOrientation.LANDSCAPE;var s=i.parameters.sliderWidthToDevice[t+N2Classes.SmartSliderResponsive._DeviceOrientation[e]];if("mobile"==t)switch(N2Classes.SmartSliderResponsive._DeviceOrientation[e]){case"Portrait":s=Math.max(nextend.smallestZoom,320)}return s},i.prototype.setOrientation=function(t){if("portrait"==t)for(var e=0;e<this.responsives.length;e++)this.responsives[e].orientationMode=N2Classes.SmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT;else for(var e=0;e<this.responsives.length;e++)this.responsives[e].orientationMode=N2Classes.SmartSliderResponsive.OrientationMode.ADMIN_LANDSCAPE},i}),N2D("CreateSlider",function(t,e){function i(e,i,s){this.addToGroupModal=null,this.groupID=e,this.ajaxUrl=i,this.shouldSkipLicenseModal=s,t(".n2-ss-create-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showModal()},this)),this.notificationStack=new N2Classes.NotificationStackModal(t("body")),t(".n2-ss-add-sample-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showDemoSliders()},this)),"createslider"==window.location.hash.substring(1)&&this.showModal()}return i.prototype.showModal=function(){if(!this.createSliderModal){var e=this,i=this.ajaxUrl,s=[];s.push({key:"default",name:n2_("Default"),image:"$ss$/admin/images/sliderpresets/default.png"}),s.push({key:"fullwidth",name:n2_("Full width"),image:"$ss$/admin/images/sliderpresets/fullwidth.png"}),s.push({key:"thumbnailhorizontal",name:n2_("Thumbnail - horizontal"),image:"$ss$/admin/images/sliderpresets/thumbnailhorizontal.png"});var r=[550,520];this.createSliderModal=new N2Classes.NextendModal({zero:{size:r,title:n2_("Create Slider"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Create")+"</a>"],fn:{show:function(){var r=this.controls.find(".n2-button-green"),n=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),r.trigger("click")});n.append(this.createInput(n2_("Slider name"),"createslidertitle","width: 240px;")),n.append(this.createInputUnit(n2_("Width"),"createsliderwidth","px","width: 30px;")),n.append(this.createInputUnit(n2_("Height"),"createsliderheight","px","width: 30px;")),new N2Classes.FormElementAutocompleteSimple("createsliderwidth",["1920","1200","1000","800","600","400"]),new N2Classes.FormElementAutocompleteSimple("createsliderheight",["800","600","500","400","300","200"]);var o=t("#createslidertitle").val(n2_("Slider")).focus(),a=t("#createsliderwidth").val(1200),l=t("#createsliderheight").val(500);a.parent().addClass("n2-form-element-autocomplete"),l.parent().addClass("n2-form-element-autocomplete"),this.createHeading(n2_("Preset")).appendTo(this.content);var h=100,d=this.createImageRadio(s).css("height",h).appendTo(this.content),p=d.find("input");d.css("overflow","hidden"),this.createHeading(n2_("Import Sample Sliders")).appendTo(this.content),t('<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>").on("click",t.proxy(function(){this.hide(),e.showDemoSliders()},this)).appendTo(this.content),r.on("click",t.proxy(function(){N2Classes.AjaxHelper.ajax({type:"POST",url:N2Classes.AjaxHelper.makeAjaxUrl(i,{nextendaction:"create"}),data:{groupID:e.groupID,sliderTitle:o.val(),sliderSizeWidth:a.val(),sliderSizeHeight:l.val(),preset:p.val()},dataType:"json"}).done(t.proxy(function(t){N2Classes.AjaxHelper.startLoading()},this))},this))}}}})}this.createSliderModal.show()},i.prototype.showDemoSliders=function(){var e=this;t("body").css("overflow","hidden");var i=0,s=t('<iframe src="//smartslider3.com/demo-import/?pro='+i+"&version="+N2SS3VERSION+"&utm_campaign="+N2SS3C+"&utm_source=import-slider-frame&utm_medium=smartslider-"+N2PLATFORM+"-"+(i?"pro":"free")+'" frameborder="0"></iframe>').css({position:"fixed",zIndex:1e5,left:0,top:0,width:"100%",height:"100%"}).appendTo("body"),r=function(){t("body").css("overflow",""),s.remove(),window.removeEventListener("message",o,!1),e.notificationStack.popStack()},n=function(t){N2Classes.AjaxHelper.ajax({type:"POST",url:N2Classes.AjaxHelper.makeAjaxUrl(e.ajaxUrl,{nextendaction:"importDemo"}),data:{groupID:e.groupID,key:N2Classes.Base64.encode(t.replace(/^(http(s)?:)?\/\//,"//"))},dataType:"json"}).fail(function(){})},o=function(t){if("http://smartslider3.com"===t.origin||"https://smartslider3.com"===t.origin){var e=t.data;switch(e.key){case"importSlider":return void("function"==typeof nextend.joinCommunity?nextend.joinCommunity(function(){n(e.data.href)}):n(e.data.href));case"closeWindow":r()}}};this.notificationStack.enableStack(),N2Classes.Esc.add(t.proxy(function(){return r(),!0},this)),window.addEventListener("message",o,!1)},i}),N2D("ManageSliders",function(t,e){function i(e,i,s){this.groupID=e,this.ajaxUrl=i,this.sliders=[],this.sliderPanel=t("#n2-ss-slider-container"),this.orderBy="ordering"==this.sliderPanel.data("orderby"),this.slidersContainer=this.sliderPanel.find(".n2-ss-sliders-container");for(var r=this.slidersContainer.find(".n2-ss-box-slider"),n=0;n<r.length;n++)this.sliders.push(new N2Classes.Slider(this,r.eq(n)));this.changed(),this.initMenu(),this.initOrderable(),this.create=new N2Classes.CreateSlider(e,i,s),this.initBulk()}return i.prototype.changed=function(){t("html").attr("data-sliders",this.sliders.length)},i.prototype.initSliders=function(){for(var e=this.slidersContainer.find(".n2-ss-box-slider"),i=[],s=0;s<e.length;s++){var r=e.eq(s).data("slider");i.push(r)}this.sliders=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidersChanged")},i.prototype.initOrderable=function(){if(this.orderBy){var e={helper:"clone",items:"> .n2-ss-box-slider",stop:t.proxy(this.saveOrder,this),placeholder:"n2-box-sortable-placeholder",distance:10};this.slidersContainer.nUISortable(e)}},i.prototype.saveOrder=function(e,i){for(var s=this.slidersContainer.find(".n2-ss-box-slider"),r=[],n=[],o=[],a=0;a<s.length;a++){var l=s.eq(a).data("slider");r.push(l),n.push(l.getId())}for(var a=0;a<this.sliders.length;a++)o.push(this.sliders[a].getId());if(JSON.stringify(o)!=JSON.stringify(n)){t(window).triggerHandler("SmartSliderSidebarSlidersOrderChanged");var h={nextendcontroller:"sliders",nextendaction:"order"};N2Classes.AjaxHelper.ajax({type:"POST",url:N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl,h),data:{groupID:this.groupID,sliderorder:n,isReversed:"DESC"==this.sliderPanel.data("orderbydirection")?1:0}}),this.sliders=r}},i.prototype.initMenu=function(){this.slider=null,this.menu=t("#n2-ss-slider-menu").detach().addClass("n2-inited"),this.menuActions={duplicate:this.menu.find(".n2-ss-duplicate").on("click",t.proxy(function(t){this.slider.duplicate(t)},this)),"delete":this.menu.find(".n2-ss-delete").on("click",t.proxy(function(t){this.slider["delete"](t)},this)),preview:this.menu.find(".n2-ss-preview").on("click",t.proxy(function(t){this.slider.preview(t)},this))},this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},i.prototype.showMenu=function(t){this.slider=t,this.menu.appendTo(t.box)},i.prototype.hideMenu=function(){this.menu.hasClass("n2-active")&&this.menu.removeClass("n2-active").off("mouseleave"),this.menu.detach()},i.prototype.deleteSliders=function(e,i){this.hideMenu();var s=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(s+=" and "+(i.length-1)+" more"),N2Classes.NextendModal.deleteModal("slider-delete",s,t.proxy(function(){N2Classes.AjaxHelper.ajax({url:N2Classes.AjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"delete"}),type:"POST",data:{sliders:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSliders(),this.leaveBulk()},this))},this))},i.prototype.duplicateSliders=function(e,i){for(var s=0;s<this.sliders.length;s++)this.sliders[s].selected&&this.sliders[s].duplicate(t.Event("click",{currentTarget:null}))},i.prototype.exportSliders=function(e,i){window.location.href=N2Classes.AjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"exportAll"})+"&"+t.param({sliders:e,currentGroupID:this.groupID})},i.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|