├── assets └── components │ └── frontendmanager │ ├── index.html │ ├── js │ ├── index.html │ ├── mgr │ │ ├── index.html │ │ └── manager.js │ └── web │ │ └── frontend.js │ ├── css │ ├── mgr │ │ ├── index.html │ │ └── manager.css │ ├── web │ │ ├── index.html │ │ └── frontend.css │ └── fonts │ │ ├── index.html │ │ ├── Flaticon.eot │ │ ├── Flaticon.ttf │ │ ├── Flaticon.woff │ │ ├── flaticon.css │ │ ├── _flaticon.scss │ │ ├── flaticon.html │ │ └── Flaticon.svg │ └── vendor │ └── contenttools │ ├── images │ ├── icons.woff │ ├── video.svg │ ├── drop-horz.svg │ ├── drop-vert-above.svg │ └── drop-vert-below.svg │ └── content-tools.min.css ├── core └── components │ └── frontendmanager │ ├── docs │ ├── readme.txt │ ├── changelog.txt │ └── license.txt │ ├── elements │ ├── plugins │ │ └── plugin.frontendmanager.php │ └── chunks │ │ └── chunk.frontendmanager.tpl │ ├── index.class.php │ ├── lexicon │ ├── en │ │ └── default.inc.php │ └── ru │ │ └── default.inc.php │ └── model │ └── frontendmanager │ └── frontendmanager.class.php ├── _build ├── includes │ └── functions.php ├── resolvers │ ├── resolve.chunks.php │ └── resolve.setup.php ├── data │ ├── transport.chunks.php │ ├── transport.plugins.php │ └── transport.settings.php ├── build.model.php ├── build.config.php ├── setup.options.php └── build.transport.php └── README.md /assets/components/frontendmanager/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/js/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/mgr/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/web/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/js/mgr/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/Flaticon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/css/fonts/Flaticon.eot -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/Flaticon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/css/fonts/Flaticon.ttf -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/Flaticon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/css/fonts/Flaticon.woff -------------------------------------------------------------------------------- /assets/components/frontendmanager/vendor/contenttools/images/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/vendor/contenttools/images/icons.woff -------------------------------------------------------------------------------- /core/components/frontendmanager/docs/readme.txt: -------------------------------------------------------------------------------- 1 | -------------------- 2 | frontendmanager 3 | -------------------- 4 | Author: but1head 5 | -------------------- 6 | 7 | A basic Extra for MODx Revolution. 8 | 9 | Feel free to suggest ideas/improvements/bugs on GitHub: 10 | http://github.com/but1head/frontendmanager/issues -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/mgr/manager.css: -------------------------------------------------------------------------------- 1 | #modx-header, 2 | #modx-leftbar, 3 | .x-layout-split, 4 | #modx-abtn-duplicate, 5 | #modx-abtn-delete, 6 | #modx-abtn-preview, 7 | #modx-abtn-cancel, 8 | #modx-abtn-help, 9 | #modx-chunk-msg, 10 | label[for="modx-resource-template"], 11 | label[for="modx-resource-template"] + div, 12 | #modx-chunk-msg + .x-panel { 13 | display:none !important; 14 | } 15 | 16 | 17 | 18 | #modx-action-buttons {top: 0;} 19 | #modx-content {width:100% !important;} -------------------------------------------------------------------------------- /assets/components/frontendmanager/vendor/contenttools/images/video.svg: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /_build/includes/functions.php: -------------------------------------------------------------------------------- 1 | ')); 13 | } 14 | 15 | 16 | /** 17 | * Recursive directory remove 18 | * 19 | * @param $dir 20 | */ 21 | function rrmdir($dir) { 22 | if (is_dir($dir)) { 23 | $objects = scandir($dir); 24 | 25 | foreach ($objects as $object) { 26 | if ($object != "." && $object != "..") { 27 | if (filetype($dir . "/" . $object) == "dir") { 28 | rrmdir($dir . "/" . $object); 29 | } 30 | else { 31 | unlink($dir . "/" . $object); 32 | } 33 | } 34 | } 35 | 36 | reset($objects); 37 | rmdir($dir); 38 | } 39 | } -------------------------------------------------------------------------------- /_build/resolvers/resolve.chunks.php: -------------------------------------------------------------------------------- 1 | xpdo) { 4 | /** @var modX $modx */ 5 | $modx =& $object->xpdo; 6 | 7 | switch ($options[xPDOTransport::PACKAGE_ACTION]) { 8 | case xPDOTransport::ACTION_INSTALL: 9 | break; 10 | 11 | case xPDOTransport::ACTION_UPGRADE: 12 | if (!empty($options['chunks']) && !empty($options['update_chunks'])) { 13 | foreach ($options['update_chunks'] as $v) { 14 | if (!empty($options['chunks'][$v]) && $chunk = $modx->getObject('modChunk', array('name' => $v))) { 15 | $chunk->set('snippet', $options['chunks'][$v]); 16 | $chunk->save(); 17 | $modx->log(modX::LOG_LEVEL_INFO, 'Updated chunk "' . $v . '"'); 18 | } 19 | } 20 | } 21 | break; 22 | 23 | case xPDOTransport::ACTION_UNINSTALL: 24 | break; 25 | } 26 | } 27 | return true; -------------------------------------------------------------------------------- /assets/components/frontendmanager/vendor/contenttools/images/drop-horz.svg: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 24 | 33 | 34 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/vendor/contenttools/images/drop-vert-above.svg: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 24 | 33 | 34 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/vendor/contenttools/images/drop-vert-below.svg: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 24 | 33 | 34 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/js/mgr/manager.js: -------------------------------------------------------------------------------- 1 | Ext.onReady(function() { 2 | if (Ext.getCmp("modx-panel-resource")) { 3 | 4 | // fix for change template 5 | /* Ext.getCmp("modx-panel-resource").on("fieldChange", function(response){ 6 | if(response.field.hiddenName == 'template'){ 7 | window.allow_reload = false; 8 | } 9 | }); */ 10 | 11 | Ext.getCmp("modx-panel-resource").on("success", reloadFrontendManager); 12 | } 13 | if (Ext.getCmp("modx-panel-chunk")) { 14 | Ext.getCmp("modx-panel-chunk").on("success", reloadFrontendManager); 15 | } 16 | }); 17 | 18 | function reloadFrontendManager(){ 19 | top.window.location.href = top.window.location.href; 20 | /* if(window.allow_reload != false){ 21 | top.window.location.href = top.window.location.href; 22 | }else{ 23 | setTimeout(function(){ 24 | window.allow_reload = true; 25 | }, 3000); 26 | } */ 27 | } -------------------------------------------------------------------------------- /_build/data/transport.chunks.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'file' => 'frontendmanager', 8 | 'description' => '', 9 | ), 10 | ); 11 | 12 | // Save chunks for setup options 13 | $BUILD_CHUNKS = array(); 14 | 15 | foreach ($tmp as $k => $v) { 16 | /* @avr modChunk $chunk */ 17 | $chunk = $modx->newObject('modChunk'); 18 | $chunk->fromArray(array( 19 | 'id' => 0, 20 | 'name' => $k, 21 | 'description' => @$v['description'], 22 | 'snippet' => file_get_contents($sources['source_core'] . '/elements/chunks/chunk.' . $v['file'] . '.tpl'), 23 | 'static' => BUILD_CHUNK_STATIC, 24 | 'source' => 1, 25 | 'static_file' => 'core/components/' . PKG_NAME_LOWER . '/elements/chunks/chunk.' . $v['file'] . '.tpl', 26 | ), '', true, true); 27 | 28 | $chunks[] = $chunk; 29 | 30 | $BUILD_CHUNKS[$k] = file_get_contents($sources['source_core'] . '/elements/chunks/chunk.' . $v['file'] . '.tpl'); 31 | } 32 | 33 | unset($tmp); 34 | return $chunks; -------------------------------------------------------------------------------- /core/components/frontendmanager/docs/changelog.txt: -------------------------------------------------------------------------------- 1 | Changelog for frontendManager. 2 | 3 | 2.0.0-pl 4 | ============== 5 | - Замена Jquery на Vanila JS 6 | - Улучшен UI 7 | - Добавлены новые системные настройки (Игнорировать шаблоны/Игнорировать ресурсы/Ограничения по группам пользователей) 8 | - Исправлен баг с рендером вне body 9 | - Убрана смесь синтаксиса в чанке 10 | 11 | 1.0.9-beta 12 | ============== 13 | - Фикс адреса админки 14 | 15 | 1.0.8-beta 16 | ============== 17 | - Фикс событий плагина 18 | 19 | 1.0.7-beta 20 | ============== 21 | - Добавлена адаптивная верстка панели 22 | 23 | 1.0.5-beta 24 | ============== 25 | - Исправлен серьезный баг с кэшэм 26 | 27 | 1.0.3-beta 28 | ============== 29 | - Стили, скрипты, чанк вынесены в настройки 30 | - Перезагрузка страницы после сохранения 31 | 32 | 1.0.1-beta 33 | ============== 34 | - Добавлен класс для кнопки редактирования чанка 35 | - Убрано все лишнее при редактировании чанков 36 | 37 | 38 | 1.0.0-beta 39 | ============== 40 | - Opimized for MODX 2.3 41 | - Improved processors 42 | - Disabled plugin and system settings 43 | - Improved UI 44 | - Added grid actions 45 | - Added icons in menu 46 | - Added search in grid 47 | - Grid sorting 48 | - Enable and disable actions 49 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/flaticon.css: -------------------------------------------------------------------------------- 1 | /* 2 | Flaticon icon font: Flaticon 3 | Creation date: 10/12/2016 19:40 4 | */ 5 | 6 | @font-face { 7 | font-family: "Flaticon"; 8 | src: url("./Flaticon.eot"); 9 | src: url("./Flaticon.eot?#iefix") format("embedded-opentype"), 10 | url("./Flaticon.woff") format("woff"), 11 | url("./Flaticon.ttf") format("truetype"), 12 | url("./Flaticon.svg#Flaticon") format("svg"); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | @media screen and (-webkit-min-device-pixel-ratio:0) { 18 | @font-face { 19 | font-family: "Flaticon"; 20 | src: url("./Flaticon.svg#Flaticon") format("svg"); 21 | } 22 | } 23 | 24 | [class^="fm-icon-"]:before, [class*=" fm-icon-"]:before, 25 | [class^="fm-icon-"]:after, [class*=" fm-icon-"]:after { 26 | font-family: Flaticon; 27 | font-size: 20px; 28 | font-style: normal; 29 | margin-left: 20px; 30 | } 31 | 32 | .fm-icon-cache:before { content: "\f100"; } 33 | .fm-icon-context:before { content: "\f101"; } 34 | .fm-icon-edit:before { content: "\f102"; } 35 | .fm-icon-hide:before { content: "\f103"; } 36 | .fm-icon-log:before { content: "\f104"; } 37 | .fm-icon-ms2:before { content: "\f105"; } 38 | .fm-icon-settings:before { content: "\f106"; } 39 | .fm-icon-user:before { content: "\f107"; } -------------------------------------------------------------------------------- /_build/data/transport.plugins.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'file' => 'frontendmanager', 8 | 'description' => '', 9 | 'events' => array( 10 | 'OnWebPagePrerender' => array(), 11 | 'OnBeforeManagerPageInit' => array(), 12 | ) 13 | ) 14 | 15 | ); 16 | 17 | foreach ($tmp as $k => $v) { 18 | /* @avr modplugin $plugin */ 19 | $plugin = $modx->newObject('modPlugin'); 20 | $plugin->fromArray(array( 21 | 'name' => $k, 22 | 'category' => 0, 23 | 'description' => @$v['description'], 24 | 'plugincode' => getSnippetContent($sources['source_core'] . '/elements/plugins/plugin.' . $v['file'] . '.php'), 25 | 'static' => BUILD_PLUGIN_STATIC, 26 | 'source' => 1, 27 | 'static_file' => 'core/components/' . PKG_NAME_LOWER . '/elements/plugins/plugin.' . $v['file'] . '.php' 28 | ), '', true, true); 29 | 30 | $events = array(); 31 | if (!empty($v['events'])) { 32 | foreach ($v['events'] as $k2 => $v2) { 33 | /* @var modPluginEvent $event */ 34 | $event = $modx->newObject('modPluginEvent'); 35 | $event->fromArray(array_merge( 36 | array( 37 | 'event' => $k2, 38 | 'priority' => 0, 39 | 'propertyset' => 0, 40 | ), $v2 41 | ), '', true, true); 42 | $events[] = $event; 43 | } 44 | unset($v['events']); 45 | } 46 | 47 | if (!empty($events)) { 48 | $plugin->addMany($events); 49 | } 50 | 51 | $plugins[] = $plugin; 52 | } 53 | 54 | unset($tmp, $properties); 55 | return $plugins; -------------------------------------------------------------------------------- /_build/build.model.php: -------------------------------------------------------------------------------- 1 | $root, 11 | 'build' => $root . '_build/', 12 | 'source_core' => $root . 'core/components/' . PKG_NAME_LOWER, 13 | 'model' => $root . 'core/components/' . PKG_NAME_LOWER . '/model/', 14 | 'schema' => $root . 'core/components/' . PKG_NAME_LOWER . '/model/schema/', 15 | 'xml' => $root . 'core/components/' . PKG_NAME_LOWER . '/model/schema/' . PKG_NAME_LOWER . '.mysql.schema.xml', 16 | ); 17 | unset($root); 18 | 19 | require MODX_CORE_PATH . 'model/modx/modx.class.php'; 20 | require $sources['build'] . '/includes/functions.php'; 21 | 22 | $modx = new modX(); 23 | $modx->initialize('mgr'); 24 | $modx->getService('error', 'error.modError'); 25 | $modx->setLogLevel(modX::LOG_LEVEL_INFO); 26 | $modx->setLogTarget('ECHO'); 27 | $modx->loadClass('transport.modPackageBuilder', '', false, true); 28 | if (!XPDO_CLI_MODE) { 29 | echo '
';
30 | }
31 | 
32 | /** @var xPDOManager $manager */
33 | $manager = $modx->getManager();
34 | /** @var xPDOGenerator $generator */
35 | $generator = $manager->getGenerator();
36 | 
37 | // Remove old model
38 | rrmdir($sources['model'] . PKG_NAME_LOWER . '/mysql');
39 | 
40 | // Generate a new one
41 | $generator->parseSchema($sources['xml'], $sources['model']);
42 | 
43 | $modx->log(modX::LOG_LEVEL_INFO, 'Model generated.');
44 | if (!XPDO_CLI_MODE) {
45 | 	echo '
'; 46 | } -------------------------------------------------------------------------------- /core/components/frontendmanager/elements/plugins/plugin.frontendmanager.php: -------------------------------------------------------------------------------- 1 | user->hasSessionContext('mgr')) return; 3 | if (!$modx->user->isMember(explode(',', $modx->getOption('frontendmanager_active_groups', null, '')))) return; 4 | if ($modx->resource) { 5 | if (in_array($modx->resource->get('id'), explode(',', $modx->getOption('frontendmanager_ignore_resources', null, '')))) return; 6 | if (in_array($modx->resource->get('template'), explode(',', $modx->getOption('frontendmanager_ignore_templates', null, '')))) return; 7 | } 8 | switch ($modx->event->name) { 9 | case 'OnWebPagePrerender': 10 | if (!$modx->resource->get('template')) break; 11 | $frontendManager = $modx->getService('frontendmanager','frontendManager', MODX_CORE_PATH . 'components/frontendmanager/model/frontendmanager/', array()); 12 | if(!$frontendManager) return; 13 | $contentTypes = explode(',', $modx->getOption('frontendmanager_contenttypes')); 14 | if (in_array($modx->resource->content_type, $contentTypes)) { 15 | $modx->resource->_output .= $frontendManager->initialize($modx->context->key); 16 | } 17 | break; 18 | case 'OnBeforeManagerPageInit': 19 | if ($_GET['frame']) { 20 | $modx->regClientCSS(MODX_ASSETS_URL.'components/frontendmanager/css/mgr/'.$modx->getOption('frontendmanager_manager_css', NULL, 'manager.css')); 21 | $modx->regClientStartupScript(MODX_ASSETS_URL.'components/frontendmanager/js/mgr/'.$modx->getOption('frontendmanager_manager_js', NULL, 'manager.js')); 22 | } 23 | break; 24 | default: 25 | break; 26 | } 27 | return; 28 | -------------------------------------------------------------------------------- /core/components/frontendmanager/index.class.php: -------------------------------------------------------------------------------- 1 | modx->getOption('frontendmanager_core_path', null, $this->modx->getOption('core_path') . 'components/frontendmanager/'); 16 | require_once $corePath . 'model/frontendmanager/frontendmanager.class.php'; 17 | 18 | $this->frontendManager = new frontendManager($this->modx); 19 | //$this->addCss($this->frontendManager->config['cssUrl'] . 'mgr/main.css'); 20 | $this->addJavascript($this->frontendManager->config['jsUrl'] . 'mgr/frontendmanager.js'); 21 | $this->addHtml(' 22 | 26 | '); 27 | 28 | parent::initialize(); 29 | } 30 | 31 | 32 | /** 33 | * @return array 34 | */ 35 | public function getLanguageTopics() { 36 | return array('frontendmanager:default'); 37 | } 38 | 39 | 40 | /** 41 | * @return bool 42 | */ 43 | public function checkPermissions() { 44 | return true; 45 | } 46 | } 47 | 48 | 49 | /** 50 | * Class IndexManagerController 51 | */ 52 | class IndexManagerController extends frontendManagerMainController { 53 | 54 | /** 55 | * @return string 56 | */ 57 | public static function getDefaultController() { 58 | return 'home'; 59 | } 60 | } -------------------------------------------------------------------------------- /core/components/frontendmanager/elements/chunks/chunk.frontendmanager.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 | 12 |
13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FrontendManager 2 | 3 | ![modx_revo](https://img.shields.io/badge/modx_revo-%232F4150.svg?&style=for-the-badge&logo=modx&logoColor=white) 4 | 5 | Панель, отображаемая во фронтенде, для быстрого вызова страниц административной панели modx revo не покидая страницы сайта. 6 | 7 | Компонент умеет грузить фрейм админки, добавляя в нее немного css для скрытия ненужных блоков. 8 | 9 | ## Элементы панели управления 10 | 11 | - Редактирование страницы 12 | - Пользователи 13 | - Заказы 14 | - Настройки контекста 15 | - Настройки 16 | - Журнал ошибок 17 | - Очистка кэша 18 | 19 | ## Настройка 20 | 21 | - В системных настройках доступны такие параметры как: 22 | - `frontendmanager_frontend_position` - отвечает за размещение панели. 23 | - `frontendmanager_contenttypes` - типы содержимого для вывода панели. 24 | - а также настройки стилей для `manager` и `frontend` части сайта. 25 | - Чанк `tpl.frontendmanager` для вывода панели и ссылок. 26 | - Плагин `frontendmanager` для вставки панели на страницу (доступен естественно залогиненным в админку пользователям). 27 | 28 | ![модальное окно панели управления frontendManager](https://github.com/alexsoin/modx-frontendmanager/assets/3787132/6f7c3b30-cda5-4d5f-a2a9-f8a719ddbd0b) 29 | 30 | ![панель управления frontendManager](https://github.com/alexsoin/modx-frontendmanager/assets/3787132/67f78c0a-9dd1-41b0-9464-f736b268a276) 31 | 32 | Для перехода в административную панель нажмите на иконку `modx` в панели управления через `скм`, либо через `ctrl+click`: 33 | 34 | ![иконка modx в панели управления frontendManager](https://github.com/alexsoin/modx-frontendmanager/assets/3787132/615b87dd-226c-4247-a5f6-0d2af37fcbb4) 35 | 36 | ## Системные требования 37 | 38 | - **modx**: >= 2.3 < 3 39 | - **pdoTools** 40 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/_flaticon.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Flaticon icon font: Flaticon 3 | Creation date: 10/12/2016 19:40 4 | */ 5 | 6 | @font-face { 7 | font-family: "Flaticon"; 8 | src: url("./Flaticon.eot"); 9 | src: url("./Flaticon.eot?#iefix") format("embedded-opentype"), 10 | url("./Flaticon.woff") format("woff"), 11 | url("./Flaticon.ttf") format("truetype"), 12 | url("./Flaticon.svg#Flaticon") format("svg"); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | @media screen and (-webkit-min-device-pixel-ratio:0) { 18 | @font-face { 19 | font-family: "Flaticon"; 20 | src: url("./Flaticon.svg#Flaticon") format("svg"); 21 | } 22 | } 23 | 24 | .fi:before{ 25 | display: inline-block; 26 | font-family: "Flaticon"; 27 | font-style: normal; 28 | font-weight: normal; 29 | font-variant: normal; 30 | line-height: 1; 31 | text-decoration: inherit; 32 | text-rendering: optimizeLegibility; 33 | text-transform: none; 34 | -moz-osx-font-smoothing: grayscale; 35 | -webkit-font-smoothing: antialiased; 36 | font-smoothing: antialiased; 37 | } 38 | 39 | .flaticon-cache:before { content: "\f100"; } 40 | .flaticon-context:before { content: "\f101"; } 41 | .flaticon-edit:before { content: "\f102"; } 42 | .flaticon-hide:before { content: "\f103"; } 43 | .flaticon-log:before { content: "\f104"; } 44 | .flaticon-ms2:before { content: "\f105"; } 45 | .flaticon-settings:before { content: "\f106"; } 46 | .flaticon-user:before { content: "\f107"; } 47 | 48 | $font-Flaticon-cache: "\f100"; 49 | $font-Flaticon-context: "\f101"; 50 | $font-Flaticon-edit: "\f102"; 51 | $font-Flaticon-hide: "\f103"; 52 | $font-Flaticon-log: "\f104"; 53 | $font-Flaticon-ms2: "\f105"; 54 | $font-Flaticon-settings: "\f106"; 55 | $font-Flaticon-user: "\f107"; -------------------------------------------------------------------------------- /_build/data/transport.settings.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'xtype' => 'textfield', 8 | 'value' => 'frontend.css', 9 | 'area' => 'frontendmanager_frontend', 10 | ), 11 | 'frontend_js' => array( 12 | 'xtype' => 'textfield', 13 | 'value' => 'frontend.js', 14 | 'area' => 'frontendmanager_frontend', 15 | ), 16 | 'frontend_tpl' => array( 17 | 'xtype' => 'textfield', 18 | 'value' => 'tpl.frontendmanager', 19 | 'area' => 'frontendmanager_frontend', 20 | ), 21 | 'frontend_position' => array( 22 | 'xtype' => 'textfield', 23 | 'value' => 'top', 24 | 'area' => 'frontendmanager_frontend', 25 | ), 26 | 'contenttypes' => array( 27 | 'xtype' => 'textfield', 28 | 'value' => '1', 29 | 'area' => 'frontendmanager_manager', 30 | ), 31 | 32 | 'manager_css' => array( 33 | 'xtype' => 'textfield', 34 | 'value' => 'manager.css', 35 | 'area' => 'frontendmanager_manager', 36 | ), 37 | 'manager_js' => array( 38 | 'xtype' => 'textfield', 39 | 'value' => 'manager.js', 40 | 'area' => 'frontendmanager_manager', 41 | ), 42 | 'ignore_templates' => array( 43 | 'xtype' => 'textfield', 44 | 'value' => '', 45 | 'area' => 'frontendmanager_manager', 46 | ), 47 | 'ignore_resources' => array( 48 | 'xtype' => 'textfield', 49 | 'value' => '', 50 | 'area' => 'frontendmanager_manager', 51 | ), 52 | 'active_groups' => array( 53 | 'xtype' => 'textfield', 54 | 'value' => 'Administrator', 55 | 'area' => 'frontendmanager_manager', 56 | ), 57 | ); 58 | 59 | foreach ($tmp as $k => $v) { 60 | /* @var modSystemSetting $setting */ 61 | $setting = $modx->newObject('modSystemSetting'); 62 | $setting->fromArray(array_merge( 63 | array( 64 | 'key' => 'frontendmanager_' . $k, 65 | 'namespace' => PKG_NAME_LOWER, 66 | ), $v 67 | ), '', true, true); 68 | 69 | $settings[] = $setting; 70 | } 71 | 72 | unset($tmp); 73 | return $settings; 74 | -------------------------------------------------------------------------------- /_build/build.config.php: -------------------------------------------------------------------------------- 1 | getObject('transport.modTransportPackage', array('package_name' => 'pdoTools')); 8 | break; 9 | 10 | case xPDOTransport::ACTION_UPGRADE: 11 | //$exists = $modx->getObject('transport.modTransportPackage', array('package_name' => 'pdoTools')); 12 | if (!empty($options['attributes']['chunks'])) { 13 | $chunks = ''; 23 | } 24 | break; 25 | 26 | case xPDOTransport::ACTION_UNINSTALL: 27 | break; 28 | } 29 | 30 | $output = ''; 31 | /* 32 | if (!$exists) { 33 | switch ($modx->getOption('manager_language')) { 34 | case 'ru': 35 | $output = 'Этот компонент требует pdoTools для быстрой работы сниппетов.
Он будет автоматически скачан и установлен.'; 36 | break; 37 | default: 38 | $output = 'This component requires pdoTools for fast work of snippets.

It will be automaticly downloaded and installed?'; 39 | } 40 | } 41 | */ 42 | 43 | if ($chunks) { 44 | /* 45 | if (!$exists) { 46 | $output .= '

'; 47 | } 48 | */ 49 | 50 | switch ($modx->getOption('manager_language')) { 51 | case 'ru': 52 | $output .= 'Выберите чанки, которые нужно перезаписать:
53 | 54 | отметить все | 55 | cнять отметки 56 | 57 | '; 58 | break; 59 | default: 60 | $output .= 'Select chunks, which need to overwrite:
61 | 62 | select all | 63 | deselect all 64 | 65 | '; 66 | } 67 | 68 | $output .= $chunks; 69 | } 70 | 71 | return $output; -------------------------------------------------------------------------------- /assets/components/frontendmanager/js/web/frontend.js: -------------------------------------------------------------------------------- 1 | const frontendManager = { 2 | config: { 3 | panel: '.fm-panel', 4 | modal: { 5 | id: 'fm-modal', 6 | cookieKey: 'fm-hide', 7 | className: { 8 | general: 'fm-modal', 9 | iframeWrapper: 'fm-iframe-wrapper', 10 | closeButton: 'fm-btn-close', 11 | modeButton: 'fm-mode', 12 | }, 13 | }, 14 | }, 15 | initialize() { 16 | const { cookieKey, className } = this.config.modal; 17 | if (typeof frontendManagerConfig === 'undefined') return; 18 | 19 | this.panel = document.querySelector(this.config.panel); 20 | 21 | document.body.classList.add('fm', `fm-pos-${frontendManagerConfig.position}`); 22 | this.getCookie(cookieKey) && document.body.classList.add(cookieKey); 23 | 24 | this.panel.querySelectorAll(':scope a[data-action="iframe"]') 25 | .forEach((i) => i.addEventListener('click', (e) => { 26 | e.preventDefault(); 27 | this.open(i.getAttribute('href')); 28 | })); 29 | 30 | document.querySelectorAll(`.${className.modeButton}`) 31 | .forEach((i) => i.addEventListener('click', (e) => { 32 | e.preventDefault(); 33 | document.cookie = `${cookieKey}=${document.body.classList.contains(cookieKey) ? '' : '1'}`; 34 | document.body.classList.toggle(cookieKey); 35 | })); 36 | 37 | this.createModal(); 38 | this.panel.classList.add('fm-panel--show'); 39 | }, 40 | createModal() { 41 | const { className, id: modalId } = this.config.modal; 42 | 43 | this.modal = document.createElement('div'); 44 | this.modal.id = modalId; 45 | this.modal.classList.add(className.general); 46 | 47 | this.closeButton = document.createElement('button'); 48 | this.closeButton.classList.add(className.closeButton); 49 | 50 | this.iframe = document.createElement('iframe'); 51 | this.iframeWrapper = document.createElement('div'); 52 | this.iframeWrapper.classList.add(className.iframeWrapper); 53 | this.iframeWrapper.append(this.iframe); 54 | this.iframeWrapper.dataset.textLoad = frontendManagerConfig.modal.textModalLoad; 55 | 56 | this.modal.append(this.closeButton, this.iframeWrapper); 57 | 58 | document.addEventListener('click', ({ target }) => { 59 | if (target !== this.modal && target !== this.closeButton) { 60 | return; 61 | } 62 | 63 | this.close(); 64 | }); 65 | }, 66 | open(url) { 67 | const scrollPadding = window.innerWidth - document.documentElement.clientWidth; 68 | 69 | this.iframe.src = url + '&frame=1'; 70 | document.body.style.overflow = 'hidden'; 71 | document.body.append(this.modal); 72 | 73 | if(scrollPadding) { 74 | document.body.style.paddingRight = `${scrollPadding}px`; 75 | } 76 | }, 77 | close() { 78 | document.body.removeChild(this.modal); 79 | document.body.style.overflow = ''; 80 | document.body.style.paddingRight = ''; 81 | this.iframe.src = ''; 82 | }, 83 | getCookie(name) { 84 | const result = document.cookie.match(`(^|[^;]+)\s*${name}\s*=\s*([^;]+)`); 85 | return result ? decodeURIComponent(result.pop()) : undefined; 86 | } 87 | }; 88 | 89 | frontendManager.initialize(); 90 | -------------------------------------------------------------------------------- /core/components/frontendmanager/model/frontendmanager/frontendmanager.class.php: -------------------------------------------------------------------------------- 1 | modx =& $modx; 12 | 13 | $corePath = $this->modx->getOption('frontendmanager_core_path', $config, $this->modx->getOption('core_path') . 'components/frontendmanager/'); 14 | $assetsUrl = $this->modx->getOption('frontendmanager_assets_url', $config, $this->modx->getOption('assets_url') . 'components/frontendmanager/'); 15 | $connectorUrl = $assetsUrl . 'connector.php'; 16 | 17 | $this->config = array_merge(array( 18 | 'assetsUrl' => $assetsUrl, 19 | 'cssUrl' => $assetsUrl . 'css/', 20 | 'jsUrl' => $assetsUrl . 'js/', 21 | 'connectorUrl' => $connectorUrl, 22 | 'position' => $this->modx->getOption('frontendmanager_frontend_position', null, 'top'), 23 | 'corePath' => $corePath, 24 | 'modelPath' => $corePath . 'model/', 25 | 'chunksPath' => $corePath . 'elements/chunks/', 26 | 'templatesPath' => $corePath . 'elements/templates/', 27 | 'chunkSuffix' => '.chunk.tpl', 28 | 'snippetsPath' => $corePath . 'elements/snippets/', 29 | 'processorsPath' => $corePath . 'processors/' 30 | ), $config); 31 | 32 | $this->modx->addPackage('frontendmanager', $this->config['modelPath']); 33 | $this->modx->lexicon->load('frontendmanager:default'); 34 | 35 | $this->pdoTools = $this->modx->getService('pdoFetch'); 36 | $this->pdoTools->setConfig($this->config); 37 | } 38 | 39 | 40 | public function initialize($ctx = 'web', $scriptProperties = array()){ 41 | 42 | $this->config = array_merge($this->config, $scriptProperties); 43 | if (!empty($this->initialized[$ctx])) { 44 | return true; 45 | } 46 | $this->initialized[$ctx] = true; 47 | 48 | $config_js = array( 49 | 'ctx' => $ctx, 50 | 'jsUrl' => $this->config['jsUrl'], 51 | 'cssUrl' => $this->config['cssUrl'], 52 | 'position' => $this->config['position'], 53 | 'auth' => $this->modx->user->getUserToken('mgr'), 54 | 'modal' => [ 55 | 'textModalLoad' => $this->modx->lexicon('frontendmanager_text_modal_load') 56 | ], 57 | ); 58 | 59 | $output = &$this->modx->resource->_output; 60 | $assets = []; 61 | 62 | if (strpos($output, '') === false || strpos($output, '') === false) { 63 | return; 64 | } 65 | 66 | $assets[] = ''; 67 | $assets[] = ''; 68 | $assets[] = ''; 69 | 70 | $chunk_fm = $this->pdoTools->getChunk($this->modx->getOption('frontendmanager_frontend_tpl', NULL, 'tpl.frontendmanager.panel')); 71 | 72 | $assets = join(PHP_EOL, $assets); 73 | 74 | $output = preg_replace("/(<\/head>)/i", $assets . "\n\\1", $output, 1); 75 | $output = preg_replace("/(<\/body>)/i", $chunk_fm . "\n\\1", $output, 1); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/web/frontend.css: -------------------------------------------------------------------------------- 1 | @import "../fonts/flaticon.css"; 2 | 3 | :root { 4 | --fm-color-primary: #2F4150; 5 | --fm-color-secondary: #3B5C69; 6 | --fm-index: 1040; 7 | } 8 | 9 | .fm-panel, 10 | .fm-panel *, 11 | .fm-panel *::before, 12 | .fm-panel *::after { 13 | box-sizing: border-box; 14 | } 15 | 16 | .fm-modal, 17 | .fm-modal *, 18 | .fm-modal *::before, 19 | .fm-modal *::after { 20 | box-sizing: border-box; 21 | } 22 | 23 | .fm-panel { 24 | display: none; 25 | flex-direction: row; 26 | flex-wrap: wrap; 27 | align-items: center; 28 | gap: 1em .5em; 29 | background-color: var(--fm-color-primary); 30 | font: normal 13px "Helvetica Neue", Helvetica, Arial, Tahoma, sans-serif; 31 | -webkit-font-smoothing: antialiased; 32 | position: fixed; 33 | z-index: var(--fm-index); 34 | top: 0; 35 | left: 0; 36 | right: 0; 37 | padding: .5em; 38 | } 39 | 40 | .fm-panel--show { 41 | display: flex; 42 | } 43 | 44 | .fm-row { 45 | display: flex; 46 | flex-direction: row; 47 | overflow-x: auto; 48 | flex: 1; 49 | gap: .5em; 50 | } 51 | 52 | .fm-panel a { 53 | display: inline-flex; 54 | gap: .5em; 55 | align-items: center; 56 | color: #fff !important; 57 | padding: 0 1em; 58 | outline: 0 !important; 59 | text-decoration: none !important; 60 | transition: background-color .3s; 61 | border-radius: 1.6em; 62 | height: 2.5em; 63 | line-height: 1; 64 | } 65 | 66 | .fm-panel a>img { 67 | height: 1.5em; 68 | width: 1.5em; 69 | } 70 | 71 | .fm-panel a.fm-mode { 72 | display: flex; 73 | justify-content: center; 74 | align-items: center; 75 | width: 2.5em; 76 | background-color: var(--fm-color-primary); 77 | padding: 0; 78 | border-radius: 100%; 79 | margin-right: 1em; 80 | } 81 | 82 | .fm-panel a:hover { 83 | background-color: var(--fm-color-secondary); 84 | opacity: 1; 85 | } 86 | 87 | .fm-panel a span[class^="fm-icon-"]>img { 88 | display: none; 89 | } 90 | 91 | .fm-panel a span[class^="fm-icon-"]:before { 92 | font-size: 1em; 93 | margin: 0 94 | } 95 | 96 | .fm-link-text { 97 | margin-top: 2px; 98 | white-space: nowrap; 99 | } 100 | 101 | .fm-panel.button { 102 | display: inline-block; 103 | position: static; 104 | padding: 0 1em; 105 | color: #fff 106 | } 107 | 108 | .fm-panel.button:hover { 109 | background: var(--fm-color-secondary); 110 | text-decoration: none 111 | } 112 | 113 | body.fm-pos-bottom .fm-panel { 114 | bottom: 0; 115 | top: auto; 116 | } 117 | 118 | body.fm-hide .fm-panel, 119 | body.fm-hide .fm-row { 120 | background-color: transparent; 121 | pointer-events: none; 122 | overflow-x: hidden; 123 | } 124 | 125 | body.fm-hide .fm-panel a { 126 | opacity: 0; 127 | pointer-events: none; 128 | } 129 | 130 | body.fm-hide .fm-panel a.fm-mode { 131 | opacity: 1; 132 | pointer-events: all; 133 | z-index: var(--fm-index); 134 | } 135 | 136 | /* Modal */ 137 | .fm-modal { 138 | position: fixed; 139 | z-index: calc(var(--fm-index) + 1); 140 | left: 0; 141 | top: 0; 142 | width: 100%; 143 | height: 100%; 144 | overflow: auto; 145 | background-color: rgba(0, 0, 0, 0.5); 146 | display: flex; 147 | justify-content: center; 148 | align-items: center; 149 | padding: 3.5rem; 150 | } 151 | 152 | .fm-modal iframe { 153 | position: relative; 154 | width: 100%; 155 | height: 100%; 156 | border-radius: .4em; 157 | border: 0; 158 | padding: .5rem; 159 | background: #f2f2f2; 160 | } 161 | 162 | .fm-modal .fm-iframe-wrapper { 163 | position: relative; 164 | width: 100%; 165 | height: 100%; 166 | max-width: 1600px; 167 | border: 0; 168 | background-color: var(--fm-color-primary); 169 | border-radius: .4em; 170 | } 171 | 172 | .fm-modal .fm-iframe-wrapper::before { 173 | content: attr(data-text-load); 174 | position: absolute; 175 | top: 0; 176 | left: 0; 177 | width: 100%; 178 | height: 100%; 179 | color: white; 180 | display: flex; 181 | justify-content: center; 182 | align-items: center; 183 | font-size: 2em; 184 | } 185 | 186 | .fm-modal .fm-btn-close { 187 | position: absolute; 188 | right: 1.25em; 189 | top: 1.25em; 190 | background-color: var(--fm-color-primary); 191 | color: white; 192 | border: none; 193 | border-radius: 50%; 194 | width: 2.3em; 195 | height: 2.3em; 196 | padding: .125em; 197 | z-index: calc(var(--fm-index) + 2); 198 | transition: background-color .3s; 199 | cursor: pointer; 200 | } 201 | 202 | .fm-modal .fm-btn-close::before { 203 | content: ''; 204 | display: block; 205 | width: 100%; 206 | height: 100%; 207 | background-image: url('data:image/svg+xml,%3Csvg%20xmlns="http://www.w3.org/2000/svg"%20fill="none"%20viewBox="0%200%2024%2024"%20stroke-width="1.5"%20stroke="white"%3E%3Cpath%20stroke-linecap="round"%20stroke-linejoin="round"%20d="M9.75%209.75l4.5%204.5m0-4.5l-4.5%204.5M21%2012a9%209%200%2011-18%200%209%209%200%200118%200z"%20/%3E%3C/svg%3E'); 208 | } 209 | 210 | .fm-modal .fm-btn-close:hover { 211 | background-color: var(--fm-color-secondary); 212 | } 213 | 214 | /* Modal END */ 215 | 216 | @media only screen and (max-width: 1280px) { 217 | .fm-panel a span[class^="fm-icon-"] { 218 | margin: 0; 219 | } 220 | 221 | .fm-panel a span.fm-link-text { 222 | display: none; 223 | } 224 | 225 | .fm-modal { 226 | padding: 4rem .3rem .3rem .3rem; 227 | } 228 | } 229 | -------------------------------------------------------------------------------- /_build/resolvers/resolve.setup.php: -------------------------------------------------------------------------------- 1 | getObject('transport.modTransportProvider', array('service_url:LIKE' => '%simpledream.ru%', 'OR:service_url:LIKE' => '%modstore.pro%'))) { 10 | $provider = $modx->getObject('transport.modTransportProvider', 1); 11 | } 12 | 13 | $modx->getVersionData(); 14 | $productVersion = $modx->version['code_name'] . '-' . $modx->version['full_version']; 15 | 16 | $response = $provider->request('package', 'GET', array( 17 | 'supports' => $productVersion, 18 | 'query' => $packageName 19 | )); 20 | 21 | if (!empty($response)) { 22 | $foundPackages = simplexml_load_string($response->response); 23 | foreach ($foundPackages as $foundPackage) { 24 | /* @var modTransportPackage $foundPackage */ 25 | if ($foundPackage->name == $packageName) { 26 | $sig = explode('-', $foundPackage->signature); 27 | $versionSignature = explode('.', $sig[1]); 28 | $url = $foundPackage->location; 29 | 30 | if (!downloadPackage($url, $modx->getOption('core_path') . 'packages/' . $foundPackage->signature . '.transport.zip')) { 31 | return array( 32 | 'success' => 0, 33 | 'message' => "Could not download package {$packageName}.", 34 | ); 35 | } 36 | 37 | /* add in the package as an object so it can be upgraded */ 38 | /** @var modTransportPackage $package */ 39 | $package = $modx->newObject('transport.modTransportPackage'); 40 | $package->set('signature', $foundPackage->signature); 41 | $package->fromArray(array( 42 | 'created' => date('Y-m-d h:i:s'), 43 | 'updated' => null, 44 | 'state' => 1, 45 | 'workspace' => 1, 46 | 'provider' => $provider->id, 47 | 'source' => $foundPackage->signature . '.transport.zip', 48 | 'package_name' => $packageName, 49 | 'version_major' => $versionSignature[0], 50 | 'version_minor' => !empty($versionSignature[1]) ? $versionSignature[1] : 0, 51 | 'version_patch' => !empty($versionSignature[2]) ? $versionSignature[2] : 0, 52 | )); 53 | 54 | if (!empty($sig[2])) { 55 | $r = preg_split('/([0-9]+)/', $sig[2], -1, PREG_SPLIT_DELIM_CAPTURE); 56 | if (is_array($r) && !empty($r)) { 57 | $package->set('release', $r[0]); 58 | $package->set('release_index', (isset($r[1]) ? $r[1] : '0')); 59 | } 60 | else { 61 | $package->set('release', $sig[2]); 62 | } 63 | } 64 | 65 | if ($package->save() && $package->install()) { 66 | return array( 67 | 'success' => 1, 68 | 'message' => "{$packageName} was successfully installed", 69 | ); 70 | } 71 | else { 72 | return array( 73 | 'success' => 0, 74 | 'message' => "Could not save package {$packageName}", 75 | ); 76 | } 77 | break; 78 | } 79 | } 80 | } 81 | else { 82 | return array( 83 | 'success' => 0, 84 | 'message' => "Could not find {$packageName} in MODX repository", 85 | ); 86 | } 87 | return true; 88 | } 89 | } 90 | 91 | if (!function_exists('downloadPackage')) { 92 | function downloadPackage($src, $dst) { 93 | if (ini_get('allow_url_fopen')) { 94 | $file = @file_get_contents($src); 95 | } 96 | else { 97 | if (function_exists('curl_init')) { 98 | $ch = curl_init(); 99 | curl_setopt($ch, CURLOPT_URL, $src); 100 | curl_setopt($ch, CURLOPT_HEADER, 0); 101 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 102 | curl_setopt($ch, CURLOPT_TIMEOUT, 180); 103 | $safeMode = @ini_get('safe_mode'); 104 | $openBasedir = @ini_get('open_basedir'); 105 | if (empty($safeMode) && empty($openBasedir)) { 106 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 107 | } 108 | 109 | $file = curl_exec($ch); 110 | curl_close($ch); 111 | } 112 | else { 113 | return false; 114 | } 115 | } 116 | file_put_contents($dst, $file); 117 | 118 | return file_exists($dst); 119 | } 120 | } 121 | 122 | 123 | $success = false; 124 | switch (@$options[xPDOTransport::PACKAGE_ACTION]) { 125 | case xPDOTransport::ACTION_INSTALL: 126 | case xPDOTransport::ACTION_UPGRADE: 127 | /* @var modX $modx */ 128 | $modx = &$object->xpdo; 129 | /* Checking and installing required packages */ 130 | $packages = array( 131 | 'pdoTools' => '2.1.0-pl', 132 | ); 133 | 134 | foreach ($packages as $package_name => $version) { 135 | $installed = $modx->getIterator('transport.modTransportPackage', array('package_name' => $package_name)); 136 | /** @var modTransportPackage $package */ 137 | foreach ($installed as $package) { 138 | if ($package->compareVersion($version, '<=')) { 139 | continue(2); 140 | } 141 | } 142 | $modx->log(modX::LOG_LEVEL_INFO, "Trying to install {$package_name}. Please wait..."); 143 | $response = installPackage($package_name); 144 | $level = $response['success'] 145 | ? modX::LOG_LEVEL_INFO 146 | : modX::LOG_LEVEL_ERROR; 147 | $modx->log($level, $response['message']); 148 | } 149 | 150 | $success = true; 151 | break; 152 | 153 | case xPDOTransport::ACTION_UNINSTALL: 154 | $success = true; 155 | break; 156 | } 157 | 158 | return $success; -------------------------------------------------------------------------------- /_build/build.transport.php: -------------------------------------------------------------------------------- 1 | $root, 21 | 'build' => $root . '_build/', 22 | 'data' => $root . '_build/data/', 23 | 'resolvers' => $root . '_build/resolvers/', 24 | 'chunks' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/chunks/', 25 | 'snippets' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/snippets/', 26 | 'plugins' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/plugins/', 27 | 'lexicon' => $root . 'core/components/' . PKG_NAME_LOWER . '/lexicon/', 28 | 'docs' => $root . 'core/components/' . PKG_NAME_LOWER . '/docs/', 29 | 'pages' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/pages/', 30 | 'source_assets' => $root . 'assets/components/' . PKG_NAME_LOWER, 31 | 'source_core' => $root . 'core/components/' . PKG_NAME_LOWER, 32 | ); 33 | unset($root); 34 | 35 | require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; 36 | require_once $sources['build'] . '/includes/functions.php'; 37 | 38 | $modx = new modX(); 39 | $modx->initialize('mgr'); 40 | $modx->setLogLevel(modX::LOG_LEVEL_INFO); 41 | $modx->setLogTarget('ECHO'); 42 | $modx->getService('error', 'error.modError'); 43 | $modx->loadClass('transport.modPackageBuilder', '', false, true); 44 | if (!XPDO_CLI_MODE) { 45 | echo '
';
 46 | }
 47 | 
 48 | $builder = new modPackageBuilder($modx);
 49 | $builder->createPackage(PKG_NAME_LOWER, PKG_VERSION, PKG_RELEASE);
 50 | $builder->registerNamespace(PKG_NAME_LOWER, false, true, PKG_NAMESPACE_PATH);
 51 | 
 52 | $modx->log(modX::LOG_LEVEL_INFO, 'Created Transport Package and Namespace.');
 53 | 
 54 | /* load system settings */
 55 | if (defined('BUILD_SETTING_UPDATE')) {
 56 | 	$settings = include $sources['data'] . 'transport.settings.php';
 57 | 	if (!is_array($settings)) {
 58 | 		$modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in settings.');
 59 | 	}
 60 | 	else {
 61 | 		$attributes = array(
 62 | 			xPDOTransport::UNIQUE_KEY => 'key',
 63 | 			xPDOTransport::PRESERVE_KEYS => true,
 64 | 			xPDOTransport::UPDATE_OBJECT => BUILD_SETTING_UPDATE,
 65 | 		);
 66 | 		foreach ($settings as $setting) {
 67 | 			$vehicle = $builder->createVehicle($setting, $attributes);
 68 | 			$builder->putVehicle($vehicle);
 69 | 		}
 70 | 		$modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($settings) . ' System Settings.');
 71 | 	}
 72 | 	unset($settings, $setting, $attributes);
 73 | }
 74 | 
 75 | /* load plugins events */
 76 | if (defined('BUILD_EVENT_UPDATE')) {
 77 | 	$events = include $sources['data'] . 'transport.events.php';
 78 | 	if (!is_array($events)) {
 79 | 		$modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in events.');
 80 | 	}
 81 | 	else {
 82 | 		$attributes = array(
 83 | 			xPDOTransport::PRESERVE_KEYS => true,
 84 | 			xPDOTransport::UPDATE_OBJECT => BUILD_EVENT_UPDATE,
 85 | 		);
 86 | 		foreach ($events as $event) {
 87 | 			$vehicle = $builder->createVehicle($event, $attributes);
 88 | 			$builder->putVehicle($vehicle);
 89 | 		}
 90 | 		$modx->log(xPDO::LOG_LEVEL_INFO, 'Packaged in ' . count($events) . ' Plugins events.');
 91 | 	}
 92 | 	unset ($events, $event, $attributes);
 93 | }
 94 | 
 95 | /* package in default access policy */
 96 | if (defined('BUILD_POLICY_UPDATE')) {
 97 | 	$attributes = array(
 98 | 		xPDOTransport::PRESERVE_KEYS => false,
 99 | 		xPDOTransport::UNIQUE_KEY => array('name'),
100 | 		xPDOTransport::UPDATE_OBJECT => BUILD_POLICY_UPDATE,
101 | 	);
102 | 	$policies = include $sources['data'] . 'transport.policies.php';
103 | 	if (!is_array($policies)) {
104 | 		$modx->log(modX::LOG_LEVEL_FATAL, 'Adding policies failed.');
105 | 	}
106 | 	foreach ($policies as $policy) {
107 | 		$vehicle = $builder->createVehicle($policy, $attributes);
108 | 		$builder->putVehicle($vehicle);
109 | 	}
110 | 	$modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($policies) . ' Access Policies.');
111 | 	flush();
112 | 	unset($policies, $policy, $attributes);
113 | }
114 | 
115 | /* package in default access policy templates */
116 | if (defined('BUILD_POLICY_TEMPLATE_UPDATE')) {
117 | 	$templates = include dirname(__FILE__) . '/data/transport.policytemplates.php';
118 | 	$attributes = array(
119 | 		xPDOTransport::PRESERVE_KEYS => false,
120 | 		xPDOTransport::UNIQUE_KEY => array('name'),
121 | 		xPDOTransport::UPDATE_OBJECT => BUILD_POLICY_TEMPLATE_UPDATE,
122 | 		xPDOTransport::RELATED_OBJECTS => true,
123 | 		xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array(
124 | 			'Permissions' => array(
125 | 				xPDOTransport::PRESERVE_KEYS => false,
126 | 				xPDOTransport::UPDATE_OBJECT => BUILD_PERMISSION_UPDATE,
127 | 				xPDOTransport::UNIQUE_KEY => array('template', 'name'),
128 | 			),
129 | 		)
130 | 	);
131 | 	if (is_array($templates)) {
132 | 		foreach ($templates as $template) {
133 | 			$vehicle = $builder->createVehicle($template, $attributes);
134 | 			$builder->putVehicle($vehicle);
135 | 		}
136 | 		$modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($templates) . ' Access Policy Templates.');
137 | 		flush();
138 | 	}
139 | 	else {
140 | 		$modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in Access Policy Templates.');
141 | 	}
142 | 	unset ($templates, $template, $attributes);
143 | }
144 | 
145 | /* load menus */
146 | if (defined('BUILD_MENU_UPDATE')) {
147 | 	$menus = include $sources['data'] . 'transport.menu.php';
148 | 	$attributes = array(
149 | 		xPDOTransport::PRESERVE_KEYS => true,
150 | 		xPDOTransport::UPDATE_OBJECT => BUILD_MENU_UPDATE,
151 | 		xPDOTransport::UNIQUE_KEY => 'text',
152 | 		xPDOTransport::RELATED_OBJECTS => true,
153 | 		xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array(
154 | 			'Action' => array(
155 | 				xPDOTransport::PRESERVE_KEYS => false,
156 | 				xPDOTransport::UPDATE_OBJECT => BUILD_ACTION_UPDATE,
157 | 				xPDOTransport::UNIQUE_KEY => array('namespace', 'controller'),
158 | 			),
159 | 		),
160 | 	);
161 | 	if (is_array($menus)) {
162 | 		foreach ($menus as $menu) {
163 | 			$vehicle = $builder->createVehicle($menu, $attributes);
164 | 			$builder->putVehicle($vehicle);
165 | 			/* @var modMenu $menu */
166 | 			$modx->log(modX::LOG_LEVEL_INFO, 'Packaged in menu "' . $menu->get('text') . '".');
167 | 		}
168 | 	}
169 | 	else {
170 | 		$modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in menu.');
171 | 	}
172 | 	unset($vehicle, $menus, $menu, $attributes);
173 | }
174 | 
175 | 
176 | /* create category */
177 | $modx->log(xPDO::LOG_LEVEL_INFO, 'Created category.');
178 | /* @var modCategory $category */
179 | $category = $modx->newObject('modCategory');
180 | $category->set('category', PKG_NAME);
181 | /* create category vehicle */
182 | $attr = array(
183 | 	xPDOTransport::UNIQUE_KEY => 'category',
184 | 	xPDOTransport::PRESERVE_KEYS => false,
185 | 	xPDOTransport::UPDATE_OBJECT => true,
186 | 	xPDOTransport::RELATED_OBJECTS => true,
187 | );
188 | 
189 | /* add snippets */
190 | if (defined('BUILD_SNIPPET_UPDATE')) {
191 | 	$attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['Snippets'] = array(
192 | 		xPDOTransport::PRESERVE_KEYS => false,
193 | 		xPDOTransport::UPDATE_OBJECT => BUILD_SNIPPET_UPDATE,
194 | 		xPDOTransport::UNIQUE_KEY => 'name',
195 | 	);
196 | 	$snippets = include $sources['data'] . 'transport.snippets.php';
197 | 	if (!is_array($snippets)) {
198 | 		$modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in snippets.');
199 | 	}
200 | 	else {
201 | 		$category->addMany($snippets);
202 | 		$modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($snippets) . ' snippets.');
203 | 	}
204 | }
205 | 
206 | /* add chunks */
207 | if (defined('BUILD_CHUNK_UPDATE')) {
208 | 	$attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['Chunks'] = array(
209 | 		xPDOTransport::PRESERVE_KEYS => false,
210 | 		xPDOTransport::UPDATE_OBJECT => BUILD_CHUNK_UPDATE,
211 | 		xPDOTransport::UNIQUE_KEY => 'name',
212 | 	);
213 | 	$chunks = include $sources['data'] . 'transport.chunks.php';
214 | 	if (!is_array($chunks)) {
215 | 		$modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in chunks.');
216 | 	}
217 | 	else {
218 | 		$category->addMany($chunks);
219 | 		$modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($chunks) . ' chunks.');
220 | 	}
221 | }
222 | 
223 | /* add plugins */
224 | if (defined('BUILD_PLUGIN_UPDATE')) {
225 | 	$attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['Plugins'] = array(
226 | 		xPDOTransport::PRESERVE_KEYS => false,
227 | 		xPDOTransport::UPDATE_OBJECT => BUILD_PLUGIN_UPDATE,
228 | 		xPDOTransport::UNIQUE_KEY => 'name',
229 | 	);
230 | 	$attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['PluginEvents'] = array(
231 | 		xPDOTransport::PRESERVE_KEYS => true,
232 | 		xPDOTransport::UPDATE_OBJECT => BUILD_PLUGIN_UPDATE,
233 | 		xPDOTransport::UNIQUE_KEY => array('pluginid', 'event'),
234 | 	);
235 | 	$plugins = include $sources['data'] . 'transport.plugins.php';
236 | 	if (!is_array($plugins)) {
237 | 		$modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in plugins.');
238 | 	}
239 | 	else {
240 | 		$category->addMany($plugins);
241 | 		$modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($plugins) . ' plugins.');
242 | 	}
243 | }
244 | 
245 | $vehicle = $builder->createVehicle($category, $attr);
246 | 
247 | /* now pack in resolvers */
248 | $vehicle->resolve('file', array(
249 | 	'source' => $sources['source_assets'],
250 | 	'target' => "return MODX_ASSETS_PATH . 'components/';",
251 | ));
252 | $vehicle->resolve('file', array(
253 | 	'source' => $sources['source_core'],
254 | 	'target' => "return MODX_CORE_PATH . 'components/';",
255 | ));
256 | 
257 | foreach ($BUILD_RESOLVERS as $resolver) {
258 | 	if ($vehicle->resolve('php', array('source' => $sources['resolvers'] . 'resolve.' . $resolver . '.php'))) {
259 | 		$modx->log(modX::LOG_LEVEL_INFO, 'Added resolver "' . $resolver . '" to category.');
260 | 	}
261 | 	else {
262 | 		$modx->log(modX::LOG_LEVEL_INFO, 'Could not add resolver "' . $resolver . '" to category.');
263 | 	}
264 | }
265 | 
266 | flush();
267 | $builder->putVehicle($vehicle);
268 | 
269 | /* now pack in the license file, readme and setup options */
270 | $builder->setPackageAttributes(array(
271 | 	'changelog' => file_get_contents($sources['docs'] . 'changelog.txt'),
272 | 	'license' => file_get_contents($sources['docs'] . 'license.txt'),
273 | 	'readme' => file_get_contents($sources['docs'] . 'readme.txt'),
274 | 	'chunks' => $BUILD_CHUNKS,
275 | 	'setup-options' => array(
276 | 		'source' => $sources['build'] . 'setup.options.php',
277 | 	),
278 | ));
279 | $modx->log(modX::LOG_LEVEL_INFO, 'Added package attributes and setup options.');
280 | 
281 | /* zip up package */
282 | $modx->log(modX::LOG_LEVEL_INFO, 'Packing up transport package zip...');
283 | $builder->pack();
284 | 
285 | $mtime = microtime();
286 | $mtime = explode(" ", $mtime);
287 | $mtime = $mtime[1] + $mtime[0];
288 | $tend = $mtime;
289 | $totalTime = ($tend - $tstart);
290 | $totalTime = sprintf("%2.4f s", $totalTime);
291 | 
292 | $signature = $builder->getSignature();
293 | if (defined('PKG_AUTO_INSTALL') && PKG_AUTO_INSTALL) {
294 | 	$sig = explode('-', $signature);
295 | 	$versionSignature = explode('.', $sig[1]);
296 | 
297 | 	/* @var modTransportPackage $package */
298 | 	if (!$package = $modx->getObject('transport.modTransportPackage', array('signature' => $signature))) {
299 | 		$package = $modx->newObject('transport.modTransportPackage');
300 | 		$package->set('signature', $signature);
301 | 		$package->fromArray(array(
302 | 			'created' => date('Y-m-d h:i:s'),
303 | 			'updated' => null,
304 | 			'state' => 1,
305 | 			'workspace' => 1,
306 | 			'provider' => 0,
307 | 			'source' => $signature . '.transport.zip',
308 | 			'package_name' => $sig[0],
309 | 			'version_major' => $versionSignature[0],
310 | 			'version_minor' => !empty($versionSignature[1]) ? $versionSignature[1] : 0,
311 | 			'version_patch' => !empty($versionSignature[2]) ? $versionSignature[2] : 0,
312 | 		));
313 | 		if (!empty($sig[2])) {
314 | 			$r = preg_split('/([0-9]+)/', $sig[2], -1, PREG_SPLIT_DELIM_CAPTURE);
315 | 			if (is_array($r) && !empty($r)) {
316 | 				$package->set('release', $r[0]);
317 | 				$package->set('release_index', (isset($r[1]) ? $r[1] : '0'));
318 | 			}
319 | 			else {
320 | 				$package->set('release', $sig[2]);
321 | 			}
322 | 		}
323 | 		$package->save();
324 | 	}
325 | 
326 | 	if ($package->install()) {
327 | 		$modx->runProcessor('system/clearcache');
328 | 	}
329 | }
330 | if (!empty($_GET['download'])) {
331 | 	echo '';
332 | }
333 | 
334 | $modx->log(modX::LOG_LEVEL_INFO, "\n
Execution time: {$totalTime}\n"); 335 | if (!XPDO_CLI_MODE) { 336 | echo '
'; 337 | } 338 | -------------------------------------------------------------------------------- /core/components/frontendmanager/docs/license.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | -------------------------- 4 | 5 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 6 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 7 | 8 | Everyone is permitted to copy and distribute verbatim copies 9 | of this license document, but changing it is not allowed. 10 | 11 | Preamble 12 | -------- 13 | 14 | The licenses for most software are designed to take away your 15 | freedom to share and change it. By contrast, the GNU General Public 16 | License is intended to guarantee your freedom to share and change free 17 | software--to make sure the software is free for all its users. This 18 | General Public License applies to most of the Free Software 19 | Foundation's software and to any other program whose authors commit to 20 | using it. (Some other Free Software Foundation software is covered by 21 | the GNU Library General Public License instead.) You can apply it to 22 | your programs, too. 23 | 24 | When we speak of free software, we are referring to freedom, not 25 | price. Our General Public Licenses are designed to make sure that you 26 | have the freedom to distribute copies of free software (and charge for 27 | this service if you wish), that you receive source code or can get it 28 | if you want it, that you can change the software or use pieces of it 29 | in new free programs; and that you know you can do these things. 30 | 31 | To protect your rights, we need to make restrictions that forbid 32 | anyone to deny you these rights or to ask you to surrender the rights. 33 | These restrictions translate to certain responsibilities for you if you 34 | distribute copies of the software, or if you modify it. 35 | 36 | For example, if you distribute copies of such a program, whether 37 | gratis or for a fee, you must give the recipients all the rights that 38 | you have. You must make sure that they, too, receive or can get the 39 | source code. And you must show them these terms so they know their 40 | rights. 41 | 42 | We protect your rights with two steps: (1) copyright the software, and 43 | (2) offer you this license which gives you legal permission to copy, 44 | distribute and/or modify the software. 45 | 46 | Also, for each author's protection and ours, we want to make certain 47 | that everyone understands that there is no warranty for this free 48 | software. If the software is modified by someone else and passed on, we 49 | want its recipients to know that what they have is not the original, so 50 | that any problems introduced by others will not reflect on the original 51 | authors' reputations. 52 | 53 | Finally, any free program is threatened constantly by software 54 | patents. We wish to avoid the danger that redistributors of a free 55 | program will individually obtain patent licenses, in effect making the 56 | program proprietary. To prevent this, we have made it clear that any 57 | patent must be licensed for everyone's free use or not licensed at all. 58 | 59 | The precise terms and conditions for copying, distribution and 60 | modification follow. 61 | 62 | 63 | GNU GENERAL PUBLIC LICENSE 64 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 65 | --------------------------------------------------------------- 66 | 67 | 0. This License applies to any program or other work which contains 68 | a notice placed by the copyright holder saying it may be distributed 69 | under the terms of this General Public License. The "Program", below, 70 | refers to any such program or work, and a "work based on the Program" 71 | means either the Program or any derivative work under copyright law: 72 | that is to say, a work containing the Program or a portion of it, 73 | either verbatim or with modifications and/or translated into another 74 | language. (Hereinafter, translation is included without limitation in 75 | the term "modification".) Each licensee is addressed as "you". 76 | 77 | Activities other than copying, distribution and modification are not 78 | covered by this License; they are outside its scope. The act of 79 | running the Program is not restricted, and the output from the Program 80 | is covered only if its contents constitute a work based on the 81 | Program (independent of having been made by running the Program). 82 | Whether that is true depends on what the Program does. 83 | 84 | 1. You may copy and distribute verbatim copies of the Program's 85 | source code as you receive it, in any medium, provided that you 86 | conspicuously and appropriately publish on each copy an appropriate 87 | copyright notice and disclaimer of warranty; keep intact all the 88 | notices that refer to this License and to the absence of any warranty; 89 | and give any other recipients of the Program a copy of this License 90 | along with the Program. 91 | 92 | You may charge a fee for the physical act of transferring a copy, and 93 | you may at your option offer warranty protection in exchange for a fee. 94 | 95 | 2. You may modify your copy or copies of the Program or any portion 96 | of it, thus forming a work based on the Program, and copy and 97 | distribute such modifications or work under the terms of Section 1 98 | above, provided that you also meet all of these conditions: 99 | 100 | a) You must cause the modified files to carry prominent notices 101 | stating that you changed the files and the date of any change. 102 | 103 | b) You must cause any work that you distribute or publish, that in 104 | whole or in part contains or is derived from the Program or any 105 | part thereof, to be licensed as a whole at no charge to all third 106 | parties under the terms of this License. 107 | 108 | c) If the modified program normally reads commands interactively 109 | when run, you must cause it, when started running for such 110 | interactive use in the most ordinary way, to print or display an 111 | announcement including an appropriate copyright notice and a 112 | notice that there is no warranty (or else, saying that you provide 113 | a warranty) and that users may redistribute the program under 114 | these conditions, and telling the user how to view a copy of this 115 | License. (Exception: if the Program itself is interactive but 116 | does not normally print such an announcement, your work based on 117 | the Program is not required to print an announcement.) 118 | 119 | These requirements apply to the modified work as a whole. If 120 | identifiable sections of that work are not derived from the Program, 121 | and can be reasonably considered independent and separate works in 122 | themselves, then this License, and its terms, do not apply to those 123 | sections when you distribute them as separate works. But when you 124 | distribute the same sections as part of a whole which is a work based 125 | on the Program, the distribution of the whole must be on the terms of 126 | this License, whose permissions for other licensees extend to the 127 | entire whole, and thus to each and every part regardless of who wrote it. 128 | 129 | Thus, it is not the intent of this section to claim rights or contest 130 | your rights to work written entirely by you; rather, the intent is to 131 | exercise the right to control the distribution of derivative or 132 | collective works based on the Program. 133 | 134 | In addition, mere aggregation of another work not based on the Program 135 | with the Program (or with a work based on the Program) on a volume of 136 | a storage or distribution medium does not bring the other work under 137 | the scope of this License. 138 | 139 | 3. You may copy and distribute the Program (or a work based on it, 140 | under Section 2) in object code or executable form under the terms of 141 | Sections 1 and 2 above provided that you also do one of the following: 142 | 143 | a) Accompany it with the complete corresponding machine-readable 144 | source code, which must be distributed under the terms of Sections 145 | 1 and 2 above on a medium customarily used for software interchange; or, 146 | 147 | b) Accompany it with a written offer, valid for at least three 148 | years, to give any third party, for a charge no more than your 149 | cost of physically performing source distribution, a complete 150 | machine-readable copy of the corresponding source code, to be 151 | distributed under the terms of Sections 1 and 2 above on a medium 152 | customarily used for software interchange; or, 153 | 154 | c) Accompany it with the information you received as to the offer 155 | to distribute corresponding source code. (This alternative is 156 | allowed only for noncommercial distribution and only if you 157 | received the program in object code or executable form with such 158 | an offer, in accord with Subsection b above.) 159 | 160 | The source code for a work means the preferred form of the work for 161 | making modifications to it. For an executable work, complete source 162 | code means all the source code for all modules it contains, plus any 163 | associated interface definition files, plus the scripts used to 164 | control compilation and installation of the executable. However, as a 165 | special exception, the source code distributed need not include 166 | anything that is normally distributed (in either source or binary 167 | form) with the major components (compiler, kernel, and so on) of the 168 | operating system on which the executable runs, unless that component 169 | itself accompanies the executable. 170 | 171 | If distribution of executable or object code is made by offering 172 | access to copy from a designated place, then offering equivalent 173 | access to copy the source code from the same place counts as 174 | distribution of the source code, even though third parties are not 175 | compelled to copy the source along with the object code. 176 | 177 | 4. You may not copy, modify, sublicense, or distribute the Program 178 | except as expressly provided under this License. Any attempt 179 | otherwise to copy, modify, sublicense or distribute the Program is 180 | void, and will automatically terminate your rights under this License. 181 | However, parties who have received copies, or rights, from you under 182 | this License will not have their licenses terminated so long as such 183 | parties remain in full compliance. 184 | 185 | 5. You are not required to accept this License, since you have not 186 | signed it. However, nothing else grants you permission to modify or 187 | distribute the Program or its derivative works. These actions are 188 | prohibited by law if you do not accept this License. Therefore, by 189 | modifying or distributing the Program (or any work based on the 190 | Program), you indicate your acceptance of this License to do so, and 191 | all its terms and conditions for copying, distributing or modifying 192 | the Program or works based on it. 193 | 194 | 6. Each time you redistribute the Program (or any work based on the 195 | Program), the recipient automatically receives a license from the 196 | original licensor to copy, distribute or modify the Program subject to 197 | these terms and conditions. You may not impose any further 198 | restrictions on the recipients' exercise of the rights granted herein. 199 | You are not responsible for enforcing compliance by third parties to 200 | this License. 201 | 202 | 7. If, as a consequence of a court judgment or allegation of patent 203 | infringement or for any other reason (not limited to patent issues), 204 | conditions are imposed on you (whether by court order, agreement or 205 | otherwise) that contradict the conditions of this License, they do not 206 | excuse you from the conditions of this License. If you cannot 207 | distribute so as to satisfy simultaneously your obligations under this 208 | License and any other pertinent obligations, then as a consequence you 209 | may not distribute the Program at all. For example, if a patent 210 | license would not permit royalty-free redistribution of the Program by 211 | all those who receive copies directly or indirectly through you, then 212 | the only way you could satisfy both it and this License would be to 213 | refrain entirely from distribution of the Program. 214 | 215 | If any portion of this section is held invalid or unenforceable under 216 | any particular circumstance, the balance of the section is intended to 217 | apply and the section as a whole is intended to apply in other 218 | circumstances. 219 | 220 | It is not the purpose of this section to induce you to infringe any 221 | patents or other property right claims or to contest validity of any 222 | such claims; this section has the sole purpose of protecting the 223 | integrity of the free software distribution system, which is 224 | implemented by public license practices. Many people have made 225 | generous contributions to the wide range of software distributed 226 | through that system in reliance on consistent application of that 227 | system; it is up to the author/donor to decide if he or she is willing 228 | to distribute software through any other system and a licensee cannot 229 | impose that choice. 230 | 231 | This section is intended to make thoroughly clear what is believed to 232 | be a consequence of the rest of this License. 233 | 234 | 8. If the distribution and/or use of the Program is restricted in 235 | certain countries either by patents or by copyrighted interfaces, the 236 | original copyright holder who places the Program under this License 237 | may add an explicit geographical distribution limitation excluding 238 | those countries, so that distribution is permitted only in or among 239 | countries not thus excluded. In such case, this License incorporates 240 | the limitation as if written in the body of this License. 241 | 242 | 9. The Free Software Foundation may publish revised and/or new versions 243 | of the General Public License from time to time. Such new versions will 244 | be similar in spirit to the present version, but may differ in detail to 245 | address new problems or concerns. 246 | 247 | Each version is given a distinguishing version number. If the Program 248 | specifies a version number of this License which applies to it and "any 249 | later version", you have the option of following the terms and conditions 250 | either of that version or of any later version published by the Free 251 | Software Foundation. If the Program does not specify a version number of 252 | this License, you may choose any version ever published by the Free Software 253 | Foundation. 254 | 255 | 10. If you wish to incorporate parts of the Program into other free 256 | programs whose distribution conditions are different, write to the author 257 | to ask for permission. For software which is copyrighted by the Free 258 | Software Foundation, write to the Free Software Foundation; we sometimes 259 | make exceptions for this. Our decision will be guided by the two goals 260 | of preserving the free status of all derivatives of our free software and 261 | of promoting the sharing and reuse of software generally. 262 | 263 | NO WARRANTY 264 | ----------- 265 | 266 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 267 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 268 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 269 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 270 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 271 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 272 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 273 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 274 | REPAIR OR CORRECTION. 275 | 276 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 277 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 278 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 279 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 280 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 281 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 282 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 283 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 284 | POSSIBILITY OF SUCH DAMAGES. 285 | 286 | --------------------------- 287 | END OF TERMS AND CONDITIONS -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/flaticon.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | Flaticon WebFont 12 | 13 | 14 | 15 | 303 | 304 | 305 | 306 | 307 |
308 | 356 | Font Demo 357 |
358 | 359 | 360 |
361 | 362 |

Instructions

363 | 364 | 386 | 387 |
388 | 389 | 390 | 391 | 392 |
393 | 394 | 395 |
396 |
.flaticon-cache
397 |
Author: Yannick
398 |
399 | 400 |
401 |
.flaticon-context
402 |
Author: Freepik
403 |
404 | 405 |
406 |
.flaticon-edit
407 | 408 |
409 | 410 |
411 |
.flaticon-hide
412 | 413 |
414 | 415 |
416 |
.flaticon-log
417 |
Author: Freepik
418 |
419 | 420 |
421 |
.flaticon-ms2
422 | 423 |
424 | 425 |
426 |
.flaticon-settings
427 | 428 |
429 | 430 |
431 |
.flaticon-user
432 | 433 |
434 | 435 | 436 |
437 | 438 | 439 | 440 |
441 | 442 |
License and attribution:
Font generated by flaticon.com.

Under CC: Gregor Cresnar, Freepik, Yannick

443 |
444 |
Copy the Attribution License:
445 | 446 | 448 | 449 |
450 | 451 |
452 | 453 |
Examples:
454 | 455 |
456 |

457 | 458 | <i class="flaticon-cache"></i> 459 |

460 |
461 | 462 |
463 |

464 | 465 | <i class="flaticon-context"></i> 466 |

467 |
468 | 469 |
470 |

471 | 472 | <i class="flaticon-edit"></i> 473 |

474 |
475 | 476 |
477 |

478 | 479 | <i class="flaticon-hide"></i> 480 |

481 |
482 | 483 | 484 | 485 |
486 | 487 | 491 | 492 | 493 | 494 | 495 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/Flaticon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by FontForge 20120731 at Sat Dec 10 19:40:36 2016 9 | By Apache 10 | Created by Apache with FontForge 2.0 (http://fontforge.sf.net) 11 | 12 | 13 | 14 | 27 | 28 | 30 | 39 | 45 | 67 | 73 | 77 | 86 | 98 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/vendor/contenttools/content-tools.min.css: -------------------------------------------------------------------------------- 1 | /*! ContentTools v1.6.4 by Anthony Blackshaw (https://github.com/anthonyjb) */.ce--dragging,.ce--resizing{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce--dragging{cursor:move!important}.ce--resizing{cursor:nwse-resize!important}.ce-element--type-image,.ce-element--type-video{background-repeat:no-repeat;position:relative;cursor:pointer;z-index:1}.ce-element--type-image:after,.ce-element--type-image:before,.ce-element--type-video:after,.ce-element--type-video:before{background:rgba(0,0,0,.5);border-radius:2px;color:#fff;display:none;font-family:arial,sans-serif;font-size:10px;line-height:10px;padding:4px 4px 3px;position:absolute}.ce-element--type-image:before,.ce-element--type-video:before{content:attr(data-ce-size);right:10px;top:10px}.ce-element--type-image.ce-element--over:before,.ce-element--type-image.ce-element--resizing:before,.ce-element--type-video.ce-element--over:before,.ce-element--type-video.ce-element--resizing:before{display:block}.ce-element--type-image{background-position:0 0;background-size:cover}.ce-element--type-image:after{background:transparent;content:'';display:block;left:0;position:relative;top:0;height:100%;width:100%}.ce-element--type-video{background:#333 url(images/video.svg) 50%/auto 48px no-repeat}.ce-element--type-video:after{bottom:10px;content:attr(data-ce-title);display:block;left:10px}.ce-element--empty:after{content:'...';display:inline-block;font-style:italic;opacity:.5}.ce-element--empty[data-ce-placeholder]:after{content:attr(data-ce-placeholder)}.ce-element--dragging{background-color:rgba(51,51,51,.1)!important;opacity:.5;z-index:-1}.ce-element--dragging.ce-element--type-image,.ce-element--dragging.ce-element--type-video{background-color:#333!important;opacity:1;outline-color:rgba(51,51,51,.1)!important}.ce-element--drop{position:relative!important}.ce-element--drop:before{background:#f39c12 url(images/drop-vert-above.svg) 50%/auto 32px repeat;bottom:0;content:''!important;left:0;opacity:.8;position:absolute;right:0;top:0;z-index:9}.ce-element--drop-below:before{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.ce-element--drop-left:before{background-image:url(images/drop-horz.svg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}.ce-element--drop-right:before{background-image:url(images/drop-horz.svg);-webkit-transform:rotate(180deg);transform:rotate(180deg)}.ce-element--drop.ce-element--type-table-row{background:#f39c12 url(images/drop-vert-above.svg) 50%/auto 32px repeat}.ce-element--drop.ce-element--type-table-row:before{display:none}.ce-element--drop.ce-element--type-table-row.ce-element--drop-below{background:#f39c12 url(images/drop-vert-below.svg) 50%/auto 32px repeat}.ce-element--focused,.ce-element--over{background-color:rgba(243,156,18,.1);outline:none}.ce-element--focused.ce-element--type-image,.ce-element--focused.ce-element--type-image-fixture,.ce-element--focused.ce-element--type-video,.ce-element--over.ce-element--type-image,.ce-element--over.ce-element--type-image-fixture,.ce-element--over.ce-element--type-video{background-color:#333;outline:4px solid rgba(243,156,18,.35)}.ce-element--resize-top-left{cursor:nw-resize}.ce-element--resize-top-right{cursor:ne-resize}.ce-element--resize-bottom-right{cursor:se-resize}.ce-element--resize-bottom-left{cursor:sw-resize}.ce-drag-helper{background:#fff;border-radius:2px;box-shadow:0 3px 3px rgba(0,0,0,.25);color:#4e4e4e;font:arial,sans-serif;font-size:12px;height:120px;left:0;line-height:135%;margin:5px 0 0 5px;overflow:hidden;padding:15px;position:absolute;top:0;width:120px;word-wrap:break-word;z-index:9}.ce-drag-helper:before{background:#2980b9;color:#fff;content:attr(data-ce-type);display:block;font-family:arial,sans-serif;font-size:10px;line-height:10px;padding:4px 4px 3px;position:absolute;right:0;top:0}.ce-drag-helper--type-list-item-text:after,.ce-drag-helper--type-list:after,.ce-drag-helper--type-pre-text:after,.ce-drag-helper--type-table-row:after,.ce-drag-helper--type-table:after,.ce-drag-helper--type-text:after{background-image:linear-gradient(hsla(0,0%,100%,0),#fff 66%);bottom:0;content:'';display:block;height:40px;left:0;position:absolute;width:100%}.ce-drag-helper--type-image{background-repeat:no-repeat;background-size:cover}.ce-element--type-image,.ce-element--type-video{display:block;margin-left:auto;margin-right:auto}.ce-element--type-image.align-left,.ce-element--type-video.align-left{clear:none;float:left}.ce-element--type-image.align-right,.ce-element--type-video.align-right{clear:none;float:right}.ce-measure{display:block!important}@font-face{font-family:icon;src:url(images/icons.woff);font-weight:400;font-style:normal}.ct-widget,.ct-widget *{box-sizing:border-box}.ct-widget * a,.ct-widget * b,.ct-widget * caption,.ct-widget * div,.ct-widget * form,.ct-widget * i fieldset,.ct-widget * iframe,.ct-widget * label,.ct-widget * legend,.ct-widget * span,.ct-widget * table,.ct-widget * tbody,.ct-widget * td,.ct-widget * tfoot,.ct-widget * th,.ct-widget * thead,.ct-widget * tr,.ct-widget a,.ct-widget b,.ct-widget caption,.ct-widget div,.ct-widget form,.ct-widget i fieldset,.ct-widget iframe,.ct-widget label,.ct-widget legend,.ct-widget span,.ct-widget table,.ct-widget tbody,.ct-widget td,.ct-widget tfoot,.ct-widget th,.ct-widget thead,.ct-widget tr{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:baseline}.ct-widget * ol,.ct-widget * ul,.ct-widget ol,.ct-widget ul{list-style:none}.ct-widget * table,.ct-widget table{border-collapse:collapse;border-spacing:0}.ct-widget{opacity:0;font-family:arial,sans-serif;font-size:14px;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;z-index:9999}.ct-widget,.ct-widget--active{-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-duration:.25s;transition-duration:.25s;-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.ct-widget--active{opacity:1}.ct-widget .ct-attribute{border-bottom:1px solid #eee;height:48px;vertical-align:top}.ct-widget .ct-attribute:after{clear:both;content:"";display:table}.ct-widget .ct-attribute__name{background:#f6f6f6;border:none;color:#646464;float:left;height:47px;outline:none;padding:0 16px;font-family:arial,sans-serif;font-size:14px;line-height:48px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:25%}.ct-widget .ct-attribute__name--invalid{color:#e74c3c}.ct-widget .ct-attribute__value{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:none;color:#646464;float:right;height:47px;outline:none;padding:0 16px;font-family:arial,sans-serif;font-size:14px;line-height:48px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:75%}.ct-widget .ct-crop-marks{height:320px;left:73px;position:absolute;top:0;width:427px}.ct-widget .ct-crop-marks__clipper{height:100%;overflow:hidden;position:relative;width:100%}.ct-widget .ct-crop-marks__ruler--top-left{position:absolute}.ct-widget .ct-crop-marks__ruler--top-left:after{border:1px solid hsla(0,0%,100%,.5);border-bottom:none;border-right:none;box-shadow:-1px -1px 1px rgba(0,0,0,.25),inset 1px 1px 1px rgba(0,0,0,.25);content:'';height:999px;left:0;position:absolute;top:0;width:999px}.ct-widget .ct-crop-marks__ruler--bottom-right{position:absolute}.ct-widget .ct-crop-marks__ruler--bottom-right:after{border:1px solid hsla(0,0%,100%,.5);border-top:none;border-left:none;bottom:0;box-shadow:1px 1px 1px rgba(0,0,0,.25),inset -1px -1px 1px rgba(0,0,0,.25);content:'';height:999px;position:absolute;right:0;width:999px}.ct-widget .ct-crop-marks__handle{background:#2980b9;border:1px solid #409ad5;border-radius:7px;cursor:pointer;height:15px;margin-left:-7px;margin-top:-7px;position:absolute;width:15px}.ct-widget .ct-crop-marks__handle--bottom-right{margin-left:-8px;margin-top:-8px}.ct-widget .ct-crop-marks__handle:hover{background:#2e8ece}@-webkit-keyframes a{0%{transform:translate(-50%,-50%) rotate(0deg);-webkit-transform:transform}to{transform:translate(-50%,-50%) rotate(359deg);-webkit-transform:transform}}@keyframes a{0%{transform:translate(-50%,-50%) rotate(0deg);-webkit-transform:transform;transform:transform}to{transform:translate(-50%,-50%) rotate(359deg);-webkit-transform:transform;transform:transform}}.ct-widget.ct-dialog{background:#fff;box-shadow:0 8px 8px rgba(0,0,0,.35);border-radius:2px;height:480px;left:50%;margin-left:-350px;margin-top:-240px;position:fixed;top:50%;width:700px;z-index:10099}.ct-widget.ct-dialog--busy .ct-dialog__busy{display:block}.ct-widget.ct-dialog--busy .ct-dialog__body{opacity:.1}.ct-widget .ct-dialog__header{color:#a4a4a4;border-bottom:1px solid #eee;height:48px;padding:0 16px;position:relative}.ct-widget .ct-dialog__caption{font-family:arial,sans-serif;font-size:18px}.ct-widget .ct-dialog__caption,.ct-widget .ct-dialog__close{line-height:48px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ct-widget .ct-dialog__close{border-left:1px solid #eee;cursor:pointer;height:48px;position:absolute;right:0;text-align:center;top:0;font-family:icon;font-size:16px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;width:48px}.ct-widget .ct-dialog__close:before{content:'\ea0f'}.ct-widget .ct-dialog__close:hover:before{color:#646464}.ct-widget .ct-dialog__body{margin:auto;width:572px}.ct-widget .ct-dialog__view{height:320px;margin-top:32px}.ct-widget .ct-dialog__controls{margin-top:16px}.ct-widget .ct-dialog__controls:after{clear:both;content:"";display:table}.ct-widget .ct-dialog__busy{display:none;position:absolute}.ct-widget .ct-dialog__busy:before{-webkit-animation:a 5s linear;animation:a 5s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;color:#a4a4a4;content:"\e994";left:50%;position:fixed;top:50%;font-family:icon;font-size:80px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ct-widget .ct-control-group{font-size:0}.ct-widget .ct-control-group--center{text-align:center}.ct-widget .ct-control-group--left{float:left}.ct-widget .ct-control-group--right{float:right}.ct-widget .ct-control{margin-left:16px;position:relative}.ct-widget .ct-control:first-child{margin-left:0}.ct-widget .ct-control--icon{color:#a4a4a4;cursor:pointer;display:inline-block;height:32px;line-height:32px;text-align:center;font-family:icon;font-size:16px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;width:32px}.ct-widget .ct-control--icon,.ct-widget .ct-control--icon:after{border-radius:2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ct-widget .ct-control--icon:after{background:#000;color:#fff;content:attr(data-ct-tooltip);display:block;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;left:-26.5px;opacity:0;padding:0 8px;position:absolute;bottom:37px;font-family:arial,sans-serif;font-size:12px;line-height:20px;visibility:hidden;width:85px;word-break:break-word}.ct-widget .ct-control--icon:hover:after{opacity:.8;visibility:visible;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-duration:0s;transition-duration:0s;-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;-webkit-transition-delay:2s;transition-delay:2s}.ct-widget .ct-control--icon:before{content:''}.ct-widget .ct-control--icon:hover{background:#eee;color:#646464}.ct-widget .ct-control--active,.ct-widget .ct-control--on{background:#a4a4a4;color:#fff}.ct-widget .ct-control--active:hover,.ct-widget .ct-control--on:hover{background:#646464;color:#fff}.ct-widget .ct-control--rotate-ccw:before{content:'\e965'}.ct-widget .ct-control--rotate-cw:before{content:'\e966'}.ct-widget .ct-control--crop:before{content:'\ea57'}.ct-widget .ct-control--remove:before{content:'\e9ac'}.ct-widget .ct-control--styles:before{content:'\e90b'}.ct-widget .ct-control--attributes:before{content:'\e994'}.ct-widget .ct-control--code:before{content:'\ea80'}.ct-widget .ct-control--icon.ct-control--muted{cursor:default}.ct-widget .ct-control--icon.ct-control--muted:before{opacity:.5}.ct-widget .ct-control--icon.ct-control--muted:hover{color:#a4a4a4;background:transparent}.ct-widget .ct-control--text{background:#2980b9;border-radius:2px;color:#fff;cursor:pointer;display:inline-block;font-weight:700;height:32px;overflow:hidden;padding:0 8px;text-align:center;text-overflow:ellipsis;font-family:arial,sans-serif;font-size:14px;line-height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;width:100px}.ct-widget .ct-control--text:hover{background:#2e8ece}.ct-widget .ct-control--apply,.ct-widget .ct-control--insert,.ct-widget .ct-control--ok{background:#27ae60}.ct-widget .ct-control--apply:hover,.ct-widget .ct-control--insert:hover,.ct-widget .ct-control--ok:hover{background:#2cc36b}.ct-widget .ct-control--cancel,.ct-widget .ct-control--clear{background:#e74c3c}.ct-widget .ct-control--cancel:hover,.ct-widget .ct-control--clear:hover{background:#ea6153}.ct-widget .ct-control--text.ct-control--muted{background:#ccc;cursor:default}.ct-widget .ct-control--text.ct-control--muted:hover{background:#ccc}.ct-widget .ct-control--upload{overflow:hidden}.ct-widget.ct-image-dialog--empty .ct-control--cancel,.ct-widget.ct-image-dialog--empty .ct-control--clear,.ct-widget.ct-image-dialog--empty .ct-control--crop,.ct-widget.ct-image-dialog--empty .ct-control--insert,.ct-widget.ct-image-dialog--empty .ct-control--rotate-ccw,.ct-widget.ct-image-dialog--empty .ct-control--rotate-cw,.ct-widget.ct-image-dialog--empty .ct-progress-bar,.ct-widget.ct-image-dialog--populated .ct-control--cancel,.ct-widget.ct-image-dialog--populated .ct-control--upload,.ct-widget.ct-image-dialog--populated .ct-progress-bar,.ct-widget.ct-image-dialog--uploading .ct-control--clear,.ct-widget.ct-image-dialog--uploading .ct-control--crop,.ct-widget.ct-image-dialog--uploading .ct-control--insert,.ct-widget.ct-image-dialog--uploading .ct-control--rotate-ccw,.ct-widget.ct-image-dialog--uploading .ct-control--rotate-cw,.ct-widget.ct-image-dialog--uploading .ct-control--upload{display:none}.ct-widget .ct-image-dialog__view{background:#eee;position:relative}.ct-widget .ct-image-dialog__view:empty{font-family:icon;font-size:80px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:320px;text-align:center}.ct-widget .ct-image-dialog__view:empty:before{color:#fff;content:'\e90d'}.ct-widget .ct-image-dialog__image{background-color:transparent;background-position:50%;background-repeat:no-repeat;background-size:contain;height:100%;width:100%}.ct-widget .ct-image-dialog__file-upload{cursor:pointer;font-size:400px;left:0;opacity:0;position:absolute;top:0}.ct-widget.ct-properties-dialog--attributes .ct-properties-dialog__attributes,.ct-widget.ct-properties-dialog--styles .ct-properties-dialog__styles{display:block}.ct-widget.ct-properties-dialog--styles .ct-properties-dialog__styles:empty:before{color:#a4a4a4;content:attr(data-ct-empty);display:block;font-style:italic;margin-top:20px;text-align:center}.ct-widget.ct-properties-dialog--code .ct-properties-dialog__code{display:block}.ct-widget .ct-properties-dialog__view{border:1px solid #ddd;overflow:auto}.ct-widget .ct-properties-dialog__attributes,.ct-widget .ct-properties-dialog__code,.ct-widget .ct-properties-dialog__styles{display:none}.ct-widget .ct-properties-dialog__inner-html{border:none;display:block;font-family:courier,Bitstream Vera Sans Mono,Consolas,Courier,monospace;height:318px;padding:16px;outline:none;resize:none;width:100%}.ct-widget .ct-properties-dialog__inner-html--invalid{color:#e74c3c}.ct-widget .ct-table-dialog__view{border:1px solid #ddd;overflow:auto}.ct-widget .ct-video-dialog__preview:empty{background:#eee;font-family:icon;font-size:80px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:320px;text-align:center}.ct-widget .ct-video-dialog__preview:empty:before{color:#fff;content:'\ea98'}.ct-widget .ct-video-dialog__input{border:none;border-bottom:1px solid #eee;height:32px;line-height:32px;outline:none;padding:0 4px;font-family:arial,sans-serif;font-size:14px;line-height:18px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;width:456px}.ct-widget .ct-video-dialog__input:focus{border-bottom:1px solid #e1e1e1}.ct-widget.ct-anchored-dialog{border-bottom:2px solid #27ae60;box-shadow:0 3px 3px rgba(0,0,0,.35);font-size:0;height:34px;left:0;margin-left:-160px;margin-top:-48px;position:absolute;top:0;width:320px;z-index:10099}.ct-widget.ct-anchored-dialog:after{border:16px solid hsla(0,0%,100%,0);border-top-color:#27ae60;content:'';left:144px;position:absolute;top:34px}.ct-widget .ct-anchored-dialog__input{border:none;color:#646464;outline:none;font-family:arial,sans-serif;font-size:14px;padding:0 8px 0 16px;vertical-align:top;width:256px}.ct-widget .ct-anchored-dialog__button,.ct-widget .ct-anchored-dialog__input{height:32px;line-height:32px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ct-widget .ct-anchored-dialog__button{background:#27ae60;cursor:pointer;display:inline-block;text-align:center;font-family:icon;font-size:16px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;width:32px}.ct-widget .ct-anchored-dialog__button:before{color:#fff;content:'\ea10'}.ct-widget .ct-anchored-dialog__button:hover{background:#2cc36b}.ct-widget .ct-anchored-dialog__target-button{background:#fff;cursor:pointer;display:inline-block;height:32px;line-height:32px;text-align:center;font-family:icon;font-size:16px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:32px}.ct-widget .ct-anchored-dialog__target-button:before{color:#a4a4a4;content:'\ea7d'}.ct-widget .ct-anchored-dialog__target-button:hover:before{color:#b1b1b1}.ct-widget .ct-anchored-dialog__target-button--active:before{color:#27ae60}.ct-widget .ct-anchored-dialog__target-button--active:hover:before{color:#2cc36b}@-webkit-keyframes b{0%{opacity:0;font-size:32px;-webkit-transform:font-size}25%{font-size:320px;opacity:1;-webkit-transform:all}50%{font-size:320px;opacity:1;-webkit-transform:all}75%{font-size:320px;opacity:1;-webkit-transform:all}to{opacity:0;-webkit-transform:all}}@keyframes b{0%{opacity:0;font-size:32px;-webkit-transform:font-size;transform:font-size}25%{font-size:320px;opacity:1;-webkit-transform:all;transform:all}50%{font-size:320px;opacity:1;-webkit-transform:all;transform:all}75%{font-size:320px;opacity:1;-webkit-transform:all;transform:all}to{opacity:0;-webkit-transform:all;transform:all}}@-webkit-keyframes c{0%{opacity:1;-webkit-transform:opacity}99%{opacity:1;-webkit-transform:opacity}to{opacity:0;-webkit-transform:opacity}}@keyframes c{0%{opacity:1;-webkit-transform:opacity;transform:opacity}99%{opacity:1;-webkit-transform:opacity;transform:opacity}to{opacity:0;-webkit-transform:opacity;transform:opacity}}.ct-widget.ct-flash{color:hsla(0,0%,100%,.9);height:0;left:0;position:fixed;font-family:icon;font-size:16px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;top:0;width:0;z-index:10999}.ct-widget.ct-flash:before{left:50%;opacity:0;position:fixed;text-shadow:0 0 20px rgba(0,0,0,.5);top:50%;transform:translate(-50%,-50%)}.ct-widget.ct-flash--active{-webkit-animation:c 2s ease-in;animation:c 2s ease-in;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ct-widget.ct-flash--active:before{-webkit-animation:b 2s ease-in;animation:b 2s ease-in;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;font-size:320px;opacity:1}.ct-widget.ct-flash--ok:before{content:'\ea10'}.ct-widget.ct-flash--no:before{content:'\ea0f'}.ct-widget .ct-grip{cursor:move;font-size:0;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ct-widget .ct-grip__bump{background:rgba(70,70,70,.15);border-radius:12px;display:inline-block;height:12px;margin-left:12px;width:12px}.ct-widget .ct-grip__bump:first-child{margin-left:0}@-webkit-keyframes d{0%{transform:rotate(0deg);-webkit-transform:transform}to{transform:rotate(359deg);-webkit-transform:transform}}@keyframes d{0%{transform:rotate(0deg);-webkit-transform:transform;transform:transform}to{transform:rotate(359deg);-webkit-transform:transform;transform:transform}}.ct-widget.ct-ignition{left:16px;position:fixed;top:16px}.ct-widget.ct-ignition .ct-ignition__button{display:none}.ct-widget.ct-ignition--editing .ct-ignition__button--cancel,.ct-widget.ct-ignition--editing .ct-ignition__button--confirm,.ct-widget.ct-ignition--ready .ct-ignition__button--edit{display:block}.ct-widget.ct-ignition--busy .ct-ignition__button{display:none}.ct-widget.ct-ignition--busy .ct-ignition__button--busy{display:block}.ct-widget .ct-ignition__button{border-radius:24px;content:'';cursor:pointer;display:block;height:48px;line-height:48px;opacity:.9;position:absolute;text-align:center;font-family:icon;font-size:24px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:48px}.ct-widget .ct-ignition__button:before{color:#fff}.ct-widget .ct-ignition__button--busy{-webkit-animation:d 5s linear;animation:d 5s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;background:#646464;cursor:default}.ct-widget .ct-ignition__button--busy:before{content:'\e994'}.ct-widget .ct-ignition__button--busy:hover{background:#646464}.ct-widget .ct-ignition__button--confirm{background:#27ae60}.ct-widget .ct-ignition__button--confirm:before{content:'\ea10'}.ct-widget .ct-ignition__button--confirm:hover{background:#2cc36b}.ct-widget .ct-ignition__button--cancel{background:#e74c3c;left:64px}.ct-widget .ct-ignition__button--cancel:before{content:'\ea0f'}.ct-widget .ct-ignition__button--cancel:hover{background:#ea6153}.ct-widget .ct-ignition__button--edit{background:#2980b9}.ct-widget .ct-ignition__button--edit:before{content:'\e905';-webkit-transition-property:-webkit-transform;transition-property:transform;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.ct-widget .ct-ignition__button--edit:hover{background:#2e8ece}.ct-widget .ct-ignition__button--edit:hover:before{display:inline-block;-webkit-transform:rotate(-15deg);transform:rotate(-15deg)}.ct-widget.ct-inspector{background:hsla(0,0%,91%,.2);border-top:1px solid hsla(0,0%,100%,.1);bottom:0;height:32px;left:0;overflow:hidden;padding:3px 16px 0;position:fixed;width:100%}.ct-widget .ct-inspector__tags{width:calc(100% - 128px)}.ct-widget .ct-inspector__tags:after{clear:both;content:"";display:table}.ct-widget .ct-inspector__tags:before{color:#464646;content:'\ea80';display:block;float:left;height:24px;line-height:24px;margin-right:16px;text-align:center;font-family:icon;font-size:16px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:24px}.ct-widget .ct-inspector__counter{border-left:1px solid rgba(0,0,0,.1);height:24px;line-height:24px;margin-right:16px;position:absolute;right:0;text-align:right;top:3px;width:128px}.ct-widget .ct-tag{background-color:#2980b9;border-radius:2px 0 0 2px;color:#fff;cursor:pointer;float:left;font-weight:700;height:24px;line-height:24px;margin-left:24px;padding:0 8px;position:relative;text-shadow:0 1px 0 rgba(0,0,0,.35)}.ct-widget .ct-tag:after{border-style:solid;border-bottom:12px solid rgba(255,0,0,0);border-left:12px solid #2980b9;border-right:none;border-top:12px solid rgba(255,0,0,0);content:'';display:block;height:24px;bottom:0;right:-24px;position:absolute;width:24px;-moz-transform:scale(.9999)}.ct-widget .ct-tag:first-child{margin-left:0}.ct-widget .ct-tag:hover{background-color:#4aa3df}.ct-widget .ct-tag:hover:after{border-left-color:#4aa3df}.ct-widget .ct-tag:nth-child(1){background-color:#8e44ad}.ct-widget .ct-tag:nth-child(1):after{border-left-color:#8e44ad}.ct-widget .ct-tag:nth-child(1):hover{background-color:#9b50ba}.ct-widget .ct-tag:nth-child(1):hover:after{border-left-color:#9b50ba}.ct-widget .ct-tag:nth-child(2){background-color:#2980b9}.ct-widget .ct-tag:nth-child(2):after{border-left-color:#2980b9}.ct-widget .ct-tag:nth-child(2):hover{background-color:#2e8ece}.ct-widget .ct-tag:nth-child(2):hover:after{border-left-color:#2e8ece}.ct-widget .ct-tag:nth-child(3){background-color:#27ae60}.ct-widget .ct-tag:nth-child(3):after{border-left-color:#27ae60}.ct-widget .ct-tag:nth-child(3):hover{background-color:#2cc36b}.ct-widget .ct-tag:nth-child(3):hover:after{border-left-color:#2cc36b}.ct-widget .ct-tag:nth-child(4){background-color:#d35400}.ct-widget .ct-tag:nth-child(4):after{border-left-color:#d35400}.ct-widget .ct-tag:nth-child(4):hover{background-color:#ed5e00}.ct-widget .ct-tag:nth-child(4):hover:after{border-left-color:#ed5e00}.ct-widget .ct-tag:nth-child(5){background-color:#f39c12}.ct-widget .ct-tag:nth-child(5):after{border-left-color:#f39c12}.ct-widget .ct-tag:nth-child(5):hover{background-color:#f4a62a}.ct-widget .ct-tag:nth-child(5):hover:after{border-left-color:#f4a62a}.ct-widget .ct-tag:nth-child(6){background-color:#16a085}.ct-widget .ct-tag:nth-child(6):after{border-left-color:#16a085}.ct-widget .ct-tag:nth-child(6):hover{background-color:#19b698}.ct-widget .ct-tag:nth-child(6):hover:after{border-left-color:#19b698}.ct-widget.ct-modal{background:rgba(0,0,0,.7);height:0;left:0;position:fixed;top:0;width:0;z-index:10009}.ct-widget.ct-modal--transparent{background:transparent}.ct-widget--active.ct-modal{height:100%;width:100%}.ct-widget .ct-progress-bar{border:1px solid #eee;height:32px;line-height:32px;padding:1px;width:456px}.ct-widget .ct-progress-bar__progress{background:#2980b9;height:28px}.ct-widget .ct-section{border-bottom:1px solid #eee;color:#bdbdbd;cursor:pointer;font-style:italic;height:48px;padding:0 16px;font-family:arial,sans-serif;font-size:16px;line-height:48px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ct-widget .ct-section:after{clear:both;content:"";display:table}.ct-widget .ct-section:hover{background:#f6f6f6}.ct-widget .ct-section--applied{color:#646464;font-style:normal}.ct-widget .ct-section--applied .ct-section__switch{background-color:#27ae60;border:1px solid #1e8449}.ct-widget .ct-section--applied .ct-section__switch:before{left:25px;-webkit-transition-property:left;transition-property:left;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.ct-widget .ct-section--contains-input .ct-section__label{width:75%}.ct-widget .ct-section__label{float:left;overflow:hidden;text-overflow:ellipsis;width:472px;white-space:nowrap}.ct-widget .ct-section__switch{background-color:#ccc;border:1px solid #b3b3b3;border-radius:12px;box-shadow:inset 0 0 2px rgba(0,0,0,.1);float:right;height:24px;margin-top:12px;position:relative;width:48px}.ct-widget .ct-section__switch:before{background:#fff;border-radius:10px;content:'';height:20px;left:1px;position:absolute;top:1px;-webkit-transition-property:left;transition-property:left;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;width:20px}.ct-widget .ct-section__input{background:#fff;border:none;color:#646464;float:right;height:47px;outline:none;padding:0 16px;text-align:right;font-family:arial,sans-serif;font-size:14px;line-height:48px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:25%}.ct-widget .ct-section__input--invalid{color:#e74c3c}.ct-widget.ct-toolbox{background:hsla(0,0%,91%,.9);border:1px solid hsla(0,0%,100%,.5);box-shadow:0 3px 3px rgba(0,0,0,.35);left:128px;padding:8px;position:fixed;top:128px;width:138px}.ct-widget.ct-toolbox--dragging{opacity:.5}.ct-widget .ct-toolbox__grip{padding:8px 0}.ct-widget .ct-tool-group{padding:4px 0}.ct-widget .ct-tool-group:after{clear:both;content:"";display:table}.ct-widget .ct-tool-group:first-child{padding-top:0}.ct-widget .ct-tool{color:#464646;cursor:pointer;float:left;height:32px;margin:4px;margin-right:4px;position:relative;text-align:center;font-family:icon;font-size:16px;font-style:normal;font-weight:400;font-variant:normal;speak:none;text-transform:none;width:32px}.ct-widget .ct-tool,.ct-widget .ct-tool:after{border-radius:2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ct-widget .ct-tool:after{background:#000;color:#fff;content:attr(data-ct-tooltip);display:block;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;left:-26.5px;opacity:0;padding:0 8px;position:absolute;bottom:37px;font-family:arial,sans-serif;font-size:12px;line-height:20px;visibility:hidden;width:85px;word-break:break-word}.ct-widget .ct-tool:hover:after{opacity:.8;visibility:visible;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-duration:0s;transition-duration:0s;-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;-webkit-transition-delay:2s;transition-delay:2s}.ct-widget .ct-tool:before{line-height:32px}.ct-widget .ct-tool:nth-child(3n){margin-right:0}.ct-widget .ct-tool:hover{background:hsla(0,0%,100%,.5)}.ct-widget .ct-tool--disabled{color:rgba(70,70,70,.33)}.ct-widget .ct-tool--disabled:hover{background:transparent}.ct-widget .ct-tool--down{box-shadow:inset 0 1px 3px rgba(0,0,0,.25);line-height:34px}.ct-widget .ct-tool--down,.ct-widget .ct-tool--down:hover{background:rgba(0,0,0,.025)}.ct-widget .ct-tool--applied{background:rgba(0,0,0,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.25)}.ct-widget .ct-tool--applied:hover{background:rgba(0,0,0,.15)}.ct-widget .ct-tool--bold:before{content:"\ea62"}.ct-widget .ct-tool--heading:before{content:"H";font-weight:700}.ct-widget .ct-tool--subheading:before{content:"H"}.ct-widget .ct-tool--paragraph:before{content:"P"}.ct-widget .ct-tool--preformatted:before{content:"\ea80"}.ct-widget .ct-tool--italic:before{content:"\ea64"}.ct-widget .ct-tool--link:before{content:"\e9cb"}.ct-widget .ct-tool--align-left:before{content:"\ea77"}.ct-widget .ct-tool--align-center:before{content:"\ea78"}.ct-widget .ct-tool--align-right:before{content:"\ea79"}.ct-widget .ct-tool--unordered-list:before{content:"\e9ba"}.ct-widget .ct-tool--ordered-list:before{content:"\e9b9"}.ct-widget .ct-tool--table:before{content:"\ea71"}.ct-widget .ct-tool--indent:before{content:"\ea7b"}.ct-widget .ct-tool--unindent:before{content:"\ea7c"}.ct-widget .ct-tool--line-break:before{content:"\ea6e"}.ct-widget .ct-tool--image:before{content:"\e90d"}.ct-widget .ct-tool--video:before{content:"\ea98"}.ct-widget .ct-tool--undo:before{content:"\e965"}.ct-widget .ct-tool--redo:before{content:"\e966"}.ct-widget .ct-tool--remove:before{content:"\e9ac"}@-webkit-keyframes e{0%{outline-color:hsla(0,0%,100%,0);-webkit-transform:background-color}25%{outline-color:#f39c12;-webkit-transform:background-color}50%{outline-color:#f39c12;-webkit-transform:background-color}to{outline-color:hsla(0,0%,100%,0);-webkit-transform:background-color}}@keyframes e{0%{outline-color:hsla(0,0%,100%,0);-webkit-transform:background-color;transform:background-color}25%{outline-color:#f39c12;-webkit-transform:background-color;transform:background-color}50%{outline-color:#f39c12;-webkit-transform:background-color;transform:background-color}to{outline-color:hsla(0,0%,100%,0);-webkit-transform:background-color;transform:background-color}}.ct-app,.ct-app *,.ct-app :after,.ct-app :before{box-sizing:border-box}.ct--highlight{outline:4px solid #f39c12;-webkit-animation:e .5s ease-in;animation:e .5s ease-in;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ct--no-scroll{overflow:hidden}.ct--puesdo-select{background:rgba(0,0,0,.1)} --------------------------------------------------------------------------------