本文整理汇总了PHP中NextendCss::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP NextendCss::getInstance方法的具体用法?PHP NextendCss::getInstance怎么用?PHP NextendCss::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NextendCss
的用法示例。
在下文中一共展示了NextendCss::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: NextendTabFontmatrix
function NextendTabFontmatrix(&$form, &$xml)
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('tabs/fontmatrix.css');
$this->_matrixname = NextendXmlGetAttribute($xml, 'name');
parent::NextendTab($form, $xml);
}
示例2: fetchElement
function fetchElement()
{
$this->setfolder();
$files = NextendFilesystem::files($this->_folder);
$this->_xml->addChild('option', NextendText::_('No_image'))->addAttribute('value', -1);
for ($i = 0; $i < count($files); $i++) {
$ext = pathinfo($files[$i], PATHINFO_EXTENSION);
if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
$this->_xml->addChild('option', htmlspecialchars(ucfirst($files[$i])))->addAttribute('value', NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($this->_folder . $files[$i])));
}
}
if (nextendIsWordPress()) {
$wpfolder = get_template_directory() . '/' . NextendXmlGetAttribute($this->_xml, 'folder') . '/';
if (isset($_GET['nextendpath'])) {
echo $wpfolder . "<br />";
}
if (NextendFilesystem::existsFolder($wpfolder)) {
$files = NextendFilesystem::files($wpfolder);
for ($i = 0; $i < count($files); $i++) {
$ext = pathinfo($files[$i], PATHINFO_EXTENSION);
if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png') {
$this->_xml->addChild('option', htmlspecialchars(ucfirst($files[$i])))->addAttribute('value', NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($wpfolder . $files[$i])));
}
}
}
}
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/imagelist.css');
$html = "<div class='nextend-imagelist' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$html .= parent::fetchElement();
$html .= '</div>';
return $html;
}
示例3: render
static function render($slider, $id, $params)
{
$html = '';
$indicatorstripe = $params->get('indicatorstripe', false);
if ($indicatorstripe && $indicatorstripe != -1) {
$displayclass = self::getDisplayClass($params->get('widgetindicatordisplay', '0|*|always|*|0|*|0'), true) . 'nextend-indicator ';
$css = NextendCss::getInstance();
$css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stripe' . DIRECTORY_SEPARATOR . 'style.css'));
list($style, $data) = self::getPosition($params->get('indicatorposition', ''));
$style .= 'z-index:10;';
$width = NextendParse::parse($params->get('indicatorwidth', '100%'));
if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
$style .= 'width:' . $width . ';';
} else {
$data .= 'data-sswidth="' . $width . '" ';
}
$size = intval($params->get('indicatorsize', 50));
list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('indicatorstripecolor', '000000cc'));
list($colorhexbg, $rgbacssbg) = NextendColor::colorToCss($params->get('backgroundstripecolor', '7670c7ff'));
$height = $params->get('indicatorstripeheight', '6');
$info = pathinfo($indicatorstripe);
$class = 'nextend-indicator nextend-indicator-stripe nextend-indicator-stripe-' . basename($indicatorstripe, '.' . $info['extension']);
$html = '<div class="' . $displayclass . 'nextend-indicator-stripe-container" style="' . $style . 'background-color:' . $colorhexbg . '; background-color:' . $rgbacssbg . '; height: ' . $height . 'px;" ' . $data . '><div class="' . $class . '" style="width: 0%; background-color:' . $colorhex . '; background-color:' . $rgbacss . '; height: ' . $height . 'px;"></div></div>';
$html .= "\r\n <script type='text/javascript'>\r\n njQuery(document).ready(function () {\r\n var stripe = window.njQuery('#" . $id . " .nextend-indicator-stripe');\r\n window['" . $id . "-indicator'] = {\r\n hide: function(){\r\n stripe.hide();\r\n },\r\n show: function(){\r\n stripe.show();\r\n },\r\n refresh: function(val){\r\n stripe.css('width', val+'%');\r\n }\r\n };\r\n });\r\n </script>\r\n ";
}
return $html;
}
示例4: fetchElement
function fetchElement()
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('spectrum.css');
$css->addCssLibraryFile('element/color.css');
$js = NextendJavascript::getInstance();
$js->loadLibrary('jquery');
$js->addLibraryJsAssetsFile('jquery', 'spectrum.js');
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/color.js');
$this->_value = $this->_form->get($this->_name, $this->_default);
$hidden = new NextendElementText($this->_form, $this->_tab, $this->_xml);
$html = "<div class='nextend-color' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$hiddenhtml = $hidden->render($this->control_name);
$html .= $hiddenhtml[1];
$html .= "</div>";
$alpha = NextendXmlGetAttribute($this->_xml, 'alpha');
if ($alpha != 1) {
$alpha = 0;
}
$js->addLibraryJs('dojo', '
new NextendElementColor({
hidden: "' . $this->_id . '",
alpha: ' . $alpha . '
});
');
return $html;
}
示例5: fetchElement
function fetchElement()
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/fontmanager.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/fontmanager.js');
$this->_value = $this->_form->get($this->_name, $this->_default);
$hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
$html = '';
$fontmanager = NextendFontmanager::getInstance();
$fontmanager->_currentform = $this->_form;
$html .= $fontmanager->render();
$html .= '<a id="nextend-' . $this->_name . '-button" class="nextend-font-button" href="#">Font</a>';
$html .= '<a id="nextend-' . $this->_name . '-button-export" class="nextend-button-css nextend-font-export nextend-element-hastip" title="Export" href="#"></a>';
$html .= '<a id="nextend-' . $this->_name . '-button-import" class="nextend-button-css nextend-font-import nextend-element-hastip" title="Import" href="#"></a>';
$html .= '<div id="nextend-' . $this->_name . '-message" class="nextend-message"></div>';
$html .= "<div class='nextend-fontmanager clearfix'>";
$hiddenhtml = $hidden->render($this->control_name);
$html .= $hiddenhtml[1];
$html .= "</div>";
$tabs = explode('|', NextendXmlGetAttribute($this->_xml, 'tabs'));
$js->addLibraryJs('dojo', '
new NextendElementFontmanager({
hidden: "' . $this->_id . '",
button: "nextend-' . $this->_name . '-button",
importbtn: "nextend-' . $this->_name . '-button-import",
exportbtn: "nextend-' . $this->_name . '-button-export",
message: "nextend-' . $this->_name . '-message",
tabs: ' . json_encode($tabs) . ',
firsttab: "' . $tabs[0] . '"
});
');
return $html;
}
示例6: generateOptions
function generateOptions(&$xml)
{
$template = (string) $this->_xml;
$cssfile = NextendFilesystem::translateToMediaPath(str_replace(DIRECTORY_SEPARATOR, '/', dirname($this->_form->_xmlfile)) . '/style.');
$css = NextendCss::getInstance();
if (NextendFilesystem::fileexists($cssfile . 'less')) {
$css->enableLess();
$cssfile .= 'less';
$css->addCssFile(array($cssfile, $cssfile, array('id' => 'body')));
} else {
$cssfile .= 'css';
$css->addCssFile($cssfile);
}
$prefix = NextendXmlGetAttribute($this->_xml, 'prefix');
$this->_values = array();
$html = '';
foreach ($xml->option as $option) {
$v = NextendXmlGetAttribute($option, 'value');
$this->_values[] = $v;
if ($v != -1) {
$info = pathinfo($v);
$class = $prefix . basename($v, '.' . $info['extension']);
$html .= '
<div class="nextend-radio-option nextend-imagelist-option' . $this->isSelected($v) . '">
' . str_Replace('{image}', NextendUri::pathToUri($v), str_Replace('{class}', $class, $template)) . '
</div>';
} else {
$html .= '<div class="nextend-radio-option' . $this->isSelected($v) . '">' . (string) $option . '</div>';
}
}
return $html;
}
示例7: fetchElement
function fetchElement()
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/subform.css');
$html = "<div class='nextend-subform " . NextendXmlGetAttribute($this->_xml, 'class') . "' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$this->_value = $this->_form->get($this->_name, $this->_default);
$options = $this->getOptions();
$this->_form->set($this->_name, $this->_value);
if (count($options) === 0) {
return 'No sub form exists...';
}
if (!in_array($this->_form->get($this->_name), $options)) {
$this->_form->set($this->_name, $options[0]);
$this->_value = $this->_form->get($this->_name, $this->_default);
}
$this->setOptions($options);
$html .= parent::fetchElement();
$name = $this->_name;
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/subform.js');
$html .= $this->decorateBefore();
$html .= $this->decorateAfter();
$html .= '</div>';
return $html;
}
示例8: render
function render($xmlpath, $data)
{
$css = NextendCss::getInstance();
$js = NextendJavascript::getInstance();
$css->addCssLibraryFile('common.css');
$css->addCssLibraryFile('window.css');
$css->addCssLibraryFile('configurator.css');
$js->loadLibrary('dojo');
nextendimport('nextend.form.form');
$form = new NextendForm();
$form->loadArray($data);
$form->loadXMLFile($xmlpath);
echo $form->render('settings');
$js->addLibraryJsAssetsFile('dojo', 'form.js');
$js->addLibraryJs('dojo', '
new NextendForm({
container: "smartslider-form",
data: ' . json_encode($form->_data) . ',
xml: "' . NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($xmlpath)) . '",
control_name: "settings",
url: "' . NextendUri::ajaxUri('nextend', 'smartslider') . '",
loadedJSS: ' . json_encode($js->generateArrayJs()) . ',
loadedCSS: ' . json_encode($css->generateArrayCSS()) . '
});
', true);
}
示例9: NextendTabDefaultVertical
function NextendTabDefaultVertical(&$form, &$xml)
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('tabs/defaultvertical.css');
$this->_matrixname = NextendXmlGetAttribute($xml, 'name');
parent::NextendTab($form, $xml);
}
示例10: getFontUrl
function getFontUrl()
{
$css = NextendCss::getInstance();
$url = 'https://fonts.googleapis.com/css?family=';
$subset = '';
if (count($this->_fonts)) {
foreach ($this->_fonts as $family => $font) {
$style = explode(',', $font[0]);
$style = array_filter(array_unique($style));
foreach ($style as $k => $s) {
$file = NEXTENDLIBRARYASSETS . 'fonts/' . preg_replace("/[^a-z0-9]/", '', strtolower($family)) . '/' . $s . '/s.css';
if (NextendFilesystem::existsFile($file)) {
unset($style[$k]);
$css->addCssFile($file, null, true);
}
}
if (count($style)) {
$url .= urlencode($family) . ':' . implode(',', $style) . '|';
$subset .= $font[1] . ',';
}
}
}
if ($url == 'https://fonts.googleapis.com/css?family=') {
return '';
}
$url = substr($url, 0, -1);
$subset = explode(',', $subset);
$subset = array_filter(array_unique($subset));
$url .= '&subset=' . implode(',', $subset);
return $url;
}
示例11: render
static function render($slider, $id, $params)
{
$html = '';
$previous = $params->get('previous', false);
$next = $params->get('next', false);
$enabled = $previous && $previous != -1 || $next && $next != -1;
if ($enabled) {
$displayclass = self::getDisplayClass($params->get('widgetarrowdisplay', '0|*|always|*|0|*|0'), true);
$css = NextendCss::getInstance();
$css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'image' . DIRECTORY_SEPARATOR . 'style.css'));
if ($previous && $previous != -1) {
list($style, $data) = self::getPosition($params->get('previousposition', ''));
$info = pathinfo($previous);
$class = 'nextend-arrow-previous nextend-image nextend-image-previous nextend-image-previous-' . basename($previous, '.' . $info['extension']);
$html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'previous\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '></div>';
}
if ($next && $next != -1) {
list($style, $data) = self::getPosition($params->get('nextposition', ''));
$info = pathinfo($next);
$class = 'nextend-arrow-next nextend-image nextend-image-next nextend-image-next-' . basename($next, '.' . $info['extension']);
$html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'next\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '></div>';
}
}
return $html;
}
示例12: fetchElement
function fetchElement()
{
$this->_values = array();
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/switcher.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/switcher.js');
$html = "";
$html .= "<div class='nextend-switcher' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$html .= "<div class='nextend-switcher-vertical'>";
$html .= "<div class='nextend-switcher-vertical-dot'>";
$html .= "</div>";
$html .= "</div>";
$html .= "<div class='nextend-switcher-units'>";
foreach ($this->_xml->unit as $unit) {
$this->_values[] = (string) $unit->attributes()->value;
$html .= "<span class='nextend-switcher-units-unit'>";
$html .= NextendText::_((string) $unit);
$html .= "</span>";
}
$html .= "</div>";
$this->_value = $this->_form->get($this->_name, $this->_default);
$hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
$hiddenhtml = $hidden->render($this->control_name, false);
$html .= $hiddenhtml[1];
$html .= "</div>";
$js->addLibraryJs('dojo', '
new NextendElementSwitcher({
hidden: "' . $this->_id . '",
values: ' . json_encode($this->_values) . '
});
');
return $html;
}
示例13: fetchElement
function fetchElement()
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/fontmanager.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/fontmanager.js');
$this->_value = $this->_form->get($this->_name, $this->_default);
if (intval(NextendXmlGetAttribute($this->_xml, 'base64'))) {
$this->base64 = 1;
$js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'base64.js');
$json = json_decode($this->_value);
if ($json != null && $json != $this->_value) {
$this->_value = base64_encode($this->_value);
$this->_form->set($this->_name, $this->_value);
}
}
$hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
$html = '';
$fontmanager = NextendFontmanager::getInstance();
$fontmanager->_currentform = $this->_form;
$html .= $fontmanager->render();
$html .= '<a id="nextend-' . $this->_name . '-button" class="nextend-font-button" href="#">' . NextendText::_('Font') . '</a>';
$html .= '<a id="nextend-' . $this->_name . '-button-export" class="nextend-button-css nextend-font-export nextend-element-hastip" title="' . NextendText::_('FONTMANAGER_Export') . '" href="#"></a>';
$html .= '<a id="nextend-' . $this->_name . '-button-import" class="nextend-button-css nextend-font-import nextend-element-hastip" title="' . NextendText::_('FONTMANAGER_Import') . '" href="#"></a>';
$html .= '<div id="nextend-' . $this->_name . '-message" class="nextend-message"></div>';
$html .= "<div class='nextend-fontmanager nextend-clearfix'>";
$hiddenhtml = $hidden->render($this->control_name, false);
$html .= $hiddenhtml[1];
$html .= "</div>";
$tabs = explode('|', NextendXmlGetAttribute($this->_xml, 'tabs'));
$translatedTabs = array();
for ($i = 0; $i < count($tabs); $i++) {
$translatedTabs[$i] = NextendText::_($tabs[$i]);
}
$this->printjs = '
new NextendElementFontmanager({
hidden: "' . $this->_id . '",
button: "nextend-' . $this->_name . '-button",
importbtn: "nextend-' . $this->_name . '-button-import",
exportbtn: "nextend-' . $this->_name . '-button-export",
message: "nextend-' . $this->_name . '-message",
tabs: ' . json_encode($tabs) . ',
translatedTabs: ' . json_encode($translatedTabs) . ',
firsttab: "' . $tabs[0] . '",
txt: {
importingdone: "' . NextendText::_('FONTMANAGER_Importing_done') . '",
youcanimport: "' . NextendText::_('FONTMANAGER_Now_you_can_import_the_settings_of_this_font') . '"
},
base64: ' . $this->base64 . '
});
';
if ($this->_includeJS) {
$js->addLibraryJs('dojo', $this->printjs);
}
return $html;
}
示例14: fetchElement
function fetchElement()
{
$css = NextendCss::getInstance();
$css->addCssLibraryFile('element/mixed.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsAssetsFile('dojo', 'element.js');
$js->addLibraryJsAssetsFile('dojo', 'element/mixed.js');
$this->_translateable = NextendXmlGetAttribute($this->_xml, 'translateable');
$this->_translateable = $this->_translateable === '0' ? false : true;
$default = explode($this->_separator, $this->_default);
$this->_value = $this->_form->get($this->_name, $this->_default);
$value = explode($this->_separator, $this->_value);
$value = $value + $default;
$html = "<div class='nextend-mixed' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
$this->_elements = array();
$i = 0;
foreach ($this->_xml->param as $element) {
$html .= "<div class='nextend-mixed-group' style='" . NextendXmlGetAttribute($element, 'mixedstyle') . "'>";
$type = NextendXmlGetAttribute($element, 'type');
$class = 'NextendElement' . $type;
if (!class_exists($class, false)) {
if (!nextendimportpath($this->_form->_xmlfolder . 'element/' . $type)) {
nextendimport('nextend.form.element.' . $type);
}
}
$element->addAttribute('name', $this->_name . '_' . $i);
$element->addAttribute('hidename', 1);
if (isset($value[$i])) {
$element->addAttribute('default', $value[$i]);
}
$el = new $class($this->_form, $this, $element);
$el->parent =& $this;
$elementHtml = $el->render($this->_name . $this->control_name, $this->_translateable);
$html .= "<div class='nextend-mixed-label'>";
$html .= $elementHtml[0];
$html .= "</div>";
$html .= "<div class='nextend-mixed-element'>";
$html .= $elementHtml[1];
$html .= "</div>";
$this->_elements[$i] = $el->_id;
$i++;
$html .= "</div>";
}
$this->_form->set($this->_name, $this->_value);
$hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
$hiddenhtml = $hidden->render($this->control_name, false);
$html .= $hiddenhtml[1];
$html .= "</div>";
$js->addLibraryJs('dojo', '
new NextendElementMixed({
hidden: "' . $this->_id . '",
elements: ' . json_encode($this->_elements) . ',
separator: "' . $this->_separator . '"
});
');
return $html;
}
示例15: fetchElement
function fetchElement()
{
global $smartslidercontroller, $ss2sliderafterform;
$this->_value = htmlspecialchars($this->_form->get($this->_name, $this->_default), ENT_QUOTES);
$this->_form->set($this->_name, $this->_value);
$html = '<div style="display:none;">' . parent::fetchElement() . '</div>';
$slider = null;
$params = new NextendData();
if (nextendIsJoomla()) {
nextendimportsmartslider2('nextend.smartslider.joomla.slider');
$module = new stdClass();
$module->id = 0;
$params->loadArray(array('slider' => intval($_GET['sliderid'])));
$slider = new NextendSliderJoomla($module, $params, dirname(__FILE__), true);
} else {
if (nextendIsWordpress()) {
nextendimportsmartslider2('nextend.smartslider.wordpress.slider');
$slider = new NextendSliderWordpress(intval($_GET['sliderid']), $params, dirname(__FILE__), true);
} else {
if (nextendIsMagento()) {
nextendimportsmartslider2('nextend.smartslider.magento.slider');
$slider = new NextendSliderMagento(intval($_GET['sliderid']), $params, dirname(__FILE__), true);
}
}
}
ob_start();
echo "<div id='smartslider-adjust-height' style='overflow:auto; margin: 5px; padding: 5px;'>";
$slider->render();
echo "</div>";
echo "<div id='smart-slider-layer-dummy' class='smart-slider-layer'></div>";
echo '<div class="smartslider-slide-advanced-layers" style="min-width: 1600px;"></div>';
$ss2sliderafterform = ob_get_clean();
$css = NextendCss::getInstance();
$css->addCssLibraryFile('jqueryui/jquery.ui.resizable.css');
$css->addCssFile(NEXTEND_SMART_SLIDER2_ASSETS . 'admin/css/layer.css');
$js = NextendJavascript::getInstance();
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.core.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.widget.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.mouse.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.resizable.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.draggable.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.sortable.min.js');
$js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.droppable.min.js');
$js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'base64.js');
$js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'sortable.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'console.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.layer.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.item.js');
$js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.layout.js');
$js->addLibraryJs('jquery', "\r\n njQuery(document).ready(function(){\r\n var el = \$('#smartslider-adjust-height');\r\n el.height(el[0].scrollHeight+10);\r\n \$(window).trigger('resize');\r\n });\r\n ndojo.addOnLoad(function(){\r\n SmartSliderAdminSlide('" . $slider->getId() . "','" . $slider->_activeSlide . "','" . $this->_id . "', '" . $smartslidercontroller->route('controller=layouts&action=create') . "');\r\n });\r\n ");
if (NextendSmartSliderSettings::get('slideeditoralert', 1)) {
$js->addLibraryJs('jquery', "\r\n njQuery(window).on('beforeunload', function() {\r\n if (njQuery.now()-window.nextendtime > 60000 && !window.nextendsave) { // 1 min\r\n return '" . NextendText::_('Your_slide_settings_has_not_been_submitted_yet') . "';\r\n } else {\r\n return;\r\n }\r\n });\r\n ");
}
return $html;
}