diff --git a/modules/backend/ServiceProvider.php b/modules/backend/ServiceProvider.php index 1e4a99a..59a1eff 100644 --- a/modules/backend/ServiceProvider.php +++ b/modules/backend/ServiceProvider.php @@ -151,54 +151,18 @@ protected function registerBackendPermissions() protected function registerBackendWidgets() { WidgetManager::instance()->registerFormWidgets(function ($manager) { - $manager->registerFormWidget('Backend\FormWidgets\CodeEditor', [ - 'label' => 'Code editor', - 'code' => 'codeeditor' - ]); - $manager->registerFormWidget('Backend\FormWidgets\RichEditor', [ - 'label' => 'Rich editor', - 'code' => 'richeditor' - ]); - $manager->registerFormWidget('Backend\FormWidgets\MarkdownEditor', [ - 'label' => 'Markdown editor', - 'code' => 'markdown' - ]); - $manager->registerFormWidget('Backend\FormWidgets\FileUpload', [ - 'label' => 'File uploader', - 'code' => 'fileupload' - ]); - $manager->registerFormWidget('Backend\FormWidgets\Relation', [ - 'label' => 'Relationship', - 'code' => 'relation' - ]); - $manager->registerFormWidget('Backend\FormWidgets\DatePicker', [ - 'label' => 'Date picker', - 'code' => 'datepicker' - ]); - $manager->registerFormWidget('Backend\FormWidgets\TimePicker', [ - 'label' => 'Time picker', - 'code' => 'timepicker' - ]); - $manager->registerFormWidget('Backend\FormWidgets\ColorPicker', [ - 'label' => 'Color picker', - 'code' => 'colorpicker' - ]); - $manager->registerFormWidget('Backend\FormWidgets\DataTable', [ - 'label' => 'Data Table', - 'code' => 'datatable' - ]); - $manager->registerFormWidget('Backend\FormWidgets\RecordFinder', [ - 'label' => 'Record Finder', - 'code' => 'recordfinder' - ]); - $manager->registerFormWidget('Backend\FormWidgets\Repeater', [ - 'label' => 'Repeater', - 'code' => 'repeater' - ]); - $manager->registerFormWidget('Backend\FormWidgets\TagList', [ - 'label' => 'Tag List', - 'code' => 'taglist' - ]); + $manager->registerFormWidget('Backend\FormWidgets\CodeEditor', 'codeeditor'); + $manager->registerFormWidget('Backend\FormWidgets\RichEditor', 'richeditor'); + $manager->registerFormWidget('Backend\FormWidgets\MarkdownEditor', 'markdown'); + $manager->registerFormWidget('Backend\FormWidgets\FileUpload', 'fileupload'); + $manager->registerFormWidget('Backend\FormWidgets\Relation', 'relation'); + $manager->registerFormWidget('Backend\FormWidgets\DatePicker', 'datepicker'); + $manager->registerFormWidget('Backend\FormWidgets\TimePicker', 'timepicker'); + $manager->registerFormWidget('Backend\FormWidgets\ColorPicker', 'colorpicker'); + $manager->registerFormWidget('Backend\FormWidgets\DataTable', 'datatable'); + $manager->registerFormWidget('Backend\FormWidgets\RecordFinder', 'recordfinder'); + $manager->registerFormWidget('Backend\FormWidgets\Repeater', 'repeater'); + $manager->registerFormWidget('Backend\FormWidgets\TagList', 'taglist'); }); } diff --git a/modules/backend/assets/less/controls/filelist.less b/modules/backend/assets/less/controls/filelist.less index 1f2030e..cc9b3de 100644 --- a/modules/backend/assets/less/controls/filelist.less +++ b/modules/backend/assets/less/controls/filelist.less @@ -225,7 +225,7 @@ &.single-line { ul { li a span.title { - text-overflow: ellipsis; + text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index 7eab913..86d2495 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -1,5 +1,6 @@ controller->formBeforeCreate($model); $modelsToSave = $this->prepareModelsToSave($model, $this->formWidget->getSaveData()); - foreach ($modelsToSave as $modelToSave) { - $modelToSave->save(null, $this->formWidget->getSessionKey()); - } + Db::transaction(function() use ($modelsToSave) { + foreach ($modelsToSave as $modelToSave) { + $modelToSave->save(null, $this->formWidget->getSessionKey()); + } + }); $this->controller->formAfterSave($model); $this->controller->formAfterCreate($model); @@ -267,9 +270,11 @@ public function update_onSave($recordId = null, $context = null) $this->controller->formBeforeUpdate($model); $modelsToSave = $this->prepareModelsToSave($model, $this->formWidget->getSaveData()); - foreach ($modelsToSave as $modelToSave) { - $modelToSave->save(null, $this->formWidget->getSessionKey()); - } + Db::transaction(function() use ($modelsToSave) { + foreach ($modelsToSave as $modelToSave) { + $modelToSave->save(null, $this->formWidget->getSessionKey()); + } + }); $this->controller->formAfterSave($model); $this->controller->formAfterUpdate($model); diff --git a/modules/backend/behaviors/ImportExportController.php b/modules/backend/behaviors/ImportExportController.php index be0fc6f..4cf14c3 100644 --- a/modules/backend/behaviors/ImportExportController.php +++ b/modules/backend/behaviors/ImportExportController.php @@ -273,7 +273,7 @@ public function prepareImportVars() public function importRender() { - return $this->importExportMakePartial('import'); + return $this->importExportMakePartial('container_import'); } public function importGetModel() @@ -456,7 +456,7 @@ public function prepareExportVars() public function exportRender() { - return $this->importExportMakePartial('export'); + return $this->importExportMakePartial('container_export'); } public function exportGetModel() @@ -538,7 +538,7 @@ protected function processExportColumnsFromPost() protected function checkUseListExportMode() { - if (!$listDefinition = $this->getConfig('export[useList]')) { + if (!$useList = $this->getConfig('export[useList]')) { return false; } @@ -546,6 +546,13 @@ protected function checkUseListExportMode() throw new ApplicationException(Lang::get('backend::lang.import_export.behavior_missing_uselist_error')); } + if (is_array($useList)) { + $listDefinition = array_get($useList, 'definition'); + } + else { + $listDefinition = $useList; + } + $this->exportFromList($listDefinition); } @@ -594,12 +601,20 @@ public function exportFromList($definition = null, $options = []) /* * Add records */ + $getter = $this->getConfig('export[useList][raw]', false) + ? 'getColumnValueRaw' + : 'getColumnValue'; + $model = $widget->prepareModel(); $results = $model->get(); foreach ($results as $result) { $record = []; foreach ($columns as $column) { - $record[] = $widget->getColumnValue($result, $column); + $value = $widget->$getter($result, $column); + if (is_array($value)) { + $value = implode('|', $value); + } + $record[] = $value; } $csv->insertOne($record); } diff --git a/modules/backend/behaviors/ListController.php b/modules/backend/behaviors/ListController.php index 400cd60..8f84b76 100644 --- a/modules/backend/behaviors/ListController.php +++ b/modules/backend/behaviors/ListController.php @@ -137,6 +137,7 @@ public function makeList($definition = null) 'showCheckboxes', 'showTree', 'treeExpanded', + 'customViewPath', ]; foreach ($configFieldsToTransfer as $field) { @@ -342,18 +343,8 @@ public function listRender($definition = null) 'toolbar' => null, 'filter' => null, 'list' => null, - 'topPartial' => null, - 'sidePartial' => null ]; - if (isset($listConfig->topPartial)) { - $vars['topPartial'] = $listConfig->topPartial; - } - - if (isset($listConfig->sidePartial)) { - $vars['sidePartial'] = $listConfig->sidePartial; - } - if (isset($this->toolbarWidgets[$definition])) { $vars['toolbar'] = $this->toolbarWidgets[$definition]; } @@ -364,7 +355,23 @@ public function listRender($definition = null) $vars['list'] = $this->listWidgets[$definition]; - return $this->makePartial('list', $vars); + return $this->listMakePartial('container', $vars); + } + + /** + * Controller accessor for making partials within this behavior. + * @param string $partial + * @param array $params + * @return string Partial contents + */ + public function listMakePartial($partial, $params = []) + { + $contents = $this->controller->makePartial('list_'.$partial, $params + $this->vars, false); + if (!$contents) { + $contents = $this->makePartial($partial, $params); + } + + return $contents; } /** diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index 2efc9d3..657bdcb 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -33,7 +33,7 @@ class RelationController extends ControllerBehavior /** * @var const Postback parameter for read only mode. */ - const PARAM_READ_ONLY = '_relation_read_only'; + const PARAM_EXTRA_CONFIG = '_relation_extra_config'; /** * @var Backend\Classes\WidgetBase Reference to the search widget object. @@ -80,6 +80,11 @@ class RelationController extends ControllerBehavior */ protected $originalConfig; + /** + * @var array Config provided by the relationRender method + */ + protected $extraConfig; + /** * @var bool Has the behavior been initialized. */ @@ -242,8 +247,8 @@ public function prepareVars() $this->vars['relationViewWidget'] = $this->viewWidget; $this->vars['relationViewModel'] = $this->viewModel; $this->vars['relationPivotWidget'] = $this->pivotWidget; - $this->vars['relationReadOnly'] = $this->readOnly ? 1 : 0; $this->vars['relationSessionKey'] = $this->relationGetSessionKey(); + $this->vars['relationExtraConfig'] = $this->extraConfig; } /** @@ -305,8 +310,13 @@ public function initRelation($model, $field = null) throw new ApplicationException(Lang::get('backend::lang.relation.missing_definition', compact('field'))); } + if ($extraConfig = post(self::PARAM_EXTRA_CONFIG)) { + $this->applyExtraConfig($extraConfig); + } + $this->alias = camel_case('relation ' . $field); $this->config = $this->makeConfig($this->getConfig($field), $this->requiredRelationProperties); + $this->controller->relationExtendConfig($this->config, $this->field, $this->model); /* * Relationship details @@ -316,6 +326,7 @@ public function initRelation($model, $field = null) $this->relationObject = $this->model->{$field}(); $this->relationModel = $this->relationObject->getRelated(); + $this->readOnly = $this->getConfig('readOnly'); $this->deferredBinding = $this->getConfig('deferredBinding') || !$this->model->exists; $this->toolbarButtons = $this->evalToolbarButtons(); $this->viewMode = $this->evalViewMode(); @@ -342,7 +353,7 @@ public function initRelation($model, $field = null) * View widget */ if ($this->viewWidget = $this->makeViewWidget()) { - $this->controller->relationExtendViewWidget($this->viewWidget, $this->field); + $this->controller->relationExtendViewWidget($this->viewWidget, $this->field, $this->model); $this->viewWidget->bindToController(); } @@ -350,7 +361,7 @@ public function initRelation($model, $field = null) * Manage widget */ if ($this->manageWidget = $this->makeManageWidget()) { - $this->controller->relationExtendManageWidget($this->manageWidget, $this->field); + $this->controller->relationExtendManageWidget($this->manageWidget, $this->field, $this->model); $this->manageWidget->bindToController(); } @@ -359,17 +370,10 @@ public function initRelation($model, $field = null) */ if ($this->manageMode == 'pivot') { if ($this->pivotWidget = $this->makePivotWidget()) { - $this->controller->relationExtendPivotWidget($this->pivotWidget, $this->field); + $this->controller->relationExtendPivotWidget($this->pivotWidget, $this->field, $this->model); $this->pivotWidget->bindToController(); } } - - /* - * Read only mode - */ - if (post(self::PARAM_READ_ONLY, $this->getConfig('readOnly'))) { - $this->makeReadOnly(); - } } /** @@ -380,26 +384,29 @@ public function initRelation($model, $field = null) */ public function relationRender($field, $options = []) { - $field = $this->validateField($field); - + /* + * Session key + */ if (is_string($options)) { $options = ['sessionKey' => $options]; } - /* - * Session key - */ if (isset($options['sessionKey'])) { $this->sessionKey = $options['sessionKey']; } /* - * Read only mode + * Apply options and extra config */ - if (isset($options['readOnly']) && $options['readOnly']) { - $this->makeReadOnly(); - } + $allowConfig = ['readOnly', 'recordUrl', 'recordOnClick']; + $extraConfig = array_only($options, $allowConfig); + $this->extraConfig = $extraConfig; + $this->applyExtraConfig($extraConfig, $field); + /* + * Initialize + */ + $this->validateField($field); $this->prepareVars(); /* @@ -525,9 +532,11 @@ protected function makeToolbarWidget() /* * Add buttons to toolbar */ - $defaultButtons = $this->toolbarButtons - ? '~/modules/backend/behaviors/relationcontroller/partials/_toolbar.htm' - : null; + $defaultButtons = null; + + if (!$this->readOnly && $this->toolbarButtons) { + $defaultButtons = '~/modules/backend/behaviors/relationcontroller/partials/_toolbar.htm'; + } $defaultConfig['buttons'] = $this->getConfig('view[toolbarPartial]', $defaultButtons); @@ -551,8 +560,9 @@ protected function makeToolbarWidget() /* * No buttons, no search should mean no toolbar */ - if (empty($toolbarConfig->search) && empty($toolbarConfig->buttons)) + if (empty($toolbarConfig->search) && empty($toolbarConfig->buttons)) { return; + } $toolbarWidget = $this->makeWidget('Backend\Widgets\Toolbar', $toolbarConfig); $toolbarWidget->cssClasses[] = 'list-header'; @@ -585,6 +595,8 @@ protected function makeSearchWidget() protected function makeViewWidget() { + $widget = null; + /* * Multiple (has many, belongs to many) */ @@ -595,15 +607,14 @@ protected function makeViewWidget() $config->showSorting = $this->getConfig('view[showSorting]', true); $config->defaultSort = $this->getConfig('view[defaultSort]'); $config->recordsPerPage = $this->getConfig('view[recordsPerPage]'); - $config->showCheckboxes = $this->getConfig('view[showCheckboxes]', true); + $config->showCheckboxes = $this->getConfig('view[showCheckboxes]', !$this->readOnly); $config->recordUrl = $this->getConfig('view[recordUrl]', null); $defaultOnClick = sprintf( - "$.oc.relationBehavior.clickViewListRecord(':%s', '%s', '%s', %s)", + "$.oc.relationBehavior.clickViewListRecord(':%s', '%s', '%s')", $this->relationModel->getKeyName(), - $this->field, - $this->relationGetSessionKey(), - $this->readOnly ? 1 : 0 + $this->relationGetId(), + $this->relationGetSessionKey() ); if ($config->recordUrl) { @@ -661,7 +672,10 @@ protected function makeViewWidget() /* * Allows pivot data to enter the fray */ - if ($this->relationType == 'belongsToMany') { + if ($this->relationType == 'belongsToMany' + || $this->relationType == 'morphToMany' + || $this->relationType == 'morphedByMany' + ) { $this->relationObject->setQuery($query->getQuery()); return $this->relationObject; } @@ -733,7 +747,7 @@ protected function makeManageWidget() $config->recordOnClick = sprintf( "$.oc.relationBehavior.clickManageListRecord(:%s, '%s', '%s')", $this->relationModel->getKeyName(), - $this->field, + $this->relationGetId(), $this->relationGetSessionKey() ); } @@ -744,7 +758,7 @@ protected function makeManageWidget() $config->recordOnClick = sprintf( "$.oc.relationBehavior.clickManagePivotListRecord(:%s, '%s', '%s')", $this->relationModel->getKeyName(), - $this->field, + $this->relationGetId(), $this->relationGetSessionKey() ); } @@ -792,7 +806,10 @@ protected function makeManageWidget() */ elseif ($this->manageMode == 'form') { - $config = $this->makeConfigForMode('manage', 'form'); + if (!$config = $this->makeConfigForMode('manage', 'form', false)) { + return null; + } + $config->model = $this->relationModel; $config->arrayName = class_basename($this->relationModel); $config->context = $this->evalFormContext('manage', !!$this->manageId); @@ -1260,12 +1277,23 @@ public function onRelationManagePivotUpdate() // Overrides // + /** + * Provides an opportunity to manipulate the field configuration. + * @param object $config + * @param string $field + * @param October\Rain\Database\Model $model + */ + public function relationExtendConfig($config, $field, $model) + { + } + /** * Provides an opportunity to manipulate the view widget. * @param Backend\Classes\WidgetBase $widget * @param string $field + * @param October\Rain\Database\Model $model */ - public function relationExtendViewWidget($widget, $field) + public function relationExtendViewWidget($widget, $field, $model) { } @@ -1273,8 +1301,9 @@ public function relationExtendViewWidget($widget, $field) * Provides an opportunity to manipulate the manage widget. * @param Backend\Classes\WidgetBase $widget * @param string $field + * @param October\Rain\Database\Model $model */ - public function relationExtendManageWidget($widget, $field) + public function relationExtendManageWidget($widget, $field, $model) { } @@ -1282,8 +1311,9 @@ public function relationExtendManageWidget($widget, $field) * Provides an opportunity to manipulate the pivot widget. * @param Backend\Classes\WidgetBase $widget * @param string $field + * @param October\Rain\Database\Model $model */ - public function relationExtendPivotWidget($widget, $field) + public function relationExtendPivotWidget($widget, $field, $model) { } @@ -1344,10 +1374,11 @@ protected function evalToolbarButtons() switch ($this->relationType) { case 'hasMany': case 'morphMany': + case 'morphToMany': + case 'morphedByMany': case 'belongsToMany': return ['create', 'add', 'delete', 'remove']; - case 'morphMany': - return ['create', 'delete']; + case 'hasOne': case 'morphOne': case 'belongsTo': @@ -1368,10 +1399,11 @@ protected function evalViewMode() switch ($this->relationType) { case 'hasMany': case 'morphMany': + case 'morphToMany': + case 'morphedByMany': case 'belongsToMany': return 'multi'; - case 'morphMany': - return 'multi'; + case 'hasOne': case 'morphOne': case 'belongsTo': @@ -1398,7 +1430,7 @@ protected function evalManageTitle() else { return 'backend::lang.relation.add_a_new'; } - break; + break; case 'form': if ($this->readOnly) { return 'backend::lang.relation.preview_name'; @@ -1406,7 +1438,7 @@ protected function evalManageTitle() else { return 'backend::lang.relation.update_name'; } - break; + break; } } @@ -1437,6 +1469,8 @@ protected function evalManageMode() case 'belongsTo': return 'list'; + case 'morphToMany': + case 'morphedByMany': case 'belongsToMany': if (isset($this->config->pivot)) return 'pivot'; elseif ($this->eventTarget == 'list') return 'form'; @@ -1448,8 +1482,6 @@ protected function evalManageMode() case 'morphMany': if ($this->eventTarget == 'button-add') return 'list'; else return 'form'; - case 'morphMany': - return 'form'; } } @@ -1476,19 +1508,32 @@ protected function evalFormContext($mode = 'manage', $exists = false) } /** - * Apply read only mode. + * Apply extra configuration */ - protected function makeReadOnly() + protected function applyExtraConfig($config, $field = null) { - $this->readOnly = true; + if (!$field) { + $field = $this->field; + } - if ($this->toolbarWidget && !$this->getConfig('view[toolbarPartial]', false)) { - $this->toolbarWidget->buttons = null; + if (!$config || !isset($this->originalConfig->{$field})) { + return; } - if ($this->viewWidget && $this->viewMode == 'multi' && !$this->getConfig('view[showCheckboxes]', false)) { - $this->viewWidget->showCheckboxes = false; + if ( + !is_array($config) && + (!$config = @json_decode(@base64_decode($config), true)) + ) { + return; } + + $parsedConfig = array_only($config, ['readOnly']); + $parsedConfig['view'] = array_only($config, ['recordUrl', 'recordOnClick']); + + $this->originalConfig->{$field} = array_replace_recursive( + $this->originalConfig->{$field}, + $parsedConfig + ); } /** diff --git a/modules/backend/behaviors/importexportcontroller/partials/_container_export.htm b/modules/backend/behaviors/importexportcontroller/partials/_container_export.htm new file mode 100644 index 0000000..f7042e0 --- /dev/null +++ b/modules/backend/behaviors/importexportcontroller/partials/_container_export.htm @@ -0,0 +1,9 @@ +
+ + render() ?> + + + render() ?> + + +
diff --git a/modules/backend/behaviors/importexportcontroller/partials/_container_import.htm b/modules/backend/behaviors/importexportcontroller/partials/_container_import.htm new file mode 100644 index 0000000..508cb41 --- /dev/null +++ b/modules/backend/behaviors/importexportcontroller/partials/_container_import.htm @@ -0,0 +1,9 @@ +
+ + render() ?> + + + render() ?> + + +
diff --git a/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm b/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm index 7fc78f2..8677699 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm @@ -34,7 +34,7 @@

- . +

diff --git a/modules/backend/behaviors/listcontroller/partials/_container.htm b/modules/backend/behaviors/listcontroller/partials/_container.htm new file mode 100644 index 0000000..037ba06 --- /dev/null +++ b/modules/backend/behaviors/listcontroller/partials/_container.htm @@ -0,0 +1,9 @@ + + render() ?> + + + + render() ?> + + +render() ?> diff --git a/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js b/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js index 85c0528..5ab7e07 100644 --- a/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js +++ b/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js @@ -9,38 +9,41 @@ $(el).closest('.control-list').listWidget('toggleChecked', [el]) } - this.clickViewListRecord = function(recordId, relationField, sessionKey, readOnly) { - var newPopup = $('') + this.clickViewListRecord = function(recordId, relationId, sessionKey) { + var newPopup = $(''), + $container = $('#'+relationId), + requestData = paramToObj('data-request-data', $container.data('request-data')) newPopup.popup({ handler: 'onRelationClickViewList', size: 'huge', - extraData: { + extraData: $.extend({}, requestData, { 'manage_id': recordId, - '_relation_field': relationField, - '_session_key': sessionKey, - '_relation_read_only': readOnly ? 1 : 0 - } + '_session_key': sessionKey + }) }) } - this.clickManageListRecord = function(recordId, relationField, sessionKey) { - var oldPopup = $('#relationManagePopup') + this.clickManageListRecord = function(recordId, relationId, sessionKey) { + var oldPopup = $('#relationManagePopup'), + $container = $('#'+relationId), + requestData = paramToObj('data-request-data', $container.data('request-data')) $.request('onRelationClickManageList', { - data: { + data: $.extend({}, requestData, { 'record_id': recordId, - '_relation_field': relationField, '_session_key': sessionKey - } + }) }) oldPopup.popup('hide') } - this.clickManagePivotListRecord = function(foreignId, relationField, sessionKey) { + this.clickManagePivotListRecord = function(foreignId, relationId, sessionKey) { var oldPopup = $('#relationManagePivotPopup'), - newPopup = $('') + newPopup = $(''), + $container = $('#'+relationId), + requestData = paramToObj('data-request-data', $container.data('request-data')) if (oldPopup.length) { oldPopup.popup('hide') @@ -49,11 +52,10 @@ newPopup.popup({ handler: 'onRelationClickManageListPivot', size: 'huge', - extraData: { + extraData: $.extend({}, requestData, { 'foreign_id': foreignId, - '_relation_field': relationField, '_session_key': sessionKey - } + }) }) } @@ -71,6 +73,18 @@ }) } + function paramToObj(name, value) { + if (value === undefined) value = '' + if (typeof value == 'object') return value + + try { + return JSON.parse(JSON.stringify(eval("({" + value + "})"))) + } + catch (e) { + throw new Error('Error parsing the '+name+' attribute value. '+e) + } + } + } $.oc.relationBehavior = new RelationBehavior; diff --git a/modules/backend/behaviors/relationcontroller/partials/_container.htm b/modules/backend/behaviors/relationcontroller/partials/_container.htm index e23b398..eb66e96 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_container.htm +++ b/modules/backend/behaviors/relationcontroller/partials/_container.htm @@ -1,6 +1,6 @@
relationRenderToolbar()): ?> diff --git a/modules/backend/classes/Controller.php b/modules/backend/classes/Controller.php index f8230a4..8a83514 100644 --- a/modules/backend/classes/Controller.php +++ b/modules/backend/classes/Controller.php @@ -512,7 +512,7 @@ protected function runAjaxHandler($handler) } if (($widget = $this->widget->{$widgetName}) && $widget->methodExists($handlerName)) { - $result = call_user_func_array([$widget, $handlerName], $this->params); + $result = $this->runAjaxHandlerForWidget($widget, $handlerName); return ($result) ?: true; } } @@ -543,7 +543,7 @@ protected function runAjaxHandler($handler) foreach ((array) $this->widget as $widget) { if ($widget->methodExists($handler)) { - $result = call_user_func_array([$widget, $handler], $this->params); + $result = $this->runAjaxHandlerForWidget($widget, $handler); return ($result) ?: true; } } @@ -552,6 +552,22 @@ protected function runAjaxHandler($handler) return false; } + /** + * Specific code for executing an AJAX handler for a widget. + * This will append the widget view paths to the controller and merge the vars. + * @return mixed + */ + protected function runAjaxHandlerForWidget($widget, $handler) + { + $this->addViewPath($widget->getViewPaths()); + + $result = call_user_func_array([$widget, $handler], $this->params); + + $this->vars = $widget->vars + $this->vars; + + return $result; + } + /** * Returns the controllers public actions. */ diff --git a/modules/backend/classes/FormField.php b/modules/backend/classes/FormField.php index 6428904..36a0dab 100644 --- a/modules/backend/classes/FormField.php +++ b/modules/backend/classes/FormField.php @@ -94,6 +94,11 @@ class FormField */ public $required = false; + /** + * @var bool Specify if the field is read-only or not. + */ + public $readOnly = false; + /** * @var bool Specify if the field is disabled or not. */ @@ -266,6 +271,7 @@ protected function evalConfig($config) 'placeholder', 'dependsOn', 'required', + 'readOnly', 'disabled', 'cssClass', 'stretch', @@ -417,6 +423,10 @@ protected function filterAttributes($attributes, $position = 'field') $attributes = $attributes + ['disabled' => 'disabled']; } + if ($position == 'field' && $this->readOnly) { + $attributes = $attributes + ['readonly' => 'readonly']; + } + return $attributes; } diff --git a/modules/backend/classes/ListColumn.php b/modules/backend/classes/ListColumn.php index 0389ab8..f73b0f8 100644 --- a/modules/backend/classes/ListColumn.php +++ b/modules/backend/classes/ListColumn.php @@ -1,5 +1,6 @@ valueFrom ?: $this->columnName; + return $this->getColumnNameFromData($columnName, $data, $default); + } + + /** + * Internal method to extract the value of a column name from a data set. + * @param string $columnName + * @param mixed $data + * @param mixed $default + * @return mixed + */ + protected function getColumnNameFromData($columnName, $data, $default = null) + { + /* + * Array column name, eg: column[key][key2][key3] + */ + $keyParts = HtmlHelper::nameToArray($columnName); + $result = $data; + + /* + * Loop the column key parts and build a value. + * To support relations only the last column should return the + * relation value, all others will look up the relation object as normal. + */ + foreach ($keyParts as $key) { + if ($result instanceof Model && $result->hasRelation($key)) { + $result = $result->{$key}; + } + else { + if (!isset($result->{$key})) { + return $default; + } + + $result = $result->{$key}; + } + } + + return $result; + } } diff --git a/modules/backend/classes/WidgetManager.php b/modules/backend/classes/WidgetManager.php index b0f64a5..5240a23 100644 --- a/modules/backend/classes/WidgetManager.php +++ b/modules/backend/classes/WidgetManager.php @@ -98,6 +98,10 @@ public function listFormWidgets() */ public function registerFormWidget($className, $widgetInfo = null) { + if (!is_array($widgetInfo)) { + $widgetInfo = ['code' => $widgetInfo]; + } + $widgetCode = isset($widgetInfo['code']) ? $widgetInfo['code'] : null; if (!$widgetCode) { diff --git a/modules/backend/controllers/users/config_filter.yaml b/modules/backend/controllers/users/config_filter.yaml index 72aa08a..0fb996a 100644 --- a/modules/backend/controllers/users/config_filter.yaml +++ b/modules/backend/controllers/users/config_filter.yaml @@ -8,8 +8,8 @@ scopes: label: backend::lang.user.superuser type: switch conditions: - - is_superuser = 0 - - is_superuser = 1 + - is_superuser = false + - is_superuser = true login_date: label: backend::lang.user.last_login diff --git a/modules/backend/formwidgets/DatePicker.php b/modules/backend/formwidgets/DatePicker.php index 9bf8e1f..61d8405 100644 --- a/modules/backend/formwidgets/DatePicker.php +++ b/modules/backend/formwidgets/DatePicker.php @@ -23,6 +23,11 @@ class DatePicker extends FormWidgetBase */ public $mode = 'datetime'; + /** + * @var string Provide an explicit date display format. + */ + public $format = null; + /** * @var string the minimum/earliest date that can be selected. * eg: 2000-01-01 @@ -85,8 +90,6 @@ public function render() */ public function prepareVars() { - $this->vars['name'] = $this->formField->getName(); - if ($value = $this->getLoadValue()) { @@ -95,25 +98,15 @@ public function prepareVars() $value = $value instanceof Carbon ? $value->toDateTimeString() : $value; } - /* - * Display alias, used by preview mode - */ - if ($this->mode == 'time') { - $formatAlias = 'time'; - } - elseif ($this->mode == 'date') { - $formatAlias = 'dateLong'; - } - else { - $formatAlias = 'dateTimeLong'; - } - - $this->vars['formatAlias'] = $formatAlias; + $this->vars['name'] = $this->formField->getName(); $this->vars['value'] = $value ?: ''; $this->vars['field'] = $this->formField; $this->vars['mode'] = $this->mode; $this->vars['minDate'] = $this->minDate; $this->vars['maxDate'] = $this->maxDate; + $this->vars['format'] = $this->format; + $this->vars['formatMoment'] = $this->getDateFormatMoment(); + $this->vars['formatAlias'] = $this->getDateFormatAlias(); } /** @@ -131,4 +124,34 @@ public function getSaveValue($value) return $value; } + + /** + * Convert PHP format to JS format + */ + protected function getDateFormatMoment() + { + if ($this->format) { + return DateTimeHelper::momentFormat($this->format); + } + } + + /* + * Display alias, used by preview mode + */ + protected function getDateFormatAlias() + { + if ($this->format) { + return null; + } + + if ($this->mode == 'time') { + return 'time'; + } + elseif ($this->mode == 'date') { + return 'dateLong'; + } + else { + return 'dateTimeLong'; + } + } } diff --git a/modules/backend/formwidgets/RecordFinder.php b/modules/backend/formwidgets/RecordFinder.php index 3017dd7..6342971 100644 --- a/modules/backend/formwidgets/RecordFinder.php +++ b/modules/backend/formwidgets/RecordFinder.php @@ -272,7 +272,7 @@ protected function makeListWidget() } elseif ($scopeMethod = $this->scope) { $widget->bindEvent('list.extendQueryBefore', function($query) use ($scopeMethod) { - $query->$scopeMethod(); + $query->$scopeMethod($this->model); }); } else { diff --git a/modules/backend/formwidgets/Relation.php b/modules/backend/formwidgets/Relation.php index ab60d0b..17aef5e 100644 --- a/modules/backend/formwidgets/Relation.php +++ b/modules/backend/formwidgets/Relation.php @@ -112,8 +112,6 @@ protected function makeRenderFormField() $field->type = 'dropdown'; } - $field->placeholder = $this->emptyOption; - // It is safe to assume that if the model and related model are of // the exact same class, then it cannot be related to itself if ($model->exists && (get_class($model) == get_class($relationModel))) { diff --git a/modules/backend/formwidgets/Repeater.php b/modules/backend/formwidgets/Repeater.php index 70205ff..42cc754 100644 --- a/modules/backend/formwidgets/Repeater.php +++ b/modules/backend/formwidgets/Repeater.php @@ -114,7 +114,9 @@ protected function processExistingItems() $itemIndexes = post(self::INDEX_PREFIX.$this->formField->getName(false), $loadValue); - if (!is_array($itemIndexes)) return; + if (!is_array($itemIndexes)) { + return; + } foreach ($itemIndexes as $itemIndex) { $this->makeItemFormWidget($itemIndex); @@ -125,13 +127,16 @@ protected function processExistingItems() protected function makeItemFormWidget($index = 0) { $loadValue = $this->getLoadValue(); - if (!is_array($loadValue)) $loadValue = []; + if (!is_array($loadValue)) { + $loadValue = []; + } $config = $this->makeConfig($this->form); $config->model = $this->model; $config->data = array_get($loadValue, $index, []); $config->alias = $this->alias . 'Form'.$index; $config->arrayName = $this->formField->getName().'['.$index.']'; + $config->isNested = true; $widget = $this->makeWidget('Backend\Widgets\Form', $config); $widget->bindToController(); diff --git a/modules/backend/formwidgets/RichEditor.php b/modules/backend/formwidgets/RichEditor.php index 17e7069..753d004 100644 --- a/modules/backend/formwidgets/RichEditor.php +++ b/modules/backend/formwidgets/RichEditor.php @@ -3,6 +3,7 @@ use App; use File; use Event; +use Lang; use Request; use Backend\Classes\FormWidgetBase; use Backend\Models\EditorSetting; @@ -196,7 +197,7 @@ protected function getPageLinksArray() $links = []; $types = $this->getPageLinkTypes(); - $links[] = ['name' => 'Select a page...', 'url' => false]; + $links[] = ['name' => Lang::get('backend::lang.pagelist.select_page'), 'url' => false]; $iterator = function($links, $level = 0) use (&$iterator) { $result = []; diff --git a/modules/backend/formwidgets/datepicker/partials/_datepicker.htm b/modules/backend/formwidgets/datepicker/partials/_datepicker.htm index c8f9361..cb80a81 100644 --- a/modules/backend/formwidgets/datepicker/partials/_datepicker.htm +++ b/modules/backend/formwidgets/datepicker/partials/_datepicker.htm @@ -1,7 +1,8 @@ previewMode): ?>
$value, - 'formatAlias' => $formatAlias + 'format' => $format, + 'formatAlias' => $formatAlias, + 'defaultValue' => $value ]) ?>
@@ -9,6 +10,7 @@ id="getId() ?>" class="field-datepicker" data-control="datepicker" + data-format="" data-min-date="" data-max-date="" > diff --git a/modules/backend/formwidgets/recordfinder/assets/js/recordfinder.js b/modules/backend/formwidgets/recordfinder/assets/js/recordfinder.js index 029660e..aa65532 100644 --- a/modules/backend/formwidgets/recordfinder/assets/js/recordfinder.js +++ b/modules/backend/formwidgets/recordfinder/assets/js/recordfinder.js @@ -23,7 +23,7 @@ this.$el = $(element) this.$el.on('dblclick', function () { - $('.btn:first', this.$el).trigger('click') + $('.btn:first', self.$el).trigger('click') }) } diff --git a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css index 37f9693..199b92f 100755 --- a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css +++ b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css @@ -1,4 +1,4 @@ -.clearfix::after{clear:both;display:block;content:""} +.clearfix::after{clear:both;display:block;content:"";height:0} .fr-element,.fr-element:focus{outline:0px solid transparent} .fr-box.fr-basic .fr-element{text-align:initial;color:#000000;padding:20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow-x:auto;min-height:60px} .fr-element{background:transparent;position:relative;z-index:2;-webkit-user-select:auto} @@ -17,7 +17,7 @@ iframe.fr-iframe{width:100%;border:none;position:relative;display:block;z-index: .fr-wrapper{position:relative;z-index:1} .fr-wrapper:before,.fr-wrapper:after{content:" ";display:table} .fr-wrapper:after{clear:both} -.fr-wrapper::after{clear:both;display:block;content:""} +.fr-wrapper::after{clear:both;display:block;content:"";height:0} .fr-wrapper .fr-placeholder{position:absolute;font-size:12px;color:#aaaaaa;z-index:1;display:none;top:0;left:0;overflow:hidden} .fr-wrapper.show-placeholder .fr-placeholder{display:block} .fr-wrapper ::selection{background:#b5d6fd;color:#000000} @@ -32,7 +32,7 @@ iframe.fr-iframe{width:100%;border:none;position:relative;display:block;z-index: .fr-toolbar{color:#222222;background:#f9f9f9;position:relative;z-index:4;font-family:sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:0 2px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);text-align:left;border:0px;border-top:1px solid #bdbdbd} .fr-toolbar:before,.fr-toolbar:after{content:" ";display:table} .fr-toolbar:after{clear:both} -.fr-toolbar::after{clear:both;display:block;content:""} +.fr-toolbar::after{clear:both;display:block;content:"";height:0} .fr-toolbar.fr-rtl{text-align:right} .fr-toolbar.fr-inline{display:none;white-space:nowrap;position:absolute;margin-top:10px} .fr-toolbar.fr-inline .fr-arrow{width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #bdbdbd;position:absolute;top:-13px;left:50%;margin-left:-7px;display:inline-block} @@ -104,7 +104,7 @@ iframe.fr-iframe{width:100%;border:none;position:relative;display:block;z-index: .fr-popup .fr-buttons{-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);padding:0 2px;white-space:nowrap;line-height:0;border-bottom:0px} .fr-popup .fr-buttons:before,.fr-popup .fr-buttons:after{content:" ";display:table} .fr-popup .fr-buttons:after{clear:both} -.fr-popup .fr-buttons::after{clear:both;display:block;content:""} +.fr-popup .fr-buttons::after{clear:both;display:block;content:"";height:0} .fr-popup .fr-buttons .fr-btn{display:inline-block;float:none} .fr-popup .fr-buttons .fr-btn i{float:left} .fr-popup .fr-buttons .fr-separator{display:inline-block;float:none} @@ -155,7 +155,7 @@ body.fr-fullscreen{overflow:hidden;height:100%;width:100%;position:fixed} textarea.fr-code{display:none;width:100%;resize:none;-moz-resize:none;-webkit-resize:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;padding:10px;margin:0px;font-family:"Courier New",monospace;font-size:14px;background:#ffffff;color:#000000;outline:none} .fr-box.fr-rtl textarea.fr-code{direction:rtl} .fr-box .CodeMirror{display:none} -.fr-box.fr-code-view textarea.fr-code{display:block;min-height:150px} +.fr-box.fr-code-view textarea.fr-code{display:block} .fr-box.fr-code-view.fr-inline{-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24)} .fr-box.fr-code-view .fr-element,.fr-box.fr-code-view .fr-placeholder,.fr-box.fr-code-view .fr-iframe{display:none} .fr-box.fr-code-view .CodeMirror{display:block} @@ -251,7 +251,7 @@ to{left:100%} .fr-popup .fr-table-size .fr-select-table-size > span:hover > span,.fr-popup .fr-table-size .fr-select-table-size > span.hover > span{background:rgba(30,136,229,0.3);border:solid 1px #1e88e5} .fr-popup .fr-table-size .fr-select-table-size .new-line:before,.fr-popup .fr-table-size .fr-select-table-size .new-line:after{content:" ";display:table} .fr-popup .fr-table-size .fr-select-table-size .new-line:after{clear:both} -.fr-popup .fr-table-size .fr-select-table-size .new-line::after{clear:both;display:block;content:""} +.fr-popup .fr-table-size .fr-select-table-size .new-line::after{clear:both;display:block;content:"";height:0} .fr-popup.fr-above .fr-table-size .fr-select-table-size > span{display:inline-block !important} .fr-popup .fr-table-colors-buttons{margin-bottom:5px} .fr-popup .fr-table-colors{line-height:0;display:block} diff --git a/modules/backend/formwidgets/richeditor/assets/js/build-min.js b/modules/backend/formwidgets/richeditor/assets/js/build-min.js index 9b076fc..9a61b6a 100755 --- a/modules/backend/formwidgets/richeditor/assets/js/build-min.js +++ b/modules/backend/formwidgets/richeditor/assets/js/build-min.js @@ -1,4 +1,4 @@ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){"use strict";var b=function(c,d){this.id=++a.FE.ID,this.opts=a.extend(!0,{},a.extend({},b.DEFAULTS,"object"==typeof d&&d));var e=JSON.stringify(this.opts);a.FE.OPTS_MAPPING[e]=a.FE.OPTS_MAPPING[e]||this.id,this.sid=a.FE.OPTS_MAPPING[e],a.FE.SHARED[this.sid]=a.FE.SHARED[this.sid]||{},this.shared=a.FE.SHARED[this.sid],this.shared.count=(this.shared.count||0)+1,this.$oel=a(c),this.$oel.data("froala.editor",this),this.o_doc=c.ownerDocument,this.o_win="defaultView"in this.o_doc?this.o_doc.defaultView:this.o_doc.parentWindow;var f=a(this.o_win).scrollTop();this.$oel.on("froala.doInit",a.proxy(function(){this.$oel.off("froala.doInit"),this.doc=this.$el.get(0).ownerDocument,this.win="defaultView"in this.doc?this.doc.defaultView:this.doc.parentWindow,this.$doc=a(this.doc),this.$win=a(this.win),this.opts.pluginsEnabled||(this.opts.pluginsEnabled=Object.keys(a.FE.PLUGINS)),this.opts.initOnClick?(this.load(a.FE.MODULES),this.$el.on("touchstart.init",function(){a(this).data("touched",!0)}),this.$el.on("touchmove.init",function(){a(this).removeData("touched")}),this.$el.on("mousedown.init touchend.init dragenter.init focus.init",a.proxy(function(b){if("touchend"==b.type&&!this.$el.data("touched"))return!0;if(1===b.which||0===b.which){this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"),this.load(a.FE.MODULES),this.load(a.FE.PLUGINS);var c=b.originalEvent&&b.originalEvent.originalTarget;c&&"IMG"==c.tagName&&a(c).trigger("mousedown"),"undefined"==typeof this.ul&&this.destroy(),"touchend"==b.type&&this.image&&b.originalEvent&&b.originalEvent.target&&a(b.originalEvent.target).is("img")&&setTimeout(a.proxy(function(){this.image.edit(a(b.originalEvent.target))},this),100),this.events.trigger("initialized")}},this))):(this.load(a.FE.MODULES),this.load(a.FE.PLUGINS),a(this.o_win).scrollTop(f),"undefined"==typeof this.ul&&this.destroy(),this.events.trigger("initialized"))},this)),this._init()};b.DEFAULTS={initOnClick:!1,pluginsEnabled:null},b.MODULES={},b.PLUGINS={},b.VERSION="2.3.3",b.INSTANCES=[],b.OPTS_MAPPING={},b.SHARED={},b.ID=0,b.prototype._init=function(){var b=this.$oel.prop("tagName"),c=a.proxy(function(){this._original_html=this._original_html||this.$oel.html(),this.$box=this.$box||this.$oel,this.opts.fullPage&&(this.opts.iframe=!0),this.opts.iframe?(this.$iframe=a(''},{test_regex:/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com)\/(?:channels\/[A-z]+\/|groups\/[A-z]+\/videos\/)?(.+)/g,url_text:"//player.vimeo.com/video/$1",html:''},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"//www.dailymotion.com/embed/video/$1",html:''},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:''},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"//rutube.ru/play/embed/$1",html:''}],a.FE.VIDEO_EMBED_REGEX=/^\W*((<\/iframe>)|())\W*$/i,a.FE.PLUGINS.video=function(b){function c(){var a=b.popups.get("video.insert"),c=a.find(".fr-video-by-url-layer input");c.val("").trigger("change");var d=a.find(".fr-video-embed-layer textarea");d.val("").trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertVideo"]'),c=b.popups.get("video.insert");if(c||(c=f()),!c.hasClass("fr-active")){b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("video.insert",d,e,a.outerHeight())}}function e(){var c=b.popups.get("video.edit");c||(c=y()),b.popups.setContainer("video.edit",a(b.opts.scrollableContainer)),b.popups.refresh("video.edit");var d=R.find("iframe, embed, video"),e=d.offset().left+d.outerWidth()/2,f=d.offset().top+d.outerHeight();b.popups.show("video.edit",e,f,d.outerHeight())}function f(a){if(a)return b.popups.onRefresh("video.insert",c),!0;var d="";b.opts.videoInsertButtons.length>1&&(d='
'+b.button.buildList(b.opts.videoInsertButtons)+"
");var e="";b.opts.videoInsertButtons.indexOf("videoByURL")>=0&&(e='
");var f="";b.opts.videoInsertButtons.indexOf("videoEmbed")>=0&&(f='
");var g={buttons:d,by_url_layer:e,embed_layer:f},h=b.popups.create("video.insert",g);return h}function g(a){var c,d,e=b.popups.get("video.insert");if(!R&&!b.opts.toolbarInline){var f=b.$tb.find('.fr-command[data-cmd="insertVideo"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("video.insert",c,d,0)}function h(a){var c=b.popups.get("video.insert");c.find(".fr-video-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active")}function i(a){var c=b.popups.get("video.insert");c.find(".fr-video-embed-layer").hasClass("fr-active")&&a.addClass("fr-active")}function j(a){b.events.focus(!0),b.selection.restore(),b.html.insert(''+a+"",!1,b.opts.videoSplitHTML),b.popups.hide("video.insert");var c=b.$el.find(".fr-jiv");c.removeClass("fr-jiv"),c.toggleClass("fr-draggable",b.opts.videoMove),b.events.trigger("video.inserted",[c])}function k(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find('.fr-video-by-url-layer input[type="text"]').val()||""}var e=null;if(b.helpers.isURL(c))for(var f=0;f
'}function q(){var c;b.shared.$video_resizer?(Q=b.shared.$video_resizer,O=b.shared.$vid_overlay,b.events.on("destroy",function(){Q.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$video_resizer=a('
'),Q=b.shared.$video_resizer,b.events.$on(Q,"mousedown",function(a){a.stopPropagation()},!0),b.opts.videoResize&&(Q.append(p("nw")+p("ne")+p("sw")+p("se")),b.shared.$vid_overlay=a('
'),O=b.shared.$vid_overlay,c=Q.get(0).ownerDocument,a(c).find("body").append(O))),b.events.on("shared.destroy",function(){Q.html("").removeData().remove(),Q=null,b.opts.videoResize&&(O.remove(),O=null)},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize.video",function(){t(!0)}),b.opts.videoResize&&(c=Q.get(0).ownerDocument,b.events.$on(Q,b._mousedown,".fr-handler",m),b.events.$on(a(c),b._mousemove,n),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,o),b.events.$on(O,"mouseleave",o))}function r(){Q||q(),(b.$wp||a(b.opts.scrollableContainer)).append(Q),Q.data("instance",b);var c=R.find("iframe, embed, video");Q.css("top",(b.opts.iframe?c.offset().top-1:c.offset().top-b.$wp.offset().top-1)+b.$wp.scrollTop()).css("left",(b.opts.iframe?c.offset().left-1:c.offset().left-b.$wp.offset().left-1)+b.$wp.scrollLeft()).css("width",c.outerWidth()).css("height",c.height()).addClass("fr-active")}function s(c){if(c&&"touchend"==c.type&&S)return!0;if(c.preventDefault(),c.stopPropagation(),b.edit.isDisabled())return!1;for(var d=0;d0&&t()}),b.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){t(!0)})}function y(){var a="";b.opts.videoEditButtons.length>=1&&(a+='
',a+=b.button.buildList(b.opts.videoEditButtons),a+="
");var c={buttons:a},d=b.popups.create("video.edit",c);return b.events.$on(b.$wp,"scroll.video-edit",function(){R&&b.popups.isVisible("video.edit")&&e()}),d}function z(){if(R){var a=b.popups.get("video.size"),c=R.find("iframe, embed, video");a.find('input[name="width"]').val(c.get(0).style.width||c.attr("width")).trigger("change"),a.find('input[name="height"]').val(c.get(0).style.height||c.attr("height")).trigger("change")}}function A(){var c=b.popups.get("video.size");c||(c=B()),b.popups.refresh("video.size"),b.popups.setContainer("video.size",a(b.opts.scrollableContainer));var d=R.find("iframe, embed, video"),e=d.offset().left+d.width()/2,f=d.offset().top+d.height();b.popups.show("video.size",e,f,d.height())}function B(a){if(a)return b.popups.onRefresh("video.size",z),!0;var c="";c='
'+b.button.buildList(b.opts.videoSizeButtons)+"
";var d="";d='
";var e={buttons:c,size_layer:d},f=b.popups.create("video.size",e);return b.events.$on(b.$wp,"scroll",function(){R&&b.popups.isVisible("video.size")&&A()}),f}function C(a){R.removeClass("fr-fvr fr-fvl"),"left"==a?R.addClass("fr-fvl"):"right"==a&&R.addClass("fr-fvr"),r(),e()}function D(a){return R?void(R.hasClass("fr-fvl")?a.find("> *:first").replaceWith(b.icon.create("align-left")):R.hasClass("fr-fvr")?a.find("> *:first").replaceWith(b.icon.create("align-right")):a.find("> *:first").replaceWith(b.icon.create("align-justify"))):!1}function E(a,b){var c="justify";R.hasClass("fr-fvl")?c="left":R.hasClass("fr-fvr")&&(c="right"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function F(a){R.removeClass("fr-dvi fr-dvb"),"inline"==a?R.addClass("fr-dvi"):"block"==a&&R.addClass("fr-dvb"),r(),e()}function G(a,b){var c="block";R.hasClass("fr-dvi")&&(c="inline"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function H(){if(R&&b.events.trigger("video.beforeRemove",[R])!==!1){var a=R;b.popups.hideAll(),t(!0),b.selection.setBefore(a.get(0))||b.selection.setAfter(a.get(0)),a.remove(),b.selection.restore(),b.html.fillEmptyBlocks(),b.events.trigger("video.removed",[a])}}function I(a){if(!a.hasClass("fr-dvi")&&!a.hasClass("fr-dvb")){var c=a.css("float");a.css("float","none"),"block"==a.css("display")?(a.css("float",c),0===parseInt(a.css("margin-left"),10)&&(a.attr("style")||"").indexOf("margin-right: auto")>=0?a.addClass("fr-fvl"):0===parseInt(a.css("margin-right"),10)&&(a.attr("style")||"").indexOf("margin-left: auto")>=0&&a.addClass("fr-fvr"),a.addClass("fr-dvb")):(a.css("float",c),"left"==a.css("float")?a.addClass("fr-fvl"):"right"==a.css("float")&&a.addClass("fr-fvr"),a.addClass("fr-dvi")),a.css("margin",""),a.css("float",""),a.css("display",""),a.css("z-index",""),a.css("position",""),a.css("overflow",""),a.css("vertical-align","")}b.opts.videoTextNear||a.removeClass("fr-dvi").addClass("fr-dvb")}function J(){b.$el.find("video").filter(function(){return 0===a(this).parents("span.fr-video").length}).wrap(''),b.$el.find("embed, iframe").filter(function(){if(b.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),a(this).parents("span.fr-video").length>0)return!1;for(var c=a(this).attr("src"),d=0;d');for(var c=b.$el.find("span.fr-video"),d=0;d'+this.icon.create("align-"+d)+"
");return b+=""},callback:function(a,b){this.video.align(b)},refresh:function(a){this.video.refreshAlign(a)},refreshOnShow:function(a,b){this.video.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("videoRemove",{NAME:"trash"}),a.FE.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),a.FE.DefineIcon("videoSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("videoSize",{undo:!1,focus:!1,title:"Change Size",callback:function(){this.video.showSizePopup()}}),a.FE.DefineIcon("videoBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(a){var b=this.video.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("videoSetSize",{undo:!0,focus:!1,callback:function(){this.video.setSize()}})});(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=='undefined'){jQuery=require('jquery');} +c+='';return c;},callback:function(cmd,val){this.link.applyStyle(val);},refreshOnShow:function($btn,$dropdown){var link=this.link.get();if(link){var $link=$(link);$dropdown.find('.fr-command').each(function(){var cls=$(this).data('param1');$(this).toggleClass('fr-active',$link.hasClass(cls));})}}})}));!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FE.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_]"}),a.extend(a.FE.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableRemove","|","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,tableInsertHelperOffset:15}),a.FE.PLUGINS.table=function(b){function c(){var a=b.$tb.find('.fr-command[data-cmd="insertTable"]'),c=b.popups.get("table.insert");if(c||(c=g()),!c.hasClass("fr-active")){b.popups.refresh("table.insert"),b.popups.setContainer("table.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("table.insert",d,e,a.outerHeight())}}function d(){var c=F();if(c){var d=b.popups.get("table.edit");d||(d=i()),b.popups.setContainer("table.edit",a(b.opts.scrollableContainer));var e=M(c),f=(e.left+e.right)/2,g=e.bottom;b.popups.show("table.edit",f,g,e.bottom-e.top),b.edit.isDisabled()&&(b.toolbar.disable(),b.$el.removeClass("fr-no-selection"),b.edit.on(),b.selection.setAtEnd(b.$el.find(".fr-selected-cell:last").get(0)),b.selection.restore(),b.button.bulkRefresh())}}function e(){var c=F();if(c){var d=b.popups.get("table.colors");d||(d=j()),b.popups.setContainer("table.colors",a(b.opts.scrollableContainer));var e=M(c),f=(e.left+e.right)/2,g=e.bottom;l(),b.popups.show("table.colors",f,g,e.bottom-e.top)}}function f(){0===ka().length&&b.toolbar.enable()}function g(c){if(c)return b.popups.onHide("table.insert",function(){b.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseenter")}),!0;var d="";b.opts.tableInsertButtons.length>0&&(d='
'+b.button.buildList(b.opts.tableInsertButtons)+"
");var e={buttons:d,rows_columns:h()},f=b.popups.create("table.insert",e);return b.events.$on(f,"mouseenter",".fr-table-size .fr-select-table-size .fr-table-cell",function(c){var d=a(c.currentTarget),e=d.data("row"),f=d.data("col"),g=d.parent();g.siblings(".fr-table-size-info").html(e+" × "+f),g.find("> span").removeClass("hover");for(var h=1;h<=b.opts.tableInsertMaxSize;h++)for(var i=0;i<=b.opts.tableInsertMaxSize;i++){var j=g.find('> span[data-row="'+h+'"][data-col="'+i+'"]');e>=h&&f>=i?j.addClass("hover"):e+1>=h||2>=h&&!b.helpers.isMobile()?j.css("display","inline-block"):h>2&&!b.helpers.isMobile()&&j.css("display","none")}},!0),f}function h(){for(var a='
1 × 1
',c=1;c<=b.opts.tableInsertMaxSize;c++){for(var d=1;d<=b.opts.tableInsertMaxSize;d++){var e="inline-block";c>2&&!b.helpers.isMobile()&&(e="none");var f="fr-table-cell ";1==c&&1==d&&(f+=" hover"),a+=''}a+='
'}return a+="
"}function i(a){if(a)return b.popups.onHide("table.edit",f),!0;var c="";b.opts.tableEditButtons.length>0&&(c='
'+b.button.buildList(b.opts.tableEditButtons)+"
");var e={buttons:c},g=b.popups.create("table.edit",e);return b.events.$on(b.$wp,"scroll.table-edit",function(){b.popups.isVisible("table.edit")&&d()}),g}function j(){var a="";b.opts.tableColorsButtons.length>0&&(a='
'+b.button.buildList(b.opts.tableColorsButtons)+"
");var c={buttons:a,colors:k()},d=b.popups.create("table.colors",c);return b.events.$on(b.$wp,"scroll.table-colors",function(){b.popups.isVisible("table.colors")&&e()}),d}function k(){for(var a='
',c=0;c"),a+="REMOVE"!=b.opts.tableColors[c]?'':'';return a+="
"}function l(){var a=b.popups.get("table.colors"),c=b.$el.find(".fr-selected-cell:first");a.find(".fr-selected-color").removeClass("fr-selected-color"),a.find('span[data-param1="'+b.helpers.RGBToHex(c.css("background-color"))+'"]').addClass("fr-selected-color")}function m(c,d){var e,f,g='',h=100/d;for(e=0;c>e;e++){for(g+="",f=0;d>f;f++)g+='";g+=""}g+="
',0===e&&0===f&&(g+=a.FE.MARKERS),g+="
",b.html.insert(g),b.selection.restore()}function n(){if(ka().length>0){var a=la();b.selection.setBefore(a.get(0))||b.selection.setAfter(a.get(0)),b.selection.restore(),b.popups.hide("table.edit"),a.remove(),b.toolbar.enable()}}function o(){var b=la();if(b.length>0&&0===b.find("th").length){var c,e="",f=0;for(b.find("tr:first > td").each(function(){var b=a(this);f+=parseInt(b.attr("colspan"),10)||1}),c=0;f>c;c++)e+="
";e+="",b.prepend(e),d()}}function p(){var a=la(),c=a.find("thead");if(c.length>0)if(0===a.find("tbody tr").length)n();else if(c.remove(),ka().length>0)d();else{b.popups.hide("table.edit");var e=a.find("tbody tr:first td:first").get(0);e&&(b.selection.setAtEnd(e),b.selection.restore())}}function q(c){var e=la();if(e.length>0){if(b.$el.find("th.fr-selected-cell").length>0&&"above"==c)return;var f,g,h=F(),i=K(h);g="above"==c?i.min_i:i.max_i;var j="";for(f=0;f0&&h[g][f]==h[g-1][f]){if(0===f||f>0&&h[g][f]!=h[g][f-1]){var k=a(h[g][f]);k.attr("rowspan",parseInt(k.attr("rowspan"),10)+1)}}else j+="
";j+="";var l=a(e.find("tr").not(e.find("table tr")).get(g));"below"==c?l.after(j):"above"==c&&(l.before(j),b.popups.isVisible("table.edit")&&d())}}function r(){var c=la();if(c.length>0){var d,e,f,g=F(),h=K(g);if(0===h.min_i&&h.max_i==g.length-1)n();else{for(d=h.max_i;d>=h.min_i;d--){for(f=a(c.find("tr").not(c.find("table tr")).get(d)),e=0;e1){var j=parseInt(i.attr("rowspan"),10)-1;1==j?i.removeAttr("rowspan"):i.attr("rowspan",j)}if(d0&&g[d][l]==g[d][l-1];)l--;0===l?a(c.find("tr").not(c.find("table tr")).get(d+1)).prepend(k):a(g[d+1][l-1]).after(k)}}var m=f.parent();f.remove(),0===m.find("tr").length&&m.remove(),g=F(c)}x(0,g.length-1,0,g[0].length-1,c),h.min_i>0?b.selection.setAtEnd(g[h.min_i-1][0]):b.selection.setAtEnd(g[0][0]),b.selection.restore(),b.popups.hide("table.edit")}}}function s(c){var e=la();if(e.length>0){var f,g=F(),h=K(g);f="before"==c?h.min_j:h.max_j;var i,j=100/g[0].length,k=100/(g[0].length+1);e.find("th, td").each(function(){i=a(this),i.data("old-width",i.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("table tr")).each(function(b){for(var d,e=a(this),h=0,i=0;f>h-1;){if(d=e.find("> th, > td").get(i),!d){d=null;break}d==g[b][h]?(h+=parseInt(a(d).attr("colspan"),10)||1,i++):(h+=parseInt(a(g[b][h]).attr("colspan"),10)||1,"after"==c&&(d=0===i?-1:e.find("> th, > td").get(i-1)))}var l=a(d);if("after"==c&&h-1>f||"before"==c&&f>0&&g[b][f]==g[b][f-1]){if(0===b||b>0&&g[b][f]!=g[b-1][f]){var m=parseInt(l.attr("colspan"),10)+1;l.attr("colspan",m),l.css("width",(l.data("old-width")*k/j+k).toFixed(4)+"%"),l.removeData("old-width")}}else{var n;n=e.find("th").length>0?'
':'
',-1==d?e.prepend(n):null==d?e.append(n):"before"==c?l.before(n):"after"==c&&l.after(n)}}),e.find("th, td").each(function(){i=a(this),i.data("old-width")&&(i.css("width",(i.data("old-width")*k/j).toFixed(4)+"%"),i.removeData("old-width"))}),b.popups.isVisible("table.edit")&&d()}}function t(){var c=la();if(c.length>0){var d,e,f,g=F(),h=K(g);if(0===h.min_j&&h.max_j==g[0].length-1)n();else{var i=100/g[0].length,j=100/(g[0].length-h.max_j+h.min_j-1);for(c.find("th, td").each(function(){f=a(this),f.hasClass("fr-selected-cell")||f.data("old-width",f.outerWidth()/c.outerWidth()*100)}),e=h.max_j;e>=h.min_j;e--)for(d=0;d1){var k=parseInt(f.attr("colspan"),10)-1;1==k?f.removeAttr("colspan"):f.attr("colspan",k),f.css("width",((f.data("old-width")-ca(e,g))*j/i).toFixed(4)+"%"),f.removeData("old-width")}else{var l=a(f.parent().get(0));f.remove(),0===l.find("> th, > td").length&&(0===l.prev().length||0===l.next().length||l.prev().find("> th[rowspan], > td[rowspan]").length th, > td").length)&&l.remove()}x(0,g.length-1,0,g[0].length-1,c),h.min_j>0?b.selection.setAtEnd(g[h.min_i][h.min_j-1]):b.selection.setAtEnd(g[h.min_i][0]),b.selection.restore(),b.popups.hide("table.edit"),c.find("th, td").each(function(){f=a(this),f.data("old-width")&&(f.css("width",(f.data("old-width")*j/i).toFixed(4)+"%"),f.removeData("old-width"))})}}}function u(a,b,c){var d,e,f,g,h,i=0,j=F(c);for(b=Math.min(b,j[0].length-1),e=a;b>=e;e++)if(!(e>a&&j[0][e]==j[0][e-1])&&(g=parseInt(j[0][e].getAttribute("colspan"),10)||1,g>1&&j[0][e]==j[0][e+1]))for(i=g-1,d=1;df;f++)if(h=parseInt(j[d][f].getAttribute("colspan"),10)||1,h>1&&j[d][f]==j[d][f+1])i=Math.min(i,h-1),f+=i;else if(i=Math.max(0,i-1),!i)break;if(!i)break}i&&w(j,i,"colspan",0,j.length-1,a,b)}function v(a,b,c){var d,e,f,g,h,i=0,j=F(c);for(b=Math.min(b,j.length-1),d=a;b>=d;d++)if(!(d>a&&j[d][0]==j[d-1][0])&&(g=parseInt(j[d][0].getAttribute("rowspan"),10)||1,g>1&&j[d][0]==j[d+1][0]))for(i=g-1,e=1;ef;f++)if(h=parseInt(j[f][e].getAttribute("rowspan"),10)||1,h>1&&j[f][e]==j[f+1][e])i=Math.min(i,h-1),f+=i;else if(i=Math.max(0,i-1),!i)break;if(!i)break}i&&w(j,i,"rowspan",a,b,0,j[0].length-1)}function w(a,b,c,d,e,f,g){var h,i,j;for(h=d;e>=h;h++)for(i=f;g>=i;i++)h>d&&a[h][i]==a[h-1][i]||i>f&&a[h][i]==a[h][i-1]||(j=parseInt(a[h][i].getAttribute(c),10)||1,j>1&&(j-b>1?a[h][i].setAttribute(c,j-b):a[h][i].removeAttribute(c)))}function x(a,b,c,d,e){v(a,b,e),u(c,d,e)}function y(){if(ka().length>1&&(0===b.$el.find("th.fr-selected-cell").length||0===b.$el.find("td.fr-selected-cell").length)){var c,e,f=F(),g=K(f),h=b.$el.find(".fr-selected-cell"),i=a(h[0]),j=i.parent(),k=j.find(".fr-selected-cell"),l=i.closest("table"),m=i.html(),n=0;for(c=0;c"!=e.html()&&""!==e.html()&&(m+="
"+e.html()),e.remove();i.html(m),b.selection.setAtEnd(i.get(0)),b.selection.restore(),b.toolbar.enable(),v(g.min_i,g.max_i,l);var o=l.find("tr:empty");for(c=o.length-1;c>=0;c--)a(o[c]).remove();u(g.min_j,g.max_j,l),d()}}function z(){if(1==ka().length){var c=b.$el.find(".fr-selected-cell"),d=c.parent(),e=c.closest("table"),f=parseInt(c.attr("rowspan"),10),g=F(),h=G(c.get(0),g),i=c.clone().html("
");if(f>1){var j=Math.ceil(f/2);j>1?c.attr("rowspan",j):c.removeAttr("rowspan"),f-j>1?i.attr("rowspan",f-j):i.removeAttr("rowspan");for(var k=h.row+j,l=0===h.col?h.col:h.col-1;l>=0&&(g[k][l]==g[k][l-1]||k>0&&g[k][l]==g[k-1][l]);)l--;-1==l?a(e.find("tr").not(e.find("table tr")).get(k)).prepend(i):a(g[k][l]).after(i)}else{var m,n=a("").append(i);for(m=0;m"),h=F(),i=G(c.get(0),h);if(d>1){var j=Math.ceil(d/2);f=da(i.col,i.col+j-1,h)/e*100;var k=da(i.col+j,i.col+d-1,h)/e*100;j>1?c.attr("colspan",j):c.removeAttr("colspan"),d-j>1?g.attr("colspan",d-j):g.removeAttr("colspan"),c.css("width",f.toFixed(4)+"%"),g.css("width",k.toFixed(4)+"%")}else{var l;for(l=0;l0){if(!c){var e=Object.keys(d);e.splice(e.indexOf(a),1),b.removeClass(e.join(" "))}b.toggleClass(a)}}function F(b){b=b||null;var c=[];return null==b&&ka().length>0&&(b=la()),b?(b.find("tr").not(b.find("table tr")).each(function(b,d){var e=a(d),f=0;e.find("> th, > td").each(function(d,e){for(var g=a(e),h=parseInt(g.attr("colspan"),10)||1,i=parseInt(g.attr("rowspan"),10)||1,j=b;b+i>j;j++)for(var k=f;f+h>k;k++)c[j]||(c[j]=[]),c[j][k]?f++:c[j][k]=e;f+=h})}),c):void 0}function G(a,b){for(var c=0;c0&&c.each(function(){var b=a(this);b.removeClass("fr-selected-cell"),""===b.attr("class")&&b.removeAttr("class")})}function J(){setTimeout(function(){b.selection.clear(),b.$el.addClass("fr-no-selection"),b.$el.blur()},0)}function K(a){var c,d=a.length,e=0,f=a[0].length,g=0,h=b.$el.find(".fr-selected-cell");for(c=0;c=g;g++)((parseInt(a(f[g][m]).attr("rowspan"),10)||1)>1||(parseInt(a(f[g][m]).attr("colspan"),10)||1)>1)&&(i=G(f[g][m],f),j=H(i.row,i.col,f),k=Math.min(i.row,k),l=Math.max(j.row,l),m=Math.min(i.col,m),n=Math.max(j.col,n)),((parseInt(a(f[g][n]).attr("rowspan"),10)||1)>1||(parseInt(a(f[g][n]).attr("colspan"),10)||1)>1)&&(i=G(f[g][n],f),j=H(i.row,i.col,f),k=Math.min(i.row,k),l=Math.max(j.row,l),m=Math.min(i.col,m),n=Math.max(j.col,n));for(h=m;n>=h;h++)((parseInt(a(f[k][h]).attr("rowspan"),10)||1)>1||(parseInt(a(f[k][h]).attr("colspan"),10)||1)>1)&&(i=G(f[k][h],f),j=H(i.row,i.col,f),k=Math.min(i.row,k),l=Math.max(j.row,l),m=Math.min(i.col,m),n=Math.max(j.col,n)),((parseInt(a(f[l][h]).attr("rowspan"),10)||1)>1||(parseInt(a(f[l][h]).attr("colspan"),10)||1)>1)&&(i=G(f[l][h],f),j=H(i.row,i.col,f),k=Math.min(i.row,k),l=Math.max(j.row,l),m=Math.min(i.col,m),n=Math.max(j.col,n));return k==b&&l==c&&m==d&&n==e?{min_i:b,max_i:c,min_j:d,max_j:e}:L(k,l,m,n,f)}function M(b){var c=K(b),d=a(b[c.min_i][c.min_j]),e=a(b[c.min_i][c.max_j]),f=a(b[c.max_i][c.min_j]),g=d.offset().left,h=e.offset().left+e.outerWidth(),i=d.offset().top,j=f.offset().top+f.outerHeight();return{left:g,right:h,top:i,bottom:j}}function N(c,d){if(a(c).is(d))I(),b.edit.on(),a(c).addClass("fr-selected-cell");else{J(),b.edit.off();var e=F(),f=G(c,e),g=G(d,e),h=L(Math.min(f.row,g.row),Math.max(f.row,g.row),Math.min(f.col,g.col),Math.max(f.col,g.col),e);I();for(var i=h.min_i;i<=h.max_i;i++)for(var j=h.min_j;j<=h.max_j;j++)a(e[i][j]).addClass("fr-selected-cell")}}function O(c){var d=null,e=a(c.target);return"TD"==c.target.tagName||"TH"==c.target.tagName?d=c.target:e.closest("td").length>0?d=e.closest("td").get(0):e.closest("th").length>0&&(d=e.closest("th").get(0)),0===b.$el.find(d).length?null:d}function P(){I(),b.popups.hide("table.edit")}function Q(c){var d=O(c);if(ka().length>0&&!d&&P(),!b.edit.isDisabled()||b.popups.isVisible("table.edit"))if(1!=c.which||1==c.which&&b.helpers.isMac()&&c.ctrlKey)(3==c.which||1==c.which&&b.helpers.isMac()&&c.ctrlKey)&&d&&P();else if(qa=!0,d){ka().length>0&&!c.shiftKey&&P(),c.stopPropagation(),b.events.trigger("image.hideResizer"),b.events.trigger("video.hideResizer"),pa=!0;var e=d.tagName.toLowerCase();c.shiftKey&&b.$el.find(e+".fr-selected-cell").length>0?a(b.$el.find(e+".fr-selected-cell").closest("table")).is(a(d).closest("table"))?N(ra,d):J():((b.keys.ctrlKey(c)||c.shiftKey)&&(ka().length>1||0===a(d).find(b.selection.element()).length&&!a(d).is(b.selection.element()))&&J(),ra=d,N(ra,ra))}}function R(c){if(pa||b.$tb.is(c.target)||b.$tb.is(a(c.target).closest(b.$tb.get(0)))||(ka().length>0&&b.toolbar.enable(),I()),!(1!=c.which||1==c.which&&b.helpers.isMac()&&c.ctrlKey)){if(qa=!1,pa){pa=!1;var e=O(c);e||1!=ka().length?ka().length>0&&(b.selection.isCollapsed()?d():I()):I()}if(ta){ta=!1,na.removeClass("fr-moving"),b.$el.removeClass("fr-no-selection"),b.edit.on();var f=parseFloat(na.css("left"))+b.opts.tableResizerOffset;b.opts.iframe&&(f-=b.$iframe.offset().left),na.data("release-position",f),na.removeData("max-left"),na.removeData("max-right"),ba(c),V()}}}function S(c){if(pa===!0){var d=a(c.currentTarget);if(d.closest("table").is(la())){if("TD"==c.currentTarget.tagName&&0===b.$el.find("th.fr-selected-cell").length)return void N(ra,c.currentTarget);if("TH"==c.currentTarget.tagName&&0===b.$el.find("td.fr-selected-cell").length)return void N(ra,c.currentTarget)}J()}}function T(a){(37==a.which||38==a.which||39==a.which||40==a.which)&&ka().length>0&&P()}function U(){b.shared.$table_resizer||(b.shared.$table_resizer=a('
')),na=b.shared.$table_resizer,b.events.$on(na,"mousedown",function(a){return b.core.sameInstance(na)?(ka().length>0&&P(),1==a.which?(ta=!0,na.addClass("fr-moving"),J(),b.edit.off(),na.find("div").css("opacity",1),!1):void 0):!0}),b.events.$on(na,"mousemove",function(a){return b.core.sameInstance(na)?void(ta&&(b.opts.iframe&&(a.pageX-=b.$iframe.offset().left),ea(a))):!0}),b.events.on("shared.destroy",function(){na.html("").removeData().remove(),na=null},!0),b.events.on("destroy",function(){b.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),na.hide().appendTo(a("body"))},!0)}function V(){na&&(na.find("div").css("opacity",0),na.css("top",0),na.css("left",0),na.css("height",0),na.find("div").css("height",0),na.hide())}function W(){oa&&oa.removeClass("fr-visible").css("left","-9999px")}function X(c,d){var e=a(d),f=e.closest("table"),g=f.parent();if(d&&"TD"!=d.tagName&&"TH"!=d.tagName&&(e.closest("td").length>0?d=e.closest("td"):e.closest("th").length>0&&(d=e.closest("th"))),!d||"TD"!=d.tagName&&"TH"!=d.tagName)na&&e.get(0)!=na.get(0)&&e.parent().get(0)!=na.get(0)&&b.core.sameInstance(na)&&V();else{if(e=a(d),0===b.$el.find(e).length)return!1;var h=e.offset().left-1,i=h+e.outerWidth();if(Math.abs(c.pageX-h)<=b.opts.tableResizerOffset||Math.abs(i-c.pageX)<=b.opts.tableResizerOffset){var j,k,l,m,n,o=F(f),p=G(d,o),q=H(p.row,p.col,o),r=f.offset().top,s=f.outerHeight()-1;"rtl"!=b.opts.direction?p.col>0&&c.pageX-h<=b.opts.tableResizerOffset?(l=h,m=h-ca(p.col-1,o)+b.opts.tableResizingLimit,n=h+ca(p.col,o)-b.opts.tableResizingLimit,j=p.col-1,k=p.col):i-c.pageX<=b.opts.tableResizerOffset&&(l=i,q.col0&&i-c.pageX<=b.opts.tableResizerOffset?(l=i,m=i-ca(p.col,o)+b.opts.tableResizingLimit,n=i+ca(p.col-1,o)-b.opts.tableResizingLimit,j=p.col,k=p.col-1):c.pageX-h<=b.opts.tableResizerOffset&&(l=h,q.col=d;d++)e+=ca(d,c);return e}function ea(a){if(ka().length>1&&qa&&J(),qa===!1&&pa===!1&&ta===!1)sa&&clearTimeout(sa),(!b.edit.isDisabled()||b.popups.isVisible("table.edit"))&&(sa=setTimeout(_,30,a));else if(ta){var c=a.pageX-b.win.pageXOffset;b.opts.iframe&&(c+=b.$iframe.offset().left);var d=na.data("max-left"),e=na.data("max-right");c>=d&&e>=c?na.css("left",c-b.opts.tableResizerOffset):d>c&&parseFloat(na.css("left"),10)>d-b.opts.tableResizerOffset?na.css("left",d-b.opts.tableResizerOffset):c>e&&parseFloat(na.css("left"),10)0)e=b.$el.find(".fr-selected-cell:last");else{var f=b.selection.element();"TD"==f.tagName||"TH"==f.tagName?e=a(f):a(f).closest("td").length>0?e=a(f).closest("td"):a(f).closest("th").length>0&&(e=a(f).closest("th"))}e&&(c.preventDefault(),P(),c.shiftKey?e.prev().length>0?fa(e.prev()):e.closest("tr").length>0&&e.closest("tr").prev().length>0?fa(e.closest("tr").prev().find("td:last")):e.closest("tbody").length>0&&e.closest("table").find("thead tr").length>0&&fa(e.closest("table").find("thead tr th:last")):e.next().length>0?fa(e.next()):e.closest("tr").length>0&&e.closest("tr").next().length>0?fa(e.closest("tr").next().find("td:first")):e.closest("thead").length>0&&e.closest("table").find("tbody tr").length>0?fa(e.closest("table").find("tbody tr td:first")):(e.addClass("fr-selected-cell"),q("below"),I(),fa(e.closest("tr").next().find("td:first"))),b.selection.restore())}}function ha(){b.shared.$ti_helper||(b.shared.$ti_helper=a('
'),b.events.bindClick(b.shared.$ti_helper,"a",function(){var a=oa.data("selected-cell"),c=oa.data("position"),d=oa.data("instance")||b;"before"==c?(a.addClass("fr-selected-cell"),d.table.insertColumn(c),a.removeClass("fr-selected-cell")):"after"==c?(a.addClass("fr-selected-cell"),d.table.insertColumn(c),a.removeClass("fr-selected-cell")):"above"==c?(a.addClass("fr-selected-cell"),d.table.insertRow(c),a.removeClass("fr-selected-cell")):"below"==c&&(a.addClass("fr-selected-cell"),d.table.insertRow(c),a.removeClass("fr-selected-cell")),W()}),b.events.on("shared.destroy",function(){b.shared.$ti_helper.html("").removeData().remove(),b.shared.$ti_helper=null},!0),b.events.$on(b.shared.$ti_helper,"mousemove",function(a){a.stopPropagation()},!0),b.events.$on(a(b.o_win),"scroll",function(){W()},!0),b.events.$on(b.$wp,"scroll",function(){W()},!0)),oa=b.shared.$ti_helper,b.events.on("destroy",function(){oa=null}),b.tooltip.bind(b.$box,".fr-insert-helper > a.fr-floating-btn")}function ia(){ra=null,clearTimeout(sa)}function ja(){ka().length>0?d():(b.popups.hide("table.insert"),b.toolbar.showInline())}function ka(){return b.$el.get(0).querySelectorAll(".fr-selected-cell")}function la(){var c=ka();if(c.length){for(var d=c[0];d&&"TABLE"!=d.tagName&&d.parentNode!=b.$el.get(0);)d=d.parentNode;return a(d&&"TABLE"==d.tagName?d:[])}return a([])}function ma(){if(!b.$wp)return!1;if(!b.helpers.isMobile()){qa=!1,pa=!1,ta=!1,b.events.$on(b.$el,"mousedown",Q),b.popups.onShow("image.edit",function(){I(),qa=!1,pa=!1}),b.popups.onShow("link.edit",function(){I(),qa=!1,pa=!1}),b.events.on("commands.mousedown",function(a){a.parents(".fr-toolbar").length>0&&I()}),b.events.$on(b.$el,"mouseenter","th, td",S),b.events.$on(b.$win,"mouseup",R),b.opts.iframe&&b.events.$on(a(b.o_win),"mouseup",R),b.events.$on(b.$el,"keydown",T),b.events.$on(b.$win,"mousemove",ea),b.events.$on(a(b.o_win),"scroll",aa),b.events.on("contentChanged",function(){ka().length>0&&(d(),b.$el.find("img").on("load.selected-cells",function(){a(this).off("load.selected-cells"),ka().length>0&&d()}))}),b.events.$on(a(b.o_win),"resize",function(){I()}),b.events.on("keydown",function(c){var d=ka();if(d.length>0){if(c.which==a.FE.KEYCODE.ESC&&b.popups.isVisible("table.edit"))return I(),b.popups.hide("table.edit"),c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation(),d=[],!1;if(d.length>1&&c.which==a.FE.KEYCODE.BACKSPACE){b.undo.saveStep();for(var e=0;e"),e==d.length-1&&a(d[e]).prepend(a.FE.MARKERS);return b.selection.restore(),b.undo.saveStep(),d=[],!1}if(d.length>1&&!b.keys.ctrlKey(c))return c.preventDefault(),d=[],!1}d=[]},!0);var c=[];b.events.on("html.beforeGet",function(){c=ka();for(var a=0;a((?:[\w\W]*?))<\/(td|th)>/g,"<$1$2$3>$4")}),b.events.on("html.afterGet",function(){for(var a=0;a0&&(0===b.find("th").length?a.removeClass("fr-active"):a.addClass("fr-active"))}}),a.FE.DefineIcon("tableRows",{NAME:"bars"}),a.FE.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below","delete":"Delete row"},html:function(){var b='"},callback:function(a,b){"above"==b||"below"==b?this.table.insertRow(b):this.table.deleteRow()}}),a.FE.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90"}),a.FE.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after","delete":"Delete column"},html:function(){var b='"},callback:function(a,b){"before"==b||"after"==b?this.table.insertColumn(b):this.table.deleteColumn()}}),a.FE.DefineIcon("tableCells",{NAME:"square-o"}),a.FE.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var b='"},callback:function(a,b){"merge"==b?this.table.mergeCells():"vertical-split"==b?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(a,b){this.$el.find(".fr-selected-cell").length>1?(b.find('a[data-param1="vertical-split"]').addClass("fr-disabled"),b.find('a[data-param1="horizontal-split"]').addClass("fr-disabled"),b.find('a[data-param1="merge"]').removeClass("fr-disabled")):(b.find('a[data-param1="merge"]').addClass("fr-disabled"),b.find('a[data-param1="vertical-split"]').removeClass("fr-disabled"),b.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled"))}}),a.FE.DefineIcon("tableRemove",{NAME:"trash"}),a.FE.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),a.FE.DefineIcon("tableStyle",{NAME:"paint-brush"}),a.FE.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var a='"},callback:function(a,b){this.table.applyStyle(b,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(b,c){var d=this.$el.find(".fr-selected-cell").closest("table");d&&c.find(".fr-command").each(function(){var b=a(this).data("param1");a(this).toggleClass("fr-active",d.hasClass(b))})}}),a.FE.DefineIcon("tableCellBackground",{NAME:"tint"}),a.FE.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,callback:function(){this.table.showColorsPopup()}}),a.FE.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(a,b){this.table.setBackground(b)}}),a.FE.DefineIcon("tableBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(a){0!==this.table.selectedCells().length||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v"}),a.FE.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var b='"},callback:function(a,b){this.table.verticalAlign(b)},refreshOnShow:function(a,b){b.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active")}}),a.FE.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left"}),a.FE.DefineIcon("align-left",{NAME:"align-left"}),a.FE.DefineIcon("align-right",{NAME:"align-right"}),a.FE.DefineIcon("align-center",{NAME:"align-center"}),a.FE.DefineIcon("align-justify",{NAME:"align-justify"}),a.FE.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var b='"},callback:function(a,b){this.table.horizontalAlign(b)},refresh:function(b){var c=this.table.selectedCells();c.length&&b.find("> *:first").replaceWith(this.icon.create("align-"+this.helpers.getAlignment(a(c[0]))))},refreshOnShow:function(a,b){b.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell:first"))+'"]').addClass("fr-active")}}),a.FE.DefineIcon("tableCellStyle",{NAME:"magic"}),a.FE.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var a='"},callback:function(a,b){this.table.applyStyle(b,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(b,c){var d=this.$el.find(".fr-selected-cell:first");d&&c.find(".fr-command").each(function(){var b=a(this).data("param1");a(this).toggleClass("fr-active",d.hasClass(b))})}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FE.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),a.extend(a.FE.DEFAULTS,{videoInsertButtons:["videoBack","|","videoByURL","videoEmbed"],videoEditButtons:["videoDisplay","videoAlign","videoSize","videoRemove"],videoResize:!0,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoDefaultAlign:"center",videoDefaultDisplay:"block",videoMove:!0}),a.FE.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"//www.youtube.com/embed/$1",html:''},{test_regex:/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com)\/(?:channels\/[A-z]+\/|groups\/[A-z]+\/videos\/)?(.+)/g,url_text:"//player.vimeo.com/video/$1",html:''},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"//www.dailymotion.com/embed/video/$1",html:''},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:''},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"//rutube.ru/play/embed/$1",html:''}],a.FE.VIDEO_EMBED_REGEX=/^\W*((<\/iframe>)|())\W*$/i,a.FE.PLUGINS.video=function(b){function c(){var a=b.popups.get("video.insert"),c=a.find(".fr-video-by-url-layer input");c.val("").trigger("change");var d=a.find(".fr-video-embed-layer textarea");d.val("").trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertVideo"]'),c=b.popups.get("video.insert");if(c||(c=f()),!c.hasClass("fr-active")){b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("video.insert",d,e,a.outerHeight())}}function e(){var c=b.popups.get("video.edit");c||(c=y()),b.popups.setContainer("video.edit",a(b.opts.scrollableContainer)),b.popups.refresh("video.edit");var d=R.find("iframe, embed, video"),e=d.offset().left+d.outerWidth()/2,f=d.offset().top+d.outerHeight();b.popups.show("video.edit",e,f,d.outerHeight())}function f(a){if(a)return b.popups.onRefresh("video.insert",c),!0;var d="";b.opts.videoInsertButtons.length>1&&(d='
'+b.button.buildList(b.opts.videoInsertButtons)+"
");var e="";b.opts.videoInsertButtons.indexOf("videoByURL")>=0&&(e='
");var f="";b.opts.videoInsertButtons.indexOf("videoEmbed")>=0&&(f='
");var g={buttons:d,by_url_layer:e,embed_layer:f},h=b.popups.create("video.insert",g);return h}function g(a){var c,d,e=b.popups.get("video.insert");if(!R&&!b.opts.toolbarInline){var f=b.$tb.find('.fr-command[data-cmd="insertVideo"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("video.insert",c,d,0)}function h(a){var c=b.popups.get("video.insert");c.find(".fr-video-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active")}function i(a){var c=b.popups.get("video.insert");c.find(".fr-video-embed-layer").hasClass("fr-active")&&a.addClass("fr-active")}function j(a){b.events.focus(!0),b.selection.restore(),b.html.insert(''+a+"",!1,b.opts.videoSplitHTML),b.popups.hide("video.insert");var c=b.$el.find(".fr-jiv");c.removeClass("fr-jiv"),c.toggleClass("fr-draggable",b.opts.videoMove),b.events.trigger("video.inserted",[c])}function k(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find('.fr-video-by-url-layer input[type="text"]').val()||""}var e=null;if(b.helpers.isURL(c))for(var f=0;f'}function q(){var c;b.shared.$video_resizer?(Q=b.shared.$video_resizer,O=b.shared.$vid_overlay,b.events.on("destroy",function(){Q.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$video_resizer=a('
'),Q=b.shared.$video_resizer,b.events.$on(Q,"mousedown",function(a){a.stopPropagation()},!0),b.opts.videoResize&&(Q.append(p("nw")+p("ne")+p("sw")+p("se")),b.shared.$vid_overlay=a('
'),O=b.shared.$vid_overlay,c=Q.get(0).ownerDocument,a(c).find("body").append(O))),b.events.on("shared.destroy",function(){Q.html("").removeData().remove(),Q=null,b.opts.videoResize&&(O.remove(),O=null)},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize.video",function(){t(!0)}),b.opts.videoResize&&(c=Q.get(0).ownerDocument,b.events.$on(Q,b._mousedown,".fr-handler",m),b.events.$on(a(c),b._mousemove,n),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,o),b.events.$on(O,"mouseleave",o))}function r(){Q||q(),(b.$wp||a(b.opts.scrollableContainer)).append(Q),Q.data("instance",b);var c=R.find("iframe, embed, video");Q.css("top",(b.opts.iframe?c.offset().top-1:c.offset().top-b.$wp.offset().top-1)+b.$wp.scrollTop()).css("left",(b.opts.iframe?c.offset().left-1:c.offset().left-b.$wp.offset().left-1)+b.$wp.scrollLeft()).css("width",c.outerWidth()).css("height",c.height()).addClass("fr-active")}function s(c){if(c&&"touchend"==c.type&&S)return!0;if(c.preventDefault(),c.stopPropagation(),b.edit.isDisabled())return!1;for(var d=0;d0&&t()}),b.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){t(!0)})}function y(){var a="";b.opts.videoEditButtons.length>=1&&(a+='
',a+=b.button.buildList(b.opts.videoEditButtons),a+="
");var c={buttons:a},d=b.popups.create("video.edit",c);return b.events.$on(b.$wp,"scroll.video-edit",function(){R&&b.popups.isVisible("video.edit")&&e()}),d}function z(){if(R){var a=b.popups.get("video.size"),c=R.find("iframe, embed, video");a.find('input[name="width"]').val(c.get(0).style.width||c.attr("width")).trigger("change"),a.find('input[name="height"]').val(c.get(0).style.height||c.attr("height")).trigger("change")}}function A(){var c=b.popups.get("video.size");c||(c=B()),b.popups.refresh("video.size"),b.popups.setContainer("video.size",a(b.opts.scrollableContainer));var d=R.find("iframe, embed, video"),e=d.offset().left+d.width()/2,f=d.offset().top+d.height();b.popups.show("video.size",e,f,d.height())}function B(a){if(a)return b.popups.onRefresh("video.size",z),!0;var c="";c='
'+b.button.buildList(b.opts.videoSizeButtons)+"
";var d="";d='
";var e={buttons:c,size_layer:d},f=b.popups.create("video.size",e);return b.events.$on(b.$wp,"scroll",function(){R&&b.popups.isVisible("video.size")&&A()}),f}function C(a){R.removeClass("fr-fvr fr-fvl"),"left"==a?R.addClass("fr-fvl"):"right"==a&&R.addClass("fr-fvr"),r(),e()}function D(a){return R?void(R.hasClass("fr-fvl")?a.find("> *:first").replaceWith(b.icon.create("align-left")):R.hasClass("fr-fvr")?a.find("> *:first").replaceWith(b.icon.create("align-right")):a.find("> *:first").replaceWith(b.icon.create("align-justify"))):!1}function E(a,b){var c="justify";R.hasClass("fr-fvl")?c="left":R.hasClass("fr-fvr")&&(c="right"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function F(a){R.removeClass("fr-dvi fr-dvb"),"inline"==a?R.addClass("fr-dvi"):"block"==a&&R.addClass("fr-dvb"),r(),e()}function G(a,b){var c="block";R.hasClass("fr-dvi")&&(c="inline"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function H(){if(R&&b.events.trigger("video.beforeRemove",[R])!==!1){var a=R;b.popups.hideAll(),t(!0),b.selection.setBefore(a.get(0))||b.selection.setAfter(a.get(0)),a.remove(),b.selection.restore(),b.html.fillEmptyBlocks(),b.events.trigger("video.removed",[a])}}function I(a){if(!a.hasClass("fr-dvi")&&!a.hasClass("fr-dvb")){var c=a.css("float");a.css("float","none"),"block"==a.css("display")?(a.css("float",c),0===parseInt(a.css("margin-left"),10)&&(a.attr("style")||"").indexOf("margin-right: auto")>=0?a.addClass("fr-fvl"):0===parseInt(a.css("margin-right"),10)&&(a.attr("style")||"").indexOf("margin-left: auto")>=0&&a.addClass("fr-fvr"),a.addClass("fr-dvb")):(a.css("float",c),"left"==a.css("float")?a.addClass("fr-fvl"):"right"==a.css("float")&&a.addClass("fr-fvr"),a.addClass("fr-dvi")),a.css("margin",""),a.css("float",""),a.css("display",""),a.css("z-index",""),a.css("position",""),a.css("overflow",""),a.css("vertical-align","")}b.opts.videoTextNear||a.removeClass("fr-dvi").addClass("fr-dvb")}function J(){b.$el.find("video").filter(function(){return 0===a(this).parents("span.fr-video").length}).wrap(''),b.$el.find("embed, iframe").filter(function(){if(b.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),a(this).parents("span.fr-video").length>0)return!1;for(var c=a(this).attr("src"),d=0;d');for(var c=b.$el.find("span.fr-video"),d=0;d'+this.icon.create("align-"+d)+"");return b+=""},callback:function(a,b){this.video.align(b)},refresh:function(a){this.video.refreshAlign(a)},refreshOnShow:function(a,b){this.video.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("videoRemove",{NAME:"trash"}),a.FE.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),a.FE.DefineIcon("videoSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("videoSize",{undo:!1,focus:!1,title:"Change Size",callback:function(){this.video.showSizePopup()}}),a.FE.DefineIcon("videoBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(a){var b=this.video.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("videoSetSize",{undo:!0,focus:!1,callback:function(){this.video.setSize()}})});(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=='undefined'){jQuery=require('jquery');} else{jQuery=require('jquery')(root);}} factory(jQuery);return jQuery;};}else{factory(jQuery);}}(function($){'use strict';$.extend($.FE.POPUP_TEMPLATES,{'audio.insert':'[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_]','audio.edit':'[_BUTTONS_]','audio.size':'[_BUTTONS_][_SIZE_LAYER_]'}) $.extend($.FE.DEFAULTS,{audioInsertButtons:['audioBack','|','audioByURL','audioEmbed'],audioEditButtons:['audioDisplay','audioAlign','audioSize','audioRemove'],audioResize:true,audioSizeButtons:['audioBack','|'],audioSplitHTML:false,audioTextNear:true,audioDefaultAlign:'center',audioDefaultDisplay:'block',audioMove:true});$.FE.VIDEO_PROVIDERS=[];$.FE.VIDEO_EMBED_REGEX=/^\W*((<\/iframe>)|())\W*$/i;$.FE.PLUGINS.audio=function(editor){var $overlay;var $handler;var $audio_resizer;var $current_audio;function _refreshInsertPopup(){var $popup=editor.popups.get('audio.insert');var $url_input=$popup.find('.fr-audio-by-url-layer input');$url_input.val('').trigger('change');var $embed_area=$popup.find('.fr-audio-embed-layer textarea');$embed_area.val('').trigger('change');} @@ -480,11 +485,11 @@ Base.call(this) this.init()} RichEditor.prototype=Object.create(BaseProto) RichEditor.prototype.constructor=RichEditor -RichEditor.DEFAULTS={linksHandler:null,stylesheet:null,fullpage:false,editorLang:'en',toolbarButtons:null,allowEmptyTags:null,allowTags:null,noWrapTags:null,removeTags:null,imageStyles:null,linkStyles:null,paragraphStyles:null,tableStyles:null,tableCellStyles:null} +RichEditor.DEFAULTS={linksHandler:null,stylesheet:null,fullpage:false,editorLang:'en',toolbarButtons:null,allowEmptyTags:null,allowTags:null,noWrapTags:null,removeTags:null,imageStyles:null,linkStyles:null,paragraphStyles:null,tableStyles:null,tableCellStyles:null,aceVendorPath:'/'} RichEditor.prototype.init=function(){var self=this;this.$el.one('dispose-control',this.proxy(this.dispose)) if(!this.$textarea.attr('id')){this.$textarea.attr('id','element-'+Math.random().toString(36).substring(7))} this.initFroala()} -RichEditor.prototype.initFroala=function(){var froalaOptions={editorClass:'control-richeditor',language:this.options.editorLang,fullPage:this.options.fullpage,pageLinksHandler:this.options.linksHandler} +RichEditor.prototype.initFroala=function(){var froalaOptions={editorClass:'control-richeditor',language:this.options.editorLang,fullPage:this.options.fullpage,pageLinksHandler:this.options.linksHandler,aceEditorVendorPath:this.options.aceVendorPath} if(this.options.toolbarButtons){froalaOptions.toolbarButtons=this.options.toolbarButtons.split(',')} else{froalaOptions.toolbarButtons=$.oc.richEditorButtons} froalaOptions.imageStyles=this.options.imageStyles?this.options.imageStyles:{'oc-img-rounded':'Rounded','oc-img-bordered':'Bordered'} @@ -540,6 +545,7 @@ RichEditor.prototype.build=function(event,editor){this.updateLayout() $(window).on('resize',this.proxy(this.updateLayout)) $(window).on('oc.updateUi',this.proxy(this.updateLayout)) this.$textarea.trigger('init.oc.richeditor',[this])} +RichEditor.prototype.isCodeViewActive=function(){return this.editor&&this.editor.codeView&&this.editor.codeView.isActive()} RichEditor.prototype.getElement=function(){return this.$el} RichEditor.prototype.getEditor=function(){return this.editor} RichEditor.prototype.getTextarea=function(){return this.$textarea} @@ -570,7 +576,9 @@ RichEditor.prototype.onFigureKeydown=function(ev){this.$textarea.trigger('figure RichEditor.prototype.onKeydown=function(ev,editor,keyEv){this.$textarea.trigger('keydown.oc.richeditor',[keyEv,this]) if(ev.isDefaultPrevented()){return false}} RichEditor.prototype.onChange=function(ev){this.$form.trigger('change')} -RichEditor.prototype.onFormBeforeRequest=function(ev){this.$textarea.val(this.$textarea.froalaEditor('html.get'))} +RichEditor.prototype.onFormBeforeRequest=function(ev){if(!this.editor){return} +if(this.isCodeViewActive()){this.editor.html.set(this.editor.codeView.get())} +this.$textarea.val(this.editor.html.get())} var old=$.fn.richEditor $.fn.richEditor=function(option){var args=Array.prototype.slice.call(arguments,1),result this.each(function(){var $this=$(this) diff --git a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js index 67094e6..ac7cf80 100755 --- a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js +++ b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js @@ -48,7 +48,8 @@ linkStyles: null, paragraphStyles: null, tableStyles: null, - tableCellStyles: null + tableCellStyles: null, + aceVendorPath: '/' } RichEditor.prototype.init = function() { @@ -74,7 +75,8 @@ editorClass: 'control-richeditor', language: this.options.editorLang, fullPage: this.options.fullpage, - pageLinksHandler: this.options.linksHandler + pageLinksHandler: this.options.linksHandler, + aceEditorVendorPath: this.options.aceVendorPath } if (this.options.toolbarButtons) { @@ -216,6 +218,10 @@ this.$textarea.trigger('init.oc.richeditor', [this]) } + RichEditor.prototype.isCodeViewActive = function() { + return this.editor && this.editor.codeView && this.editor.codeView.isActive() + } + RichEditor.prototype.getElement = function() { return this.$el } @@ -331,12 +337,21 @@ this.$form.trigger('change') } + /* + * Instantly synchronizes HTML content. + * The onSyncContent() method (above) is involved into this call, + * so the resulting HTML is (optionally) beautified. + */ RichEditor.prototype.onFormBeforeRequest = function(ev) { - // Instantly synchronizes HTML content. - // The onSyncContent() method (above) is involved - // into this call, so the resulting HTML is (optionally) - // beautified - this.$textarea.val(this.$textarea.froalaEditor('html.get')) + if (!this.editor) { + return + } + + if (this.isCodeViewActive()) { + this.editor.html.set(this.editor.codeView.get()) + } + + this.$textarea.val(this.editor.html.get()) } // RICHEDITOR PLUGIN DEFINITION diff --git a/modules/backend/formwidgets/richeditor/assets/vendor/froala/js/languages/hu.js b/modules/backend/formwidgets/richeditor/assets/vendor/froala/js/languages/hu.js index d77661c..f074eba 100644 --- a/modules/backend/formwidgets/richeditor/assets/vendor/froala/js/languages/hu.js +++ b/modules/backend/formwidgets/richeditor/assets/vendor/froala/js/languages/hu.js @@ -25,7 +25,7 @@ $.FE.LANGUAGE['hu'] = { "Cancel": "M\u00e9gse", "OK": "Rendben", "Back": "Vissza", - "Remove": "Elt\ u00e1vol\u00edt\u00e1s", + "Remove": "Elt\u00e1vol\u00edt\u00e1s", "More": "T\u00f6bb", "Update": "Friss\u00edt\u00e9s", "Style": "St\u00edlus", @@ -80,7 +80,7 @@ $.FE.LANGUAGE['hu'] = { "Insert Image": "K\u00e9p beilleszt\u00e9se", "Upload Image": "K\u00e9p felt\u00f6lt\u00e9se", "By URL": "Webc\u00edm megad\u00e1sa", - "Browse": "B\u00f6ng\u00e9sz\u00e9s", + "Browse": "B\u00f6ng\u00e9sz\u00e9s a M\u00e9di\u00e1ban", "Drop image": "H\u00fazza ide a k\u00e9pet", "or click": "vagy kattintson ide", "Manage Images": "K\u00e9pek kezel\u00e9se", @@ -88,14 +88,14 @@ $.FE.LANGUAGE['hu'] = { "Deleting": "T\u00f6rl\u00e9se", "Tags": "C\u00edmk\u00e9k", "Are you sure? Image will be deleted.": "Biztos benne? K\u00e9p t\u00f6rl\u00e9sre ker\u00fcl.", - "Replace": "Cser\u00e9je", + "Replace": "Csere", "Uploading": "Felt\u00f6lt\u00e9s", "Loading image": "K\u00e9pfelt\u00f6lt\u00e9s", "Display": "Kijelz\u0151", "Inline": "Sorban", - "Break Text": "T\u00f6r sz\u00f6veg", - "Alternate Text": "Alternat\u00edv sz\u00f6veget", - "Change Size": "M\u00e9ret\u00e9nek v\u00e1ltoz\u00e1sa", + "Break Text": "Sz\u00f6veg t\u00f6r\u00e9se", + "Alternate Text": "Alternat\u00edv sz\u00f6veg", + "Change Size": "M\u00e9ret m\u00f3dos\u00edt\u00e1sa", "Width": "Sz\u00e9less\u00e9g", "Height": "Magass\u00e1g", "Something went wrong. Please try again.": "Valami elromlott. K\u00e9rlek pr\u00f3b\u00e1ld \u00fajra.", @@ -143,25 +143,25 @@ $.FE.LANGUAGE['hu'] = { // Emoticons "Emoticons": "Hangulatjelek", "Grinning face": "Vigyorg\u00f3", - "Grinning face with smiling eyes": "Vigyorg\u00f3 arca mosolyg\u00f3 szemek", + "Grinning face with smiling eyes": "Vigyorg\u00f3 arc mosolyg\u00f3 szemekkel", "Face with tears of joy": "Arc \u00e1t az \u00f6r\u00f6m k\u00f6nnyei", "Smiling face with open mouth": "Mosolyg\u00f3 arc t\u00e1tott sz\u00e1jjal", "Smiling face with open mouth and smiling eyes": "Mosoly g\u00f3 arc t\u00e1tott sz\u00e1jjal \u00e9s mosolyg\u00f3 szemek", "Smiling face with open mouth and cold sweat": "Mosolyg\u00f3 arc t\u00e1tott sz\u00e1jjal \u00e9s hideg ver\u00edt\u00e9k", "Smiling face with open mouth and tightly-closed eyes": "Mosolyg\u00f3 arc t\u00e1tott sz\u00e1jjal \u00e9s szorosan lehunyt szemmel", - "Smiling face with halo": "Mosolyg\u00f3 arc halo", + "Smiling face with halo": "Mosolyg\u00f3 arc dicsf\u00e9nyben", "Smiling face with horns": "Mosolyg\u00f3 arc szarvakkal", "Winking face": "Kacsint\u00f3s arc", "Smiling face with smiling eyes": "Mosolyg\u00f3 arc mosolyg\u00f3 szemek", "Face savoring delicious food": "Arc \u00edzlelgette \u00edzletes \u00e9telek", - "Relieved face": "Megk\u00f6nnyebb\u00fclt arccal", - "Smiling face with heart-shaped eyes": "Mosolyg\u00f3 arc sz\u00edv alak\u00fa szemek", - "Smilin g face with sunglasses": "Mosolyg\u00f3 arc, napszem\u00fcveg", + "Relieved face": "Megk\u00f6nnyebb\u00fclt arc", + "Smiling face with heart-shaped eyes": "Mosolyg\u00f3 arc sz\u00edv alak\u00fa szemekkel", + "Smilin g face with sunglasses": "Mosolyg\u00f3 arc napszem\u00fcvegben", "Smirking face": "Vigyorg\u00f3 arca", "Neutral face": "Semleges arc", "Expressionless face": "Kifejez\u00e9stelen arc", "Unamused face": "Unott arc", - "Face with cold sweat": "Arc\u00e1n hideg verejt\u00e9k", + "Face with cold sweat": "Arc\u00e1n hideg verejt\u00e9kkel", "Pensive face": "T\u00f6preng\u0151 arc", "Confused face": "Zavaros arc", "Confounded face": "R\u00e1c\u00e1folt arc", @@ -188,15 +188,15 @@ $.FE.LANGUAGE['hu'] = { "Tired face": "F\u00e1radt arc", "Grimacing face": "Elfintorodott arc", "Loudly crying face": "Hangosan s\u00edr\u00f3 arc", - "Face with open mouth": "Arc t\u00e1tott sz\u00e1jjal", - "Hushed face": "Csit\u00edtotta arca", + "Face with open mouth": "Arc nyitott sz\u00e1jjal", + "Hushed face": "Csit\u00edtott arc", "Face with open mouth and cold sweat": "Arc t\u00e1tott sz\u00e1jjal \u00e9s hideg ver\u00edt\u00e9k", "Face screaming in fear": "Sikoltoz\u00f3 arc a f\u00e9lelemt\u0151l", "Astonished face": "Meglepett arc", "Flushed face": "Kipirult arc", - "Sleeping face": "Alv\u00f3 arc\u00e1t", - "Dizzy face": " Sz\u00e1d\u00fcl arca", - "Face without mouth": "Arc n\u00e9lkül sz\u00e1j", + "Sleeping face": "Alv\u00f3 arc", + "Dizzy face": " Sz\u00e1d\u00fcl\u0151 arc", + "Face without mouth": "Arc n\u00e9lküli sz\u00e1j", "Face with medical mask": "Arc\u00e1n orvosi maszk", // Line breaker diff --git a/modules/backend/formwidgets/richeditor/partials/_page_links_form.htm b/modules/backend/formwidgets/richeditor/partials/_page_links_form.htm index 5c7c1bd..3a61b9a 100644 --- a/modules/backend/formwidgets/richeditor/partials/_page_links_form.htm +++ b/modules/backend/formwidgets/richeditor/partials/_page_links_form.htm @@ -1,7 +1,7 @@ 'pageLinksForm']) ?> \ No newline at end of file diff --git a/modules/cms/ServiceProvider.php b/modules/cms/ServiceProvider.php index 56891f9..f163a25 100644 --- a/modules/cms/ServiceProvider.php +++ b/modules/cms/ServiceProvider.php @@ -109,9 +109,14 @@ protected function registerBackendNavigation() 'icon' => 'icon-magic', 'iconSvg' => 'modules/cms/assets/images/cms-icon.svg', 'url' => Backend::url('cms'), - 'permissions' => ['cms.*'], + 'permissions' => [ + 'cms.manage_content', + 'cms.manage_assets', + 'cms.manage_pages', + 'cms.manage_layouts', + 'cms.manage_partials' + ], 'order' => 10, - 'sideMenu' => [ 'pages' => [ 'label' => 'cms::lang.page.menu_label', @@ -240,10 +245,7 @@ protected function registerBackendWidgets() { WidgetManager::instance()->registerFormWidgets(function ($manager) { $manager->registerFormWidget('Cms\FormWidgets\Components'); - $manager->registerFormWidget('Cms\FormWidgets\MediaFinder', [ - 'label' => 'Media Finder', - 'code' => 'mediafinder' - ]); + $manager->registerFormWidget('Cms\FormWidgets\MediaFinder', 'mediafinder'); }); } @@ -283,7 +285,7 @@ protected function bootMenuItemEvents() { Event::listen('pages.menuitem.listTypes', function () { return [ - 'cms-page' => 'CMS Page' + 'cms-page' => 'cms::lang.page.cms_page' ]; }); @@ -307,7 +309,7 @@ protected function bootRichEditorEvents() { Event::listen('backend.richeditor.listTypes', function () { return [ - 'cms-page' => 'CMS Page' + 'cms-page' => 'cms::lang.page.cms_page' ]; }); diff --git a/modules/cms/classes/Asset.php b/modules/cms/classes/Asset.php index d87f1ac..93bfd93 100644 --- a/modules/cms/classes/Asset.php +++ b/modules/cms/classes/Asset.php @@ -17,7 +17,6 @@ */ class Asset extends Extendable { - /** * @var \Cms\Classes\Theme A reference to the CMS theme containing the object. */ @@ -271,7 +270,7 @@ public function getFilePath($fileName = null) */ public static function getEditableExtensions() { - $defaultTypes = ['css','js','less','sass','scss']; + $defaultTypes = ['css', 'js', 'less', 'sass', 'scss']; $configTypes = Config::get('cms.editableAssetTypes'); if (!$configTypes) { @@ -280,5 +279,4 @@ public static function getEditableExtensions() return $configTypes; } - } diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index 18563ca..0890035 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -7,6 +7,7 @@ use File; use View; use Lang; +use Flash; use Event; use Config; use Session; @@ -645,6 +646,12 @@ protected function execAjaxHandlers() $responseContents['X_OCTOBER_REDIRECT'] = $result->getTargetUrl(); $result = null; } + /* + * No redirect is used, look for any flash messages + */ + elseif (Request::header('X_OCTOBER_REQUEST_FLASH') && Flash::check()) { + $responseContents['X_OCTOBER_FLASH_MESSAGES'] = Flash::all(); + } /* * If the handler returned an array, we should add it to output for rendering. diff --git a/modules/cms/controllers/Index.php b/modules/cms/controllers/Index.php index 86b0f46..861d44d 100644 --- a/modules/cms/controllers/Index.php +++ b/modules/cms/controllers/Index.php @@ -39,7 +39,13 @@ class Index extends Controller protected $theme; - public $requiredPermissions = ['cms.*']; + public $requiredPermissions = [ + 'cms.manage_content', + 'cms.manage_assets', + 'cms.manage_pages', + 'cms.manage_layouts', + 'cms.manage_partials' + ]; /** * Constructor. @@ -224,7 +230,7 @@ public function onCreateTemplate() return [ 'tabTitle' => $this->getTabTitle($type, $template), - 'tab' => $this->makePartial('form_page', [ + 'tab' => $this->makePartial('form_page', [ 'form' => $widget, 'templateType' => $type, 'templateTheme' => $this->theme->getDirName(), @@ -498,6 +504,7 @@ protected function convertLineEndings($markup) { $markup = str_replace("\r\n", "\n", $markup); $markup = str_replace("\r", "\n", $markup); + return $markup; } } diff --git a/modules/cms/controllers/index/config_content_list.yaml b/modules/cms/controllers/index/config_content_list.yaml index c37d087..a41ff5e 100644 --- a/modules/cms/controllers/index/config_content_list.yaml +++ b/modules/cms/controllers/index/config_content_list.yaml @@ -4,4 +4,4 @@ noRecordsMessage: 'cms::lang.content.no_list_records' deleteConfirmation: 'cms::lang.content.delete_confirm_multiple' -itemType: content \ No newline at end of file +itemType: content diff --git a/modules/cms/controllers/index/config_layout_list.yaml b/modules/cms/controllers/index/config_layout_list.yaml index 9303687..9d66a36 100644 --- a/modules/cms/controllers/index/config_layout_list.yaml +++ b/modules/cms/controllers/index/config_layout_list.yaml @@ -5,4 +5,4 @@ descriptionProperty: description noRecordsMessage: 'cms::lang.layout.no_list_records' deleteConfirmation: 'cms::lang.layout.delete_confirm_multiple' -itemType: layout \ No newline at end of file +itemType: layout diff --git a/modules/cms/controllers/index/config_page_list.yaml b/modules/cms/controllers/index/config_page_list.yaml index 34dd231..c2205e1 100644 --- a/modules/cms/controllers/index/config_page_list.yaml +++ b/modules/cms/controllers/index/config_page_list.yaml @@ -8,4 +8,4 @@ descriptionProperties: url: URL noRecordsMessage: 'cms::lang.page.no_list_records' deleteConfirmation: 'cms::lang.page.delete_confirm_multiple' -itemType: page \ No newline at end of file +itemType: page diff --git a/modules/cms/controllers/index/config_partial_list.yaml b/modules/cms/controllers/index/config_partial_list.yaml index fc28707..fae9b1a 100644 --- a/modules/cms/controllers/index/config_partial_list.yaml +++ b/modules/cms/controllers/index/config_partial_list.yaml @@ -5,4 +5,4 @@ descriptionProperty: description noRecordsMessage: 'cms::lang.partial.no_list_records' deleteConfirmation: 'cms::lang.partial.delete_confirm_multiple' -itemType: partial \ No newline at end of file +itemType: partial diff --git a/modules/cms/lang/en/lang.php b/modules/cms/lang/en/lang.php index d2b8d04..5d9aee3 100644 --- a/modules/cms/lang/en/lang.php +++ b/modules/cms/lang/en/lang.php @@ -114,7 +114,8 @@ 'invalid_url' => 'Invalid URL format. The URL should start with the forward slash symbol and can contain digits, Latin letters and the following symbols: ._-[]:?|/+*^$', 'delete_confirm_multiple' => 'Delete selected pages?', 'delete_confirm_single' => 'Delete this page?', - 'no_layout' => '-- no layout --' + 'no_layout' => '-- no layout --', + 'cms_page' => 'CMS page' ], 'layout' => [ 'not_found_name' => "The layout ':name' is not found", @@ -219,6 +220,8 @@ 'error_moving_file' => 'Error moving file :file', 'error_moving_directory' => 'Error moving directory :dir', 'error_deleting_directory' => 'Error deleting the original directory :dir', + 'no_list_records' => 'No files found', + 'delete_confirm' => 'Delete selected files or directories?', 'path' => 'Path' ], 'component' => [ @@ -236,7 +239,9 @@ 'template' => [ 'invalid_type' => 'Unknown template type.', 'not_found' => 'Template not found.', - 'saved'=> 'Template saved.' + 'saved' => 'Template saved.', + 'no_list_records' => 'No records found', + 'delete_confirm' => 'Delete selected templates?' ], 'permissions' => [ 'name' => 'CMS', @@ -249,6 +254,7 @@ 'manage_media' => 'Upload and manage media contents - images, videos, sounds, documents' ], 'mediafinder' => [ + 'label' => 'Media Finder', 'default_prompt' => 'Click the %s button to find a media item' ], 'media' => [ diff --git a/modules/cms/lang/fa/lang.php b/modules/cms/lang/fa/lang.php index ae483b8..ca7a35c 100644 --- a/modules/cms/lang/fa/lang.php +++ b/modules/cms/lang/fa/lang.php @@ -10,12 +10,15 @@ 'invalid_file_extension'=>'پسوند :invalid برای فایل نا معتبر است. پسوند های معتبر عبارتند از: :allowed.', 'error_deleting' => 'خطا در خذف فایل ":name". لطفا سطح دسترسی ها را بررسی نمایید.', 'delete_success' => 'تعداد :count فایل با موفقیت حذف شد.', - 'file_name_required' => 'نام فایل را وارد نمایید.' + 'file_name_required' => 'نام فایل را وارد نمایید.', + 'safe_mode_enabled' => 'حالت محافظت شده فعال می باشد.', ], 'dashboard' => [ 'active_theme' => [ + 'widget_title_default' => 'وب سایت', 'online' => 'online', 'maintenance' => 'در حال به روز رسانی', + 'manage_themes' => 'مدیریت قالب ها', ] ], 'theme' => [ @@ -91,7 +94,8 @@ 'settings_menu' => 'حالت تعمیرات', 'settings_menu_description' => 'تنظیم کردن صفحه مربوط به تعمیرات و تغییر تنظیمات این حالت.', 'is_enabled' => 'فعال سازی حالت تعمیرات', - 'is_enabled_comment' => 'اگر فعال شود کاربران به این صفحه هدایت خواهند شد.' + 'is_enabled_comment' => 'اگر فعال شود کاربران به این صفحه هدایت خواهند شد.', + 'hint' => 'حالت تعمیرات کاربرانی را که در بخش مدیریت وارد نشده اند را به صفحه تعمیرات منتقل می کند.', ], 'page' => [ 'not_found_name' => "صفحه ای با نام ':name' یافت نشد", @@ -106,7 +110,7 @@ 'menu_label' => 'صفحات', 'unsaved_label' => 'صفحه(های) ذخیره نشده', 'no_list_records' => 'صفحه ای یافت نشد', - 'new' => 'New page', + 'new' => 'صفحه جدید', 'invalid_url' => 'قالب آدرس صحیح نمی باشد. آدرس باید با اسلش شروع شده و می تواند شامل اعداد، حروف لاتین و این کاراکتر ها باشد: ._-[]:?|/+*^$', 'delete_confirm_multiple' => 'آیا از حذف صفحات انتخاب شده اطمینان دارید؟', 'delete_confirm_single' => 'آیا از حذف این صفحه اطمینان دارید؟', @@ -169,7 +173,11 @@ 'hidden' => 'مخفی', 'hidden_comment' => 'صفحات مخفی فقط برای کاربران وارد شده به سیستم نمایش داده می شود.', 'enter_fullscreen' => 'حالت تمام صفحه', - 'exit_fullscreen' => 'خروج از حالت تمام صفحه' + 'exit_fullscreen' => 'خروج از حالت تمام صفحه', + 'open_searchbox' => 'نمایش جستجو', + 'close_searchbox' => 'بستن جستجو', + 'open_replacebox' => 'نمایش جایگزینی', + 'close_replacebox' => 'بستن جایگزینی' ], 'asset' => [ 'menu_label' => "فایلها", @@ -272,6 +280,7 @@ 'uploading_file_num' => 'ارسال :number فایل(ها)...', 'uploading_complete' => 'ارسال انجام شد', 'uploading_error' => 'خطا در ارسال', + 'type_blocked' => 'نوع فایل استفاده شده به دلیل مسایل امنیتی مجاز نمی باشد..', 'order_by' => 'مرتب سازی با', 'folder' => 'پوشه', 'no_files_found' => 'فایلی با درخواست شما یافت نشد', diff --git a/modules/cms/lang/hu/lang.php b/modules/cms/lang/hu/lang.php index ace414c..4a6f7d6 100644 --- a/modules/cms/lang/hu/lang.php +++ b/modules/cms/lang/hu/lang.php @@ -60,19 +60,19 @@ 'manage_title' => 'Téma menedzselése', 'edit_properties_title' => 'Téma', 'edit_properties_button' => 'Tulajdonságok', - 'save_properties' => 'Tulajdonságok mentése', + 'save_properties' => 'Mentés', 'import_button' => 'Importálás', 'import_title' => 'Téma importálása', 'import_theme_success' => 'A téma importálása sikeresen megtörtént!', 'import_uploaded_file' => 'Téma archív fájl', 'import_overwrite_label' => 'Létező fájlok felülírása', - 'import_overwrite_comment' => 'Ne jelölje be ezt a négyzetet, ha csak új fájlok akar importálni.', + 'import_overwrite_comment' => 'Ne jelölje be ezt a négyzetet, ha csak új fájlokat akar importálni.', 'import_folders_label' => 'Könyvtárak', - 'import_folders_comment' => 'Válassza ki a téma könyvtárát, amiket importálni szeretne.', + 'import_folders_comment' => 'Válassza ki azokat a könyvtárakat, amiket importálni szeretne.', 'export_button' => 'Exportálás', 'export_title' => 'Téma exportálása', 'export_folders_label' => 'Könyvtárak', - 'export_folders_comment' => 'Válassza ki a téma könyvtárát, amiket exportálni szeretne.', + 'export_folders_comment' => 'Válassza ki azokat a könyvtárakat, amiket exportálni szeretne.', 'delete_button' => 'Törlés', 'delete_confirm' => 'Biztos, hogy törölni szeretné a témát?', 'delete_active_theme_failed' => 'Nem lehet törölni a témát. Először aktiváljon egy másik témát.', @@ -88,7 +88,7 @@ 'dir_name_taken' => 'A megadott könyvtár név már létezik.', 'find_more_themes' => 'További témák az OctoberCMS piacterén.', 'saving' => 'Téma mentése...', - 'return' => 'Vissza a sablonokhoz' + 'return' => 'Vissza a témákhoz' ], 'maintenance' => [ 'settings_menu' => 'Karbantartás', @@ -109,18 +109,19 @@ ], 'menu_label' => 'Lapok', 'unsaved_label' => 'Nem mentett lap(ok)', - 'no_list_records' => 'Nem találhatóak lapok', + 'no_list_records' => 'Nincs találat', 'new' => 'Új lap', 'invalid_url' => 'Érvénytelen a webcím formátuma. A webcímnek perjellel kell kezdődnie, és számokat, latin betűket, valamint a következő karaktereket tartalmazhatja: ._-[]:?|/+*', 'delete_confirm_multiple' => 'Valóban törölni akarja a kijelölt lapokat?', 'delete_confirm_single' => 'Valóban törölni akarja ezt a lapot?', - 'no_layout' => '-- nincs --' + 'no_layout' => '-- nincs --', + 'cms_page' => 'Lapok' ], 'layout' => [ 'not_found_name' => "A(z) ':name' elrendezés nem található", 'menu_label' => 'Elrendezések', 'unsaved_label' => 'Nem mentett elrendezés(ek)', - 'no_list_records' => 'Nem találhatók elrendezések', + 'no_list_records' => 'Nincs találat', 'new' => 'Új elrendezés', 'delete_confirm_multiple' => 'Valóban törölni akarja a kijelölt elrendezéseket?', 'delete_confirm_single' => 'Valóban törölni akarja ezt az elrendezést?' @@ -130,7 +131,7 @@ 'invalid_name' => 'Érvénytelen részlapnév: :name.', 'menu_label' => 'Részlapok', 'unsaved_label' => 'Nem mentett részlap(ok)', - 'no_list_records' => 'Nem találhatók részlapok', + 'no_list_records' => 'Nincs találat', 'delete_confirm_multiple' => 'Valóban törölni akarja a kijelölt részlapokat?', 'delete_confirm_single' => 'Valóban törölni akarja ezt a részlapot?', 'new' => 'Új részlap' @@ -139,7 +140,7 @@ 'not_found_name' => "A(z) ':name' tartalomfájl nem található.", 'menu_label' => 'Tartalom', 'unsaved_label' => 'Nem mentett tartalom', - 'no_list_records' => 'Nem találhatók tartalomfájlok', + 'no_list_records' => 'Nincs találat', 'delete_confirm_multiple' => 'Valóban törölni akarja a kijelölt tartalomfájlokat vagy könyvtárakat?', 'delete_confirm_single' => 'Valóban törölni akarja ezt a tartalomfájlt?', 'new' => 'Új tartalomfájl' @@ -219,6 +220,8 @@ 'error_moving_file' => 'Hiba a(z) :file fájl áthelyezésekor.', 'error_moving_directory' => 'Hiba a(z) :dir könyvtár áthelyezésekor.', 'error_deleting_directory' => 'Hiba a(z) :dir eredeti könyvtár áthelyezésekor.', + 'no_list_records' => 'Nincs találat', + 'delete_confirm' => 'Valóban törölni akarja a kiválasztott fájlokat és könyvtárakat?', 'path' => 'Elérési út' ], 'component' => [ @@ -236,7 +239,9 @@ 'template' => [ 'invalid_type' => 'Ismeretlen sablon típus.', 'not_found' => 'A kért sablon nem található.', - 'saved' => 'A módosítások sikeresen mentésre kerültek.' + 'saved' => 'A módosítások sikeresen mentésre kerültek.', + 'no_list_records' => 'Nincs találat', + 'delete_confirm' => 'Valóban törölni akarja a témát?' ], 'permissions' => [ 'name' => 'Testreszabás', @@ -249,6 +254,7 @@ 'manage_media' => 'Média kezelése' ], 'mediafinder' => [ + 'label' => 'Média', 'default_prompt' => 'Kattintson a(z) %s gombra új média fájl kereséséhez.' ], 'media' => [ diff --git a/modules/cms/lang/nb-no/lang.php b/modules/cms/lang/nb-no/lang.php index e9e6495..d574f00 100644 --- a/modules/cms/lang/nb-no/lang.php +++ b/modules/cms/lang/nb-no/lang.php @@ -10,12 +10,15 @@ 'invalid_file_extension' => 'Ugyldig filtype: :invalid. Tillatte filtyper er: :allowed.', 'error_deleting' => "Kunne ikke slette filen ':name'. Vennligst sjekk skriverettigheter på serveren.", 'delete_success' => 'Templates som ble slettet: :count.', - 'file_name_required' => 'Filnavnfeltet er obligatorisk.' + 'file_name_required' => 'Filnavnfeltet er obligatorisk.', + 'safe_mode_enabled' => 'Sikkert modus er aktivert.', ], 'dashboard' => [ 'active_theme' => [ - 'online' => 'online', - 'maintenance' => 'in maintenance', + 'widget_title_default' => 'Website', + 'online' => 'Online', + 'maintenance' => 'Vedlikeholdsmodus', + 'manage_themes' => 'Administrer temaer', ] ], 'theme' => [ @@ -31,6 +34,7 @@ ], 'settings_menu' => 'Frontend tema', 'settings_menu_description' => 'Forhåndsvis en liste over installerte temaer og velg et aktivt tema.', + 'default_tab' => 'Egenskaper', 'name_label' => 'Navn', 'name_create_placeholder' => 'Temanavn', 'author_label' => 'Forfatter', @@ -44,8 +48,10 @@ 'dir_name_label' => 'Mappenavn', 'dir_name_create_label' => 'Temaets mappenavn', 'theme_label' => 'Tema', + 'theme_title' => 'Temaer', 'activate_button' => 'Aktivér', 'active_button' => 'Aktivér', + 'customize_theme' => 'Tilpass tema', 'customize_button' => 'Tilpass', 'duplicate_button' => 'Duplisér', 'duplicate_title' => 'Duplisér tema', @@ -81,13 +87,15 @@ 'dir_name_invalid' => 'Navnet kan kun inneholde tall, latinske bokstaver og følgende symbol: _-', 'dir_name_taken' => 'Temamappen eksiterer allerede.', 'find_more_themes' => 'Finn flere temaer på OctoberCMS Theme Marketplace', + 'saving' => 'Lagrer tema...', 'return' => 'Tilbake til temaliste', ], 'maintenance' => [ 'settings_menu' => 'Vedlikeholdsmodus', 'settings_menu_description' => 'Konfigurer vedlikeholdsmodussiden og endre innstillinger.', 'is_enabled' => 'Aktivér vedlikeholdsmodus', - 'is_enabled_comment' => 'Når aktivert, vil besøkende se følgende side:' + 'is_enabled_comment' => 'Når aktivert, vil besøkende se følgende side:', + 'hint' => 'Vedlikeholdsmodus vil vise vedlikehodsmodussiden til besøkende som ikke er logget inn.', ], 'page' => [ 'not_found_name' => "Siden ':name' ble ikke funnet", @@ -165,7 +173,11 @@ 'hidden' => 'Skjult', 'hidden_comment' => 'Kun backend-brukere har tilgang til skjulte sider.', 'enter_fullscreen' => 'Fullskjermmodus', - 'exit_fullscreen' => 'Avslutt fullskjermmodus' + 'exit_fullscreen' => 'Avslutt fullskjermmodus', + 'open_searchbox' => 'Vis søkefelt', + 'close_searchbox' => 'Skjul søkefelt', + 'open_replacebox' => 'Vis erstatt-felt', + 'close_replacebox' => 'Skjul erstatt-felt' ], 'asset' => [ 'menu_label' => 'Ressurser', @@ -233,7 +245,11 @@ 'manage_pages' => 'Administrer sider', 'manage_layouts' => 'Administrer layouts', 'manage_partials' => 'Administrer partials', - 'manage_themes' => 'Administrer maler' + 'manage_themes' => 'Administrer maler', + 'manage_media' => 'Last opp og behandle media - bilder, video, lydfiler, dokumenter', + ], + 'mediafinder' => [ + 'default_prompt' => 'Klikk på %s knappen for å hente media' ], 'media' => [ 'invalid_path' => "Ugyldig filsti: ':path'.", @@ -263,6 +279,8 @@ 'multiple_selected' => 'Flere filer er valgt.', 'uploading_file_num' => 'Laster opp :number fil(er)...', 'uploading_complete' => 'Opplasting fullført', + 'uploading_error' => 'Opplasting feilet', + 'type_blocked' => 'Filtypen er blokkert av sikkerhetsgrunner.', 'order_by' => 'Sorter etter', 'folder' => 'Mappe', 'no_files_found' => 'Ingen filer ble funnet.', diff --git a/modules/cms/lang/nl/lang.php b/modules/cms/lang/nl/lang.php index 0622bec..91e15e4 100644 --- a/modules/cms/lang/nl/lang.php +++ b/modules/cms/lang/nl/lang.php @@ -95,6 +95,7 @@ 'settings_menu_description' => 'Instellingen voor de onderhoudsmodus pagina.', 'is_enabled' => 'Onderhoudsmodus inschakelen', 'is_enabled_comment' => 'Toon de volgende pagina als onderhoudsmodus is ingeschakeld:', + 'hint' => 'Onderhoudsmodus zal de onderhoudspagina tonen aan bezoekers die niet ingelogd zijn in het CMS.', ], 'page' => [ 'not_found_name' => 'De pagina \':name\' is niet gevonden.', diff --git a/modules/cms/lang/tr/lang.php b/modules/cms/lang/tr/lang.php index acab437..98e0201 100644 --- a/modules/cms/lang/tr/lang.php +++ b/modules/cms/lang/tr/lang.php @@ -10,12 +10,15 @@ 'invalid_file_extension'=>'Hatalı dosya uzantısı: :invalid. İzin verilen uzantılar: :allowed.', 'error_deleting' => '":name" şablon dosyası silinirken hatayla karşılaşıldı.', 'delete_success' => ':count şablon başarıyla silindi.', - 'file_name_required' => 'Dosya adı alanı gereklidir.' + 'file_name_required' => 'Dosya adı alanı gereklidir.', + 'safe_mode_enabled' => 'Güvenli mod şuan aktif.', ], 'dashboard' => [ 'active_theme' => [ + 'widget_title_default' => 'Website', 'online' => 'yayında', 'maintenance' => 'bakım modunda', + 'manage_themes' => 'Temaları yönet', ] ], 'theme' => [ @@ -91,7 +94,8 @@ 'settings_menu' => 'Bakım modu', 'settings_menu_description' => 'Bakım modu ayarlarını düzenleyip bakım sayfasını yapılandırabilirsiniz.', 'is_enabled' => 'Bakım modunu aktifleştir', - 'is_enabled_comment' => 'Aktifleştirildiğinde, web sitesi ziyaretçileri aşağıdaki seçtiğiniz sayfayı görecektir.' + 'is_enabled_comment' => 'Aktifleştirildiğinde, web sitesi ziyaretçileri aşağıdaki seçtiğiniz sayfayı görecektir.', + 'hint' => 'Bakımda sayfası, yönetim paneli girişi yapmamış tüm ziyaretçilere seçilen bakımda sayfasını gösterir.', ], 'page' => [ 'not_found_name' => "':name' sayfası bulunamadı", @@ -169,7 +173,11 @@ 'hidden' => 'Gizli', 'hidden_comment' => 'Gizli sayfalara yalnızca Yönetim Paneline giriş yapmış kullanıcılar erişilebilir.', 'enter_fullscreen' => 'Tam Ekran moduna geç', - 'exit_fullscreen' => 'Tam Ekran modundan çık' + 'exit_fullscreen' => 'Tam Ekran modundan çık', + 'open_searchbox' => 'Arama kutusunu aç', + 'close_searchbox' => 'Arama kutusunu kapat', + 'open_replacebox' => 'Düzenleme kutusunu aç', + 'close_replacebox' => 'Düzenleme kutusunu kapat' ], 'asset' => [ 'menu_label' => "Dosyalar", @@ -272,6 +280,7 @@ 'uploading_file_num' => ':number adet dosya yükleniyor...', 'uploading_complete' => 'Yükleme tamamlandı', 'uploading_error' => 'Yükleme hatası', + 'type_blocked' => 'Seçilen dosya türünü güvenlik nedenleriyle izin verilmiyor.', 'order_by' => 'Sırala', 'folder' => 'Klasör', 'no_files_found' => 'İsteğiniz doğrultusunda hiçbir dosya bulunamadı.', diff --git a/modules/cms/widgets/AssetList.php b/modules/cms/widgets/AssetList.php index dc4c843..744f997 100644 --- a/modules/cms/widgets/AssetList.php +++ b/modules/cms/widgets/AssetList.php @@ -42,12 +42,12 @@ class AssetList extends WidgetBase /** * @var string Message to display when there are no records in the list. */ - public $noRecordsMessage = 'No files found'; + public $noRecordsMessage = 'cms::lang.asset.no_list_records'; /** * @var string Message to display when the Delete button is clicked. */ - public $deleteConfirmation = 'Delete selected files or directories?'; + public $deleteConfirmation = 'cms::lang.asset.delete_confirm'; public function __construct($controller, $alias) { @@ -177,9 +177,9 @@ public function onDeleteFiles() } return [ - 'deleted'=>$deleted, - 'error'=>$error, - 'theme'=>Request::input('theme') + 'deleted' => $deleted, + 'error' => $error, + 'theme' => Request::input('theme') ]; } @@ -194,6 +194,7 @@ public function onLoadRenamePopup() $this->vars['originalPath'] = $path; $this->vars['name'] = basename($path); + return $this->makePartial('rename_form'); } @@ -294,6 +295,7 @@ public function onLoadMovePopup() $this->vars['directories'] = $directories; $this->vars['selectedList'] = base64_encode(serialize(array_keys($selectedList))); + return $this->makePartial('move_form'); } @@ -676,10 +678,10 @@ protected function findFiles() if ($this->pathMatchesSearch($words, $path)) { $result[] = (object)[ - 'type'=>'file', - 'path'=>File::normalizePath($path), - 'name'=>$item->getFilename(), - 'editable'=>in_array(strtolower($item->getExtension()), $editableAssetTypes) + 'type' => 'file', + 'path' => File::normalizePath($path), + 'name' => $item->getFilename(), + 'editable' => in_array(strtolower($item->getExtension()), $editableAssetTypes) ]; } } diff --git a/modules/cms/widgets/ComponentList.php b/modules/cms/widgets/ComponentList.php index 2fc38cb..8c04860 100644 --- a/modules/cms/widgets/ComponentList.php +++ b/modules/cms/widgets/ComponentList.php @@ -41,13 +41,6 @@ public function render() ]); } - /** - * Returns information about this widget, including name and description. - */ - public function widgetDetails() - { - } - /* * Event handlers */ diff --git a/modules/cms/widgets/TemplateList.php b/modules/cms/widgets/TemplateList.php index 61f49f6..3c230a1 100644 --- a/modules/cms/widgets/TemplateList.php +++ b/modules/cms/widgets/TemplateList.php @@ -47,12 +47,12 @@ class TemplateList extends WidgetBase /** * @var string Message to display when there are no records in the list. */ - public $noRecordsMessage = 'No records found'; + public $noRecordsMessage = 'cms::lang.template.no_list_records'; /** * @var string Message to display when the Delete button is clicked. */ - public $deleteConfirmation = 'Delete selected templates?'; + public $deleteConfirmation = 'cms::lang.template.delete_confirm'; /** * @var string Specifies the item type. diff --git a/modules/cms/widgets/assetlist/partials/_items.htm b/modules/cms/widgets/assetlist/partials/_items.htm index 3d1a5a4..72fd066 100644 --- a/modules/cms/widgets/assetlist/partials/_items.htm +++ b/modules/cms/widgets/assetlist/partials/_items.htm @@ -27,8 +27,8 @@
path) ?> - - \ No newline at end of file + diff --git a/modules/system/assets/css/eventlogs/exception-beautifier.css b/modules/system/assets/css/eventlogs/exception-beautifier.css index 60c26a8..0307ffb 100644 --- a/modules/system/assets/css/eventlogs/exception-beautifier.css +++ b/modules/system/assets/css/eventlogs/exception-beautifier.css @@ -115,14 +115,17 @@ color: #2196F3; } +.plugin-exception-beautifier .beautifier-formatted-content, .plugin-exception-beautifier .beautifier-raw-content { background: #fff; - font-family: monospace; padding: 20px; - white-space: nowrap; +} - width: 100%; +.plugin-exception-beautifier .beautifier-raw-content { + font-family: monospace; + white-space: nowrap; overflow: auto; + width: 100%; } .plugin-exception-beautifier .beautifier-raw-content br { diff --git a/modules/system/assets/css/framework.extras.css b/modules/system/assets/css/framework.extras.css index 05a0050..5055da4 100644 --- a/modules/system/assets/css/framework.extras.css +++ b/modules/system/assets/css/framework.extras.css @@ -23,8 +23,8 @@ body.oc-loading * { } .stripe-loading-indicator .stripe { width: 100%; - -webkit-animation: infinite-loader 60s linear; - animation: infinite-loader 60s linear; + -webkit-animation: oc-infinite-loader 60s linear; + animation: oc-infinite-loader 60s linear; } .stripe-loading-indicator .stripe-loaded { width: 0; @@ -49,9 +49,150 @@ body.oc-loading * { .stripe-loading-indicator.hide { display: none; } -@-moz-keyframes infinite-loader { +body > p.flash-message { + position: fixed; + width: 500px; + left: 50%; + top: 13px; + margin-left: -250px; + color: #ffffff; + font-size: 14px; + padding: 10px 30px 10px 15px; + z-index: 10300; + word-wrap: break-word; + text-shadow: 0 -1px 0px rgba(0, 0, 0, 0.15); + text-align: center; + -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +body > p.flash-message.fade { + opacity: 0; + filter: alpha(opacity=0); + -webkit-transition: all 0.5s, width 0s; + transition: all 0.5s, width 0s; + -webkit-transform: scale(0.9); + -ms-transform: scale(0.9); + transform: scale(0.9); +} +body > p.flash-message.fade.in { + opacity: 1; + filter: alpha(opacity=100); + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); +} +body > p.flash-message.success { + background: #8da85e; +} +body > p.flash-message.error { + background: #cc3300; +} +body > p.flash-message.warning { + background: #f0ad4e; +} +body > p.flash-message.info { + background: #5fb6f5; +} +body > p.flash-message button.close { + float: none; + position: absolute; + right: 10px; + top: 8px; + color: white; + font-size: 21px; + line-height: 1; + font-weight: bold; + opacity: 0.2; + filter: alpha(opacity=20); + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + outline: none; +} +body > p.flash-message button.close:hover, +body > p.flash-message button.close:focus { + color: white; + text-decoration: none; + cursor: pointer; + opacity: 0.5; + filter: alpha(opacity=50); +} +@media (max-width: 768px) { + body > p.flash-message { + left: 10px; + right: 10px; + top: 10px; + margin-left: 0; + width: auto; + } +} +[data-request][data-request-validate] [data-validate-for]:not(.visible), +[data-request][data-request-validate] [data-validate-error]:not(.visible) { + display: none; +} +a.oc-loading:after, +button.oc-loading:after { + content: ''; + display: inline-block; + vertical-align: middle; + margin-left: .4em; + height: 1em; + width: 1em; + animation: oc-rotate-loader 0.8s infinite linear; + border: .2em solid currentColor; + border-right-color: transparent; + border-radius: 50%; + opacity: 0.5; + filter: alpha(opacity=50); +} +@-moz-keyframes oc-rotate-loader { + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(360deg); + } +} +@-webkit-keyframes oc-rotate-loader { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + } +} +@-o-keyframes oc-rotate-loader { + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(360deg); + } +} +@-ms-keyframes oc-rotate-loader { + 0% { + -ms-transform: rotate(0deg); + } + 100% { + -ms-transform: rotate(360deg); + } +} +@keyframes oc-rotate-loader { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@-moz-keyframes oc-infinite-loader { 0% { - width: 0%; + width: 0; } 10% { width: 42%; @@ -84,9 +225,9 @@ body.oc-loading * { width: 99.9423761471391%; } } -@-webkit-keyframes infinite-loader { +@-webkit-keyframes oc-infinite-loader { 0% { - width: 0%; + width: 0; } 10% { width: 42%; @@ -119,9 +260,9 @@ body.oc-loading * { width: 99.9423761471391%; } } -@-o-keyframes infinite-loader { +@-o-keyframes oc-infinite-loader { 0% { - width: 0%; + width: 0; } 10% { width: 42%; @@ -154,9 +295,9 @@ body.oc-loading * { width: 99.9423761471391%; } } -@-ms-keyframes infinite-loader { +@-ms-keyframes oc-infinite-loader { 0% { - width: 0%; + width: 0; } 10% { width: 42%; @@ -189,9 +330,9 @@ body.oc-loading * { width: 99.9423761471391%; } } -@keyframes infinite-loader { +@keyframes oc-infinite-loader { 0% { - width: 0%; + width: 0; } 10% { width: 42%; diff --git a/modules/system/assets/css/styles.css b/modules/system/assets/css/styles.css index e763eaf..712f1a5 100644 --- a/modules/system/assets/css/styles.css +++ b/modules/system/assets/css/styles.css @@ -793,7 +793,7 @@ address{margin-bottom:20px;font-style:normal;line-height:1.42857143} .oc-icon-stumbleupon:before,.icon-stumbleupon:before{content:"\f1a4"} .oc-icon-delicious:before,.icon-delicious:before{content:"\f1a5"} .oc-icon-digg:before,.icon-digg:before{content:"\f1a6"} -.oc-icon-pied-piper:before,.icon-pied-piper:before{content:"\f1a7"} +.oc-icon-pied-piper-pp:before,.icon-pied-piper-pp:before{content:"\f1a7"} .oc-icon-pied-piper-alt:before,.icon-pied-piper-alt:before{content:"\f1a8"} .oc-icon-drupal:before,.icon-drupal:before{content:"\f1a9"} .oc-icon-joomla:before,.icon-joomla:before{content:"\f1aa"} @@ -831,7 +831,7 @@ address{margin-bottom:20px;font-style:normal;line-height:1.42857143} .oc-icon-jsfiddle:before,.icon-jsfiddle:before{content:"\f1cc"} .oc-icon-life-bouy:before,.icon-life-bouy:before,.oc-icon-life-buoy:before,.icon-life-buoy:before,.oc-icon-life-saver:before,.icon-life-saver:before,.oc-icon-support:before,.icon-support:before,.oc-icon-life-ring:before,.icon-life-ring:before{content:"\f1cd"} .oc-icon-circle-o-notch:before,.icon-circle-o-notch:before{content:"\f1ce"} -.oc-icon-ra:before,.icon-ra:before,.oc-icon-rebel:before,.icon-rebel:before{content:"\f1d0"} +.oc-icon-ra:before,.icon-ra:before,.oc-icon-resistance:before,.icon-resistance:before,.oc-icon-rebel:before,.icon-rebel:before{content:"\f1d0"} .oc-icon-ge:before,.icon-ge:before,.oc-icon-empire:before,.icon-empire:before{content:"\f1d1"} .oc-icon-git-square:before,.icon-git-square:before{content:"\f1d2"} .oc-icon-git:before,.icon-git:before{content:"\f1d3"} @@ -995,6 +995,55 @@ address{margin-bottom:20px;font-style:normal;line-height:1.42857143} .oc-icon-vimeo:before,.icon-vimeo:before{content:"\f27d"} .oc-icon-black-tie:before,.icon-black-tie:before{content:"\f27e"} .oc-icon-fonticons:before,.icon-fonticons:before{content:"\f280"} +.oc-icon-reddit-alien:before,.icon-reddit-alien:before{content:"\f281"} +.oc-icon-edge:before,.icon-edge:before{content:"\f282"} +.oc-icon-credit-card-alt:before,.icon-credit-card-alt:before{content:"\f283"} +.oc-icon-codiepie:before,.icon-codiepie:before{content:"\f284"} +.oc-icon-modx:before,.icon-modx:before{content:"\f285"} +.oc-icon-fort-awesome:before,.icon-fort-awesome:before{content:"\f286"} +.oc-icon-usb:before,.icon-usb:before{content:"\f287"} +.oc-icon-product-hunt:before,.icon-product-hunt:before{content:"\f288"} +.oc-icon-mixcloud:before,.icon-mixcloud:before{content:"\f289"} +.oc-icon-scribd:before,.icon-scribd:before{content:"\f28a"} +.oc-icon-pause-circle:before,.icon-pause-circle:before{content:"\f28b"} +.oc-icon-pause-circle-o:before,.icon-pause-circle-o:before{content:"\f28c"} +.oc-icon-stop-circle:before,.icon-stop-circle:before{content:"\f28d"} +.oc-icon-stop-circle-o:before,.icon-stop-circle-o:before{content:"\f28e"} +.oc-icon-shopping-bag:before,.icon-shopping-bag:before{content:"\f290"} +.oc-icon-shopping-basket:before,.icon-shopping-basket:before{content:"\f291"} +.oc-icon-hashtag:before,.icon-hashtag:before{content:"\f292"} +.oc-icon-bluetooth:before,.icon-bluetooth:before{content:"\f293"} +.oc-icon-bluetooth-b:before,.icon-bluetooth-b:before{content:"\f294"} +.oc-icon-percent:before,.icon-percent:before{content:"\f295"} +.oc-icon-gitlab:before,.icon-gitlab:before{content:"\f296"} +.oc-icon-wpbeginner:before,.icon-wpbeginner:before{content:"\f297"} +.oc-icon-wpforms:before,.icon-wpforms:before{content:"\f298"} +.oc-icon-envira:before,.icon-envira:before{content:"\f299"} +.oc-icon-universal-access:before,.icon-universal-access:before{content:"\f29a"} +.oc-icon-wheelchair-alt:before,.icon-wheelchair-alt:before{content:"\f29b"} +.oc-icon-question-circle-o:before,.icon-question-circle-o:before{content:"\f29c"} +.oc-icon-blind:before,.icon-blind:before{content:"\f29d"} +.oc-icon-audio-description:before,.icon-audio-description:before{content:"\f29e"} +.oc-icon-volume-control-phone:before,.icon-volume-control-phone:before{content:"\f2a0"} +.oc-icon-braille:before,.icon-braille:before{content:"\f2a1"} +.oc-icon-assistive-listening-systems:before,.icon-assistive-listening-systems:before{content:"\f2a2"} +.oc-icon-asl-interpreting:before,.icon-asl-interpreting:before,.oc-icon-american-sign-language-interpreting:before,.icon-american-sign-language-interpreting:before{content:"\f2a3"} +.oc-icon-deafness:before,.icon-deafness:before,.oc-icon-hard-of-hearing:before,.icon-hard-of-hearing:before,.oc-icon-deaf:before,.icon-deaf:before{content:"\f2a4"} +.oc-icon-glide:before,.icon-glide:before{content:"\f2a5"} +.oc-icon-glide-g:before,.icon-glide-g:before{content:"\f2a6"} +.oc-icon-signing:before,.icon-signing:before,.oc-icon-sign-language:before,.icon-sign-language:before{content:"\f2a7"} +.oc-icon-low-vision:before,.icon-low-vision:before{content:"\f2a8"} +.oc-icon-viadeo:before,.icon-viadeo:before{content:"\f2a9"} +.oc-icon-viadeo-square:before,.icon-viadeo-square:before{content:"\f2aa"} +.oc-icon-snapchat:before,.icon-snapchat:before{content:"\f2ab"} +.oc-icon-snapchat-ghost:before,.icon-snapchat-ghost:before{content:"\f2ac"} +.oc-icon-snapchat-square:before,.icon-snapchat-square:before{content:"\f2ad"} +.oc-icon-pied-piper:before,.icon-pied-piper:before{content:"\f2ae"} +.oc-icon-first-order:before,.icon-first-order:before{content:"\f2b0"} +.oc-icon-yoast:before,.icon-yoast:before{content:"\f2b1"} +.oc-icon-themeisle:before,.icon-themeisle:before{content:"\f2b2"} +.oc-icon-google-plus-circle:before,.icon-google-plus-circle:before,.oc-icon-google-plus-official:before,.icon-google-plus-official:before{content:"\f2b3"} +.oc-icon-fa:before,.icon-fa:before,.oc-icon-font-awesome:before,.icon-font-awesome:before{content:"\f2b4"} .close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20)} .close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)} button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none} diff --git a/modules/system/assets/css/updates/details.css b/modules/system/assets/css/updates/details.css index d0f782b..0722d9f 100644 --- a/modules/system/assets/css/updates/details.css +++ b/modules/system/assets/css/updates/details.css @@ -5,16 +5,16 @@ margin-top: 0; } .plugin-details-content h1 { - font-size: 31px; + font-size: 28px; } .plugin-details-content h2 { - font-size: 26px; + font-size: 24px; } .plugin-details-content h3 { - font-size: 22px; + font-size: 20px; } .plugin-details-content h4 { - font-size: 18px; + font-size: 17px; } .plugin-details-content h1, .plugin-details-content h2 { @@ -23,12 +23,12 @@ } .plugin-details-content ul, .plugin-details-content ol { - padding-left: 25px; + padding-left: 20px; } .plugin-details-content pre { display: block; border: none; - padding: 10px 10px 10px 25px; + padding: 10px 10px 10px 20px; font-size: 13px; word-break: break-all; word-wrap: break-word; @@ -36,8 +36,8 @@ background-color: #333; margin-top: 10px; margin-bottom: 20px; - margin-left: -25px; - margin-right: -25px; + margin-left: -20px; + margin-right: -20px; } .plugin-details-content pre code { padding: 0; @@ -49,21 +49,36 @@ } .plugin-details-content ul pre, .plugin-details-content ol pre { - margin-left: -50px; - padding-left: 50px; + margin-left: -40px; + padding-left: 40px; } .plugin-details-content table th { - font-weight: bold + font-weight: bold; } .plugin-details-content table th, .plugin-details-content table td { - padding: 6px 13px; - border: 1px solid #ddd + padding: 6px 13px; + border: 1px solid #ddd; } .plugin-details-content table tr { - background-color: #fff; - border-top: 1px solid #ccc + background-color: #fff; + border-top: 1px solid #ccc; } .plugin-details-content table tr:nth-child(2n) { - background-color: #f8f8f8 -} \ No newline at end of file + background-color: #f8f8f8; +} +.plugin-details-content dl dt, +.plugin-details-content dl dd { + margin-bottom: 10px; +} +.plugin-details-content dl dt { + width: 75px; + float: left; + text-align: right; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} +.plugin-details-content dl dd { + margin-left: 85px; +} diff --git a/modules/system/assets/css/updates/install.css b/modules/system/assets/css/updates/install.css index 3d687ef..48a1458 100644 --- a/modules/system/assets/css/updates/install.css +++ b/modules/system/assets/css/updates/install.css @@ -70,6 +70,8 @@ border: 1px solid #E6E9E9; background: #fff; position: relative; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; border-radius: 3px; -webkit-transition: border .2s linear; -moz-transition: border .2s linear; diff --git a/modules/system/assets/css/updates/updates.css b/modules/system/assets/css/updates/updates.css index f9e99dc..3de4192 100644 --- a/modules/system/assets/css/updates/updates.css +++ b/modules/system/assets/css/updates/updates.css @@ -3,7 +3,7 @@ } .control-updatelist { border: 1px solid #ccc; - margin-bottom: 21px; + margin-bottom: 20px; } .control-updatelist .update-item { border-bottom: 1px solid #ccc; @@ -80,7 +80,9 @@ text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: .25em; + -webkit-border-radius: 0.25em; + -moz-border-radius: 0.25em; + border-radius: 0.25em; } .control-updatelist .update-item:last-child { border-bottom: none; diff --git a/modules/system/assets/js/eventlogs/exception-beautifier.js b/modules/system/assets/js/eventlogs/exception-beautifier.js index b0915a0..8353aa6 100644 --- a/modules/system/assets/js/eventlogs/exception-beautifier.js +++ b/modules/system/assets/js/eventlogs/exception-beautifier.js @@ -324,8 +324,12 @@ '
' + '
') + if (source.indexOf('Message-ID:') > 0) { + markup = '
' + source.trim().replace(/\r\n|\r|\n/g, '
').replace(/ {2}/g, '  ') + '
' + } + tabs.find('#beautifier-tab-formatted').append(markup) - tabs.find('#beautifier-tab-raw').append('
' + source.trim().replace(/\r\n|\r|\n/g, '
').replace(/ {2}/g, '  ') + '
') + tabs.find('#beautifier-tab-raw').append('
' + $.oc.escapeHtmlString(source.trim()).replace(/\r\n|\r|\n/g, '
').replace(/ {2}/g, '  ') + '
') tabs.ocTab({closable: false}) @@ -358,4 +362,4 @@ $('[data-plugin="exception-beautifier"]').exceptionBeautifier() }) -}(window.jQuery) \ No newline at end of file +}(window.jQuery) diff --git a/modules/system/assets/js/framework.extras.js b/modules/system/assets/js/framework.extras.js index c7d9d5b..810fd38 100644 --- a/modules/system/assets/js/framework.extras.js +++ b/modules/system/assets/js/framework.extras.js @@ -5,23 +5,123 @@ * Copyright 2016 Alexey Bobkov, Samuel Georges * ======================================================================== */ -/* - * The stripe loading indicator. - * - * Displays the animated loading indicator stripe at the top of the page. - * - * JavaScript API: - * $.oc.stripeLoadIndicator.show(event) - * $.oc.stripeLoadIndicator.hide() - * - * By default if the show() method has been called several times, the hide() method should be - * called the same number of times in order to hide the stripe. Use hide(true) to hide the - * indicator forcibly. - */ +function ($) { "use strict"; if ($.oc === undefined) $.oc = {} + // @todo Provide an interface for configuration + // - Custom loader CSS class + // - Custom stripe loader color + + var LOADER_CLASS = 'oc-loading'; + + // FLASH HANDLING + // ============================ + + $(document).on('ajaxError', '[data-request][data-request-flash]', function(event, context, message) { + if (!event.isDefaultPrevented() && message) { + $.oc.flashMsg({ text: message, class: 'error' }) + event.preventDefault() + } + }) + + $(document).on('ajaxBeforeUpdate', '[data-request][data-request-flash]', function(event, context, data) { + if (data['X_OCTOBER_FLASH_MESSAGES']) { + $.each(data['X_OCTOBER_FLASH_MESSAGES'], function(type, message) { + $.oc.flashMsg({ text: message, class: type }) + }) + } + }) + + // FORM VALIDATION + // ============================ + + $(document).on('ajaxValidation', '[data-request][data-request-validate]', function(event, context, errorMsg, fields) { + var $this = $(this).closest('form'), + $container = $('[data-validate-error]', $this), + messages = [], + $field + + $.each(fields, function(fieldName, fieldMessages) { + $field = $('[data-validate-for='+fieldName+']', $this) + messages = $.merge(messages, fieldMessages) + if (!!$field.length) { + if (!$field.text().length || $field.data('emptyMode') == true) { + $field + .data('emptyMode', true) + .text(fieldMessages.join(', ')) + } + $field.addClass('visible') + } + }) + + if (!!$container.length) { + var $oldMessages = $('[data-message]', $container) + $container.addClass('visible') + + if (!!$oldMessages.length) { + var $clone = $oldMessages.first() + + $.each(messages, function(key, message) { + $clone.clone().text(message).insertAfter($clone) + }) + + $oldMessages.remove() + } + else { + $container.text(errorMsg) + } + } + + $this.one('ajaxError', function(event){ + event.preventDefault() + }) + }) + + $(document).on('ajaxPromise', '[data-request][data-request-validate]', function() { + var $this = $(this).closest('form') + $('[data-validate-for]', $this).removeClass('visible') + $('[data-validate-error]', $this).removeClass('visible') + }) + + // LOADING BUTTONS + // ============================ + + $(document) + .on('ajaxPromise', '[data-request]', function() { + var $target = $(this) + + if ($target.data('attach-loading') !== undefined) { + $target + .addClass(LOADER_CLASS) + .prop('disabled', true) + } + + if ($target.is('form')) { + $('[data-attach-loading]', $target) + .addClass(LOADER_CLASS) + .prop('disabled', true) + } + }) + .on('ajaxFail ajaxDone', '[data-request]', function() { + var $target = $(this) + + if ($target.data('attach-loading') !== undefined) { + $target + .removeClass(LOADER_CLASS) + .prop('disabled', false) + } + + if ($target.is('form')) { + $('[data-attach-loading]', $target) + .removeClass(LOADER_CLASS) + .prop('disabled', false) + } + }) + + // STRIPE LOAD INDICATOR + // ============================ + var StripeLoadIndicator = function() { var self = this this.counter = 0 @@ -41,8 +141,9 @@ // Restart the animation this.stripe.after(this.stripe = this.stripe.clone()).remove() - if (this.counter > 1) + if (this.counter > 1) { return + } this.indicator.removeClass('loaded') $(document.body).addClass('oc-loading') @@ -50,8 +151,10 @@ StripeLoadIndicator.prototype.hide = function(force) { this.counter-- - if (force !== undefined && force) + + if (force !== undefined && force) { this.counter = 0 + } if (this.counter <= 0) { this.indicator.addClass('loaded') @@ -62,7 +165,7 @@ $.oc.stripeLoadIndicator = new StripeLoadIndicator() // STRIPE LOAD INDICATOR DATA-API - // ============== + // ============================ $(document) .on('ajaxPromise', '[data-request]', function(event) { @@ -79,9 +182,75 @@ if ($el.closest('html').length === 0) $.oc.stripeLoadIndicator.hide() }) - }).on('ajaxFail ajaxDone', '[data-request]', function(event) { + }) + .on('ajaxFail ajaxDone', '[data-request]', function(event) { event.stopPropagation() $.oc.stripeLoadIndicator.hide() }) + // FLASH MESSAGE + // ============================ + + var FlashMessage = function (options, el) { + var + options = $.extend({}, FlashMessage.DEFAULTS, options), + $element = $(el) + + $('body > p.flash-message').remove() + + if ($element.length == 0) { + $element = $('

').addClass(options.class).html(options.text) + } + + $element + .addClass('flash-message fade') + .attr('data-control', null) + .on('click', 'button', remove) + .on('click', remove) + .append('') + + $(document.body).append($element) + + setTimeout(function() { + $element.addClass('in') + }, 100) + + var timer = window.setTimeout(remove, options.interval * 1000) + + function removeElement() { + $element.remove() + } + + function remove() { + window.clearInterval(timer) + + $element.removeClass('in') + $.support.transition && $element.hasClass('fade') + ? $element + .one($.support.transition.end, removeElement) + .emulateTransitionEnd(500) + : removeElement() + } + } + + FlashMessage.DEFAULTS = { + class: 'success', + text: 'Default text', + interval: 2 + } + + if ($.oc === undefined) + $.oc = {} + + $.oc.flashMsg = FlashMessage + + // FLASH MESSAGE DATA-API + // =============== + + $(document).render(function(){ + $('[data-control=flash-message]').each(function(){ + $.oc.flashMsg($(this).data(), this) + }) + }) + }(window.jQuery); diff --git a/modules/system/assets/js/framework.js b/modules/system/assets/js/framework.js index fba03a8..9b35005 100644 --- a/modules/system/assets/js/framework.js +++ b/modules/system/assets/js/framework.js @@ -80,12 +80,19 @@ if (window.jQuery === undefined) if (options.data !== undefined && !$.isEmptyObject(options.data)) data.push($.param(options.data)) + var requestHeaders = { + 'X-OCTOBER-REQUEST-HANDLER': handler, + 'X-OCTOBER-REQUEST-PARTIALS': this.extractPartials(options.update) + } + + if (options.flash !== undefined) { + requestHeaders['X-OCTOBER-REQUEST-FLASH'] = 1 + } + var requestOptions = { + url: window.location.href, context: context, - headers: { - 'X-OCTOBER-REQUEST-HANDLER': handler, - 'X-OCTOBER-REQUEST-PARTIALS': this.extractPartials(options.update) - }, + headers: requestHeaders, success: function(data, textStatus, jqXHR) { /* * Halt here if beforeUpdate() or data-request-before-update returns false @@ -148,13 +155,13 @@ if (window.jQuery === undefined) * Trigger 'ajaxError' on the form, halt if event.preventDefault() is called */ var _event = jQuery.Event('ajaxError') - $triggerEl.trigger(_event, [context, textStatus, jqXHR]) + $triggerEl.trigger(_event, [context, errorMsg, textStatus, jqXHR]) if (_event.isDefaultPrevented()) return /* * Halt here if the data-request-error attribute returns false */ - if (options.evalError && eval('(function($el, context, textStatus, jqXHR) {'+options.evalError+'}.call($el.get(0), $el, context, textStatus, jqXHR))') === false) + if (options.evalError && eval('(function($el, context, errorMsg, textStatus, jqXHR) {'+options.evalError+'}.call($el.get(0), $el, context, errorMsg, textStatus, jqXHR))') === false) return requestOptions.handleErrorMessage(errorMsg) @@ -228,6 +235,8 @@ if (window.jQuery === undefined) * Focus fields with errors */ if (data['X_OCTOBER_ERROR_FIELDS']) { + $triggerEl.trigger('ajaxValidation', [context, data['X_OCTOBER_ERROR_MESSAGE'], data['X_OCTOBER_ERROR_FIELDS']]) + var isFirstInvalidField = true $.each(data['X_OCTOBER_ERROR_FIELDS'], function focusErrorField(fieldName, fieldMessages) { var fieldElement = $form.find('[name="'+fieldName+'"], [name="'+fieldName+'[]"], [name$="['+fieldName+']"], [name$="['+fieldName+'][]"]').filter(':enabled').first() @@ -250,8 +259,9 @@ if (window.jQuery === undefined) if (data['X_OCTOBER_ASSETS']) { assetManager.load(data['X_OCTOBER_ASSETS'], $.proxy(updatePromise.resolve, updatePromise)) } - else + else { updatePromise.resolve() + } return updatePromise } @@ -328,6 +338,7 @@ if (window.jQuery === undefined) confirm: $this.data('request-confirm'), redirect: $this.data('request-redirect'), loading: $this.data('request-loading'), + flash: $this.data('request-flash'), update: paramToObj('data-request-update', $this.data('request-update')), data: paramToObj('data-request-data', $this.data('request-data')) } diff --git a/modules/system/assets/js/lang/lang.fa.js b/modules/system/assets/js/lang/lang.fa.js index 9e96ca0..209c1b5 100644 --- a/modules/system/assets/js/lang/lang.fa.js +++ b/modules/system/assets/js/lang/lang.fa.js @@ -5,7 +5,7 @@ if ($.oc === undefined) $.oc = {} if ($.oc.langMessages === undefined) $.oc.langMessages = {} $.oc.langMessages['fa'] = $.extend( $.oc.langMessages['fa'] || {}, - {"markdowneditor":{"formatting":"\u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc","quote":"\u0646\u0642\u0644 \u0642\u0648\u0644","code":"\u06a9\u062f","header1":"\u0633\u0631\u062e\u0637 1","header2":"\u0633\u0631\u062e\u0637 2","header3":"\u0633\u0631\u062e\u0637 3","header4":"\u0633\u0631\u062e\u0637 4","header5":"\u0633\u0631\u062e\u0637 5","header6":"\u0633\u0631\u062e\u0637 6","bold":"\u0638\u062e\u06cc\u0645","italic":"\u0645\u0648\u0631\u0628","unorderedlist":"\u0644\u06cc\u0633\u062a \u0628\u062f\u0648\u0646 \u062a\u0631\u062a\u06cc\u0628","orderedlist":"\u0644\u06cc\u0633\u062a \u0628\u0627 \u062a\u0631\u062a\u06cc\u0628","video":"\u0648\u06cc\u062f\u06cc\u0648","image":"\u062a\u0635\u0648\u06cc\u0631","link":"\u0644\u06cc\u0646\u06a9","horizontalrule":"\u062f\u0631\u062c \u062e\u0637 \u0627\u0641\u0642\u06cc","fullscreen":"\u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647","preview":"\u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634"},"mediamanager":{"insert_link":"\u062f\u0631\u062c \u0622\u062f\u0631\u0633 \u0631\u0633\u0627\u0646\u0647","insert_image":"\u062f\u0631\u062c \u062a\u0635\u0648\u06cc\u0631","insert_video":"\u062f\u0631\u062c \u0648\u06cc\u062f\u06cc\u0648","insert_audio":"\u062f\u0631\u062c \u0635\u0648\u062a","invalid_file_empty_insert":"\u0644\u0637\u0641\u0627 \u0641\u0627\u06cc\u0644\u06cc \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0644\u06cc\u0646\u06a9 \u0622\u0646 \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f","invalid_file_single_insert":"\u0644\u0637\u0641\u0627 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0631\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f","invalid_image_empty_insert":"\u0644\u0637\u0641\u0627 \u062a\u0635\u0648\u06cc\u0631(\u0647\u0627) \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f","invalid_video_empty_insert":"\u0644\u0637\u0641\u0627 \u0648\u06cc\u062f\u06cc\u0648 \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f.","invalid_audio_empty_insert":"\u0644\u0637\u0641\u0627 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f"},"alert":{"confirm_button_text":"\u062a\u0627\u06cc\u06cc\u062f","cancel_button_text":"\u0627\u0646\u0635\u0631\u0627\u0641","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"filter":{"group":{"all":"all"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}} + {"markdowneditor":{"formatting":"\u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc","quote":"\u0646\u0642\u0644 \u0642\u0648\u0644","code":"\u06a9\u062f","header1":"\u0633\u0631\u062e\u0637 1","header2":"\u0633\u0631\u062e\u0637 2","header3":"\u0633\u0631\u062e\u0637 3","header4":"\u0633\u0631\u062e\u0637 4","header5":"\u0633\u0631\u062e\u0637 5","header6":"\u0633\u0631\u062e\u0637 6","bold":"\u0638\u062e\u06cc\u0645","italic":"\u0645\u0648\u0631\u0628","unorderedlist":"\u0644\u06cc\u0633\u062a \u0628\u062f\u0648\u0646 \u062a\u0631\u062a\u06cc\u0628","orderedlist":"\u0644\u06cc\u0633\u062a \u0628\u0627 \u062a\u0631\u062a\u06cc\u0628","video":"\u0648\u06cc\u062f\u06cc\u0648","image":"\u062a\u0635\u0648\u06cc\u0631","link":"\u0644\u06cc\u0646\u06a9","horizontalrule":"\u062f\u0631\u062c \u062e\u0637 \u0627\u0641\u0642\u06cc","fullscreen":"\u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647","preview":"\u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634"},"mediamanager":{"insert_link":"\u062f\u0631\u062c \u0622\u062f\u0631\u0633 \u0631\u0633\u0627\u0646\u0647","insert_image":"\u062f\u0631\u062c \u062a\u0635\u0648\u06cc\u0631","insert_video":"\u062f\u0631\u062c \u0648\u06cc\u062f\u06cc\u0648","insert_audio":"\u062f\u0631\u062c \u0635\u0648\u062a","invalid_file_empty_insert":"\u0644\u0637\u0641\u0627 \u0641\u0627\u06cc\u0644\u06cc \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0644\u06cc\u0646\u06a9 \u0622\u0646 \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f","invalid_file_single_insert":"\u0644\u0637\u0641\u0627 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0631\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f","invalid_image_empty_insert":"\u0644\u0637\u0641\u0627 \u062a\u0635\u0648\u06cc\u0631(\u0647\u0627) \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f","invalid_video_empty_insert":"\u0644\u0637\u0641\u0627 \u0648\u06cc\u062f\u06cc\u0648 \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f.","invalid_audio_empty_insert":"\u0644\u0637\u0641\u0627 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0631\u0627 \u062c\u0647\u062a \u062f\u0631\u062c \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f"},"alert":{"confirm_button_text":"\u062a\u0627\u06cc\u06cc\u062f","cancel_button_text":"\u0627\u0646\u0635\u0631\u0627\u0641","widget_remove_confirm":"\u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u06a9 \u062d\u0630\u0641 \u0634\u0648\u062f\u061f"},"datepicker":{"previousMonth":"\u0645\u0627\u0647 \u0642\u0628\u0644","nextMonth":"\u0645\u0627\u0647 \u0628\u0639\u0630","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"filter":{"group":{"all":"\u0647\u0645\u0647"},"dates":{"all":"\u0647\u0645\u0647","filter_button_text":"\u0641\u06cc\u0644\u062a\u0631","reset_button_text":"\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06cc","date_placeholder":"\u062a\u0627\u0631\u06cc\u062e","after_placeholder":"\u0628\u0639\u062f \u0627\u0632","before_placeholder":"\u0642\u0628\u0644 \u0627\u0632"}},"eventlog":{"show_stacktrace":"\u0646\u0645\u0627\u06cc\u0634 \u0631\u0648\u0646\u062f \u0627\u062c\u0631\u0627","hide_stacktrace":"\u0645\u062e\u0641\u06cc \u0633\u0627\u0632\u06cc \u0631\u0648\u0646\u062f \u0627\u062c\u0631\u0627","tabs":{"formatted":"\u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc \u0634\u062f\u0647","raw":"\u062e\u0627\u0645"},"editor":{"title":"\u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u06a9\u062f","description":"\u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0628\u0631\u0627\u06cc \u06cc\u06a9\u06cc \u0627\u0632 \u0627\u06cc\u0646 \u0634\u0645\u0627\u06cc \u0622\u062f\u0631\u0633 \u0647\u0627 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0634\u062f\u0647 \u0628\u0627\u0634\u062f.","openWith":"\u0628\u0627\u0632 \u06a9\u0631\u062f\u0646 \u062a\u0648\u0633\u0637","remember_choice":"\u06af\u0632\u06cc\u0646\u0647 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647 \u0631\u0627 \u0628\u0647 \u062e\u0627\u0637\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634","open":"\u0628\u0627\u0632 \u06a9\u0631\u062f\u0646","cancel":"\u0627\u0646\u0635\u0631\u0627\u0641"}}} ); //! moment.js locale configuration diff --git a/modules/system/assets/js/lang/lang.nb-no.js b/modules/system/assets/js/lang/lang.nb-no.js index 56e579e..f14744d 100644 --- a/modules/system/assets/js/lang/lang.nb-no.js +++ b/modules/system/assets/js/lang/lang.nb-no.js @@ -5,5 +5,5 @@ if ($.oc === undefined) $.oc = {} if ($.oc.langMessages === undefined) $.oc.langMessages = {} $.oc.langMessages['nb-no'] = $.extend( $.oc.langMessages['nb-no'] || {}, - {"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"filter":{"group":{"all":"all"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}} + {"markdowneditor":{"formatting":"Formatering","quote":"Sitat","code":"Kode","header1":"Overskrift 1","header2":"Overskrift 2","header3":"Overskrift 3","header4":"Overskrift 4","header5":"Overskrift 5","header6":"Overskrift 6","bold":"Fet","italic":"Kursiv","unorderedlist":"Punktliste","orderedlist":"Nummerert liste","video":"Video","image":"Bilde","link":"Lenke","horizontalrule":"Sett inn horisontal linje","fullscreen":"Fullskjerm","preview":"Forh\u00e5ndsvisning"},"mediamanager":{"insert_link":"Sett inn Media lenke","insert_image":"Sett inn Media bilde","insert_video":"Sett inn Media video","insert_audio":"Sett inn Media lyd","invalid_file_empty_insert":"Velg fil \u00e5 sette lenken inn i.","invalid_file_single_insert":"Vennligst velg \u00e9n enkelt fil.","invalid_image_empty_insert":"Velg bilde(r) \u00e5 sette inn.","invalid_video_empty_insert":"Velg en video \u00e5 sette inn.","invalid_audio_empty_insert":"Velg lyd \u00e5 sette inn."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Avbryt","widget_remove_confirm":"Fjerne widget?"},"datepicker":{"previousMonth":"Forrige m\u00e5ned","nextMonth":"Neste m\u00e5ned","months":["januar","februar","mars","april","mai","juni","july","august","september","oktober","november","desember"],"weekdays":["s\u00f8ndag","mandag","tirsdag","onsdag","torsdag","fredag","l\u00f8rdag"],"weekdaysShort":["s\u00f8n","man","tir","ons","tor","fre","l\u00f8r"]},"filter":{"group":{"all":"alle"},"dates":{"all":"alle","filter_button_text":"Filter","reset_button_text":"Tilbakestill","date_placeholder":"Dato","after_placeholder":"Etter","before_placeholder":"F\u00f8r"}},"eventlog":{"show_stacktrace":"Vis stacktrace","hide_stacktrace":"Skjul stacktrace","tabs":{"formatted":"Formattert","raw":"Raw"},"editor":{"title":"Kildekodeeditor","description":"Ditt operativsystem b\u00f8r v\u00e6re konfigurert for \u00e5 \u00e5pne ett av disse URL-schemaene.","openWith":"\u00c5pne med","remember_choice":"Husk valget for denne sesjonen","open":"\u00c5pne","cancel":"Avbryt"}}} ); \ No newline at end of file diff --git a/modules/system/assets/js/lang/lang.nl.js b/modules/system/assets/js/lang/lang.nl.js index 73143d8..250b6f8 100644 --- a/modules/system/assets/js/lang/lang.nl.js +++ b/modules/system/assets/js/lang/lang.nl.js @@ -5,7 +5,7 @@ if ($.oc === undefined) $.oc = {} if ($.oc.langMessages === undefined) $.oc.langMessages = {} $.oc.langMessages['nl'] = $.extend( $.oc.langMessages['nl'] || {}, - {"markdowneditor":{"formatting":"Opmaak","quote":"Quote","code":"Code","header1":"Koptekst 1","header2":"Koptekst 2","header3":"Koptekst 3","header4":"Koptekst 4","header5":"Koptekst 5","header6":"Koptekst 6","bold":"Vet","italic":"Cursief","unorderedlist":"Ongeordende lijst","orderedlist":"Gerangschikte lijst","video":"Video","image":"Afbeelding","link":"Hyperlink","horizontalrule":"Invoegen horizontale lijn","fullscreen":"Volledig scherm","preview":"Voorbeeldweergave"},"mediamanager":{"insert_link":"Invoegen Media Link","insert_image":"Invoegen Media Afbeelding","insert_video":"Invoegen Media Video","insert_audio":"Invoegen Media Audio","invalid_file_empty_insert":"Selecteer bestand om een link naar te maken.","invalid_file_single_insert":"Selecteer \u00e9\u00e9n bestand.","invalid_image_empty_insert":"Selecteer afbeelding(en) om in te voegen.","invalid_video_empty_insert":"Selecteer een video bestand om in te voegen.","invalid_audio_empty_insert":"Selecteer een audio bestand om in te voegen."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Annuleren","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Vorige maand","nextMonth":"Volgende maan","months":["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],"weekdays":["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],"weekdaysShort":["Zo","Ma","Di","Wo","Do","Vr","Za"]},"filter":{"group":{"all":"alle"},"dates":{"all":"alle","filter_button_text":"Filteren","reset_button_text":"Resetten","date_placeholder":"Datum","after_placeholder":"Na","before_placeholder":"Voor"}},"eventlog":{"show_stacktrace":"Toon stacktrace","hide_stacktrace":"Verberg stacktrace","tabs":{"formatted":"Geformatteerd","raw":"Bronversie"},"editor":{"title":"Broncode editor","description":"Je besturingssysteem moet in staat zijn om met deze URL-schema's om te kunnen gaan.","openWith":"Openen met","remember_choice":"Onthoudt de geselecteerde optie voor deze browser-sessie","open":"Openen","cancel":"Annuleren"}}} + {"markdowneditor":{"formatting":"Opmaak","quote":"Quote","code":"Code","header1":"Koptekst 1","header2":"Koptekst 2","header3":"Koptekst 3","header4":"Koptekst 4","header5":"Koptekst 5","header6":"Koptekst 6","bold":"Vet","italic":"Cursief","unorderedlist":"Ongeordende lijst","orderedlist":"Gerangschikte lijst","video":"Video","image":"Afbeelding","link":"Hyperlink","horizontalrule":"Invoegen horizontale lijn","fullscreen":"Volledig scherm","preview":"Voorbeeldweergave"},"mediamanager":{"insert_link":"Invoegen Media Link","insert_image":"Invoegen Media Afbeelding","insert_video":"Invoegen Media Video","insert_audio":"Invoegen Media Audio","invalid_file_empty_insert":"Selecteer bestand om een link naar te maken.","invalid_file_single_insert":"Selecteer \u00e9\u00e9n bestand.","invalid_image_empty_insert":"Selecteer afbeelding(en) om in te voegen.","invalid_video_empty_insert":"Selecteer een video bestand om in te voegen.","invalid_audio_empty_insert":"Selecteer een audio bestand om in te voegen."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Annuleren","widget_remove_confirm":"Deze widget verwijderen?"},"datepicker":{"previousMonth":"Vorige maand","nextMonth":"Volgende maan","months":["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],"weekdays":["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],"weekdaysShort":["Zo","Ma","Di","Wo","Do","Vr","Za"]},"filter":{"group":{"all":"alle"},"dates":{"all":"alle","filter_button_text":"Filteren","reset_button_text":"Resetten","date_placeholder":"Datum","after_placeholder":"Na","before_placeholder":"Voor"}},"eventlog":{"show_stacktrace":"Toon stacktrace","hide_stacktrace":"Verberg stacktrace","tabs":{"formatted":"Geformatteerd","raw":"Bronversie"},"editor":{"title":"Broncode editor","description":"Je besturingssysteem moet in staat zijn om met deze URL-schema's om te kunnen gaan.","openWith":"Openen met","remember_choice":"Onthoudt de geselecteerde optie voor deze browser-sessie","open":"Openen","cancel":"Annuleren"}}} ); //! moment.js locale configuration diff --git a/modules/system/assets/js/lang/lang.tr.js b/modules/system/assets/js/lang/lang.tr.js index 4e51c96..49a44a1 100644 --- a/modules/system/assets/js/lang/lang.tr.js +++ b/modules/system/assets/js/lang/lang.tr.js @@ -5,7 +5,7 @@ if ($.oc === undefined) $.oc = {} if ($.oc.langMessages === undefined) $.oc.langMessages = {} $.oc.langMessages['tr'] = $.extend( $.oc.langMessages['tr'] || {}, - {"markdowneditor":{"formatting":"Formatlama","quote":"Al\u0131nt\u0131","code":"Kod","header1":"Ba\u015fl\u0131k 1","header2":"Ba\u015fl\u0131k 2","header3":"Ba\u015fl\u0131k 3","header4":"Ba\u015fl\u0131k 4","header5":"Ba\u015fl\u0131k 5","header6":"Ba\u015fl\u0131k 6","bold":"Kal\u0131n","italic":"\u0130talik","unorderedlist":"S\u0131ras\u0131z Liste","orderedlist":"S\u0131ral\u0131 Liste","video":"Video","image":"G\u00f6rsel\/Resim","link":"Link","horizontalrule":"Yatay \u00c7izgi Ekle","fullscreen":"Tam Ekran","preview":"\u00d6nizleme"},"mediamanager":{"insert_link":"Medya Linki Ekle","insert_image":"Medya Resim Ekle","insert_video":"Medya Video Ekle","insert_audio":"Medya Ses Ekle","invalid_file_empty_insert":"L\u00fctfen link verilecek dosyay\u0131 se\u00e7in.","invalid_file_single_insert":"L\u00fctfen tek bir dosya se\u00e7in.","invalid_image_empty_insert":"L\u00fctfen eklenecek resim(ler)i se\u00e7in.","invalid_video_empty_insert":"L\u00fctfen eklenecek video dosyas\u0131n\u0131 se\u00e7in.","invalid_audio_empty_insert":"L\u00fctfen eklenecek ses dosyas\u0131n\u0131 se\u00e7in."},"alert":{"confirm_button_text":"TAMAM","cancel_button_text":"\u0130ptal","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"filter":{"group":{"all":"all"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}} + {"markdowneditor":{"formatting":"Formatlama","quote":"Al\u0131nt\u0131","code":"Kod","header1":"Ba\u015fl\u0131k 1","header2":"Ba\u015fl\u0131k 2","header3":"Ba\u015fl\u0131k 3","header4":"Ba\u015fl\u0131k 4","header5":"Ba\u015fl\u0131k 5","header6":"Ba\u015fl\u0131k 6","bold":"Kal\u0131n","italic":"\u0130talik","unorderedlist":"S\u0131ras\u0131z Liste","orderedlist":"S\u0131ral\u0131 Liste","video":"Video","image":"G\u00f6rsel\/Resim","link":"Link","horizontalrule":"Yatay \u00c7izgi Ekle","fullscreen":"Tam Ekran","preview":"\u00d6nizleme"},"mediamanager":{"insert_link":"Medya Linki Ekle","insert_image":"Medya Resim Ekle","insert_video":"Medya Video Ekle","insert_audio":"Medya Ses Ekle","invalid_file_empty_insert":"L\u00fctfen link verilecek dosyay\u0131 se\u00e7in.","invalid_file_single_insert":"L\u00fctfen tek bir dosya se\u00e7in.","invalid_image_empty_insert":"L\u00fctfen eklenecek resim(ler)i se\u00e7in.","invalid_video_empty_insert":"L\u00fctfen eklenecek video dosyas\u0131n\u0131 se\u00e7in.","invalid_audio_empty_insert":"L\u00fctfen eklenecek ses dosyas\u0131n\u0131 se\u00e7in."},"alert":{"confirm_button_text":"Evet","cancel_button_text":"\u0130ptal","widget_remove_confirm":"Bu eklentiyi kald\u0131rma istedi\u011finize emin misiniz?"},"datepicker":{"previousMonth":"\u00d6nceki Ay","nextMonth":"Sonraki Ay","months":["Ocak","\u015eubat","Mart","Nisan","May\u0131s","Haziran","Temmuz","A\u011fustos","Eyl\u00fcl","Ekim","Kas\u0131m","Aral\u0131k"],"weekdays":["Pazar","Pazartesi","Sal\u0131","\u00c7ar\u015famba","Per\u015fembe","Cuma","Cumartesi"],"weekdaysShort":["Paz","Pzt","Sal","\u00c7ar","Per","Cum","Cmt"]},"filter":{"group":{"all":"t\u00fcm\u00fc"},"dates":{"all":"t\u00fcm\u00fc","filter_button_text":"Filtrele","reset_button_text":"S\u0131f\u0131rla","date_placeholder":"Tarih","after_placeholder":"Sonra","before_placeholder":"\u00d6nce"}},"eventlog":{"show_stacktrace":"Veri y\u0131\u011f\u0131n\u0131n\u0131 g\u00f6ster","hide_stacktrace":"Veri y\u0131\u011f\u0131n\u0131n\u0131 gizle","tabs":{"formatted":"Formatl\u0131","raw":"Ham Veri"},"editor":{"title":"Kaynak kod edit\u00f6r\u00fc","description":"\u0130\u015fletim sisteminiz URL \u015femalar\u0131na yan\u0131t verecek \u015fekilde yap\u0131land\u0131r\u0131lmal\u0131d\u0131r.","openWith":"Birlikte a\u00e7","remember_choice":"Bu oturum i\u00e7in se\u00e7enekleri hat\u0131rla","open":"A\u00e7","cancel":"\u0130ptal"}}} ); //! moment.js locale configuration diff --git a/modules/system/assets/js/lang/lang.zh-cn.js b/modules/system/assets/js/lang/lang.zh-cn.js index 16805f0..52a6f46 100644 --- a/modules/system/assets/js/lang/lang.zh-cn.js +++ b/modules/system/assets/js/lang/lang.zh-cn.js @@ -5,7 +5,7 @@ if ($.oc === undefined) $.oc = {} if ($.oc.langMessages === undefined) $.oc.langMessages = {} $.oc.langMessages['zh-cn'] = $.extend( $.oc.langMessages['zh-cn'] || {}, - {"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"filter":{"group":{"all":"all"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}} + {"markdowneditor":{"formatting":"\u683c\u5f0f\u5316","quote":"\u5f15\u7528","code":"\u4ee3\u7801","header1":"\u6807\u9898 1","header2":"\u6807\u9898 2","header3":"\u6807\u9898 3","header4":"\u6807\u9898 4","header5":"\u6807\u9898 5","header6":"\u6807\u9898 6","bold":"\u7c97\u4f53","italic":"\u659c\u4f53","unorderedlist":"\u65e0\u5e8f\u5217\u8868","orderedlist":"\u6709\u5e8f\u5217\u8868","video":"\u89c6\u9891","image":"\u56fe\u7247","link":"\u94fe\u63a5","horizontalrule":"\u63d2\u5165\u5206\u5272\u7ebf","fullscreen":"\u5168\u5c4f","preview":"\u9884\u89c8"},"mediamanager":{"insert_link":"\u63d2\u5165\u94fe\u63a5","insert_image":"\u63d2\u5165\u56fe\u7247","insert_video":"\u63d2\u5165\u89c6\u9891","insert_audio":"\u63d2\u5165\u97f3\u9891","invalid_file_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u6587\u4ef6\u3002","invalid_file_single_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u6587\u4ef6\u3002","invalid_image_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u56fe\u7247\u6587\u4ef6\u3002","invalid_video_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u89c6\u9891\u6587\u4ef6\u3002","invalid_audio_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u97f3\u9891\u6587\u4ef6\u3002"},"alert":{"confirm_button_text":"\u786e\u5b9a","cancel_button_text":"\u53d6\u6d88","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"\u4e0a\u4e00\u4e2a\u6708","nextMonth":"\u4e0b\u4e00\u4e2a\u6708","months":["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],"weekdays":["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],"weekdaysShort":["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},"filter":{"group":{"all":"\u5168\u90e8"},"dates":{"all":"\u5168\u90e8","filter_button_text":"\u7b5b\u9009","reset_button_text":"\u91cd\u7f6e","date_placeholder":"\u65e5\u671f","after_placeholder":"After","before_placeholder":"Before"}},"eventlog":{"show_stacktrace":"\u663e\u793a\u5806\u6808","hide_stacktrace":"\u9690\u85cf\u5806\u6808","tabs":{"formatted":"\u683c\u5f0f\u5316\u7684","raw":"\u539f\u59cb"},"editor":{"title":"\u6e90\u4ee3\u7801\u7f16\u8f91\u5668","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"\u8bb0\u4f4f\u9009\u62e9","open":"\u6253\u5f00","cancel":"\u53d6\u6d88"}}} ); //! moment.js locale configuration diff --git a/modules/system/assets/less/framework.extras.less b/modules/system/assets/less/framework.extras.less index 3247695..67b163d 100644 --- a/modules/system/assets/less/framework.extras.less +++ b/modules/system/assets/less/framework.extras.less @@ -10,6 +10,7 @@ body.oc-loading, body.oc-loading * { @stripe-loader-color: #0090c0; @stripe-loader-height: 5px; + .stripe-loading-indicator { height: @stripe-loader-height; @@ -31,7 +32,7 @@ body.oc-loading, body.oc-loading * { .stripe { width: 100%; - .animation(infinite-loader 60s linear); + .animation(oc-infinite-loader 60s linear); } .stripe-loaded { @@ -55,6 +56,138 @@ body.oc-loading, body.oc-loading * { } } +// +// Flash Messages +// -------------------------------------------------- + +@color-flash-success-bg: #8da85e; +@color-flash-error-bg: #cc3300; +@color-flash-warning-bg: #f0ad4e; +@color-flash-info-bg: #5fb6f5; +@color-flash-text: #ffffff; + +body > p.flash-message { + position: fixed; + width: 500px; + left: 50%; + top: 13px; + margin-left: -250px; + color: @color-flash-text; + font-size: 14px; + padding: 10px 30px 10px 15px; + z-index: @zindex-flashmessage; + word-wrap: break-word; + text-shadow: 0 -1px 0px rgba(0,0,0,.15); + text-align: center; + .box-shadow(@overlay-box-shadow); + .border-radius(@border-radius-base); + + &.fade { + .opacity(0); + .transition(~'all 0.5s, width 0s'); + .transform(~'scale(0.9)'); + } + + &.fade.in { + .opacity(1); + .transform( ~'scale(1)'); + } + + &.success { background: @color-flash-success-bg; } + &.error { background: @color-flash-error-bg; } + &.warning { background: @color-flash-warning-bg; } + &.info { background: @color-flash-info-bg; } + + button.close { + float: none; + position: absolute; + right: 10px; + top: 8px; + color: white; + font-size: 21px; + line-height: 1; + font-weight: bold; + .opacity(.2); + + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + outline: none; + + &:hover, + &:focus { + color: white; + text-decoration: none; + cursor: pointer; + .opacity(.5); + } + } +} + +@media (max-width: @screen-sm) { + body > p.flash-message { + left: 10px; + right: 10px; + top: 10px; + margin-left: 0; + width: auto; + } +} + +// +// Form Validation +// -------------------------------------------------- + +[data-request][data-request-validate] [data-validate-for], +[data-request][data-request-validate] [data-validate-error] { + &:not(.visible) { + display: none; + } +} + +// +// Element Loader +// -------------------------------------------------- + +a.oc-loading, button.oc-loading { + &:after { + content: ''; + display: inline-block; + vertical-align: middle; + margin-left: .4em; + height: 1em; + width: 1em; + animation: oc-rotate-loader 0.8s infinite linear; + border: .2em solid currentColor; + border-right-color: transparent; + border-radius: 50%; + .opacity(.5); + } +} + +@-moz-keyframes oc-rotate-loader { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(360deg); } +} +@-webkit-keyframes oc-rotate-loader { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } +} +@-o-keyframes oc-rotate-loader { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(360deg); } +} +@-ms-keyframes oc-rotate-loader { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(360deg); } +} +@keyframes oc-rotate-loader { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + // // Infinite loading animation // -------------------------------------------------- @@ -62,6 +195,7 @@ body.oc-loading, body.oc-loading * { @startCount: 1; @startVal: 28%; @start: 0; + .infinite-class (@index, @val, @count) when (@index = 0) { @tmpSelector: ~"@{index}%"; @{tmpSelector} { width: 0; } @@ -73,18 +207,18 @@ body.oc-loading, body.oc-loading * { .infinite-class(@index + 10, @val + (@val / @count), @count * 2); } -@-moz-keyframes infinite-loader { +@-moz-keyframes oc-infinite-loader { .infinite-class(@start, @startVal, @startCount); } -@-webkit-keyframes infinite-loader { +@-webkit-keyframes oc-infinite-loader { .infinite-class(@start, @startVal, @startCount); } -@-o-keyframes infinite-loader { +@-o-keyframes oc-infinite-loader { .infinite-class(@start, @startVal, @startCount); } -@-ms-keyframes infinite-loader { +@-ms-keyframes oc-infinite-loader { .infinite-class(@start, @startVal, @startCount); } -@keyframes infinite-loader { +@keyframes oc-infinite-loader { .infinite-class(@start, @startVal, @startCount); } diff --git a/modules/system/assets/less/updates/details.less b/modules/system/assets/less/updates/details.less index 66ab40b..8c8127e 100644 --- a/modules/system/assets/less/updates/details.less +++ b/modules/system/assets/less/updates/details.less @@ -68,4 +68,21 @@ } } } -} \ No newline at end of file + + dl { + dt, dd { + margin-bottom: (@padding-standard / 2); + } + dt { + width: 75px; + float: left; + text-align: right; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + dd { + margin-left: 85px; + } + } +} diff --git a/modules/system/assets/ui/docs/callout.md b/modules/system/assets/ui/docs/callout.md index fa762a0..fbf8490 100644 --- a/modules/system/assets/ui/docs/callout.md +++ b/modules/system/assets/ui/docs/callout.md @@ -2,27 +2,65 @@ ### Callout -Allows the user to dismiss a callout message. +Displays a detailed message to the user, also allowing it to be dismissed. -

+
+ +
+ +

Warning warning

+

My arms are flailing wildly

+
-

Something good happened

+

Insert coin(s) to begin play

-### With header +### No sub-header -
+Include the `no-subheader` class to omit the sub heading. + +
-

Warning warning

+ +

Incoming unicorn

+
+
+ +### No icon + +Include the `no-icon` class to omit the icon. + +
+
+

There was a hull breach

+
    +
  • Get to the chopper
  • +
+
+ +### No header + +
-

My arms are flailing wildly

+

Something good happened

+
    +
  • You found a pony
  • +
+### Data attributes: + +- data-dismiss="callout" - when assigned to an element, the callout hides on click + ## JavaScript API ### Events -- close.oc.callout - triggered when a node on the tree is moved. +- close.oc.callout - triggered when the callout is closed diff --git a/modules/system/assets/ui/docs/chart.md b/modules/system/assets/ui/docs/chart.md index 8e32176..cd576fe 100644 --- a/modules/system/assets/ui/docs/chart.md +++ b/modules/system/assets/ui/docs/chart.md @@ -19,6 +19,26 @@ The pie chart outputs information as a circle diagram, with optional label in th ![image](https://github.com/octobercms/docs/blob/master/images/traffic-sources.png?raw=true) {.img-responsive .frame} +
+## Line chart + +The next example shows a line chart markup. Data sets are defined with the SPAN elements inside the chart element. + +
+ + +
+ +![image](https://github.com/octobercms/docs/blob/master/images/line-chart.png?raw=true) {.img-responsive .frame} + ## Bar chart diff --git a/modules/system/assets/ui/docs/flashmessage.md b/modules/system/assets/ui/docs/flashmessage.md index 514cd8f..3416e7c 100644 --- a/modules/system/assets/ui/docs/flashmessage.md +++ b/modules/system/assets/ui/docs/flashmessage.md @@ -4,36 +4,62 @@ Displays a floating flash message on the screen. ### Display onload +```html

This message is created from a static element. It will go away in 5 seconds.

+``` + +

+ This message is created from a static element. It will go away in 5 seconds. +

+ +
+ ### Trigger

- Create Success message + Show Success -

-

- Create Error message + Show Error -

-

- Create Warning message + Show Warning

-### Data attributes: + +### Display static + +A flash message can be rendered as a static element by attaching the `static` class. The `data-control` attribute is not needed. + +

+ Import completed successfully (success) +

+ +

+ Informative info box is informational (info) +

+ +

+ Phasers have been set to stun (warning) +

+ +

+ We couldn't help you with that (error) +

+ +### Data attributes - data-control="flash-message" - enables the flash message plugin - data-interval="2" - the interval to display the message in seconds, optional. Default: 2 -### JavaScript API: +### JavaScript API ```js $.oc.flashMsg({ diff --git a/modules/system/assets/ui/docs/icon.md b/modules/system/assets/ui/docs/icon.md index f2e6796..b1a5dbc 100644 --- a/modules/system/assets/ui/docs/icon.md +++ b/modules/system/assets/ui/docs/icon.md @@ -22,11 +22,11 @@ Place icons just about anywhere with the `` tag or to an existing element usi To increase icon sizes relative to their container, use the `icon-lg` (33% increase), `icon-2x`, `icon-3x`, `icon-4x`, or `icon-5x` classes. - icon-5x - icon-4x - icon-3x - icon-2x - icon-lg + icon-5x + icon-4x + icon-3x + icon-2x + icon-lg ### Icon buttons @@ -58,14 +58,17 @@ Feel free to use them alongside your buttons.
  • icon-adjust
  • +
  • icon-american-sign-language-interpreting
  • icon-anchor
  • icon-archive
  • icon-area-chart
  • icon-arrows
  • icon-arrows-h
  • icon-arrows-v
  • +
  • icon-assistive-listening-systems
  • icon-asterisk
  • icon-at
  • +
  • icon-audio-description
  • icon-balance-scale
  • icon-ban
  • icon-bar-chart
  • @@ -85,11 +88,15 @@ Feel free to use them alongside your buttons.
  • icon-bicycle
  • icon-binoculars
  • icon-birthday-cake
  • +
  • icon-blind
  • +
  • icon-bluetooth
  • +
  • icon-bluetooth-b
  • icon-bolt
  • icon-bomb
  • icon-book
  • icon-bookmark
  • icon-bookmark-o
  • +
  • icon-braille
  • icon-briefcase
  • icon-bug
  • icon-building
  • @@ -137,22 +144,24 @@ Feel free to use them alongside your buttons.
  • icon-cogs
  • icon-comment
  • icon-comment-o
  • -
  • icon-commenting
  • -
  • icon-commenting-o
    +
  • icon-commenting
  • +
  • icon-commenting-o
  • icon-comments
  • icon-comments-o
  • icon-compass
  • icon-copyright
  • icon-creative-commons
  • icon-credit-card
  • +
  • icon-credit-card-alt
  • icon-crop
  • icon-crosshairs
  • icon-cube
  • icon-cubes
  • icon-cutlery
  • icon-database
  • +
  • icon-deaf
  • icon-desktop
  • icon-diamond
  • icon-dot-circle-o
  • @@ -211,6 +220,7 @@ Feel free to use them alongside your buttons.
  • icon-hand-rock-o
  • icon-hand-scissors-o
  • icon-hand-spock-o
  • +
  • icon-hashtag
  • icon-hdd-o
  • icon-headphones
  • icon-heart
  • @@ -243,6 +253,7 @@ Feel free to use them alongside your buttons.
  • icon-line-chart
  • icon-location-arrow
  • icon-lock
  • +
  • icon-low-vision
  • icon-magic
  • icon-magnet
  • icon-male
  • @@ -274,6 +285,7 @@ Feel free to use them alongside your buttons.
  • icon-pencil
  • icon-pencil-square
  • icon-pencil-square-o
  • +
  • icon-percent
  • icon-phone
  • icon-phone-square
  • icon-picture-o
  • @@ -290,6 +302,7 @@ Feel free to use them alongside your buttons.
  • icon-qrcode
  • icon-question
  • icon-question-circle
  • +
  • icon-question-circle-o
  • icon-quote-left
  • icon-quote-right
  • icon-random
  • @@ -307,17 +320,20 @@ Feel free to use them alongside your buttons.
  • icon-search-minus
  • icon-search-plus
  • icon-server
  • +
  • icon-share
    -
  • icon-share
  • icon-share-alt
  • icon-share-alt-square
  • icon-share-square
  • icon-share-square-o
  • icon-shield
  • icon-ship
  • +
  • icon-shopping-bag
  • +
  • icon-shopping-basket
  • icon-shopping-cart
  • icon-sign-in
  • +
  • icon-sign-language
  • icon-sign-out
  • icon-signal
  • icon-sitemap
  • @@ -374,6 +390,7 @@ Feel free to use them alongside your buttons.
  • icon-truck
  • icon-tty
  • icon-umbrella
  • +
  • icon-universal-access
  • icon-university
  • icon-unlock
  • icon-unlock-alt
  • @@ -384,10 +401,12 @@ Feel free to use them alongside your buttons.
  • icon-user-times
  • icon-users
  • icon-video-camera
  • +
  • icon-volume-control-phone
  • icon-volume-down
  • icon-volume-off
  • icon-volume-up
  • icon-wheelchair
  • +
  • icon-wheelchair-alt
  • icon-wifi
  • icon-wrench
@@ -400,20 +419,21 @@ Feel free to use them alongside your buttons.
  • icon-ambulance
  • icon-h-square
  • icon-heart
  • +
  • icon-heart-o
    • -
    • icon-heart-o
    • icon-heartbeat
    • icon-hospital-o
    • +
    • icon-medkit
      -
    • icon-medkit
    • icon-plus-square
    • icon-stethoscope
    • +
    • icon-user-md
      -
    • icon-user-md
    • icon-wheelchair
    • +
    • icon-wheelchair-alt
    @@ -584,23 +604,27 @@ Feel free to use them alongside your buttons.
  • icon-compress
  • icon-eject
  • icon-expand
  • +
  • icon-fast-backward
    • -
    • icon-fast-backward
    • icon-fast-forward
    • icon-forward
    • icon-pause
    • +
    • icon-pause-circle
    • +
    • icon-pause-circle-o
    • icon-play
    • icon-play-circle
    • icon-play-circle-o
    • icon-random
    • +
    • icon-step-backward
      -
    • icon-step-backward
    • icon-step-forward
    • icon-stop
    • +
    • icon-stop-circle
    • +
    • icon-stop-circle-o
    • icon-youtube-play
    @@ -637,23 +661,24 @@ Feel free to use them alongside your buttons.
  • icon-bicycle
  • icon-bus
  • icon-car
  • +
  • icon-fighter-jet
    • -
    • icon-fighter-jet
    • icon-motorcycle
    • icon-plane
    • icon-rocket
    • +
    • icon-ship
      -
    • icon-ship
    • icon-space-shuttle
    • icon-subway
    • icon-taxi
    • +
    • icon-train
      -
    • icon-train
    • icon-truck
    • icon-wheelchair
    • +
    • icon-wheelchair-alt
    @@ -689,6 +714,8 @@ Feel free to use them alongside your buttons.
  • icon-bitbucket
  • icon-bitbucket-square
  • icon-black-tie
  • +
  • icon-bluetooth
  • +
  • icon-bluetooth-b
  • icon-btc
  • icon-buysellads
  • icon-cc-amex
  • @@ -701,6 +728,7 @@ Feel free to use them alongside your buttons.
  • icon-cc-visa
  • icon-chrome
  • icon-codepen
  • +
  • icon-codiepie
  • icon-connectdevelop
  • icon-contao
  • icon-css3
  • @@ -711,16 +739,21 @@ Feel free to use them alongside your buttons.
  • icon-dribbble
  • icon-dropbox
  • icon-drupal
  • +
  • icon-edge
  • icon-empire
  • +
  • icon-envira
  • icon-expeditedssl
  • - -
    • icon-facebook
    • icon-facebook-official
    • +
    +
    • icon-facebook-square
    • icon-firefox
    • +
    • icon-first-order
    • icon-flickr
    • +
    • icon-font-awesome
    • icon-fonticons
    • +
    • icon-fort-awesome
    • icon-forumbee
    • icon-foursquare
    • icon-get-pocket
    • @@ -731,8 +764,12 @@ Feel free to use them alongside your buttons.
    • icon-github
    • icon-github-alt
    • icon-github-square
    • +
    • icon-gitlab
    • +
    • icon-glide
    • +
    • icon-glide-g
    • icon-google
    • icon-google-plus
    • +
    • icon-google-plus-official
    • icon-google-plus-square
    • icon-google-wallet
    • icon-gratipay
    • @@ -749,12 +786,14 @@ Feel free to use them alongside your buttons.
    • icon-leanpub
    • icon-linkedin
    • icon-linkedin-square
    • -
    -
    • icon-linux
    • icon-maxcdn
    • +
    +
    • icon-meanpath
    • icon-medium
    • +
    • icon-mixcloud
    • +
    • icon-modx
    • icon-odnoklassniki
    • icon-odnoklassniki-square
    • icon-opencart
    • @@ -765,15 +804,19 @@ Feel free to use them alongside your buttons.
    • icon-paypal
    • icon-pied-piper
    • icon-pied-piper-alt
    • +
    • icon-pied-piper-pp
    • icon-pinterest
    • icon-pinterest-p
    • icon-pinterest-square
    • +
    • icon-product-hunt
    • icon-qq
    • icon-rebel
    • icon-reddit
    • +
    • icon-reddit-alien
    • icon-reddit-square
    • icon-renren
    • icon-safari
    • +
    • icon-scribd
    • icon-sellsy
    • icon-share-alt
    • icon-share-alt-square
    • @@ -783,6 +826,9 @@ Feel free to use them alongside your buttons.
    • icon-skype
    • icon-slack
    • icon-slideshare
    • +
    • icon-snapchat
    • +
    • icon-snapchat-ghost
    • +
    • icon-snapchat-square
    • icon-soundcloud
    • icon-spotify
    @@ -794,6 +840,7 @@ Feel free to use them alongside your buttons.
  • icon-stumbleupon
  • icon-stumbleupon-circle
  • icon-tencent-weibo
  • +
  • icon-themeisle
  • icon-trello
  • icon-tripadvisor
  • icon-tumblr
  • @@ -801,7 +848,10 @@ Feel free to use them alongside your buttons.
  • icon-twitch
  • icon-twitter
  • icon-twitter-square
  • +
  • icon-usb
  • icon-viacoin
  • +
  • icon-viadeo
  • +
  • icon-viadeo-square
  • icon-vimeo
  • icon-vimeo-square
  • icon-vine
  • @@ -812,11 +862,14 @@ Feel free to use them alongside your buttons.
  • icon-wikipedia-w
  • icon-windows
  • icon-wordpress
  • +
  • icon-wpbeginner
  • +
  • icon-wpforms
  • icon-xing
  • icon-xing-square
  • icon-y-combinator
  • icon-yahoo
  • icon-yelp
  • +
  • icon-yoast
  • icon-youtube
  • icon-youtube-play
  • icon-youtube-square
  • @@ -858,16 +911,17 @@ Feel free to use them alongside your buttons.
  • icon-cc-amex
  • icon-cc-diners-club
  • icon-cc-discover
  • +
  • icon-cc-jcb
    • -
    • icon-cc-jcb
    • icon-cc-mastercard
    • icon-cc-paypal
    • +
    • icon-cc-stripe
      -
    • icon-cc-stripe
    • icon-cc-visa
    • icon-credit-card
    • +
    • icon-credit-card-alt
    • icon-google-wallet
    • @@ -901,6 +955,34 @@ Feel free to use them alongside your buttons.
    +### Accessibility Icons + +
    +
      +
    • icon-american-sign-language-interpreting
    • +
    • icon-assistive-listening-systems
    • +
    • icon-audio-description
    • +
    • icon-blind
    • +
    +
      +
    • icon-braille
    • +
    • icon-cc
    • +
    • icon-deaf
    • +
    • icon-low-vision
    • +
    +
      +
    • icon-question-circle-o
    • +
    • icon-sign-language
    • +
    • icon-tty
    • +
    • icon-universal-access
    • +
    +
      +
    • icon-volume-control-phone
    • +
    • icon-wheelchair
    • +
    • icon-wheelchair-alt
    • +
    +
    + ### Gender Icons
    diff --git a/modules/system/assets/ui/docs/list.md b/modules/system/assets/ui/docs/list.md index d2261a9..4386a25 100644 --- a/modules/system/assets/ui/docs/list.md +++ b/modules/system/assets/ui/docs/list.md @@ -213,7 +213,7 @@ It might be fun to include a status column! - Pending + Approved The sun is shining @@ -230,6 +230,60 @@ It might be fun to include a status column!
    + +### Badge column + +You can also include an icon badge inside a column. + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    StatusTitle
    + + + + Draft + Welcome to October
    + + + + Pending + What a wonderful day
    + + + + Approved + The sun is shining
    + + + + Cancelled + The weather is sweet here
    +
    + ### Linking rows You may link an entire row by adding the `data-control="rowlink"` attribute to the table element. The first table data (TD) column with an anchor will be used to link the entire row. To bypass this behavior, simply add the `nolink` class to the column. diff --git a/modules/system/assets/ui/docs/popup.md b/modules/system/assets/ui/docs/popup.md index d8e91df..b7ed709 100644 --- a/modules/system/assets/ui/docs/popup.md +++ b/modules/system/assets/ui/docs/popup.md @@ -103,7 +103,7 @@ Using the `data-ajax` attribute you can refer to an external file or URL directl ### Options: - content: content HTML string or callback -### Data attributes: +### Data attributes - data-control="popup" - enables the ajax popup plugin - data-ajax="popup-content.htm" - ajax content to load - data-handler="onLoadContent" - October ajax request name @@ -111,7 +111,7 @@ Using the `data-ajax` attribute you can refer to an external file or URL directl - data-extra-data="file_id: 1" - October ajax request data - data-size="large" - Popup size, available sizes: giant, huge, large, small, tiny -### JavaScript API: +### JavaScript API ```js $('a#someLink').popup({ ajax: 'popup-content.htm' }) diff --git a/modules/system/assets/ui/docs/tab.md b/modules/system/assets/ui/docs/tab.md index 2575136..5caddb2 100644 --- a/modules/system/assets/ui/docs/tab.md +++ b/modules/system/assets/ui/docs/tab.md @@ -120,7 +120,7 @@ Example with data attributes (data-control="tab"): -### JavaScript API: +### JavaScript API - $('#mytabs').ocTab({closable: true, closeConfirmation: 'Close this tab? Unsaved data will be lost.'}) - $('#mytabs').ocTab('addTab', 'Tab title', 'Tab content', identifier) - adds tab. The optional identifier parameter allows to associate a identifier with a tab. The identifier can be used with the goTo() method to find and open a tab by it's identifier. diff --git a/modules/system/assets/ui/font/FontAwesome.otf b/modules/system/assets/ui/font/FontAwesome.otf index 681bdd4..d4de13e 100644 Binary files a/modules/system/assets/ui/font/FontAwesome.otf and b/modules/system/assets/ui/font/FontAwesome.otf differ diff --git a/modules/system/assets/ui/font/fontawesome-webfont.eot b/modules/system/assets/ui/font/fontawesome-webfont.eot index a30335d..c7b00d2 100644 Binary files a/modules/system/assets/ui/font/fontawesome-webfont.eot and b/modules/system/assets/ui/font/fontawesome-webfont.eot differ diff --git a/modules/system/assets/ui/font/fontawesome-webfont.svg b/modules/system/assets/ui/font/fontawesome-webfont.svg index 6fd19ab..8b66187 100644 --- a/modules/system/assets/ui/font/fontawesome-webfont.svg +++ b/modules/system/assets/ui/font/fontawesome-webfont.svg @@ -1,6 +1,6 @@ - + @@ -169,7 +169,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -219,8 +219,8 @@ - - + + @@ -362,8 +362,8 @@ - - + + @@ -410,7 +410,7 @@ - + @@ -454,7 +454,7 @@ - + @@ -484,7 +484,7 @@ - + @@ -555,7 +555,7 @@ - + @@ -600,11 +600,11 @@ - - + + - + @@ -621,20 +621,65 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/system/assets/ui/font/fontawesome-webfont.ttf b/modules/system/assets/ui/font/fontawesome-webfont.ttf index d7994e1..f221e50 100644 Binary files a/modules/system/assets/ui/font/fontawesome-webfont.ttf and b/modules/system/assets/ui/font/fontawesome-webfont.ttf differ diff --git a/modules/system/assets/ui/font/fontawesome-webfont.woff b/modules/system/assets/ui/font/fontawesome-webfont.woff index 6fd4ede..6e7483c 100644 Binary files a/modules/system/assets/ui/font/fontawesome-webfont.woff and b/modules/system/assets/ui/font/fontawesome-webfont.woff differ diff --git a/modules/system/assets/ui/font/fontawesome-webfont.woff2 b/modules/system/assets/ui/font/fontawesome-webfont.woff2 index 5560193..7eb74fd 100644 Binary files a/modules/system/assets/ui/font/fontawesome-webfont.woff2 and b/modules/system/assets/ui/font/fontawesome-webfont.woff2 differ diff --git a/modules/system/assets/ui/js/chart.bar.js b/modules/system/assets/ui/js/chart.bar.js index b3ec2ec..9ec2fae 100644 --- a/modules/system/assets/ui/js/chart.bar.js +++ b/modules/system/assets/ui/js/chart.bar.js @@ -116,7 +116,7 @@ if (!data) $this.data('oc.barChart', new BarChart(this, options)) }) - } + } $.fn.barChart.Constructor = BarChart diff --git a/modules/system/assets/ui/js/chart.line.js b/modules/system/assets/ui/js/chart.line.js index 7eb885b..f89b412 100644 --- a/modules/system/assets/ui/js/chart.line.js +++ b/modules/system/assets/ui/js/chart.line.js @@ -87,7 +87,7 @@ this.chartOptions = $.extend({}, this.chartOptions, parsedOptions) - this.options = options, + this.options = options this.$el = $(element) this.fullDataSet = [] this.resetZoomLink = $(options.resetZoomLink) diff --git a/modules/system/assets/ui/js/chart.meter.js b/modules/system/assets/ui/js/chart.meter.js index 91aa80d..cb78162 100644 --- a/modules/system/assets/ui/js/chart.meter.js +++ b/modules/system/assets/ui/js/chart.meter.js @@ -54,7 +54,7 @@ else data.update(option) }) - } + } $.fn.goalMeter.Constructor = GoalMeter diff --git a/modules/system/assets/ui/js/chart.pie.js b/modules/system/assets/ui/js/chart.pie.js index f795e1d..b478cef 100644 --- a/modules/system/assets/ui/js/chart.pie.js +++ b/modules/system/assets/ui/js/chart.pie.js @@ -11,7 +11,7 @@ * * Dependences: * - Raphaël (raphael-min.js) - * - October chart utilities (october.chartutils.js) + * - October chart utilities (chart.utils.js) */ +function ($) { "use strict"; @@ -119,7 +119,7 @@ if (!data) $this.data('oc.pieChart', new PieChart(this, options)) }) - } + } $.fn.pieChart.Constructor = PieChart diff --git a/modules/system/assets/ui/js/chart.utils.js b/modules/system/assets/ui/js/chart.utils.js index fca7b35..36d869b 100644 --- a/modules/system/assets/ui/js/chart.utils.js +++ b/modules/system/assets/ui/js/chart.utils.js @@ -3,6 +3,7 @@ */ +function ($) { "use strict"; + var ChartUtils = function() {} ChartUtils.prototype.defaultValueColor = '#b8b8b8'; diff --git a/modules/system/assets/ui/js/checkbox.balloon.js b/modules/system/assets/ui/js/checkbox.balloon.js index 70abb31..013802b 100644 --- a/modules/system/assets/ui/js/checkbox.balloon.js +++ b/modules/system/assets/ui/js/checkbox.balloon.js @@ -41,7 +41,7 @@ if (!data) $this.data('oc.balloon-selector', (data = new BalloonSelector(this, options))) }) - } + } $.fn.balloonSelector.Constructor = BalloonSelector diff --git a/modules/system/assets/ui/js/checkbox.js b/modules/system/assets/ui/js/checkbox.js index b33334b..55a82a9 100644 --- a/modules/system/assets/ui/js/checkbox.js +++ b/modules/system/assets/ui/js/checkbox.js @@ -3,14 +3,14 @@ * */ -(function($){ +(function($) { - $(document).on('keydown', 'div.custom-checkbox', function(e){ + $(document).on('keydown', 'div.custom-checkbox', function(e) { if (e.keyCode == 32) e.preventDefault() }) - $(document).on('keyup', 'div.custom-checkbox', function(e){ + $(document).on('keyup', 'div.custom-checkbox', function(e) { if (e.keyCode == 32) { var $cb = $('input', this) diff --git a/modules/system/assets/ui/js/datepicker.js b/modules/system/assets/ui/js/datepicker.js index a38e43e..179ea2f 100644 --- a/modules/system/assets/ui/js/datepicker.js +++ b/modules/system/assets/ui/js/datepicker.js @@ -12,6 +12,7 @@ */ +function ($) { "use strict"; + var Base = $.oc.foundation.base, BaseProto = Base.prototype @@ -95,12 +96,14 @@ // DatePicker.prototype.initDatePicker = function() { - var self = this + var self = this, + dateFormat = this.getDateFormat(), + now = moment().tz(this.timezone).format(dateFormat) var pikadayOptions = { yearRange: this.options.yearRange, - format: this.getDateFormat(), - setDefaultDate: moment().tz(this.timezone).format('l'), // now + format: dateFormat, + setDefaultDate: now, onOpen: function() { var $field = $(this._o.trigger) @@ -119,7 +122,7 @@ pikadayOptions.i18n = lang } - this.$datePicker.val(this.getDataLockerValue('l')) + this.$datePicker.val(this.getDataLockerValue(dateFormat)) if (this.options.minDate) { pikadayOptions.minDate = new Date(this.options.minDate) @@ -160,9 +163,12 @@ } DatePicker.prototype.getDateFormat = function() { - var format = this.options.format + var format = 'YYYY-MM-DD' - if (this.locale) { + if (this.options.format) { + format = this.options.format + } + else if (this.locale) { format = moment() .locale(this.locale) .localeData() @@ -298,7 +304,7 @@ DatePicker.DEFAULTS = { minDate: null, maxDate: null, - format: 'YYYY-MM-DD', + format: null, yearRange: 10 } diff --git a/modules/system/assets/ui/js/drag.scroll.js b/modules/system/assets/ui/js/drag.scroll.js index 30852ef..2e38d64 100644 --- a/modules/system/assets/ui/js/drag.scroll.js +++ b/modules/system/assets/ui/js/drag.scroll.js @@ -419,7 +419,7 @@ data[option].apply(data, methodArgs) } }) - } + } $.fn.dragScroll.Constructor = DragScroll diff --git a/modules/system/assets/ui/js/drag.sort.js b/modules/system/assets/ui/js/drag.sort.js index a1c84e6..f7a2e81 100644 --- a/modules/system/assets/ui/js/drag.sort.js +++ b/modules/system/assets/ui/js/drag.sort.js @@ -8,6 +8,7 @@ */ +function ($) { "use strict"; + var Base = $.oc.foundation.base, BaseProto = Base.prototype @@ -204,7 +205,7 @@ if (!data) $this.data('oc.sortable', (data = new Sortable(this, options))) if (typeof option == 'string') data[option].apply(data, args) }) - } + } $.fn.sortable.Constructor = Sortable diff --git a/modules/system/assets/ui/js/drag.value.js b/modules/system/assets/ui/js/drag.value.js index ffe9ebc..636abf1 100644 --- a/modules/system/assets/ui/js/drag.value.js +++ b/modules/system/assets/ui/js/drag.value.js @@ -131,7 +131,7 @@ // IE if (document.selection) { el.focus() - sel = document.selection.createRange() + var sel = document.selection.createRange() sel.text = insertValue el.focus() } diff --git a/modules/system/assets/ui/js/filter.js b/modules/system/assets/ui/js/filter.js index 2bf8764..a7a1c8e 100644 --- a/modules/system/assets/ui/js/filter.js +++ b/modules/system/assets/ui/js/filter.js @@ -20,7 +20,7 @@ var FilterWidget = function (element, options) { - var $el = this.$el = $(element); + this.$el = $(element); this.options = options || {} this.scopeValues = {} @@ -427,7 +427,7 @@ }) return result ? result : this - } + } $.fn.filterWidget.Constructor = FilterWidget diff --git a/modules/system/assets/ui/js/flashmessage.js b/modules/system/assets/ui/js/flashmessage.js index 2fdcecc..72eebc0 100644 --- a/modules/system/assets/ui/js/flashmessage.js +++ b/modules/system/assets/ui/js/flashmessage.js @@ -16,7 +16,7 @@ $('body > p.flash-message').remove() if ($element.length == 0) { - $element = $('

    ').addClass(options.class).html(options.text) + $element = $('

    ').addClass(options.class).html(options.text) } $element.addClass('flash-message fade') @@ -27,11 +27,11 @@ $(document.body).append($element) - setTimeout(function(){ + setTimeout(function() { $element.addClass('in') - }, 1) + }, 100) - var timer = window.setTimeout(remove, options.interval*1000) + var timer = window.setTimeout(remove, options.interval * 1000) function removeElement() { $element.remove() @@ -41,11 +41,11 @@ window.clearInterval(timer) $element.removeClass('in') - $.support.transition && $element.hasClass('fade') ? - $element + $.support.transition && $element.hasClass('fade') + ? $element .one($.support.transition.end, removeElement) - .emulateTransitionEnd(500) : - removeElement() + .emulateTransitionEnd(500) + : removeElement() } } @@ -72,4 +72,4 @@ }) }) -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/modules/system/assets/ui/js/foundation.baseclass.js b/modules/system/assets/ui/js/foundation.baseclass.js index bbdb56c..1de3948 100644 --- a/modules/system/assets/ui/js/foundation.baseclass.js +++ b/modules/system/assets/ui/js/foundation.baseclass.js @@ -51,8 +51,7 @@ this.proxiedMethods = {} } - Base.prototype.dispose = function() - { + Base.prototype.dispose = function() { for (var key in this.proxiedMethods) { this.proxiedMethods[key] = null } diff --git a/modules/system/assets/ui/js/foundation.controlutils.js b/modules/system/assets/ui/js/foundation.controlutils.js index d3b3ceb..8292e76 100644 --- a/modules/system/assets/ui/js/foundation.controlutils.js +++ b/modules/system/assets/ui/js/foundation.controlutils.js @@ -40,7 +40,7 @@ $.oc.foundation.controlUtils = ControlUtils; $(document).on('ajaxBeforeReplace', function(ev){ - // Automatically displose controls in an element + // Automatically dispose controls in an element // before the element contents is replaced. // The ajaxBeforeReplace event is triggered in // framework.js diff --git a/modules/system/assets/ui/js/input.hotkey.js b/modules/system/assets/ui/js/input.hotkey.js index f6d6fed..b78d672 100644 --- a/modules/system/assets/ui/js/input.hotkey.js +++ b/modules/system/assets/ui/js/input.hotkey.js @@ -195,7 +195,7 @@ if (!data) $this.data('oc.hotkey', (data = new HotKey(this, options))) if (typeof option == 'string') data[option].apply(data, args) }) - } + } $.fn.hotKey.Constructor = HotKey @@ -210,7 +210,7 @@ // HOTKEY DATA-API // ============== - $(document).render(function(){ + $(document).render(function() { $('[data-hotkey]').hotKey() }) diff --git a/modules/system/assets/ui/js/input.monitor.js b/modules/system/assets/ui/js/input.monitor.js index ebbb1be..df85ec4 100644 --- a/modules/system/assets/ui/js/input.monitor.js +++ b/modules/system/assets/ui/js/input.monitor.js @@ -9,7 +9,7 @@ BaseProto = Base.prototype var ChangeMonitor = function (element, options) { - var $el = this.$el = $(element); + this.$el = $(element); this.paused = false this.options = options || {} @@ -135,7 +135,7 @@ if (!data) $this.data('oc.changeMonitor', (data = new ChangeMonitor(this, options))) }) - } + } $.fn.changeMonitor.Constructor = ChangeMonitor diff --git a/modules/system/assets/ui/js/input.preset.js b/modules/system/assets/ui/js/input.preset.js index 4a364d8..dbccc01 100644 --- a/modules/system/assets/ui/js/input.preset.js +++ b/modules/system/assets/ui/js/input.preset.js @@ -23,7 +23,26 @@ */ +function ($) { "use strict"; - var LATIN_MAP = { + var VIETNAMESE_MAP = { + 'Á': 'A', 'À': 'A', 'Ã': 'A', 'Ả': 'A', 'Ạ': 'A', 'Ắ': 'A', 'Ằ': 'A', 'Ẵ': + 'A', 'Ẳ': 'A', 'Ặ': 'A', 'Ấ': 'A', 'Ầ': 'A', 'Ẫ': 'A', 'Ẩ': 'A', 'Ậ': 'A', + 'Đ': 'D', 'É': 'E', 'È': 'E', 'Ẽ': 'E', 'Ẻ': 'E', 'Ẹ': 'E', 'Ế': 'E', 'Ề': + 'E', 'Ễ': 'E', 'Ể': 'E', 'Ệ': 'E', 'Ó': 'O', 'Ò': 'O', 'Ỏ': 'O', 'Õ': 'O', + 'Ọ': 'O', 'Ố': 'O', 'Ồ': 'O', 'Ổ': 'O', 'Ỗ': 'O', 'Ộ': 'O', 'Ớ': 'O', 'Ờ': + 'O', 'Ở': 'O', 'Ỡ': 'O', 'Ợ': 'O', 'Í': 'I', 'Ì': 'I', 'Ỉ': 'I', 'Ĩ': 'I', + 'Ị': 'I', 'Ú': 'U', 'Ù': 'U', 'Ủ': 'U', 'Ũ': 'U', 'Ụ': 'U', 'Ứ': 'U', 'Ừ': + 'U', 'Ử': 'U', 'Ữ': 'U', 'Ự': 'U', 'Ý': 'Y', 'Ỳ': 'Y', 'Ỷ': 'Y', 'Ỹ': 'Y', + 'Ỵ': 'Y', 'á': 'a', 'à': 'a', 'ã': 'a', 'ả': 'a', 'ạ': 'a', 'ắ': 'a', 'ằ': + 'a', 'ẵ': 'a', 'ẳ': 'a', 'ặ': 'a', 'ấ': 'a', 'ầ': 'a', 'ẫ': 'a', 'ẩ': 'a', + 'ậ': 'a','đ': 'd', 'é': 'e', 'è': 'e', 'ẽ': 'e', 'ẻ': 'e', 'ẹ': 'e', 'ế': + 'e', 'ề':'e', 'ễ': 'e', 'ể': 'e', 'ệ': 'e', 'ó': 'o', 'ò': 'o', 'ỏ': 'o', + 'õ': 'o', 'ọ': 'o', 'ố': 'o', 'ồ': 'o', 'ổ': 'o', 'ỗ': 'o', 'ộ': 'o', 'ớ': + 'o', 'ờ': 'o', 'ở': 'o', 'ỡ': 'o', 'ợ': 'o', 'í': 'i', 'ì': 'i', 'ỉ': 'i', + 'ĩ': 'i', 'ị': 'i', 'ú': 'u', 'ù': 'u', 'ủ': 'u', 'ũ': 'u', 'ụ': 'u', 'ứ': + 'u', 'ừ': 'u', 'ử': 'u', 'ữ': 'u', 'ự': 'u', 'ý': 'y', 'ỳ': 'y', 'ỷ': 'y', + 'ỹ': 'y', 'ỵ': 'y' + }, + LATIN_MAP = { 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö': @@ -118,6 +137,7 @@ } }, ALL_MAPS = [ + VIETNAMESE_MAP, LATIN_MAP, LATIN_SYMBOLS_MAP, GREEK_MAP, @@ -305,7 +325,8 @@ // INPUT CONVERTER DATA-API // =============== - $(document).render(function(){ + $(document).render(function() { $('[data-input-preset]').inputPreset() }) -}(window.jQuery); \ No newline at end of file + +}(window.jQuery); diff --git a/modules/system/assets/ui/js/input.trigger.js b/modules/system/assets/ui/js/input.trigger.js index 9a760e8..ea596be 100644 --- a/modules/system/assets/ui/js/input.trigger.js +++ b/modules/system/assets/ui/js/input.trigger.js @@ -157,7 +157,7 @@ if (!data) $this.data('oc.triggerOn', (data = new TriggerOn(this, options))) }) - } + } $.fn.triggerOn.Constructor = TriggerOn diff --git a/modules/system/assets/ui/js/list.sortable.js b/modules/system/assets/ui/js/list.sortable.js index ed0e918..534115f 100644 --- a/modules/system/assets/ui/js/list.sortable.js +++ b/modules/system/assets/ui/js/list.sortable.js @@ -41,6 +41,7 @@ */ +function ($) { "use strict"; + var Base = $.oc.foundation.base, BaseProto = Base.prototype, listSortableIdCounter = 0, @@ -94,6 +95,8 @@ } ListSortable.prototype.unregisterListHandlers = function(list) { + var $list = $(list) + $list.off('dragstart', '> li', this.proxy(this.onDragStart)) $list.off('dragover', '> li', this.proxy(this.onDragOver)) $list.off('dragenter', '> li', this.proxy(this.onDragEnter)) @@ -138,7 +141,7 @@ ListSortable.prototype.elementBelongsToManagedList = function(element) { for (var i=this.lists.length-1; i >= 0; i--) { var list = this.lists[i], - children = [].slice.call(list.children) // Converts HTMLCollection to array + children = [].slice.call(list.children); // Converts HTMLCollection to array if (children.indexOf(element) !== -1) { return true @@ -442,7 +445,7 @@ } } }) - } + } $.fn.listSortable.Constructor = ListSortable diff --git a/modules/system/assets/ui/js/loader.base.js b/modules/system/assets/ui/js/loader.base.js index b75c8f5..637361c 100644 --- a/modules/system/assets/ui/js/loader.base.js +++ b/modules/system/assets/ui/js/loader.base.js @@ -19,7 +19,7 @@ var LoadIndicator = function (element, options) { - var $el = this.$el = $(element) + this.$el = $(element) this.options = options || {} this.tally = 0 @@ -93,7 +93,7 @@ } } }) - } + } $.fn.loadIndicator.Constructor = LoadIndicator diff --git a/modules/system/assets/ui/js/loader.cursor.js b/modules/system/assets/ui/js/loader.cursor.js index 723adb8..878c0ff 100644 --- a/modules/system/assets/ui/js/loader.cursor.js +++ b/modules/system/assets/ui/js/loader.cursor.js @@ -39,9 +39,7 @@ if (this.counter > 1) return - var self = this, - $window = $(window); - + var self = this; if (event !== undefined && event.clientY !== undefined) { self.indicator.css({ @@ -73,7 +71,7 @@ } } - $(document).ready(function(){ + $(document).ready(function() { $.oc.cursorLoadIndicator = new CursorLoadIndicator(); }) diff --git a/modules/system/assets/ui/js/popover.js b/modules/system/assets/ui/js/popover.js index ca8f6f8..c2954ae 100644 --- a/modules/system/assets/ui/js/popover.js +++ b/modules/system/assets/ui/js/popover.js @@ -386,7 +386,7 @@ data[option].apply(data, methodArgs) } }) - } + } $.fn.ocPopover.Constructor = Popover diff --git a/modules/system/assets/ui/js/select.js b/modules/system/assets/ui/js/select.js index 3d2ccc9..ea94b88 100644 --- a/modules/system/assets/ui/js/select.js +++ b/modules/system/assets/ui/js/select.js @@ -12,9 +12,6 @@ * Custom drop downs (Desktop only) */ $(document).render(function(){ - if (Modernizr.touch) - return - var formatSelectOption = function(state) { if (!state.id) return state.text; // optgroup @@ -92,16 +89,19 @@ } } + var placeholder = $element.data('placeholder') + if (placeholder) { + extraOptions.placeholder = placeholder + } + $element.select2($.extend({}, selectOptions, extraOptions)) }) }) - $(document).on('disable', 'select.custom-select', function(event, status){ - $(this).select2('enable', !status) - }) - - $(document).on('focus', 'select.custom-select', function(event){ - setTimeout($.proxy(function() { $(this).select2('focus') }, this), 10) + $(document).on('disable', 'select.custom-select', function(event, status) { + if ($(this).data('select2') != null) { + $(this).select2('enable', !status) + } }) -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/modules/system/assets/ui/js/tab.js b/modules/system/assets/ui/js/tab.js index d2e1f61..95da906 100644 --- a/modules/system/assets/ui/js/tab.js +++ b/modules/system/assets/ui/js/tab.js @@ -14,8 +14,8 @@ var $el = this.$el = $(element); this.options = options || {} - this.$tabsContainer = $('.nav-tabs', $el) - this.$pagesContainer = $('.tab-content', $el) + this.$tabsContainer = $('.nav-tabs:first', $el) + this.$pagesContainer = $('.tab-content:first', $el) this.tabId = 'tabs' + $el.parents().length + Math.round(Math.random()*1000); if (this.options.closable !== undefined && this.options.closable !== false) diff --git a/modules/system/assets/ui/less/callout.less b/modules/system/assets/ui/less/callout.less index 0a1579e..ed05e4d 100644 --- a/modules/system/assets/ui/less/callout.less +++ b/modules/system/assets/ui/less/callout.less @@ -104,10 +104,14 @@ font-weight: bold; } - h3, p { + h3, p, ul, ol { margin-left: 35px; } + ul, ol { + padding-left: @padding-standard; + } + *:last-child { margin-bottom: 0; } @@ -145,6 +149,8 @@ } ul, ol { + padding-left: @padding-standard; + li { margin-bottom: 5px; } @@ -157,7 +163,7 @@ &.no-icon { > .header { - h3, p { + h3, p, ul, ol { margin-left: 0; } } diff --git a/modules/system/assets/ui/less/icon.icons.less b/modules/system/assets/ui/less/icon.icons.less index 8f0db3a..eea8e7f 100644 --- a/modules/system/assets/ui/less/icon.icons.less +++ b/modules/system/assets/ui/less/icon.icons.less @@ -435,7 +435,7 @@ .oc-icon-stumbleupon:before, .icon-stumbleupon:before { content: @stumbleupon; } .oc-icon-delicious:before, .icon-delicious:before { content: @delicious; } .oc-icon-digg:before, .icon-digg:before { content: @digg; } -.oc-icon-pied-piper:before, .icon-pied-piper:before { content: @pied-piper; } +.oc-icon-pied-piper-pp:before, .icon-pied-piper-pp:before { content: @pied-piper-pp; } .oc-icon-pied-piper-alt:before, .icon-pied-piper-alt:before { content: @pied-piper-alt; } .oc-icon-drupal:before, .icon-drupal:before { content: @drupal; } .oc-icon-joomla:before, .icon-joomla:before { content: @joomla; } @@ -485,6 +485,7 @@ .oc-icon-life-ring:before, .icon-life-ring:before { content: @life-ring; } .oc-icon-circle-o-notch:before, .icon-circle-o-notch:before { content: @circle-o-notch; } .oc-icon-ra:before, .icon-ra:before, +.oc-icon-resistance:before, .icon-resistance:before, .oc-icon-rebel:before, .icon-rebel:before { content: @rebel; } .oc-icon-ge:before, .icon-ge:before, .oc-icon-empire:before, .icon-empire:before { content: @empire; } @@ -672,3 +673,58 @@ .oc-icon-vimeo:before, .icon-vimeo:before { content: @vimeo; } .oc-icon-black-tie:before, .icon-black-tie:before { content: @black-tie; } .oc-icon-fonticons:before, .icon-fonticons:before { content: @fonticons; } +.oc-icon-reddit-alien:before, .icon-reddit-alien:before { content: @reddit-alien; } +.oc-icon-edge:before, .icon-edge:before { content: @edge; } +.oc-icon-credit-card-alt:before, .icon-credit-card-alt:before { content: @credit-card-alt; } +.oc-icon-codiepie:before, .icon-codiepie:before { content: @codiepie; } +.oc-icon-modx:before, .icon-modx:before { content: @modx; } +.oc-icon-fort-awesome:before, .icon-fort-awesome:before { content: @fort-awesome; } +.oc-icon-usb:before, .icon-usb:before { content: @usb; } +.oc-icon-product-hunt:before, .icon-product-hunt:before { content: @product-hunt; } +.oc-icon-mixcloud:before, .icon-mixcloud:before { content: @mixcloud; } +.oc-icon-scribd:before, .icon-scribd:before { content: @scribd; } +.oc-icon-pause-circle:before, .icon-pause-circle:before { content: @pause-circle; } +.oc-icon-pause-circle-o:before, .icon-pause-circle-o:before { content: @pause-circle-o; } +.oc-icon-stop-circle:before, .icon-stop-circle:before { content: @stop-circle; } +.oc-icon-stop-circle-o:before, .icon-stop-circle-o:before { content: @stop-circle-o; } +.oc-icon-shopping-bag:before, .icon-shopping-bag:before { content: @shopping-bag; } +.oc-icon-shopping-basket:before, .icon-shopping-basket:before { content: @shopping-basket; } +.oc-icon-hashtag:before, .icon-hashtag:before { content: @hashtag; } +.oc-icon-bluetooth:before, .icon-bluetooth:before { content: @bluetooth; } +.oc-icon-bluetooth-b:before, .icon-bluetooth-b:before { content: @bluetooth-b; } +.oc-icon-percent:before, .icon-percent:before { content: @percent; } +.oc-icon-gitlab:before, .icon-gitlab:before { content: @gitlab; } +.oc-icon-wpbeginner:before, .icon-wpbeginner:before { content: @wpbeginner; } +.oc-icon-wpforms:before, .icon-wpforms:before { content: @wpforms; } +.oc-icon-envira:before, .icon-envira:before { content: @envira; } +.oc-icon-universal-access:before, .icon-universal-access:before { content: @universal-access; } +.oc-icon-wheelchair-alt:before, .icon-wheelchair-alt:before { content: @wheelchair-alt; } +.oc-icon-question-circle-o:before, .icon-question-circle-o:before { content: @question-circle-o; } +.oc-icon-blind:before, .icon-blind:before { content: @blind; } +.oc-icon-audio-description:before, .icon-audio-description:before { content: @audio-description; } +.oc-icon-volume-control-phone:before, .icon-volume-control-phone:before { content: @volume-control-phone; } +.oc-icon-braille:before, .icon-braille:before { content: @braille; } +.oc-icon-assistive-listening-systems:before, .icon-assistive-listening-systems:before { content: @assistive-listening-systems; } +.oc-icon-asl-interpreting:before, .icon-asl-interpreting:before, +.oc-icon-american-sign-language-interpreting:before, .icon-american-sign-language-interpreting:before { content: @american-sign-language-interpreting; } +.oc-icon-deafness:before, .icon-deafness:before, +.oc-icon-hard-of-hearing:before, .icon-hard-of-hearing:before, +.oc-icon-deaf:before, .icon-deaf:before { content: @deaf; } +.oc-icon-glide:before, .icon-glide:before { content: @glide; } +.oc-icon-glide-g:before, .icon-glide-g:before { content: @glide-g; } +.oc-icon-signing:before, .icon-signing:before, +.oc-icon-sign-language:before, .icon-sign-language:before { content: @sign-language; } +.oc-icon-low-vision:before, .icon-low-vision:before { content: @low-vision; } +.oc-icon-viadeo:before, .icon-viadeo:before { content: @viadeo; } +.oc-icon-viadeo-square:before, .icon-viadeo-square:before { content: @viadeo-square; } +.oc-icon-snapchat:before, .icon-snapchat:before { content: @snapchat; } +.oc-icon-snapchat-ghost:before, .icon-snapchat-ghost:before { content: @snapchat-ghost; } +.oc-icon-snapchat-square:before, .icon-snapchat-square:before { content: @snapchat-square; } +.oc-icon-pied-piper:before, .icon-pied-piper:before { content: @pied-piper; } +.oc-icon-first-order:before, .icon-first-order:before { content: @first-order; } +.oc-icon-yoast:before, .icon-yoast:before { content: @yoast; } +.oc-icon-themeisle:before, .icon-themeisle:before { content: @themeisle; } +.oc-icon-google-plus-circle:before, .icon-google-plus-circle:before, +.oc-icon-google-plus-official:before, .icon-google-plus-official:before { content: @google-plus-official; } +.oc-icon-fa:before, .icon-fa:before, +.oc-icon-font-awesome:before, .icon-font-awesome:before { content: @font-awesome; } diff --git a/modules/system/assets/ui/less/icon.variables.less b/modules/system/assets/ui/less/icon.variables.less index c2a50f1..60c7150 100644 --- a/modules/system/assets/ui/less/icon.variables.less +++ b/modules/system/assets/ui/less/icon.variables.less @@ -21,6 +21,7 @@ @align-right: "\f038"; @amazon: "\f270"; @ambulance: "\f0f9"; +@american-sign-language-interpreting: "\f2a3"; @anchor: "\f13d"; @android: "\f17b"; @angellist: "\f209"; @@ -51,8 +52,11 @@ @arrows-alt: "\f0b2"; @arrows-h: "\f07e"; @arrows-v: "\f07d"; +@asl-interpreting: "\f2a3"; +@assistive-listening-systems: "\f2a2"; @asterisk: "\f069"; @at: "\f1fa"; +@audio-description: "\f29e"; @automobile: "\f1b9"; @backward: "\f04a"; @balance-scale: "\f24e"; @@ -87,12 +91,16 @@ @bitbucket-square: "\f172"; @bitcoin: "\f15a"; @black-tie: "\f27e"; +@blind: "\f29d"; +@bluetooth: "\f293"; +@bluetooth-b: "\f294"; @bold: "\f032"; @bolt: "\f0e7"; @bomb: "\f1e2"; @book: "\f02d"; @bookmark: "\f02e"; @bookmark-o: "\f097"; +@braille: "\f2a1"; @briefcase: "\f0b1"; @btc: "\f15a"; @bug: "\f188"; @@ -165,6 +173,7 @@ @code: "\f121"; @code-fork: "\f126"; @codepen: "\f1cb"; +@codiepie: "\f284"; @coffee: "\f0f4"; @cog: "\f013"; @cogs: "\f085"; @@ -183,6 +192,7 @@ @copyright: "\f1f9"; @creative-commons: "\f25e"; @credit-card: "\f09d"; +@credit-card-alt: "\f283"; @crop: "\f125"; @crosshairs: "\f05b"; @css3: "\f13c"; @@ -193,6 +203,8 @@ @dashboard: "\f0e4"; @dashcube: "\f210"; @database: "\f1c0"; +@deaf: "\f2a4"; +@deafness: "\f2a4"; @dedent: "\f03b"; @delicious: "\f1a5"; @desktop: "\f108"; @@ -205,6 +217,7 @@ @dribbble: "\f17d"; @dropbox: "\f16b"; @drupal: "\f1a9"; +@edge: "\f282"; @edit: "\f044"; @eject: "\f052"; @ellipsis-h: "\f141"; @@ -213,6 +226,7 @@ @envelope: "\f0e0"; @envelope-o: "\f003"; @envelope-square: "\f199"; +@envira: "\f299"; @eraser: "\f12d"; @eur: "\f153"; @euro: "\f153"; @@ -227,6 +241,7 @@ @eye: "\f06e"; @eye-slash: "\f070"; @eyedropper: "\f1fb"; +@fa: "\f2b4"; @facebook: "\f09a"; @facebook-f: "\f09a"; @facebook-official: "\f230"; @@ -261,6 +276,7 @@ @fire: "\f06d"; @fire-extinguisher: "\f134"; @firefox: "\f269"; +@first-order: "\f2b0"; @flag: "\f024"; @flag-checkered: "\f11e"; @flag-o: "\f11d"; @@ -273,7 +289,9 @@ @folder-open: "\f07c"; @folder-open-o: "\f115"; @font: "\f031"; +@font-awesome: "\f2b4"; @fonticons: "\f280"; +@fort-awesome: "\f286"; @forumbee: "\f211"; @forward: "\f04e"; @foursquare: "\f180"; @@ -295,11 +313,16 @@ @github: "\f09b"; @github-alt: "\f113"; @github-square: "\f092"; +@gitlab: "\f296"; @gittip: "\f184"; @glass: "\f000"; +@glide: "\f2a5"; +@glide-g: "\f2a6"; @globe: "\f0ac"; @google: "\f1a0"; @google-plus: "\f0d5"; +@google-plus-circle: "\f2b3"; +@google-plus-official: "\f2b3"; @google-plus-square: "\f0d4"; @google-wallet: "\f1ee"; @graduation-cap: "\f19d"; @@ -320,6 +343,8 @@ @hand-scissors-o: "\f257"; @hand-spock-o: "\f259"; @hand-stop-o: "\f256"; +@hard-of-hearing: "\f2a4"; +@hashtag: "\f292"; @hdd-o: "\f0a0"; @header: "\f1dc"; @headphones: "\f025"; @@ -391,6 +416,7 @@ @long-arrow-left: "\f177"; @long-arrow-right: "\f178"; @long-arrow-up: "\f176"; +@low-vision: "\f2a8"; @magic: "\f0d0"; @magnet: "\f076"; @mail-forward: "\f064"; @@ -419,8 +445,10 @@ @minus-circle: "\f056"; @minus-square: "\f146"; @minus-square-o: "\f147"; +@mixcloud: "\f289"; @mobile: "\f10b"; @mobile-phone: "\f10b"; +@modx: "\f285"; @money: "\f0d6"; @moon-o: "\f186"; @mortar-board: "\f19d"; @@ -447,18 +475,22 @@ @paragraph: "\f1dd"; @paste: "\f0ea"; @pause: "\f04c"; +@pause-circle: "\f28b"; +@pause-circle-o: "\f28c"; @paw: "\f1b0"; @paypal: "\f1ed"; @pencil: "\f040"; @pencil-square: "\f14b"; @pencil-square-o: "\f044"; +@percent: "\f295"; @phone: "\f095"; @phone-square: "\f098"; @photo: "\f03e"; @picture-o: "\f03e"; @pie-chart: "\f200"; -@pied-piper: "\f1a7"; +@pied-piper: "\f2ae"; @pied-piper-alt: "\f1a8"; +@pied-piper-pp: "\f1a7"; @pinterest: "\f0d2"; @pinterest-p: "\f231"; @pinterest-square: "\f0d3"; @@ -473,11 +505,13 @@ @plus-square-o: "\f196"; @power-off: "\f011"; @print: "\f02f"; +@product-hunt: "\f288"; @puzzle-piece: "\f12e"; @qq: "\f1d6"; @qrcode: "\f029"; @question: "\f128"; @question-circle: "\f059"; +@question-circle-o: "\f29c"; @quote-left: "\f10d"; @quote-right: "\f10e"; @ra: "\f1d0"; @@ -485,6 +519,7 @@ @rebel: "\f1d0"; @recycle: "\f1b8"; @reddit: "\f1a1"; +@reddit-alien: "\f281"; @reddit-square: "\f1a2"; @refresh: "\f021"; @registered: "\f25d"; @@ -494,6 +529,7 @@ @repeat: "\f01e"; @reply: "\f112"; @reply-all: "\f122"; +@resistance: "\f1d0"; @retweet: "\f079"; @rmb: "\f157"; @road: "\f018"; @@ -509,6 +545,7 @@ @safari: "\f267"; @save: "\f0c7"; @scissors: "\f0c4"; +@scribd: "\f28a"; @search: "\f002"; @search-minus: "\f010"; @search-plus: "\f00e"; @@ -526,10 +563,14 @@ @shield: "\f132"; @ship: "\f21a"; @shirtsinbulk: "\f214"; +@shopping-bag: "\f290"; +@shopping-basket: "\f291"; @shopping-cart: "\f07a"; @sign-in: "\f090"; +@sign-language: "\f2a7"; @sign-out: "\f08b"; @signal: "\f012"; +@signing: "\f2a7"; @simplybuilt: "\f215"; @sitemap: "\f0e8"; @skyatlas: "\f216"; @@ -538,6 +579,9 @@ @sliders: "\f1de"; @slideshare: "\f1e7"; @smile-o: "\f118"; +@snapchat: "\f2ab"; +@snapchat-ghost: "\f2ac"; +@snapchat-square: "\f2ad"; @soccer-ball-o: "\f1e3"; @sort: "\f0dc"; @sort-alpha-asc: "\f15d"; @@ -573,6 +617,8 @@ @sticky-note: "\f249"; @sticky-note-o: "\f24a"; @stop: "\f04d"; +@stop-circle: "\f28d"; +@stop-circle-o: "\f28e"; @street-view: "\f21d"; @strikethrough: "\f0cc"; @stumbleupon: "\f1a4"; @@ -598,6 +644,7 @@ @th: "\f00a"; @th-large: "\f009"; @th-list: "\f00b"; +@themeisle: "\f2b2"; @thumb-tack: "\f08d"; @thumbs-down: "\f165"; @thumbs-o-down: "\f088"; @@ -637,12 +684,14 @@ @umbrella: "\f0e9"; @underline: "\f0cd"; @undo: "\f0e2"; +@universal-access: "\f29a"; @university: "\f19c"; @unlink: "\f127"; @unlock: "\f09c"; @unlock-alt: "\f13e"; @unsorted: "\f0dc"; @upload: "\f093"; +@usb: "\f287"; @usd: "\f155"; @user: "\f007"; @user-md: "\f0f0"; @@ -654,11 +703,14 @@ @venus-double: "\f226"; @venus-mars: "\f228"; @viacoin: "\f237"; +@viadeo: "\f2a9"; +@viadeo-square: "\f2aa"; @video-camera: "\f03d"; @vimeo: "\f27d"; @vimeo-square: "\f194"; @vine: "\f1ca"; @vk: "\f189"; +@volume-control-phone: "\f2a0"; @volume-down: "\f027"; @volume-off: "\f026"; @volume-up: "\f028"; @@ -668,11 +720,14 @@ @weixin: "\f1d7"; @whatsapp: "\f232"; @wheelchair: "\f193"; +@wheelchair-alt: "\f29b"; @wifi: "\f1eb"; @wikipedia-w: "\f266"; @windows: "\f17a"; @won: "\f159"; @wordpress: "\f19a"; +@wpbeginner: "\f297"; +@wpforms: "\f298"; @wrench: "\f0ad"; @xing: "\f168"; @xing-square: "\f169"; @@ -683,7 +738,7 @@ @yc-square: "\f1d4"; @yelp: "\f1e9"; @yen: "\f157"; +@yoast: "\f2b1"; @youtube: "\f167"; @youtube-play: "\f16a"; @youtube-square: "\f166"; - diff --git a/modules/system/assets/ui/less/list.less b/modules/system/assets/ui/less/list.less index 0837f8f..e14b163 100644 --- a/modules/system/assets/ui/less/list.less +++ b/modules/system/assets/ui/less/list.less @@ -284,6 +284,57 @@ table.table.data { text-align: center; } + th.list-cell-type-number, + td.list-cell-type-number { + text-align: right; + } + + // + // Labels + // + + .list-badge { + display: inline-block; + position: relative; + top: -1px; + margin: 0 5px 0 0; + padding: 1px 0 0 0; + font-size: 10px; + width: 15px; + height: 15px; + text-align: center; + border-radius: @border-radius-base; + color: #fff; + + &.badge-default { + background: @gray-light; + } + + &.badge-primary { + background: @brand-primary; + } + + &.badge-success { + background: @brand-success; + } + + &.badge-info { + background: @brand-info; + } + + &.badge-warning { + background: @brand-warning; + } + + &.badge-danger { + background: @brand-danger; + } + } + + // + // Checkbox + // + .list-checkbox { width: 52px; vertical-align: top; @@ -312,6 +363,10 @@ table.table.data { padding: 18px 0 0 @padding-standard; } + // + // Trees + // + .list-tree { width: 10px; padding: 0; diff --git a/modules/system/assets/ui/less/toolbar.less b/modules/system/assets/ui/less/toolbar.less index 860aa15..0951c94 100644 --- a/modules/system/assets/ui/less/toolbar.less +++ b/modules/system/assets/ui/less/toolbar.less @@ -60,6 +60,10 @@ } } + .dropdown > .btn { + margin-right: 0; + } + .btn-group { > .btn, > .dropdown { margin-right: 0; diff --git a/modules/system/assets/ui/storm-min.js b/modules/system/assets/ui/storm-min.js index 213c808..526cce4 100644 --- a/modules/system/assets/ui/storm-min.js +++ b/modules/system/assets/ui/storm-min.js @@ -1354,7 +1354,9 @@ DecoratorClass.displayName=SuperClass.displayName;function ctr(){this.constructo DecoratedClass.prototype=new ctr();for(var m=0;m');var message=this.options.get('translations').get(params.message);$message.append(escapeMarkup(message(params.args)));$message[0].className+=' select2-results__message';this.$results.append($message);};Results.prototype.hideMessages=function(){this.$results.find('.select2-results__message').remove();};Results.prototype.append=function(data){this.hideLoading();var $options=[];if(data.results==null||data.results.length===0){if(this.$results.children().length===0){this.trigger('results:message',{message:'noResults'});} return;} data.results=this.sort(data.results);for(var d=0;d-1)){$option.attr('aria-selected','true');}else{$option.attr('aria-selected','false');}});var $selected=$options.filter('[aria-selected=true]');if($selected.length>0){$selected.first().trigger('mouseenter');}else{$options.first().trigger('mouseenter');}});};Results.prototype.showLoading=function(params){this.hideLoading();var loadingMore=this.options.get('translations').get('searching');var loading={disabled:true,loading:true,text:loadingMore(params)};var $loading=this.option(loading);$loading.className+=' loading-results';this.$results.prepend($loading);};Results.prototype.hideLoading=function(){this.$results.find('.loading-results').remove();};Results.prototype.option=function(data){var option=document.createElement('li');option.className='select2-results__option';var attrs={'role':'treeitem','aria-selected':'false'};if(data.disabled){delete attrs['aria-selected'];attrs['aria-disabled']='true';} +this.$results.append($options);};Results.prototype.position=function($results,$dropdown){var $resultsContainer=$dropdown.find('.select2-results');$resultsContainer.append($results);};Results.prototype.sort=function(data){var sorter=this.options.get('sorter');return sorter(data);};Results.prototype.highlightFirstItem=function(){var $options=this.$results.find('.select2-results__option[aria-selected]');var $selected=$options.filter('[aria-selected=true]');if($selected.length>0){$selected.first().trigger('mouseenter');}else{$options.first().trigger('mouseenter');} +this.ensureHighlightVisible();};Results.prototype.setClasses=function(){var self=this;this.data.current(function(selected){var selectedIds=$.map(selected,function(s){return s.id.toString();});var $options=self.$results.find('.select2-results__option[aria-selected]');$options.each(function(){var $option=$(this);var item=$.data(this,'data');var id=''+item.id;if((item.element!=null&&item.element.selected)||(item.element==null&&$.inArray(id,selectedIds)>-1)){$option.attr('aria-selected','true');}else{$option.attr('aria-selected','false');}});});};Results.prototype.showLoading=function(params){this.hideLoading();var loadingMore=this.options.get('translations').get('searching');var loading={disabled:true,loading:true,text:loadingMore(params)};var $loading=this.option(loading);$loading.className+=' loading-results';this.$results.prepend($loading);};Results.prototype.hideLoading=function(){this.$results.find('.loading-results').remove();};Results.prototype.option=function(data){var option=document.createElement('li');option.className='select2-results__option';var attrs={'role':'treeitem','aria-selected':'false'};if(data.disabled){delete attrs['aria-selected'];attrs['aria-disabled']='true';} if(data.id==null){delete attrs['aria-selected'];} if(data._resultId!=null){option.id=data._resultId;} if(data.title){option.title=data.title;} @@ -1378,9 +1381,9 @@ if(data.children){attrs.role='group';attrs['aria-label']=data.text;delete attrs[ for(var attr in attrs){var val=attrs[attr];option.setAttribute(attr,val);} if(data.children){var $option=$(option);var label=document.createElement('strong');label.className='select2-results__group';var $label=$(label);this.template(data,label);var $children=[];for(var c=0;c',{'class':'select2-results__options select2-results__options--nested'});$childrenContainer.append($children);$option.append(label);$option.append($childrenContainer);}else{this.template(data,option);} -$.data(option,'data',data);return option;};Results.prototype.bind=function(container,$container){var self=this;var id=container.id+'-results';this.$results.attr('id',id);container.on('results:all',function(params){self.clear();self.append(params.data);if(container.isOpen()){self.setClasses();}});container.on('results:append',function(params){self.append(params.data);if(container.isOpen()){self.setClasses();}});container.on('query',function(params){self.hideMessages();self.showLoading(params);});container.on('select',function(){if(!container.isOpen()){return;} -self.setClasses();});container.on('unselect',function(){if(!container.isOpen()){return;} -self.setClasses();});container.on('open',function(){self.$results.attr('aria-expanded','true');self.$results.attr('aria-hidden','false');self.setClasses();self.ensureHighlightVisible();});container.on('close',function(){self.$results.attr('aria-expanded','false');self.$results.attr('aria-hidden','true');self.$results.removeAttr('aria-activedescendant');});container.on('results:toggle',function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return;} +$.data(option,'data',data);return option;};Results.prototype.bind=function(container,$container){var self=this;var id=container.id+'-results';this.$results.attr('id',id);container.on('results:all',function(params){self.clear();self.append(params.data);if(container.isOpen()){self.setClasses();self.highlightFirstItem();}});container.on('results:append',function(params){self.append(params.data);if(container.isOpen()){self.setClasses();}});container.on('query',function(params){self.hideMessages();self.showLoading(params);});container.on('select',function(){if(!container.isOpen()){return;} +self.setClasses();self.highlightFirstItem();});container.on('unselect',function(){if(!container.isOpen()){return;} +self.setClasses();self.highlightFirstItem();});container.on('open',function(){self.$results.attr('aria-expanded','true');self.$results.attr('aria-hidden','false');self.setClasses();self.ensureHighlightVisible();});container.on('close',function(){self.$results.attr('aria-expanded','false');self.$results.attr('aria-hidden','true');self.$results.removeAttr('aria-activedescendant');});container.on('results:toggle',function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return;} $highlighted.trigger('mouseup');});container.on('results:select',function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return;} var data=$highlighted.data('data');if($highlighted.attr('aria-selected')=='true'){self.trigger('close',{});}else{self.trigger('select',{data:data});}});container.on('results:previous',function(){var $highlighted=self.getHighlightedResults();var $options=self.$results.find('[aria-selected]');var currentIndex=$options.index($highlighted);if(currentIndex===0){return;} var nextIndex=currentIndex-1;if($highlighted.length===0){nextIndex=0;} @@ -1459,7 +1462,7 @@ if(typeof options.data==='function'){options.data=options.data.call(this.$elemen function request(){var $request=options.transport(options,function(data){var results=self.processResults(data,params);if(self.options.get('debug')&&window.console&&console.error){if(!results||!results.results||!$.isArray(results.results)){console.error('Select2: The AJAX results did not return an array in the '+'`results` key of the response.');}} callback(results);},function(){if($request.status&&$request.status==='0'){return;} self.trigger('results:message',{message:'errorLoading'});});self._request=$request;} -if(this.ajaxOptions.delay&¶ms.term!==''){if(this._queryTimeout){window.clearTimeout(this._queryTimeout);} +if(this.ajaxOptions.delay&¶ms.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout);} this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay);}else{request();}};return AjaxAdapter;});S2.define('select2/data/tags',['jquery'],function($){function Tags(decorated,$element,options){var tags=options.get('tags');var createTag=options.get('createTag');if(createTag!==undefined){this.createTag=createTag;} var insertTag=options.get('insertTag');if(insertTag!==undefined){this.insertTag=insertTag;} decorated.call(this,$element,options);if($.isArray(tags)){for(var t=0;t=1){return matches[1];}} return null;} -return method;};Select2.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container);};Select2.prototype._registerDomEvents=function(){var self=this;this.$element.on('change.select2',function(){self.dataAdapter.current(function(data){self.trigger('selection:update',{data:data});});});this.$element.on('focus.select2',function(evt){self.trigger('focus',evt);});this._sync=Utils.bind(this._syncAttributes,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent('onpropertychange',this._sync);} -var observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(observer!=null){this._observer=new observer(function(mutations){$.each(mutations,self._sync);});this._observer.observe(this.$element[0],{attributes:true,subtree:false});}else if(this.$element[0].addEventListener){this.$element[0].addEventListener('DOMAttrModified',self._sync,false);}};Select2.prototype._registerDataEvents=function(){var self=this;this.dataAdapter.on('*',function(name,params){self.trigger(name,params);});};Select2.prototype._registerSelectionEvents=function(){var self=this;var nonRelayEvents=['toggle','focus'];this.selection.on('toggle',function(){self.toggleDropdown();});this.selection.on('focus',function(params){self.focus(params);});this.selection.on('*',function(name,params){if($.inArray(name,nonRelayEvents)!==-1){return;} +return method;};Select2.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container);};Select2.prototype._registerDomEvents=function(){var self=this;this.$element.on('change.select2',function(){self.dataAdapter.current(function(data){self.trigger('selection:update',{data:data});});});this.$element.on('focus.select2',function(evt){self.trigger('focus',evt);});this._syncA=Utils.bind(this._syncAttributes,this);this._syncS=Utils.bind(this._syncSubtree,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent('onpropertychange',this._syncA);} +var observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(observer!=null){this._observer=new observer(function(mutations){$.each(mutations,self._syncA);$.each(mutations,self._syncS);});this._observer.observe(this.$element[0],{attributes:true,childList:true,subtree:false});}else if(this.$element[0].addEventListener){this.$element[0].addEventListener('DOMAttrModified',self._syncA,false);this.$element[0].addEventListener('DOMNodeInserted',self._syncS,false);this.$element[0].addEventListener('DOMNodeRemoved',self._syncS,false);}};Select2.prototype._registerDataEvents=function(){var self=this;this.dataAdapter.on('*',function(name,params){self.trigger(name,params);});};Select2.prototype._registerSelectionEvents=function(){var self=this;var nonRelayEvents=['toggle','focus'];this.selection.on('toggle',function(){self.toggleDropdown();});this.selection.on('focus',function(params){self.focus(params);});this.selection.on('*',function(name,params){if($.inArray(name,nonRelayEvents)!==-1){return;} self.trigger(name,params);});};Select2.prototype._registerDropdownEvents=function(){var self=this;this.dropdown.on('*',function(name,params){self.trigger(name,params);});};Select2.prototype._registerResultsEvents=function(){var self=this;this.results.on('*',function(name,params){self.trigger(name,params);});};Select2.prototype._registerEvents=function(){var self=this;this.on('open',function(){self.$container.addClass('select2-container--open');});this.on('close',function(){self.$container.removeClass('select2-container--open');});this.on('enable',function(){self.$container.removeClass('select2-container--disabled');});this.on('disable',function(){self.$container.addClass('select2-container--disabled');});this.on('blur',function(){self.$container.removeClass('select2-container--focus');});this.on('query',function(params){if(!self.isOpen()){self.trigger('open',{});} this.dataAdapter.query(params,function(data){self.trigger('results:all',{data:data,query:params});});});this.on('query:append',function(params){this.dataAdapter.query(params,function(data){self.trigger('results:append',{data:data,query:params});});});this.on('keypress',function(evt){var key=evt.which;if(self.isOpen()){if(key===KEYS.ESC||key===KEYS.TAB||(key===KEYS.UP&&evt.altKey)){self.close();evt.preventDefault();}else if(key===KEYS.ENTER){self.trigger('results:select',{});evt.preventDefault();}else if((key===KEYS.SPACE&&evt.ctrlKey)){self.trigger('results:toggle',{});evt.preventDefault();}else if(key===KEYS.UP){self.trigger('results:previous',{});evt.preventDefault();}else if(key===KEYS.DOWN){self.trigger('results:next',{});evt.preventDefault();}}else{if(key===KEYS.ENTER||key===KEYS.SPACE||(key===KEYS.DOWN&&evt.altKey)){self.open();evt.preventDefault();}}});};Select2.prototype._syncAttributes=function(){this.options.set('disabled',this.$element.prop('disabled'));if(this.options.get('disabled')){if(this.isOpen()){this.close();} -this.trigger('disable',{});}else{this.trigger('enable',{});}};Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger;var preTriggerMap={'open':'opening','close':'closing','select':'selecting','unselect':'unselecting'};if(args===undefined){args={};} +this.trigger('disable',{});}else{this.trigger('enable',{});}};Select2.prototype._syncSubtree=function(evt,mutations){var changed=false;var self=this;if(evt&&evt.target&&(evt.target.nodeName!=='OPTION'&&evt.target.nodeName!=='OPTGROUP')){return;} +if(!mutations){changed=true;}else if(mutations.addedNodes&&mutations.addedNodes.length>0){for(var n=0;n0){changed=true;} +if(changed){this.dataAdapter.current(function(currentData){self.trigger('selection:update',{data:currentData});});}};Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger;var preTriggerMap={'open':'opening','close':'closing','select':'selecting','unselect':'unselecting'};if(args===undefined){args={};} if(name in preTriggerMap){var preTriggerName=preTriggerMap[name];var preTriggerArgs={prevented:false,name:name,args:args};actualTrigger.call(this,preTriggerName,preTriggerArgs);if(preTriggerArgs.prevented){args.prevented=true;return;}} actualTrigger.call(this,name,args);};Select2.prototype.toggleDropdown=function(){if(this.options.get('disabled')){return;} if(this.isOpen()){this.close();}else{this.open();}};Select2.prototype.open=function(){if(this.isOpen()){return;} @@ -1590,9 +1596,9 @@ var disabled=!args[0];this.$element.prop('disabled',disabled);};Select2.prototyp var data=[];this.dataAdapter.current(function(currentData){data=currentData;});return data;};Select2.prototype.val=function(args){if(this.options.get('debug')&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be'+' removed in later Select2 versions. Use $element.val() instead.');} if(args==null||args.length===0){return this.$element.val();} var newVal=args[0];if($.isArray(newVal)){newVal=$.map(newVal,function(obj){return obj.toString();});} -this.$element.val(newVal).trigger('change');};Select2.prototype.destroy=function(){this.$container.remove();if(this.$element[0].detachEvent){this.$element[0].detachEvent('onpropertychange',this._sync);} -if(this._observer!=null){this._observer.disconnect();this._observer=null;}else if(this.$element[0].removeEventListener){this.$element[0].removeEventListener('DOMAttrModified',this._sync,false);} -this._sync=null;this.$element.off('.select2');this.$element.attr('tabindex',this.$element.data('old-tabindex'));this.$element.removeClass('select2-hidden-accessible');this.$element.attr('aria-hidden','false');this.$element.removeData('select2');this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null;};Select2.prototype.render=function(){var $container=$(''+''+''+'');$container.attr('dir',this.options.get('dir'));this.$container=$container;this.$container.addClass('select2-container--'+this.options.get('theme'));$container.data('element',this.$element);return $container;};return Select2;});S2.define('select2/compat/utils',['jquery'],function($){function syncCssClasses($dest,$src,adapter){var classes,replacements=[],adapted;classes=$.trim($dest.attr('class'));if(classes){classes=''+classes;$(classes.split(/\s+/)).each(function(){if(this.indexOf('select2-')===0){replacements.push(this);}});} +this.$element.val(newVal).trigger('change');};Select2.prototype.destroy=function(){this.$container.remove();if(this.$element[0].detachEvent){this.$element[0].detachEvent('onpropertychange',this._syncA);} +if(this._observer!=null){this._observer.disconnect();this._observer=null;}else if(this.$element[0].removeEventListener){this.$element[0].removeEventListener('DOMAttrModified',this._syncA,false);this.$element[0].removeEventListener('DOMNodeInserted',this._syncS,false);this.$element[0].removeEventListener('DOMNodeRemoved',this._syncS,false);} +this._syncA=null;this._syncS=null;this.$element.off('.select2');this.$element.attr('tabindex',this.$element.data('old-tabindex'));this.$element.removeClass('select2-hidden-accessible');this.$element.attr('aria-hidden','false');this.$element.removeData('select2');this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null;};Select2.prototype.render=function(){var $container=$(''+''+''+'');$container.attr('dir',this.options.get('dir'));this.$container=$container;this.$container.addClass('select2-container--'+this.options.get('theme'));$container.data('element',this.$element);return $container;};return Select2;});S2.define('select2/compat/utils',['jquery'],function($){function syncCssClasses($dest,$src,adapter){var classes,replacements=[],adapted;classes=$.trim($dest.attr('class'));if(classes){classes=''+classes;$(classes.split(/\s+/)).each(function(){if(this.indexOf('select2-')===0){replacements.push(this);}});} classes=$.trim($src.attr('class'));if(classes){classes=''+classes;$(classes.split(/\s+/)).each(function(){if(this.indexOf('select2-')!==0){adapted=adapter(this);if(adapted!=null){replacements.push(adapted);}}});} $dest.attr('class',replacements.join(' '));} return{syncCssClasses:syncCssClasses};});S2.define('select2/compat/containerCss',['jquery','./utils'],function($,CompatUtils){function _containerAdapter(clazz){return null;} @@ -2528,8 +2534,7 @@ if($.oc.foundation===undefined) $.oc.foundation={} $.oc.foundation._proxyCounter=0 var Base=function(){this.proxiedMethods={}} -Base.prototype.dispose=function() -{for(var key in this.proxiedMethods){this.proxiedMethods[key]=null} +Base.prototype.dispose=function(){for(var key in this.proxiedMethods){this.proxiedMethods[key]=null} this.proxiedMethods=null} Base.prototype.proxy=function(method){if(method.ocProxyId===undefined){$.oc.foundation._proxyCounter++ method.ocProxyId=$.oc.foundation._proxyCounter} @@ -2610,14 +2615,14 @@ $(container).triggerHandler('dispose-control')}} $.oc.foundation.controlUtils=ControlUtils;$(document).on('ajaxBeforeReplace',function(ev){$.oc.foundation.controlUtils.disposeControls(ev.target)})}(window.jQuery);+function($){"use strict";var FlashMessage=function(options,el){var options=$.extend({},FlashMessage.DEFAULTS,options),$element=$(el) $('body > p.flash-message').remove() -if($element.length==0){$element=$('

    ').addClass(options.class).html(options.text)} +if($element.length==0){$element=$('

    ').addClass(options.class).html(options.text)} $element.addClass('flash-message fade') $element.attr('data-control',null) $element.append('') $element.on('click','button',remove) $element.on('click',remove) $(document.body).append($element) -setTimeout(function(){$element.addClass('in')},1) +setTimeout(function(){$element.addClass('in')},100) var timer=window.setTimeout(remove,options.interval*1000) function removeElement(){$element.remove()} function remove(){window.clearInterval(timer) @@ -2767,12 +2772,12 @@ this.$el.removeData('oc.datePicker') this.$el=null this.options=null BaseProto.dispose.call(this)} -DatePicker.prototype.initDatePicker=function(){var self=this -var pikadayOptions={yearRange:this.options.yearRange,format:this.getDateFormat(),setDefaultDate:moment().tz(this.timezone).format('l'),onOpen:function(){var $field=$(this._o.trigger) +DatePicker.prototype.initDatePicker=function(){var self=this,dateFormat=this.getDateFormat(),now=moment().tz(this.timezone).format(dateFormat) +var pikadayOptions={yearRange:this.options.yearRange,format:dateFormat,setDefaultDate:now,onOpen:function(){var $field=$(this._o.trigger) $(this.el).css({left:'auto',right:$(window).width()-$field.offset().left-$field.outerWidth()})},onSelect:function(){self.onSelectDatePicker.call(self,this.getMoment())}} var lang=this.getLang('datepicker',false) if(lang){pikadayOptions.i18n=lang} -this.$datePicker.val(this.getDataLockerValue('l')) +this.$datePicker.val(this.getDataLockerValue(dateFormat)) if(this.options.minDate){pikadayOptions.minDate=new Date(this.options.minDate)} if(this.options.maxDate){pikadayOptions.maxDate=new Date(this.options.maxDate)} this.$datePicker.pikaday(pikadayOptions)} @@ -2784,8 +2789,9 @@ this.$dataLocker.val(lockerValue)} DatePicker.prototype.getDatePickerValue=function(){var value=this.$datePicker.val() if(!this.hasDate||!value){return moment.tz(this.appTimezone).tz(this.timezone).format(this.dbDateFormat)} return moment(value,this.getDateFormat()).format(this.dbDateFormat)} -DatePicker.prototype.getDateFormat=function(){var format=this.options.format -if(this.locale){format=moment().locale(this.locale).localeData().longDateFormat('l')} +DatePicker.prototype.getDateFormat=function(){var format='YYYY-MM-DD' +if(this.options.format){format=this.options.format} +else if(this.locale){format=moment().locale(this.locale).localeData().longDateFormat('l')} return format} DatePicker.prototype.initTimePicker=function(){this.$timePicker.clockpicker({autoclose:'true',placement:'bottom',align:'right',twelvehour:this.isTimeTwelveHour()}) this.$timePicker.val(this.getDataLockerValue(this.getTimeFormat()))} @@ -2816,7 +2822,7 @@ if(!this.appTimezone){this.appTimezone='UTC'} if(!this.timezone){this.timezone='UTC'}} DatePicker.prototype.getLang=function(name,defaultValue){if($.oc===undefined||$.oc.lang===undefined){return defaultValue} return $.oc.lang.get(name,defaultValue)} -DatePicker.DEFAULTS={minDate:null,maxDate:null,format:'YYYY-MM-DD',yearRange:10} +DatePicker.DEFAULTS={minDate:null,maxDate:null,format:null,yearRange:10} var old=$.fn.datePicker $.fn.datePicker=function(option){var args=Array.prototype.slice.call(arguments,1),items,result items=this.each(function(){var $this=$(this) @@ -2861,7 +2867,7 @@ if(typeof option=='string')data[option].apply(data,args)})} $.fn.toolbar.Constructor=Toolbar $.fn.toolbar.noConflict=function(){$.fn.toolbar=old return this} -$(document).on('render',function(){$('[data-control=toolbar]').toolbar()})}(window.jQuery);+function($){"use strict";var FilterWidget=function(element,options){var $el=this.$el=$(element);this.options=options||{} +$(document).on('render',function(){$('[data-control=toolbar]').toolbar()})}(window.jQuery);+function($){"use strict";var FilterWidget=function(element,options){this.$el=$(element);this.options=options||{} this.scopeValues={} this.$activeScope=null this.activeScopeName=null @@ -3155,9 +3161,7 @@ FilterWidget.prototype.initRegion=function(){this.locale=$('meta[name="backend-l this.timezone=$('meta[name="backend-timezone"]').attr('content') this.appTimezone=$('meta[name="app-timezone"]').attr('content') if(!this.appTimezone){this.appTimezone='UTC'} -if(!this.timezone){this.timezone='UTC'}}}(window.jQuery);(function($){$(document).render(function(){if(Modernizr.touch) -return -var formatSelectOption=function(state){if(!state.id) +if(!this.timezone){this.timezone='UTC'}}}(window.jQuery);(function($){$(document).render(function(){var formatSelectOption=function(state){if(!state.id) return state.text;var $option=$(state.element),iconClass=$option.data('icon'),imageSrc=$option.data('image') if(iconClass) return' '+state.text @@ -3180,9 +3184,10 @@ if($element.hasClass('select-no-dropdown')){extraOptions.selectOnClose=true extraOptions.closeOnSelect=false $element.on('select2:closing',function(){$('.select2-dropdown.select-no-dropdown:first .select2-results__option--highlighted').removeClass('select2-results__option--highlighted') $('.select2-dropdown.select-no-dropdown:first .select2-results__option:first').addClass('select2-results__option--highlighted')})}} +var placeholder=$element.data('placeholder') +if(placeholder){extraOptions.placeholder=placeholder} $element.select2($.extend({},selectOptions,extraOptions))})}) -$(document).on('disable','select.custom-select',function(event,status){$(this).select2('enable',!status)}) -$(document).on('focus','select.custom-select',function(event){setTimeout($.proxy(function(){$(this).select2('focus')},this),10)})})(jQuery);+function($){"use strict";var LoadIndicator=function(element,options){var $el=this.$el=$(element) +$(document).on('disable','select.custom-select',function(event,status){if($(this).data('select2')!=null){$(this).select2('enable',!status)}})})(jQuery);+function($){"use strict";var LoadIndicator=function(element,options){this.$el=$(element) this.options=options||{} this.tally=0 this.show()} @@ -3230,7 +3235,7 @@ return this.counter++ if(this.counter>1) return -var self=this,$window=$(window);if(event!==undefined&&event.clientY!==undefined){self.indicator.css({left:event.clientX+15,top:event.clientY+15})} +var self=this;if(event!==undefined&&event.clientY!==undefined){self.indicator.css({left:event.clientX+15,top:event.clientY+15})} this.indicator.removeClass('hide') $(window).on('mousemove.cursorLoadIndicator',function(e){self.indicator.css({left:e.clientX+15,top:e.clientY+15,})})} CursorLoadIndicator.prototype.hide=function(force){if(Modernizr.touch) @@ -3574,7 +3579,8 @@ this.defaultDataSetOptions={shadowSize:0} var parsedOptions={} try{parsedOptions=JSON.parse(JSON.stringify(eval("({"+options.chartOptions+"})")));}catch(e){throw new Error('Error parsing the data-chart-options attribute value. '+e);} this.chartOptions=$.extend({},this.chartOptions,parsedOptions) -this.options=options,this.$el=$(element) +this.options=options +this.$el=$(element) this.fullDataSet=[] this.resetZoomLink=$(options.resetZoomLink) this.$el.trigger('oc.chartLineInit',[this]) @@ -3733,7 +3739,7 @@ $.fn.rowLink.Constructor=RowLink $.fn.rowLink.noConflict=function(){$.fn.rowLink=old return this} $(document).render(function(){$('[data-control="rowlink"]').rowLink()})}(window.jQuery);+function($){"use strict";var Base=$.oc.foundation.base,BaseProto=Base.prototype -var ChangeMonitor=function(element,options){var $el=this.$el=$(element);this.paused=false +var ChangeMonitor=function(element,options){this.$el=$(element);this.paused=false this.options=options||{} $.oc.foundation.controlUtils.markDisposable(element) Base.call(this) @@ -3856,7 +3862,7 @@ if(typeof option=='string')data[option].apply(data,args)})} $.fn.hotKey.Constructor=HotKey $.fn.hotKey.noConflict=function(){$.fn.hotKey=old return this} -$(document).render(function(){$('[data-hotkey]').hotKey()})}(window.jQuery);+function($){"use strict";var LATIN_MAP={'À':'A','Á':'A','Â':'A','Ã':'A','Ä':'A','Å':'A','Æ':'AE','Ç':'C','È':'E','É':'E','Ê':'E','Ë':'E','Ì':'I','Í':'I','Î':'I','Ï':'I','Ð':'D','Ñ':'N','Ò':'O','Ó':'O','Ô':'O','Õ':'O','Ö':'O','Ő':'O','Ø':'O','Ù':'U','Ú':'U','Û':'U','Ü':'U','Ű':'U','Ý':'Y','Þ':'TH','Ÿ':'Y','ß':'ss','à':'a','á':'a','â':'a','ã':'a','ä':'a','å':'a','æ':'ae','ç':'c','è':'e','é':'e','ê':'e','ë':'e','ì':'i','í':'i','î':'i','ï':'i','ð':'d','ñ':'n','ò':'o','ó':'o','ô':'o','õ':'o','ö':'o','ő':'o','ø':'o','ō':'o','œ':'oe','ù':'u','ú':'u','û':'u','ü':'u','ű':'u','ý':'y','þ':'th','ÿ':'y'},LATIN_SYMBOLS_MAP={'©':'(c)'},GREEK_MAP={'α':'a','β':'b','γ':'g','δ':'d','ε':'e','ζ':'z','η':'h','θ':'8','ι':'i','κ':'k','λ':'l','μ':'m','ν':'n','ξ':'3','ο':'o','π':'p','ρ':'r','σ':'s','τ':'t','υ':'y','φ':'f','χ':'x','ψ':'ps','ω':'w','ά':'a','έ':'e','ί':'i','ό':'o','ύ':'y','ή':'h','ώ':'w','ς':'s','ϊ':'i','ΰ':'y','ϋ':'y','ΐ':'i','Α':'A','Β':'B','Γ':'G','Δ':'D','Ε':'E','Ζ':'Z','Η':'H','Θ':'8','Ι':'I','Κ':'K','Λ':'L','Μ':'M','Ν':'N','Ξ':'3','Ο':'O','Π':'P','Ρ':'R','Σ':'S','Τ':'T','Υ':'Y','Φ':'F','Χ':'X','Ψ':'PS','Ω':'W','Ά':'A','Έ':'E','Ί':'I','Ό':'O','Ύ':'Y','Ή':'H','Ώ':'W','Ϊ':'I','Ϋ':'Y'},TURKISH_MAP={'ş':'s','Ş':'S','ı':'i','İ':'I','ç':'c','Ç':'C','ü':'u','Ü':'U','ö':'o','Ö':'O','ğ':'g','Ğ':'G'},RUSSIAN_MAP={'а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'yo','ж':'zh','з':'z','и':'i','й':'j','к':'k','л':'l','м':'m','н':'n','о':'o','п':'p','р':'r','с':'s','т':'t','у':'u','ф':'f','х':'h','ц':'c','ч':'ch','ш':'sh','щ':'sh','ъ':'','ы':'y','ь':'','э':'e','ю':'yu','я':'ya','А':'A','Б':'B','В':'V','Г':'G','Д':'D','Е':'E','Ё':'Yo','Ж':'Zh','З':'Z','И':'I','Й':'J','К':'K','Л':'L','М':'M','Н':'N','О':'O','П':'P','Р':'R','С':'S','Т':'T','У':'U','Ф':'F','Х':'H','Ц':'C','Ч':'Ch','Ш':'Sh','Щ':'Sh','Ъ':'','Ы':'Y','Ь':'','Э':'E','Ю':'Yu','Я':'Ya'},UKRAINIAN_MAP={'Є':'Ye','І':'I','Ї':'Yi','Ґ':'G','є':'ye','і':'i','ї':'yi','ґ':'g'},CZECH_MAP={'č':'c','ď':'d','ě':'e','ň':'n','ř':'r','š':'s','ť':'t','ů':'u','ž':'z','Č':'C','Ď':'D','Ě':'E','Ň':'N','Ř':'R','Š':'S','Ť':'T','Ů':'U','Ž':'Z'},POLISH_MAP={'ą':'a','ć':'c','ę':'e','ł':'l','ń':'n','ó':'o','ś':'s','ź':'z','ż':'z','Ą':'A','Ć':'C','Ę':'E','Ł':'L','Ń':'N','Ó':'O','Ś':'S','Ź':'Z','Ż':'Z'},LATVIAN_MAP={'ā':'a','č':'c','ē':'e','ģ':'g','ī':'i','ķ':'k','ļ':'l','ņ':'n','š':'s','ū':'u','ž':'z','Ā':'A','Č':'C','Ē':'E','Ģ':'G','Ī':'I','Ķ':'K','Ļ':'L','Ņ':'N','Š':'S','Ū':'U','Ž':'Z'},ARABIC_MAP={'أ':'a','ب':'b','ت':'t','ث':'th','ج':'g','ح':'h','خ':'kh','د':'d','ذ':'th','ر':'r','ز':'z','س':'s','ش':'sh','ص':'s','ض':'d','ط':'t','ظ':'th','ع':'aa','غ':'gh','ف':'f','ق':'k','ك':'k','ل':'l','م':'m','ن':'n','ه':'h','و':'o','ي':'y'},PERSIAN_MAP={'آ':'a','ا':'a','پ':'p','چ':'ch','ژ':'zh','ک':'k','گ':'gh','ی':'y'},LITHUANIAN_MAP={'ą':'a','č':'c','ę':'e','ė':'e','į':'i','š':'s','ų':'u','ū':'u','ž':'z','Ą':'A','Č':'C','Ę':'E','Ė':'E','Į':'I','Š':'S','Ų':'U','Ū':'U','Ž':'Z'},SERBIAN_MAP={'ђ':'dj','ј':'j','љ':'lj','њ':'nj','ћ':'c','џ':'dz','đ':'dj','Ђ':'Dj','Ј':'j','Љ':'Lj','Њ':'Nj','Ћ':'C','Џ':'Dz','Đ':'Dj'},AZERBAIJANI_MAP={'ç':'c','ə':'e','ğ':'g','ı':'i','ö':'o','ş':'s','ü':'u','Ç':'C','Ə':'E','Ğ':'G','İ':'I','Ö':'O','Ş':'S','Ü':'U'},ROMANIAN_MAP={'ă':'a','â':'a','î':'i','ș':'s','ț':'t','Ă':'A','Â':'A','Î':'I','Ș':'S','Ț':'T'},SPECIFIC_MAPS={'de':{'Ä':'AE','Ö':'OE','Ü':'UE','ä':'ae','ö':'oe','ü':'ue'}},ALL_MAPS=[LATIN_MAP,LATIN_SYMBOLS_MAP,GREEK_MAP,TURKISH_MAP,RUSSIAN_MAP,UKRAINIAN_MAP,CZECH_MAP,POLISH_MAP,LATVIAN_MAP,ARABIC_MAP,PERSIAN_MAP,LITHUANIAN_MAP,SERBIAN_MAP,AZERBAIJANI_MAP,ROMANIAN_MAP] +$(document).render(function(){$('[data-hotkey]').hotKey()})}(window.jQuery);+function($){"use strict";var VIETNAMESE_MAP={'Á':'A','À':'A','Ã':'A','Ả':'A','Ạ':'A','Ắ':'A','Ằ':'A','Ẵ':'A','Ẳ':'A','Ặ':'A','Ấ':'A','Ầ':'A','Ẫ':'A','Ẩ':'A','Ậ':'A','Đ':'D','É':'E','È':'E','Ẽ':'E','Ẻ':'E','Ẹ':'E','Ế':'E','Ề':'E','Ễ':'E','Ể':'E','Ệ':'E','Ó':'O','Ò':'O','Ỏ':'O','Õ':'O','Ọ':'O','Ố':'O','Ồ':'O','Ổ':'O','Ỗ':'O','Ộ':'O','Ớ':'O','Ờ':'O','Ở':'O','Ỡ':'O','Ợ':'O','Í':'I','Ì':'I','Ỉ':'I','Ĩ':'I','Ị':'I','Ú':'U','Ù':'U','Ủ':'U','Ũ':'U','Ụ':'U','Ứ':'U','Ừ':'U','Ử':'U','Ữ':'U','Ự':'U','Ý':'Y','Ỳ':'Y','Ỷ':'Y','Ỹ':'Y','Ỵ':'Y','á':'a','à':'a','ã':'a','ả':'a','ạ':'a','ắ':'a','ằ':'a','ẵ':'a','ẳ':'a','ặ':'a','ấ':'a','ầ':'a','ẫ':'a','ẩ':'a','ậ':'a','đ':'d','é':'e','è':'e','ẽ':'e','ẻ':'e','ẹ':'e','ế':'e','ề':'e','ễ':'e','ể':'e','ệ':'e','ó':'o','ò':'o','ỏ':'o','õ':'o','ọ':'o','ố':'o','ồ':'o','ổ':'o','ỗ':'o','ộ':'o','ớ':'o','ờ':'o','ở':'o','ỡ':'o','ợ':'o','í':'i','ì':'i','ỉ':'i','ĩ':'i','ị':'i','ú':'u','ù':'u','ủ':'u','ũ':'u','ụ':'u','ứ':'u','ừ':'u','ử':'u','ữ':'u','ự':'u','ý':'y','ỳ':'y','ỷ':'y','ỹ':'y','ỵ':'y'},LATIN_MAP={'À':'A','Á':'A','Â':'A','Ã':'A','Ä':'A','Å':'A','Æ':'AE','Ç':'C','È':'E','É':'E','Ê':'E','Ë':'E','Ì':'I','Í':'I','Î':'I','Ï':'I','Ð':'D','Ñ':'N','Ò':'O','Ó':'O','Ô':'O','Õ':'O','Ö':'O','Ő':'O','Ø':'O','Ù':'U','Ú':'U','Û':'U','Ü':'U','Ű':'U','Ý':'Y','Þ':'TH','Ÿ':'Y','ß':'ss','à':'a','á':'a','â':'a','ã':'a','ä':'a','å':'a','æ':'ae','ç':'c','è':'e','é':'e','ê':'e','ë':'e','ì':'i','í':'i','î':'i','ï':'i','ð':'d','ñ':'n','ò':'o','ó':'o','ô':'o','õ':'o','ö':'o','ő':'o','ø':'o','ō':'o','œ':'oe','ù':'u','ú':'u','û':'u','ü':'u','ű':'u','ý':'y','þ':'th','ÿ':'y'},LATIN_SYMBOLS_MAP={'©':'(c)'},GREEK_MAP={'α':'a','β':'b','γ':'g','δ':'d','ε':'e','ζ':'z','η':'h','θ':'8','ι':'i','κ':'k','λ':'l','μ':'m','ν':'n','ξ':'3','ο':'o','π':'p','ρ':'r','σ':'s','τ':'t','υ':'y','φ':'f','χ':'x','ψ':'ps','ω':'w','ά':'a','έ':'e','ί':'i','ό':'o','ύ':'y','ή':'h','ώ':'w','ς':'s','ϊ':'i','ΰ':'y','ϋ':'y','ΐ':'i','Α':'A','Β':'B','Γ':'G','Δ':'D','Ε':'E','Ζ':'Z','Η':'H','Θ':'8','Ι':'I','Κ':'K','Λ':'L','Μ':'M','Ν':'N','Ξ':'3','Ο':'O','Π':'P','Ρ':'R','Σ':'S','Τ':'T','Υ':'Y','Φ':'F','Χ':'X','Ψ':'PS','Ω':'W','Ά':'A','Έ':'E','Ί':'I','Ό':'O','Ύ':'Y','Ή':'H','Ώ':'W','Ϊ':'I','Ϋ':'Y'},TURKISH_MAP={'ş':'s','Ş':'S','ı':'i','İ':'I','ç':'c','Ç':'C','ü':'u','Ü':'U','ö':'o','Ö':'O','ğ':'g','Ğ':'G'},RUSSIAN_MAP={'а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'yo','ж':'zh','з':'z','и':'i','й':'j','к':'k','л':'l','м':'m','н':'n','о':'o','п':'p','р':'r','с':'s','т':'t','у':'u','ф':'f','х':'h','ц':'c','ч':'ch','ш':'sh','щ':'sh','ъ':'','ы':'y','ь':'','э':'e','ю':'yu','я':'ya','А':'A','Б':'B','В':'V','Г':'G','Д':'D','Е':'E','Ё':'Yo','Ж':'Zh','З':'Z','И':'I','Й':'J','К':'K','Л':'L','М':'M','Н':'N','О':'O','П':'P','Р':'R','С':'S','Т':'T','У':'U','Ф':'F','Х':'H','Ц':'C','Ч':'Ch','Ш':'Sh','Щ':'Sh','Ъ':'','Ы':'Y','Ь':'','Э':'E','Ю':'Yu','Я':'Ya'},UKRAINIAN_MAP={'Є':'Ye','І':'I','Ї':'Yi','Ґ':'G','є':'ye','і':'i','ї':'yi','ґ':'g'},CZECH_MAP={'č':'c','ď':'d','ě':'e','ň':'n','ř':'r','š':'s','ť':'t','ů':'u','ž':'z','Č':'C','Ď':'D','Ě':'E','Ň':'N','Ř':'R','Š':'S','Ť':'T','Ů':'U','Ž':'Z'},POLISH_MAP={'ą':'a','ć':'c','ę':'e','ł':'l','ń':'n','ó':'o','ś':'s','ź':'z','ż':'z','Ą':'A','Ć':'C','Ę':'E','Ł':'L','Ń':'N','Ó':'O','Ś':'S','Ź':'Z','Ż':'Z'},LATVIAN_MAP={'ā':'a','č':'c','ē':'e','ģ':'g','ī':'i','ķ':'k','ļ':'l','ņ':'n','š':'s','ū':'u','ž':'z','Ā':'A','Č':'C','Ē':'E','Ģ':'G','Ī':'I','Ķ':'K','Ļ':'L','Ņ':'N','Š':'S','Ū':'U','Ž':'Z'},ARABIC_MAP={'أ':'a','ب':'b','ت':'t','ث':'th','ج':'g','ح':'h','خ':'kh','د':'d','ذ':'th','ر':'r','ز':'z','س':'s','ش':'sh','ص':'s','ض':'d','ط':'t','ظ':'th','ع':'aa','غ':'gh','ف':'f','ق':'k','ك':'k','ل':'l','م':'m','ن':'n','ه':'h','و':'o','ي':'y'},PERSIAN_MAP={'آ':'a','ا':'a','پ':'p','چ':'ch','ژ':'zh','ک':'k','گ':'gh','ی':'y'},LITHUANIAN_MAP={'ą':'a','č':'c','ę':'e','ė':'e','į':'i','š':'s','ų':'u','ū':'u','ž':'z','Ą':'A','Č':'C','Ę':'E','Ė':'E','Į':'I','Š':'S','Ų':'U','Ū':'U','Ž':'Z'},SERBIAN_MAP={'ђ':'dj','ј':'j','љ':'lj','њ':'nj','ћ':'c','џ':'dz','đ':'dj','Ђ':'Dj','Ј':'j','Љ':'Lj','Њ':'Nj','Ћ':'C','Џ':'Dz','Đ':'Dj'},AZERBAIJANI_MAP={'ç':'c','ə':'e','ğ':'g','ı':'i','ö':'o','ş':'s','ü':'u','Ç':'C','Ə':'E','Ğ':'G','İ':'I','Ö':'O','Ş':'S','Ü':'U'},ROMANIAN_MAP={'ă':'a','â':'a','î':'i','ș':'s','ț':'t','Ă':'A','Â':'A','Î':'I','Ș':'S','Ț':'T'},SPECIFIC_MAPS={'de':{'Ä':'AE','Ö':'OE','Ü':'UE','ä':'ae','ö':'oe','ü':'ue'}},ALL_MAPS=[VIETNAMESE_MAP,LATIN_MAP,LATIN_SYMBOLS_MAP,GREEK_MAP,TURKISH_MAP,RUSSIAN_MAP,UKRAINIAN_MAP,CZECH_MAP,POLISH_MAP,LATVIAN_MAP,ARABIC_MAP,PERSIAN_MAP,LITHUANIAN_MAP,SERBIAN_MAP,AZERBAIJANI_MAP,ROMANIAN_MAP] var removeList=["a","an","as","at","before","but","by","for","from","is","in","into","like","of","off","on","onto","per","since","than","the","this","that","to","up","via","with"] var locale=$('meta[name="backend-locale"]').attr('content') var Downcoder={Initialize:function(){if(Downcoder.map){return;} @@ -3995,7 +4001,7 @@ $editorArea.codeEditor('getEditorObject').insert(this.textValue)} DragValue.prototype.handleClickContentEditable=function(){var sel,range,html;if(window.getSelection){sel=window.getSelection();if(sel.getRangeAt&&sel.rangeCount){range=sel.getRangeAt(0);range.deleteContents();range.insertNode(document.createTextNode(this.textValue));}} else if(document.selection&&document.selection.createRange){document.selection.createRange().text=this.textValue;}} DragValue.prototype.insertAtCaret=function(el,insertValue){if(document.selection){el.focus() -sel=document.selection.createRange() +var sel=document.selection.createRange() sel.text=insertValue el.focus()} else if(el.selectionStart||el.selectionStart=='0'){var startPos=el.selectionStart,endPos=el.selectionEnd,scrollTop=el.scrollTop @@ -4195,8 +4201,8 @@ data[option].apply(data,methodArgs)}})} $.fn.dragScroll.Constructor=DragScroll $.fn.dragScroll.noConflict=function(){$.fn.dragScroll=old return this}}(window.jQuery);+function($){"use strict";var Tab=function(element,options){var $el=this.$el=$(element);this.options=options||{} -this.$tabsContainer=$('.nav-tabs',$el) -this.$pagesContainer=$('.tab-content',$el) +this.$tabsContainer=$('.nav-tabs:first',$el) +this.$pagesContainer=$('.tab-content:first',$el) this.tabId='tabs'+$el.parents().length+Math.round(Math.random()*1000);if(this.options.closable!==undefined&&this.options.closable!==false) $el.attr('data-closable','') this.init()} @@ -6538,7 +6544,8 @@ $list.on('dragenter','> li',this.proxy(this.onDragEnter)) $list.on('dragleave','> li',this.proxy(this.onDragLeave)) $list.on('drop','> li',this.proxy(this.onDragDrop)) $list.on('dragend','> li',this.proxy(this.onDragEnd))} -ListSortable.prototype.unregisterListHandlers=function(list){$list.off('dragstart','> li',this.proxy(this.onDragStart)) +ListSortable.prototype.unregisterListHandlers=function(list){var $list=$(list) +$list.off('dragstart','> li',this.proxy(this.onDragStart)) $list.off('dragover','> li',this.proxy(this.onDragOver)) $list.off('dragenter','> li',this.proxy(this.onDragEnter)) $list.off('dragleave','> li',this.proxy(this.onDragLeave)) @@ -6555,8 +6562,7 @@ this.unregisterHandlers() this.options=null this.lists=[] BaseProto.dispose.call(this)} -ListSortable.prototype.elementBelongsToManagedList=function(element){for(var i=this.lists.length-1;i>=0;i--){var list=this.lists[i],children=[].slice.call(list.children) -if(children.indexOf(element)!==-1){return true}} +ListSortable.prototype.elementBelongsToManagedList=function(element){for(var i=this.lists.length-1;i>=0;i--){var list=this.lists[i],children=[].slice.call(list.children);if(children.indexOf(element)!==-1){return true}} return false} ListSortable.prototype.isDragStartAllowed=function(element){return true} ListSortable.prototype.elementIsPlaceholder=function(element){return element.getAttribute('class')==='list-sortable-placeholder'} diff --git a/modules/system/assets/ui/storm.css b/modules/system/assets/ui/storm.css index 9c81b4c..2f9900d 100644 --- a/modules/system/assets/ui/storm.css +++ b/modules/system/assets/ui/storm.css @@ -1057,7 +1057,7 @@ input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button" .oc-icon-stumbleupon:before,.icon-stumbleupon:before{content:"\f1a4"} .oc-icon-delicious:before,.icon-delicious:before{content:"\f1a5"} .oc-icon-digg:before,.icon-digg:before{content:"\f1a6"} -.oc-icon-pied-piper:before,.icon-pied-piper:before{content:"\f1a7"} +.oc-icon-pied-piper-pp:before,.icon-pied-piper-pp:before{content:"\f1a7"} .oc-icon-pied-piper-alt:before,.icon-pied-piper-alt:before{content:"\f1a8"} .oc-icon-drupal:before,.icon-drupal:before{content:"\f1a9"} .oc-icon-joomla:before,.icon-joomla:before{content:"\f1aa"} @@ -1095,7 +1095,7 @@ input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button" .oc-icon-jsfiddle:before,.icon-jsfiddle:before{content:"\f1cc"} .oc-icon-life-bouy:before,.icon-life-bouy:before,.oc-icon-life-buoy:before,.icon-life-buoy:before,.oc-icon-life-saver:before,.icon-life-saver:before,.oc-icon-support:before,.icon-support:before,.oc-icon-life-ring:before,.icon-life-ring:before{content:"\f1cd"} .oc-icon-circle-o-notch:before,.icon-circle-o-notch:before{content:"\f1ce"} -.oc-icon-ra:before,.icon-ra:before,.oc-icon-rebel:before,.icon-rebel:before{content:"\f1d0"} +.oc-icon-ra:before,.icon-ra:before,.oc-icon-resistance:before,.icon-resistance:before,.oc-icon-rebel:before,.icon-rebel:before{content:"\f1d0"} .oc-icon-ge:before,.icon-ge:before,.oc-icon-empire:before,.icon-empire:before{content:"\f1d1"} .oc-icon-git-square:before,.icon-git-square:before{content:"\f1d2"} .oc-icon-git:before,.icon-git:before{content:"\f1d3"} @@ -1259,6 +1259,55 @@ input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button" .oc-icon-vimeo:before,.icon-vimeo:before{content:"\f27d"} .oc-icon-black-tie:before,.icon-black-tie:before{content:"\f27e"} .oc-icon-fonticons:before,.icon-fonticons:before{content:"\f280"} +.oc-icon-reddit-alien:before,.icon-reddit-alien:before{content:"\f281"} +.oc-icon-edge:before,.icon-edge:before{content:"\f282"} +.oc-icon-credit-card-alt:before,.icon-credit-card-alt:before{content:"\f283"} +.oc-icon-codiepie:before,.icon-codiepie:before{content:"\f284"} +.oc-icon-modx:before,.icon-modx:before{content:"\f285"} +.oc-icon-fort-awesome:before,.icon-fort-awesome:before{content:"\f286"} +.oc-icon-usb:before,.icon-usb:before{content:"\f287"} +.oc-icon-product-hunt:before,.icon-product-hunt:before{content:"\f288"} +.oc-icon-mixcloud:before,.icon-mixcloud:before{content:"\f289"} +.oc-icon-scribd:before,.icon-scribd:before{content:"\f28a"} +.oc-icon-pause-circle:before,.icon-pause-circle:before{content:"\f28b"} +.oc-icon-pause-circle-o:before,.icon-pause-circle-o:before{content:"\f28c"} +.oc-icon-stop-circle:before,.icon-stop-circle:before{content:"\f28d"} +.oc-icon-stop-circle-o:before,.icon-stop-circle-o:before{content:"\f28e"} +.oc-icon-shopping-bag:before,.icon-shopping-bag:before{content:"\f290"} +.oc-icon-shopping-basket:before,.icon-shopping-basket:before{content:"\f291"} +.oc-icon-hashtag:before,.icon-hashtag:before{content:"\f292"} +.oc-icon-bluetooth:before,.icon-bluetooth:before{content:"\f293"} +.oc-icon-bluetooth-b:before,.icon-bluetooth-b:before{content:"\f294"} +.oc-icon-percent:before,.icon-percent:before{content:"\f295"} +.oc-icon-gitlab:before,.icon-gitlab:before{content:"\f296"} +.oc-icon-wpbeginner:before,.icon-wpbeginner:before{content:"\f297"} +.oc-icon-wpforms:before,.icon-wpforms:before{content:"\f298"} +.oc-icon-envira:before,.icon-envira:before{content:"\f299"} +.oc-icon-universal-access:before,.icon-universal-access:before{content:"\f29a"} +.oc-icon-wheelchair-alt:before,.icon-wheelchair-alt:before{content:"\f29b"} +.oc-icon-question-circle-o:before,.icon-question-circle-o:before{content:"\f29c"} +.oc-icon-blind:before,.icon-blind:before{content:"\f29d"} +.oc-icon-audio-description:before,.icon-audio-description:before{content:"\f29e"} +.oc-icon-volume-control-phone:before,.icon-volume-control-phone:before{content:"\f2a0"} +.oc-icon-braille:before,.icon-braille:before{content:"\f2a1"} +.oc-icon-assistive-listening-systems:before,.icon-assistive-listening-systems:before{content:"\f2a2"} +.oc-icon-asl-interpreting:before,.icon-asl-interpreting:before,.oc-icon-american-sign-language-interpreting:before,.icon-american-sign-language-interpreting:before{content:"\f2a3"} +.oc-icon-deafness:before,.icon-deafness:before,.oc-icon-hard-of-hearing:before,.icon-hard-of-hearing:before,.oc-icon-deaf:before,.icon-deaf:before{content:"\f2a4"} +.oc-icon-glide:before,.icon-glide:before{content:"\f2a5"} +.oc-icon-glide-g:before,.icon-glide-g:before{content:"\f2a6"} +.oc-icon-signing:before,.icon-signing:before,.oc-icon-sign-language:before,.icon-sign-language:before{content:"\f2a7"} +.oc-icon-low-vision:before,.icon-low-vision:before{content:"\f2a8"} +.oc-icon-viadeo:before,.icon-viadeo:before{content:"\f2a9"} +.oc-icon-viadeo-square:before,.icon-viadeo-square:before{content:"\f2aa"} +.oc-icon-snapchat:before,.icon-snapchat:before{content:"\f2ab"} +.oc-icon-snapchat-ghost:before,.icon-snapchat-ghost:before{content:"\f2ac"} +.oc-icon-snapchat-square:before,.icon-snapchat-square:before{content:"\f2ad"} +.oc-icon-pied-piper:before,.icon-pied-piper:before{content:"\f2ae"} +.oc-icon-first-order:before,.icon-first-order:before{content:"\f2b0"} +.oc-icon-yoast:before,.icon-yoast:before{content:"\f2b1"} +.oc-icon-themeisle:before,.icon-themeisle:before{content:"\f2b2"} +.oc-icon-google-plus-circle:before,.icon-google-plus-circle:before,.oc-icon-google-plus-official:before,.icon-google-plus-official:before{content:"\f2b3"} +.oc-icon-fa:before,.icon-fa:before,.oc-icon-font-awesome:before,.icon-font-awesome:before{content:"\f2b4"} .close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20)} .close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)} button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none} @@ -1430,7 +1479,8 @@ to{background-position:0 0} .callout > .header + .content{border-top:none} .callout > .header{padding:20px;padding-bottom:15px;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;color:#2f2d26} .callout > .header h3{letter-spacing:0;margin:0 0 7px 0;font-size:13px;font-weight:bold} -.callout > .header h3,.callout > .header p{margin-left:35px} +.callout > .header h3,.callout > .header p,.callout > .header ul,.callout > .header ol{margin-left:35px} +.callout > .header ul,.callout > .header ol{padding-left:20px} .callout > .header *:last-child{margin-bottom:0} .callout > .header:last-child{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px} .callout > .header i{font-size:26px;float:left} @@ -1443,9 +1493,10 @@ to{background-position:0 0} .callout > .content h5{font-size:18px} .callout > .content h6{font-size:16px} .callout > .content *:last-child{margin-bottom:0} +.callout > .content ul,.callout > .content ol{padding-left:20px} .callout > .content ul li,.callout > .content ol li{margin-bottom:5px} .callout > .content .action-panel{padding:10px 0 0 0} -.callout.no-icon > .header h3,.callout.no-icon > .header p{margin-left:0} +.callout.no-icon > .header h3,.callout.no-icon > .header p,.callout.no-icon > .header ul,.callout.no-icon > .header ol{margin-left:0} .callout.no-subheader > .header i{margin-top:-5px} .form-group > .callout{margin-bottom:0} .nav{margin-bottom:0;padding-left:0;list-style:none} @@ -1675,6 +1726,7 @@ a.control-status-list > ul li .status-text.danger:hover{color:#843534} .control-toolbar .toolbar-item .btn,.control-toolbar .toolbar-item .btn-group,.control-toolbar .toolbar-item .dropdown{white-space:nowrap;float:none;display:inline-block;margin-right:10px} .control-toolbar .toolbar-item .btn:last-child,.control-toolbar .toolbar-item .btn-group:last-child,.control-toolbar .toolbar-item .dropdown:last-child{margin-right:0} .control-toolbar .toolbar-item .btn.standalone,.control-toolbar .toolbar-item .btn-group.standalone,.control-toolbar .toolbar-item .dropdown.standalone{margin-right:15px} +.control-toolbar .toolbar-item .dropdown > .btn{margin-right:0} .control-toolbar .toolbar-item .btn-group > .btn,.control-toolbar .toolbar-item .btn-group > .dropdown{margin-right:0;display:inline-block;float:none} .control-toolbar .toolbar-item .btn-group .dropdown > .btn{margin-right:0;border-bottom-right-radius:0;border-top-right-radius:0} .control-toolbar .toolbar-item .btn-group .dropdown.last > .btn{border-bottom-right-radius:3px !important;border-top-right-radius:3px !important} @@ -2561,6 +2613,14 @@ table.table.data.no-active-indicator tbody tr td:first-child{border-left:none} table.table.data tfoot a{color:#666666;text-decoration:none} table.table.data tfoot td,table.table.data tfoot th{border-color:#d4d8da;padding:10px 15px} table.table.data th.list-cell-type-switch,table.table.data td.list-cell-type-switch{text-align:center} +table.table.data th.list-cell-type-number,table.table.data td.list-cell-type-number{text-align:right} +table.table.data .list-badge{display:inline-block;position:relative;top:-1px;margin:0 5px 0 0;padding:1px 0 0 0;font-size:10px;width:15px;height:15px;text-align:center;border-radius:3px;color:#fff} +table.table.data .list-badge.badge-default{background:#999999} +table.table.data .list-badge.badge-primary{background:#34495e} +table.table.data .list-badge.badge-success{background:#31ac5f} +table.table.data .list-badge.badge-info{background:#5bc0de} +table.table.data .list-badge.badge-warning{background:#f0ad4e} +table.table.data .list-badge.badge-danger{background:#ab2a1c} table.table.data .list-checkbox{width:52px;vertical-align:top;border-right:1px solid #eeeeee} table.table.data .list-checkbox .checkbox{margin:0;min-height:0} table.table.data .list-checkbox .custom-checkbox{position:relative;top:-14px;left:-2px} diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/ar.js b/modules/system/assets/ui/vendor/select2/js/i18n/ar.js new file mode 100644 index 0000000..01a6882 --- /dev/null +++ b/modules/system/assets/ui/vendor/select2/js/i18n/ar.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="الرجاء حذف "+t+" عناصر";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="الرجاء إضافة "+t+" عناصر";return n},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){var t="تستطيع إختيار "+e.maximum+" بنود فقط";return t},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/az.js b/modules/system/assets/ui/vendor/select2/js/i18n/az.js index 3ad855a..2accb97 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/az.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/az.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/bg.js b/modules/system/assets/ui/vendor/select2/js/i18n/bg.js index edad761..35ae989 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/bg.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/bg.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/ca.js b/modules/system/assets/ui/vendor/select2/js/i18n/ca.js index 3f5db5e..fdb5f3d 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/ca.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/ca.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/cs.js b/modules/system/assets/ui/vendor/select2/js/i18n/cs.js index d5823e9..9651378 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/cs.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/cs.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/da.js b/modules/system/assets/ui/vendor/select2/js/i18n/da.js index e9d2531..501c51e 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/da.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/da.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/de.js b/modules/system/assets/ui/vendor/select2/js/i18n/de.js index 2224138..9a6d553 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/de.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/de.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/el.js b/modules/system/assets/ui/vendor/select2/js/i18n/el.js new file mode 100644 index 0000000..4735d14 --- /dev/null +++ b/modules/system/assets/ui/vendor/select2/js/i18n/el.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/en.js b/modules/system/assets/ui/vendor/select2/js/i18n/en.js index 869dfd7..8e80ede 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/en.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/en.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/es.js b/modules/system/assets/ui/vendor/select2/js/i18n/es.js index f12d3f5..0a09650 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/es.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/es.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/et.js b/modules/system/assets/ui/vendor/select2/js/i18n/et.js index b0603bd..c70f4a5 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/et.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/et.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/eu.js b/modules/system/assets/ui/vendor/select2/js/i18n/eu.js index 3abb677..9336053 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/eu.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/eu.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/fa.js b/modules/system/assets/ui/vendor/select2/js/i18n/fa.js index 49abc41..5118cd2 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/fa.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/fa.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/fi.js b/modules/system/assets/ui/vendor/select2/js/i18n/fi.js index fef0d8b..9e60f26 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/fi.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/fi.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/fr.js b/modules/system/assets/ui/vendor/select2/js/i18n/fr.js index 4439522..e4a6650 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/fr.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/fr.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/gl.js b/modules/system/assets/ui/vendor/select2/js/i18n/gl.js index 9e593af..02f258f 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/gl.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/gl.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/he.js b/modules/system/assets/ui/vendor/select2/js/i18n/he.js index c5102c3..881f8d3 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/he.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/he.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"התוצאות לא נטענו בהלכה"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק "+t+" תווים";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס "+t+" תווים או יותר";return n},loadingMore:function(){return"טען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור רק "+e.maximum+" פריטים";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/hi.js b/modules/system/assets/ui/vendor/select2/js/i18n/hi.js index f8dd58a..e829684 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/hi.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/hi.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/hr.js b/modules/system/assets/ui/vendor/select2/js/i18n/hr.js index a783b3f..89f7b12 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/hr.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/hr.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/hu.js b/modules/system/assets/ui/vendor/select2/js/i18n/hu.js index d13fea2..74c8a90 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/hu.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/hu.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/id.js b/modules/system/assets/ui/vendor/select2/js/i18n/id.js index 7ffb8db..9586782 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/id.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/id.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/is.js b/modules/system/assets/ui/vendor/select2/js/i18n/is.js index 588ec1d..ab97a14 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/is.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/is.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/it.js b/modules/system/assets/ui/vendor/select2/js/i18n/it.js index 0488d3b..7796b9f 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/it.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/it.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/ja.js b/modules/system/assets/ui/vendor/select2/js/i18n/ja.js new file mode 100644 index 0000000..9f4fff6 --- /dev/null +++ b/modules/system/assets/ui/vendor/select2/js/i18n/ja.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/km.js b/modules/system/assets/ui/vendor/select2/js/i18n/km.js new file mode 100644 index 0000000..8e94adc --- /dev/null +++ b/modules/system/assets/ui/vendor/select2/js/i18n/km.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/ko.js b/modules/system/assets/ui/vendor/select2/js/i18n/ko.js index 80b5a8b..4ed0321 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/ko.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/ko.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/lt.js b/modules/system/assets/ui/vendor/select2/js/i18n/lt.js index 27cfe36..05f3a6e 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/lt.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/lt.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"ių","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"ių","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/lv.js b/modules/system/assets/ui/vendor/select2/js/i18n/lv.js index b47bc8e..df8ee94 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/lv.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/lv.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/mk.js b/modules/system/assets/ui/vendor/select2/js/i18n/mk.js index 065a47a..319ecca 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/mk.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/mk.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/ms.js b/modules/system/assets/ui/vendor/select2/js/i18n/ms.js new file mode 100644 index 0000000..4258f12 --- /dev/null +++ b/modules/system/assets/ui/vendor/select2/js/i18n/ms.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/nb.js b/modules/system/assets/ui/vendor/select2/js/i18n/nb.js index d7328a2..6770087 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/nb.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/nb.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/nl.js b/modules/system/assets/ui/vendor/select2/js/i18n/nl.js index b30c81c..8bd5e3c 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/nl.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/nl.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t="Er kunnen maar "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t+=" worden geselecteerd",t},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/pl.js b/modules/system/assets/ui/vendor/select2/js/i18n/pl.js index 0c0923c..54ba28e 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/pl.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/pl.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maxiumum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/pt-BR.js b/modules/system/assets/ui/vendor/select2/js/i18n/pt-BR.js index 2535114..a6629c8 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/pt-BR.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/pt-BR.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/pt.js b/modules/system/assets/ui/vendor/select2/js/i18n/pt.js index 6dcc51f..0cbda56 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/pt.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/pt.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/ro.js b/modules/system/assets/ui/vendor/select2/js/i18n/ro.js index 61e7f12..788a263 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/ro.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/ro.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să introduceți mai puțin de "+t;return n+=" caracter",n!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți incă "+t;return n+=" caracter",n!==1&&(n+="e"),n},loadingMore:function(){return"Se încarcă…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",t!==1&&(t+="e"),t},noResults:function(){return"Nu a fost găsit nimic"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/ru.js b/modules/system/assets/ui/vendor/select2/js/i18n/ru.js index e082600..9ecab80 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/ru.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/ru.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/sk.js b/modules/system/assets/ui/vendor/select2/js/i18n/sk.js index 8f92855..82f2941 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/sk.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/sk.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/sr-Cyrl.js b/modules/system/assets/ui/vendor/select2/js/i18n/sr-Cyrl.js new file mode 100644 index 0000000..e945394 --- /dev/null +++ b/modules/system/assets/ui/vendor/select2/js/i18n/sr-Cyrl.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/sr.js b/modules/system/assets/ui/vendor/select2/js/i18n/sr.js index 5ed6a81..ac0cc72 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/sr.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/sr.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/sv.js b/modules/system/assets/ui/vendor/select2/js/i18n/sv.js index 1934e36..bedac08 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/sv.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/sv.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/th.js b/modules/system/assets/ui/vendor/select2/js/i18n/th.js index 91c911c..097a86c 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/th.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/th.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/tr.js b/modules/system/assets/ui/vendor/select2/js/i18n/tr.js index 2d616c8..25d27a8 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/tr.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/tr.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/uk.js b/modules/system/assets/ui/vendor/select2/js/i18n/uk.js index ea34a4a..eb3ca89 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/uk.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/uk.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/vi.js b/modules/system/assets/ui/vendor/select2/js/i18n/vi.js index 5c22a14..8975b8a 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/vi.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/vi.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/zh-CN.js b/modules/system/assets/ui/vendor/select2/js/i18n/zh-CN.js index df0ea41..2ed9597 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/zh-CN.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/zh-CN.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/i18n/zh-TW.js b/modules/system/assets/ui/vendor/select2/js/i18n/zh-TW.js index 017483b..ea0812e 100755 --- a/modules/system/assets/ui/vendor/select2/js/i18n/zh-TW.js +++ b/modules/system/assets/ui/vendor/select2/js/i18n/zh-TW.js @@ -1,3 +1,3 @@ -/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/modules/system/assets/ui/vendor/select2/js/select2.full.js b/modules/system/assets/ui/vendor/select2/js/select2.full.js index c1d479d..e750834 100755 --- a/modules/system/assets/ui/vendor/select2/js/select2.full.js +++ b/modules/system/assets/ui/vendor/select2/js/select2.full.js @@ -1,5 +1,5 @@ /*! - * Select2 4.0.2 + * Select2 4.0.3 * https://select2.github.io * * Released under the MIT license @@ -606,9 +606,23 @@ S2.define('select2/utils',[ Observable.prototype.trigger = function (event) { var slice = Array.prototype.slice; + var params = slice.call(arguments, 1); this.listeners = this.listeners || {}; + // Params should always come in as an array + if (params == null) { + params = []; + } + + // If there are no arguments to the event, use a temporary object + if (params.length === 0) { + params.push({}); + } + + // Set the `_type` of the first object to the event + params[0]._type = event; + if (event in this.listeners) { this.invoke(this.listeners[event], slice.call(arguments, 1)); } @@ -842,6 +856,25 @@ S2.define('select2/results',[ return sorter(data); }; + Results.prototype.highlightFirstItem = function () { + var $options = this.$results + .find('.select2-results__option[aria-selected]'); + + var $selected = $options.filter('[aria-selected=true]'); + + // Check if there are any selected options + if ($selected.length > 0) { + // If there are selected options, highlight the first + $selected.first().trigger('mouseenter'); + } else { + // If there are no selected options, highlight the first option + // in the dropdown + $options.first().trigger('mouseenter'); + } + + this.ensureHighlightVisible(); + }; + Results.prototype.setClasses = function () { var self = this; @@ -869,17 +902,6 @@ S2.define('select2/results',[ } }); - var $selected = $options.filter('[aria-selected=true]'); - - // Check if there are any selected options - if ($selected.length > 0) { - // If there are selected options, highlight the first - $selected.first().trigger('mouseenter'); - } else { - // If there are no selected options, highlight the first option - // in the dropdown - $options.first().trigger('mouseenter'); - } }); }; @@ -990,6 +1012,7 @@ S2.define('select2/results',[ if (container.isOpen()) { self.setClasses(); + self.highlightFirstItem(); } }); @@ -1012,6 +1035,7 @@ S2.define('select2/results',[ } self.setClasses(); + self.highlightFirstItem(); }); container.on('unselect', function () { @@ -1020,6 +1044,7 @@ S2.define('select2/results',[ } self.setClasses(); + self.highlightFirstItem(); }); container.on('open', function () { @@ -3456,7 +3481,7 @@ S2.define('select2/data/ajax',[ self._request = $request; } - if (this.ajaxOptions.delay && params.term !== '') { + if (this.ajaxOptions.delay && params.term != null) { if (this._queryTimeout) { window.clearTimeout(this._queryTimeout); } @@ -4359,12 +4384,22 @@ S2.define('select2/dropdown/selectOnClose',[ decorated.call(this, container, $container); - container.on('close', function () { - self._handleSelectOnClose(); + container.on('close', function (params) { + self._handleSelectOnClose(params); }); }; - SelectOnClose.prototype._handleSelectOnClose = function () { + SelectOnClose.prototype._handleSelectOnClose = function (_, params) { + if (params && params.originalSelect2Event != null) { + var event = params.originalSelect2Event; + + // Don't select an item if the close event was triggered from a select or + // unselect event + if (event._type === 'select' || event._type === 'unselect') { + return; + } + } + var $highlightedResults = this.getHighlightedResults(); // Only select highlighted results @@ -4417,7 +4452,10 @@ S2.define('select2/dropdown/closeOnSelect',[ return; } - this.trigger('close', {}); + this.trigger('close', { + originalEvent: originalEvent, + originalSelect2Event: evt + }); }; return CloseOnSelect; @@ -5175,10 +5213,11 @@ S2.define('select2/core',[ self.trigger('focus', evt); }); - this._sync = Utils.bind(this._syncAttributes, this); + this._syncA = Utils.bind(this._syncAttributes, this); + this._syncS = Utils.bind(this._syncSubtree, this); if (this.$element[0].attachEvent) { - this.$element[0].attachEvent('onpropertychange', this._sync); + this.$element[0].attachEvent('onpropertychange', this._syncA); } var observer = window.MutationObserver || @@ -5188,14 +5227,30 @@ S2.define('select2/core',[ if (observer != null) { this._observer = new observer(function (mutations) { - $.each(mutations, self._sync); + $.each(mutations, self._syncA); + $.each(mutations, self._syncS); }); this._observer.observe(this.$element[0], { attributes: true, + childList: true, subtree: false }); } else if (this.$element[0].addEventListener) { - this.$element[0].addEventListener('DOMAttrModified', self._sync, false); + this.$element[0].addEventListener( + 'DOMAttrModified', + self._syncA, + false + ); + this.$element[0].addEventListener( + 'DOMNodeInserted', + self._syncS, + false + ); + this.$element[0].addEventListener( + 'DOMNodeRemoved', + self._syncS, + false + ); } }; @@ -5340,6 +5395,46 @@ S2.define('select2/core',[ } }; + Select2.prototype._syncSubtree = function (evt, mutations) { + var changed = false; + var self = this; + + // Ignore any mutation events raised for elements that aren't options or + // optgroups. This handles the case when the select element is destroyed + if ( + evt && evt.target && ( + evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP' + ) + ) { + return; + } + + if (!mutations) { + // If mutation events aren't supported, then we can only assume that the + // change affected the selections + changed = true; + } else if (mutations.addedNodes && mutations.addedNodes.length > 0) { + for (var n = 0; n < mutations.addedNodes.length; n++) { + var node = mutations.addedNodes[n]; + + if (node.selected) { + changed = true; + } + } + } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { + changed = true; + } + + // Only re-pull the data if we think there is a change + if (changed) { + this.dataAdapter.current(function (currentData) { + self.trigger('selection:update', { + data: currentData + }); + }); + } + }; + /** * Override the trigger method to automatically trigger pre-events when * there are events that can be prevented. @@ -5486,7 +5581,7 @@ S2.define('select2/core',[ this.$container.remove(); if (this.$element[0].detachEvent) { - this.$element[0].detachEvent('onpropertychange', this._sync); + this.$element[0].detachEvent('onpropertychange', this._syncA); } if (this._observer != null) { @@ -5494,10 +5589,15 @@ S2.define('select2/core',[ this._observer = null; } else if (this.$element[0].removeEventListener) { this.$element[0] - .removeEventListener('DOMAttrModified', this._sync, false); + .removeEventListener('DOMAttrModified', this._syncA, false); + this.$element[0] + .removeEventListener('DOMNodeInserted', this._syncS, false); + this.$element[0] + .removeEventListener('DOMNodeRemoved', this._syncS, false); } - this._sync = null; + this._syncA = null; + this._syncS = null; this.$element.off('.select2'); this.$element.attr('tabindex', this.$element.data('old-tabindex')); diff --git a/modules/system/behaviors/SettingsModel.php b/modules/system/behaviors/SettingsModel.php index 54b35a1..5152b13 100644 --- a/modules/system/behaviors/SettingsModel.php +++ b/modules/system/behaviors/SettingsModel.php @@ -149,7 +149,7 @@ public function getSettingsValue($key, $default = null) return $this->fieldValues[$key]; } - return $default; + return array_get($this->fieldValues, $key, $default); } /** diff --git a/modules/system/classes/CombineAssets.php b/modules/system/classes/CombineAssets.php index 93268c5..99930cd 100644 --- a/modules/system/classes/CombineAssets.php +++ b/modules/system/classes/CombineAssets.php @@ -176,6 +176,7 @@ public function combineToFile($assets = [], $destination) /** * Returns the combined contents from a prepared cache identifier. + * @param string $cacheKey Cache identifier. * @return string Combined file contents. */ public function getContents($cacheKey) @@ -212,7 +213,7 @@ public function getContents($cacheKey) /** * Prepares an array of assets by normalizing the collection * and processing aliases. - * @param $assets array + * @param array $assets * @return array */ protected function prepareAssets(array $assets) @@ -284,8 +285,8 @@ protected function prepareAssets(array $assets) /** * Combines asset file references of a single type to produce * a URL reference to the combined contents. - * @var array List of asset files. - * @var string File extension, used for aesthetic purposes only. + * @param array $assets List of asset files. + * @param string $localPath File extension, used for aesthetic purposes only. * @return string URL to contents. */ protected function prepareRequest(array $assets, $localPath = null) @@ -335,6 +336,8 @@ protected function prepareRequest(array $assets, $localPath = null) /** * Returns the combined contents from a prepared cache identifier. + * @param array $assets List of asset files. + * @param string $rewritePath * @return string Combined file contents. */ protected function prepareCombiner(array $assets, $rewritePath = null) @@ -394,6 +397,7 @@ protected function setHashOnCombinerFilters($hash) /** * Returns a deep hash on filters that support it. + * @param array $assets List of asset files. * @return void */ protected function getDeepHashFromAssets($assets) @@ -442,6 +446,7 @@ protected function getCombinedUrl($outputFilename = 'undefined.css') * /combine returns combine/ * /index.php/combine returns index-php/combine/ * + * @param string|null $path * @return string The new target path */ protected function getTargetPath($path = null) @@ -488,7 +493,7 @@ public static function registerCallback(callable $callback) * Register a filter to apply to the combining process. * @param string|array $extension Extension name. Eg: css * @param object $filter Collection of files to combine. - * @return Self + * @return self */ public function registerFilter($extension, $filter) { @@ -515,7 +520,7 @@ public function registerFilter($extension, $filter) /** * Clears any registered filters. * @param string $extension Extension name. Eg: css - * @return Self + * @return self */ public function resetFilters($extension = null) { @@ -532,7 +537,7 @@ public function resetFilters($extension = null) /** * Returns filters. * @param string $extension Extension name. Eg: css - * @return Self + * @return self */ public function getFilters($extension = null) { @@ -556,7 +561,7 @@ public function getFilters($extension = null) * @param string $alias Alias name. Eg: framework * @param object $filter Collection of files to combine * @param string $extension Extension name. Eg: css - * @return Self + * @return self */ public function registerBundle($files, $destination = null, $extension = null) { @@ -575,11 +580,12 @@ public function registerBundle($files, $destination = null, $extension = null) if ($destination === null) { $file = File::name($firstFile); $path = dirname($firstFile); + $preprocessors = array_except(self::$cssExtensions, 'css'); - if ($extension == 'less') { + if (in_array($extension, $preprocessors)) { $cssPath = $path.'/../css'; if ( - strtolower(basename($path)) == 'less' && + in_array(strtolower(basename($path)), $preprocessors) && File::isDirectory(File::symbolizePath($cssPath)) ) { $path = $cssPath; @@ -599,7 +605,7 @@ public function registerBundle($files, $destination = null, $extension = null) /** * Returns bundles. * @param string $extension Extension name. Eg: css - * @return Self + * @return self */ public function getBundles($extension = null) { @@ -623,7 +629,7 @@ public function getBundles($extension = null) * @param string $alias Alias name. Eg: framework * @param string $file Path to file to use for alias * @param string $extension Extension name. Eg: css - * @return Self + * @return self */ public function registerAlias($alias, $file, $extension = null) { @@ -645,7 +651,7 @@ public function registerAlias($alias, $file, $extension = null) /** * Clears any registered aliases. * @param string $extension Extension name. Eg: css - * @return Self + * @return self */ public function resetAliases($extension = null) { @@ -662,7 +668,7 @@ public function resetAliases($extension = null) /** * Returns aliases. * @param string $extension Extension name. Eg: css - * @return Self + * @return self */ public function getAliases($extension = null) { @@ -684,8 +690,8 @@ public function getAliases($extension = null) /** * Stores information about a asset collection against * a cache identifier. - * @var string Cache identifier. - * @var array List of asset files. + * @param string $cacheKey Cache identifier. + * @param array $cacheInfo List of asset files. * @return bool Successful */ protected function putCache($cacheKey, array $cacheInfo) @@ -703,7 +709,7 @@ protected function putCache($cacheKey, array $cacheInfo) /** * Look up information about a cache identifier. - * @var string Cache identifier + * @param string $cacheKey Cache identifier * @return array Cache information */ protected function getCache($cacheKey) @@ -719,7 +725,7 @@ protected function getCache($cacheKey) /** * Builds a unique string based on assets - * @var array Asset files + * @param array $assets Asset files * @return string Unique identifier */ protected function getCacheKey(array $assets) @@ -765,7 +771,7 @@ public static function resetCache() /** * Adds a cache identifier to the index store used for * performing a reset of the cache. - * @var string Cache identifier + * @param string $cacheKey Cache identifier * @return bool Returns false if identifier is already in store */ protected function putCacheIndex($cacheKey) diff --git a/modules/system/classes/PluginBase.php b/modules/system/classes/PluginBase.php index fbfe12c..279033d 100644 --- a/modules/system/classes/PluginBase.php +++ b/modules/system/classes/PluginBase.php @@ -181,6 +181,16 @@ public function registerFormWidgets() return []; } + /** + * Registers custom back-end list column types introduced by this plugin. + * + * @return array + */ + public function registerListColumnTypes() + { + return []; + } + /** * Registers any mail templates implemented by this plugin. * The templates must be returned in the following format: diff --git a/modules/system/classes/PluginManager.php b/modules/system/classes/PluginManager.php index adb16b5..24c3624 100644 --- a/modules/system/classes/PluginManager.php +++ b/modules/system/classes/PluginManager.php @@ -55,6 +55,11 @@ class PluginManager */ protected $disabledPlugins = []; + /** + * @var array Cache of registration method results. + */ + protected $registrationMethodCache = []; + /** * @var boolean Prevent all plugins from registering or booting */ @@ -418,6 +423,31 @@ public function normalizeIdentifier($identifier) return $identifier; } + /** + * Spins over every plugin object and collects the results of a method call. + * @param string $methodName + * @return array + */ + public function getRegistrationMethodValues($methodName) + { + if (isset($this->registrationMethodCache[$methodName])) { + return $this->registrationMethodCache[$methodName]; + } + + $results = []; + $plugins = $this->getPlugins(); + + foreach ($plugins as $id => $plugin) { + if (!method_exists($plugin, $methodName)) { + continue; + } + + $results[$id] = $plugin->{$methodName}(); + } + + return $this->registrationMethodCache[$methodName] = $results; + } + // // Disability // diff --git a/modules/system/console/OctoberMirror.php b/modules/system/console/OctoberMirror.php index f45a952..dfd1614 100644 --- a/modules/system/console/OctoberMirror.php +++ b/modules/system/console/OctoberMirror.php @@ -4,6 +4,7 @@ use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Filesystem\Filesystem; /** * This command will create symbolic links to files and directories @@ -103,9 +104,14 @@ protected function mirrorFile($file) $this->output->writeln(sprintf(' - Mirroring: %s', $file)); $src = base_path().'/'.$file; + $dest = $this->getDestinationPath().'/'.$file; - if (!File::isFile($src) || File::isFile($dest)) return false; - symlink($src, $dest); + + if (!File::isFile($src) || File::isFile($dest)) { + return false; + } + + $this->mirror($src, $dest); } protected function mirrorDirectory($directory) @@ -113,10 +119,18 @@ protected function mirrorDirectory($directory) $this->output->writeln(sprintf(' - Mirroring: %s', $directory)); $src = base_path().'/'.$directory; + $dest = $this->getDestinationPath().'/'.$directory; - if (!File::isDirectory($src) || File::isDirectory($dest)) return false; - if (!File::isDirectory(dirname($dest))) File::makeDirectory(dirname($dest), 0755, true); - symlink($src, $dest); + + if (!File::isDirectory($src) || File::isDirectory($dest)) { + return false; + } + + if (!File::isDirectory(dirname($dest))) { + File::makeDirectory(dirname($dest), 0755, true); + } + + $this->mirror($src, $dest); } protected function mirrorWildcard($wildcard) @@ -126,14 +140,31 @@ protected function mirrorWildcard($wildcard) } list($start, $end) = explode('*', $wildcard, 2); + $startDir = base_path().'/'.$start; - if (!File::isDirectory($startDir)) return false; + + if (!File::isDirectory($startDir)) { + return false; + } foreach (File::directories($startDir) as $directory) { $this->mirrorWildcard($start.basename($directory).$end); } } + protected function mirror($src, $dest) + { + if ($this->option('relative')) { + $src = $this->getRelativePath($dest, $src); + + if (strpos($src, '../') === 0) { + $src = rtrim(substr($src, 3), '/'); + } + } + + symlink($src, $dest); + } + protected function getDestinationPath() { if ($this->destinationPath !== null) { @@ -149,11 +180,29 @@ protected function getDestinationPath() File::makeDirectory($destPath, 0755, true); } + $destPath = realpath($destPath); + $this->output->writeln(sprintf('Destination: %s', $destPath)); return $this->destinationPath = $destPath; } + protected function getRelativePath($from, $to) + { + $from = str_replace('\\', '/', $from); + $to = str_replace('\\', '/', $to); + + $dir = explode('/', is_file($from) ? dirname($from) : rtrim($from, '/')); + $file = explode('/', $to); + + while ($dir && $file && ($dir[0] == $file[0])) { + array_shift($dir); + array_shift($file); + } + + return str_repeat('../', count($dir)) . implode('/', $file); + } + /** * Get the console command arguments. */ @@ -169,6 +218,8 @@ protected function getArguments() */ protected function getOptions() { - return []; + return [ + ['relative', null, InputOption::VALUE_NONE, 'Create symlinks relative to the public directory.'], + ]; } } diff --git a/modules/system/console/OctoberUtil.php b/modules/system/console/OctoberUtil.php index 685d6ae..5211b97 100644 --- a/modules/system/console/OctoberUtil.php +++ b/modules/system/console/OctoberUtil.php @@ -18,6 +18,7 @@ * - compile assets: Compile registered Language, LESS and JS files. * - compile js: Compile registered JS files only. * - compile less: Compile registered LESS files only. + * - compile scss: Compile registered SCSS files only. * - compile lang: Compile registered Language files only. * */ @@ -96,6 +97,11 @@ protected function utilCompileLess() $this->utilCompileAssets('less'); } + protected function utilCompileScss() + { + $this->utilCompileAssets('scss'); + } + protected function utilCompileAssets($type = null) { $this->comment('Compiling registered asset bundles...'); diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index 4f7d1b1..d64fafe 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -3,6 +3,7 @@ use Str; use Lang; use Html; +use Yaml; use File; use Flash; use Config; @@ -109,8 +110,9 @@ public function details($urlCode = null, $tab = null) $readmeFiles = ['README.md', 'readme.md']; $upgradeFiles = ['UPGRADE.md', 'upgrade.md']; + $licenceFiles = ['LICENCE.md', 'licence.md', 'LICENSE.md', 'license.md']; - $upgrades = $readme = $name = null; + $readme = $changelog = $upgrades = $licence = $name = null; $code = str_replace('-', '.', $urlCode); /* @@ -124,7 +126,9 @@ public function details($urlCode = null, $tab = null) if ($path && $plugin) { $details = $plugin->pluginDetails(); $readme = $this->getPluginMarkdownFile($path, $readmeFiles); + $changelog = $this->getPluginVersionFile($path, 'updates/version.yaml'); $upgrades = $this->getPluginMarkdownFile($path, $upgradeFiles); + $licence = $this->getPluginMarkdownFile($path, $licenceFiles); $pluginVersion = PluginVersion::whereCode($code)->first(); $this->vars['pluginName'] = array_get($details, 'name', 'system::lang.plugin.unnamed'); @@ -147,14 +151,35 @@ public function details($urlCode = null, $tab = null) $this->vars['activeTab'] = $tab ?: 'readme'; $this->vars['urlCode'] = $urlCode; - $this->vars['upgrades'] = $upgrades; $this->vars['readme'] = $readme; + $this->vars['changelog'] = $changelog; + $this->vars['upgrades'] = $upgrades; + $this->vars['licence'] = $licence; } catch (Exception $ex) { $this->handleError($ex); } } + protected function getPluginVersionFile($path, $filename) + { + $contents = []; + + try { + $updates = Yaml::parseFile($path.'/'.$filename); + $updates = is_array($updates) ? array_reverse($updates) : []; + + foreach ($updates as $version => $details) { + $contents[$version] = is_array($details) + ? array_shift($details) + : $details; + } + } + catch (Exception $ex) {} + + return $contents; + } + protected function getPluginMarkdownFile($path, $filenames) { $contents = null; diff --git a/modules/system/controllers/updates/_execute.htm b/modules/system/controllers/updates/_execute.htm index 27ab452..8f4182f 100644 --- a/modules/system/controllers/updates/_execute.htm +++ b/modules/system/controllers/updates/_execute.htm @@ -23,7 +23,7 @@