From d0c38c25724db279d74be79b864225d58c1f57a1 Mon Sep 17 00:00:00 2001 From: DmitriiCymbal Date: Sun, 17 Jan 2021 17:07:54 +0300 Subject: [PATCH] upgrade to 3.x --- elements/tmpl/upload.php | 17 - fields/radicalmultifield.php | 100 +- .../en-GB.plg_fields_radicalmultifield.ini | 114 +- .../ru-RU.plg_fields_radicalmultifield.ini | 50 +- layouts/import.php | 39 + layouts/quantummanager.php | 145 ++ layouts/repeatable-cards.php | 4 +- layouts/repeatable-cards/section.php | 12 +- layouts/repeatable-uikittable.php | 2 +- libs/gumlet/lib/Gumlet/ImageResize.php | 727 -------- .../lib/Gumlet/ImageResizeException.php | 12 - media/core/css/tree.css | 924 ---------- media/core/css/upload.css | 71 - media/core/js/bootbox.min.js | 6 - media/core/js/import.js | 790 -------- media/core/less/base.less | 1183 ------------ media/{core => }/css/cards.css | 0 media/css/import.css | 27 + media/img/icons/doc.svg | 62 - media/img/icons/docx.svg | 62 - media/img/icons/flac.svg | 40 - media/img/icons/mp3.svg | 40 - media/img/icons/ogg.svg | 40 - media/img/icons/other.svg | 44 - media/img/icons/pdf.svg | 69 - media/img/icons/ppt.svg | 56 - media/img/icons/pptx.svg | 56 - media/img/icons/txt.svg | 44 - media/img/icons/xls.svg | 66 - media/img/icons/xlsx.svg | 66 - media/img/icons/zip.svg | 58 - media/js/buttons.js | 43 + .../js/radicalmultifield.js => js/fix.js} | 0 media/js/import.js | 56 + media/js/modal.js | 119 ++ .../{core => }/js/subform-repetable-cards.js | 4 +- media/libs/vex/README.md | 24 - .../css/vex-theme-bottom-right-corner.css | 183 -- media/libs/vex/dist/css/vex-theme-default.css | 162 -- .../vex/dist/css/vex-theme-flat-attack.css | 176 -- media/libs/vex/dist/css/vex-theme-os.css | 165 -- media/libs/vex/dist/css/vex-theme-plain.css | 107 -- media/libs/vex/dist/css/vex-theme-top.css | 178 -- .../libs/vex/dist/css/vex-theme-wireframe.css | 110 -- media/libs/vex/dist/css/vex.css | 117 -- media/libs/vex/dist/js/vex.combined.js | 1628 ----------------- media/libs/vex/dist/js/vex.combined.min.js | 3 - media/libs/vex/dist/js/vex.js | 753 -------- media/libs/vex/dist/js/vex.min.js | 3 - params/radicalmultifield.xml | 365 ++-- radicalmultifield.php | 472 +---- radicalmultifield.xml | 17 +- radicalmultifieldhelper.php | 356 ++-- 53 files changed, 927 insertions(+), 9040 deletions(-) delete mode 100644 elements/tmpl/upload.php create mode 100644 layouts/import.php create mode 100644 layouts/quantummanager.php delete mode 100644 libs/gumlet/lib/Gumlet/ImageResize.php delete mode 100644 libs/gumlet/lib/Gumlet/ImageResizeException.php delete mode 100644 media/core/css/tree.css delete mode 100644 media/core/css/upload.css delete mode 100644 media/core/js/bootbox.min.js delete mode 100644 media/core/js/import.js delete mode 100644 media/core/less/base.less rename media/{core => }/css/cards.css (100%) create mode 100644 media/css/import.css delete mode 100644 media/img/icons/doc.svg delete mode 100644 media/img/icons/docx.svg delete mode 100644 media/img/icons/flac.svg delete mode 100644 media/img/icons/mp3.svg delete mode 100644 media/img/icons/ogg.svg delete mode 100644 media/img/icons/other.svg delete mode 100644 media/img/icons/pdf.svg delete mode 100644 media/img/icons/ppt.svg delete mode 100644 media/img/icons/pptx.svg delete mode 100644 media/img/icons/txt.svg delete mode 100644 media/img/icons/xls.svg delete mode 100644 media/img/icons/xlsx.svg delete mode 100644 media/img/icons/zip.svg create mode 100644 media/js/buttons.js rename media/{core/js/radicalmultifield.js => js/fix.js} (100%) create mode 100644 media/js/import.js create mode 100644 media/js/modal.js rename media/{core => }/js/subform-repetable-cards.js (98%) delete mode 100644 media/libs/vex/README.md delete mode 100644 media/libs/vex/dist/css/vex-theme-bottom-right-corner.css delete mode 100644 media/libs/vex/dist/css/vex-theme-default.css delete mode 100644 media/libs/vex/dist/css/vex-theme-flat-attack.css delete mode 100644 media/libs/vex/dist/css/vex-theme-os.css delete mode 100644 media/libs/vex/dist/css/vex-theme-plain.css delete mode 100644 media/libs/vex/dist/css/vex-theme-top.css delete mode 100644 media/libs/vex/dist/css/vex-theme-wireframe.css delete mode 100644 media/libs/vex/dist/css/vex.css delete mode 100644 media/libs/vex/dist/js/vex.combined.js delete mode 100644 media/libs/vex/dist/js/vex.combined.min.js delete mode 100644 media/libs/vex/dist/js/vex.js delete mode 100644 media/libs/vex/dist/js/vex.min.js diff --git a/elements/tmpl/upload.php b/elements/tmpl/upload.php deleted file mode 100644 index 7024378..0000000 --- a/elements/tmpl/upload.php +++ /dev/null @@ -1,17 +0,0 @@ - - - -
-
- -

- - -
- -
- -
-
- -
diff --git a/fields/radicalmultifield.php b/fields/radicalmultifield.php index c2ddd97..bed8561 100644 --- a/fields/radicalmultifield.php +++ b/fields/radicalmultifield.php @@ -9,8 +9,10 @@ */ use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Factory; +use Joomla\CMS\Layout\LayoutHelper; defined('_JEXEC') or die; @@ -23,6 +25,7 @@ class JFormFieldRadicalmultifield extends JFormFieldSubform { + /** * @var string */ @@ -44,6 +47,7 @@ protected function getLayoutPaths() ]; } + /** * @return string */ @@ -59,13 +63,13 @@ public function getInput() $db = Factory::getDBO(); $query = $db->getQuery(true) - ->select($db->quoteName(array('params', 'fieldparams'))) + ->select($db->quoteName(['name', 'params', 'fieldparams'])) ->from('#__fields') ->where( 'name=' . $db->quote($this->fieldname)); $field = $db->setQuery( $query )->loadObject(); $query = $db->getQuery(true) - ->select($db->quoteName(array('params'))) + ->select($db->quoteName(['params'])) ->from('#__extensions') ->where( 'element=' . $db->quote('radicalmultifield')); $extension = $db->setQuery( $query )->loadObject(); @@ -83,7 +87,8 @@ public function getInput() //подзагружаем кастомные поля JLoader::import('radicalmultifieldhelper', JPATH_ROOT . '/plugins/fields/radicalmultifield'); - if(isset($params['extendfield'])) + + if(isset($params['extendfield']) && !empty($params['extendfield'])) { $extendField = explode("\n", $params['extendfield']); @@ -94,6 +99,7 @@ public function getInput() } + foreach ($fieldparams['listtype'] as $fieldparam) { switch ($fieldparam['type']) @@ -107,7 +113,7 @@ public function getInput() $this->formsource .= ""; $options = explode( "\n", $fieldparam['options'] ); - foreach ( $options as $option ) + foreach ($options as $option) { $value = OutputFilter::stringURLSafe( $option ); $this->formsource .= ""; @@ -121,6 +127,13 @@ public function getInput() $this->formsource .= ""; break; + case 'custom': + if(!empty($fieldparam['customxml'])) + { + $this->formsource .= $fieldparam['customxml']; + } + break; + default: $attrs = trim( $fieldparam['attrs'] ); $this->formsource .= ""; @@ -128,65 +141,46 @@ public function getInput() } $this->formsource .= ""; - $html = parent::getInput(); - - if(isset($fieldparams['filesimport'])) + if(isset($fieldparams['filesimport']) && RadicalmultifieldHelper::checkQuantumManager()) { - if((int)$fieldparams['filesimport']) { - $allow = true; - - $app = Factory::getApplication(); - $admin = $app->isAdmin(); - - if((int)$fieldparams['filesimportadmin'] && !$admin) - { - $allow = false; - } - - if($allow) - { - $folder = $fieldparams['filesimportpath']; - JLoader::register( - 'FormFieldRadicalmultifieldtreecatalog', - JPATH_ROOT . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['plugins', 'fields', 'radicalmultifield', 'elements', 'radicalmultifieldtreecatalog']) . '.php' - ); - - $treeCatalog = new FormFieldRadicalmultifieldtreecatalog; - - $paramsForField = [ - 'name' => 'select-directory', - 'label' => Text::_('PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_TREECATALOG_TITLE'), - 'class' => '', - 'type' => 'radicalmultifieldtreecatalog', - 'folder' => $folder, - 'folderonly' => 'true', - 'showroot' => 'true', - 'exs' => $fieldparams['filesimportexc'], - 'maxsize' => $fieldparams['filesimportmaxsize'], - 'namefield' => $fieldparams['filesimportname'], - 'namefile' => $fieldparams['filesimportnamefile'], - 'importfield' => $this->fieldname, - ]; - - $dataAttributes = array_map(function($value, $key) - { - return $key.'="'.$value.'"'; - }, array_values($paramsForField), array_keys($paramsForField)); - - $treeCatalog->setup(new SimpleXMLElement(""), ''); - $html = "
" . $treeCatalog->getInput() . "
" . $html; - - } + HTMLHelper::stylesheet('plg_fields_radicalmultifield/import.css', [ + 'version' => filemtime ( __FILE__ ), + 'relative' => true, + ]); + + HTMLHelper::script('plg_fields_radicalmultifield/buttons.js', [ + 'version' => filemtime ( __FILE__ ), + 'relative' => true, + ]); + + HTMLHelper::script('plg_fields_radicalmultifield/import.js', [ + 'version' => filemtime ( __FILE__ ), + 'relative' => true, + ]); + + $field_path = !empty($fieldparams['filesimportpath']) ? $fieldparams['filesimportpath'] : 'images'; + $params_for_field = [ + 'namefield' => $fieldparams['filesimportname'], + 'namefile' => $fieldparams['filesimportnamefile'], + ]; + $html = + "
" . + LayoutHelper::render('import', [ + 'field_name' => $field->name, + 'field_path' => $field_path + ], JPATH_ROOT . '/plugins/fields/radicalmultifield/layouts') + . $html . + "
"; } - } return $html; } + } diff --git a/language/en-GB/en-GB.plg_fields_radicalmultifield.ini b/language/en-GB/en-GB.plg_fields_radicalmultifield.ini index 7c0d636..8276d0a 100644 --- a/language/en-GB/en-GB.plg_fields_radicalmultifield.ini +++ b/language/en-GB/en-GB.plg_fields_radicalmultifield.ini @@ -1,87 +1,83 @@ PLG_RADICAL_MULTI_FIELD="Field - Radical MultiField" PLG_FIELDS_RADICALMULTIFIELD_LABEL="Radical MultiField" -PLG_RADICAL_MULTI_FIELD_XML_DESCRIPTION="Field that implements the enumerated array of data fields" +PLG_RADICAL_MULTI_FIELD_XML_DESCRIPTION="Multifield for Joomla" PLG_RADICAL_MULTI_FIELD_PARAMS_EXTEND_FIELDS_LABEL="Additional field types" -PLG_RADICAL_MULTI_FIELD_PARAMS_EXTEND_FIELDS_DESC="Specify your field types from a new line" +PLG_RADICAL_MULTI_FIELD_PARAMS_EXTEND_FIELDS_DESC="Enter your field types on a new line" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMIN_LABEL="Min Repeatable Count" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMIN_DESC="Set the minimum count of repeatable elements." -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMAX_LABEL="Max Repeatable Count" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMAX_DESC="Set the maximum count of repeatable elements." +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMIN_LABEL="Minimum number of items" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMIN_DESC="Please enter the minimum number of items to repeat." +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMAX_LABEL="Maximum number of items" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMAX_DESC="Please enter the maximum number of items to repeat." -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATE_LABEL="Template for site" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATE_DESC="Template that defines the appearance of the field when it is displayed on the site. If you selected a gallery or a slideshow, then the field names for the template must have the names 'image' for the image and 'alt' for the image name" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATECATEGORY_LABEL="Template for category" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATECATEGORY_DESC="Template that determines the appearance of the field when displayed on the site. If you have chosen a gallery or slideshow, then the field names for the template must have the names 'image' for the image and 'alt' for the name of the image" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATEARTICLE_LABEL="Template for item" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATEARTICLE_DESC="Template that determines the appearance of the field when displayed on the site. If you have chosen a gallery or slideshow, then the field names for the template must have the names 'image' for the image and 'alt' for the name of the image" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_LABEL="Admin view" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_LABEL="Template for edit" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_LIST="List" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_CARDS="Cards" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_TABLE="Table" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_TABLEUIKIT="Table Uikit" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_TABLEUIKIT="Uikit table" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORT_LABEL="Enable file import" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTADMIN_LABEL="Only for admin" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTADMIN_DESC="If only for the admin area, then at the front there will be no import for the field" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAME_LABEL="Name of the field where to import the file" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAME_DESC="Specify here the name of what you created below, this name will be used to fill" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAMEFILE_LABEL="Name of the field where to import the file name" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTEXC_LABEL="List of file extensions (separated by commas)" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTEXC_DESC="Extensions are used to display files and downloads" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPATH_LABEL="Path for files" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPATH_DESC="Specify the path for the files for this field here.
Available variables:
{user_id} - current user ID
{year} - current year
{ month} - current month
{day} - current day
{hours} - current hour
{minutes} - minutes
{second} - seconds
{unix} - UNIX time in seconds

Example usage:
images/{user_id}/{year}-{month}-{day}" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORT_NOTE_LABEL="Importing files is possible only if Quantum Manager is installed. Download here. " +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORT_LABEL="Enable import files" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTADMIN_LABEL="Import is only possible in the control panel" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTADMIN_DESC="If you disable this option, the import button will not be shown on the site. Import is only possible in the site control panel." +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAME_LABEL="Field name for file import" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAME_DESC="Please enter the field name that will be used to import the file. This field will contain the imported file." +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAMEFILE_LABEL="Field name where to import file name" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPATH_LABEL="File path" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPATH_DESC="Please enter the file path for this field here.
Available variables:
{user_id} - Current user ID
{item_id} - ID of the current material, user or contact
{year} - current year
{month} - current month
{day} - current day
{hours} - current hour
{minutes} - minutes
{second} - seconds
{unix} - UNIX time in seconds

Usage example:
images/{user_id}/{year}-{month}-{day}" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTMAXSIZE_LABEL="Maximum file size for uploading
in megabytes" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTORIGINAL_LABEL="Keep originals" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTORIGINAL_DESC="In the folder where the image is located, the folder will be created _original, in which the original images will be stored" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZE_LABEL="Enable image resizing" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZE_DESC="When the resize is enabled, the images will resize under the specified maximum width and height" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEMAXWIDTH_LABEL="Maximum width
in pixels" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEMAXHEIGHT_LABEL="Maximum height
in pixels" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_LABEL="Generate preview images" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_DESC="Creating thumbnails for the field" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXWIDTH_LABEL="Max width preview
in pixels" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXHEIGHT_LABEL="Max height preview
in pixels" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAY_LABEL="Apply a watermark" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYFILE_LABEL="Watermark File" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPERCENT_LABEL="Percent sign compression" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPERCENT_VALUE_LABEL="How many percent of the original image to occupy" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPOS_LABEL="Select a position for the sign" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPADDING_LABEL="Indent from the edges of the image for the
sign in pixels" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_LABEL="Generate thumbnail images" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_DESC="Create reduced size thumbnail files for field" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXWIDTH_LABEL="Maximum thumbnail width
in pixels" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXHEIGHT_LABEL="Maximum thumbnail height
in pixels" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_LABEL="Cutting algorithm" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_BEST_FIT="Reduce and crop in width and height as maximum allowed" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_FIT="Reduce and cut excess" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_RESIZE="Reduce and fill gaps with white" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_LABEL="Where to store thumbnails" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_CACHE="In the Joomla cache (closed from indexing in robots.txt)" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_GENERATED_IMAGES="In the images/generated folder (not closed from indexing in robots.txt)" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_RELATIVELY="Regarding the file (will be indexed if not closed manually)" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_LABEL="Fields list" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_NAME="Name for template" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_TITLE="Title" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_LABEL="List of fields" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_NAME="Field name in English" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_TITLE="Field display name" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_SELECT="Type" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_REQUIRED="Required" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_MULTIPLE="Multiselect" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_LISTVIEW="Admin view" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_OPTIONS="Option values" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_OPTIONS_DESC="Each value of the row again" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_ATTRS="Other attributes for the field" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_ATTRS_DESC="Specify attributes for the field in xml format, example: placeholder=\"Placeholder\"" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_MULTIPLE="Multiple choice" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_LISTVIEW="Administrative View" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_OPTIONS="List Values" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_OPTIONS_DESC="Each value on a new line" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_ATTRS="Other attributes for the field (separated by spaces)" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_ATTRS_DESC="Specify attributes for the field in xml format, for example placeholder="Placeholder"" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_CUSTOMXML="XML field code" JOPTION_FROM_PLUGIN="--- From plugin ---" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_TREECATALOG_TITLE="Select directory" -PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_TITLE="Importing files" -PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_OPEN="Importing files" -PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_SPEED_UPLOAD="Speed upload" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_UPLOAD="Upload" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_SELECT="Select on server" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_TITLE="Select files" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_OPEN="Select files" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_SPEED_UPLOAD="Fast upload" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_INPUT_PATH="Selected path" -PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_SEARCH="Search by directories" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_SEARCH="Directory search" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_CREATE_PATH="Create directory" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_CLOSE="Close" -PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_IMPORT_START="Import files" -PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_UPLOAD_DROP="To upload, drag the files or" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_IMPORT_START="Insert files" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_UPLOAD_DROP="Drag and drop files to upload or" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_UPLOAD_SELECT="select on your device." -PLG_RADICAL_MULTI_FIELD_IMPORT_FILE_TO_LARGE_THAN_PHP_INI_ALLOWS="The size of the file is greater than allowed by the server." -PLG_RADICAL_MULTI_FIELD_IMPORT_FILE_TO_LARGE_THAN_HTML_FORM_ALLOWS="The file size is larger than the field settings allow." -PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_PARTIAL_UPLOAD="An error occurred while loading the file." +PLG_RADICAL_MULTI_FIELD_IMPORT_FILE_TO_LARGE_THAN_PHP_INI_ALLOWS="The file is larger than the server allowed." +PLG_RADICAL_MULTI_FIELD_IMPORT_FILE_TO_LARGE_THAN_HTML_FORM_ALLOWS="The file is larger than the field settings allow." +PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_PARTIAL_UPLOAD="Error loading file." PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_MIME_TYPE_UPLOAD="The specified mime file type is not allowed in the field settings." PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_MIME_TYPE_LABEL="mime type" -PLG_RADICAL_MULTI_FIELD_BUTTON_BACK="Back" -PLG_RADICAL_MULTI_FIELD_BUTTON_UP="Up" -PLG_RADICAL_MULTI_FIELD_BUTTON_GRID="Grid" -PLG_RADICAL_MULTI_FIELD_BUTTON_LIST="List" -PLG_RADICAL_MULTI_FIELD_BUTTON_SELECTALL="Select all" +PLG_RADICAL_MULTI_FIELD_BUTTON_BACK="Back" \ No newline at end of file diff --git a/language/ru-RU/ru-RU.plg_fields_radicalmultifield.ini b/language/ru-RU/ru-RU.plg_fields_radicalmultifield.ini index 951279c..cd6763e 100644 --- a/language/ru-RU/ru-RU.plg_fields_radicalmultifield.ini +++ b/language/ru-RU/ru-RU.plg_fields_radicalmultifield.ini @@ -10,8 +10,10 @@ PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMIN_DESC="Укажите миним PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMAX_LABEL="Максимальное количество элементов" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_MULTIPLEMAX_DESC="Укажите максимальное количество повторяемых элементов." -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATE_LABEL="Шаблон для сайта" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATE_DESC="Шаблон, который определяет внешний вид поля при выводе на сайте. Если вы выбрали галерею или слайдшоу - то имена полей для шаблона обязательно должны иметь названия 'image' для изображения и 'alt' для названия изображения" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATECATEGORY_LABEL="Шаблон для категории" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATECATEGORY_DESC="Шаблон, который определяет внешний вид поля при выводе на сайте. Если вы выбрали галерею или слайдшоу - то имена полей для шаблона обязательно должны иметь названия 'image' для изображения и 'alt' для названия изображения" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATEARTICLE_LABEL="Шаблон для элемента" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TEMPLATEARTICLE_DESC="Шаблон, который определяет внешний вид поля при выводе на сайте. Если вы выбрали галерею или слайдшоу - то имена полей для шаблона обязательно должны иметь названия 'image' для изображения и 'alt' для названия изображения" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_LABEL="Способ вывода поля" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_LIST="Список" @@ -19,33 +21,28 @@ PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_CARDS="Карточки" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_TABLE="Таблица" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_AVIEW_OPLION_TABLEUIKIT="Таблица Uikit" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORT_NOTE_LABEL="Импорт файлов возможен только при установленном Quantum Manager. Скачать можете тут." PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORT_LABEL="Разрешить импорт файлов" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTADMIN_LABEL="Импорт возможен только в панели управления" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTADMIN_DESC="Если отключить эту опцию, то кнопка импорта не будет показана на сайте. Импорт возможен только в панели управления сайтом." PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAME_LABEL="Имя поля для импорта файла" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAME_DESC="Укажите имя поля, которое будет использоваться для импорта файла. В этом поле будет находиться импортированный файл." PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTNAMEFILE_LABEL="Имя поля куда импортировать название файла" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTEXC_LABEL="Разрешенные mime типы файлов (через запятую)" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTEXC_DESC="Расширения используются для отображения файлов и загрузки" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPATH_LABEL="Путь для файлов" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPATH_DESC="Укажите здесь путь для файлов для этого поля.
Доступные переменные:
{user_id} - ID текущего пользователя
{item_id} - ID текущего материала, пользователя или контакта
{year} - текущий год
{month} - текущий месяц
{day} - текущий день
{hours} - текущий час
{minutes} - минуты
{second} - секунды
{unix} - время UNIX в секундах

Пример использования:
images/{user_id}/{year}-{month}-{day}" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTMAXSIZE_LABEL="Максимальный размер файла для загрузки
в мегабайтах" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTORIGINAL_LABEL="Сохранять оригиналы" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTORIGINAL_DESC="В папке, где находится изображение будет создана папка _original, в которой будет хранится оригиналы изображений" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZE_LABEL="Подгонять размер изображений" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZE_DESC="При включеном параметре, изображения будут изменять размер под указанные максимальную ширину и высоту в пикселях" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEMAXWIDTH_LABEL="Максимальная ширина
в пикселях" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEMAXHEIGHT_LABEL="Максимальная высота
в пикселях" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_LABEL="Генерация превью картинок" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_DESC="Создание файлов превью уменьшенного размера для поля" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXWIDTH_LABEL="Максимальная ширина превью
в пикселях" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXHEIGHT_LABEL="Максимальная высота превью
в пикселях" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAY_LABEL="Накладывать водяной знак" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYFILE_LABEL="Файл водяного знака" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPERCENT_LABEL="Процентное сжатие знака" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPERCENT_VALUE_LABEL="Сколько процентов от исходного изображения занимать" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPOS_LABEL="Выберите позицию для знака" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTRESIZEOVERLAYPADDING_LABEL="Отступы от краев изображения для знака
в пикселях" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_LABEL="Генерация миниатюры картинок" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEW_DESC="Создание файлов миниатюры уменьшенного размера для поля" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXWIDTH_LABEL="Максимальная ширина миниатюры
в пикселях" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWMAXHEIGHT_LABEL="Максимальная высота миниатюры
в пикселях" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_LABEL="Алгоритм резки" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_BEST_FIT="Уменьшить и обрезать по ширине и высоте как максимально допустимые" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_FIT="Уменьшить и обрезать лишнее" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWALGORITHM_RESIZE="Уменьшить и заполнить пропуски белым цветом" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_LABEL="Где хранить миниатюры" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_CACHE="В кеше Joomla! (закрыто от индексации в robots.txt)" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_GENERATED_IMAGES="В папке images/generated (не закрыто от индексации в robots.txt)" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_FILESIMPORTPREVIEWFOLDER_RELATIVELY="Относительно файла (индексироваться будут, если не закрыто вручную)" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_LABEL="Список полей" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_NAME="Имя поля английскими буквами" @@ -55,14 +52,17 @@ PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_REQUIRED="Обязатель PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_MULTIPLE="Мультивыбор" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_LISTVIEW="Административный вид" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_OPTIONS="Значения списка" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_OPTIONS_DESC="Каждое значение сновой строки" -PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_ATTRS="Прочие атрибуты для поля" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_OPTIONS_DESC="Каждое значение с новой строки" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_ATTRS="Прочие атрибуты для поля (через пробелы)" PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_ATTRS_DESC="Укажите атрибуты для поля в формате xml, например placeholder=\"Placeholder\"" +PLG_RADICAL_MULTI_FIELD_FIELD_PARAMS_TYPELIST_FORM_CUSTOMXML="XML код поля" JOPTION_FROM_PLUGIN="--- Из плагина ---" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_TREECATALOG_TITLE="Выберите каталог" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_UPLOAD="Загрузить" +PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_SELECT="Выбрать на сервере" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_TITLE="Выбор файлов" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_OPEN="Выбрать файлы" PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_MODAL_BUTTON_SPEED_UPLOAD="Быстрая загрузка" @@ -80,8 +80,4 @@ PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_PARTIAL_UPLOAD="Ошибка при заг PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_MIME_TYPE_UPLOAD="Указанный mime тип файла не разрешен в настройках поля." PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_MIME_TYPE_LABEL="mime тип" -PLG_RADICAL_MULTI_FIELD_BUTTON_BACK="Назад" -PLG_RADICAL_MULTI_FIELD_BUTTON_UP="Вверх" -PLG_RADICAL_MULTI_FIELD_BUTTON_GRID="Сеткой" -PLG_RADICAL_MULTI_FIELD_BUTTON_LIST="Списком" -PLG_RADICAL_MULTI_FIELD_BUTTON_SELECTALL="Выбрать все файлы" +PLG_RADICAL_MULTI_FIELD_BUTTON_BACK="Назад" \ No newline at end of file diff --git a/layouts/import.php b/layouts/import.php new file mode 100644 index 0000000..b8e2d4b --- /dev/null +++ b/layouts/import.php @@ -0,0 +1,39 @@ + + +
+ + '; + $upload = new JFormFieldQuantumupload(); + $upload->setup(new SimpleXMLElement($field), ''); + echo $upload->getInput(); + ?> + + +
+ + +
+ +
+ + + diff --git a/layouts/quantummanager.php b/layouts/quantummanager.php new file mode 100644 index 0000000..32323de --- /dev/null +++ b/layouts/quantummanager.php @@ -0,0 +1,145 @@ + + * @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved. + * @license GNU General Public License version 3 or later; see license.txt + * @link https://www.norrnext.com + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Factory; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; + +extract($displayData); + +$app = Factory::getApplication(); +$app->getSession()->clear('quantummanageraddscripts'); +$app->getSession()->set('quantummanagerroot', $field_path); +$app->getSession()->set('quantummanagerrootcheck', 0); + +HTMLHelper::_('stylesheet', 'plg_system_quantummanagermedia/modal.css', [ + 'version' => filemtime(__FILE__), + 'relative' => true +]); + +HTMLHelper::_('script', 'plg_fields_radicalmultifield/modal.js', [ + 'version' => filemtime(__FILE__), + 'relative' => true +]); + + +?> + + [ + 'directory' => $folderRoot, + 'position' => 'left', + 'cssClass' => 'quantumtreecatalogs-module-muted' + ], + 'quantumupload' => [ + 'maxsize' => QuantummanagerHelper::getParamsComponentValue('maxsize', '10'), + 'dropAreaHidden' => QuantummanagerHelper::getParamsComponentValue('dropareahidden', '0'), + 'directory' => $folderRoot + ], + 'quantumtoolbar' => [ + 'position' => 'top', + 'buttons' => 'all', + 'buttonsBun' => '', + 'cssClass' => 'quantummanager-module-height-1-1 quantumtoolbar-module-muted quantumtoolbar-padding-horizontal', + ], + 'quantumviewfiles' => [ + 'directory' => $folderRoot, + 'view' => 'list-grid', + 'onlyfiles' => '0', + 'watermark' => QuantummanagerHelper::getParamsComponentValue('overlay' , 0) > 0 ? '1' : '0', + 'help' => QuantummanagerHelper::getParamsComponentValue('help' , '1'), + 'metafile' => QuantummanagerHelper::getParamsComponentValue('metafile' , '1'), + ], + 'quantumcropperjs' => [ + 'position' => 'bottom' + ] + ]; + + if((int)QuantummanagerHelper::getParamsComponentValue('unsplash', '1')) + { + $fields['quantumunsplash'] = [ + 'position' => 'bottom' + ]; + } + + if((int)QuantummanagerHelper::getParamsComponentValue('pexels', '1')) + { + $fields['quantumpexels'] = [ + 'label' => '', + 'position' => 'bottom' + ]; + } + + if((int)QuantummanagerHelper::getParamsComponentValue('pixabay', '1')) + { + $fields['quantumpixabay'] = [ + 'position' => 'bottom' + ]; + } + + $actions = QuantummanagerHelper::getActions(); + if (!$actions->get('core.create')) + { + $buttonsBun[] = 'viewfilesCreateDirectory'; + unset($fields['quantumupload']); + } + + if (!$actions->get('core.delete')) + { + unset($fields['quantumcropperjs']); + } + + if (!$actions->get('core.delete')) + { + $buttonsBun[] = 'viewfilesDelete'; + } + + $optionsForField = [ + 'name' => 'filemanager', + 'label' => '', + 'fields' => json_encode($fields) + ]; + + $field = new JFormFieldQuantumCombine(); + foreach ($optionsForField as $name => $value) + { + $field->__set($name, $value); + } + echo $field->getInput(); + } + catch (Exception $e) + { + echo $e->getMessage(); + } +?> + + + + diff --git a/layouts/repeatable-cards.php b/layouts/repeatable-cards.php index 5ed7c90..3d3df88 100644 --- a/layouts/repeatable-cards.php +++ b/layouts/repeatable-cards.php @@ -36,13 +36,13 @@ JHtml::_('stylesheet', 'subform-repetable-cards/cards.css', array('version' => 'auto', 'relative' => true)); } -JHtml::_('stylesheet', 'plg_fields_radicalmultifield/core/cards.css', [ +JHtml::_('stylesheet', 'plg_fields_radicalmultifield/cards.css', [ 'version' => filemtime ( __FILE__ ), 'relative' => true ]); -JHtml::_('script', 'plg_fields_radicalmultifield/core/subform-repetable-cards.js', [ +JHtml::_('script', 'plg_fields_radicalmultifield/subform-repetable-cards.js', [ 'version' => filemtime ( __FILE__ ), 'relative' => true ]); diff --git a/layouts/repeatable-cards/section.php b/layouts/repeatable-cards/section.php index ffc6f47..6f97d73 100644 --- a/layouts/repeatable-cards/section.php +++ b/layouts/repeatable-cards/section.php @@ -7,6 +7,8 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +use Joomla\CMS\Language\Text; + defined('_JEXEC') or die; /** @@ -36,17 +38,17 @@ class="subform-card subform-repeatable-group-"
- + - + - + @@ -59,7 +61,7 @@ class="subform-card subform-repeatable-group-" @@ -71,7 +73,7 @@ class="subform-card subform-repeatable-group-" diff --git a/layouts/repeatable-uikittable.php b/layouts/repeatable-uikittable.php index 6756820..aa78394 100644 --- a/layouts/repeatable-uikittable.php +++ b/layouts/repeatable-uikittable.php @@ -86,7 +86,7 @@ class="subform-repeatable" - + diff --git a/libs/gumlet/lib/Gumlet/ImageResize.php b/libs/gumlet/lib/Gumlet/ImageResize.php deleted file mode 100644 index bc86500..0000000 --- a/libs/gumlet/lib/Gumlet/ImageResize.php +++ /dev/null @@ -1,727 +0,0 @@ -filters[] = $filter; - return $this; - } - - /** - * Apply filters. - * - * @param $image resource an image resource identifier - * @param $filterType filter type and default value is IMG_FILTER_NEGATE - */ - protected function applyFilter($image, $filterType = IMG_FILTER_NEGATE) - { - foreach ($this->filters as $function) { - $function($image, $filterType); - } - } - - /** - * Loads image source and its properties to the instanciated object - * - * @param string $filename - * @return ImageResize - * @throws ImageResizeException - */ - public function __construct($filename) - { - if (!defined('IMAGETYPE_WEBP')) { - define('IMAGETYPE_WEBP', 18); - } - if ($filename === null || empty($filename) || (substr($filename, 0, 5) !== 'data:' && !is_file($filename))) { - throw new ImageResizeException('File does not exist'); - } - - $finfo = finfo_open(FILEINFO_MIME_TYPE); - if (strstr(finfo_file($finfo, $filename), 'image') === false) { - throw new ImageResizeException('Unsupported file type'); - } - - if (!$image_info = getimagesize($filename, $this->source_info)) { - $image_info = getimagesize($filename); - } - - if (!$image_info) { - throw new ImageResizeException('Could not read file'); - } - - list( - $this->original_w, - $this->original_h, - $this->source_type - ) = $image_info; - - switch ($this->source_type) { - case IMAGETYPE_GIF: - $this->source_image = imagecreatefromgif($filename); - break; - - case IMAGETYPE_JPEG: - $this->source_image = $this->imageCreateJpegfromExif($filename); - - // set new width and height for image, maybe it has changed - $this->original_w = imagesx($this->source_image); - $this->original_h = imagesy($this->source_image); - - break; - - case IMAGETYPE_PNG: - $this->source_image = imagecreatefrompng($filename); - break; - - case IMAGETYPE_WEBP: - if (version_compare(PHP_VERSION, '5.5.0', '<')) { - throw new ImageResizeException('For WebP support PHP >= 5.5.0 is required'); - } - $this->source_image = imagecreatefromwebp($filename); - break; - - default: - throw new ImageResizeException('Unsupported image type'); - } - - if (!$this->source_image) { - throw new ImageResizeException('Could not load image'); - } - - return $this->resize($this->getSourceWidth(), $this->getSourceHeight()); - } - - // http://stackoverflow.com/a/28819866 - public function imageCreateJpegfromExif($filename) - { - $img = imagecreatefromjpeg($filename); - - if (!function_exists('exif_read_data') || !isset($this->source_info['APP1']) || strpos($this->source_info['APP1'], 'Exif') !== 0) { - return $img; - } - - try { - $exif = @exif_read_data($filename); - } catch (Exception $e) { - $exif = null; - } - - if (!$exif || !isset($exif['Orientation'])) { - return $img; - } - - $orientation = $exif['Orientation']; - - if ($orientation === 6 || $orientation === 5) { - $img = imagerotate($img, 270, null); - } elseif ($orientation === 3 || $orientation === 4) { - $img = imagerotate($img, 180, null); - } elseif ($orientation === 8 || $orientation === 7) { - $img = imagerotate($img, 90, null); - } - - if ($orientation === 5 || $orientation === 4 || $orientation === 7) { - if(function_exists('imageflip')) { - imageflip($img, IMG_FLIP_HORIZONTAL); - } else { - $this->imageFlip($img, IMG_FLIP_HORIZONTAL); - } - } - - return $img; - } - - /** - * Saves new image - * - * @param string $filename - * @param string $image_type - * @param integer $quality - * @param integer $permissions - * @return static - */ - public function save($filename, $image_type = null, $quality = null, $permissions = null) - { - $image_type = $image_type ?: $this->source_type; - $quality = is_numeric($quality) ? (int) abs($quality) : null; - - switch ($image_type) { - case IMAGETYPE_GIF: - $dest_image = imagecreatetruecolor($this->getDestWidth(), $this->getDestHeight()); - - $background = imagecolorallocatealpha($dest_image, 255, 255, 255, 1); - imagecolortransparent($dest_image, $background); - imagefill($dest_image, 0, 0, $background); - imagesavealpha($dest_image, true); - break; - - case IMAGETYPE_JPEG: - $dest_image = imagecreatetruecolor($this->getDestWidth(), $this->getDestHeight()); - - $background = imagecolorallocate($dest_image, 255, 255, 255); - imagefilledrectangle($dest_image, 0, 0, $this->getDestWidth(), $this->getDestHeight(), $background); - break; - - case IMAGETYPE_WEBP: - if (version_compare(PHP_VERSION, '5.5.0', '<')) { - throw new ImageResizeException('For WebP support PHP >= 5.5.0 is required'); - } - $dest_image = imagecreatetruecolor($this->getDestWidth(), $this->getDestHeight()); - - $background = imagecolorallocate($dest_image, 255, 255, 255); - imagefilledrectangle($dest_image, 0, 0, $this->getDestWidth(), $this->getDestHeight(), $background); - break; - - case IMAGETYPE_PNG: - if (!$this->quality_truecolor && !imageistruecolor($this->source_image)) { - $dest_image = imagecreate($this->getDestWidth(), $this->getDestHeight()); - - $background = imagecolorallocatealpha($dest_image, 255, 255, 255, 1); - imagecolortransparent($dest_image, $background); - imagefill($dest_image, 0, 0, $background); - } else { - $dest_image = imagecreatetruecolor($this->getDestWidth(), $this->getDestHeight()); - } - - imagealphablending($dest_image, false); - imagesavealpha($dest_image, true); - break; - } - - imageinterlace($dest_image, $this->interlace); - - imagegammacorrect($this->source_image, 2.2, 1.0); - - imagecopyresampled( - $dest_image, - $this->source_image, - $this->dest_x, - $this->dest_y, - $this->source_x, - $this->source_y, - $this->getDestWidth(), - $this->getDestHeight(), - $this->source_w, - $this->source_h - ); - - imagegammacorrect($dest_image, 1.0, 2.2); - - - $this->applyFilter($dest_image); - - switch ($image_type) { - case IMAGETYPE_GIF: - imagegif($dest_image, $filename); - break; - - case IMAGETYPE_JPEG: - if ($quality === null || $quality > 100) { - $quality = $this->quality_jpg; - } - - imagejpeg($dest_image, $filename, $quality); - break; - - case IMAGETYPE_WEBP: - if (version_compare(PHP_VERSION, '5.5.0', '<')) { - throw new ImageResizeException('For WebP support PHP >= 5.5.0 is required'); - } - if ($quality === null) { - $quality = $this->quality_webp; - } - - imagewebp($dest_image, $filename, $quality); - break; - - case IMAGETYPE_PNG: - if ($quality === null || $quality > 9) { - $quality = $this->quality_png; - } - - imagepng($dest_image, $filename, $quality); - break; - } - - if ($permissions) { - chmod($filename, $permissions); - } - - imagedestroy($dest_image); - - return $this; - } - - /** - * Convert the image to string - * - * @param int $image_type - * @param int $quality - * @return string - */ - public function getImageAsString($image_type = null, $quality = null) - { - $string_temp = tempnam(sys_get_temp_dir(), ''); - - $this->save($string_temp, $image_type, $quality); - - $string = file_get_contents($string_temp); - - unlink($string_temp); - - return $string; - } - - /** - * Convert the image to string with the current settings - * - * @return string - */ - public function __toString() - { - return $this->getImageAsString(); - } - - /** - * Outputs image to browser - * @param string $image_type - * @param integer $quality - */ - public function output($image_type = null, $quality = null) - { - $image_type = $image_type ?: $this->source_type; - - header('Content-Type: ' . image_type_to_mime_type($image_type)); - - $this->save(null, $image_type, $quality); - } - - /** - * Resizes image according to the given short side (short side proportional) - * - * @param integer $max_short - * @param boolean $allow_enlarge - * @return static - */ - public function resizeToShortSide($max_short, $allow_enlarge = false) - { - if ($this->getSourceHeight() < $this->getSourceWidth()) { - $ratio = $max_short / $this->getSourceHeight(); - $long = $this->getSourceWidth() * $ratio; - - $this->resize($long, $max_short, $allow_enlarge); - } else { - $ratio = $max_short / $this->getSourceWidth(); - $long = $this->getSourceHeight() * $ratio; - - $this->resize($max_short, $long, $allow_enlarge); - } - - return $this; - } - - /** - * Resizes image according to the given long side (short side proportional) - * - * @param integer $max_long - * @param boolean $allow_enlarge - * @return static - */ - public function resizeToLongSide($max_long, $allow_enlarge = false) - { - if ($this->getSourceHeight() > $this->getSourceWidth()) { - $ratio = $max_long / $this->getSourceHeight(); - $short = $this->getSourceWidth() * $ratio; - - $this->resize($short, $max_long, $allow_enlarge); - } else { - $ratio = $max_long / $this->getSourceWidth(); - $short = $this->getSourceHeight() * $ratio; - - $this->resize($max_long, $short, $allow_enlarge); - } - - return $this; - } - - /** - * Resizes image according to the given height (width proportional) - * - * @param integer $height - * @param boolean $allow_enlarge - * @return static - */ - public function resizeToHeight($height, $allow_enlarge = false) - { - $ratio = $height / $this->getSourceHeight(); - $width = $this->getSourceWidth() * $ratio; - - $this->resize($width, $height, $allow_enlarge); - - return $this; - } - - /** - * Resizes image according to the given width (height proportional) - * - * @param integer $width - * @param boolean $allow_enlarge - * @return static - */ - public function resizeToWidth($width, $allow_enlarge = false) - { - $ratio = $width / $this->getSourceWidth(); - $height = $this->getSourceHeight() * $ratio; - - $this->resize($width, $height, $allow_enlarge); - - return $this; - } - - /** - * Resizes image to best fit inside the given dimensions - * - * @param integer $max_width - * @param integer $max_height - * @param boolean $allow_enlarge - * @return static - */ - public function resizeToBestFit($max_width, $max_height, $allow_enlarge = false) - { - if ($this->getSourceWidth() <= $max_width && $this->getSourceHeight() <= $max_height && $allow_enlarge === false) { - return $this; - } - - $ratio = $this->getSourceHeight() / $this->getSourceWidth(); - $width = $max_width; - $height = $width * $ratio; - - if ($height > $max_height) { - $height = $max_height; - $width = $height / $ratio; - } - - return $this->resize($width, $height, $allow_enlarge); - } - - /** - * Resizes image according to given scale (proportionally) - * - * @param integer|float $scale - * @return static - */ - public function scale($scale) - { - $width = $this->getSourceWidth() * $scale / 100; - $height = $this->getSourceHeight() * $scale / 100; - - $this->resize($width, $height, true); - - return $this; - } - - /** - * Resizes image according to the given width and height - * - * @param integer $width - * @param integer $height - * @param boolean $allow_enlarge - * @return static - */ - public function resize($width, $height, $allow_enlarge = false) - { - if (!$allow_enlarge) { - // if the user hasn't explicitly allowed enlarging, - // but either of the dimensions are larger then the original, - // then just use original dimensions - this logic may need rethinking - - if ($width > $this->getSourceWidth() || $height > $this->getSourceHeight()) { - $width = $this->getSourceWidth(); - $height = $this->getSourceHeight(); - } - } - - $this->source_x = 0; - $this->source_y = 0; - - $this->dest_w = $width; - $this->dest_h = $height; - - $this->source_w = $this->getSourceWidth(); - $this->source_h = $this->getSourceHeight(); - - return $this; - } - - /** - * Crops image according to the given width, height and crop position - * - * @param integer $width - * @param integer $height - * @param boolean $allow_enlarge - * @param integer $position - * @return static - */ - public function crop($width, $height, $allow_enlarge = false, $position = self::CROPCENTER) - { - if (!$allow_enlarge) { - // this logic is slightly different to resize(), - // it will only reset dimensions to the original - // if that particular dimenstion is larger - - if ($width > $this->getSourceWidth()) { - $width = $this->getSourceWidth(); - } - - if ($height > $this->getSourceHeight()) { - $height = $this->getSourceHeight(); - } - } - - $ratio_source = $this->getSourceWidth() / $this->getSourceHeight(); - $ratio_dest = $width / $height; - - if ($ratio_dest < $ratio_source) { - $this->resizeToHeight($height, $allow_enlarge); - - $excess_width = ($this->getDestWidth() - $width) / $this->getDestWidth() * $this->getSourceWidth(); - - $this->source_w = $this->getSourceWidth() - $excess_width; - $this->source_x = $this->getCropPosition($excess_width, $position); - - $this->dest_w = $width; - } else { - $this->resizeToWidth($width, $allow_enlarge); - - $excess_height = ($this->getDestHeight() - $height) / $this->getDestHeight() * $this->getSourceHeight(); - - $this->source_h = $this->getSourceHeight() - $excess_height; - $this->source_y = $this->getCropPosition($excess_height, $position); - - $this->dest_h = $height; - } - - return $this; - } - - /** - * Crops image according to the given width, height, x and y - * - * @param integer $width - * @param integer $height - * @param integer $x - * @param integer $y - * @return static - */ - public function freecrop($width, $height, $x = false, $y = false) - { - if ($x === false || $y === false) { - return $this->crop($width, $height); - } - $this->source_x = $x; - $this->source_y = $y; - if ($width > $this->getSourceWidth() - $x) { - $this->source_w = $this->getSourceWidth() - $x; - } else { - $this->source_w = $width; - } - - if ($height > $this->getSourceHeight() - $y) { - $this->source_h = $this->getSourceHeight() - $y; - } else { - $this->source_h = $height; - } - - $this->dest_w = $width; - $this->dest_h = $height; - - return $this; - } - - /** - * Gets source width - * - * @return integer - */ - public function getSourceWidth() - { - return $this->original_w; - } - - /** - * Gets source height - * - * @return integer - */ - public function getSourceHeight() - { - return $this->original_h; - } - - /** - * Gets width of the destination image - * - * @return integer - */ - public function getDestWidth() - { - return $this->dest_w; - } - - /** - * Gets height of the destination image - * @return integer - */ - public function getDestHeight() - { - return $this->dest_h; - } - - /** - * Gets crop position (X or Y) according to the given position - * - * @param integer $expectedSize - * @param integer $position - * @return float|integer - */ - protected function getCropPosition($expectedSize, $position = self::CROPCENTER) - { - $size = 0; - switch ($position) { - case self::CROPBOTTOM: - case self::CROPRIGHT: - $size = $expectedSize; - break; - case self::CROPCENTER: - case self::CROPCENTRE: - $size = $expectedSize / 2; - break; - case self::CROPTOPCENTER: - $size = $expectedSize / 4; - break; - } - return $size; - } - - /** - * Flips an image using a given mode if PHP version is lower than 5.5 - * - * @param resource $image - * @param integer $mode - * @return null - */ - public function imageFlip($image, $mode) - { - switch($mode) { - case self::IMG_FLIP_HORIZONTAL: { - $max_x = imagesx($image) - 1; - $half_x = $max_x / 2; - $sy = imagesy($image); - $temp_image = imageistruecolor($image)? imagecreatetruecolor(1, $sy): imagecreate(1, $sy); - for ($x = 0; $x < $half_x; ++$x) { - imagecopy($temp_image, $image, overlay0, 0, $x, 0, 1, $sy); - imagecopy($image, $image, $x, 0, $max_x - $x, 0, 1, $sy); - imagecopy($image, $temp_image, $max_x - $x, 0, 0, 0, 1, $sy); - } - break; - } - case self::IMG_FLIP_VERTICAL: { - $sx = imagesx($image); - $max_y = imagesy($image) - 1; - $half_y = $max_y / 2; - $temp_image = imageistruecolor($image)? imagecreatetruecolor($sx, 1): imagecreate($sx, 1); - for ($y = 0; $y < $half_y; ++$y) { - imagecopy($temp_image, $image, 0, 0, 0, $y, $sx, 1); - imagecopy($image, $image, 0, $y, 0, $max_y - $y, $sx, 1); - imagecopy($image, $temp_image, 0, $max_y - $y, 0, 0, $sx, 1); - } - break; - } - case self::IMG_FLIP_BOTH: { - $sx = imagesx($image); - $sy = imagesy($image); - $temp_image = imagerotate($image, 180, 0); - imagecopy($image, $temp_image, 0, 0, 0, 0, $sx, $sy); - break; - } - default: - return null; - } - imagedestroy($temp_image); - } -} diff --git a/libs/gumlet/lib/Gumlet/ImageResizeException.php b/libs/gumlet/lib/Gumlet/ImageResizeException.php deleted file mode 100644 index 425804c..0000000 --- a/libs/gumlet/lib/Gumlet/ImageResizeException.php +++ /dev/null @@ -1,12 +0,0 @@ - .btn { - margin-right: 15px; -} - -.modal.modal-import-file { - position: fixed; - width: 50%; - max-height: 100%; - left: 50%; - top: 5% !important; - height: 90%; - margin-left: -25%; -} - -.modal.modal-import-file .modal-body { - overflow: hidden; - height: 86% !important; - max-height: none; -} - -@media screen and (max-width: 1500px) and (min-width: 768px) { - - .modal.modal-import-file { - width: 80%; - left: 35%; - } - -} - -.av-modal { - position: relative; - padding: 0 0 20px 20px; - border-radius: 0; - background-color: #f8f8f8; - box-shadow: inset 0 0 0 1px #eee; - z-index: 1; - height: calc(100% - 28px); - overflow: hidden; -} -.av-modal-actions { - position: absolute; - left: 0; - right: 0; - display: flex; - margin: 0; - border-bottom: none; - padding-left: 0; - padding-bottom: 0; - z-index: 99999; -} -.av-modal-actions button { - padding: 2px 10px; - font-size: 12px; -} -.av-modal-actions button.create-directory { - border-radius: 0; - width: 40%; -} -.av-modal-actions .search { - width: 45%; - display: inline-block; - position: relative; -} -.av-modal-actions .search input { - padding: 2px; - padding-left: 4px; - width: 160px !important; - border-radius: 0; -} -.av-modal-actions .search .results { - display: none; - position: absolute; - top: 30px; - left: 0; - width: 100%; - height: 150px; - max-height: 150px; - background: #ffffff; - border: 1px solid #ddd; - overflow: auto; -} -.av-modal-actions .search .results div { - padding: 3px 4px 4px 7px; - font-size: 12px; - color: #444; -} -.av-modal-actions .search .results div:hover { - background: #eee; - cursor: pointer; -} -.av-modal-actions .tree-reload { - width: 15%; - border: 1px solid rgba(0,0,0,0.2); - background-color: #2384d3; - border-radius: 0; -} -.av-modal-actions .tree-reload span { - display: block; - margin: auto; - width: 15px; - height: 15px; - border-radius: 2px; - background-position: 50% 50%; - background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 489.711 489.711' style='enable-background:new 0 0 489.711 489.711;' xml:space='preserve'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23ffFfff' d='M112.156,97.111c72.3-65.4,180.5-66.4,253.8-6.7l-58.1,2.2c-7.5,0.3-13.3,6.5-13,14c0.3,7.3,6.3,13,13.5,13 c0.2,0,0.3,0,0.5,0l89.2-3.3c7.3-0.3,13-6.2,13-13.5v-1c0-0.2,0-0.3,0-0.5v-0.1l0,0l-3.3-88.2c-0.3-7.5-6.6-13.3-14-13 c-7.5,0.3-13.3,6.5-13,14l2.1,55.3c-36.3-29.7-81-46.9-128.8-49.3c-59.2-3-116.1,17.3-160,57.1c-60.4,54.7-86,137.9-66.8,217.1 c1.5,6.2,7,10.3,13.1,10.3c1.1,0,2.1-0.1,3.2-0.4c7.2-1.8,11.7-9.1,9.9-16.3C36.656,218.211,59.056,145.111,112.156,97.111z'/%3E%3Cpath fill='%23ffFfff' d='M462.456,195.511c-1.8-7.2-9.1-11.7-16.3-9.9c-7.2,1.8-11.7,9.1-9.9,16.3c16.9,69.6-5.6,142.7-58.7,190.7 c-37.3,33.7-84.1,50.3-130.7,50.3c-44.5,0-88.9-15.1-124.7-44.9l58.8-5.3c7.4-0.7,12.9-7.2,12.2-14.7s-7.2-12.9-14.7-12.2l-88.9,8 c-7.4,0.7-12.9,7.2-12.2,14.7l8,88.9c0.6,7,6.5,12.3,13.4,12.3c0.4,0,0.8,0,1.2-0.1c7.4-0.7,12.9-7.2,12.2-14.7l-4.8-54.1 c36.3,29.4,80.8,46.5,128.3,48.9c3.8,0.2,7.6,0.3,11.3,0.3c55.1,0,107.5-20.2,148.7-57.4 C456.056,357.911,481.656,274.811,462.456,195.511z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A"); -} -.av-folderlist { - display: block; - margin: 0; - margin-top: 35px; - box-sizing: border-box; - width: 100%; - max-width: 100%; - height: auto; - overflow: auto; - list-style: none; - border-radius: 3px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.av-modal > .av-folderlist { - height: calc(100% - 35px); - max-height: calc(100% - 35px); -} -.modal-import-file .modal-body { - display: flex; -} -.modal-import-file .modal-body .field-wrapper { - width: 40%; -} -.modal-import-file .modal-body .field-list-file { - width: 60%; -} -.av-folderlist * { - box-sizing: border-box; - margin: 0; - padding: 0; -} -.modal-import-file .input-append { - height: 100%; -} - -.modal-import-file .input-append, -.modal-import-file .input-append input { - width: 100%; -} -.modal-import-file .input-append .input-wrap { - padding-right: 15px; -} -.av-folderlist li > ul { - padding-left: 20px; - list-style: none; - height: 0; - opacity: 0; - overflow: hidden; - -webkit-transition: height,opacity .2s; - -moz-transition: height,opacity .2s; - -ms-transition: height,opacity .2s; - transition: height,opacity .2s; -} -.av-folderlist li.open > ul { - height: auto; - opacity: 1; -} -.av-folderlist .av-folderlist-item { - display: block; - position: relative; - font-size: 13px; - line-height: 21px; -} -.av-folderlist .av-folderlist-item:before, -.av-folderlist .av-folderlist-item:after { - content: ''; - display: table; -} -.av-folderlist .av-folderlist-item:after { - clear: both; -} -.av-folderlist .av-folderlist-tree { - position: absolute; - display: inline-block; - top: 4px; - left: 0; - width: 13px; - height: 13px; - background-color: #fff; - box-shadow: inset 0 0 0 1px #aaa; - z-index: 1; - cursor: pointer; -} -.modal-import-file .av-folderlist-tree:before, -.modal-import-file .av-folderlist-tree:after { - content: ''; - position: absolute; - top: 6px; - left: 4px; - width: 5px; - height: 1px; - background-color: #aaa; - -webkit-transition: opacity .2s; - -moz-transition: opacity .2s; - -ms-transition: opacity .2s; - transition: opacity .2s; -} -.modal-import-file .av-folderlist-tree:after { - transform: rotate(90deg); - opacity: 1; -} -.modal-import-file .av-folderlist-label { - position: relative; - display: block; - padding-left: 38px; - cursor: pointer; -} -.modal-import-file .file-exs .av-folderlist-label { - padding-left: 0; - width: 20px; - height: 20px; -} -.modal-import-file .av-folderlist-label:after { - content: ''; - position: absolute; - top: 0; - left: 18px; - bottom: 0; - width: 16px; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAQCAYAAAA4eCmgAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyY2ExMTM5Mi02ZDQ3LWI4NDMtOGNmZ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OfAmBIcO/AfIMkhzp9F1GhmsFJfdbnO5bGRQXEhLTsD6bXu30/1LmXQ8yOa3b/8taPdrx+iTkJDQ+4EHHniopqYm1VDF6l+wYMHsw+H+fwkwALkq7axrxq6mAAAAAElFTkSuQmCC'); - background-repeat: no-repeat; - background-position: 0 center; -} -.modal-import-file .av-folderlist-dir .av-folderlist-label:after { - content: ''; - position: absolute; - top: 0; - left: 18px; - bottom: 0; - width: 16px; - background-repeat: no-repeat; - background-position: 50% 50%; - background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 58 58' style='enable-background:new 0 0 58 58;' xml:space='preserve'%3E%3Cpath style='fill:%23EFCE4A;' d='M46.324,52.5H1.565c-1.03,0-1.779-0.978-1.51-1.973l10.166-27.871 c0.184-0.682,0.803-1.156,1.51-1.156H56.49c1.03,0,1.51,0.984,1.51,1.973L47.834,51.344C47.65,52.026,47.031,52.5,46.324,52.5z'/%3E%3Cg%3E%3Cpath style='fill:%23EBBA16;' d='M50.268,12.5H25l-5-7H1.732C0.776,5.5,0,6.275,0,7.232V49.96c0.069,0.002,0.138,0.006,0.205,0.01 l10.015-27.314c0.184-0.683,0.803-1.156,1.51-1.156H52v-7.268C52,13.275,51.224,12.5,50.268,12.5z'/%3E%3C/g%3E%3C/svg%3E%0A"); -} -.modal-import-file .file-exs .av-folderlist-label:after { - left: 0; -} -.modal-import-file .av-folderlist-label.selected { - font-weight: bold; -} -.modal-import-file .av-folderlist-label:hover { - text-decoration: underline; -} -.modal-import-file .av-folderlist-file .av-folderlist-label:after { - background-position: -112px center; -} -.modal-import-file .icon-file-3gp .av-folderlist-label:after { - background-position: -128px center; -} -.modal-import-file .icon-file-afp .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-afpa .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-asp .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-aspx .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-avi .av-folderlist-label:after { - background-position: -128px center; -} -.modal-import-file .icon-file-bat .av-folderlist-label:after { - background-position: 0px center; -} -.modal-import-file .icon-file-bmp .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-bpg .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-c .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-cfm .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-cgi .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-com .av-folderlist-label:after { - background-position: 0px center; -} -.modal-import-file .icon-file-cpp .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-css .av-folderlist-label:after { - background-position: -32px center; -} -.modal-import-file .icon-file-less .av-folderlist-label:after { - background-position: -32px center; -} -.modal-import-file .icon-file-sass .av-folderlist-label:after { - background-position: -32px center; -} -.modal-import-file .icon-file-scss .av-folderlist-label:after { - background-position: -32px center; -} -.modal-import-file .icon-file-doc .av-folderlist-label:after { - background-position: -80px center; -} -.modal-import-file .icon-file-docx .av-folderlist-label:after { - background-position: -80px center; -} -.modal-import-file .icon-file-exe .av-folderlist-label:after { - background-position: 0px center; -} -.modal-import-file .icon-file-gif .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-fla .av-folderlist-label:after { - background-position: -144px center; -} -.modal-import-file .icon-file-h .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-htm .av-folderlist-label:after { - background-position: -176px center; -} -.modal-import-file .icon-file-html .av-folderlist-label:after { - background-position: -176px center; -} -.modal-import-file .icon-file-jar .av-folderlist-label:after { - background-position: -192px center; -} -.modal-import-file .icon-file-jpg .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-jpeg .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-js .av-folderlist-label:after { - background-position: -336px center; -} -.modal-import-file .icon-file-lasso .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-log .av-folderlist-label:after { - background-position: -352px center; -} -.modal-import-file .icon-file-m4p .av-folderlist-label:after { - background-position: -224px center; -} -.modal-import-file .icon-file-mov .av-folderlist-label:after { - background-position: -128px center; -} -.modal-import-file .icon-file-mp3 .av-folderlist-label:after { - background-position: -224px center; -} -.modal-import-file .icon-file-mp4 .av-folderlist-label:after { - background-position: -128px center; -} -.modal-import-file .icon-file-mpg .av-folderlist-label:after { - background-position: -128px center; -} -.modal-import-file .icon-file-mpeg .av-folderlist-label:after { - background-position: -128px center; -} -.modal-import-file .icon-file-ogg .av-folderlist-label:after { - background-position: -224px center; -} -.modal-import-file .icon-file-pcx .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-pdf .av-folderlist-label:after { - background-position: -240px center; -} -.modal-import-file .icon-file-php .av-folderlist-label:after { - background-position: -256px center; -} -.modal-import-file .icon-file-png .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-ppt .av-folderlist-label:after { - background-position: -288px center; -} -.modal-import-file .icon-file-pptx .av-folderlist-label:after { - background-position: -288px center; -} -.modal-import-file .icon-file-psd .av-folderlist-label:after { - background-position: -288px center; -} -.modal-import-file .icon-file-cdr .av-folderlist-label:after { - background-position: -288px center; -} -.modal-import-file .icon-file-ai .av-folderlist-label:after { - background-position: -288px center; -} -.modal-import-file .icon-file-pl .av-folderlist-label:after { - background-position: -336px center; -} -.modal-import-file .icon-file-py .av-folderlist-label:after { - background-position: -336px center; -} -.modal-import-file .icon-file-rb .av-folderlist-label:after { - background-position: -320px center; -} -.modal-import-file .icon-file-rbx .av-folderlist-label:after { - background-position: -320px center; -} -.modal-import-file .icon-file-rhtml .av-folderlist-label:after { - background-position: -320px center; -} -.modal-import-file .icon-file-rpm .av-folderlist-label:after { - background-position: -208px center; -} -.modal-import-file .icon-file-ruby .av-folderlist-label:after { - background-position: -320px center; -} -.modal-import-file .icon-file-sql .av-folderlist-label:after { - background-position: -48px center; -} -.modal-import-file .icon-file-swf .av-folderlist-label:after { - background-position: -144px center; -} -.modal-import-file .icon-file-tif .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-tiff .av-folderlist-label:after { - background-position: -272px center; -} -.modal-import-file .icon-file-txt .av-folderlist-label:after { - background-position: -352px center; -} -.modal-import-file .icon-file-vb .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-wav .av-folderlist-label:after { - background-position: -224px center; -} -.modal-import-file .icon-file-wmv .av-folderlist-label:after { - background-position: -128px center; -} -.modal-import-file .icon-file-xls .av-folderlist-label:after { - background-position: -368px center; -} -.modal-import-file .icon-file-xlsx .av-folderlist-label:after { - background-position: -368px center; -} -.modal-import-file .icon-file-xml .av-folderlist-label:after { - background-position: -16px center; -} -.modal-import-file .icon-file-zip .av-folderlist-label:after { - background-position: -384px center; -} -.modal-import-file .icon-file-gzip .av-folderlist-label:after { - background-position: -384px center; -} -.modal-import-file .icon-file-7z .av-folderlist-label:after { - background-position: -384px center; -} -.modal-import-file .icon-file-tar .av-folderlist-label:after { - background-position: -384px center; -} -.modal-import-file .icon-file-rar .av-folderlist-label:after { - background-position: -384px center; -} -.av-folderlist li.open > .av-folderlist-tree:after { - opacity: 0; -} -.field-list-files { - width: 60%; - padding: 15px; - overflow: auto; -} -.field-list-files .active { - background: #f3dd8c73; -} -.field-list-files tr:hover { - cursor: pointer; -} -.field-list-files .file { - width: 100%; - display: flex; - height: 25px; - align-self: center; - align-items: center; -} -.field-list-files .file .file-exs { - width: auto; - height: 100%; - margin: 0; -} -.field-list-files .file .file-exs .av-folderlist-label:after { - width: 16px; - height: 16px; -} -.field-list-files .file .file-name { - width: 85%; - height: 100%; - line-height: 23px; -} -.field-list-files .empty { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; -} -.field-list-files input[type=checkbox]:checked { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23fff%22%20points%3D%2212%201%205%207.5%202%205%201%205.5%205%2010%2013%201.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A"); -} -.field-list-files input[type=checkbox]:indeterminate { - background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Crect%20fill%3D%22%23fff%22%20x%3D%223%22%20y%3D%228%22%20width%3D%2210%22%20height%3D%221%22%20%2F%3E%0A%3C%2Fsvg%3E"); -} -.field-list-files input[type=checkbox]:checked, -.field-list-files input[type=checkbox]:indeterminate { - background-color: rgb(35, 132, 211); - border-color: transparent; -} -.field-list-files input[type=checkbox]:not(:disabled) { - cursor: pointer; -} -.field-list-files input[type=checkbox] { - display: inline-block; - height: 16px; - width: 16px; - overflow: hidden; - margin-top: -4px; - vertical-align: middle; - -webkit-appearance: none; - -moz-appearance: none; - background-color: transparent; - background-repeat: no-repeat; - background-position: 50% 50%; - border: 1px solid #ccc; - transition: .2s ease-in-out; - transition-property: background-color,border; -} -.field-list-files input[type=checkbox] { - box-sizing: border-box; - margin: 0; - border-radius: 0; - font: inherit; -} - -.field-list-files .list-grid { - display: flex; - flex-wrap: wrap; - margin-left: -1%; -} -.field-list-files .files-header { - width: 100%; - margin-bottom: 5px; - margin-left: 0; - margin-right: 1%; - display: flex; - align-items: center; - justify-content: space-between; - flex-wrap: nowrap; -} -.field-list-files .files-header > div { - width: auto; - white-space: nowrap; -} -.field-list-files .files-header > div:last-child { - text-align: right; - margin-right: 0; -} -.field-list-files .files-header > div button { - position: relative; - background: transparent; - border-radius: 5px; - border: 1px solid #dddddd; - padding-left: 30px; - height: 26px; - font-size: 13px; - transition: all 0.2s; - margin-right: 10px; -} -.field-list-files .files-header > div button:hover { - background: #ebebeb; - transition: all 0.2s; -} -.field-list-files .files-header > div button:before { - content: ""; - display: block; - position: absolute; - margin: auto; - background-size: contain; - background-repeat: no-repeat; - background-position: 50% 50%; -} - -.field-list-files .files-header > div button.button-table:before { - top: 4px; - left: 5px; - width: 16px; - height: 16px; - background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 60.123 60.123' style='enable-background:new 0 0 60.123 60.123;' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23444444' d='M57.124,51.893H16.92c-1.657,0-3-1.343-3-3s1.343-3,3-3h40.203c1.657,0,3,1.343,3,3S58.781,51.893,57.124,51.893z'/%3E%3Cpath fill='%23444444' d='M57.124,33.062H16.92c-1.657,0-3-1.343-3-3s1.343-3,3-3h40.203c1.657,0,3,1.343,3,3 C60.124,31.719,58.781,33.062,57.124,33.062z'/%3E%3Cpath fill='%23444444' d='M57.124,14.231H16.92c-1.657,0-3-1.343-3-3s1.343-3,3-3h40.203c1.657,0,3,1.343,3,3S58.781,14.231,57.124,14.231z'/%3E%3Ccircle fill='%23444444' cx='4.029' cy='11.463' r='4.029'/%3E%3Ccircle fill='%23444444' cx='4.029' cy='30.062' r='4.029'/%3E%3Ccircle fill='%23444444' cx='4.029' cy='48.661' r='4.029'/%3E%3C/g%3E%3C/svg%3E%0A"); -} - -.field-list-files .files-header > div button.button-grid:before { - top: 4px; - left: 5px; - width: 16px; - height: 16px; - background-image: url("data:image/svg+xml,%3Csvg height='600pt' viewBox='-19 -19 600 600' width='600pt' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m251.25 12.5c0-6.90625-5.59375-12.5-12.5-12.5h-226.25c-6.90625 0-12.5 5.59375-12.5 12.5v226.25c0 6.90625 5.59375 12.5 12.5 12.5h226.25c6.90625 0 12.5-5.59375 12.5-12.5zm-25 213.75h-201.25v-201.25h201.25zm0 0'/%3E%3Cpath d='m562.5 12.5c0-6.90625-5.59375-12.5-12.5-12.5h-226.25c-6.90625 0-12.5 5.59375-12.5 12.5v226.25c0 6.90625 5.59375 12.5 12.5 12.5h226.25c6.90625 0 12.5-5.59375 12.5-12.5zm-25 213.75h-201.25v-201.25h201.25zm0 0'/%3E%3Cpath d='m251.25 323.75c0-6.90625-5.59375-12.5-12.5-12.5h-226.25c-6.90625 0-12.5 5.59375-12.5 12.5v226.25c0 6.90625 5.59375 12.5 12.5 12.5h226.25c6.90625 0 12.5-5.59375 12.5-12.5zm-25 212.5h-201.25v-200h201.25zm0 0'/%3E%3Cpath d='m562.5 323.75c0-6.90625-5.59375-12.5-12.5-12.5h-226.25c-6.90625 0-12.5 5.59375-12.5 12.5v226.25c0 6.90625 5.59375 12.5 12.5 12.5h226.25c6.90625 0 12.5-5.59375 12.5-12.5zm-25 212.5h-201.25v-200h201.25zm0 0'/%3E%3C/svg%3E"); -} -.field-list-files .files-header > div button:after { - content: ""; - display: block; - position: absolute; - top: 0; - border: 0.5px solid #ddd; - left: 25px; - bottom: 0; -} -.field-list-files .files-header label { - display: flex; - align-items: center; - font-size: 13px; - line-height: 15px; -} -.field-list-files .files-header label input { - margin-right: 5px; -} -.field-list-files .files-header { - width: 100%; - padding: 0 5px; - margin-bottom: 10px; -} -.field-list-files .files-header button.button-directory-trash { - display: none; -} -.field-list-files .files-header button:hover { - background: #ebebeb; - transition: all 0.2s; -} -.field-list-files .files-header > * { - display: inline-block; - margin-right: 10px; -} -.field-list-files .files-header > div > *:last-child { - margin-right: 0; -} -.field-list-files .files-header button:before { - content: ""; - display: block; - position: absolute; - width: 20px; - height: 20px; - left: 2px; - background-size: contain; - background-repeat: no-repeat; - background-position: 50% 50%; -} -.field-list-files .files-header button.button-prev:before { - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' data-svg='arrow-left'%3E%3Cpolyline fill='none' stroke='%23444444' points='10 14 5 9.5 10 5'%3E%3C/polyline%3E%3Cline fill='none' stroke='%23444444' x1='16' y1='9.5' x2='5' y2='9.52'%3E%3C/line%3E%3C/svg%3E"); -} -.field-list-files .files-header button.button-up:before { - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' data-svg='arrow-up'%3E%3Cpolygon points='10.5,4 15.37,9.4 14.63,10.08 10.5,5.49 6.37,10.08 5.63,9.4' fill='%23444444'%3E%3C/polygon%3E%3Cline fill='none' stroke='%23444444' x1='10.5' y1='16' x2='10.5' y2='5'%3E%3C/line%3E%3C/svg%3E"); -} -.field-list-files .files-header button.button-directory-trash:before { - width: 16px; - height: 16px; - left: 5px; - top: 4px; - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' data-svg='trash'%3E%3Cpolyline fill='none' stroke='%23444444' points='6.5 3 6.5 1.5 13.5 1.5 13.5 3'%3E%3C/polyline%3E%3Cpolyline fill='none' stroke='%23444444' points='4.5 4 4.5 18.5 15.5 18.5 15.5 4'%3E%3C/polyline%3E%3Crect x='8' y='7' width='1' height='9'%3E%3C/rect%3E%3Crect x='11' y='7' width='1' height='9'%3E%3C/rect%3E%3Crect x='2' y='3' width='16' height='1'%3E%3C/rect%3E%3C/svg%3E"); -} -.field-list-files .files-header button:after { - content: ""; - display: block; - position: absolute; - top: 0; - border: 0.5px solid #ddd; - left: 25px; - bottom: 0; -} -.field-list-files .files-header .button-dropdown { - position: relative; - display: inline-block; -} -.field-list-files .files-header .button-dropdown .dropdown-content { - display: none; - position: absolute; - background-color: #f9f9f9; - min-width: 190px; - box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); - padding: 12px 15px; - z-index: 1; - text-align: center; - left: -25px; -} -.field-list-files .files-header .button-dropdown:hover .dropdown-content { - display: block; -} -.field-list-files .files-header .button-dropdown .dropdown-content > div { - margin-top: 5px; -} -.field-list-files .files-header .button-dropdown .dropdown-content > div button { - background: #83232f; - color: #fff; - border: 1px solid #51131d; -} -.field-list-files .files-header .button-dropdown .dropdown-content > div button:hover { - background: #6b1a26; -} -.field-list-files .files-header .button-dropdown .dropdown-content > div button:before { - width: 16px; - height: 16px; - left: 5px; - top: 4px; - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' data-svg='trash'%3E%3Cpolyline fill='none' stroke='%23ffffff' points='6.5 3 6.5 1.5 13.5 1.5 13.5 3'%3E%3C/polyline%3E%3Cpolyline fill='none' stroke='%23ffffff' points='4.5 4 4.5 18.5 15.5 18.5 15.5 4'%3E%3C/polyline%3E%3Crect x='8' y='7' width='1' fill='%23ffffff' height='9'%3E%3C/rect%3E%3Crect x='11' y='7' width='1' fill='%23ffffff' height='9'%3E%3C/rect%3E%3Crect x='2' y='3' width='16' fill='%23ffffff' height='1'%3E%3C/rect%3E%3C/svg%3E"); -} -.field-list-files .files-header .button-dropdown .dropdown-content > div button:after { - border: 0.5px solid #51131d; -} -.field-list-files .list-grid .file-item { - width: 31%; - margin: 1%; - overflow: hidden; -} -.field-list-files .list-grid .file-item:hover { - cursor: pointer; -} -.field-list-files .list-grid .file-item:hover .file-exs { - transition: all 0.2s; - transform: scale(1.2); -} -.field-list-files .list-grid .file-item .import-files-check-file { - display: none; -} -.field-list-files .list-grid .file-item .import-files-check-file:checked ~ .file:before { - content: ""; - display: block; - position: absolute; - width: 40px; - height: 40px; - margin: auto; - left: calc((100% - 40px)/2); - border-radius: 50%; - background-size: contain; - background-color: #fff; - background-repeat: no-repeat; - background-position: 50% 50%; - background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 426.667 426.667' style='enable-background:new 0 0 426.667 426.667;' xml:space='preserve'%3E%3Cpath style='fill:%236AC259;' d='M213.333,0C95.518,0,0,95.514,0,213.333s95.518,213.333,213.333,213.333 c117.828,0,213.333-95.514,213.333-213.333S331.157,0,213.333,0z M174.199,322.918l-93.935-93.931l31.309-31.309l62.626,62.622 l140.894-140.898l31.309,31.309L174.199,322.918z'/%3E%3C/svg%3E%0A"); - z-index: 2; -} -.field-list-files .list-grid .file-item .file { - position: relative; - width: 100%; - height: 130px; - background-color: #efefef; -} -.field-list-files .list-grid .file-item .file .file-exs { - width: 100%; - height: 100%; - background-position: 50% 50%; - background-repeat: no-repeat; - background-size: contain; - transition: all 0.2s; -} -.field-list-files .list-grid .file-item .file .file-exs.file-icons { - width: 50%; - height: 50%; - margin: auto; -} -.field-list-files .list-grid .file-item .file .file-exs .av-folderlist-label { - display: none; -} -.field-list-files .list-grid .file-item .file .file-name { - position: absolute; - background: rgba(0,0,0,0.6); - color: #fff; - height: auto; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; - left: 0; - right: 0; - bottom: 0; - width: 100%; - word-wrap: break-word; - overflow-wrap: break-word; -} -.field-list-files .list-grid .directory-item { - width: 31%; - margin: 1%; -} -.field-list-files .list-grid .directory-item .directory { - width: 100%; - height: 130px; - position: relative; - border: 1px solid #eeeeee; - transition: all 0.2s; -} -.field-list-files .list-grid .directory-item:hover .directory { - background: #eeeeee; - cursor: pointer; - transition: all 0.2s; -} -.field-list-files .list-grid .directory-item .directory .directory-icon { - width: 48%; - height: 100%; - margin: auto; - background-size: contain; - background-repeat: no-repeat; - background-position: 50% 50%; - background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 58 58' style='enable-background:new 0 0 58 58;' xml:space='preserve'%3E%3Cpath style='fill:%23EFCE4A;' d='M46.324,52.5H1.565c-1.03,0-1.779-0.978-1.51-1.973l10.166-27.871 c0.184-0.682,0.803-1.156,1.51-1.156H56.49c1.03,0,1.51,0.984,1.51,1.973L47.834,51.344C47.65,52.026,47.031,52.5,46.324,52.5z'/%3E%3Cg%3E%3Cpath style='fill:%23EBBA16;' d='M50.268,12.5H25l-5-7H1.732C0.776,5.5,0,6.275,0,7.232V49.96c0.069,0.002,0.138,0.006,0.205,0.01 l10.015-27.314c0.184-0.683,0.803-1.156,1.51-1.156H52v-7.268C52,13.275,51.224,12.5,50.268,12.5z'/%3E%3C/g%3E%3C/svg%3E%0A"); -} -.field-list-files .list-grid .directory-item .directory .directory-name { - position: absolute; - background: rgba(0,0,0,0.6); - color: #fff; - height: auto; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; - left: 0; - right: 0; - bottom: 0; - width: 100%; -} -.field-list-files .list-table .file-item { - display: flex; - align-items: center; - padding: 0 6px; - border-bottom: 1px solid #ddd; -} -.field-list-files .list-table .file-item:hover { - cursor: pointer; - background: #eeeeee; - transition: all 0.2s; -} -.field-list-files .list-table .file-item input { - margin-right: 5px; -} -.field-list-files .list-table .file-item input:checked ~ .file { - background-color: #fcf8e3; - color: #444444; -} -.field-list-files .list-table .file-item .file { - padding: 6px 4px; -} -.field-list-files .list-table .file .file-exs .av-folderlist-label:after { - margin-top: 4px; -} -.field-list-files .list-table .directory-item { - display: flex; - align-items: center; - padding: 0 6px 0 27px; - border-bottom: 1px solid #ddd; -} -.field-list-files .list-table .directory-item:hover { - cursor: pointer; - background: #eeeeee; - transition: all 0.2s; -} -.field-list-files .list-table .directory-item .directory { - padding: 6px 4px; - width: 100%; - display: flex; - height: 25px; - align-self: center; - align-items: center; -} -.field-list-files .list-table .directory-item .directory .directory-icon { - width: 16px; - height: 16px; - margin-right: 4px; - background-size: contain; - background-repeat: no-repeat; - background-position: 50% 50%; - background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 58 58' style='enable-background:new 0 0 58 58;' xml:space='preserve'%3E%3Cpath style='fill:%23EFCE4A;' d='M46.324,52.5H1.565c-1.03,0-1.779-0.978-1.51-1.973l10.166-27.871 c0.184-0.682,0.803-1.156,1.51-1.156H56.49c1.03,0,1.51,0.984,1.51,1.973L47.834,51.344C47.65,52.026,47.031,52.5,46.324,52.5z'/%3E%3Cg%3E%3Cpath style='fill:%23EBBA16;' d='M50.268,12.5H25l-5-7H1.732C0.776,5.5,0,6.275,0,7.232V49.96c0.069,0.002,0.138,0.006,0.205,0.01 l10.015-27.314c0.184-0.683,0.803-1.156,1.51-1.156H52v-7.268C52,13.275,51.224,12.5,50.268,12.5z'/%3E%3C/g%3E%3C/svg%3E%0A"); -} -.field-list-files .list-table .directory-item .directory .directory-name { - height: 100%; - line-height: 23px; -} -.field-list-files .list-table > div:last-child { - border-bottom: none; -} -.modal-import-file .modal-footer button { - padding: 7px 13px; - font-size: 13px; -} -.modal-speed-upload { - display: block !important; - top: 5% !important; - left: 0 !important; - position: relative !important; - margin: 0 !important; - margin-top: 10px; - z-index: 1 !important; - opacity: 1 !important; - border: none !important; - box-shadow: none !important; - background: transparent; -} -.modal-speed-upload .modal-header, -.modal-speed-upload .field-wrapper, -.modal-speed-upload .field-list-files .list, -.modal-speed-upload .modal-footer { - display: none; -} -.modal-speed-upload .field-list-files { - width: 100% !important; - padding-left: 0 !important; -} -.modal-speed-upload .drop-area { - padding-left: 0 !important; - margin-bottom: 15px !important; - border: none !important; - box-shadow: none !important; -} -.modal-speed-upload .drop-area input, -.modal-speed-upload .drop-area label, -.modal-speed-upload .drop-area p { - display: none; -} -.modal-speed-upload .drop-area progress{ - display: block; -} diff --git a/media/core/css/upload.css b/media/core/css/upload.css deleted file mode 100644 index fbf6944..0000000 --- a/media/core/css/upload.css +++ /dev/null @@ -1,71 +0,0 @@ -.drop-area { - border: 2px dashed #ccc; - border-radius: 5px; - width: auto; - margin-bottom: 15px; - padding: 15px; - text-align: center; -} -.drop-area.highlight { - border-color: #d8d7d8; -} -.drop-area .form-upload { - margin-bottom: 10px; - text-align: center; -} -.drop-area p { - display: inline-block; - margin: 0; -} -.drop-area .button { - display: inline-block; - cursor: pointer; - color: #6f9cbf; - margin: 0; -} -.drop-area .button:hover { - color: #4d6e85; -} -.drop-area .fileElem { - display: none; -} -.drop-area progress { - display: none; - width: 100%; -} - -.upload-errors { - display: none; - position: relative; - background: #fef4f6; - color: #f0506e; - padding: 15px 29px 15px 15px; -} - -.upload-errors div { - width: 100%; - margin-bottom: 5px; -} - -.upload-errors .uk-alert-close { - position: absolute; - top: 17px; - right: 15px; - color: inherit; - opacity: .4; - margin: 0; - border: none; - border-radius: 0; - overflow: visible; - font: inherit; - text-transform: none; - padding: 0; - background-color: transparent; - display: inline-block; - fill: currentcolor; - line-height: 0; -} - -.upload-errors .uk-alert-close:hover { - cursor: pointer; -} \ No newline at end of file diff --git a/media/core/js/bootbox.min.js b/media/core/js/bootbox.min.js deleted file mode 100644 index 0dc0cbd..0000000 --- a/media/core/js/bootbox.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * bootbox.js v4.4.0 - * - * http://bootboxjs.com/license.txt - */ -!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(a){var b=q[o.locale];return b?b[a]:q.en[a]}function e(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d.call(c,a)===!1;e||c.modal("hide")}function f(a){var b,c=0;for(b in a)c++;return c}function g(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function h(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},o,a),a.buttons||(a.buttons={}),c=a.buttons,d=f(c),g(c,function(a,e,f){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=2>=d&&f===d-1?"btn-primary":"btn-default")}),a}function i(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function j(a,c,d){return b.extend(!0,{},a,i(c,d))}function k(a,b,c,d){var e={className:"bootbox-"+a,buttons:l.apply(null,b)};return m(j(e,d,c),b)}function l(){for(var a={},b=0,c=arguments.length;c>b;b++){var e=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}return a}function m(a,b){var d={};return g(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var n={dialog:"",header:"",footer:"",closeButton:"",form:"
",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"
",date:"",time:"",number:"",password:""}},o={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},p={};p.alert=function(){var a;if(a=k("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback.call(this):!0},p.dialog(a)},p.confirm=function(){var a;if(a=k("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,!1)},a.buttons.confirm.callback=function(){return a.callback.call(this,!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return p.dialog(a)},p.prompt=function(){var a,d,e,f,h,i,k;if(f=b(n.form),d={className:"bootbox-prompt",buttons:l("cancel","confirm"),value:"",inputType:"text"},a=m(j(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show,a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=h.val();break;case"checkbox":var d=h.find("input:checked");c=[],g(d,function(a,d){c.push(b(d).val())})}return a.callback.call(this,c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!n.inputs[a.inputType])throw new Error("invalid prompt type");switch(h=b(n.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":h.val(a.value);break;case"select":var o={};if(k=a.inputOptions||[],!b.isArray(k))throw new Error("Please pass an array of input options");if(!k.length)throw new Error("prompt with select requires options");g(k,function(a,d){var e=h;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(o[d.group]||(o[d.group]=b("").attr("label",d.group)),e=o[d.group]),e.append("")}),g(o,function(a,b){h.append(b)}),h.val(a.value);break;case"checkbox":var q=b.isArray(a.value)?a.value:[a.value];if(k=a.inputOptions||[],!k.length)throw new Error("prompt with checkbox requires options");if(!k[0].value||!k[0].text)throw new Error("given options in wrong format");h=b("
"),g(k,function(c,d){var e=b(n.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),g(q,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),h.append(e)})}return a.placeholder&&h.attr("placeholder",a.placeholder),a.pattern&&h.attr("pattern",a.pattern),a.maxlength&&h.attr("maxlength",a.maxlength),f.append(h),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=p.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){h.focus()}),i===!0&&e.modal("show"),e},p.dialog=function(a){a=h(a);var d=b(n.dialog),f=d.find(".modal-dialog"),i=d.find(".modal-body"),j=a.buttons,k="",l={onEscape:a.onEscape};if(b.fn.modal===c)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(g(j,function(a,b){k+="",l[a]=b.callback}),i.find(".bootbox-body").html(a.message),a.animate===!0&&d.addClass("fade"),a.className&&d.addClass(a.className),"large"===a.size?f.addClass("modal-lg"):"small"===a.size&&f.addClass("modal-sm"),a.title&&i.before(n.header),a.closeButton){var m=b(n.closeButton);a.title?d.find(".modal-header").prepend(m):m.css("margin-top","-10px").prependTo(i)}return a.title&&d.find(".modal-title").html(a.title),k.length&&(i.after(n.footer),d.find(".modal-footer").html(k)),d.on("hidden.bs.modal",function(a){a.target===this&&d.remove()}),d.on("shown.bs.modal",function(){d.find(".btn-primary:first").focus()}),"static"!==a.backdrop&&d.on("click.dismiss.bs.modal",function(a){d.children(".modal-backdrop").length&&(a.currentTarget=d.children(".modal-backdrop").get(0)),a.target===a.currentTarget&&d.trigger("escape.close.bb")}),d.on("escape.close.bb",function(a){l.onEscape&&e(a,d,l.onEscape)}),d.on("click",".modal-footer button",function(a){var c=b(this).data("bb-handler");e(a,d,l[c])}),d.on("click",".bootbox-close-button",function(a){e(a,d,l.onEscape)}),d.on("keyup",function(a){27===a.which&&d.trigger("escape.close.bb")}),b(a.container).append(d),d.modal({backdrop:a.backdrop?"static":!1,keyboard:!1,show:!1}),a.show&&d.modal("show"),d},p.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(o,a)},p.hideAll=function(){return b(".bootbox").modal("hide"),p};var q={bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return p.addLocale=function(a,c){return b.each(["OK","CANCEL","CONFIRM"],function(a,b){if(!c[b])throw new Error("Please supply a translation for '"+b+"'")}),q[a]={OK:c.OK,CANCEL:c.CANCEL,CONFIRM:c.CONFIRM},p},p.removeLocale=function(a){return delete q[a],p},p.setLocale=function(a){return p.setDefaults("locale",a)},p.init=function(c){return a(c||b)},p}); \ No newline at end of file diff --git a/media/core/js/import.js b/media/core/js/import.js deleted file mode 100644 index 11d52a6..0000000 --- a/media/core/js/import.js +++ /dev/null @@ -1,790 +0,0 @@ -jQuery(function(){ - - let listfullpath = []; - let historyDirectories = []; - let results; - let modal; - let modalName; - let filesListWrap; - let importfieldpath; - let importfield; - let maxsize; - let exs; - let namefield; - let namefile; - let active; - let upload; - let flagSwitchingSearch = false; - let subform; - let path; - let activeLists = []; - let dropAreaAll = document.querySelectorAll(".drop-area"); - let inputFileAll = document.querySelectorAll(".fileElem"); - let dropArea; - let inputPath; - let inputFile; - let errorsWrap; - let errorsHtml; - let lastTypeViewFiles = 'list-table'; - let uploadProgress = []; - let countFiles = 0; - let progressBar; - let uploadI = []; - let speedUpload = false; - let speedUploadComplete = false; - vex.defaultOptions.className = 'vex-theme-plain'; - vex.dialog.buttons.YES.text = 'Ок'; - vex.dialog.buttons.NO.text = 'Нет'; - vex.dialog.buttons.NO.text = 'Отмена'; - let btnback = Joomla.JText._('PLG_RADICAL_MULTI_FIELD_BUTTON_BACK'); - let btnup = Joomla.JText._('PLG_RADICAL_MULTI_FIELD_BUTTON_UP'); - let btngrid = Joomla.JText._('PLG_RADICAL_MULTI_FIELD_BUTTON_GRID'); - let btnlist = Joomla.JText._('PLG_RADICAL_MULTI_FIELD_BUTTON_LIST'); - let btnselectall = Joomla.JText._('PLG_RADICAL_MULTI_FIELD_BUTTON_SELECTALL'); - - jQuery('.button-open-modal').on('click', function() { - modalName = jQuery(this).attr('href'); - modal = jQuery(modalName); - filesListWrap = document.querySelector(modalName + ' .field-list-files'); - importfieldpath = jQuery(this).attr('data-importfieldpath'); - importfield = jQuery(this).attr('data-importfield'); - maxsize = parseFloat(jQuery(this).attr('data-maxsize')); - exs = jQuery(this).attr('data-exs').split(','); - namefield = jQuery(this).attr('data-namefield'); - namefile = jQuery(this).attr('data-namefile'); - active = modal.find('.level-0 > li'); - activeLists = []; - subform = jQuery(this).closest('.control-group').find('.subform-repeatable'); - progressBar = document.querySelector(modalName + " .progress-bar"); - dropArea = document.querySelector(modalName + " .drop-area"); - inputPath = document.querySelector(modalName + " .pathElem"); - inputFile = document.querySelector(modalName + " .fileElem"); - errorsWrap = document.querySelector(modalName + " .upload-errors"); - reloadListfullpath(); - openDirectoryAndActive(active, 'root'); - modal.removeClass('modal-speed-upload'); - progressBar.style.display = "none"; - - if(localStorage !== undefined) { - let openLastDir = localStorage.getItem('radicalmultifieldLastDir'); - if(openLastDir !== null) { - for (let i=0;i<=listfullpath.length;i++) { - if(listfullpath[i].p === openLastDir) { - openDirectoryAndActive(listfullpath[i].el, listfullpath[i].p); - break; - } - } - } - - let currLastTypeViewFiles = localStorage.getItem('lastTypeViewFiles'); - if(currLastTypeViewFiles !== null) { - lastTypeViewFiles = currLastTypeViewFiles; - } - - } - - if(speedUpload) { - //окно не показываем - speedUpload = false; - speedUploadComplete = false; - modal.hide(); - modal.addClass('modal-speed-upload'); - return false; - } else { - modal.removeClass('modal-speed-upload'); - } - - }); - - - jQuery('.modal-import-file').on('click', '.av-folderlist-tree', function() { - jQuery(this).parent().toggleClass('open'); - }); - - - jQuery('.modal-import-file').on('click', '.av-folderlist-label', function() { - let self = jQuery(this); - let modal = self.closest('.modal-import-file'); - let listfiles = modal.find('.field-list-files .list'); - let list = self.closest('.av-folderlist'); - active = self.closest('.av-folderlist-dir'); - list.find('.av-folderlist-label').removeClass('selected'); - jQuery(this).addClass('selected'); - listfiles.html(''); - jQuery.get(siteUrl + "/administrator/index.php?option=com_ajax&plugin=radicalmultifield&group=fields&format=json&type=get_files&directory=" + encodeURIComponent(self.attr('path')) + - "&importfieldpath=" + encodeURIComponent(importfieldpath) + - "&importfield=" + encodeURIComponent(importfield) - ).done(function (response) { - path = self.attr('path'); - self.closest('.field-wrapper').find('.import-directory').val(path); - - if(inputPath.value !== '') { - if(historyDirectories.length>0) { - if(historyDirectories[historyDirectories.length - 1] !== inputPath.value) { - historyDirectories.push(inputPath.value); - } - } else { - historyDirectories.push(inputPath.value); - } - } - inputPath.value = path; - - - let htmlfilesAndDirectories = '
'; - let files = response.data[0].files; - let directories = response.data[0].directories; - - for(let i = 0;i
" ; - } - - for(let i = 0;i
" + files[i] + "
" ; - } - - htmlfilesAndDirectories += ""; - - if(files.length === 0 && directories === 0) { - htmlfilesAndDirectories = "
Файлов нет.
" - } - - listfiles.html(htmlfilesAndDirectories); - reloadViewFiles(); - - let filesAll = document.querySelectorAll(modalName + ' .field-list-files .file-item'); - let directoriesAll = document.querySelectorAll(modalName + ' .field-list-files .directory-item'); - let buttonBack = document.querySelector(modalName + ' .button-prev'); - let buttonUp = document.querySelector(modalName + ' .button-up'); - let buttonDelete = document.querySelector(modalName + ' .button-directory-trash'); - - if(errorsHtml === '') { - - for(let i=0;i 0) { - let directory = historyDirectories[historyDirectories.length - 1]; - for (let j=0;j<=listfullpath.length;j++) { - if(listfullpath[j].p === directory) { - openDirectoryAndActive(listfullpath[j].el, listfullpath[j].p); - historyDirectories.splice(historyDirectories.length - 2, 2); - break; - } - } - } - ev.preventDefault(); - }); - - buttonUp.addEventListener('click', function (ev) { - let currDirectories = inputPath.value.split('/'); - if(currDirectories.length > 1) { - currDirectories.pop(); - let directory = currDirectories.join('/'); - for (let j=0;j<=listfullpath.length;j++) { - if(listfullpath[j].p === directory) { - openDirectoryAndActive(listfullpath[j].el, listfullpath[j].p); - break; - } - } - } - ev.preventDefault(); - }); - - buttonDelete.addEventListener('click', function (ev) { - ev.preventDefault(); - }); - - for(let i=0;i -1) { - listhtml += "
" + listfullpath[i].p + "
" - } - } - - if(listfullpath.length === 0) { - listhtml += "
Результатов нет
" - } - - results.html(listhtml); - results.show(); - }); - - jQuery('.av-modal-actions .search .results').on('click', 'div', function() { - jQuery('.av-modal-actions .search input').val(''); - results.hide(); - openDirectoryAndActive(listfullpath[parseInt(jQuery(this).attr('data-i'))].el, listfullpath[parseInt(jQuery(this).attr('data-i'))].p); - return false; - }); - - jQuery('.modal-import-file .create-directory').on('click', function() { - - if(active === undefined) { - vex.dialog.alert({ - unsafeMessage: 'Выберите директорию для создания.' - }); - return false; - } - - modal.hide(); - vex.dialog.prompt({ - message: 'Введите название директории', - placeholder: '', - callback: function (value) { - let newName = value; - if (newName) { - jQuery.get(siteUrl + "/administrator/index.php?option=com_ajax&plugin=radicalmultifield&group=fields&format=raw&type=create_directory&name=" + - encodeURIComponent(newName) + - "&path=" + encodeURIComponent(active.find('.av-folderlist-label').attr('path')) + - "&importfieldpath=" + encodeURIComponent(importfieldpath) + - "&importfield=" + encodeURIComponent(importfield)) - .done(function (response) { - jQuery(modalName + ' .av-folderlist').remove(); - jQuery(modalName + ' .av-modal').append(response); - reloadListfullpath(); - changeActiveFromPath(active.find('.av-folderlist-label').attr('path') + '/' + newName); - openDirectoryAndActive(active, active.find('.av-folderlist-label').attr('path')); - modal.show(); - }); - } else { - modal.show(); - } - } - }); - - return false; - }); - - jQuery('.modal-import-file .tree-reload').on('click', function() { - let lastActive = active.find('.av-folderlist-label').attr('path'); - let bufferScrollTop = jQuery('.av-folderlist').scrollTop(); - jQuery.get(siteUrl + "/administrator/index.php?option=com_ajax&plugin=radicalmultifield&group=fields&format=raw&type=get_directories" + - "&importfieldpath=root" + - "&importfield=" + encodeURIComponent(importfield) - ).done(function (response) { - jQuery('.av-modal ul').remove(); - jQuery('.av-modal').append(response); - reloadListfullpath(); - if(lastActive !== null) { - for (let i=0;i<=listfullpath.length;i++) { - if(listfullpath[i].p === lastActive) { - openDirectoryAndActive(listfullpath[i].el, listfullpath[i].p); - break; - } - } - } - jQuery('.av-folderlist').scrollTop(bufferScrollTop); - }); - return false; - }); - - - jQuery('.modal-import-file').on('click', '.import-files-check-all', function() { - if(jQuery(this).attr("checked")) { - jQuery('.modal-import-file .field-list-files input').each(function (i, el) { - if(!jQuery(el).attr("checked")) { - jQuery(el).prop('checked', true); - let currFilename = jQuery(this).closest('.file-item').find('.file-name').html(); - let currI = activeLists.indexOf(currFilename); - - if(currI === -1) { - activeLists.push(currFilename); - //jQuery(this).closest('tr').addClass('active'); - } - - } - }); - } else { - activeLists = []; - jQuery('.modal-import-file .field-list-files input').each(function (i, el) { - if(jQuery(el).attr("checked")) { - jQuery(el).prop('checked', false); - //jQuery(this).closest('tr').removeClass('active'); - } - }); - } - }); - - - - jQuery('.modal-import-file').on('click', '.import-files-check-file', function() { - let currFilename = jQuery(this).closest('tr').find('.file-name').html(); - let currI = activeLists.indexOf(currFilename); - - if(jQuery(this).attr("checked")) { - if(currI === -1) { - activeLists.push(currFilename); - //jQuery(this).closest('tr').addClass('active'); - } - } else { - if(currI !== -1) { - activeLists.splice(currI, 1); - //jQuery(this).closest('tr').removeClass('active'); - } - } - }); - - jQuery('.modal-import-file').on('click', '.upload-errors-close', function () { - jQuery(this).parent().hide(); - return false; - }); - - - jQuery('.import-wrap').on('click', '.speed-upload', function () { - let modalTmp = jQuery(this).closest('.import-wrap'); - speedUpload = true; - modalTmp.find('.button-open-modal').click(); - modalTmp.find('.fileElem').click(); - return false; - }); - - function reloadListfullpath() { - listfullpath = []; - jQuery(modalName + ' .av-folderlist-dir').each(function (i, el) { - - listfullpath.push({ - el: jQuery(el), - p: jQuery(el).find('.av-folderlist-label').attr('path') - }); - - if(jQuery(el).find('.av-folderlist-label').attr('path') === active.find('.av-folderlist-label').attr('path')) { - active = jQuery(el); - } - - }); - } - - function changeActiveFromPath(path) { - for(let i=0;i maxI) { - break; - } - - currentI++; - if(!tmpLi.hasClass('av-folderlist-dir')) { - tmpLi = tmpLi.parent(); - continue; - } - - if(!tmpLi.hasClass('open')) { - tmpLi.addClass('open'); - tmpLi = tmpLi.parent(); - } else { - break; - } - } - el.find('.av-folderlist-label[path="' + p + '"]').click(); - } - - - ;['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { - for (let i = 0; i < dropAreaAll.length; i++) { - dropAreaAll[i].addEventListener(eventName, preventDefaults, false); - } - document.body.addEventListener(eventName, preventDefaults, false); - }); - - // Highlight drop area when item is dragged over it - ;['dragenter', 'dragover'].forEach(eventName => { - for (let i = 0; i < dropAreaAll.length; i++) { - dropAreaAll[i].addEventListener(eventName, highlight, false); - } - }); - - ;['dragleave', 'drop'].forEach(eventName => { - for (let i = 0; i < dropAreaAll.length; i++) { - dropAreaAll[i].addEventListener(eventName, unhighlight, false); - } - }); - - for (let i = 0; i < dropAreaAll.length; i++) { - dropAreaAll[i].addEventListener('drop', handleDrop, false); - } - - - for (let i = 0; i < inputFileAll.length; i++) { - inputFileAll[i].addEventListener('change', function () { - handleFiles(this.files); - }, false); - } - - - function preventDefaults(e) { - e.preventDefault(); - e.stopPropagation(); - } - - function highlight(e) { - dropArea.classList.add('highlight'); - } - - function unhighlight(e) { - dropArea.classList.remove('active'); - } - - function handleDrop(e) { - let dt = e.dataTransfer; - let files = dt.files; - - handleFiles(files) - } - - - function initializeProgress(numFiles) { - progressBar.style.display = "block"; - progressBar.value = 0; - uploadProgress = []; - countFiles = numFiles; - - for (let i = numFiles; i > 0; i--) { - uploadProgress.push(0); - } - } - - function updateProgress(fileNumber, percent) { - uploadProgress[fileNumber] = percent; - let total = uploadProgress.reduce((tot, curr) => tot + curr, 0) / uploadProgress.length; - progressBar.value = total; - } - - function handleFiles(files) { - if(active === undefined) { - vex.dialog.alert({ - unsafeMessage: 'Выберите каталог для загрузки' - }); - } - files = [...files]; - initializeProgress(files.length); - errorsHtml = ''; - uploadI = []; - files.forEach(uploadFile); - } - - - function uploadFile(file, i) { - - errorsWrap.style.display = "none"; - - if((file.size / 1024 / 1024) > maxsize) { - - vex.dialog.alert({ - unsafeMessage: 'Файл ' + file.name + ' не должен превышать ' + maxsize + ' мегабайта.' - }); - - countFiles--; - - if(countFiles === 0) { - progressBar.style.display = "none"; - } - - return false; - } - - let currExs = file.name.split('.'); - - if(currExs.length === 1) { - - vex.dialog.alert({ - unsafeMessage: 'Файл ' + file.name + ' должен иметь расширение.' - }); - - countFiles--; - - if(countFiles === 0) { - modal.removeClass('modal-speed-upload'); - progressBar.style.display = "none"; - } - - return false; - } - - if (exs.indexOf(currExs.pop().toLowerCase()) === -1) { - - vex.dialog.alert({ - unsafeMessage: 'Файл ' + file.name + ' должен иметь расширения: ' + exs.join(',') + '.' - }); - - countFiles--; - - if(countFiles === 0) { - modal.removeClass('modal-speed-upload'); - progressBar.style.display = "none"; - } - - return false; - } - - - let url = siteUrl + "/administrator/index.php?option=com_ajax&plugin=radicalmultifield&group=fields&format=json&type=upload_file" - + "&importfieldpath=" + encodeURIComponent(importfieldpath) - + "&importfield=" + encodeURIComponent(importfield); - let xhr = new XMLHttpRequest(); - let formData = new FormData(); - xhr.open('POST', url, true); - xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); - - xhr.upload.addEventListener("progress", function (e) { - updateProgress(i, (e.loaded * 100.0 / e.total) || 100); - }); - - xhr.addEventListener('readystatechange', function (e) { - if (xhr.readyState == 4 && xhr.status == 200) { - let response = JSON.parse(xhr.response); - - if(response.data[0].name !== undefined) { - activeLists.push(response.data[0].name); - } - - if(response.data[0].error !== undefined) { - errorsHtml += '
' + file.name + ': ' + response.data[0].error + '
'; - } - - updateProgress(i, 100); - - uploadI.push((i + 1)); - - if(countFiles === uploadI.length) { - speedUploadComplete = true; - active.find('.av-folderlist-label[path="' + inputPath.value + '"]').click(); - jQuery('.modal-import-file .tree-reload').click(); - progressBar.style.display = "none"; - - if(errorsHtml !== '') { - errorsWrap.querySelector('div').innerHTML = errorsHtml; - errorsWrap.style.display = "block"; - } - - } - - } - else if (xhr.readyState == 4 && xhr.status != 200) { - - uploadI.push((i + 1)); - - if(countFiles === uploadI.length) { - speedUploadComplete = true; - active.find('.av-folderlist-label[path="' + inputPath.value + '"]').click(); - jQuery('.modal-import-file .tree-reload').click(); - progressBar.style.display = "none"; - - if(errorsHtml !== '') { - errorsWrap.innerHTML = errorsHtml; - errorsWrap.style.display = "block"; - } - - } - - } - - - }); - - formData.append('path', inputPath.value); - formData.append('file', file); - xhr.send(formData); - } - - jQuery('.button-import-start').on('click', function () { - - modal.removeClass('modal-speed-upload'); - - if(activeLists.length === 0) { - - vex.dialog.alert({ - unsafeMessage: 'Выберите файлы из списка', - }); - - return false; - } - - jQuery(modalName + ' .field-list-files .file-item').each(function (i, el) { - - if(!jQuery(el).find('.import-files-check-file').attr('checked')) { - return; - } - - let subformRepeatableGroup; - - if(/^div.subform-repeatable-group.*?$/.test(subform.attr('data-repeatable-element'))) { - //subform.find('.group-add').click(); - subformRepeatableGroup = '.subform-repeatable-group:last-child input'; - } - - if(/^tr.subform-repeatable-group.*?$/.test(subform.attr('data-repeatable-element'))) { - subform.find('thead .btn').click(); - subformRepeatableGroup = 'tbody tr:last-child input'; - } - - if(/^div.subform-repeatable-group.*?$/.test(subform.attr('data-repeatable-element'))) { - subform.find('.btn-toolbar:first .btn').click(); - subformRepeatableGroup = '.subform-card:last input'; - } - - subform.find(subformRepeatableGroup).each(function (k, elt) { - let name = jQuery(elt).attr('name'); - let fileName = jQuery(el).find('.file-name').html(); - let file = importfieldpath + path.replace('root', '') + '/' + fileName; - - if(name.indexOf('[' + namefield + ']') > -1) { - jQuery(elt).val(file); - } - - if(name.indexOf('[' + namefile + ']') > -1) { - //jQuery(elt).val(fileName.split('.')[0].replace(/_[0-9]{0,}$/g, '')); - jQuery(elt).val(fileName.split('.')[0]); - } - }); - }); - - jQuery(modalName).modal('hide'); - - return false; - }); - - -}); diff --git a/media/core/less/base.less b/media/core/less/base.less deleted file mode 100644 index 6decdb8..0000000 --- a/media/core/less/base.less +++ /dev/null @@ -1,1183 +0,0 @@ -.import-wrap { - - .av-modal { - padding: 0px 0px 20px 0px; - } - - .av-modal-actions { - height: 30px; - margin-bottom: 0; - padding: 0; - display: flex; - justify-content: space-between; - border-bottom: none; - } - - .av-modal-actions > .btn { - width: 48%; - } - - .av-modal-actions > .search { - width: 48%; - padding: 0px 8px 1px 0px; - } - - .av-modal-actions .search input { - width: 100% !important; - margin: 0; - height: 100%; - padding-bottom: 0; - padding-top: 0; - } - - .av-folderlist { - padding-left: 0; - } - - .hide { - display: none; - } - - .show { - display: block; - } - - .invisible { - visibility: hidden; - } - - .affix { - position: fixed; - } - - .close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 18px; - color: #000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); - } - - .btn { - display: inline-block; - *display: inline; - *zoom: 1; - padding: 4px 12px; - margin-bottom: 0; - font-size: 13px; - line-height: 18px; - text-align: center; - vertical-align: middle; - cursor: pointer; - background-color: #f3f3f3; - color: #333; - border: 1px solid #b3b3b3; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - } - - .btn:hover, - .btn:focus { - background-color: #e6e6e6; - text-decoration: none; - text-shadow: none; - } - - .btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; - } - - .btn.active, - .btn:active { - background-image: none; - outline: 0; - } - - .btn.disabled, - .btn[disabled] { - cursor: default; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - - .btn-large { - padding: 11px 19px; - font-size: 16.25px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - } - - .btn-large [class^="icon-"], - .btn-large [class*=" icon-"] { - margin-top: 4px; - } - - .btn-small { - padding: 2px 10px; - font-size: 12px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - - .btn-small [class^="icon-"], - .btn-small [class*=" icon-"] { - margin-top: 0; - } - - .btn-mini [class^="icon-"], - .btn-mini [class*=" icon-"] { - margin-top: -1px; - } - - .btn-mini { - padding: 0 6px; - font-size: 9.75px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - - .btn-block { - display: block; - width: 100%; - padding-left: 0; - padding-right: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - - .btn-block + .btn-block { - margin-top: 5px; - } - - input[type="submit"].btn-block, - input[type="reset"].btn-block, - input[type="button"].btn-block { - width: 100%; - } - - .btn-primary, - .btn-warning, - .btn-danger, - .btn-success, - .btn-info, - .btn-inverse { - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - } - - .btn-primary { - border: 1px solid #15497c; - border: 1px solid rgba(0, 0, 0, 0.2); - color: #fff; - background-color: #2384d3; - } - - .btn-primary:hover, - .btn-primary:focus { - background-color: #185b91; - color: #fff; - text-decoration: none; - } - - .btn-warning { - border: 1px solid #f89406; - border: 1px solid rgba(0, 0, 0, 0.2); - color: #fff; - background-color: #f89406; - } - - .btn-warning:hover, - .btn-warning:focus { - background-color: #ad6704; - color: #fff; - text-decoration: none; - text-shadow: none; - } - - .btn-danger { - border: 1px solid #bd362f; - border: 1px solid rgba(0, 0, 0, 0.2); - color: #fff; - background-color: #bd362f; - } - - .btn-danger:hover, - .btn-danger:focus { - background-color: #802420; - color: #fff; - text-decoration: none; - } - - .btn-success { - border: 1px solid #378137; - border: 1px solid rgba(0, 0, 0, 0.2); - color: #fff; - background-color: #46a546; - } - - .btn-success:hover, - .btn-success:focus { - background-color: #2f6f2f; - color: #fff; - text-decoration: none; - } - - .btn-info { - border: 1px solid #2f96b4; - border: 1px solid rgba(0, 0, 0, 0.2); - color: #fff; - background-color: #2f96b4; - } - - .btn-info:hover, - .btn-info:focus { - background-color: #1f6377; - color: #fff; - text-decoration: none; - } - - .btn-inverse { - border: 1px solid #444; - border: 1px solid rgba(0, 0, 0, 0.2); - color: #fff; - background-color: #444; - } - - .btn-inverse:hover, - .btn-inverse:focus { - background-color: #1e1e1e; - color: #fff; - text-decoration: none; - } - - button.btn, - input[type="submit"].btn { - *padding-top: 3px; - *padding-bottom: 3px; - } - - button.btn::-moz-focus-inner, - input[type="submit"].btn::-moz-focus-inner { - padding: 0; - border: 0; - } - - button.btn.btn-large, - input[type="submit"].btn.btn-large { - *padding-top: 7px; - *padding-bottom: 7px; - } - - button.btn.btn-small, - input[type="submit"].btn.btn-small { - *padding-top: 3px; - *padding-bottom: 3px; - } - - button.btn.btn-mini, - input[type="submit"].btn.btn-mini { - *padding-top: 1px; - *padding-bottom: 1px; - } - - .btn-link, - .btn-link:active, - .btn-link[disabled] { - background-color: transparent; - background-image: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - } - - .btn-link { - border-color: transparent; - cursor: pointer; - color: #3071a9; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - } - - .btn-link:hover, - .btn-link:focus { - color: #1f496e; - text-decoration: underline; - background-color: transparent; - } - - .btn-link[disabled]:hover, - .btn-link[disabled]:focus { - color: #333; - text-decoration: none; - } - - .btn-group { - position: relative; - display: inline-block; - *display: inline; - *zoom: 1; - font-size: 0; - vertical-align: middle; - white-space: nowrap; - *margin-left: .3em; - } - - .btn-group:first-child { - *margin-left: 0; - } - - .btn-group .btn + .btn { - margin-left: -1px; - } - - .btn-group + .btn-group { - margin-left: 5px; - } - - .btn-toolbar { - font-size: 0; - margin-top: 9px; - margin-bottom: 9px; - } - - .btn-toolbar > .btn + .btn, - .btn-toolbar > .btn-group + .btn, - .btn-toolbar > .btn + .btn-group { - margin-left: 5px; - } - - .btn-group > .btn { - position: relative; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - } - - .btn-group > .btn-micro { - margin-left: -1px; - } - - .btn-group > .btn, - .btn-group > .dropdown-menu, - .btn-group > .popover { - font-size: 13px; - } - - .btn-group > .btn-mini { - font-size: 9.75px; - } - - .btn-group > .btn-small { - font-size: 12px; - } - - .btn-group > .btn-large { - font-size: 16.25px; - } - - .btn-group > .btn:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 3px; - -moz-border-radius-topleft: 3px; - border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - border-bottom-left-radius: 3px; - } - - .btn-group > .btn:last-child, - .btn-group > .dropdown-toggle { - -webkit-border-top-right-radius: 3px; - -moz-border-radius-topright: 3px; - border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - -moz-border-radius-bottomright: 3px; - border-bottom-right-radius: 3px; - } - - .btn-group > .btn.large:first-child { - margin-left: 0; - -webkit-border-top-left-radius: 6px; - -moz-border-radius-topleft: 6px; - border-top-left-radius: 6px; - -webkit-border-bottom-left-radius: 6px; - -moz-border-radius-bottomleft: 6px; - border-bottom-left-radius: 6px; - } - - .btn-group > .btn.large:last-child, - .btn-group > .large.dropdown-toggle { - -webkit-border-top-right-radius: 6px; - -moz-border-radius-topright: 6px; - border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - -moz-border-radius-bottomright: 6px; - border-bottom-right-radius: 6px; - } - - .btn-group > .btn:hover, - .btn-group > .btn:focus, - .btn-group > .btn:active, - .btn-group > .btn.active { - z-index: 2; - } - - .btn-group .dropdown-toggle:active, - .btn-group.open .dropdown-toggle { - outline: 0; - } - - .btn-group > .btn + .dropdown-toggle { - padding-left: 8px; - padding-right: 8px; - *padding-top: 5px; - *padding-bottom: 5px; - } - - .btn-group > .btn-mini + .dropdown-toggle { - padding-left: 5px; - padding-right: 5px; - *padding-top: 2px; - *padding-bottom: 2px; - } - - .btn-group > .btn-small + .dropdown-toggle { - *padding-top: 5px; - *padding-bottom: 4px; - } - - .btn-group > .btn-large + .dropdown-toggle { - padding-left: 12px; - padding-right: 12px; - *padding-top: 7px; - *padding-bottom: 7px; - } - - .btn-group.open .dropdown-toggle { - background-image: none; - } - - .btn-group.open .btn.dropdown-toggle { - background-color: #e6e6e6; - } - - .btn-group.open .btn-primary.dropdown-toggle { - background-color: #15497c; - } - - .btn-group.open .btn-warning.dropdown-toggle { - background-color: #c67605; - } - - .btn-group.open .btn-danger.dropdown-toggle { - background-color: #942a25; - } - - .btn-group.open .btn-success.dropdown-toggle { - background-color: #378137; - } - - .btn-group.open .btn-info.dropdown-toggle { - background-color: #24748c; - } - - .btn-group.open .btn-inverse.dropdown-toggle { - background-color: #222; - } - - .btn .caret { - margin-top: 8px; - margin-left: 0; - } - - .btn-large .caret { - margin-top: 6px; - } - - .btn-large .caret { - border-left-width: 5px; - border-right-width: 5px; - border-top-width: 5px; - } - - .btn-mini .caret, - .btn-small .caret { - margin-top: 8px; - } - - .dropup .btn-large .caret { - border-bottom-width: 5px; - } - - .btn-primary .caret { - border-top-color: #1f496e; - border-bottom-color: #1f496e; - } - - .btn-warning .caret, - .btn-danger .caret, - .btn-info .caret, - .btn-success .caret, - .btn-inverse .caret { - border-top-color: #fff; - border-bottom-color: #fff; - } - - .btn-group-vertical { - display: inline-block; - *display: inline; - *zoom: 1; - } - - .btn-group-vertical > .btn { - display: block; - float: none; - max-width: 100%; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - } - - .btn-group-vertical > .btn + .btn { - margin-left: 0; - margin-top: -1px; - } - - .btn-group-vertical > .btn:first-child { - -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; - } - - .btn-group-vertical > .btn:last-child { - -webkit-border-radius: 0 0 3px 3px; - -moz-border-radius: 0 0 3px 3px; - border-radius: 0 0 3px 3px; - } - - .btn-group-vertical > .btn-large:first-child { - -webkit-border-radius: 6px 6px 0 0; - -moz-border-radius: 6px 6px 0 0; - border-radius: 6px 6px 0 0; - } - - .btn-group-vertical > .btn-large:last-child { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - } - - /***************** Modal ********************/ - - - .modal-header { - padding: 0 20px; - text-align: left; - border-bottom: 1px solid #eee; - } - - .modal-header .close { - width: 50px; - margin-top: 0; - margin-right: -15px; - font-size: 2rem; - line-height: 45px; - border-left: 1px solid #ccc; - border-bottom: none; - border-right: none; - cursor: pointer; - background: transparent; - -webkit-appearance: none; - } - - .modal-header h3 { - font-weight: normal; - line-height: 50px; - margin: 0; - } - - .modal-body { - width: 98%; - position: relative; - max-height: 400px; - padding: 1%; - } - - .modal-body iframe { - width: 100%; - max-height: none; - border: 0 !important; - } - - .modal-form { - margin-bottom: 0; - } - - .modal-footer { - padding: 14px 15px 15px; - margin-bottom: 0; - text-align: right; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -webkit-box-shadow: inset 0 1px 0 #fff; - -moz-box-shadow: inset 0 1px 0 #fff; - box-shadow: inset 0 1px 0 #fff; - *zoom: 1; - } - - .modal-footer:before, - .modal-footer:after { - display: table; - content: ""; - line-height: 0; - } - - .modal-footer:after { - clear: both; - } - - .modal-footer .btn + .btn { - margin-left: 5px; - margin-bottom: 0; - } - - .modal-footer .btn-group .btn + .btn { - margin-left: -1px; - } - - .modal-footer .btn-block + .btn-block { - margin-left: 0; - } - - body.modal { - padding-top: 0; - } - - div.modal { - position: fixed; - top: 5%; - left: 50%; - z-index: 1050; - width: 80%; - margin-left: -40%; - background-color: #fff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.3); - *border: 1px solid #999; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; - outline: none; - } - - div.modal-small { - width: 50%; - margin-left: -25%; - } - - /*div.modal.fade { - -webkit-transition: opacity .3s linear, top .3s ease-out; - -moz-transition: opacity .3s linear, top .3s ease-out; - -o-transition: opacity .3s linear, top .3s ease-out; - transition: opacity .3s linear, top .3s ease-out; - top: -25%; - } - div.modal.fade.in { - top: 5%; - }*/ - - .modal-batch { - overflow-y: visible; - } - - .modal-body[class^="jviewport-height"], - .modal-body[class*="jviewport-height"] { - max-height: none; - } - - .jviewport-height10 { - height: 10vh; - } - - .jviewport-height20 { - height: 20vh; - } - - .jviewport-height30 { - height: 30vh; - } - - .jviewport-height40 { - height: 40vh; - } - - .jviewport-height50 { - height: 50vh; - } - - .jviewport-height60 { - height: 60vh; - } - - .jviewport-height70 { - height: 70vh; - } - - .jviewport-height80 { - height: 80vh; - } - - .jviewport-height90 { - height: 90vh; - } - - .jviewport-height100 { - height: 100vh; - } - - div.modal.jviewport-width10 { - width: 10vw; - margin-left: -5vw; - } - - div.modal.jviewport-width20 { - width: 20vw; - margin-left: -10vw; - } - - div.modal.jviewport-width30 { - width: 30vw; - margin-left: -15vw; - } - - div.modal.jviewport-width40 { - width: 40vw; - margin-left: -20vw; - } - - div.modal.jviewport-width50 { - width: 50vw; - margin-left: -25vw; - } - - div.modal.jviewport-width60 { - width: 60vw; - margin-left: -30vw; - } - - div.modal.jviewport-width70 { - width: 70vw; - margin-left: -35vw; - } - - div.modal.jviewport-width80 { - width: 80vw; - margin-left: -40vw; - } - - div.modal.jviewport-width90 { - width: 90vw; - margin-left: -45vw; - } - - div.modal.jviewport-width100 { - width: 100vw; - margin-left: -50vw; - } - - @media (max-width: 767px) { - div.modal { - position: fixed; - top: 20px; - left: 20px; - right: 20px; - width: auto; - margin: 0; - } - - div.modal.fade { - top: -100px; - } - - div.modal.fade.in { - top: 20px; - } - - div.modal[class*="jviewport-width"] { - width: auto; - margin: 0; - } - } - - @media (max-width: 480px) { - div.modal { - top: 10px; - left: 10px; - right: 10px; - } - } - - - .control-group, - .controls, - .controls input[type="text"], - .controls input[type="number"], - .controls input[type="email"], - .controls select, - .controls textarea { - max-width: 100%; - } - - .modal-import-file .input-append, - .modal-import-file .input-append input { - width: 100%; - } - - textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { - background-color: #fff; - border: 1px solid #ccc; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border linear .2s, box-shadow linear .2s; - -moz-transition: border linear .2s, box-shadow linear .2s; - -o-transition: border linear .2s, box-shadow linear .2s; - transition: border linear .2s, box-shadow linear .2s; - } - - select, - textarea, - input[type="text"], - input[type="password"], - input[type="datetime"], - input[type="datetime-local"], - input[type="date"], - input[type="month"], - input[type="time"], - input[type="week"], - input[type="number"], - input[type="email"], - input[type="url"], - input[type="search"], - input[type="tel"], - input[type="color"], - .uneditable-input { - display: inline-block; - height: 18px; - padding: 4px 6px; - margin-bottom: 9px; - font-size: 13px; - line-height: 18px; - color: #555; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - vertical-align: middle; - } - - input[disabled], - select[disabled], - textarea[disabled], - input[readonly], - select[readonly], - textarea[readonly] { - cursor: not-allowed; - background-color: #eee; - } - - - - - table { - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - border-spacing: 0; - } - .table { - width: 100%; - margin-bottom: 18px; - } - .table th, - .table td { - padding: 8px; - line-height: 18px; - text-align: left; - vertical-align: top; - border-top: 1px solid #ddd; - } - .table th { - font-weight: bold; - } - .table thead th { - vertical-align: bottom; - } - .table caption + thead tr:first-child th, - .table caption + thead tr:first-child td, - .table colgroup + thead tr:first-child th, - .table colgroup + thead tr:first-child td, - .table thead:first-child tr:first-child th, - .table thead:first-child tr:first-child td { - border-top: 0; - } - .table tbody + tbody { - border-top: 2px solid #ddd; - } - .table .table { - background-color: #fff; - } - .table-condensed th, - .table-condensed td { - padding: 4px 5px; - } - .table-bordered { - border: 1px solid #ddd; - border-collapse: separate; - *border-collapse: collapse; - border-left: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - } - .table-bordered th, - .table-bordered td { - border-left: 1px solid #ddd; - } - .table-bordered caption + thead tr:first-child th, - .table-bordered caption + tbody tr:first-child th, - .table-bordered caption + tbody tr:first-child td, - .table-bordered colgroup + thead tr:first-child th, - .table-bordered colgroup + tbody tr:first-child th, - .table-bordered colgroup + tbody tr:first-child td, - .table-bordered thead:first-child tr:first-child th, - .table-bordered tbody:first-child tr:first-child th, - .table-bordered tbody:first-child tr:first-child td { - border-top: 0; - } - .table-bordered thead:first-child tr:first-child > th:first-child, - .table-bordered tbody:first-child tr:first-child > td:first-child, - .table-bordered tbody:first-child tr:first-child > th:first-child { - -webkit-border-top-left-radius: 3px; - -moz-border-radius-topleft: 3px; - border-top-left-radius: 3px; - } - .table-bordered thead:first-child tr:first-child > th:last-child, - .table-bordered tbody:first-child tr:first-child > td:last-child, - .table-bordered tbody:first-child tr:first-child > th:last-child { - -webkit-border-top-right-radius: 3px; - -moz-border-radius-topright: 3px; - border-top-right-radius: 3px; - } - .table-bordered thead:last-child tr:last-child > th:first-child, - .table-bordered tbody:last-child tr:last-child > td:first-child, - .table-bordered tbody:last-child tr:last-child > th:first-child, - .table-bordered tfoot:last-child tr:last-child > td:first-child, - .table-bordered tfoot:last-child tr:last-child > th:first-child { - -webkit-border-bottom-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - border-bottom-left-radius: 3px; - } - .table-bordered thead:last-child tr:last-child > th:last-child, - .table-bordered tbody:last-child tr:last-child > td:last-child, - .table-bordered tbody:last-child tr:last-child > th:last-child, - .table-bordered tfoot:last-child tr:last-child > td:last-child, - .table-bordered tfoot:last-child tr:last-child > th:last-child { - -webkit-border-bottom-right-radius: 3px; - -moz-border-radius-bottomright: 3px; - border-bottom-right-radius: 3px; - } - .table-bordered tfoot + tbody:last-child tr:last-child td:first-child { - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomleft: 0; - border-bottom-left-radius: 0; - } - .table-bordered tfoot + tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 0; - -moz-border-radius-bottomright: 0; - border-bottom-right-radius: 0; - } - .table-bordered caption + thead tr:first-child th:first-child, - .table-bordered caption + tbody tr:first-child td:first-child, - .table-bordered colgroup + thead tr:first-child th:first-child, - .table-bordered colgroup + tbody tr:first-child td:first-child { - -webkit-border-top-left-radius: 3px; - -moz-border-radius-topleft: 3px; - border-top-left-radius: 3px; - } - .table-bordered caption + thead tr:first-child th:last-child, - .table-bordered caption + tbody tr:first-child td:last-child, - .table-bordered colgroup + thead tr:first-child th:last-child, - .table-bordered colgroup + tbody tr:first-child td:last-child { - -webkit-border-top-right-radius: 3px; - -moz-border-radius-topright: 3px; - border-top-right-radius: 3px; - } - .table-striped tbody > tr:nth-child(odd) > td, - .table-striped tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; - } - .table-hover tbody tr:hover > td, - .table-hover tbody tr:hover > th { - background-color: #F0F0F0; - } - table td[class*="span"], - table th[class*="span"], - .row-fluid table td[class*="span"], - .row-fluid table th[class*="span"] { - display: table-cell; - float: none; - margin-left: 0; - } - .table td.span1, - .table th.span1 { - float: none; - width: 44px; - margin-left: 0; - } - .table td.span2, - .table th.span2 { - float: none; - width: 124px; - margin-left: 0; - } - .table td.span3, - .table th.span3 { - float: none; - width: 204px; - margin-left: 0; - } - .table td.span4, - .table th.span4 { - float: none; - width: 284px; - margin-left: 0; - } - .table td.span5, - .table th.span5 { - float: none; - width: 364px; - margin-left: 0; - } - .table td.span6, - .table th.span6 { - float: none; - width: 444px; - margin-left: 0; - } - .table td.span7, - .table th.span7 { - float: none; - width: 524px; - margin-left: 0; - } - .table td.span8, - .table th.span8 { - float: none; - width: 604px; - margin-left: 0; - } - .table td.span9, - .table th.span9 { - float: none; - width: 684px; - margin-left: 0; - } - .table td.span10, - .table th.span10 { - float: none; - width: 764px; - margin-left: 0; - } - .table td.span11, - .table th.span11 { - float: none; - width: 844px; - margin-left: 0; - } - .table td.span12, - .table th.span12 { - float: none; - width: 924px; - margin-left: 0; - } - .table tbody tr.success > td { - background-color: #dff0d8; - } - .table tbody tr.error > td { - background-color: #f2dede; - } - .table tbody tr.warning > td { - background-color: #fcf8e3; - } - .table tbody tr.info > td { - background-color: #d9edf7; - } - .table-hover tbody tr.success:hover > td { - background-color: #d0e9c6; - } - .table-hover tbody tr.error:hover > td { - background-color: #ebcccc; - } - .table-hover tbody tr.warning:hover > td { - background-color: #faf2cc; - } - .table-hover tbody tr.info:hover > td { - background-color: #c4e3f3; - } - .table-noheader { - border-collapse: collapse; - } - .table-noheader thead { - display: none; - } - - - - - -} - - - -.modal-backdrop.fade { - display: none; - opacity: 0; -} - -.modal-backdrop, -.modal-backdrop.fade.in { - display: block; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000; - opacity: 0.8; - filter: alpha(opacity=80); -} diff --git a/media/core/css/cards.css b/media/css/cards.css similarity index 100% rename from media/core/css/cards.css rename to media/css/cards.css diff --git a/media/css/import.css b/media/css/import.css new file mode 100644 index 0000000..58bf067 --- /dev/null +++ b/media/css/import.css @@ -0,0 +1,27 @@ +.radicalmultifield-import { + position: relative; + padding-top: 110px; +} + +.radicalmultifield-import .import-wrap .quantummanager { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.radicalmultifield-import .import-wrap .quantummanager .quantumupload-module { + padding: 10px; + background: #fbfbfb; +} + +.radicalmultifield-import .import-wrap .button-wrap { + position: relative; + margin-bottom: 15px; +} + +.radicalmultifield-import .row-fluid { + position: relative; + z-index: 1; +} \ No newline at end of file diff --git a/media/img/icons/doc.svg b/media/img/icons/doc.svg deleted file mode 100644 index 999e743..0000000 --- a/media/img/icons/doc.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/docx.svg b/media/img/icons/docx.svg deleted file mode 100644 index 999e743..0000000 --- a/media/img/icons/docx.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/flac.svg b/media/img/icons/flac.svg deleted file mode 100644 index eea2f30..0000000 --- a/media/img/icons/flac.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/mp3.svg b/media/img/icons/mp3.svg deleted file mode 100644 index eea2f30..0000000 --- a/media/img/icons/mp3.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/ogg.svg b/media/img/icons/ogg.svg deleted file mode 100644 index eea2f30..0000000 --- a/media/img/icons/ogg.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/other.svg b/media/img/icons/other.svg deleted file mode 100644 index 70ff5fc..0000000 --- a/media/img/icons/other.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/pdf.svg b/media/img/icons/pdf.svg deleted file mode 100644 index 758720b..0000000 --- a/media/img/icons/pdf.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/ppt.svg b/media/img/icons/ppt.svg deleted file mode 100644 index 929817f..0000000 --- a/media/img/icons/ppt.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/pptx.svg b/media/img/icons/pptx.svg deleted file mode 100644 index 929817f..0000000 --- a/media/img/icons/pptx.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/txt.svg b/media/img/icons/txt.svg deleted file mode 100644 index 70ff5fc..0000000 --- a/media/img/icons/txt.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/xls.svg b/media/img/icons/xls.svg deleted file mode 100644 index 069b28a..0000000 --- a/media/img/icons/xls.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/xlsx.svg b/media/img/icons/xlsx.svg deleted file mode 100644 index 069b28a..0000000 --- a/media/img/icons/xlsx.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/img/icons/zip.svg b/media/img/icons/zip.svg deleted file mode 100644 index c4c0937..0000000 --- a/media/img/icons/zip.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/media/js/buttons.js b/media/js/buttons.js new file mode 100644 index 0000000..e152827 --- /dev/null +++ b/media/js/buttons.js @@ -0,0 +1,43 @@ +document.addEventListener('DOMContentLoaded' ,function () { + + window.RadicalMiltifieldContainerActive = ''; + let buttons_fast = document.querySelectorAll('.btn-radicalmiltifield-fast-upload'); + let buttons_select = document.querySelectorAll('.btn-radicalmiltifield-select'); + + for(let i=0;i -1) { + jQuery(inputAll[j]).val(file); + QuantumUtils.triggerElementEvent('change', inputAll[j]); + } + + if (name.indexOf('[' + namefile + ']') > -1) { + //jQuery(elt).val(fileName.split('.')[0].replace(/_[0-9]{0,}$/g, '')); + jQuery(inputAll[j]).val(fileName.split('.')[0]); + } + + + } + } + } + +}; diff --git a/media/js/modal.js b/media/js/modal.js new file mode 100644 index 0000000..e5958f3 --- /dev/null +++ b/media/js/modal.js @@ -0,0 +1,119 @@ +/** + * @package quantummanager + * @author Dmitry Tsymbal + * @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved. + * @license GNU General Public License version 3 or later; see license.txt + * @link https://www.norrnext.com + */ + +document.addEventListener('DOMContentLoaded', function () { + + let buttonInsert = document.createElement('button'); + let buttonCancel = document.createElement('button'); + let pathFile; + let altFile; + + buttonInsert.setAttribute('class', 'btn btn-primary'); + buttonInsert.setAttribute('type', 'button'); + buttonCancel.setAttribute('class', 'btn'); + buttonCancel.setAttribute('modal', 'modal'); + buttonCancel.setAttribute('data-dismiss', 'modal'); + buttonCancel.setAttribute('type', 'button'); + + setTimeout(function () { + for(let i=0;i', ''], - tr: [2, '', '
'], - col: [2, '', '
'], - // for script/link/style tags to work in IE6-8, you have to wrap - // in a div with a non-whitespace character in front, ha! - _default: innerHTMLBug ? [1, 'X
', '
'] : [0, '', ''] -}; - -map.td = -map.th = [3, '', '
']; - -map.option = -map.optgroup = [1, '']; - -map.thead = -map.tbody = -map.colgroup = -map.caption = -map.tfoot = [1, '', '
']; - -map.polyline = -map.ellipse = -map.polygon = -map.circle = -map.text = -map.line = -map.path = -map.rect = -map.g = [1, '','']; - -/** - * Parse `html` and return a DOM Node instance, which could be a TextNode, - * HTML DOM Node of some kind (
for example), or a DocumentFragment - * instance, depending on the contents of the `html` string. - * - * @param {String} html - HTML string to "domify" - * @param {Document} doc - The `document` instance to create the Node for - * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance - * @api private - */ - -function parse(html, doc) { - if ('string' != typeof html) throw new TypeError('String expected'); - - // default to the global `document` object - if (!doc) doc = document; - - // tag name - var m = /<([\w:]+)/.exec(html); - if (!m) return doc.createTextNode(html); - - html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace - - var tag = m[1]; - - // body support - if (tag == 'body') { - var el = doc.createElement('html'); - el.innerHTML = html; - return el.removeChild(el.lastChild); - } - - // wrap map - var wrap = map[tag] || map._default; - var depth = wrap[0]; - var prefix = wrap[1]; - var suffix = wrap[2]; - var el = doc.createElement('div'); - el.innerHTML = prefix + html + suffix; - while (depth--) el = el.lastChild; - - // one element - if (el.firstChild == el.lastChild) { - return el.removeChild(el.firstChild); - } - - // several elements - var fragment = doc.createDocumentFragment(); - while (el.firstChild) { - fragment.appendChild(el.removeChild(el.firstChild)); - } - - return fragment; -} - -},{}],3:[function(require,module,exports){ -/** - * Code refactored from Mozilla Developer Network: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - */ - -'use strict'; - -function assign(target, firstSource) { - if (target === undefined || target === null) { - throw new TypeError('Cannot convert first argument to object'); - } - - var to = Object(target); - for (var i = 1; i < arguments.length; i++) { - var nextSource = arguments[i]; - if (nextSource === undefined || nextSource === null) { - continue; - } - - var keysArray = Object.keys(Object(nextSource)); - for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { - var nextKey = keysArray[nextIndex]; - var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); - if (desc !== undefined && desc.enumerable) { - to[nextKey] = nextSource[nextKey]; - } - } - } - return to; -} - -function polyfill() { - if (!Object.assign) { - Object.defineProperty(Object, 'assign', { - enumerable: false, - configurable: true, - writable: true, - value: assign - }); - } -} - -module.exports = { - assign: assign, - polyfill: polyfill -}; - -},{}],4:[function(require,module,exports){ -// get successful control from form and assemble into object -// http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2 - -// types which indicate a submit action and are not successful controls -// these will be ignored -var k_r_submitter = /^(?:submit|button|image|reset|file)$/i; - -// node names which could be successful controls -var k_r_success_contrls = /^(?:input|select|textarea|keygen)/i; - -// Matches bracket notation. -var brackets = /(\[[^\[\]]*\])/g; - -// serializes form fields -// @param form MUST be an HTMLForm element -// @param options is an optional argument to configure the serialization. Default output -// with no options specified is a url encoded string -// - hash: [true | false] Configure the output type. If true, the output will -// be a js object. -// - serializer: [function] Optional serializer function to override the default one. -// The function takes 3 arguments (result, key, value) and should return new result -// hash and url encoded str serializers are provided with this module -// - disabled: [true | false]. If true serialize disabled fields. -// - empty: [true | false]. If true serialize empty fields -function serialize(form, options) { - if (typeof options != 'object') { - options = { hash: !!options }; - } - else if (options.hash === undefined) { - options.hash = true; - } - - var result = (options.hash) ? {} : ''; - var serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize); - - var elements = form && form.elements ? form.elements : []; - - //Object store each radio and set if it's empty or not - var radio_store = Object.create(null); - - for (var i=0 ; i', ''], - tr: [2, '', '
'], - col: [2, '', '
'], - // for script/link/style tags to work in IE6-8, you have to wrap - // in a div with a non-whitespace character in front, ha! - _default: innerHTMLBug ? [1, 'X
', '
'] : [0, '', ''] -}; - -map.td = -map.th = [3, '', '
']; - -map.option = -map.optgroup = [1, '']; - -map.thead = -map.tbody = -map.colgroup = -map.caption = -map.tfoot = [1, '', '
']; - -map.polyline = -map.ellipse = -map.polygon = -map.circle = -map.text = -map.line = -map.path = -map.rect = -map.g = [1, '','']; - -/** - * Parse `html` and return a DOM Node instance, which could be a TextNode, - * HTML DOM Node of some kind (
for example), or a DocumentFragment - * instance, depending on the contents of the `html` string. - * - * @param {String} html - HTML string to "domify" - * @param {Document} doc - The `document` instance to create the Node for - * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance - * @api private - */ - -function parse(html, doc) { - if ('string' != typeof html) throw new TypeError('String expected'); - - // default to the global `document` object - if (!doc) doc = document; - - // tag name - var m = /<([\w:]+)/.exec(html); - if (!m) return doc.createTextNode(html); - - html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace - - var tag = m[1]; - - // body support - if (tag == 'body') { - var el = doc.createElement('html'); - el.innerHTML = html; - return el.removeChild(el.lastChild); - } - - // wrap map - var wrap = map[tag] || map._default; - var depth = wrap[0]; - var prefix = wrap[1]; - var suffix = wrap[2]; - var el = doc.createElement('div'); - el.innerHTML = prefix + html + suffix; - while (depth--) el = el.lastChild; - - // one element - if (el.firstChild == el.lastChild) { - return el.removeChild(el.firstChild); - } - - // several elements - var fragment = doc.createDocumentFragment(); - while (el.firstChild) { - fragment.appendChild(el.removeChild(el.firstChild)); - } - - return fragment; -} - -},{}],2:[function(require,module,exports){ -// get successful control from form and assemble into object -// http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2 - -// types which indicate a submit action and are not successful controls -// these will be ignored -var k_r_submitter = /^(?:submit|button|image|reset|file)$/i; - -// node names which could be successful controls -var k_r_success_contrls = /^(?:input|select|textarea|keygen)/i; - -// Matches bracket notation. -var brackets = /(\[[^\[\]]*\])/g; - -// serializes form fields -// @param form MUST be an HTMLForm element -// @param options is an optional argument to configure the serialization. Default output -// with no options specified is a url encoded string -// - hash: [true | false] Configure the output type. If true, the output will -// be a js object. -// - serializer: [function] Optional serializer function to override the default one. -// The function takes 3 arguments (result, key, value) and should return new result -// hash and url encoded str serializers are provided with this module -// - disabled: [true | false]. If true serialize disabled fields. -// - empty: [true | false]. If true serialize empty fields -function serialize(form, options) { - if (typeof options != 'object') { - options = { hash: !!options }; - } - else if (options.hash === undefined) { - options.hash = true; - } - - var result = (options.hash) ? {} : ''; - var serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize); - - var elements = form && form.elements ? form.elements : []; - - //Object store each radio and set if it's empty or not - var radio_store = Object.create(null); - - for (var i=0 ; i' + vex._escapeHtml(options.label || defaults.label) + '', - input: '' - } - options = Object.assign(defaults, dynamicDefaults, options) - // Pluck the value of the "vex" input field as the return value for prompt's callback - // More closely mimics "window.prompt" in that a single string is returned - var callback = options.callback - options.callback = function promptCallback (value) { - if (typeof value === 'object') { - var keys = Object.keys(value) - value = keys.length ? value[keys[0]] : '' - } - callback(value) - } - return this.open(options) - } - } - - // Now define any additional data that's not the direct dialog API - dialog.buttons = { - YES: { - text: 'OK', - type: 'submit', - className: 'vex-dialog-button-primary', - click: function yesClick () { - this.value = true - } - }, - - NO: { - text: 'Cancel', - type: 'button', - className: 'vex-dialog-button-secondary', - click: function noClick () { - this.value = false - this.close() - } - } - } - - dialog.defaultOptions = { - callback: function () {}, - afterOpen: function () {}, - message: '', - input: '', - buttons: [ - dialog.buttons.YES, - dialog.buttons.NO - ], - showCloseButton: false, - onSubmit: function onDialogSubmit (e) { - e.preventDefault() - if (this.options.input) { - this.value = serialize(this.form, { hash: true }) - } - return this.close() - }, - focusFirstInput: true - } - - dialog.defaultAlertOptions = { - buttons: [ - dialog.buttons.YES - ] - } - - dialog.defaultPromptOptions = { - label: 'Prompt:', - placeholder: '', - value: '' - } - - dialog.defaultConfirmOptions = {} - - return dialog -} - -module.exports = plugin - -},{"domify":1,"form-serialize":2}]},{},[3])(3) -}); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"domify":2,"form-serialize":4}],6:[function(require,module,exports){ -var vex = require('./vex') -vex.registerPlugin(require('vex-dialog')) -module.exports = vex - -},{"./vex":7,"vex-dialog":5}],7:[function(require,module,exports){ -// classList polyfill for old browsers -require('classlist-polyfill') -// Object.assign polyfill -require('es6-object-assign').polyfill() - -// String to DOM function -var domify = require('domify') - -// Use the DOM's HTML parsing to escape any dangerous strings -var escapeHtml = function escapeHtml (str) { - if (typeof str !== 'undefined') { - var div = document.createElement('div') - div.appendChild(document.createTextNode(str)) - return div.innerHTML - } else { - return '' - } -} - -// Utility function to add space-delimited class strings to a DOM element's classList -var addClasses = function addClasses (el, classStr) { - if (typeof classStr !== 'string' || classStr.length === 0) { - return - } - var classes = classStr.split(' ') - for (var i = 0; i < classes.length; i++) { - var className = classes[i] - if (className.length) { - el.classList.add(className) - } - } -} - -// Detect CSS Animation End Support -// https://github.com/limonte/sweetalert2/blob/99bd539f85e15ac170f69d35001d12e092ef0054/src/utils/dom.js#L194 -var animationEndEvent = (function detectAnimationEndEvent () { - var el = document.createElement('div') - var eventNames = { - 'animation': 'animationend', - 'WebkitAnimation': 'webkitAnimationEnd', - 'MozAnimation': 'animationend', - 'OAnimation': 'oanimationend', - 'msAnimation': 'MSAnimationEnd' - } - for (var i in eventNames) { - if (el.style[i] !== undefined) { - return eventNames[i] - } - } - return false -})() - -// vex base CSS classes -var baseClassNames = { - vex: 'vex', - content: 'vex-content', - overlay: 'vex-overlay', - close: 'vex-close', - closing: 'vex-closing', - open: 'vex-open' -} - -// Private lookup table of all open vex objects, keyed by id -var vexes = {} -var globalId = 1 - -// Private boolean to assist the escapeButtonCloses option -var isEscapeActive = false - -// vex itself is an object that exposes a simple API to open and close vex objects in various ways -var vex = { - open: function open (opts) { - // Check for usage of deprecated options, and log a warning - var warnDeprecated = function warnDeprecated (prop) { - console.warn('The "' + prop + '" property is deprecated in vex 3. Use CSS classes and the appropriate "ClassName" options, instead.') - console.warn('See http://github.hubspot.com/vex/api/advanced/#options') - } - if (opts.css) { - warnDeprecated('css') - } - if (opts.overlayCSS) { - warnDeprecated('overlayCSS') - } - if (opts.contentCSS) { - warnDeprecated('contentCSS') - } - if (opts.closeCSS) { - warnDeprecated('closeCSS') - } - - // The dialog instance - var vexInstance = {} - - // Set id - vexInstance.id = globalId++ - - // Store internally - vexes[vexInstance.id] = vexInstance - - // Set state - vexInstance.isOpen = true - - // Close function on the vex instance - // This is how all API functions should close individual vexes - vexInstance.close = function instanceClose () { - // Check state - if (!this.isOpen) { - return true - } - - var options = this.options - - // escapeButtonCloses is checked first - if (isEscapeActive && !options.escapeButtonCloses) { - return false - } - - // Allow the user to validate any info or abort the close with the beforeClose callback - var shouldClose = (function shouldClose () { - // Call before close callback - if (options.beforeClose) { - return options.beforeClose.call(this) - } - // Otherwise indicate that it's ok to continue with close - return true - }.bind(this)()) - - // If beforeClose() fails, abort the close - if (shouldClose === false) { - return false - } - - // Update state - this.isOpen = false - - // Detect if the content el has any CSS animations defined - var style = window.getComputedStyle(this.contentEl) - function hasAnimationPre (prefix) { - return style.getPropertyValue(prefix + 'animation-name') !== 'none' && style.getPropertyValue(prefix + 'animation-duration') !== '0s' - } - var hasAnimation = hasAnimationPre('') || hasAnimationPre('-webkit-') || hasAnimationPre('-moz-') || hasAnimationPre('-o-') - - // Define the function that will actually close the instance - var close = function close () { - if (!this.rootEl.parentNode) { - return - } - // Run once - this.rootEl.removeEventListener(animationEndEvent, close) - this.overlayEl.removeEventListener(animationEndEvent, close) - // Remove from lookup table (prevent memory leaks) - delete vexes[this.id] - // Remove the dialog from the DOM - this.rootEl.parentNode.removeChild(this.rootEl) - // Remove the overlay from the DOM - this.bodyEl.removeChild(this.overlayEl) - // Call after close callback - if (options.afterClose) { - options.afterClose.call(this) - } - // Remove styling from the body, if no more vexes are open - if (Object.keys(vexes).length === 0) { - document.body.classList.remove(baseClassNames.open) - } - }.bind(this) - - // Close the vex - if (animationEndEvent && hasAnimation) { - // Setup the end event listener, to remove the el from the DOM - this.rootEl.addEventListener(animationEndEvent, close) - this.overlayEl.addEventListener(animationEndEvent, close) - // Add the closing class to the dialog, showing the close animation - this.rootEl.classList.add(baseClassNames.closing) - this.overlayEl.classList.add(baseClassNames.closing) - } else { - close() - } - - return true - } - - // Allow strings as content - if (typeof opts === 'string') { - opts = { - content: opts - } - } - - // `content` is unsafe internally, so translate - // safe default: HTML-escape the content before passing it through - if (opts.unsafeContent && !opts.content) { - opts.content = opts.unsafeContent - } else if (opts.content) { - opts.content = escapeHtml(opts.content) - } - - // Store options on instance for future reference - var options = vexInstance.options = Object.assign({}, vex.defaultOptions, opts) - - // Get Body Element - var bodyEl = vexInstance.bodyEl = document.getElementsByTagName('body')[0] - - // vex root - var rootEl = vexInstance.rootEl = document.createElement('div') - rootEl.classList.add(baseClassNames.vex) - addClasses(rootEl, options.className) - - // Overlay - var overlayEl = vexInstance.overlayEl = document.createElement('div') - overlayEl.classList.add(baseClassNames.overlay) - addClasses(overlayEl, options.overlayClassName) - if (options.overlayClosesOnClick) { - rootEl.addEventListener('click', function overlayClickListener (e) { - if (e.target === rootEl) { - vexInstance.close() - } - }) - } - bodyEl.appendChild(overlayEl) - - // Content - var contentEl = vexInstance.contentEl = document.createElement('div') - contentEl.classList.add(baseClassNames.content) - addClasses(contentEl, options.contentClassName) - contentEl.appendChild(options.content instanceof window.Node ? options.content : domify(options.content)) - rootEl.appendChild(contentEl) - - // Close button - if (options.showCloseButton) { - var closeEl = vexInstance.closeEl = document.createElement('div') - closeEl.classList.add(baseClassNames.close) - addClasses(closeEl, options.closeClassName) - closeEl.addEventListener('click', vexInstance.close.bind(vexInstance)) - contentEl.appendChild(closeEl) - } - - // Add to DOM - document.querySelector(options.appendLocation).appendChild(rootEl) - - // Call after open callback - if (options.afterOpen) { - options.afterOpen.call(vexInstance) - } - - // Apply styling to the body - document.body.classList.add(baseClassNames.open) - - // Return the created vex instance - return vexInstance - }, - - // A top-level vex.close function to close dialogs by reference or id - close: function close (vexOrId) { - var id - if (vexOrId.id) { - id = vexOrId.id - } else if (typeof vexOrId === 'string') { - id = vexOrId - } else { - throw new TypeError('close requires a vex object or id string') - } - if (!vexes[id]) { - return false - } - return vexes[id].close() - }, - - // Close the most recently created/opened vex - closeTop: function closeTop () { - var ids = Object.keys(vexes) - if (!ids.length) { - return false - } - return vexes[ids[ids.length - 1]].close() - }, - - // Close every vex! - closeAll: function closeAll () { - for (var id in vexes) { - this.close(id) - } - return true - }, - - // A getter for the internal lookup table - getAll: function getAll () { - return vexes - }, - - // A getter for the internal lookup table - getById: function getById (id) { - return vexes[id] - } -} - -// Close top vex on escape -window.addEventListener('keyup', function vexKeyupListener (e) { - if (e.keyCode === 27) { - isEscapeActive = true - vex.closeTop() - isEscapeActive = false - } -}) - -// Close all vexes on history pop state (useful in single page apps) -window.addEventListener('popstate', function () { - if (vex.defaultOptions.closeAllOnPopState) { - vex.closeAll() - } -}) - -vex.defaultOptions = { - content: '', - showCloseButton: true, - escapeButtonCloses: true, - overlayClosesOnClick: true, - appendLocation: 'body', - className: '', - overlayClassName: '', - contentClassName: '', - closeClassName: '', - closeAllOnPopState: true -} - -// TODO Loading symbols? - -// Include escapeHtml function on the library object -Object.defineProperty(vex, '_escapeHtml', { - configurable: false, - enumerable: false, - writable: false, - value: escapeHtml -}) - -// Plugin system! -vex.registerPlugin = function registerPlugin (pluginFn, name) { - var plugin = pluginFn(vex) - var pluginName = name || plugin.name - if (vex[pluginName]) { - throw new Error('Plugin ' + name + ' is already registered.') - } - vex[pluginName] = plugin -} - -module.exports = vex - -},{"classlist-polyfill":1,"domify":2,"es6-object-assign":3}]},{},[6])(6) -}); \ No newline at end of file diff --git a/media/libs/vex/dist/js/vex.combined.min.js b/media/libs/vex/dist/js/vex.combined.min.js deleted file mode 100644 index f313ede..0000000 --- a/media/libs/vex/dist/js/vex.combined.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! vex.combined.js: vex 4.1.0, vex-dialog 1.0.7 */ - -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).vex=e()}}(function(){return function e(t,n,o){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n||e)},u,u.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a
a',i=!o.getElementsByTagName("link").length,o=void 0);var r={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:i?[1,"X
","
"]:[0,"",""]};r.td=r.th=[3,"","
"],r.option=r.optgroup=[1,'"],r.thead=r.tbody=r.colgroup=r.caption=r.tfoot=[1,"","
"],r.polyline=r.ellipse=r.polygon=r.circle=r.text=r.line=r.path=r.rect=r.g=[1,'',""]},{}],3:[function(e,t,n){"use strict";function o(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),o=1;o
a',i=!o.getElementsByTagName("link").length,o=void 0);var r={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:i?[1,"X
","
"]:[0,"",""]};r.td=r.th=[3,"","
"],r.option=r.optgroup=[1,'"],r.thead=r.tbody=r.colgroup=r.caption=r.tfoot=[1,"","
"],r.polyline=r.ellipse=r.polygon=r.circle=r.text=r.line=r.path=r.rect=r.g=[1,'',""]},{}],2:[function(e,t,n){var o=/^(?:submit|button|image|reset|file)$/i,i=/^(?:input|select|textarea|keygen)/i,r=/(\[[^\[\]]*\])/g;function a(e,t,n){if(t.match(r)){!function e(t,n,o){if(0===n.length)return t=o;var i=n.shift(),r=i.match(/^\[(.+?)\]$/);if("[]"===i)return t=t||[],Array.isArray(t)?t.push(e(null,n,o)):(t._values=t._values||[],t._values.push(e(null,n,o))),t;if(r){var a=r[1],s=+a;isNaN(s)?(t=t||{})[a]=e(t[a],n,o):(t=t||[])[s]=e(t[s],n,o)}else t[i]=e(t[i],n,o);return t}(e,function(e){var t=[],n=new RegExp(r),o=/^([^\[\]]*)/.exec(e);for(o[1]&&t.push(o[1]);null!==(o=n.exec(e));)t.push(o[1]);return t}(t),n)}else{var o=e[t];o?(Array.isArray(o)||(e[t]=[o]),e[t].push(n)):e[t]=n}return e}function s(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=(n=encodeURIComponent(n)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}t.exports=function(e,t){"object"!=typeof t?t={hash:!!t}:void 0===t.hash&&(t.hash=!0);for(var n=t.hash?{}:"",r=t.serializer||(t.hash?a:s),l=e&&e.elements?e.elements:[],c=Object.create(null),u=0;u'+e._escapeHtml(t.label||n.label)+"",input:''},i=(t=Object.assign(n,o,t)).callback;return t.callback=function(e){if("object"==typeof e){var t=Object.keys(e);e=t.length?e[t[0]]:""}i(e)},this.open(t)},buttons:{YES:{text:"OK",type:"submit",className:"vex-dialog-button-primary",click:function(){this.value=!0}},NO:{text:"Cancel",type:"button",className:"vex-dialog-button-secondary",click:function(){this.value=!1,this.close()}}}};return t.defaultOptions={callback:function(){},afterOpen:function(){},message:"",input:"",buttons:[t.buttons.YES,t.buttons.NO],showCloseButton:!1,onSubmit:function(e){return e.preventDefault(),this.options.input&&(this.value=i(this.form,{hash:!0})),this.close()},focusFirstInput:!0},t.defaultAlertOptions={buttons:[t.buttons.YES]},t.defaultPromptOptions={label:"Prompt:",placeholder:"",value:""},t.defaultConfirmOptions={},t}},{domify:1,"form-serialize":2}]},{},[3])(3)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{domify:2,"form-serialize":4}],6:[function(e,t,n){var o=e("./vex");o.registerPlugin(e("vex-dialog")),t.exports=o},{"./vex":7,"vex-dialog":5}],7:[function(e,t,n){e("classlist-polyfill"),e("es6-object-assign").polyfill();var o=e("domify"),i=function(e){if(void 0!==e){var t=document.createElement("div");return t.appendChild(document.createTextNode(e)),t.innerHTML}return""},r=function(e,t){if("string"==typeof t&&0!==t.length)for(var n=t.split(" "),o=0;o', ''], - tr: [2, '', '
'], - col: [2, '', '
'], - // for script/link/style tags to work in IE6-8, you have to wrap - // in a div with a non-whitespace character in front, ha! - _default: innerHTMLBug ? [1, 'X
', '
'] : [0, '', ''] -}; - -map.td = -map.th = [3, '', '
']; - -map.option = -map.optgroup = [1, '']; - -map.thead = -map.tbody = -map.colgroup = -map.caption = -map.tfoot = [1, '', '
']; - -map.polyline = -map.ellipse = -map.polygon = -map.circle = -map.text = -map.line = -map.path = -map.rect = -map.g = [1, '','']; - -/** - * Parse `html` and return a DOM Node instance, which could be a TextNode, - * HTML DOM Node of some kind (
for example), or a DocumentFragment - * instance, depending on the contents of the `html` string. - * - * @param {String} html - HTML string to "domify" - * @param {Document} doc - The `document` instance to create the Node for - * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance - * @api private - */ - -function parse(html, doc) { - if ('string' != typeof html) throw new TypeError('String expected'); - - // default to the global `document` object - if (!doc) doc = document; - - // tag name - var m = /<([\w:]+)/.exec(html); - if (!m) return doc.createTextNode(html); - - html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace - - var tag = m[1]; - - // body support - if (tag == 'body') { - var el = doc.createElement('html'); - el.innerHTML = html; - return el.removeChild(el.lastChild); - } - - // wrap map - var wrap = map[tag] || map._default; - var depth = wrap[0]; - var prefix = wrap[1]; - var suffix = wrap[2]; - var el = doc.createElement('div'); - el.innerHTML = prefix + html + suffix; - while (depth--) el = el.lastChild; - - // one element - if (el.firstChild == el.lastChild) { - return el.removeChild(el.firstChild); - } - - // several elements - var fragment = doc.createDocumentFragment(); - while (el.firstChild) { - fragment.appendChild(el.removeChild(el.firstChild)); - } - - return fragment; -} - -},{}],3:[function(require,module,exports){ -/** - * Code refactored from Mozilla Developer Network: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - */ - -'use strict'; - -function assign(target, firstSource) { - if (target === undefined || target === null) { - throw new TypeError('Cannot convert first argument to object'); - } - - var to = Object(target); - for (var i = 1; i < arguments.length; i++) { - var nextSource = arguments[i]; - if (nextSource === undefined || nextSource === null) { - continue; - } - - var keysArray = Object.keys(Object(nextSource)); - for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { - var nextKey = keysArray[nextIndex]; - var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); - if (desc !== undefined && desc.enumerable) { - to[nextKey] = nextSource[nextKey]; - } - } - } - return to; -} - -function polyfill() { - if (!Object.assign) { - Object.defineProperty(Object, 'assign', { - enumerable: false, - configurable: true, - writable: true, - value: assign - }); - } -} - -module.exports = { - assign: assign, - polyfill: polyfill -}; - -},{}],4:[function(require,module,exports){ -// classList polyfill for old browsers -require('classlist-polyfill') -// Object.assign polyfill -require('es6-object-assign').polyfill() - -// String to DOM function -var domify = require('domify') - -// Use the DOM's HTML parsing to escape any dangerous strings -var escapeHtml = function escapeHtml (str) { - if (typeof str !== 'undefined') { - var div = document.createElement('div') - div.appendChild(document.createTextNode(str)) - return div.innerHTML - } else { - return '' - } -} - -// Utility function to add space-delimited class strings to a DOM element's classList -var addClasses = function addClasses (el, classStr) { - if (typeof classStr !== 'string' || classStr.length === 0) { - return - } - var classes = classStr.split(' ') - for (var i = 0; i < classes.length; i++) { - var className = classes[i] - if (className.length) { - el.classList.add(className) - } - } -} - -// Detect CSS Animation End Support -// https://github.com/limonte/sweetalert2/blob/99bd539f85e15ac170f69d35001d12e092ef0054/src/utils/dom.js#L194 -var animationEndEvent = (function detectAnimationEndEvent () { - var el = document.createElement('div') - var eventNames = { - 'animation': 'animationend', - 'WebkitAnimation': 'webkitAnimationEnd', - 'MozAnimation': 'animationend', - 'OAnimation': 'oanimationend', - 'msAnimation': 'MSAnimationEnd' - } - for (var i in eventNames) { - if (el.style[i] !== undefined) { - return eventNames[i] - } - } - return false -})() - -// vex base CSS classes -var baseClassNames = { - vex: 'vex', - content: 'vex-content', - overlay: 'vex-overlay', - close: 'vex-close', - closing: 'vex-closing', - open: 'vex-open' -} - -// Private lookup table of all open vex objects, keyed by id -var vexes = {} -var globalId = 1 - -// Private boolean to assist the escapeButtonCloses option -var isEscapeActive = false - -// vex itself is an object that exposes a simple API to open and close vex objects in various ways -var vex = { - open: function open (opts) { - // Check for usage of deprecated options, and log a warning - var warnDeprecated = function warnDeprecated (prop) { - console.warn('The "' + prop + '" property is deprecated in vex 3. Use CSS classes and the appropriate "ClassName" options, instead.') - console.warn('See http://github.hubspot.com/vex/api/advanced/#options') - } - if (opts.css) { - warnDeprecated('css') - } - if (opts.overlayCSS) { - warnDeprecated('overlayCSS') - } - if (opts.contentCSS) { - warnDeprecated('contentCSS') - } - if (opts.closeCSS) { - warnDeprecated('closeCSS') - } - - // The dialog instance - var vexInstance = {} - - // Set id - vexInstance.id = globalId++ - - // Store internally - vexes[vexInstance.id] = vexInstance - - // Set state - vexInstance.isOpen = true - - // Close function on the vex instance - // This is how all API functions should close individual vexes - vexInstance.close = function instanceClose () { - // Check state - if (!this.isOpen) { - return true - } - - var options = this.options - - // escapeButtonCloses is checked first - if (isEscapeActive && !options.escapeButtonCloses) { - return false - } - - // Allow the user to validate any info or abort the close with the beforeClose callback - var shouldClose = (function shouldClose () { - // Call before close callback - if (options.beforeClose) { - return options.beforeClose.call(this) - } - // Otherwise indicate that it's ok to continue with close - return true - }.bind(this)()) - - // If beforeClose() fails, abort the close - if (shouldClose === false) { - return false - } - - // Update state - this.isOpen = false - - // Detect if the content el has any CSS animations defined - var style = window.getComputedStyle(this.contentEl) - function hasAnimationPre (prefix) { - return style.getPropertyValue(prefix + 'animation-name') !== 'none' && style.getPropertyValue(prefix + 'animation-duration') !== '0s' - } - var hasAnimation = hasAnimationPre('') || hasAnimationPre('-webkit-') || hasAnimationPre('-moz-') || hasAnimationPre('-o-') - - // Define the function that will actually close the instance - var close = function close () { - if (!this.rootEl.parentNode) { - return - } - // Run once - this.rootEl.removeEventListener(animationEndEvent, close) - this.overlayEl.removeEventListener(animationEndEvent, close) - // Remove from lookup table (prevent memory leaks) - delete vexes[this.id] - // Remove the dialog from the DOM - this.rootEl.parentNode.removeChild(this.rootEl) - // Remove the overlay from the DOM - this.bodyEl.removeChild(this.overlayEl) - // Call after close callback - if (options.afterClose) { - options.afterClose.call(this) - } - // Remove styling from the body, if no more vexes are open - if (Object.keys(vexes).length === 0) { - document.body.classList.remove(baseClassNames.open) - } - }.bind(this) - - // Close the vex - if (animationEndEvent && hasAnimation) { - // Setup the end event listener, to remove the el from the DOM - this.rootEl.addEventListener(animationEndEvent, close) - this.overlayEl.addEventListener(animationEndEvent, close) - // Add the closing class to the dialog, showing the close animation - this.rootEl.classList.add(baseClassNames.closing) - this.overlayEl.classList.add(baseClassNames.closing) - } else { - close() - } - - return true - } - - // Allow strings as content - if (typeof opts === 'string') { - opts = { - content: opts - } - } - - // `content` is unsafe internally, so translate - // safe default: HTML-escape the content before passing it through - if (opts.unsafeContent && !opts.content) { - opts.content = opts.unsafeContent - } else if (opts.content) { - opts.content = escapeHtml(opts.content) - } - - // Store options on instance for future reference - var options = vexInstance.options = Object.assign({}, vex.defaultOptions, opts) - - // Get Body Element - var bodyEl = vexInstance.bodyEl = document.getElementsByTagName('body')[0] - - // vex root - var rootEl = vexInstance.rootEl = document.createElement('div') - rootEl.classList.add(baseClassNames.vex) - addClasses(rootEl, options.className) - - // Overlay - var overlayEl = vexInstance.overlayEl = document.createElement('div') - overlayEl.classList.add(baseClassNames.overlay) - addClasses(overlayEl, options.overlayClassName) - if (options.overlayClosesOnClick) { - rootEl.addEventListener('click', function overlayClickListener (e) { - if (e.target === rootEl) { - vexInstance.close() - } - }) - } - bodyEl.appendChild(overlayEl) - - // Content - var contentEl = vexInstance.contentEl = document.createElement('div') - contentEl.classList.add(baseClassNames.content) - addClasses(contentEl, options.contentClassName) - contentEl.appendChild(options.content instanceof window.Node ? options.content : domify(options.content)) - rootEl.appendChild(contentEl) - - // Close button - if (options.showCloseButton) { - var closeEl = vexInstance.closeEl = document.createElement('div') - closeEl.classList.add(baseClassNames.close) - addClasses(closeEl, options.closeClassName) - closeEl.addEventListener('click', vexInstance.close.bind(vexInstance)) - contentEl.appendChild(closeEl) - } - - // Add to DOM - document.querySelector(options.appendLocation).appendChild(rootEl) - - // Call after open callback - if (options.afterOpen) { - options.afterOpen.call(vexInstance) - } - - // Apply styling to the body - document.body.classList.add(baseClassNames.open) - - // Return the created vex instance - return vexInstance - }, - - // A top-level vex.close function to close dialogs by reference or id - close: function close (vexOrId) { - var id - if (vexOrId.id) { - id = vexOrId.id - } else if (typeof vexOrId === 'string') { - id = vexOrId - } else { - throw new TypeError('close requires a vex object or id string') - } - if (!vexes[id]) { - return false - } - return vexes[id].close() - }, - - // Close the most recently created/opened vex - closeTop: function closeTop () { - var ids = Object.keys(vexes) - if (!ids.length) { - return false - } - return vexes[ids[ids.length - 1]].close() - }, - - // Close every vex! - closeAll: function closeAll () { - for (var id in vexes) { - this.close(id) - } - return true - }, - - // A getter for the internal lookup table - getAll: function getAll () { - return vexes - }, - - // A getter for the internal lookup table - getById: function getById (id) { - return vexes[id] - } -} - -// Close top vex on escape -window.addEventListener('keyup', function vexKeyupListener (e) { - if (e.keyCode === 27) { - isEscapeActive = true - vex.closeTop() - isEscapeActive = false - } -}) - -// Close all vexes on history pop state (useful in single page apps) -window.addEventListener('popstate', function () { - if (vex.defaultOptions.closeAllOnPopState) { - vex.closeAll() - } -}) - -vex.defaultOptions = { - content: '', - showCloseButton: true, - escapeButtonCloses: true, - overlayClosesOnClick: true, - appendLocation: 'body', - className: '', - overlayClassName: '', - contentClassName: '', - closeClassName: '', - closeAllOnPopState: true -} - -// TODO Loading symbols? - -// Include escapeHtml function on the library object -Object.defineProperty(vex, '_escapeHtml', { - configurable: false, - enumerable: false, - writable: false, - value: escapeHtml -}) - -// Plugin system! -vex.registerPlugin = function registerPlugin (pluginFn, name) { - var plugin = pluginFn(vex) - var pluginName = name || plugin.name - if (vex[pluginName]) { - throw new Error('Plugin ' + name + ' is already registered.') - } - vex[pluginName] = plugin -} - -module.exports = vex - -},{"classlist-polyfill":1,"domify":2,"es6-object-assign":3}]},{},[4])(4) -}); \ No newline at end of file diff --git a/media/libs/vex/dist/js/vex.min.js b/media/libs/vex/dist/js/vex.min.js deleted file mode 100644 index 8fa783b..0000000 --- a/media/libs/vex/dist/js/vex.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! vex.js 4.1.0 */ - -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).vex=e()}}(function(){return function e(t,n,o){function i(s,l){if(!n[s]){if(!t[s]){var a="function"==typeof require&&require;if(!l&&a)return a(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){var n=t[s][1][e];return i(n||e)},d,d.exports,e,t,n,o)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s
a',i=!o.getElementsByTagName("link").length,o=void 0);var r={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:i?[1,"X
","
"]:[0,"",""]};r.td=r.th=[3,"","
"],r.option=r.optgroup=[1,'"],r.thead=r.tbody=r.colgroup=r.caption=r.tfoot=[1,"","
"],r.polyline=r.ellipse=r.polygon=r.circle=r.text=r.line=r.path=r.rect=r.g=[1,'',""]},{}],3:[function(e,t,n){"use strict";function o(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),o=1;o + + + + @@ -43,215 +57,118 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + + + - + + + + + -
- - - @@ -287,17 +194,41 @@ + - + + + + - Select - JYES - - + + diff --git a/radicalmultifield.php b/radicalmultifield.php index 00440dd..e9ad13f 100644 --- a/radicalmultifield.php +++ b/radicalmultifield.php @@ -8,18 +8,14 @@ * @link https://delo-design.ru */ -use Gumlet\ImageResize; -use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Factory; -use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\Form\Form; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; -use Joomla\CMS\Plugin\CMSPlugin; +use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Uri\Uri; use Joomla\Database\DatabaseDriver; -use Joomla\Filesystem\File; -use Joomla\Filesystem\Folder; defined('_JEXEC') or die; @@ -110,7 +106,7 @@ public function onCustomFieldsGetTypes() PluginHelper::importPlugin('radicalmultifield'); - $radicalmultifieldPlugins = PluginHelper::getPlugin('radicalmultifield'); + $radicalmultifieldPlugins = PluginHelper::getPlugin('radicalmultifield'); $language = Factory::getLanguage(); foreach ($radicalmultifieldPlugins as $radicalmultifieldPlugin) @@ -135,10 +131,10 @@ public function onCustomFieldsGetTypes() /** * @since 3.7.0 */ - public function onCustomFieldsPrepareDom( $field, DOMElement $parent, JForm $form ) + public function onCustomFieldsPrepareDom($field, DOMElement $parent, Form $form ) { - $fieldNode = parent::onCustomFieldsPrepareDom( $field, $parent, $form ); + $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if ( !$fieldNode ) { return $fieldNode; @@ -147,9 +143,7 @@ public function onCustomFieldsPrepareDom( $field, DOMElement $parent, JForm $for $path = URI::base( true ) . '/templates/' . Factory::getApplication()->getTemplate() . '/'; $fieldNode->setAttribute('template', $path); - - - + return $fieldNode; } @@ -165,28 +159,53 @@ public function onCustomFieldsPrepareDom( $field, DOMElement $parent, JForm $for * * @since 3.7.0 */ - public function onCustomFieldsPrepareField( $context, $item, $field ) + public function onCustomFieldsPrepareField($context, $item, $field) { // Check if the field should be processed by us - if ( !$this->isTypeSupported( $field->type ) ) + if (!$this->isTypeSupported($field->type)) { return; } + $input = Factory::getApplication()->input; + // Merge the params from the plugin and field which has precedence $fieldParams = clone $this->params; - $fieldParams->merge( $field->fieldparams ); + $fieldParams->merge($field->fieldparams); + $template = $fieldParams->get('templatedefault'); + + $template_category = [ + 'com_content.category', + 'com_users.users', + ]; + + $template_item = [ + 'com_content.article', + 'com_users.user', + ]; + + if(empty($template)) + { + if(in_array($context, $template_category)) + { + $template = $fieldParams->get('templatecategory', $template); + } + if(in_array($context, $template_item)) + { + $template = $fieldParams->get('templatearticle', $template); + } + } // Get the path for the layout file if(substr_count($field->type, '_') > 0) { $tmp = explode('_', $field->type); - $path = PluginHelper::getLayoutPath( 'radicalmultifield', $tmp[1], $fieldParams->get( 'template' ) ); + $path = PluginHelper::getLayoutPath('radicalmultifield', $tmp[1], $template); } else - { - $path = PluginHelper::getLayoutPath( 'fields', $field->type, $fieldParams->get( 'template' ) ); + { + $path = PluginHelper::getLayoutPath('fields', $field->type, $template); } @@ -204,14 +223,14 @@ public function onCustomFieldsPrepareField( $context, $item, $field ) * The form event. Load additional parameters when available into the field form. * Only when the type of the form is of interest. * - * @param JForm $form The form + * @param Form $form The form * @param stdClass $data The data * * @return void * * @since 3.7.0 */ - public function onContentPrepareForm(JForm $form, $data) + public function onContentPrepareForm(Form $form, $data) { @@ -278,18 +297,18 @@ public function onContentPrepareForm(JForm $form, $data) if(count($extendfield)) { //TODO переписать, это упарывание какое-то - for ($i = 0; $i < count($paramsfieldXml->fields->fieldset->field); $i++) + for ($i=0;$ifields->fieldset->field);$i++) { $attr = $paramsfieldXml->fields->fieldset->field[$i]->attributes(); foreach ($paramsfieldXml->fields->fieldset->field[$i]->attributes() as $a => $b) { - if ((string) $a === 'name' && (string) $b === 'listtype') + if ((string)$a === 'name' && (string)$b === 'listtype') { - for ($j = 0; $j < count($paramsfieldXml->fields->fieldset->field[$i]->form->field); $j++) + for ($j=0;$j< count($paramsfieldXml->fields->fieldset->field[$i]->form->field);$j++) { foreach ($paramsfieldXml->fields->fieldset->field[$i]->form->field[$j]->attributes() as $c => $d) { - if ((string) $c === 'type' && (string) $d === 'list') + if ((string)$c === 'type' && (string)$d === 'list') { foreach ($extendfield as $extend) { @@ -345,7 +364,7 @@ public function onContentPrepareForm(JForm $form, $data) HTMLHelper::_( 'jquery.framework' ); - HTMLHelper::script('plg_fields_radicalmultifield/core/radicalmultifield.js', [ + HTMLHelper::script('plg_fields_radicalmultifield/fix.js', [ 'version' => filemtime ( __FILE__ ), 'relative' => true, ]); @@ -381,388 +400,35 @@ public function getListTypeFromField( $field ) return $data; } - /** - * @return array|string - */ + public function onAjaxRadicalmultifield() { - $app = Factory::getApplication(); - $data = $app->input->getArray(); - $admin = $app->isAdmin(); - $allow = true; - - JLoader::register('RadicalmultifieldHelper', JPATH_ROOT . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['plugins', 'fields', 'radicalmultifield', 'radicalmultifieldhelper']) . '.php'); - - $params = RadicalmultifieldHelper::getParams($data['importfield']); - - if(isset($params['filesimportadmin'])) - { - - if((int)$params['filesimportadmin'] && !$admin) - { - $allow = false; - } - - } - else - { - $allow = false; - } - - - if(!$allow) - { - $output = []; - $output["error"] = Text::_('PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_UPLOAD'); - return $output; - } - - - if(!isset($data['importfieldpath'])) - { - $data['importfieldpath'] = ''; - } - - if(!isset($data['importfield'])) - { - $data['importfield'] = ''; - } - - //получение файлов - if($data['type'] === 'get_files') - { - $exs = explode(',', $params['filesimportexc']); - $directory = ($data['importfieldpath'] ? $data['importfieldpath'] . DIRECTORY_SEPARATOR : '') . preg_replace('/^root/isu', '', $data['directory']); - $directory = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $directory); - $directory = str_replace('..' .DIRECTORY_SEPARATOR , '', $directory); - $filesOutput = []; - $files = Folder::files(JPATH_ROOT . DIRECTORY_SEPARATOR . (string) $directory); - $directories = Folder::folders(JPATH_ROOT . DIRECTORY_SEPARATOR . (string) $directory); - foreach ($files as $file) - { - $tmpExs = explode('.', $file); - - if(!isset($tmpExs[1])) - { - continue; - } - - if(in_array(array_pop($tmpExs), $exs)) - { - $filesOutput[] = $file; - } - } - - return [ - 'files' => $filesOutput, - 'directories' => $directories - ]; - } - - //получение директорий - if($data['type'] === 'get_directories') - { - $data = Factory::getApplication()->input->getArray(); - $directory = $params['filesimportpath']; - - if($directory === '') { - return ""; - } - - JLoader::register( - 'FormFieldRadicalmultifieldtreecatalog', - JPATH_ROOT . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['plugins', 'fields', 'radicalmultifield', 'elements', 'radicalmultifieldtreecatalog']) . '.php' - ); - - $treeCatalog = new FormFieldRadicalmultifieldtreecatalog; - - $paramsForField = [ - 'name' => 'select-directory', - 'label' => Text::_('PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_TREECATALOG_TITLE'), - 'class' => '', - 'type' => 'radicalmultifieldtreecatalog', - 'folder' => $directory, - 'folderonly' => 'true', - 'showroot' => 'true', - ]; - - $dataAttributes = array_map(function($value, $key) - { - return $key.'="'.$value.'"'; - }, array_values($paramsForField), array_keys($paramsForField)); - - $treeCatalog->setup(new SimpleXMLElement(""), ''); - return $treeCatalog->getInput(true); - } - - //загрузка файлов - if($data['type'] === 'upload_file') - { - $output = []; - $files = $app->input->files->getArray(); - foreach ($files as $file) - { - - if ($file['error'] == 4) - { - continue; - } - - if ($file['error']) - { - - switch ($file['error']) - { - case 1: - $output["error"] = Text::_('PLG_RADICAL_MULTI_FIELD_IMPORT_FILE_TO_LARGE_THAN_PHP_INI_ALLOWS'); - break; - - case 2: - $output["error"] = Text::_('PLG_RADICAL_MULTI_FIELD_IMPORT_FILE_TO_LARGE_THAN_HTML_FORM_ALLOWS'); - break; - - case 3: - $output["error"] = Text::_('PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_PARTIAL_UPLOAD'); - } - - } - else - { - $lang = Factory::getLanguage(); - $nameSplit = explode('.', $file['name']); - $nameExs = mb_strtolower(array_pop($nameSplit)); - $nameSafe = File::makeSafe($lang->transliterate(implode('-', $nameSplit)), ['#^\.#', '#\040#']); - //$uploadedFileName = $nameSafe . '_' . rand(11111, 99999) . '.' . $nameExs; - $uploadedFileName = $nameSafe . '.' . $nameExs; - - $exs = explode(',', $params['filesimportexc']); - $type = preg_replace("/^.*?\//isu", '', $file['type']); - - if(!in_array($type, $exs)) - { - $output["error"] = Text::_('PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_MIME_TYPE_UPLOAD') . ' (' . Text::_('PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_MIME_TYPE_LABEL'). ': ' . $type.')'; - return $output; - } - - $data['name'] = isset($data['name']) ? $data['name'] : ''; - - $path = JPATH_ROOT . DIRECTORY_SEPARATOR . ($data['importfieldpath'] ? $data['importfieldpath'] . DIRECTORY_SEPARATOR : '') . preg_replace('/^root/isu', '', $data['path']) . DIRECTORY_SEPARATOR . $data['name']; - $path = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path); - $path = str_replace('..' . DIRECTORY_SEPARATOR , '', $path); - - if (!file_exists($path)) - { - Folder::create($path); - } - - if (File::upload($file['tmp_name'], $path . DIRECTORY_SEPARATOR . $uploadedFileName)) - { - - if(in_array($type, ['jpg', 'gif', 'png', 'jpeg', 'jpg', 'webp'])) - { - if((int)$params['filesimportreoriginal']) - { - if(!file_exists($path . DIRECTORY_SEPARATOR . '_original')) - { - Folder::create($path . DIRECTORY_SEPARATOR . '_original'); - } - - File::copy($path . DIRECTORY_SEPARATOR . $uploadedFileName, $path . DIRECTORY_SEPARATOR . '_original' . DIRECTORY_SEPARATOR . $uploadedFileName); - } - - JLoader::registerNamespace('Gumlet', JPATH_SITE . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR , ['plugins', 'fields', 'radicalmultifield', 'libs', 'gumlet', 'lib'])); - $image = new ImageResize($path . DIRECTORY_SEPARATOR . $uploadedFileName); - - if((int)$params['filesimportresize']) - { - - $maxWidth = (int)$params['filesimportrezizemaxwidth']; - $maxHeight = (int)$params['filesimportrezizemaxheight']; - - //resize - $image->resizeToBestFit($maxWidth, $maxHeight); - - } - - //overlay - if((int)$params['filesimportrezizeoverlay']) - { - - $file = JPATH_SITE . DIRECTORY_SEPARATOR . $params['filesimportrezizeoverlayfile']; - $position = $params['filesimportrezizeoverlaypos']; - $padding = $params['filesimportrezizeoverlaypadding']; - - if(file_exists($file)) - { - $image->addFilter(function ($imageDesc) use ($file, $position, $padding, $params) - { - - if(!file_exists($file)) - { - return false; - } - - $logo = imagecreatefromstring(file_get_contents($file)); - $logoWidth = imagesx($logo); - $logoHeight = imagesy($logo); - $imageWidth = imagesx($imageDesc); - $imageHeight = imagesy($imageDesc); - $imageX = $padding; - $imageY = $padding; - - if(isset($params['filesimportrezizeoverlaypercent']) && (int)$params['filesimportrezizeoverlaypercent']) - { - //сжимаем водяной знак по процентному соотношению от изображения на который накладывается - $precent = (int)$params['filesimportrezizeoverlaypercentvalue']; - $logoWidthMax = $imageWidth / 100 * $precent; - $logoHeightMax = $imageHeight / 100 * $precent; - - $ratio = $logoHeight / $logoWidth; - $tmpWidth = $logoWidthMax; - $tmpHeight = $tmpWidth * $ratio; - - if ($tmpHeight > $logoHeightMax) - { - $tmpHeight = $logoHeightMax; - $tmpWidth = $tmpHeight / $ratio; - } - - $logoNew = imagecreatetruecolor($tmpWidth, $tmpHeight); - imagesavealpha($logoNew, true); - imagefill($logoNew,0,0,0x7fff0000); - imagecopyresampled($logoNew, $logo, 0, 0, 0, 0, $tmpWidth, $tmpHeight, $logoWidth, $logoHeight); - $logo = $logoNew; - $logoWidth = $tmpWidth; - $logoHeight = $tmpHeight; - unset($logoNew); - } - - if($logoWidth > $imageWidth && $logoHeight > $imageHeight) - { - return false; - } - - switch ($position) - { - - case "topleft": - $imageX = $padding; - $imageY = $padding; - break; - - case "topcenter": - $imageX = ($imageWidth/2) - ($logoWidth/2); - $imageY = $padding; - break; - - case "topright": - $imageX = $imageWidth - $padding - $logoWidth; - $imageY = $padding; - break; - - case "centerleft": - $imageX = $padding; - $imageY = ($imageHeight/2) - ($logoHeight/2); - break; - - case "centercenter": - $imageX = ($imageWidth/2) - ($logoWidth/2); - $imageY = ($imageHeight/2) - ($logoHeight/2); - break; - - case "centerright": - $imageX = $imageWidth - $padding - $logoWidth; - $imageY = ($imageHeight/2) - ($logoHeight/2); - break; - - case "bottomleft": - $imageX = $padding; - $imageY = $imageHeight - $padding - $logoHeight; - break; - - case "bottomcenter": - $imageX = ($imageWidth/2) - ($logoWidth/2); - $imageY = $imageHeight - $padding - $logoHeight; - break; - - case "bottomright": - $imageX = $imageWidth - $padding - $logoWidth; - $imageY = $imageHeight - $padding - $logoHeight; - break; - - } - - imagecopy($imageDesc, $logo, $imageX, $imageY, 0, 0, $logoWidth, $logoHeight); - }); - } - - } - - $image->save($path . DIRECTORY_SEPARATOR . $uploadedFileName); - - if((int)$params['filesimportpreview']) - { - RadicalmultifieldHelper::generateThumb($params, $path . DIRECTORY_SEPARATOR . $uploadedFileName); - } - - } - - $output["name"] = $uploadedFileName; - } - else - { - $output["error"] = Text::_('PLG_RADICAL_MULTI_FIELD_IMPORT_ERROR_UPLOAD'); - } - } - } - - return $output; - - } - - if($app->isAdmin()) { - //уаделение директории, только для административной части - if($data['type'] === 'delete_directory') - { - $path = JPATH_ROOT . DIRECTORY_SEPARATOR . ($data['importfieldpath'] ? $data['importfieldpath'] . DIRECTORY_SEPARATOR : '') . preg_replace('/^root/isu', '', $data['path']) . DIRECTORY_SEPARATOR . $data['name']; - $path = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path); - $path = str_replace('..' . DIRECTORY_SEPARATOR , '', $path); - //Folder::delete(JPATH_ROOT . DIRECTORY_SEPARATOR . $path); - } - } + $app = Factory::getApplication(); + if($app->isClient('administrator')) + { + JLoader::register('QuantummanagerHelper', JPATH_ROOT . '/administrator/components/com_quantummanager/helpers/quantummanager.php'); + QuantummanagerHelper::loadlang(); + $name = $app->input->get('name', ''); - //создание директории - if($data['type'] === 'create_directory') - { - $lang = Factory::getLanguage(); - $data['name'] = JFILE::makeSafe($lang->transliterate($data['name'])); - $path = JPATH_ROOT . DIRECTORY_SEPARATOR . ($data['importfieldpath'] ? $data['importfieldpath'] . DIRECTORY_SEPARATOR : '') . preg_replace('/^root/isu', '', $data['path']) . DIRECTORY_SEPARATOR . $data['name']; - $path = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path); - $path = str_replace('..' . DIRECTORY_SEPARATOR , '', $path); - - Folder::create($path); - - JLoader::register('FormFieldRadicalmultifieldtreecatalog', JPATH_ROOT . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['plugins', 'fields', 'radicalmultifield', 'elements', 'radicalmultifieldtreecatalog']) . '.php'); - $treeCatalog = new FormFieldRadicalmultifieldtreecatalog; - $paramsForField = [ - 'name' => 'select-directory', - 'label' => Text::_('PLG_RADICAL_MULTI_FIELD_FIELD_IMPORT_TREECATALOG_TITLE'), - 'class' => '', - 'type' => 'radicalmultifieldtreecatalog', - 'folder' => $data['importfieldpath'], - 'folderonly' => 'true', - 'showroot' => 'true', - ]; - - $dataAttributes = array_map(function($value, $key) { - return $key . '="' . $value . '"'; - }, array_values($paramsForField), array_keys($paramsForField)); - - $treeCatalog->setup(new SimpleXMLElement(""), ''); - return $treeCatalog->getInput(true); - } + if(empty($name)) + { + return; + } - return []; + $db = Factory::getDBO(); + $query = $db->getQuery(true) + ->select($db->quoteName(array('params', 'fieldparams'))) + ->from('#__fields') + ->where( 'name=' . $db->quote($name)); + $field = $db->setQuery( $query )->loadObject(); + $fieldparams = json_decode($field->fieldparams, JSON_OBJECT_AS_ARRAY); + $field_path = !empty($fieldparams['filesimportpath']) ? $fieldparams['filesimportpath'] : 'images'; + $layout = new FileLayout('quantummanager', JPATH_ROOT . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, [ + 'plugins', 'fields', 'radicalmultifield', 'layouts', + ])); + echo $layout->render(['field_path' => $field_path]); + } } + } diff --git a/radicalmultifield.xml b/radicalmultifield.xml index b2631b0..f523c0e 100644 --- a/radicalmultifield.xml +++ b/radicalmultifield.xml @@ -2,12 +2,12 @@ PLG_RADICAL_MULTI_FIELD 18.08.2018 - delo-design.ru - info@delo-design.ru + Cymbal + cymbal@delo-design.ru https://delo-design.ru Copyright (C) 2018 "Delo Design". All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - 2.2 + GNU General Public License version 3 or later; see LICENSE.txt + 3.0 PLG_RADICAL_MULTI_FIELD_XML_DESCRIPTION script.php @@ -21,7 +21,7 @@ - https://hika.su/update/free/plg_radicalmultifield.xml + https://hika.su/update/free/plg_radicalmultifield_3x.xml @@ -29,18 +29,15 @@ radicalmultifield.php radicalmultifieldhelper.php LICENSE.txt - elements fields layouts - libs params tmpl - core - libs - img + css + js diff --git a/radicalmultifieldhelper.php b/radicalmultifieldhelper.php index 616845e..ba3f0cd 100644 --- a/radicalmultifieldhelper.php +++ b/radicalmultifieldhelper.php @@ -1,6 +1,7 @@ getQuery(true) - ->select($db->quoteName(array('context', 'title', 'name'))) - ->from($db->quoteName('#__fields')) - ->where("id = " . $db->escape($field_id)); + ->select($db->qn(array('context', 'title', 'name'))) + ->from($db->qn('#__fields')) + ->where("id = " . $db->q($field_id)); $db->setQuery($query); $fieldAndValue->field = $db->loadObject(); //get value $db = Factory::getDbo(); $query = $db->getQuery(true) - ->select($db->quoteName(array('field_id', 'item_id', 'value'))) - ->from($db->quoteName('#__fields_values')) - ->where("field_id = " . $db->escape($field_id)) - ->where("item_id = " . $db->escape($item_id)); + ->select($db->qn(array('field_id', 'item_id', 'value'))) + ->from($db->qn('#__fields_values')) + ->where("field_id = " . $db->q($field_id)) + ->where("item_id = " . $db->q($item_id)); $db->setQuery($query); $fieldAndValue->value = $db->loadObject(); @@ -54,9 +62,11 @@ private static function getFieldAndValue($field_id, $item_id) /** - * @param $field_id - * @param $item_id - * @param boolean + * @param int $field_id + * @param int $item_id + * @param mixed $value + * + * @return bool */ private static function saveFieldValue($field_id, $item_id, $value) { @@ -64,10 +74,10 @@ private static function saveFieldValue($field_id, $item_id, $value) //get value $db = Factory::getDbo(); $query = $db->getQuery(true) - ->select($db->quoteName(array('field_id', 'item_id', 'value'))) - ->from($db->quoteName('#__fields_values')) - ->where("field_id = " . $db->escape($field_id)) - ->where("item_id = " . $db->escape($item_id)); + ->select($db->qn(array('field_id', 'item_id', 'value'))) + ->from($db->qn('#__fields_values')) + ->where("field_id = " . $db->q($field_id)) + ->where("item_id = " . $db->q($item_id)); $db->setQuery($query); $fieldValue = $db->loadObject(); @@ -84,12 +94,12 @@ private static function saveFieldValue($field_id, $item_id, $value) $query = $db->getQuery(true); $fields = array( - $db->quoteName('value') . ' = "' . $db->escape($value) . '"', + $db->qn('value') . ' = "' . $db->q($value) . '"', ); $conditions = array( - $db->quoteName('field_id') . ' = ' . $db->escape($field_id), - $db->quoteName('item_id') . ' = ' . $db->escape($item_id) + $db->qn('field_id') . ' = ' . $db->q($field_id), + $db->qn('item_id') . ' = ' . $db->q($item_id) ); $query->update($db->quoteName('#__fields_values'))->set($fields)->where($conditions); @@ -102,8 +112,8 @@ private static function saveFieldValue($field_id, $item_id, $value) /** - * @param $field_id - * @param $item_id + * @param int $field_id + * @param int $item_id * @param array $data * @return bool */ @@ -129,11 +139,11 @@ public static function add($field_id, $item_id, $data = []) /** - * @param $field_id - * @param $item_id + * @param int $field_id + * @param int $item_id * @param array $data * - * @return bool|mixed + * @return bool */ public static function edit($field_id, $item_id, $data = []) { @@ -192,9 +202,10 @@ public static function edit($field_id, $item_id, $data = []) /** - * @param $field_id - * @param $item_id + * @param int $field_id + * @param int $item_id * @param array $data + * * @return bool */ public static function delete($field_id, $item_id, $data = []) @@ -249,10 +260,11 @@ public static function delete($field_id, $item_id, $data = []) /** - * @param $field_id - * @param $item_id + * @param int $field_id + * @param int $item_id * @param array $data * @param bool $column_find_all + * * @return array */ public static function check($field_id, $item_id, $data = [], $column_find_all = true) @@ -319,6 +331,28 @@ public static function check($field_id, $item_id, $data = [], $column_find_all = } + /** + * @return bool + */ + public static function checkQuantumManager() + { + $db = Factory::getDBO(); + $query = $db->getQuery( true ) + ->select( 'extension_id' ) + ->from( '#__extensions' ) + ->where( $db->qn('type') . ' = ' . $db->q('component')) + ->where( $db->qn('element') . ' = ' . $db->q('com_quantummanager')); + $extension = $db->setQuery( $query )->loadObject(); + + if(!empty($extension->extension_id)) + { + return true; + } + + return false; + } + + /** * @param string $fieldname * @@ -326,38 +360,51 @@ public static function check($field_id, $item_id, $data = [], $column_find_all = */ public static function getParams($fieldname = '') { + + if(isset(self::$_cache_params[$fieldname])) + { + return self::$_cache_params[$fieldname]; + } + $db = Factory::getDBO(); $query = $db->getQuery( true ) ->select( 'fieldparams' ) ->from( '#__fields' ) - ->where( 'name=' . $db->quote( $fieldname ) ); + ->where( 'name=' . $db->q( $fieldname ) ); $field = $db->setQuery( $query )->loadResult(); $params = json_decode( $field, JSON_OBJECT_AS_ARRAY ); - - return $params; + self::$_cache_params[$fieldname] = $params; + return self::$_cache_params[$fieldname]; } /** - * @param $path + * @param string $path * - * @return array|bool|string + * @return array */ public static function loadClassExtendField($path) { - $path = JPATH_ROOT . DIRECTORY_SEPARATOR . $path; + + if(empty($path)) + { + return []; + } + + $path = Path::clean(JPATH_ROOT . DIRECTORY_SEPARATOR . $path); $files = Folder::files($path); $className = false; $fileListsName = []; - foreach ($files as $file) + foreach ($files as $file) { - $name = str_replace('.php', '', $file); + + $name = str_replace('.php', '', $file); $className = 'FormField' . ucfirst($name); JLoader::register($className, $path . DIRECTORY_SEPARATOR . $file); - if (!class_exists($className)) + if (!class_exists($className)) { $className = 'JFormField' . ucfirst($name); @@ -365,7 +412,7 @@ public static function loadClassExtendField($path) if (!class_exists($className)) { - return []; + continue; } else { @@ -385,217 +432,72 @@ public static function loadClassExtendField($path) } - /** - * @param $fieldOrParams - * @param $source - * - * @return mixed|string - */ - public static function generateThumb(&$fieldOrParams, $source) + /** + * @param \Joomla\CMS\Form\FormField|array $fieldOrParams + * @param string $source + * @param string $thumb_path example: cache/my_cache + * + * @return string + */ + public static function generateThumb(&$fieldOrParams, $source, $thumb_path = null) { $source = str_replace(JPATH_ROOT . DIRECTORY_SEPARATOR, '', $source); $paths = explode(DIRECTORY_SEPARATOR, $source); $file = array_pop($paths); $fileSplit = explode('.', $file); $fileExt = mb_strtolower(array_pop($fileSplit)); - $extAccept = ['jpg', 'jpeg', 'png', 'gif']; + $extAccept = ['jpg', 'jpeg', 'png', 'gif', 'webp']; if(!in_array($fileExt, $extAccept)) { return $file; } - $pathThumb = implode(DIRECTORY_SEPARATOR, array_merge($paths, ['_thumb'])); - $pathFileThumb = implode(DIRECTORY_SEPARATOR, array_merge($paths, ['_thumb'])) . DIRECTORY_SEPARATOR . $file; - $fullPathThumb = JPATH_ROOT . DIRECTORY_SEPARATOR . $pathThumb . DIRECTORY_SEPARATOR . $file; - - //если есть проевью, то отдаем ссылку на файл - if(file_exists($fullPathThumb)) - { - return $pathFileThumb; - } - - //если нет, генерируем превью - - //проверяем создан ли каталог для превью - if(!file_exists(JPATH_ROOT . DIRECTORY_SEPARATOR . $pathThumb)) - { - //создаем каталог - Folder::create(JPATH_ROOT . DIRECTORY_SEPARATOR . $pathThumb); - } - - //подгружаем библиотеку для фото - JLoader::registerNamespace('Gumlet', JPATH_SITE . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR , ['plugins', 'fields', 'radicalmultifield', 'libs', 'gumlet', 'lib'])); - - $params = []; - - if(is_object($fieldOrParams)) - { - if(!isset($fieldOrParams->name)) - { - return $source; - } - - //подгружаем параметры поля - $params = self::getParams($fieldOrParams->name); - - } - - if(is_array($fieldOrParams)) - { - $params = $fieldOrParams; - } - - - if(!isset($params['filesimportpreviewmaxwidth']) || !isset($params['filesimportpreviewmaxheight'])) - { - return $source; - } - - $overlayAccept = true; - - if((int)$params['filesimportreoriginal']) - { - $originalFile = implode(DIRECTORY_SEPARATOR, array_merge($paths, ['_original'])) . DIRECTORY_SEPARATOR . $source; - - if(!file_exists($originalFile)) - { - $originalFile = JPATH_ROOT . DIRECTORY_SEPARATOR . $source; - $overlayAccept = false; - } - - } else - { - $originalFile = JPATH_ROOT . DIRECTORY_SEPARATOR . $source; - $overlayAccept = false; - } + if($thumb_path === null) + { + $thumb_path = implode(DIRECTORY_SEPARATOR, array_merge($paths)); + } - if(copy(JPATH_ROOT . DIRECTORY_SEPARATOR . $source, $fullPathThumb)) { - $image = new ImageResize($fullPathThumb); + $params = []; - $maxWidth = (int)$params['filesimportpreviewmaxwidth']; - $maxHeight = (int)$params['filesimportpreviewmaxheight']; + if(is_object($fieldOrParams)) + { + if(!isset($fieldOrParams->name)) + { + return $source; + } - $image->resizeToBestFit($maxWidth, $maxHeight); + //подгружаем параметры поля + $params = self::getParams($fieldOrParams->name); - if((int)$params['filesimportrezizeoverlay'] && (int)$params['filesimportreoriginal'] && $overlayAccept) { - $file = JPATH_SITE . DIRECTORY_SEPARATOR . $params['filesimportrezizeoverlayfile']; - $position = $params['filesimportrezizeoverlaypos']; - $padding = $params['filesimportrezizeoverlaypadding']; + } - if(file_exists($file)) - { - $image->addFilter(function ($imageDesc) use ($file, $position, $padding, $params) - { + if(is_array($fieldOrParams)) + { + $params = $fieldOrParams; + } - if(!file_exists($file)) - { - return false; - } - - $logo = imagecreatefromstring(file_get_contents($file)); - $logoWidth = imagesx($logo); - $logoHeight = imagesy($logo); - $imageWidth = imagesx($imageDesc); - $imageHeight = imagesy($imageDesc); - $imageX = $padding; - $imageY = $padding; - - if(isset($params['filesimportrezizeoverlaypercent']) && (int)$params['filesimportrezizeoverlaypercent']) - { - //сжимаем водяной знак по процентному соотношению от изображения на который накладывается - $precent = (int)$params['filesimportrezizeoverlaypercentvalue']; - $logoWidthMax = $imageWidth / 100 * $precent; - $logoHeightMax = $imageHeight / 100 * $precent; - - $ratio = $logoHeight / $logoWidth; - $tmpWidth = $logoWidthMax; - $tmpHeight = $tmpWidth * $ratio; - - if ($tmpHeight > $logoHeightMax) - { - $tmpHeight = $logoHeightMax; - $tmpWidth = $tmpHeight / $ratio; - } - - $logoNew = imagecreatetruecolor($tmpWidth, $tmpHeight); - imagesavealpha($logoNew, true); - imagefill($logoNew,0,0,0x7fff0000); - imagecopyresampled($logoNew, $logo, 0, 0, 0, 0, $tmpWidth, $tmpHeight, $logoWidth, $logoHeight); - $logo = $logoNew; - $logoWidth = $tmpWidth; - $logoHeight = $tmpHeight; - unset($logoNew); - } - - if($logoWidth > $imageWidth && $logoHeight > $imageHeight) - { - return false; - } - - switch ($position) - { - - case "topleft": - $imageX = $padding; - $imageY = $padding; - break; - - case "topcenter": - $imageX = ($imageWidth/2) - ($logoWidth/2); - $imageY = $padding; - break; - - case "topright": - $imageX = $imageWidth - $padding - $logoWidth; - $imageY = $padding; - break; - - case "centerleft": - $imageX = $padding; - $imageY = ($imageHeight/2) - ($logoHeight/2); - break; - - case "centercenter": - $imageX = ($imageWidth/2) - ($logoWidth/2); - $imageY = ($imageHeight/2) - ($logoHeight/2); - break; - - case "centerright": - $imageX = $imageWidth - $padding - $logoWidth; - $imageY = ($imageHeight/2) - ($logoHeight/2); - break; - - case "bottomleft": - $imageX = $padding; - $imageY = $imageHeight - $padding - $logoHeight; - break; - - case "bottomcenter": - $imageX = ($imageWidth/2) - ($logoWidth/2); - $imageY = $imageHeight - $padding - $logoHeight; - break; - - case "bottomright": - $imageX = $imageWidth - $padding - $logoWidth; - $imageY = $imageHeight - $padding - $logoHeight; - break; - - } - - imagecopy($imageDesc, $logo, $imageX, $imageY, 0, 0, $logoWidth, $logoHeight); - }); - } - } + if(isset($params['filesimportpreviewfolder'])) + { + if($params['filesimportpreviewfolder'] === 'cache') + { + $thumb_path = Path::clean(DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'plg_fields_multifields' . DIRECTORY_SEPARATOR. $thumb_path); + } - $image->save($fullPathThumb); - unset($image); - } + if($params['filesimportpreviewfolder'] === 'generatedimages') + { + $thumb_path = Path::clean(DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'generatedimages' . DIRECTORY_SEPARATOR . 'plg_fields_multifields' . DIRECTORY_SEPARATOR. $thumb_path); + } + } - return $pathFileThumb; + $maxWidth = (int)$params['filesimportpreviewmaxwidth']; + $maxHeight = (int)$params['filesimportpreviewmaxheight']; + $algorithm = $params['filesimportpreviewalgorithm']; + //если нет, генерируем превью + JLoader::register('JInterventionimage', JPATH_ROOT . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, ['libraries', 'jinterventionimage', 'jinterventionimage.php'])); + return JInterventionimage::generateThumb($source, $maxWidth, $maxHeight, $algorithm, $thumb_path); } - } \ No newline at end of file