first commit
@@ -0,0 +1,134 @@
|
||||
.uc-admin-notice {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.uc-admin-notice.notice-doubly {
|
||||
border-color: #ff6a00;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-dismiss {
|
||||
font-size: 13px;
|
||||
line-height: 1em;
|
||||
text-decoration: none;
|
||||
padding: 12px 12px 12px 24px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-dismiss:hover,
|
||||
.uc-admin-notice .uc-notice-dismiss:focus {
|
||||
color: #cc0000;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-dismiss::before {
|
||||
content: "\f153";
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-family: dashicons;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
margin-top: -8px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 4px;
|
||||
transition: color 0.05s ease;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-wrapper {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding-top: 24px;
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-logo {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 12px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-heading {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 1.25em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-content {
|
||||
font-size: 14px;
|
||||
line-height: 1.5em;
|
||||
margin: 8px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-actions {
|
||||
margin: 16px 0 0 0;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-actions .button + .button {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
.uc-admin-notice .uc-notice-debug {
|
||||
font-size: 12px;
|
||||
line-height: 1.5em;
|
||||
color: #757575;
|
||||
margin: 16px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner .uc-notice-dismiss {
|
||||
text-indent: -9999em;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner.uc-admin-notice--theme-dark .uc-notice-dismiss {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner.uc-admin-notice--theme-light .uc-notice-dismiss {
|
||||
color: #1d2327;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner .uc-notice-dismiss:hover,
|
||||
.uc-admin-notice--banner .uc-notice-dismiss:focus {
|
||||
color: #ea3384;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner .uc-notice-dismiss::before {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font-size: 24px;
|
||||
line-height: 24px;
|
||||
text-indent: 0;
|
||||
margin-top: 0;
|
||||
top: 8px;
|
||||
left: 4px;
|
||||
}
|
||||
|
||||
|
||||
.uc-admin-notice--banner .uc-notice-link {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner .uc-notice-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.uc-admin-notice--banner .uc-notice-debug {
|
||||
margin: 0;
|
||||
padding: 12px;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
jQuery(document).ready(function ($) {
|
||||
// Handle notice dismiss & postpone actions
|
||||
$(document).on('click', '.uc-admin-notice [data-action="dismiss"], .uc-admin-notice [data-action="postpone"]', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $action = $(this);
|
||||
var $root = $action.closest('.uc-admin-notice');
|
||||
var url = $action.attr('data-ajax-url');
|
||||
|
||||
$root.slideUp(200, function () {
|
||||
$root.remove();
|
||||
});
|
||||
|
||||
$.post(url);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,51 @@
|
||||
.ue-gutenberg-settings-error {
|
||||
display: none;
|
||||
font-size: var(--ue-font-size-small);
|
||||
line-height: var(--ue-line-height-small);
|
||||
color: var(--ue-color-danger);
|
||||
padding: 0 16px 16px 16px;
|
||||
}
|
||||
|
||||
.ue-gutenberg-settings-spinner {
|
||||
text-align: center;
|
||||
padding: 0 16px 16px 16px;
|
||||
}
|
||||
|
||||
.ue-gutenberg-settings-spinner > svg {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ue-gutenberg-widget-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ue-gutenberg-widget-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.ue-gutenberg-widget-loader {
|
||||
display: none;
|
||||
background: rgba(var(--ue-color-light-rgb), 0.6);
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.ue-gutenberg-widget-loader > svg {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ue-gutenberg-widget-placeholder {
|
||||
background: var(--ue-color-gray-lightest);
|
||||
text-align: center;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.ue-gutenberg-widget-placeholder > svg {
|
||||
margin: 0;
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
(function (wp) {
|
||||
var wbe = wp.blockEditor;
|
||||
var wc = wp.components;
|
||||
var wd = wp.data;
|
||||
var we = wp.element;
|
||||
var el = we.createElement;
|
||||
|
||||
// trigger block focus in case widget prevents clicks (carousels etc.)
|
||||
jQuery(document).on("click", ".ue-gutenberg-widget-wrapper", function () {
|
||||
jQuery(this).closest("[tabindex]").focus();
|
||||
});
|
||||
|
||||
// prevent link clicks inside widgets
|
||||
jQuery(document).on("click", ".ue-gutenberg-widget-wrapper a", function (event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
var edit = function (props) {
|
||||
var previewUrl = props.attributes._preview;
|
||||
|
||||
if (previewUrl)
|
||||
return el("img", { src: previewUrl, style: { width: "100%", height: "auto" } });
|
||||
|
||||
var blockProps = wbe.useBlockProps();
|
||||
var widgetContentState = we.useState(null);
|
||||
var settingsVisibleState = we.useState(false);
|
||||
var settingsContentState = we.useState(null);
|
||||
|
||||
var widgetRef = we.useRef(null);
|
||||
var widgetLoaderRef = we.useRef(null);
|
||||
var widgetRequestRef = we.useRef(null);
|
||||
var keepWidgetContentRef = we.useRef(false);
|
||||
var ucSettingsRef = we.useRef(new UniteSettingsUC());
|
||||
var ucHelperRef = we.useRef(new UniteCreatorHelper());
|
||||
|
||||
var isEditorSidebarOpened = wd.useSelect(function (select) {
|
||||
return select("core/edit-post").isEditorSidebarOpened();
|
||||
});
|
||||
|
||||
var activeGeneralSidebarName = wd.useSelect(function (select) {
|
||||
return select("core/edit-post").getActiveGeneralSidebarName();
|
||||
});
|
||||
|
||||
var previewDeviceType = wd.useSelect(function (select) {
|
||||
// since version 6.5
|
||||
var editor = select("core/editor");
|
||||
|
||||
if (editor.getDeviceType)
|
||||
return editor.getDeviceType();
|
||||
|
||||
// fallback
|
||||
return select("core/edit-post").__experimentalGetPreviewDeviceType();
|
||||
});
|
||||
|
||||
var widgetId = "ue-gutenberg-widget-" + props.clientId;
|
||||
var settingsId = "ue-gutenberg-settings-" + props.clientId;
|
||||
var settingsTempId = settingsId + "-temp";
|
||||
var settingsErrorId = settingsId + "-error";
|
||||
|
||||
var settingsVisible = settingsVisibleState[0];
|
||||
var setSettingsVisible = settingsVisibleState[1];
|
||||
|
||||
var settingsContent = settingsContentState[0];
|
||||
var setSettingsContent = settingsContentState[1];
|
||||
|
||||
var widgetContent = widgetContentState[0];
|
||||
var setWidgetContent = widgetContentState[1];
|
||||
|
||||
var ucSettings = ucSettingsRef.current;
|
||||
var ucHelper = ucHelperRef.current;
|
||||
|
||||
var initSettings = function () {
|
||||
ucSettings.destroy();
|
||||
|
||||
var settingsElement = getSettingsElement();
|
||||
|
||||
if (!settingsElement)
|
||||
return;
|
||||
|
||||
ucSettings.init(settingsElement);
|
||||
ucSettings.setSelectorWrapperID(widgetId);
|
||||
ucSettings.setResponsiveType(previewDeviceType.toLowerCase());
|
||||
|
||||
ucSettings.setEventOnChange(function () {
|
||||
saveSettings();
|
||||
});
|
||||
|
||||
ucSettings.setEventOnSelectorsChange(function () {
|
||||
keepWidgetContentRef.current = true;
|
||||
|
||||
saveSettings();
|
||||
|
||||
var css = ucSettings.getSelectorsCss();
|
||||
var includes = ucSettings.getSelectorsIncludes();
|
||||
|
||||
jQuery(widgetRef.current).find("[name=uc_selectors_css]").text(css);
|
||||
|
||||
if (includes) {
|
||||
var windowElement = getPreviewWindowElement();
|
||||
|
||||
ucHelper.putIncludes(windowElement, includes);
|
||||
}
|
||||
});
|
||||
|
||||
ucSettings.setEventOnResponsiveTypeChange(function (event, type) {
|
||||
var deviceType = type.charAt(0).toUpperCase() + type.substring(1);
|
||||
|
||||
wd.dispatch("core/edit-post").__experimentalSetPreviewDeviceType(deviceType);
|
||||
});
|
||||
|
||||
// restore current settings, otherwise apply current
|
||||
var values = getSettings();
|
||||
|
||||
if (values !== null)
|
||||
ucSettings.setValues(values);
|
||||
else
|
||||
saveSettings();
|
||||
};
|
||||
|
||||
var getSettings = function () {
|
||||
return props.attributes.data ? JSON.parse(props.attributes.data) : null;
|
||||
};
|
||||
|
||||
var saveSettings = function () {
|
||||
props.setAttributes({
|
||||
_rootId: ucHelper.getRandomString(5),
|
||||
data: JSON.stringify(ucSettings.getSettingsValues()),
|
||||
});
|
||||
};
|
||||
|
||||
var getSettingsElement = function () {
|
||||
if (!settingsContent)
|
||||
return;
|
||||
|
||||
var settingsElement = jQuery("#" + settingsId);
|
||||
var settingsTempElement = jQuery("#" + settingsTempId);
|
||||
|
||||
settingsTempElement.remove();
|
||||
|
||||
if (settingsElement.length)
|
||||
return settingsElement;
|
||||
|
||||
settingsTempElement = jQuery("<div id='" + settingsTempId + "' />")
|
||||
.hide()
|
||||
.html(settingsContent)
|
||||
.appendTo("body");
|
||||
|
||||
return settingsTempElement;
|
||||
};
|
||||
|
||||
var getPreviewWindowElement = function () {
|
||||
return window.frames["editor-canvas"] || window;
|
||||
};
|
||||
|
||||
var loadSettingsContent = function () {
|
||||
g_ucAdmin.setErrorMessageID(settingsErrorId);
|
||||
|
||||
g_ucAdmin.ajaxRequest("get_addon_settings_html", {
|
||||
id: props.attributes._id,
|
||||
config: getSettings(),
|
||||
}, function (response) {
|
||||
var html = g_ucAdmin.getVal(response, "html");
|
||||
|
||||
setSettingsContent(html);
|
||||
});
|
||||
};
|
||||
|
||||
var loadWidgetContent = function () {
|
||||
if (!widgetContent) {
|
||||
// load existing widgets from the page
|
||||
for (var index in g_gutenbergParsedBlocks) {
|
||||
var block = g_gutenbergParsedBlocks[index];
|
||||
|
||||
if (block.name === props.name) {
|
||||
setWidgetContent(block.html);
|
||||
|
||||
delete g_gutenbergParsedBlocks[index];
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (widgetRequestRef.current !== null)
|
||||
widgetRequestRef.current.abort();
|
||||
|
||||
var loaderElement = jQuery(widgetLoaderRef.current);
|
||||
|
||||
loaderElement.show();
|
||||
|
||||
widgetRequestRef.current = g_ucAdmin.ajaxRequest("get_addon_output_data", {
|
||||
id: props.attributes._id,
|
||||
root_id: props.attributes._rootId,
|
||||
settings: getSettings(),
|
||||
selectors: true,
|
||||
}, function (response) {
|
||||
var html = g_ucAdmin.getVal(response, "html");
|
||||
var includes = g_ucAdmin.getVal(response, "includes");
|
||||
var windowElement = getPreviewWindowElement();
|
||||
|
||||
ucHelper.putIncludes(windowElement, includes, function () {
|
||||
setWidgetContent(html);
|
||||
});
|
||||
}).always(function () {
|
||||
loaderElement.hide();
|
||||
});
|
||||
};
|
||||
|
||||
we.useEffect(function () {
|
||||
// load the settings on the block mount
|
||||
loadSettingsContent();
|
||||
|
||||
// remove loaded styles from the page
|
||||
jQuery("#unlimited-elements-styles").remove();
|
||||
|
||||
return function () {
|
||||
// destroy the settings on the block unmount
|
||||
ucSettings.destroy();
|
||||
};
|
||||
}, []);
|
||||
|
||||
we.useEffect(function () {
|
||||
// settings are visible if:
|
||||
// - the block is selected
|
||||
// - the sidebar is opened
|
||||
// - the "block" tab is selected
|
||||
setSettingsVisible(
|
||||
props.isSelected
|
||||
&& isEditorSidebarOpened
|
||||
&& activeGeneralSidebarName === "edit-post/block"
|
||||
);
|
||||
}, [props.isSelected, isEditorSidebarOpened, activeGeneralSidebarName]);
|
||||
|
||||
we.useEffect(function () {
|
||||
if (ucSettings.isInited())
|
||||
ucSettings.setResponsiveType(previewDeviceType.toLowerCase());
|
||||
}, [previewDeviceType]);
|
||||
|
||||
we.useEffect(function () {
|
||||
if (!settingsVisible)
|
||||
return;
|
||||
|
||||
initSettings();
|
||||
}, [settingsVisible]);
|
||||
|
||||
we.useEffect(function () {
|
||||
if (!settingsContent)
|
||||
return;
|
||||
|
||||
initSettings();
|
||||
}, [settingsContent]);
|
||||
|
||||
we.useEffect(function () {
|
||||
if (!widgetContent)
|
||||
return;
|
||||
|
||||
// insert the widget html manually for the inline script to work
|
||||
jQuery(widgetRef.current).html(widgetContent);
|
||||
}, [widgetContent]);
|
||||
|
||||
we.useEffect(function () {
|
||||
if (keepWidgetContentRef.current) {
|
||||
keepWidgetContentRef.current = false;
|
||||
} else {
|
||||
loadWidgetContent();
|
||||
}
|
||||
}, [props.attributes.data]);
|
||||
|
||||
var settings = el(
|
||||
wbe.InspectorControls, {},
|
||||
el("div", { className: "ue-gutenberg-settings-error", id: settingsErrorId }),
|
||||
settingsContent && el("div", { id: settingsId, dangerouslySetInnerHTML: { __html: settingsContent } }),
|
||||
!settingsContent && el("div", { className: "ue-gutenberg-settings-spinner" }, el(wc.Spinner)),
|
||||
);
|
||||
|
||||
var widget = el(
|
||||
"div", { className: "ue-gutenberg-widget-wrapper" },
|
||||
widgetContent && el("div", { className: "ue-gutenberg-widget-content", id: widgetId, ref: widgetRef }),
|
||||
widgetContent && el("div", { className: "ue-gutenberg-widget-loader", ref: widgetLoaderRef }, el(wc.Spinner)),
|
||||
!widgetContent && el("div", { className: "ue-gutenberg-widget-placeholder" }, el(wc.Spinner)),
|
||||
);
|
||||
|
||||
return el("div", blockProps, settings, widget);
|
||||
};
|
||||
|
||||
for (var name in g_gutenbergBlocks) {
|
||||
var block = g_gutenbergBlocks[name];
|
||||
var args = jQuery.extend(block, { edit: edit });
|
||||
|
||||
// convert the svg icon to element
|
||||
if (args.icon && args.icon.indexOf("<svg ") === 0)
|
||||
args.icon = el("span", { dangerouslySetInnerHTML: { __html: args.icon } });
|
||||
|
||||
wp.blocks.registerBlockType(name, args);
|
||||
}
|
||||
})(wp);
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 376 B |
|
After Width: | Height: | Size: 212 B |
|
After Width: | Height: | Size: 208 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 207 B |
|
After Width: | Height: | Size: 262 B |
|
After Width: | Height: | Size: 262 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,539 @@
|
||||
/*! jQuery UI - v1.9.2 - 2012-12-05
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
||||
* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
||||
|
||||
----------------------------------*/
|
||||
.unite-ui .ui-helper-hidden { display: none; }
|
||||
.unite-ui .ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
|
||||
.unite-ui .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.unite-ui .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
||||
.unite-ui .ui-helper-clearfix:after { clear: both; }
|
||||
.unite-ui .ui-helper-clearfix { zoom: 1; }
|
||||
.unite-ui .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.unite-ui .ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.unite-ui .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
/*
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
*/
|
||||
|
||||
.unite-ui .ui-resizable,
|
||||
.unite-ui.ui-resizable{ position: relative;}
|
||||
.unite-ui .ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
|
||||
.unite-ui .ui-resizable-disabled .ui-resizable-handle,
|
||||
.unite-ui .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
|
||||
.unite-ui .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.unite-ui .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.unite-ui .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.unite-ui .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.unite-ui .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.unite-ui .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.unite-ui .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.unite-ui .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
.unite-ui .ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; }
|
||||
.unite-ui .ui-accordion .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.unite-ui .ui-accordion .ui-accordion-noicons { padding-left: .7em; }
|
||||
.unite-ui .ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.unite-ui .ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.unite-ui .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; }
|
||||
.unite-ui .ui-autocomplete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
* html .unite-ui .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
.unite-ui .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.unite-ui .ui-button, .unite-ui .ui-button:link, .unite-ui .ui-button:visited, .unite-ui .ui-button:hover, .unite-ui .ui-button:active { text-decoration: none; }
|
||||
.unite-ui .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
.unite-ui button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.unite-ui .ui-button-icons-only { width: 3.4em; }
|
||||
.unite-ui button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.unite-ui .ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.unite-ui .ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.unite-ui .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.unite-ui .ui-button-text-icon-primary .ui-button-text,
|
||||
.unite-ui .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.unite-ui .ui-button-text-icon-secondary .ui-button-text,
|
||||
.unite-ui .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.unite-ui .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
.unite-ui input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.unite-ui .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; margin-top: -8px; }
|
||||
.unite-ui .ui-button-icon-only .ui-icon { margin-left: -8px; }
|
||||
.unite-ui .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.unite-ui .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.unite-ui .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.unite-ui .ui-buttonset { margin-right: 7px; }
|
||||
.unite-ui .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
.unite-ui button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
.unite-ui .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-prev,
|
||||
.unite-ui .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-prev-hover,
|
||||
.unite-ui .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-prev span,
|
||||
.unite-ui .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.unite-ui .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.unite-ui .ui-datepicker select.ui-datepicker-month,
|
||||
.unite-ui .ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.unite-ui .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.unite-ui .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.unite-ui .ui-datepicker td { border: 0; padding: 1px; }
|
||||
.unite-ui .ui-datepicker td span,
|
||||
.unite-ui .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.unite-ui .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.unite-ui .ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.unite-ui .ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.unite-ui .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.unite-ui .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.unite-ui .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.unite-ui .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.unite-ui .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.unite-ui .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.unite-ui .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.unite-ui .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.unite-ui .ui-datepicker-rtl { direction: rtl; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.unite-ui .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.unite-ui .ui-datepicker-cover {
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
||||
|
||||
.unite-ui.ui-dialog {
|
||||
position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden;
|
||||
z-index:100102 !important;
|
||||
}
|
||||
|
||||
div.mce-inline-toolbar-grp{
|
||||
z-index: 100103 !important;
|
||||
}
|
||||
|
||||
|
||||
.unite-ui.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.unite-ui.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.unite-ui.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.unite-ui.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.unite-ui.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
|
||||
.unite-ui.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; cursor:default; }
|
||||
.unite-ui.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; cursor:default; }
|
||||
.unite-ui.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.unite-ui.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.unite-ui.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
|
||||
.unite-ui.ui-draggable-handle, .unite-ui .ui-draggable-handle { cursor: move; }
|
||||
.unite-ui .ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
|
||||
.unite-ui .ui-menu .ui-menu { margin-top: -3px; position: absolute; }
|
||||
.unite-ui .ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
|
||||
.unite-ui .ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
|
||||
.unite-ui .ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
|
||||
.unite-ui .ui-menu .ui-menu-item a.ui-state-focus,
|
||||
.unite-ui .ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
|
||||
|
||||
.unite-ui .ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
|
||||
.unite-ui .ui-menu .ui-state-disabled a { cursor: default; }
|
||||
|
||||
/* icon support */
|
||||
.unite-ui .ui-menu-icons { position: relative; }
|
||||
.unite-ui .ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
|
||||
|
||||
/* left-aligned */
|
||||
.unite-ui .ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
|
||||
|
||||
/* right-aligned */
|
||||
.unite-ui .ui-menu .ui-menu-icon { position: static; float: right; }
|
||||
.unite-ui .ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.unite-ui .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }.ui-slider { position: relative; text-align: left; }
|
||||
.unite-ui .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.unite-ui .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.unite-ui .ui-slider-horizontal { height: .8em; }
|
||||
.unite-ui .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.unite-ui .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.unite-ui .ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.unite-ui .ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.unite-ui .ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.unite-ui .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.unite-ui .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.unite-ui .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.unite-ui .ui-slider-vertical .ui-slider-range-max { top: 0; }.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
|
||||
.unite-ui .ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
|
||||
.unite-ui .ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
|
||||
.unite-ui .ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
|
||||
.unite-ui .ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
|
||||
.unite-ui .ui-spinner-up { top: 0; }
|
||||
.unite-ui .ui-spinner-down { bottom: 0; }
|
||||
|
||||
/* TR overrides */
|
||||
.unite-ui .ui-spinner .ui-icon-triangle-1-s {
|
||||
/* need to fix icons sprite */
|
||||
background-position:-65px -16px;
|
||||
}
|
||||
.unite-ui .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.unite-ui .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.unite-ui .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }
|
||||
.unite-ui .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.unite-ui .ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }
|
||||
.unite-ui .ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
|
||||
.unite-ui .ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.unite-ui .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.unite-ui .ui-tooltip {
|
||||
padding: 8px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
max-width: 300px;
|
||||
-webkit-box-shadow: 0 0 5px #aaa;
|
||||
box-shadow: 0 0 5px #aaa;
|
||||
}
|
||||
/* Fades and background-images don't work well together in IE6, drop the image */
|
||||
* html .unite-ui .ui-tooltip {
|
||||
background-image: none;
|
||||
}
|
||||
body .unite-ui .ui-tooltip { border-width: 2px; }
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.unite-ui.ui-widget, .unite-ui .ui-widget{ font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
||||
|
||||
.unite-ui.ui-widget .ui-widget, .unite-ui .ui-widget .ui-widget { font-size: 1em; }
|
||||
.unite-ui.ui-widget input, .unite-ui .ui-widget input,
|
||||
.unite-ui.ui-widget select, .unite-ui .ui-widget select,
|
||||
.unite-ui.ui-widget textarea, .unite-ui .ui-widget textarea,
|
||||
.unite-ui.ui-widget button, .unite-ui .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
||||
.unite-ui.ui-widget-content, .unite-ui .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
||||
.unite-ui.ui-widget-content a, .unite-ui .ui-widget-content a { color: #222222; }
|
||||
.unite-ui.ui-widget-header, .unite-ui .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
||||
.unite-ui.ui-widget-header a, .unite-ui .ui-widget-header a { color: #222222; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.unite-ui .ui-state-default,
|
||||
.unite-ui .ui-widget-content .ui-state-default,
|
||||
.unite-ui .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
||||
.unite-ui .ui-state-default a,
|
||||
.unite-ui .ui-state-default a:link,
|
||||
.unite-ui .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
||||
.unite-ui .ui-state-hover,
|
||||
.unite-ui .ui-widget-content .ui-state-hover,
|
||||
.unite-ui .ui-widget-header .ui-state-hover,
|
||||
.unite-ui .ui-state-focus,
|
||||
.unite-ui .ui-widget-content .ui-state-focus,
|
||||
.unite-ui .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.unite-ui .ui-state-hover a,
|
||||
.unite-ui .ui-state-hover a:hover,
|
||||
.unite-ui .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
|
||||
.unite-ui .ui-state-active,
|
||||
.unite-ui .ui-widget-content .ui-state-active,
|
||||
.unite-ui .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.unite-ui .ui-state-active a,
|
||||
.unite-ui .ui-state-active a:link,
|
||||
.unite-ui .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.unite-ui .ui-state-highlight,
|
||||
.unite-ui .ui-widget-content .ui-state-highlight,
|
||||
.unite-ui .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
||||
.unite-ui .ui-state-highlight a,
|
||||
.unite-ui .ui-widget-content .ui-state-highlight a,
|
||||
.unite-ui .ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.unite-ui .ui-state-error,
|
||||
.unite-ui .ui-widget-content .ui-state-error,
|
||||
.unite-ui .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
||||
.unite-ui .ui-state-error a,
|
||||
.unite-ui .ui-widget-content .ui-state-error a,
|
||||
.unite-ui .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
||||
.unite-ui .ui-state-error-text,
|
||||
.unite-ui .ui-widget-content .ui-state-error-text,
|
||||
.unite-ui .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
||||
.unite-ui .ui-priority-primary,
|
||||
.unite-ui .ui-widget-content .ui-priority-primary,
|
||||
.unite-ui .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.unite-ui .ui-priority-secondary,
|
||||
.unite-ui .ui-widget-content .ui-priority-secondary,
|
||||
.unite-ui .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.unite-ui .ui-state-disabled,
|
||||
.unite-ui .ui-widget-content .ui-state-disabled,
|
||||
.unite-ui .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
.unite-ui .ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.unite-ui .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
||||
.unite-ui.ui-widget-content .ui-icon.
|
||||
.unite-ui .ui-widget-content .ui-icon{background-image: url(images/ui-icons_222222_256x240.png); }
|
||||
|
||||
.unite-ui .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
||||
.unite-ui .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
|
||||
.unite-ui .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
||||
.unite-ui .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
||||
.unite-ui .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
|
||||
.unite-ui .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.unite-ui .ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.unite-ui .ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.unite-ui .ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.unite-ui .ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.unite-ui .ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.unite-ui .ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.unite-ui .ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.unite-ui .ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.unite-ui .ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.unite-ui .ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.unite-ui .ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.unite-ui .ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.unite-ui .ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.unite-ui .ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.unite-ui .ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.unite-ui .ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.unite-ui .ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.unite-ui .ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.unite-ui .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.unite-ui .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.unite-ui .ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.unite-ui .ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.unite-ui .ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.unite-ui .ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.unite-ui .ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.unite-ui .ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.unite-ui .ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.unite-ui .ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.unite-ui .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.unite-ui .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.unite-ui .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.unite-ui .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.unite-ui .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.unite-ui .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.unite-ui .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.unite-ui .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.unite-ui .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.unite-ui .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.unite-ui .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.unite-ui .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.unite-ui .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.unite-ui .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.unite-ui .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.unite-ui .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.unite-ui .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.unite-ui .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.unite-ui .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.unite-ui .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.unite-ui .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.unite-ui .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.unite-ui .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.unite-ui .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.unite-ui .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.unite-ui .ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.unite-ui .ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.unite-ui .ui-icon-extlink { background-position: -32px -80px; }
|
||||
.unite-ui .ui-icon-newwin { background-position: -48px -80px; }
|
||||
.unite-ui .ui-icon-refresh { background-position: -64px -80px; }
|
||||
.unite-ui .ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.unite-ui .ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.unite-ui .ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.unite-ui .ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.unite-ui .unite-ui .ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.unite-ui .ui-icon-document { background-position: -32px -96px; }
|
||||
.unite-ui .ui-icon-document-b { background-position: -48px -96px; }
|
||||
.unite-ui .ui-icon-note { background-position: -64px -96px; }
|
||||
.unite-ui .ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.unite-ui .ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.unite-ui .ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.unite-ui .ui-icon-comment { background-position: -128px -96px; }
|
||||
.unite-ui .ui-icon-person { background-position: -144px -96px; }
|
||||
.unite-ui .ui-icon-print { background-position: -160px -96px; }
|
||||
.unite-ui .ui-icon-trash { background-position: -176px -96px; }
|
||||
.unite-ui .ui-icon-locked { background-position: -192px -96px; }
|
||||
.unite-ui .ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.unite-ui .ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.unite-ui .ui-icon-tag { background-position: -240px -96px; }
|
||||
.unite-ui .ui-icon-home { background-position: 0 -112px; }
|
||||
.unite-ui .ui-icon-flag { background-position: -16px -112px; }
|
||||
.unite-ui .ui-icon-calendar { background-position: -32px -112px; }
|
||||
.unite-ui .ui-icon-cart { background-position: -48px -112px; }
|
||||
.unite-ui .ui-icon-pencil { background-position: -64px -112px; }
|
||||
.unite-ui .ui-icon-clock { background-position: -80px -112px; }
|
||||
.unite-ui .ui-icon-disk { background-position: -96px -112px; }
|
||||
.unite-ui .ui-icon-calculator { background-position: -112px -112px; }
|
||||
.unite-ui .ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.unite-ui .ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.unite-ui .ui-icon-search { background-position: -160px -112px; }
|
||||
.unite-ui .ui-icon-wrench { background-position: -176px -112px; }
|
||||
.unite-ui .ui-icon-gear { background-position: -192px -112px; }
|
||||
.unite-ui .ui-icon-heart { background-position: -208px -112px; }
|
||||
.unite-ui .ui-icon-star { background-position: -224px -112px; }
|
||||
.unite-ui .ui-icon-link { background-position: -240px -112px; }
|
||||
.unite-ui .ui-icon-cancel { background-position: 0 -128px; }
|
||||
.unite-ui .ui-icon-plus { background-position: -16px -128px; }
|
||||
.unite-ui .ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.unite-ui .ui-icon-minus { background-position: -48px -128px; }
|
||||
.unite-ui .ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.unite-ui .ui-icon-close { background-position: -80px -128px; }
|
||||
.unite-ui .ui-icon-closethick { background-position: -96px -128px; }
|
||||
.unite-ui .ui-icon-key { background-position: -112px -128px; }
|
||||
.unite-ui .ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.unite-ui .ui-icon-scissors { background-position: -144px -128px; }
|
||||
.unite-ui .ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.unite-ui .ui-icon-copy { background-position: -176px -128px; }
|
||||
.unite-ui .ui-icon-contact { background-position: -192px -128px; }
|
||||
.unite-ui .ui-icon-image { background-position: -208px -128px; }
|
||||
.unite-ui .ui-icon-video { background-position: -224px -128px; }
|
||||
.unite-ui .ui-icon-script { background-position: -240px -128px; }
|
||||
.unite-ui .ui-icon-alert { background-position: 0 -144px; }
|
||||
.unite-ui .ui-icon-info { background-position: -16px -144px; }
|
||||
.unite-ui .ui-icon-notice { background-position: -32px -144px; }
|
||||
.unite-ui .ui-icon-help { background-position: -48px -144px; }
|
||||
.unite-ui .ui-icon-check { background-position: -64px -144px; }
|
||||
.unite-ui .ui-icon-bullet { background-position: -80px -144px; }
|
||||
.unite-ui .ui-icon-radio-on { background-position: -96px -144px; }
|
||||
.unite-ui .ui-icon-radio-off { background-position: -112px -144px; }
|
||||
.unite-ui .ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.unite-ui .ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.unite-ui .ui-icon-play { background-position: 0 -160px; }
|
||||
.unite-ui .ui-icon-pause { background-position: -16px -160px; }
|
||||
.unite-ui .ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.unite-ui .ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.unite-ui .ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.unite-ui .ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.unite-ui .ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.unite-ui .ui-icon-stop { background-position: -96px -160px; }
|
||||
.unite-ui .ui-icon-eject { background-position: -112px -160px; }
|
||||
.unite-ui .ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.unite-ui .ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.unite-ui .ui-icon-power { background-position: 0 -176px; }
|
||||
.unite-ui .ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.unite-ui .ui-icon-signal { background-position: -32px -176px; }
|
||||
.unite-ui .ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.unite-ui .ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.unite-ui .ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.unite-ui .ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.unite-ui .ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.unite-ui .ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.unite-ui .ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.unite-ui .ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.unite-ui .ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.unite-ui .ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.unite-ui .ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.unite-ui .ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.unite-ui .ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.unite-ui .ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.unite-ui .ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.unite-ui .ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.unite-ui .ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.unite-ui .ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.unite-ui .ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.unite-ui .ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.unite-ui .ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.unite-ui .ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.unite-ui .ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.unite-ui .ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.unite-ui .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.unite-ui .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.unite-ui .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.unite-ui .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.unite-ui .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.unite-ui .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.unite-ui.ui-corner-all, .unite-ui .ui-corner-all,
|
||||
.unite-ui.ui-corner-top, .unite-ui .ui-corner-top,
|
||||
.unite-ui.ui-corner-left, .unite-ui .ui-corner-left,
|
||||
.unite-ui.ui-corner-tl, .unite-ui .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.unite-ui.ui-corner-all, .unite-ui .ui-corner-all,
|
||||
.unite-ui.ui-corner-top, .unite-ui .ui-corner-top,
|
||||
.unite-ui.ui-corner-right, .unite-ui .ui-corner-right,
|
||||
.unite-ui.ui-corner-tr, .unite-ui .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.unite-ui.ui-corner-all, .unite-ui .ui-corner-all,
|
||||
.unite-ui.ui-corner-bottom, .unite-ui .ui-corner-bottom,
|
||||
.unite-ui.ui-corner-left, .unite-ui .ui-corner-left,
|
||||
.unite-ui.ui-corner-bl, .unite-ui .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.unite-ui.ui-corner-all, .unite-ui .ui-corner-all,
|
||||
.unite-ui.ui-corner-bottom, .unite-ui .ui-corner-bottom,
|
||||
.unite-ui.ui-corner-right, .unite-ui .ui-corner-right,
|
||||
.unite-ui.ui-corner-br, .unite-ui .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
/*
|
||||
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
|
||||
*/
|
||||
.unite-ui .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
||||
@@ -0,0 +1,518 @@
|
||||
|
||||
.______________REMOVE_ELEMENTS____________{}
|
||||
|
||||
.unite-view-addons_elementor{
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.unite-view-addons_elementor .content_wrapper{
|
||||
xposition:fixed;
|
||||
xtop:50px;
|
||||
}
|
||||
|
||||
.unite-view-addons_elementor .unite_header_wrapper{
|
||||
xposition:fixed;
|
||||
}
|
||||
|
||||
.toplevel_page_unlimitedelements .update-nag{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.unite-plugin-version-line.unite-view-addons_elementor{
|
||||
xdisplay:none;
|
||||
}
|
||||
|
||||
body.unite-view-addons_elementor #footer-thankyou,
|
||||
body.unite-view-addons_elementor #footer-upgrade{
|
||||
xdisplay:none;
|
||||
}
|
||||
|
||||
body.unite-view-addons_elementor .ui-widget-overlay{
|
||||
background-color:#000000 !important;
|
||||
opacity:0.7;
|
||||
}
|
||||
|
||||
|
||||
.______________GENERAL_LINKS____________{}
|
||||
|
||||
a[href="admin.php?page=blox_page_builder"]{
|
||||
color:#F04C40 !important;
|
||||
}
|
||||
|
||||
a[href="admin.php?page=blox_page_builder"]:hover{
|
||||
color:#F2665C !important;
|
||||
}
|
||||
|
||||
/*
|
||||
a.uc-link-gounlimited{
|
||||
color:#128F0F !important;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
a.uc-link-gounlimited:hover{
|
||||
color:#1BD317 !important;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
.______________HELPERS____________{}
|
||||
|
||||
.ue-flex-center {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.______________GENERAL____________{}
|
||||
|
||||
.unite-div-debug{
|
||||
padding-left:180px;
|
||||
}
|
||||
|
||||
.unite-view-wrapper {
|
||||
margin-top: 0;
|
||||
margin-left: -20px;
|
||||
}
|
||||
|
||||
body.uc-blank-preview .unite-view-wrapper {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
body.uc-blank-preview .unite-div-debug {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
body.post-type-page .unite-div-debug {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
left: 180px;
|
||||
width: 600px;
|
||||
height: 200px;
|
||||
overflow: auto;
|
||||
background-color: #eeeeee;
|
||||
border: 1px solid lightgray;
|
||||
padding: 5px;
|
||||
z-index: 999999;
|
||||
}
|
||||
|
||||
.uc-update-plugin-wrapper{
|
||||
text-align:right;
|
||||
padding-top:10px;
|
||||
}
|
||||
|
||||
.ue-root {
|
||||
font-family: "Inter", sans-serif;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
line-height: 1.3em;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ue-root * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ue-root a {
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
transition: all 200ms;
|
||||
}
|
||||
|
||||
.ue-content-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* @media (max-width: 600px) { */
|
||||
/* .ue-content-wrapper { */
|
||||
/* padding: 20px; */
|
||||
/* } */
|
||||
/* } */
|
||||
|
||||
|
||||
.______________BUTTONS____________{}
|
||||
|
||||
.ue-btn {
|
||||
display: inline-flex;
|
||||
padding: 16px 28px;
|
||||
border-radius: 8px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.ue-btn:hover {
|
||||
color: #ffffff;
|
||||
background-color: #2959f9;
|
||||
}
|
||||
|
||||
.ue-btn img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.ue-btn {
|
||||
padding: 10px 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.______________HEADER____________{}
|
||||
|
||||
.ue-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
background-color: #ffffff;
|
||||
padding: 20px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ue-header-logo {
|
||||
width: 224px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.ue-header-buttons {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.ue-header-buttons .ue-view-demo-btn {
|
||||
color: #2959f9;
|
||||
border: 1px solid #2959f9;
|
||||
}
|
||||
|
||||
.ue-header-buttons .ue-view-demo-btn:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.ue-header-buttons .ue-view-demo-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: #2959f9;
|
||||
transition: all 200ms;
|
||||
}
|
||||
|
||||
.ue-header-buttons .ue-view-demo-btn:hover svg {
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
||||
.ue-header-buttons .ue-go-pro-btn {
|
||||
background: linear-gradient(196deg, #2959f9 20.27%, #6111df 73.21%);
|
||||
color: #ffffff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.ue-header-buttons .ue-go-pro-btn:hover {
|
||||
background: linear-gradient(196deg, #2959f9 20.27%, #2959f9 73.21%);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.ue-header-buttons .ue-go-pro-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.ue-header {
|
||||
flex-wrap: wrap;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.ue-header-logo {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.ue-header-buttons {
|
||||
gap: 10px
|
||||
}
|
||||
}
|
||||
|
||||
.______________BLACK-FRIDAY____________{}
|
||||
|
||||
|
||||
.ue-header__bf{
|
||||
background-color:#000000 !important;
|
||||
|
||||
padding-top:10px;
|
||||
padding-bottom:0px;
|
||||
|
||||
align-items:stretch;
|
||||
}
|
||||
|
||||
.ue-header__inner{
|
||||
display:flex;
|
||||
justify-content:space-between;
|
||||
align-items:stretch;
|
||||
width:100%;
|
||||
|
||||
background-image:url('http://via.placeholder.com/831x110');
|
||||
background-repeat:no-repeat;
|
||||
background-size:contain;
|
||||
background-position:300px bottom;
|
||||
|
||||
}
|
||||
|
||||
.ue-header__bf .ue-header__logo{
|
||||
|
||||
margin-top:20px;
|
||||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
.ue-header__bf .ue-go-pro-btn{
|
||||
|
||||
background:linear-gradient(196deg, #ffffff 20.27%, #fafafa 73.21%);
|
||||
color:#2959f9;
|
||||
}
|
||||
.ue-header__bf .ue-go-pro-btn svg path{
|
||||
fill: #2959f9;
|
||||
}
|
||||
|
||||
.ue-header__bf .ue-go-pro-btn:hover svg path{
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
||||
.ue-header__bf .ue-view-demo-btn{
|
||||
display:none;
|
||||
border-color:#ffffff;
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
.ue-header__bf .ue-view-demo-btn svg path{
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.______________MENU____________{}
|
||||
|
||||
.ue-menu {
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
gap: 16px;
|
||||
padding: 14px;
|
||||
border-radius: 12px;
|
||||
background: #ffffff;
|
||||
margin-bottom: 20px;
|
||||
flex-wrap: wrap
|
||||
}
|
||||
|
||||
.ue-menu-item {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
font-size: 16px;
|
||||
color: #797b80;
|
||||
border-radius: 8px;
|
||||
transition: all 200ms;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ue-menu-item svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
fill: #797b80;
|
||||
transition: all 200ms;
|
||||
}
|
||||
|
||||
.ue-menu-item.ue-active {
|
||||
color: #2959f9;
|
||||
background-color: rgba(41, 89, 249, 0.04);
|
||||
}
|
||||
|
||||
.ue-menu-item.ue-active svg {
|
||||
fill: #2959f9;
|
||||
}
|
||||
|
||||
.ue-menu-item:hover {
|
||||
color: #07080f;
|
||||
background: rgba(7, 8, 15, 0.02);
|
||||
}
|
||||
|
||||
.ue-menu-item:hover svg {
|
||||
fill: #07080f;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.ue-menu {
|
||||
flex-direction: column;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.______________DIALOG_IMAGE_SELECT____________{}
|
||||
|
||||
.uc-dialog-image-select-inner{
|
||||
height:350px;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
.uc-dialog-image-select-bottom{
|
||||
text-align:center;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
#uc_dialog_image_select_button{
|
||||
margin-top:15px;
|
||||
margin-bottom:10px;
|
||||
font-size:16px;
|
||||
font-weight:bold;
|
||||
height:34px;
|
||||
line-height:35px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
}
|
||||
|
||||
|
||||
.______________LAYOUTS_LIST____________{}
|
||||
|
||||
.wrap .page-title-action.uc-button-catalog,
|
||||
.wrap .page-title-action.uc-button-import{
|
||||
margin-left:30px;
|
||||
color:#515151;
|
||||
}
|
||||
|
||||
.wrap .page-title-action.uc-button-catalog{
|
||||
margin-left:10px;
|
||||
}
|
||||
|
||||
|
||||
.wrap .page-title-action.uc-button-catalog:hover,
|
||||
.wrap .page-title-action.uc-button-import:hover{
|
||||
background-color:#DEDEDE;
|
||||
border-color:#CDCDCD;
|
||||
}
|
||||
|
||||
.row-actions .loader_text,
|
||||
.row-actions .blox_edit_page_visual .uc-button-visualedit{
|
||||
color:#000000;
|
||||
}
|
||||
|
||||
.row-actions .blox_edit_page_visual .uc-button-visualedit:hover{
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
body.edit-php .unite_error_message,
|
||||
body.edit-php .unite_success_message{
|
||||
position:fixed;
|
||||
bottom:5px;
|
||||
right:5px;
|
||||
width:auto;
|
||||
max-width:500px;
|
||||
min-width:200px;
|
||||
}
|
||||
|
||||
.______________POSTS_PAGE____________{}
|
||||
|
||||
body.uc-blox-page #postdivrich,
|
||||
body.uc-blox-page .editor-block-list__layout{
|
||||
visibility:hidden;
|
||||
opacity:0;
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
||||
.uc-edit-post-blox-page-wrapper{
|
||||
display:none;
|
||||
margin-bottom:30px;
|
||||
padding-bottom:30px;
|
||||
border-bottom:1px dashed gray;
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
body.gutenberg-editor-page .uc-edit-post-blox-page-wrapper{
|
||||
padding-left:20px;
|
||||
padding-top:100px;
|
||||
}
|
||||
|
||||
.uc-edit-post-blox-page-wrapper .uc-blox-title{
|
||||
padding-bottom:20px;
|
||||
font-size:18px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.uc-edit-post-blox-page-wrapper .uc-blox-title .uc-blox-subtitle{
|
||||
font-size:14px;
|
||||
font-weight:normal;
|
||||
padding-top:8px;
|
||||
}
|
||||
|
||||
.uc-edit-post-blox-page-wrapper .uc-blox-title.uc-title-blox-landing-page{
|
||||
display:none;
|
||||
}
|
||||
|
||||
body.uc-blox-landing-page .uc-blox-title.uc-title-blox-landing-page{
|
||||
display:block;
|
||||
}
|
||||
|
||||
body.uc-blox-landing-page .uc-blox-title.uc-title-bloxpage{
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
||||
body.uc-blox-page .uc-edit-post-button-to-blox{
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
body.uc-blox-page .uc-edit-post-blox-page-wrapper{
|
||||
display:block;
|
||||
}
|
||||
|
||||
.uc-edit-post-blox-page-wrapper.uc-hidden{
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
.uc-edit-post-button-return-to-wp{
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
body.uc-blox-page .uc-edit-post-button-return-to-wp{
|
||||
display:inline-block !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.______________LAYOUTS_IMPORT_METABOX____________{}
|
||||
|
||||
.uc-metabox-import-layout{
|
||||
padding-top:10px;
|
||||
height:40px;
|
||||
}
|
||||
|
||||
.______________EDITOR_SETTING____________{}
|
||||
|
||||
.unite-editor-setting-wrapper.unite-editor-wp{
|
||||
min-width:500px;
|
||||
}
|
||||
|
||||
.unite-settings-sidebar .unite-editor-wp{
|
||||
min-width:0px !important;
|
||||
}
|
||||
|
||||
.______________DASHBOARD_WIDGET____________{}
|
||||
|
||||
.blox-dashboard-widget-wrapper .uc-dashboard-section{
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
.uc-dashboard-widget-release-iframe{
|
||||
margin-top:5px;
|
||||
width:100%;
|
||||
min-height:300px;
|
||||
border:1px solid lightgray;
|
||||
}
|
||||
|
||||
.uc-dashboard-widget-release-log{
|
||||
margin-top:10px;
|
||||
}
|
||||
@@ -0,0 +1,922 @@
|
||||
|
||||
//global variables
|
||||
var g_dataProviderUC = {
|
||||
pathSelectImages: null,
|
||||
pathSelectImagesBase:null,
|
||||
urlSelectImagesBase:null,
|
||||
objBrowserImages: null,
|
||||
objBrowserAudio: null
|
||||
};
|
||||
|
||||
function UniteProviderAdminUC(){
|
||||
|
||||
var t = this;
|
||||
var g_parent;
|
||||
|
||||
var g_temp = {
|
||||
keyUrlAssets: "[url_assets]/",
|
||||
};
|
||||
|
||||
/**
|
||||
* open new add image dialog
|
||||
*/
|
||||
function openNewMediaDialog(title,onInsert,isMultiple, type){
|
||||
|
||||
if(isMultiple == undefined)
|
||||
isMultiple = false;
|
||||
|
||||
// Media Library params
|
||||
var frame = wp.media({
|
||||
//frame: 'post',
|
||||
//state: 'insert',
|
||||
title : title,
|
||||
multiple : isMultiple,
|
||||
library : { type : type},
|
||||
button : { text : 'Insert' }
|
||||
});
|
||||
|
||||
// Runs on select
|
||||
frame.on('select',function(){
|
||||
var objSettings = frame.state().get('selection').first().toJSON();
|
||||
|
||||
var selection = frame.state().get('selection');
|
||||
var arrImages = [];
|
||||
|
||||
if(isMultiple == true){ //return image object when multiple
|
||||
selection.map( function( attachment ) {
|
||||
var objImage = attachment.toJSON();
|
||||
var obj = {};
|
||||
obj.url = objImage.url;
|
||||
obj.id = objImage.id;
|
||||
arrImages.push(obj);
|
||||
});
|
||||
onInsert(arrImages);
|
||||
}else{ //return image url and id - when single
|
||||
onInsert(objSettings.url, objSettings.id);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Open ML
|
||||
frame.open();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open new image dialog
|
||||
*/
|
||||
function openNewImageDialog(title, onInsert, isMultiple){
|
||||
|
||||
openNewMediaDialog(title, onInsert, isMultiple, "image");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open audio select dialog
|
||||
*/
|
||||
function openAudioDialog(title, onInsert, isMultiple){
|
||||
|
||||
openNewMediaDialog(title, onInsert, isMultiple, "audio");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open old add image dialog
|
||||
*/
|
||||
function openOldImageDialog(title,onInsert){
|
||||
var params = "type=image&post_id=0&TB_iframe=true";
|
||||
|
||||
params = encodeURI(params);
|
||||
|
||||
tb_show(title,'media-upload.php?'+params);
|
||||
|
||||
window.send_to_editor = function(html) {
|
||||
tb_remove();
|
||||
var urlImage = jQuery(html).attr('src');
|
||||
if(!urlImage || urlImage == undefined || urlImage == "")
|
||||
var urlImage = jQuery('img',html).attr('src');
|
||||
|
||||
onInsert(urlImage,""); //return empty id, it can be changed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test media editor
|
||||
*/
|
||||
function testMediaEditor(){
|
||||
|
||||
/*
|
||||
trace("open dialog");
|
||||
trace(wp.media.gallery);
|
||||
trace(wp.media);
|
||||
|
||||
var frameStates = {
|
||||
create: 'gallery',
|
||||
add: 'gallery-library',
|
||||
edit: 'gallery-edit'
|
||||
};
|
||||
|
||||
// Open the media dialog
|
||||
|
||||
var attachments = wp.media.query({
|
||||
orderby: 'post__in',
|
||||
order: 'ASC',
|
||||
type: 'image',
|
||||
});
|
||||
|
||||
var objSelection = new wp.media.model.Selection(attachments.models, {
|
||||
props: attachments.props.toJSON(),
|
||||
multiple: true
|
||||
});
|
||||
|
||||
|
||||
var options = {
|
||||
title: 'Add Gallery',
|
||||
state:"gallery", //gallery-library, gallery-edit
|
||||
library: {
|
||||
orderby:"date",
|
||||
query:"true"
|
||||
},
|
||||
multiple: true,
|
||||
modal:true,
|
||||
mode:["select"],
|
||||
// selection: objSelection,
|
||||
uploader:true
|
||||
};
|
||||
|
||||
//var objFrame = wp.media(options);
|
||||
//objFrame.open();
|
||||
|
||||
|
||||
/*
|
||||
wp.media()
|
||||
// On select, get the selected images
|
||||
.on('select', function() {
|
||||
|
||||
trace("select");
|
||||
|
||||
})
|
||||
// Open the dialog
|
||||
.open(options);
|
||||
|
||||
var objFrame = wp.media.editor.open( null, options );
|
||||
objFrame.on("select",function(){
|
||||
|
||||
trace("select!!!");
|
||||
|
||||
});
|
||||
|
||||
//wp.media.gallery.edit('[gallery ids=""]');
|
||||
return(false);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* open "add image" dialog
|
||||
*/
|
||||
this.openAddImageDialog = function(title, onInsert, isMultiple, source){
|
||||
|
||||
if(source == "addon"){
|
||||
openAddonImageSelectDialog(title, onInsert);
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(typeof wp != "undefined" && typeof wp.media != "undefined")
|
||||
openNewImageDialog(title,onInsert,isMultiple);
|
||||
else{
|
||||
openOldImageDialog(title,onInsert);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* open "add image" dialog
|
||||
*/
|
||||
this.openAddMp3Dialog = function(title, onInsert, isMultiple, source){
|
||||
|
||||
|
||||
if(typeof wp == "undefined" || typeof wp.media == "undefined"){
|
||||
trace("the audio select dialog could not be opened");
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(source == "addon"){
|
||||
openAddonAudioSelectDialog(title, onInsert);
|
||||
return(false);
|
||||
}else{
|
||||
|
||||
openAudioDialog(title,onInsert,isMultiple);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get shortcode
|
||||
*/
|
||||
this.getShortcode = function(alias){
|
||||
|
||||
var shortcode = "[uniteaddon "+alias +"]";
|
||||
|
||||
if(alias == "")
|
||||
shortcode = "";
|
||||
|
||||
return(shortcode);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* clear setting
|
||||
*/
|
||||
this.clearSetting = function(type, objInput, dataname){
|
||||
|
||||
switch(type){
|
||||
case "select_post_taxonomy":
|
||||
case "select_post_type":
|
||||
|
||||
defaultValue = objInput.data(dataname);
|
||||
objInput.val(defaultValue);
|
||||
break;
|
||||
default:
|
||||
return(false);
|
||||
break;
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init setting events
|
||||
*/
|
||||
this.initSettingEvents = function(type, objInput){
|
||||
|
||||
switch(type){
|
||||
case "select_post_taxonomy":
|
||||
initTaxonomyTypeSetting(objInput);
|
||||
break;
|
||||
case "select_post_type":
|
||||
|
||||
initPostTypeSetting(objInput);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* set setting value
|
||||
*/
|
||||
this.setSettingValue = function(type, objInput, value){
|
||||
|
||||
switch(type){
|
||||
case "select_post_taxonomy":
|
||||
case "select_post_type":
|
||||
|
||||
objInput.val(value);
|
||||
objInput.trigger("change");
|
||||
break;
|
||||
default:
|
||||
return(false);
|
||||
break;
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init update plugin button
|
||||
*/
|
||||
function initUpdatePlugin(){
|
||||
|
||||
var objButton = jQuery("#uc_button_update_plugin");
|
||||
|
||||
if(objButton.length == 0)
|
||||
return(false);
|
||||
|
||||
//init update plugin button
|
||||
objButton.click(function(){
|
||||
|
||||
jQuery("#dialog_update_plugin").dialog({
|
||||
dialogClass:"unite-ui",
|
||||
minWidth:600,
|
||||
minHeight:400,
|
||||
modal:true,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init internal image select dialog
|
||||
*/
|
||||
function initMediaSelectDialog(type){
|
||||
|
||||
if(typeof UCAssetsManager == "undefined")
|
||||
return(false);
|
||||
|
||||
|
||||
switch(type){
|
||||
case "image":
|
||||
var dialogID = "#uc_dialog_image_select";
|
||||
var browserID = "#uc_dialogimage_browser";
|
||||
|
||||
g_dataProviderUC.objBrowserImages = new UCAssetsManager();
|
||||
|
||||
var browser = g_dataProviderUC.objBrowserImages;
|
||||
var inputID = "#uc_dialog_image_select_url";
|
||||
var buttonID = "#uc_dialog_image_select_button";
|
||||
break;
|
||||
case "audio":
|
||||
|
||||
var dialogID = "#uc_dialog_audio_select";
|
||||
var browserID = "#uc_dialogaudio_browser";
|
||||
|
||||
g_dataProviderUC.objBrowserAudio = new UCAssetsManager();
|
||||
|
||||
var browser = g_dataProviderUC.objBrowserAudio;
|
||||
var inputID = "#uc_dialog_audio_select_url";
|
||||
var buttonID = "#uc_dialog_audio_select_button";
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new Error("wrong type: "+type);
|
||||
break;
|
||||
}
|
||||
|
||||
//init assets browser
|
||||
var browserImagesWrapper = jQuery(browserID);
|
||||
|
||||
if(browserImagesWrapper.length == 0)
|
||||
return(false);
|
||||
|
||||
browser.init(browserImagesWrapper);
|
||||
|
||||
//update folder for next time open
|
||||
browser.eventOnUpdateFilelist(function(){
|
||||
|
||||
var path = browser.getActivePath();
|
||||
|
||||
t.setPathSelectImages(path);
|
||||
});
|
||||
|
||||
//on select some file
|
||||
browser.eventOnSelectOperation(function(event, objItem){
|
||||
|
||||
//get relative url
|
||||
var urlRelative = objItem.file;
|
||||
|
||||
if(g_dataProviderUC.pathSelectImagesBase){
|
||||
urlRelative = objItem.url.replace(g_dataProviderUC.pathSelectImagesBase+"/", "");
|
||||
}
|
||||
|
||||
var objInput = jQuery(inputID);
|
||||
|
||||
objItem.url_assets_relative = g_temp.keyUrlAssets + urlRelative;
|
||||
|
||||
objInput.val(urlRelative);
|
||||
objInput.data("item", objItem).val(urlRelative);
|
||||
|
||||
//enable button
|
||||
g_ucAdmin.enableButton(buttonID);
|
||||
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* on select button click - close the dialog and run oninsert function
|
||||
*/
|
||||
jQuery(buttonID).click(function(){
|
||||
|
||||
if(g_ucAdmin.isButtonEnabled(buttonID) == false)
|
||||
return(false);
|
||||
|
||||
var objDialog = jQuery(dialogID);
|
||||
var objInput = jQuery(inputID);
|
||||
|
||||
var objItem = objInput.data("item");
|
||||
|
||||
if(!objItem)
|
||||
throw new Error("please select some "+type);
|
||||
|
||||
var funcOnInsert = objDialog.data("func_oninsert");
|
||||
|
||||
if(typeof funcOnInsert != "function")
|
||||
throw new Error("on insert should be a function");
|
||||
|
||||
funcOnInsert(objItem);
|
||||
|
||||
objDialog.dialog("close");
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open addon media select dialog
|
||||
*/
|
||||
function openAddonMediaSelectDialog(title, onInsert, type){
|
||||
|
||||
switch(type){
|
||||
case "image":
|
||||
var dialogID = "#uc_dialog_image_select";
|
||||
var dialogName = "image select";
|
||||
var inputID = "#uc_dialog_image_select_url";
|
||||
var buttonID = "#uc_dialog_image_select_button";
|
||||
var objBrowser = g_dataProviderUC.objBrowserImages;
|
||||
break;
|
||||
case "audio":
|
||||
var dialogID = "#uc_dialog_audio_select";
|
||||
var dialogName = "audio select";
|
||||
var inputID = "#uc_dialog_audio_select_url";
|
||||
var buttonID = "#uc_dialog_audio_select_button";
|
||||
var objBrowser = g_dataProviderUC.objBrowserAudio;
|
||||
break;
|
||||
default:
|
||||
throw new Error("Wrong dialog type:"+type);
|
||||
break;
|
||||
}
|
||||
|
||||
var objDialog = jQuery(dialogID);
|
||||
if(objDialog.length == 0)
|
||||
throw new Error("dialog "+dialogName+" not found!");
|
||||
|
||||
objDialog.data("func_oninsert", onInsert);
|
||||
objDialog.data("obj_browser", objBrowser);
|
||||
|
||||
|
||||
objDialog.dialog({
|
||||
minWidth:900,
|
||||
minHeight:450,
|
||||
modal:true,
|
||||
title:title,
|
||||
open:function(){
|
||||
|
||||
var objDialog = jQuery(this);
|
||||
var objBrowser = objDialog.data("obj_browser");
|
||||
|
||||
//clear the input
|
||||
var objInput = jQuery(inputID);
|
||||
objInput.data("url","").val("");
|
||||
|
||||
//disable the button
|
||||
g_ucAdmin.disableButton(buttonID);
|
||||
|
||||
//objBrowser =
|
||||
|
||||
//set base start path (even if null)
|
||||
objBrowser.setCustomStartPath(g_dataProviderUC.pathSelectImagesBase);
|
||||
|
||||
var loadPath = g_dataProviderUC.pathSelectImages;
|
||||
if(!loadPath)
|
||||
loadPath = g_pathAssetsUC;
|
||||
|
||||
objBrowser.loadPath(loadPath, true);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open addon image select dialog
|
||||
*/
|
||||
function openAddonImageSelectDialog(title, onInsert){
|
||||
|
||||
openAddonMediaSelectDialog(title, onInsert, "image");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open addon image select dialog
|
||||
*/
|
||||
function openAddonAudioSelectDialog(title, onInsert){
|
||||
|
||||
openAddonMediaSelectDialog(title, onInsert, "audio");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* convert url assets related to full url
|
||||
*/
|
||||
this.urlAssetsToFull = function(url){
|
||||
|
||||
if(!url)
|
||||
return(url);
|
||||
|
||||
|
||||
if(!g_dataProviderUC.urlSelectImagesBase)
|
||||
return(url);
|
||||
|
||||
var key = g_temp.keyUrlAssets;
|
||||
|
||||
if(url.indexOf(key) == -1)
|
||||
return(url);
|
||||
|
||||
url = url.replace(key, g_dataProviderUC.urlSelectImagesBase);
|
||||
|
||||
return(url);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set select images path
|
||||
*/
|
||||
this.setPathSelectImages = function(path, basePath, baseUrl){
|
||||
|
||||
if(basePath)
|
||||
g_dataProviderUC.pathSelectImagesBase = basePath;
|
||||
|
||||
if(baseUrl)
|
||||
g_dataProviderUC.urlSelectImagesBase = baseUrl;
|
||||
|
||||
if(path)
|
||||
g_dataProviderUC.pathSelectImages = path;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set the parent - ucAdmin
|
||||
*/
|
||||
this.setParent = function(parent){
|
||||
g_parent = parent;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open activation dialog
|
||||
*/
|
||||
function openActivateDialog(){
|
||||
|
||||
g_parent.openCommonDialog("uc_dialog_activate_catalog",function(){
|
||||
|
||||
jQuery("#uc_dialog_activate_catalog_text").focus();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init activate
|
||||
*/
|
||||
function initActivateDialog(){
|
||||
|
||||
//--- top activate button
|
||||
|
||||
var objButtonActivate = jQuery("#uc_button_activate_catalog");
|
||||
|
||||
if(objButtonActivate.length == 0)
|
||||
return(false);
|
||||
|
||||
objButtonActivate.click(openActivateDialog);
|
||||
|
||||
//--- dialog activate button
|
||||
|
||||
jQuery("#uc_dialog_activate_catalog_action").click(function(){
|
||||
|
||||
var code = jQuery("#uc_dialog_activate_catalog_text").val();
|
||||
|
||||
var data = {
|
||||
code: code
|
||||
};
|
||||
|
||||
if(g_ucCatalogAddonType)
|
||||
data["addontype"] = g_ucCatalogAddonType;
|
||||
|
||||
g_parent.dialogAjaxRequest("uc_dialog_activate_catalog","activate_catalog_codecanyon",data);
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init the provider admin object
|
||||
*/
|
||||
this.init = function(){
|
||||
|
||||
initUpdatePlugin();
|
||||
|
||||
initMediaSelectDialog("image");
|
||||
initMediaSelectDialog("audio");
|
||||
|
||||
initActivateDialog();
|
||||
|
||||
}
|
||||
|
||||
function _______EDITORS_SETTING_____(){}
|
||||
|
||||
|
||||
/**
|
||||
* get first editor options
|
||||
*/
|
||||
function initEditor_tinyMCE_GetOptions(objEditorsOptions) {
|
||||
if (jQuery.isEmptyObject(objEditorsOptions))
|
||||
return {};
|
||||
|
||||
for (var key in objEditorsOptions) {
|
||||
var options = objEditorsOptions[key];
|
||||
|
||||
if (options !== null)
|
||||
return options;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* trigger change on editor, pass back
|
||||
*/
|
||||
function onEditorChange(editor, objSettings){
|
||||
|
||||
var objInput = editor.getElement();
|
||||
objInput = jQuery(objInput);
|
||||
objSettings.triggerKeyupEvent(objInput);
|
||||
}
|
||||
|
||||
/**
|
||||
* init tinymce editor
|
||||
*/
|
||||
function initEditor_tinyMCE(inputID, objSettings) {
|
||||
//init editor
|
||||
var options = initEditor_tinyMCE_GetOptions(window.tinyMCEPreInit.mceInit);
|
||||
|
||||
options = jQuery.extend({}, options, {
|
||||
resize: "vertical",
|
||||
height: 200,
|
||||
id: inputID,
|
||||
selector: "#" + inputID,
|
||||
});
|
||||
|
||||
options.setup = function (editor) {
|
||||
editor.on("Change", function () {
|
||||
onEditorChange(editor, objSettings);
|
||||
});
|
||||
|
||||
editor.on("keyup", function () {
|
||||
onEditorChange(editor, objSettings);
|
||||
});
|
||||
};
|
||||
|
||||
window.tinyMCEPreInit.mceInit[inputID] = options;
|
||||
|
||||
tinyMCE.init(options);
|
||||
|
||||
//init quicktags
|
||||
var optionsQT = initEditor_tinyMCE_GetOptions(window.tinyMCEPreInit.qtInit);
|
||||
|
||||
optionsQT = jQuery.extend({}, optionsQT, {
|
||||
id: inputID,
|
||||
});
|
||||
|
||||
window.tinyMCEPreInit.qtInit[inputID] = optionsQT;
|
||||
|
||||
quicktags(optionsQT);
|
||||
QTags._buttonsInit();
|
||||
|
||||
window.wpActiveEditor = inputID;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init editors - run function after timeout
|
||||
*/
|
||||
function initEditors_afterTimeout(objSettings, arrEditorNames, isForce) {
|
||||
if (typeof window.tinyMCEPreInit === "undefined" && arrEditorNames.length)
|
||||
throw new Error("Init " + arrEditorNames[0] + " editor error. no other editors found on page");
|
||||
|
||||
var idPrefix = objSettings.getIDPrefix();
|
||||
|
||||
jQuery(arrEditorNames).each(function (index, name) {
|
||||
var inputID = idPrefix + name;
|
||||
inputID = inputID.replace("#", "");
|
||||
|
||||
if (isForce === true
|
||||
|| window.tinyMCEPreInit.mceInit.hasOwnProperty(inputID) === false
|
||||
|| window.tinyMCEPreInit.mceInit[inputID] === null)
|
||||
initEditor_tinyMCE(inputID, objSettings);
|
||||
});
|
||||
}
|
||||
|
||||
function _______POST_TAXONOMY_____(){}
|
||||
|
||||
|
||||
/**
|
||||
* init taxonomy setting
|
||||
*/
|
||||
function initTaxonomyTypeSetting(selectPostType){
|
||||
|
||||
if(selectPostType.length == 0)
|
||||
return(false);
|
||||
|
||||
var objParent = selectPostType.parents(".unite_settings_wrapper");
|
||||
if(objParent.length == 0)
|
||||
objParent = selectPostType.parents(".wpb_edit_form_elements");
|
||||
|
||||
|
||||
if(objParent.length == 0)
|
||||
throw new Error("unable to find post list setting parent");
|
||||
|
||||
var selectPostTaxonomy = objParent.find(".unite-setting-post-taxonomy");
|
||||
|
||||
if(selectPostTaxonomy.length == 0)
|
||||
return(false);
|
||||
|
||||
var dataPostTypes = selectPostType.data("arrposttypes");
|
||||
|
||||
if(typeof dataPostTypes == "string"){
|
||||
dataPostTypes = g_parent.decodeContent(dataPostTypes);
|
||||
dataPostTypes = JSON.parse(dataPostTypes);
|
||||
}
|
||||
|
||||
selectPostType.change(function(){
|
||||
|
||||
var postType = selectPostType.val();
|
||||
var selectedTax = selectPostTaxonomy.val();
|
||||
var objTax = g_parent.getVal(dataPostTypes, postType);
|
||||
if(!objTax)
|
||||
return(true);
|
||||
|
||||
var objOptions = selectPostTaxonomy.find("option");
|
||||
var firstVisibleOption = null;
|
||||
|
||||
jQuery.each(objOptions, function(index, option){
|
||||
|
||||
var objOption = jQuery(option);
|
||||
var optionTax = objOption.prop("value");
|
||||
|
||||
var taxFound = objTax.hasOwnProperty(optionTax);
|
||||
|
||||
if(taxFound == true && firstVisibleOption == null)
|
||||
firstVisibleOption = optionTax;
|
||||
|
||||
if(taxFound == true)
|
||||
objOption.show();
|
||||
else
|
||||
objOption.hide();
|
||||
|
||||
});
|
||||
|
||||
var isCurrentTaxRelevant = objTax.hasOwnProperty(selectedTax);
|
||||
if(isCurrentTaxRelevant == false && firstVisibleOption){
|
||||
selectPostTaxonomy.val(firstVisibleOption);
|
||||
}
|
||||
|
||||
}); //end onchange
|
||||
|
||||
|
||||
selectPostType.trigger("change");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function _______POST_LIST_____(){}
|
||||
|
||||
|
||||
/**
|
||||
* init post lists
|
||||
*/
|
||||
function initPostTypeSetting(selectPostType){
|
||||
|
||||
if(selectPostType.length == 0)
|
||||
return(false);
|
||||
|
||||
var objParent = selectPostType.parents(".unite_settings_wrapper");
|
||||
if(objParent.length == 0)
|
||||
objParent = selectPostType.parents(".wpb_edit_form_elements");
|
||||
|
||||
if(objParent.length == 0)
|
||||
throw new Error("unable to find post list setting parent");
|
||||
|
||||
var selectPostCategory = objParent.find(".unite-setting-post-category");
|
||||
|
||||
if(selectPostCategory.length == 0)
|
||||
return(false);
|
||||
|
||||
var dataPostTypes = selectPostType.data("arrposttypes");
|
||||
if(typeof dataPostTypes == "string"){
|
||||
dataPostTypes = g_parent.decodeContent(dataPostTypes);
|
||||
dataPostTypes = JSON.parse(dataPostTypes);
|
||||
}
|
||||
|
||||
selectPostType.change(function(){
|
||||
|
||||
var arrPostTypes = selectPostType.val();
|
||||
|
||||
//force array always
|
||||
if(jQuery.isArray(arrPostTypes) == false)
|
||||
arrPostTypes = [arrPostTypes];
|
||||
|
||||
selectPostCategory.html("");
|
||||
|
||||
var selectedID = selectPostCategory.val();
|
||||
var isSomeCatSelected = false;
|
||||
var htmlOptions = "";
|
||||
|
||||
htmlOptions += "<option value=''>[All Categories]</option>"
|
||||
|
||||
for(var postType of arrPostTypes){
|
||||
|
||||
var objPostType = g_parent.getVal(dataPostTypes, postType);
|
||||
if(!objPostType)
|
||||
continue;
|
||||
|
||||
var objCats = objPostType["cats"];
|
||||
if(!objCats)
|
||||
continue;
|
||||
|
||||
jQuery.each(objCats, function(catID, catText){
|
||||
|
||||
var catShowText = g_parent.htmlspecialchars(catText);
|
||||
|
||||
var selected = "";
|
||||
if(selectedID == catID){
|
||||
selected = " selected='selected'";
|
||||
isSomeCatSelected = true;
|
||||
}
|
||||
|
||||
htmlOptions += "<option value='"+catID+"' "+selected+">"+catShowText+"</option>"
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
selectPostCategory.html(htmlOptions);
|
||||
|
||||
if(isSomeCatSelected == false)
|
||||
selectPostCategory.val("");
|
||||
|
||||
});
|
||||
|
||||
selectPostType.trigger("change");
|
||||
}
|
||||
|
||||
|
||||
function _______END_POST_LISTS_____(){}
|
||||
|
||||
/**
|
||||
* init editors, if the editors not inited, init them
|
||||
*/
|
||||
this.initEditors = function (objSettings, isForce) {
|
||||
var arrEditorNames = objSettings.getFieldNamesByType("editor_tinymce");
|
||||
|
||||
if (arrEditorNames.length === 0)
|
||||
return;
|
||||
|
||||
// init on the next tick to pick the input value
|
||||
setTimeout(function () {
|
||||
initEditors_afterTimeout(objSettings, arrEditorNames, isForce);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* destroy editors
|
||||
*/
|
||||
this.destroyEditors = function (objSettings) {
|
||||
var arrEditorNames = objSettings.getFieldNamesByType("editor_tinymce");
|
||||
|
||||
if (arrEditorNames.length === 0)
|
||||
return;
|
||||
|
||||
var idPrefix = objSettings.getIDPrefix();
|
||||
|
||||
jQuery.each(arrEditorNames, function (index, name) {
|
||||
var editorID = idPrefix + name;
|
||||
editorID = editorID.replace("#", "");
|
||||
|
||||
var objEditor = tinyMCE.EditorManager.get(editorID);
|
||||
|
||||
if (objEditor) {
|
||||
try {
|
||||
if (tinymce.majorVersion === "4")
|
||||
window.tinyMCE.execCommand("mceRemoveEditor", !0, editorID);
|
||||
else
|
||||
window.tinyMCE.execCommand("mceRemoveControl", !0, editorID);
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
|
||||
window.tinyMCEPreInit.mceInit[editorID] = null;
|
||||
window.tinyMCEPreInit.qtInit[editorID] = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,606 @@
|
||||
|
||||
if(typeof trace == "undefined"){
|
||||
function trace(str){
|
||||
console.log(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* general settings class
|
||||
*/
|
||||
function UCGeneralSettings(){
|
||||
var t = this;
|
||||
var g_currentManager;
|
||||
var g_objCurrentSettings = null, g_objSettingsWrapper;
|
||||
var g_objTooltip, g_options, g_objVCDialogChoose;
|
||||
|
||||
if(!g_ucAdmin)
|
||||
var g_ucAdmin = new UniteAdminUC();
|
||||
|
||||
|
||||
/**
|
||||
* encode some content
|
||||
*/
|
||||
function encodeContent(value){
|
||||
|
||||
//turn to string if object
|
||||
if(typeof value == "object")
|
||||
value = JSON.stringify(value);
|
||||
|
||||
return base64_encode(rawurlencode(value));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* decode some content
|
||||
*/
|
||||
function decodeContent(value){
|
||||
return rawurldecode(base64_decode(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* escape html
|
||||
*/
|
||||
function escapeHtml(text) {
|
||||
|
||||
if(!text)
|
||||
return(text);
|
||||
if(typeof text != "string")
|
||||
return(text);
|
||||
|
||||
return text
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
/**
|
||||
* get vc option
|
||||
*/
|
||||
function getOption(option){
|
||||
|
||||
if(!g_options)
|
||||
return(null);
|
||||
|
||||
var value = g_ucAdmin.getVal(g_options, option);
|
||||
|
||||
return(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* default parse setting function
|
||||
*/
|
||||
function parseVcSetting(param){
|
||||
|
||||
var settingName = param.name;
|
||||
var objSettingWrapper = g_objSettingsWrapper.find("#uc_vc_setting_wrapper_" + settingName);
|
||||
|
||||
if(objSettingWrapper.length == 0)
|
||||
throw new Error("the setting wrapper not found: "+settingName);
|
||||
|
||||
var objValues = g_objCurrentSettings.getSettingsValues(objSettingWrapper);
|
||||
|
||||
if(objValues.hasOwnProperty(settingName) == false)
|
||||
throw new Error("Value for setting: "+settingName+" not found");
|
||||
|
||||
var value = objValues[settingName];
|
||||
|
||||
switch(param.type){
|
||||
case "uc_textarea":
|
||||
case "uc_editor":
|
||||
value = encodeContent(value);
|
||||
break;
|
||||
default:
|
||||
value = escapeHtml(value);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init visual composer items
|
||||
*/
|
||||
this.initVCItems = function(){
|
||||
|
||||
g_currentManager = new UCManagerAdmin();
|
||||
g_currentManager.initManager();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init visual composer settings
|
||||
* the div init issome div inside the settings container
|
||||
*/
|
||||
this.initVCSettings = function(objDivInit){
|
||||
|
||||
//fix z-index of vc window for tinymce editor
|
||||
var objEditElement = jQuery("#vc_ui-panel-edit-element");
|
||||
if(objEditElement.length)
|
||||
objEditElement.css("z-index","60000");
|
||||
|
||||
|
||||
var objParent = objDivInit.parents(".vc_edit-form-tab");
|
||||
if(objParent.length == 0)
|
||||
objParent = objDivInit.parents(".wpb_edit_form_elements");
|
||||
|
||||
if(objParent.length == 0)
|
||||
throw new Error("settings container not found");
|
||||
|
||||
//set prefix
|
||||
var idPrefix = null;
|
||||
var objSettingsWrapper = objParent.find(".uc_vc_setting_wrapper:first-child");
|
||||
if(objSettingsWrapper.length)
|
||||
idPrefix = objSettingsWrapper.data("idprefix");
|
||||
|
||||
g_objSettingsWrapper = objParent;
|
||||
|
||||
g_objCurrentSettings = new UniteSettingsUC();
|
||||
g_objCurrentSettings.setIDPrefix(idPrefix);
|
||||
g_objCurrentSettings.init(g_objSettingsWrapper);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* open import layout dialog
|
||||
*/
|
||||
function openImportLayoutDialog(){
|
||||
|
||||
jQuery("#dialog_import_layouts_file").val("");
|
||||
|
||||
var options = {minWidth:700};
|
||||
|
||||
g_ucAdmin.openCommonDialog("#uc_dialog_import_layouts", null, options);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set post editor contnet
|
||||
*/
|
||||
function setPostEditorContent(text){
|
||||
|
||||
if(typeof tinymce == "undefined" )
|
||||
return(false);
|
||||
|
||||
var editor = tinymce.get( 'content' );
|
||||
if( editor && editor instanceof tinymce.Editor ) {
|
||||
editor.setContent( text );
|
||||
editor.save( { no_events: true } );
|
||||
}
|
||||
else {
|
||||
jQuery('textarea#content').val( text );
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set visual composer content to the editor
|
||||
*/
|
||||
function setVCContent(content){
|
||||
|
||||
if(typeof window.vc.storage == "undefined")
|
||||
return(false);
|
||||
|
||||
vc.storage.setContent(content);
|
||||
if(vc.app.status == "shown")
|
||||
vc.app.show();
|
||||
else
|
||||
vc.app.switchComposer();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* destroy settings if available
|
||||
*/
|
||||
function checkDestroySettings(){
|
||||
|
||||
|
||||
setTimeout(function(){
|
||||
|
||||
if(g_objCurrentSettings){
|
||||
g_objCurrentSettings.destroy();
|
||||
g_objCurrentSettings = null;
|
||||
}
|
||||
|
||||
if(g_currentManager){
|
||||
|
||||
g_currentManager.destroy();
|
||||
|
||||
}
|
||||
|
||||
},200);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function _______INIT_____(){}
|
||||
|
||||
|
||||
/**
|
||||
* init visual composer attributes
|
||||
*/
|
||||
function initVCAtts(){
|
||||
|
||||
var objParse = {parse:parseVcSetting};
|
||||
|
||||
//text field
|
||||
vc.atts.uc_textfield = objParse;
|
||||
vc.atts.uc_number = objParse;
|
||||
vc.atts.uc_textarea = objParse;
|
||||
vc.atts.uc_radioboolean = objParse;
|
||||
vc.atts.uc_checkbox = objParse;
|
||||
vc.atts.uc_dropdown = objParse;
|
||||
vc.atts.uc_colorpicker = objParse;
|
||||
vc.atts.uc_image = objParse;
|
||||
vc.atts.uc_mp3 = objParse;
|
||||
vc.atts.uc_editor = objParse;
|
||||
vc.atts.uc_icon = objParse;
|
||||
|
||||
|
||||
//items
|
||||
vc.atts.uc_items = {
|
||||
parse:function(param){
|
||||
if(!g_currentManager)
|
||||
return("");
|
||||
|
||||
var itemsData = g_currentManager.getItemsDataJson();
|
||||
|
||||
itemsData = encodeContent(itemsData);
|
||||
|
||||
return(itemsData);
|
||||
}
|
||||
};
|
||||
|
||||
//fonts
|
||||
vc.atts.uc_fonts = {
|
||||
parse:function(param){
|
||||
|
||||
return(fontsData);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init post title
|
||||
*/
|
||||
function initPostTitle(objButton){
|
||||
var initPostTitle = objButton.data("init_post_title");
|
||||
if(!initPostTitle )
|
||||
return(false);
|
||||
|
||||
var inputTitle = jQuery("#title").val();
|
||||
if(!inputTitle)
|
||||
jQuery("#title").val(initPostTitle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* import vc layouts
|
||||
*/
|
||||
function initImportVcLayout(){
|
||||
|
||||
var objButton = jQuery("#uc_button_import_layout");
|
||||
|
||||
initPostTitle(objButton);
|
||||
|
||||
g_ucAdmin.enableButton(objButton);
|
||||
|
||||
if(objButton.length == 0)
|
||||
return(false);
|
||||
|
||||
objButton.click(openImportLayoutDialog);
|
||||
|
||||
jQuery("#uc_dialog_import_layouts_action").click(function(){
|
||||
|
||||
var data = {};
|
||||
|
||||
var isOverwrite = jQuery("#dialog_import_layouts_file_overwrite").is(":checked");
|
||||
|
||||
//set postID if available
|
||||
var objPostID = jQuery("#post_ID");
|
||||
var postID = null;
|
||||
if(objPostID.length)
|
||||
postID = objPostID.val();
|
||||
|
||||
data.postid = postID;
|
||||
data.title = jQuery("#title").val();
|
||||
data.overwrite_addons = isOverwrite;
|
||||
|
||||
var objData = new FormData();
|
||||
var jsonData = JSON.stringify(data);
|
||||
objData.append("data", jsonData);
|
||||
|
||||
g_ucAdmin.addFormFilesToData("dialog_import_layouts_form", objData);
|
||||
|
||||
g_ucAdmin.dialogAjaxRequest("uc_dialog_import_layouts", "import_vc_layout", objData,function(response){
|
||||
|
||||
jQuery("#uc_dialog_import_layouts_success").show();
|
||||
|
||||
if(response.url_reload){
|
||||
var url = response.url_reload;
|
||||
url = g_ucAdmin.convertAmpSign(url);
|
||||
location.href = url;
|
||||
}else{
|
||||
setVCContent(response.content);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* catch vc elements panel close action and destroy settings if exists
|
||||
*/
|
||||
function initSettingsDestroy(){
|
||||
|
||||
var isFrontEditor = getOption("is_front_editor");
|
||||
|
||||
var objEditElement = jQuery("#vc_ui-panel-edit-element");
|
||||
var objButtons = objEditElement.find(".vc_ui-panel-footer .vc_ui-button");
|
||||
|
||||
if(isFrontEditor === true){ //on front editor take only cancel button
|
||||
|
||||
var objCloseButton = objButtons.filter('[data-vc-ui-element="button-close"]');
|
||||
objCloseButton.click(checkDestroySettings);
|
||||
|
||||
}else{
|
||||
objButtons.click(checkDestroySettings);
|
||||
}
|
||||
|
||||
var objTopButton = objEditElement.find(".vc_ui-panel-header-controls .vc_ui-close-button");
|
||||
objTopButton.click(checkDestroySettings);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* init settings destroy
|
||||
*/
|
||||
function initVCIntegration(){
|
||||
|
||||
g_objVCDialogChoose = jQuery("#vc_ui-panel-add-element");
|
||||
|
||||
g_currentManager = null;
|
||||
|
||||
initVCAtts();
|
||||
|
||||
//init options
|
||||
if(g_ucVCOptions)
|
||||
g_options = JSON.parse(g_ucVCOptions);
|
||||
|
||||
initSettingsDestroy();
|
||||
|
||||
initImportVcLayout();
|
||||
|
||||
initThumbPresentation();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function _______TOOLTIPS_THUMBS____(){}
|
||||
|
||||
|
||||
/**
|
||||
* get preview image by addon id
|
||||
*/
|
||||
function getPreviewImage(addonID){
|
||||
|
||||
var obj = g_ucAdmin.getVal(vc_mapper, addonID);
|
||||
if(!obj)
|
||||
return(null);
|
||||
|
||||
var urlPreview = g_ucAdmin.getVal(obj, "preview");
|
||||
|
||||
if(!urlPreview)
|
||||
return(null);
|
||||
|
||||
return(urlPreview);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init vc thumbs
|
||||
*/
|
||||
function initTooltips(categoryAllOnly){
|
||||
|
||||
if(!vc_mapper)
|
||||
return(false);
|
||||
|
||||
if(g_objTooltip)
|
||||
return(false);
|
||||
|
||||
//create tooltip
|
||||
var html = '<div id="uc_manager_addon_preview" class="uc-vcaddon-preview-wrapper" style="display:none"></div>';
|
||||
jQuery("body").append(html);
|
||||
|
||||
g_objTooltip = jQuery("#uc_manager_addon_preview");
|
||||
|
||||
jQuery("body").on("mouseenter",".vc_shortcode-link.uc-addon_nav", function(){
|
||||
|
||||
var objAddonNav = jQuery(this);
|
||||
|
||||
if(categoryAllOnly === true){
|
||||
var objParentAll = objAddonNav.parents(".vc_filter-all");
|
||||
if(objParentAll.length == 0)
|
||||
return(false);
|
||||
}
|
||||
|
||||
var addonID = objAddonNav.attr("id");
|
||||
|
||||
var urlPreview = getPreviewImage(addonID);
|
||||
|
||||
if(!urlPreview)
|
||||
return(false);
|
||||
|
||||
checkShowTooltip(objAddonNav, urlPreview);
|
||||
|
||||
});
|
||||
|
||||
jQuery("body").on("mouseleave",".vc_shortcode-link.uc-addon_nav",function(){
|
||||
g_objTooltip.hide();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* get nav item pos
|
||||
*/
|
||||
function getNavItemPos(objItem){
|
||||
|
||||
var offset = objItem.offset();
|
||||
|
||||
//var offsetWrapper = g_objWrapper.offset();
|
||||
//offset.top -= offsetWrapper.top;
|
||||
//offset.left -= offsetWrapper.left;
|
||||
|
||||
return(offset);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* check if the item has tooltip
|
||||
*/
|
||||
function checkShowTooltip(objItem, urlPreview){
|
||||
|
||||
if(!g_objTooltip)
|
||||
return(false);
|
||||
|
||||
if(!urlPreview)
|
||||
return(false);
|
||||
|
||||
//show tooltip
|
||||
g_objTooltip.show();
|
||||
|
||||
var gapTop = 0;
|
||||
var gapLeft = 10;
|
||||
|
||||
var itemWidth = objItem.width();
|
||||
var tooltipHeight = g_objTooltip.height();
|
||||
var tooltipWidth = g_objTooltip.width();
|
||||
|
||||
//var maxLeft = g_objWrapper.width() - tooltipWidth;
|
||||
|
||||
var pos = getNavItemPos(objItem);
|
||||
pos.top = pos.top - tooltipHeight + gapTop;
|
||||
pos.left = pos.left + itemWidth - gapLeft;
|
||||
|
||||
//if(pos.left > maxLeft)
|
||||
//pos.left = maxLeft;
|
||||
|
||||
//set position and image
|
||||
|
||||
var objCss = {top:pos.top+"px",left:pos.left+"px"};
|
||||
objCss["background-image"] = "url('"+urlPreview+"')";
|
||||
|
||||
g_objTooltip.css(objCss);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init thumbs presentation
|
||||
*/
|
||||
function initThumbs(){
|
||||
|
||||
g_objVCDialogChoose.addClass("uc-vc-dialog-thumbs");
|
||||
|
||||
//add thumbs
|
||||
g_objVCDialogChoose.find(".uc-addon_nav").each(function(index, item){
|
||||
|
||||
var objItem = jQuery(item);
|
||||
var addonID = objItem.attr("id");
|
||||
var urlPreview = getPreviewImage(addonID);
|
||||
|
||||
var style = "";
|
||||
if(urlPreview)
|
||||
style = "style=\"background-image:url('"+urlPreview+"')\"";
|
||||
|
||||
var spanTitle = objItem.find("span");
|
||||
if(spanTitle.length){
|
||||
|
||||
objItem.prepend("<div "+style+"></div>");
|
||||
|
||||
}else{ //replace text by thumb
|
||||
|
||||
var text = objItem.text();
|
||||
var html = objItem.html();
|
||||
|
||||
html = html.replace(text, "<div "+style+"></div><span>"+text+"</span>");
|
||||
|
||||
objItem.html(html);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init thumbs presentation in vc select addon dialog
|
||||
*/
|
||||
function initThumbPresentation(){
|
||||
|
||||
if(!g_objVCDialogChoose || g_objVCDialogChoose.length == 0)
|
||||
return(false);
|
||||
|
||||
//init tooltips
|
||||
var tooltipsType = getOption("thumbs_type");
|
||||
|
||||
switch(tooltipsType){
|
||||
case "tooltip":
|
||||
initTooltips();
|
||||
break;
|
||||
case "thumb":
|
||||
initThumbs();
|
||||
initTooltips(true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* global init function
|
||||
*/
|
||||
this.init = function(){
|
||||
|
||||
//init vc attrs
|
||||
if(typeof vc != "undefined" && vc.atts){
|
||||
initVCIntegration();
|
||||
}
|
||||
|
||||
//trace(objEditElement);
|
||||
//trace(window.Vc_postSettingsEditor);
|
||||
//trace(window.vc);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var g_ucObjGeneralSettings = new UCGeneralSettings();
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
|
||||
g_ucObjGeneralSettings.init();
|
||||
|
||||
});
|
||||