diff --git a/.gitignore b/.gitignore index ab8d1721d657e..19ab14c416f8f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /administrator/cache /administrator/logs /cache +/installation/cache /tmp /configuration.php /.htaccess diff --git a/README.md b/README.md index d63773899e44e..0c82b1ef46db8 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Is it easy to change the layout display? Ready to install Joomla? --------------------- -* Check the [minimum requirements](https://www.joomla.org/technical-requirements.html). +* Check the [minimum requirements](https://www.joomla.org/about-joomla/technical-requirements.html). * How do you [install Joomla](https://docs.joomla.org/Installing_Joomla!)? * You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally). When ready, it can be moved to an on-line hosting account of your choice. diff --git a/README.txt b/README.txt index 6caa476cada6d..72b246a63ce81 100644 --- a/README.txt +++ b/README.txt @@ -33,7 +33,7 @@ * There are lots of ready made templates that you can download. 8- Ready to install Joomla? - * See minimum requirements here: https://www.joomla.org/technical-requirements.html + * See minimum requirements here: https://www.joomla.org/about-joomla/technical-requirements.html * How do you install Joomla! ? - https://docs.joomla.org/Installing_Joomla! * Start your Joomla experience building your site with a local test server. When ready it can be moved to an on-line hosting account of your choice. diff --git a/administrator/components/com_admin/models/sysinfo.php b/administrator/components/com_admin/models/sysinfo.php index 39113c3585588..e13a05092e12d 100644 --- a/administrator/components/com_admin/models/sysinfo.php +++ b/administrator/components/com_admin/models/sysinfo.php @@ -102,7 +102,7 @@ class AdminModelSysInfo extends JModelLegacy 'session.save_path', 'upload_tmp_dir', 'User/Group', - 'open_basedir' + 'open_basedir', ), 'other' => array( 'db', @@ -126,7 +126,7 @@ class AdminModelSysInfo extends JModelLegacy 'sitename', 'smtphost', 'tmp_path', - 'open_basedir' + 'open_basedir', ) ); @@ -274,7 +274,7 @@ public function &getConfig() $registry = new Registry(new JConfig); $this->config = $registry->toArray(); - $hidden = array('host', 'user', 'password', 'ftp_user', 'ftp_pass', 'smtpuser', 'smtppass'); + $hidden = array('host', 'user', 'password', 'ftp_user', 'ftp_pass', 'smtpuser', 'smtppass',); foreach ($hidden as $key) { @@ -312,7 +312,7 @@ public function &getInfo() 'sapi_name' => php_sapi_name(), 'version' => $version->getLongVersion(), 'platform' => $platform->getLongVersion(), - 'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "" + 'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "", ); return $this->info; @@ -525,7 +525,10 @@ public function getDirectory($public = false) continue; } - $this->addDirectory('administrator/language/' . $folder->getFilename(), JPATH_ADMINISTRATOR . '/language/' . $folder->getFilename()); + $this->addDirectory( + 'administrator/language/' . $folder->getFilename(), + JPATH_ADMINISTRATOR . '/language/' . $folder->getFilename() + ); } // List all manifests folders @@ -538,7 +541,10 @@ public function getDirectory($public = false) continue; } - $this->addDirectory('administrator/manifests/' . $folder->getFilename(), JPATH_ADMINISTRATOR . '/manifests/' . $folder->getFilename()); + $this->addDirectory( + 'administrator/manifests/' . $folder->getFilename(), + JPATH_ADMINISTRATOR . '/manifests/' . $folder->getFilename() + ); } $this->addDirectory('administrator/modules', JPATH_ADMINISTRATOR . '/modules'); @@ -558,7 +564,10 @@ public function getDirectory($public = false) continue; } - $this->addDirectory('images/' . $folder->getFilename(), JPATH_SITE . '/' . $cparams->get('image_path') . '/' . $folder->getFilename()); + $this->addDirectory( + 'images/' . $folder->getFilename(), + JPATH_SITE . '/' . $cparams->get('image_path') . '/' . $folder->getFilename() + ); } $this->addDirectory('language', JPATH_SITE . '/language'); @@ -611,8 +620,16 @@ public function getDirectory($public = false) if ($public) { - $this->addDirectory('log', $registry->get('log_path', JPATH_ADMINISTRATOR . '/logs'), 'COM_ADMIN_LOG_DIRECTORY'); - $this->addDirectory('tmp', $registry->get('tmp_path', JPATH_ROOT . '/tmp'), 'COM_ADMIN_TEMP_DIRECTORY'); + $this->addDirectory( + 'log', + $registry->get('log_path', JPATH_ADMINISTRATOR . '/logs'), + 'COM_ADMIN_LOG_DIRECTORY' + ); + $this->addDirectory( + 'tmp', + $registry->get('tmp_path', JPATH_ROOT . '/tmp'), + 'COM_ADMIN_TEMP_DIRECTORY' + ); } else { @@ -621,7 +638,11 @@ public function getDirectory($public = false) $registry->get('log_path', JPATH_ADMINISTRATOR . '/logs'), 'COM_ADMIN_LOG_DIRECTORY' ); - $this->addDirectory($registry->get('tmp_path', JPATH_ROOT . '/tmp'), $registry->get('tmp_path', JPATH_ROOT . '/tmp'), 'COM_ADMIN_TEMP_DIRECTORY'); + $this->addDirectory( + $registry->get('tmp_path', JPATH_ROOT . '/tmp'), + $registry->get('tmp_path', JPATH_ROOT . '/tmp'), + 'COM_ADMIN_TEMP_DIRECTORY' + ); } return $this->directories; @@ -640,7 +661,7 @@ public function getDirectory($public = false) */ private function addDirectory($name, $path, $message = '') { - $this->directories[$name] = array('writable' => is_writable($path), 'message' => $message); + $this->directories[$name] = array('writable' => is_writable($path), 'message' => $message,); } /** @@ -697,7 +718,7 @@ protected function parsePhpInfo($html) // 3cols if (preg_match($p2, $val, $matchs)) { - $r[$name][trim($matchs[1])] = array(trim($matchs[2]), trim($matchs[3])); + $r[$name][trim($matchs[1])] = array(trim($matchs[2]), trim($matchs[3]),); } // 2cols elseif (preg_match($p3, $val, $matchs)) diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index d1e9c5b31d1e9..0aaa9ad97ed99 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -1421,6 +1421,8 @@ public function deleteUnexistingFiles() '/libraries/simplepie/idn/idna_convert.class.php', '/libraries/simplepie/idn/npdata.ser', '/administrator/manifests/libraries/simplepie.xml', + '/administrator/templates/isis/js/jquery.js', + '/administrator/templates/isis/js/bootstrap.min.js', ); // TODO There is an issue while deleting folders using the ftp mode diff --git a/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-04-01.sql b/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-04-01.sql index 3a607f8bb3f83..0ac34df324f64 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-04-01.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-04-01.sql @@ -1,3 +1,7 @@ +-- Rename update site names +UPDATE `#__update_sites` SET `name` = 'Joomla! Core' WHERE `name` = 'Joomla Core' AND `type` = 'collection'; +UPDATE `#__update_sites` SET `name` = 'Joomla! Extension Directory' WHERE `name` = 'Joomla Extension Directory' AND `type` = 'collection'; + UPDATE `#__update_sites` SET `location` = 'https://update.joomla.org/core/list.xml' WHERE `name` = 'Joomla! Core' AND `type` = 'collection'; UPDATE `#__update_sites` SET `location` = 'https://update.joomla.org/jed/list.xml' WHERE `name` = 'Joomla! Extension Directory' AND `type` = 'collection'; UPDATE `#__update_sites` SET `location` = 'https://update.joomla.org/language/translationlist_3.xml' WHERE `name` = 'Accredited Joomla! Translations' AND `type` = 'collection'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-06-01.sql b/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-06-01.sql new file mode 100644 index 0000000000000..511d7cbac13e5 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-06-01.sql @@ -0,0 +1 @@ +UPDATE `#__extensions` SET `protected` = 1, `enabled` = 1 WHERE `name` = 'com_ajax'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-06-05.sql b/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-06-05.sql new file mode 100644 index 0000000000000..4fcc47c42f600 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-06-05.sql @@ -0,0 +1,5 @@ +-- +-- Add ACL check for to #__languages +-- + +ALTER TABLE `#__languages` ADD COLUMN `asset_id` INT(11) NOT NULL AFTER `lang_id`; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-04-01.sql b/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-04-01.sql index ff3d61ce21a60..50d35bbd85db7 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-04-01.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-04-01.sql @@ -1,3 +1,7 @@ +-- Rename update site names +UPDATE "#__update_sites" SET "name" = 'Joomla! Core' WHERE "name" = 'Joomla Core' AND "type" = 'collection'; +UPDATE "#__update_sites" SET "name" = 'Joomla! Extension Directory' WHERE "name" = 'Joomla Extension Directory' AND "type" = 'collection'; + UPDATE "#__update_sites" SET "location" = 'https://update.joomla.org/core/list.xml' WHERE "name" = 'Joomla! Core' AND "type" = 'collection'; UPDATE "#__update_sites" SET "location" = 'https://update.joomla.org/jed/list.xml' WHERE "name" = 'Joomla! Extension Directory' AND "type" = 'collection'; UPDATE "#__update_sites" SET "location" = 'https://update.joomla.org/language/translationlist_3.xml' WHERE "name" = 'Accredited Joomla! Translations' AND "type" = 'collection'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-06-01.sql b/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-06-01.sql new file mode 100644 index 0000000000000..8c74de123eb33 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-06-01.sql @@ -0,0 +1 @@ +UPDATE "#__extensions" SET "protected" = 1, "enabled" = 1 WHERE "name" = "com_ajax"; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-06-05.sql b/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-06-05.sql new file mode 100644 index 0000000000000..3d4aac89763e6 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.6.0-2016-06-05.sql @@ -0,0 +1,5 @@ +-- +-- Add ACL check for to #__languages +-- + +ALTER TABLE "#__languages" ADD COLUMN "asset_id" bigint DEFAULT 0 NOT NULL; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-04-01.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-04-01.sql index 59d5fb4c387ca..45dcf467e5c19 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-04-01.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-04-01.sql @@ -1,3 +1,7 @@ +-- Rename update site names +UPDATE [#__update_sites] SET [name] = 'Joomla! Core' WHERE [name] = 'Joomla Core' AND [type] = 'collection'; +UPDATE [#__update_sites] SET [name] = 'Joomla! Extension Directory' WHERE [name] = 'Joomla Extension Directory' AND [type] = 'collection'; + UPDATE [#__update_sites] SET [location] = 'https://update.joomla.org/core/list.xml' WHERE [name] = 'Joomla! Core' AND [type] = 'collection'; UPDATE [#__update_sites] SET [location] = 'https://update.joomla.org/jed/list.xml' WHERE [name] = 'Joomla! Extension Directory' AND [type] = 'collection'; UPDATE [#__update_sites] SET [location] = 'https://update.joomla.org/language/translationlist_3.xml' WHERE [name] = 'Accredited Joomla! Translations' AND [type] = 'collection'; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-06-01.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-06-01.sql new file mode 100644 index 0000000000000..3a547b55371be --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-06-01.sql @@ -0,0 +1 @@ +UPDATE [#__extensions] SET [protected] = 1, [enabled] = 1 WHERE [name] = 'com_ajax'; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-06-05.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-06-05.sql new file mode 100644 index 0000000000000..9355db71a3667 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.6.0-2016-06-05.sql @@ -0,0 +1,5 @@ +-- +-- Add ACL check for to #__languages +-- + +ALTER TABLE [#__languages] ADD [asset_id] [bigint] NOT NULL DEFAULT 0; \ No newline at end of file diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php b/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php index 359622981a71c..41c6db9e28d71 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php @@ -105,7 +105,7 @@ - info['useragent']); ?> + info['useragent'], ENT_COMPAT, 'UTF-8'); ?> diff --git a/administrator/components/com_banners/access.xml b/administrator/components/com_banners/access.xml index 7f3ace116eace..d81db5fbe78ee 100644 --- a/administrator/components/com_banners/access.xml +++ b/administrator/components/com_banners/access.xml @@ -1,18 +1,72 @@
- - - - - - - + + + + + + + + + + + + + +
- - - - + + + + + + +
diff --git a/administrator/components/com_banners/banners.xml b/administrator/components/com_banners/banners.xml index bcb02355da5e2..2769e45714602 100644 --- a/administrator/components/com_banners/banners.xml +++ b/administrator/components/com_banners/banners.xml @@ -35,14 +35,38 @@ Note that all & must be escaped to & for the file to be valid XML and be parsed by the installer --> - com_banners_banners - com_banners_categories - com_banners_clients - com_banners_tracks + + com_banners_banners + + + com_banners_categories + + + com_banners_clients + + + com_banners_tracks + access.xml diff --git a/administrator/components/com_banners/config.xml b/administrator/components/com_banners/config.xml index 5ea4132f6b837..c81c7627c437d 100644 --- a/administrator/components/com_banners/config.xml +++ b/administrator/components/com_banners/config.xml @@ -1,48 +1,46 @@ -
+ description="COM_BANNERS_FIELDSET_CONFIG_CLIENT_OPTIONS_DESC" + > + - - - - - + + + + + - - + > + + + > @@ -51,33 +49,33 @@ name="metakey_prefix" type="text" label="COM_BANNERS_FIELD_METAKEYWORDPREFIX_LABEL" - description="COM_BANNERS_FIELD_METAKEYWORDPREFIX_DESC" /> - + description="COM_BANNERS_FIELD_METAKEYWORDPREFIX_DESC" + />
-
- + description="COM_BANNERS_FIELDSET_CONFIG_BANNER_OPTIONS_DESC" + > + - - + + - + @@ -96,6 +94,7 @@ filter="rules" validate="rules" component="com_banners" - section="component" /> + section="component" + />
diff --git a/administrator/components/com_banners/models/banner.php b/administrator/components/com_banners/models/banner.php index be1048ac9672c..16e3b8e6cbe87 100644 --- a/administrator/components/com_banners/models/banner.php +++ b/administrator/components/com_banners/models/banner.php @@ -358,7 +358,7 @@ protected function loadFormData() // Prime some default values. if ($this->getState('banner.id') == 0) { - $filters = (array) $app->getUserState('com_banners.banners.filter'); + $filters = (array) $app->getUserState('com_banners.banners.filter'); $filterCatId = isset($filters['category_id']) ? $filters['category_id'] : null; $data->set('catid', $app->input->getInt('catid', $filterCatId)); @@ -486,6 +486,31 @@ public function save($data) { $input = JFactory::getApplication()->input; + JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); + + // Cast catid to integer for comparison + $catid = (int) $data['catid']; + + // Check if New Category exists + if ($catid > 0) + { + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_banners'); + } + + // Save New Category + if ($catid == 0) + { + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_banners'; + $table['language'] = $data['language']; + $table['published'] = 1; + + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($table); + } + // Alter the name for save as copy if ($input->get('task') == 'save2copy') { @@ -496,8 +521,8 @@ public function save($data) if ($data['name'] == $origTable->name) { list($name, $alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']); - $data['name'] = $name; - $data['alias'] = $alias; + $data['name'] = $name; + $data['alias'] = $alias; } else { diff --git a/administrator/components/com_banners/models/banners.php b/administrator/components/com_banners/models/banners.php index d253ea6ec9daf..52ecdd2a5d131 100644 --- a/administrator/components/com_banners/models/banners.php +++ b/administrator/components/com_banners/models/banners.php @@ -96,23 +96,23 @@ protected function getListQuery() $query->select( $this->getState( 'list.select', - 'a.id AS id,' . - 'a.name AS name,' . - 'a.alias AS alias,' . - 'a.checked_out AS checked_out,' . - 'a.checked_out_time AS checked_out_time,' . - 'a.catid AS catid,' . - 'a.clicks AS clicks,' . - 'a.metakey AS metakey,' . - 'a.sticky AS sticky,' . - 'a.impmade AS impmade,' . - 'a.imptotal AS imptotal,' . - 'a.state AS state,' . - 'a.ordering AS ordering,' . - 'a.purchase_type AS purchase_type,' . - 'a.language,' . - 'a.publish_up,' . - 'a.publish_down' + 'a.id AS id,' + . 'a.name AS name,' + . 'a.alias AS alias,' + . 'a.checked_out AS checked_out,' + . 'a.checked_out_time AS checked_out_time,' + . 'a.catid AS catid,' + . 'a.clicks AS clicks,' + . 'a.metakey AS metakey,' + . 'a.sticky AS sticky,' + . 'a.impmade AS impmade,' + . 'a.imptotal AS imptotal,' + . 'a.state AS state,' + . 'a.ordering AS ordering,' + . 'a.purchase_type AS purchase_type,' + . 'a.language,' + . 'a.publish_up,' + . 'a.publish_down' ) ); $query->from($db->quoteName('#__banners', 'a')); diff --git a/administrator/components/com_banners/models/clients.php b/administrator/components/com_banners/models/clients.php index 3eccf56840022..81d483a8ca5dd 100644 --- a/administrator/components/com_banners/models/clients.php +++ b/administrator/components/com_banners/models/clients.php @@ -99,7 +99,7 @@ protected function getStoreId($id = '') protected function getListQuery() { // Create a new query object. - $db = $this->getDbo(); + $db = $this->getDbo(); $query = $db->getQuery(true); $defaultPurchase = JComponentHelper::getParams('com_banners')->get('purchase_type', 3); @@ -108,14 +108,14 @@ protected function getListQuery() $query->select( $this->getState( 'list.select', - 'a.id AS id,' . - 'a.name AS name,' . - 'a.contact AS contact,' . - 'a.checked_out AS checked_out,' . - 'a.checked_out_time AS checked_out_time, ' . - 'a.state AS state,' . - 'a.metakey AS metakey,' . - 'a.purchase_type as purchase_type' + 'a.id AS id,' + . 'a.name AS name,' + . 'a.contact AS contact,' + . 'a.checked_out AS checked_out,' + . 'a.checked_out_time AS checked_out_time, ' + . 'a.state AS state,' + . 'a.metakey AS metakey,' + . 'a.purchase_type as purchase_type' ) ); diff --git a/administrator/components/com_banners/models/forms/banner.xml b/administrator/components/com_banners/models/forms/banner.xml index b4d5607f64044..0a6cc912ca0f9 100644 --- a/administrator/components/com_banners/models/forms/banner.xml +++ b/administrator/components/com_banners/models/forms/banner.xml @@ -1,221 +1,376 @@
-
+
- + - + size="40" + required="true" + /> - + size="40" + hint="JFIELD_ALIAS_PLACEHOLDER" + /> - + addfieldpath="/administrator/components/com_categories/models/fields" + allowAdd="true" + default="" + /> - + size="1" + default="1" + > - + table="#__banners" + /> - + - - + - - - + + + - + - +
-
+
- + - + - + - + - + filter="unset" + /> - + - + - +
-
+
- + default="0" + class="btn-group btn-group-yesno" + >
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + description="COM_BANNERS_FIELD_TRACKIMPRESSION_DESC" + default="0" + > + - - + +
-
+
- + - + class="btn-group btn-group-yesno" + default="0" + > - + description="COM_BANNERS_FIELD_METAKEYWORDPREFIX_DESC" + />
- - - - - - - + /> + + + + + +
- +
diff --git a/administrator/components/com_banners/models/forms/client.xml b/administrator/components/com_banners/models/forms/client.xml index 0ff3a5bedb428..d568ab1aeebd6 100644 --- a/administrator/components/com_banners/models/forms/client.xml +++ b/administrator/components/com_banners/models/forms/client.xml @@ -1,38 +1,62 @@
-
- +
+ - + class="input-xxlarge input-large-text" + size="40" + required="true" + /> - + - + - + - - - - - - - - + > + + + + + + - + default="0" + class="chzn-color" + > - + > @@ -80,36 +108,45 @@
-
- - +
+ - + > - - + description="COM_BANNERS_FIELD_CLIENT_METAKEYWORDPREFIX_DESC" + />
- - - + rows="5" + cols="80" + />
diff --git a/administrator/components/com_banners/models/forms/download.xml b/administrator/components/com_banners/models/forms/download.xml index 688c8a129d1c8..fbaed4e8e8f28 100644 --- a/administrator/components/com_banners/models/forms/download.xml +++ b/administrator/components/com_banners/models/forms/download.xml @@ -1,19 +1,24 @@
- - + > - - + />
diff --git a/administrator/components/com_banners/models/forms/filter_banners.xml b/administrator/components/com_banners/models/forms/filter_banners.xml index e7f043db69cb8..5ef151967fb41 100644 --- a/administrator/components/com_banners/models/forms/filter_banners.xml +++ b/administrator/components/com_banners/models/forms/filter_banners.xml @@ -8,6 +8,7 @@ description="COM_BANNERS_BANNERS_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> + + + + JOPTION_SELECT_LANGUAGE + @@ -93,13 +98,14 @@ + diff --git a/administrator/components/com_banners/models/forms/filter_clients.xml b/administrator/components/com_banners/models/forms/filter_clients.xml index b692198ed5d9b..1552335b63704 100644 --- a/administrator/components/com_banners/models/forms/filter_clients.xml +++ b/administrator/components/com_banners/models/forms/filter_clients.xml @@ -8,6 +8,7 @@ description="COM_BANNERS_CLIENTS_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> + + @@ -55,13 +57,14 @@ + diff --git a/administrator/components/com_banners/models/forms/filter_tracks.xml b/administrator/components/com_banners/models/forms/filter_tracks.xml index 6f449bae9fb29..a3cd61f8ad89a 100644 --- a/administrator/components/com_banners/models/forms/filter_tracks.xml +++ b/administrator/components/com_banners/models/forms/filter_tracks.xml @@ -8,6 +8,7 @@ description="COM_BANNERS_TRACKS_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> + + + COM_BANNERS_TYPE1 + + + JDATE_ASC + getDbo(); + $db = $this->getDbo(); $query = $db->getQuery(true) ->delete($db->quoteName('#__banner_tracks')); @@ -374,7 +374,7 @@ protected function getCategoryName() if ($categoryId) { - $db = $this->getDbo(); + $db = $this->getDbo(); $query = $db->getQuery(true) ->select('title') ->from($db->quoteName('#__categories')) @@ -411,7 +411,7 @@ protected function getClientName() if ($clientId) { - $db = $this->getDbo(); + $db = $this->getDbo(); $query = $db->getQuery(true) ->select('name') ->from($db->quoteName('#__banner_clients')) @@ -470,21 +470,21 @@ public function getContent() { if (!isset($this->content)) { - $this->content = '"' . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_NAME')) . '","' . - str_replace('"', '""', JText::_('COM_BANNERS_HEADING_CLIENT')) . '","' . - str_replace('"', '""', JText::_('JCATEGORY')) . '","' . - str_replace('"', '""', JText::_('COM_BANNERS_HEADING_TYPE')) . '","' . - str_replace('"', '""', JText::_('COM_BANNERS_HEADING_COUNT')) . '","' . - str_replace('"', '""', JText::_('JDATE')) . '"' . "\n"; + $this->content = '"' . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_NAME')) . '","' + . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_CLIENT')) . '","' + . str_replace('"', '""', JText::_('JCATEGORY')) . '","' + . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_TYPE')) . '","' + . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_COUNT')) . '","' + . str_replace('"', '""', JText::_('JDATE')) . '"' . "\n"; foreach ($this->getItems() as $item) { - $this->content .= '"' . str_replace('"', '""', $item->name) . '","' . - str_replace('"', '""', $item->client_name) . '","' . - str_replace('"', '""', $item->category_title) . '","' . - str_replace('"', '""', ($item->track_type == 1 ? JText::_('COM_BANNERS_IMPRESSION') : JText::_('COM_BANNERS_CLICK'))) . '","' . - str_replace('"', '""', $item->count) . '","' . - str_replace('"', '""', $item->track_date) . '"' . "\n"; + $this->content .= '"' . str_replace('"', '""', $item->name) . '","' + . str_replace('"', '""', $item->client_name) . '","' + . str_replace('"', '""', $item->category_title) . '","' + . str_replace('"', '""', ($item->track_type == 1 ? JText::_('COM_BANNERS_IMPRESSION') : JText::_('COM_BANNERS_CLICK'))) . '","' + . str_replace('"', '""', $item->count) . '","' + . str_replace('"', '""', $item->track_date) . '"' . "\n"; } if ($this->getState('compressed')) diff --git a/administrator/components/com_banners/tables/banner.php b/administrator/components/com_banners/tables/banner.php index f853ec9b7619a..dfa2ab822cd05 100644 --- a/administrator/components/com_banners/tables/banner.php +++ b/administrator/components/com_banners/tables/banner.php @@ -65,11 +65,16 @@ public function check() $this->name = htmlspecialchars_decode($this->name, ENT_QUOTES); // Set alias - $this->alias = JApplicationHelper::stringURLSafe($this->alias); + if (trim($this->alias) == '') + { + $this->alias = $this->name; + } + + $this->alias = JApplicationHelper::stringURLSafe($this->alias, $this->language); - if (empty($this->alias)) + if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JApplicationHelper::stringURLSafe($this->name); + $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); } // Check the publish down date is not earlier than publish up. diff --git a/administrator/components/com_banners/tables/client.php b/administrator/components/com_banners/tables/client.php index ae0e62f1fe4b9..998e63d87855d 100644 --- a/administrator/components/com_banners/tables/client.php +++ b/administrator/components/com_banners/tables/client.php @@ -86,10 +86,10 @@ public function publish($pks = null, $state = 1, $userId = 0) // Update the publishing state for rows with the given primary keys. $this->_db->setQuery( - 'UPDATE ' . $this->_db->quoteName($this->_tbl) . - ' SET ' . $this->_db->quoteName('state') . ' = ' . (int) $state . - ' WHERE (' . $where . ')' . - $checkin + 'UPDATE ' . $this->_db->quoteName($this->_tbl) + . ' SET ' . $this->_db->quoteName('state') . ' = ' . (int) $state + . ' WHERE (' . $where . ')' + . $checkin ); try diff --git a/administrator/components/com_banners/views/banner/tmpl/edit.php b/administrator/components/com_banners/views/banner/tmpl/edit.php index 8c3b53e53d64c..4c299b4588fac 100644 --- a/administrator/components/com_banners/views/banner/tmpl/edit.php +++ b/administrator/components/com_banners/views/banner/tmpl/edit.php @@ -11,7 +11,7 @@ JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.formvalidator'); -JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('formbehavior.chosen', 'select', null, array('disable_search_threshold' => 0 )); JFactory::getDocument()->addScriptDeclaration(' Joomla.submitbutton = function(task) @@ -23,12 +23,12 @@ }; jQuery(document).ready(function ($){ $("#jform_type").on("change", function (a, params) { - + var v = typeof(params) !== "object" ? $("#jform_type").val() : params.selected; - + var img_url = $("#image, #url"); var custom = $("#custom"); - + switch (v) { case "0": // Image diff --git a/administrator/components/com_banners/views/banners/tmpl/default.php b/administrator/components/com_banners/views/banners/tmpl/default.php index f4eabd6ac8b5e..a87a929e44f0a 100644 --- a/administrator/components/com_banners/views/banners/tmpl/default.php +++ b/administrator/components/com_banners/views/banners/tmpl/default.php @@ -97,6 +97,7 @@ state, $i, 'clients.', $canChange); ?> state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'clients'); diff --git a/administrator/components/com_banners/views/clients/view.html.php b/administrator/components/com_banners/views/clients/view.html.php index 295aa03a86358..29f4b8aa4b1ae 100644 --- a/administrator/components/com_banners/views/clients/view.html.php +++ b/administrator/components/com_banners/views/clients/view.html.php @@ -128,12 +128,12 @@ protected function addToolbar() protected function getSortFields() { return array( - 'a.status' => JText::_('JSTATUS'), - 'a.name' => JText::_('COM_BANNERS_HEADING_CLIENT'), - 'contact' => JText::_('COM_BANNERS_HEADING_CONTACT'), + 'a.status' => JText::_('JSTATUS'), + 'a.name' => JText::_('COM_BANNERS_HEADING_CLIENT'), + 'contact' => JText::_('COM_BANNERS_HEADING_CONTACT'), 'client_name' => JText::_('COM_BANNERS_HEADING_CLIENT'), - 'nbanners' => JText::_('COM_BANNERS_HEADING_ACTIVE'), - 'a.id' => JText::_('JGRID_HEADING_ID') + 'nbanners' => JText::_('COM_BANNERS_HEADING_ACTIVE'), + 'a.id' => JText::_('JGRID_HEADING_ID') ); } } diff --git a/administrator/components/com_banners/views/tracks/view.html.php b/administrator/components/com_banners/views/tracks/view.html.php index f623d70ac5af1..0135cafaa5c40 100644 --- a/administrator/components/com_banners/views/tracks/view.html.php +++ b/administrator/components/com_banners/views/tracks/view.html.php @@ -104,7 +104,6 @@ protected function addToolbar() JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_TRACKS'); JHtmlSidebar::setAction('index.php?option=com_banners&view=tracks'); - } /** @@ -117,10 +116,10 @@ protected function addToolbar() protected function getSortFields() { return array( - 'b.name' => JText::_('COM_BANNERS_HEADING_NAME'), - 'cl.name' => JText::_('COM_BANNERS_HEADING_CLIENT'), + 'b.name' => JText::_('COM_BANNERS_HEADING_NAME'), + 'cl.name' => JText::_('COM_BANNERS_HEADING_CLIENT'), 'track_type' => JText::_('COM_BANNERS_HEADING_TYPE'), - 'count' => JText::_('COM_BANNERS_HEADING_COUNT'), + 'count' => JText::_('COM_BANNERS_HEADING_COUNT'), 'track_date' => JText::_('JDATE') ); } diff --git a/administrator/components/com_categories/categories.xml b/administrator/components/com_categories/categories.xml index 16b1b1d1e4786..2570edb438169 100644 --- a/administrator/components/com_categories/categories.xml +++ b/administrator/components/com_categories/categories.xml @@ -25,5 +25,3 @@ - - diff --git a/administrator/components/com_categories/helpers/categories.php b/administrator/components/com_categories/helpers/categories.php index 60c74bcbc9420..e4589f6704bbd 100644 --- a/administrator/components/com_categories/helpers/categories.php +++ b/administrator/components/com_categories/helpers/categories.php @@ -109,4 +109,50 @@ public static function getAssociations($pk, $extension = 'com_content') return $associations; } + + /** + * Check if Category ID exists otherwise assign to ROOT category. + * + * @param mixed $catid Name or ID of category. + * @param string $extension Extension that triggers this function + * + * @return int $catid Category ID. + */ + public static function validateCategoryId($catid, $extension) + { + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/tables'); + + $categoryTable = JTable::getInstance('Category'); + + $data = array(); + $data['id'] = $catid; + $data['extension'] = $extension; + + if (!$categoryTable->load($data)) + { + $catid = 0; + } + + return (int) $catid; + } + + /** + * Create new Category from within item view. + * + * @param array $data Array of data for new category. + * + * @return integer. + */ + public static function createCategory($data) + { + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/models'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/tables'); + + $categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel'); + $categoryModel->save($data); + + $catid = $categoryModel->getState('category.id'); + + return $catid; + } } diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index 9789b17e9e5c8..ad352f6d0083e 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -20,6 +20,14 @@ */ class JFormFieldCategoryEdit extends JFormFieldList { + /** + * To allow creation of new categories. + * + * @var int + * @since 3.6 + */ + protected $allowAdd; + /** * A flexible category list that respects access controls * @@ -28,6 +36,77 @@ class JFormFieldCategoryEdit extends JFormFieldList */ public $type = 'CategoryEdit'; + /** + * Method to attach a JForm object to the field. + * + * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * + * @return boolean True on success. + * + * @see JFormField::setup() + * @since 3.2 + */ + public function setup(SimpleXMLElement $element, $value, $group = null) + { + $return = parent::setup($element, $value, $group); + + if ($return) + { + $this->allowAdd = isset($this->element['allowAdd']) ? $this->element['allowAdd'] : ''; + } + + return $return; + } + + /** + * Method to get certain otherwise inaccessible properties from the form field object. + * + * @param string $name The property name for which to the the value. + * + * @return mixed The property value or null. + * + * @since 3.6 + */ + public function __get($name) + { + switch ($name) + { + case 'allowAdd': + return $this->$name; + } + + return parent::__get($name); + } + + /** + * Method to set certain otherwise inaccessible properties of the form field object. + * + * @param string $name The property name for which to the the value. + * @param mixed $value The value of the property. + * + * @return void + * + * @since 3.6 + */ + public function __set($name, $value) + { + $value = (string) $value; + + switch ($name) + { + case 'allowAdd': + $value = (string) $value; + $this->$name = ($value === 'true' || $value === $name || $value === '1'); + break; + default: + parent::__set($name, $value); + } + } + /** * Method to get a list of categories that respects access controls and can be used for * either category assignment or parent category assignment in edit screens. @@ -244,4 +323,85 @@ protected function getOptions() // Merge any additional options in the XML definition. return array_merge(parent::getOptions(), $options); } + + /** + * Method to get the field input markup for a generic list. + * Use the multiple attribute to enable multiselect. + * + * @return string The field input markup. + * + * @since 3.6 + */ + protected function getInput() + { + $html = array(); + $class = array(); + $attr = ''; + + // Initialize some field attributes. + $class[] = !empty($this->class) ? $this->class : ''; + + if ($this->allowAdd) + { + $customGroupText = JText::_('JGLOBAL_CUSTOM_CATEGORY'); + + $class[] = 'chzn-custom-value'; + $attr .= ' data-custom_group_text="' . $customGroupText . '" ' + . 'data-no_results_text="' . JText::_('JGLOBAL_ADD_CUSTOM_CATEGORY') . '" ' + . 'data-placeholder="' . JText::_('JGLOBAL_TYPE_OR_SELECT_CATEGORY') . '" '; + } + + if ($class) + { + $attr .= 'class="' . implode(' ', $class) . '"'; + } + + $attr .= !empty($this->size) ? ' size="' . $this->size . '"' : ''; + $attr .= $this->multiple ? ' multiple' : ''; + $attr .= $this->required ? ' required aria-required="true"' : ''; + $attr .= $this->autofocus ? ' autofocus' : ''; + + // To avoid user's confusion, readonly="true" should imply disabled="true". + if ((string) $this->readonly == '1' || (string) $this->readonly == 'true' || (string) $this->disabled == '1'|| (string) $this->disabled == 'true') + { + $attr .= ' disabled="disabled"'; + } + + // Initialize JavaScript field attributes. + $attr .= $this->onchange ? ' onchange="' . $this->onchange . '"' : ''; + + // Get the field options. + $options = (array) $this->getOptions(); + + // Create a read-only list (no name) with hidden input(s) to store the value(s). + if ((string) $this->readonly == '1' || (string) $this->readonly == 'true') + { + $html[] = JHtml::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id); + + // E.g. form field type tag sends $this->value as array + if ($this->multiple && is_array($this->value)) + { + if (!count($this->value)) + { + $this->value[] = ''; + } + + foreach ($this->value as $value) + { + $html[] = ''; + } + } + else + { + $html[] = ''; + } + } + else + // Create a regular list. + { + $html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); + } + + return implode($html); + } } diff --git a/administrator/components/com_categories/models/fields/modal/category.php b/administrator/components/com_categories/models/fields/modal/category.php index b0e8b5fb9d4d8..6adf6db29c436 100644 --- a/administrator/components/com_categories/models/fields/modal/category.php +++ b/administrator/components/com_categories/models/fields/modal/category.php @@ -19,7 +19,7 @@ class JFormFieldModal_Category extends JFormField /** * The form field type. * - * @var string + * @var string * @since 1.6 */ protected $type = 'Modal_Category'; @@ -27,7 +27,7 @@ class JFormFieldModal_Category extends JFormField /** * Method to get the field input markup. * - * @return string The field input markup. + * @return string The field input markup. * * @since 1.6 */ @@ -48,6 +48,9 @@ protected function getInput() // Load language JFactory::getLanguage()->load('com_categories', JPATH_ADMINISTRATOR); + // The active category id field. + $value = (int) $this->value > 0 ? (int) $this->value : ''; + // Build the script. $script = array(); @@ -58,7 +61,11 @@ protected function getInput() if ($allowEdit) { - $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' if (id == "' . (int) $this->value . '") {'; + $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' } else {'; + $script[] = ' jQuery("#' . $this->id . '_edit").addClass("hidden");'; + $script[] = ' }'; } if ($allowClear) @@ -66,7 +73,12 @@ protected function getInput() $script[] = ' jQuery("#' . $this->id . '_clear").removeClass("hidden");'; } - $script[] = ' jQuery("#modalCategory-' . $this->id . '").modal("hide");'; + $script[] = ' jQuery("#categorySelect' . $this->id . 'Modal").modal("hide");'; + $script[] = ' }'; + + // Edit button script + $script[] = ' function jEditCategory_' . $value . '(title) {'; + $script[] = ' document.getElementById("' . $this->id . '_name").value = title;'; $script[] = ' }'; // Clear button script @@ -93,21 +105,31 @@ protected function getInput() // Setup variables for display. $html = array(); - $link = 'index.php?option=com_categories&view=categories&layout=modal&tmpl=component&extension=' - . $extension . '&function=jSelectCategory_' . $this->id; + + $linkCategories = 'index.php?option=com_categories&view=categories&layout=modal&tmpl=component' + . '&extension=' . $extension + . '&function=jSelectCategory_' . $this->id; + + $linkCategory = 'index.php?option=com_categories&view=category&layout=modal&tmpl=component' + . '&task=category.edit' + . '&function=jEditCategory_' . $value; if (isset($this->element['language'])) { - $link .= '&forcedLanguage=' . $this->element['language']; + $linkCategories .= '&forcedLanguage=' . $this->element['language']; + $linkCategory .= '&forcedLanguage=' . $this->element['language']; } - if ((int) $this->value > 0) + $urlSelect = $linkCategories . '&' . JSession::getFormToken() . '=1'; + $urlEdit = $linkCategory . '&id=' . $value . '&' . JSession::getFormToken() . '=1'; + + if ($value) { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('title')) ->from($db->quoteName('#__categories')) - ->where($db->quoteName('id') . ' = ' . (int) $this->value); + ->where($db->quoteName('id') . ' = ' . (int) $value); $db->setQuery($query); try @@ -127,21 +149,16 @@ protected function getInput() $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); - // The active category id field. - if (0 == (int) $this->value) - { - $value = ''; - } - else - { - $value = (int) $this->value; - } - // The current category display field. $html[] = ''; - $html[] = ''; - $html[] = 'id . '_name" type="text" value="' . $title . '" disabled="disabled" size="35" />'; + + // Select category button + $html[] = '' . ' ' . JText::_('JSELECT') . ''; @@ -151,32 +168,21 @@ protected function getInput() { $html[] = '' - . '' . JText::_('JACTION_EDIT') + . ' id="' . $this->id . '_edit"' + . ' data-toggle="modal"' + . ' role="button"' + . ' href="#categoryEdit' . $value . 'Modal"' + . ' title="' . JHtml::tooltipText('COM_CATEGORIES_EDIT_CATEGORY') . '">' + . ' ' . JText::_('JACTION_EDIT') . ''; } - $html[] = JHtml::_( - 'bootstrap.renderModal', - 'modalCategory-' . $this->id, - array( - 'url' => $link . '&' . JSession::getFormToken() . '=1"', - 'title' => JText::_('COM_CATEGORIES_SELECT_A_CATEGORY'), - 'width' => '800px', - 'height' => '300px', - 'footer' => '' - ) - ); - // Clear category button if ($allowClear) { $html[] = '' . '' . JText::_('JCLEAR') . ''; @@ -184,13 +190,50 @@ protected function getInput() $html[] = ''; - // Note: class='required' for client side validation - $class = ''; + // Select category modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'categorySelect' . $this->id . 'Modal', + array( + 'title' => JText::_('COM_CATEGORIES_SELECT_A_CATEGORY'), + 'url' => $urlSelect, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '', + ) + ); - if ($this->required) - { - $class = ' class="required modal-value"'; - } + // Edit category modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'categoryEdit' . $value . 'Modal', + array( + 'title' => JText::_('COM_CATEGORIES_EDIT_CATEGORY'), + 'backdrop' => 'static', + 'keyboard' => false, + 'closeButton' => false, + 'url' => $urlEdit, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '' + . '' + . '', + ) + ); + + // Note: class='required' for client side validation + $class = $this->required ? ' class="required modal-value"' : ''; $html[] = ''; diff --git a/administrator/components/com_categories/models/forms/category.xml b/administrator/components/com_categories/models/forms/category.xml index b13683b368ff3..1b41ed27ac806 100644 --- a/administrator/components/com_categories/models/forms/category.xml +++ b/administrator/components/com_categories/models/forms/category.xml @@ -1,48 +1,56 @@
+ + readonly="true" + /> + readonly="true" + /> + filter="unset" + /> + description="COM_CATEGORIES_FIELD_PARENT_DESC" + /> + filter="unset" + /> + filter="unset" + /> + filter="unset" + /> + readonly="true" + /> + type="hidden" + /> + required="true" + /> + /> + size="45" + maxlength="255" + /> + size="40" + maxlength="255" + /> + hide="readmore,pagebreak" + /> + > + + /> + + filter="unset" + /> + filter="unset" + /> + description="JFIELD_ACCESS_DESC" + /> + cols="40" + /> + cols="40" + /> + /> + readonly="true" + /> + filter="unset" + /> + readonly="true" + /> + description="COM_CATEGORIES_FIELD_LANGUAGE_DESC" + > - - + /> + section="category" + /> -
+ +
+ useglobal="true" + /> + description="COM_CATEGORIES_FIELD_IMAGE_DESC" + /> - + size="20" + />
-
+ +
+ + size="30" + /> - + > diff --git a/administrator/components/com_categories/models/forms/filter_categories.xml b/administrator/components/com_categories/models/forms/filter_categories.xml index d462b0b498183..3dd53359d3527 100644 --- a/administrator/components/com_categories/models/forms/filter_categories.xml +++ b/administrator/components/com_categories/models/forms/filter_categories.xml @@ -1,6 +1,8 @@ + + + + + JOPTION_SELECT_LANGUAGE + + JOPTION_SELECT_MAX_LEVELS + + @@ -84,13 +93,14 @@ + diff --git a/administrator/components/com_categories/views/categories/tmpl/default.php b/administrator/components/com_categories/views/categories/tmpl/default.php index 3deda5ad9bcdc..4a4d02636c761 100644 --- a/administrator/components/com_categories/views/categories/tmpl/default.php +++ b/administrator/components/com_categories/views/categories/tmpl/default.php @@ -200,7 +200,7 @@ - —', $item->level - 1) ?> + $item->level)); ?> checked_out) : ?> editor, $item->checked_out_time, 'categories.', $canCheckin); ?> diff --git a/administrator/components/com_categories/views/categories/tmpl/modal.php b/administrator/components/com_categories/views/categories/tmpl/modal.php index b6e243d5c0169..b10924e8ae63c 100644 --- a/administrator/components/com_categories/views/categories/tmpl/modal.php +++ b/administrator/components/com_categories/views/categories/tmpl/modal.php @@ -20,113 +20,125 @@ // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); + JHtml::_('behavior.core'); -JHtml::_('bootstrap.tooltip'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); +// Special case for the search field tooltip. +$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter'); +JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom')); + $extension = $this->escape($this->state->get('filter.extension')); $function = $app->input->getCmd('function', 'jSelectCategory'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> -
- - $this)); ?> - items)) : ?> -
- -
- - - - - - - - - - - - - - - - - - 'icon-trash', - 0 => 'icon-unpublish', - 1 => 'icon-publish', - 2 => 'icon-archive', - ); - ?> - items as $i => $item) : ?> - language && JLanguageMultilang::isEnabled()) - { - $tag = strlen($item->language); - if ($tag == 5) - { - $lang = substr($item->language, 0, 2); - } - elseif ($tag == 6) +
+ + + + $this)); ?> + +
+ + items)) : ?> +
+ +
+ +
- - - - - - - - - -
- pagination->getListFooter(); ?> -
+ + + + + + + + + + + + + + + + 'icon-trash', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', + ); + ?> + items as $i => $item) : ?> + language && JLanguageMultilang::isEnabled()) { - $lang = substr($item->language, 0, 3); + $tag = strlen($item->language); + if ($tag == 5) + { + $lang = substr($item->language, 0, 2); + } + elseif ($tag == 6) + { + $lang = substr($item->language, 0, 3); + } + else + { + $lang = ""; + } } - else + elseif (!JLanguageMultilang::isEnabled()) { $lang = ""; } - } - elseif (!JLanguageMultilang::isEnabled()) - { - $lang = ""; - } - ?> - - - - - - - - - -
+ + + + + + + + + +
+ pagination->getListFooter(); ?> +
- - - —', $item->level - 1); ?> - - escape($item->title); ?> - - - escape($item->access_level); ?> - - language == '*') : ?> - - - language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> - - - id; ?> -
- - - - - - + ?> + + + + + + $item->level)); ?> + + escape($item->title); ?> + + + + escape($item->access_level); ?> + + + language == '*') : ?> + + + language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> + + + + id; ?> + + + + + + + + + + + + - + + diff --git a/administrator/components/com_categories/views/category/tmpl/edit.php b/administrator/components/com_categories/views/category/tmpl/edit.php index d57c7ab7fbc89..71086a67b1b98 100644 --- a/administrator/components/com_categories/views/category/tmpl/edit.php +++ b/administrator/components/com_categories/views/category/tmpl/edit.php @@ -31,6 +31,11 @@ jQuery("#permissions-sliders select").attr("disabled", "disabled"); ' . $this->form->getField("description")->save() . ' Joomla.submitform(task, document.getElementById("item-form")); + + if (task !== "category.apply") + { + window.parent.jQuery("#categoryEdit' . $this->item->id . 'Modal").modal("hide"); + } } }; '); @@ -38,9 +43,13 @@ // Fieldsets to not automatically render by /layouts/joomla/edit/params.php $this->ignore_fieldsets = array('jmetadata', 'item_associations'); +// In case of modal +$isModal = $input->get('layout') == 'modal' ? true : false; +$layout = $isModal ? 'modal' : 'edit'; +$tmpl = $isModal ? '&tmpl=component' : ''; ?> -
+ @@ -70,10 +79,12 @@ - + loadTemplate('associations'); ?> + + canDo->get('core.admin')) : ?> diff --git a/administrator/components/com_categories/views/category/tmpl/modal.php b/administrator/components/com_categories/views/category/tmpl/modal.php index 376c817c05f73..28203343ec637 100644 --- a/administrator/components/com_categories/views/category/tmpl/modal.php +++ b/administrator/components/com_categories/views/category/tmpl/modal.php @@ -9,96 +9,24 @@ defined('_JEXEC') or die; -// Include the component HTML helpers. -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); -JHtml::_('behavior.formvalidator'); -JHtml::_('behavior.keepalive'); -JHtml::_('formbehavior.chosen', 'select'); +$function = JFactory::getApplication()->input->getCmd('function', 'jEditCategory_' . (int) $this->item->id); -$app = JFactory::getApplication(); -$input = $app->input; - -$assoc = JLanguageAssociations::isEnabled(); - -JFactory::getDocument()->addScriptDeclaration(" - Joomla.submitbutton = function(task) - { - if (task == 'category.cancel' || document.formvalidator.isValid(document.getElementById('item-form'))) - { - " . $this->form->getField('description')->save() . " - - if (window.opener && (task == 'category.save' || task == 'category.cancel')) - { - window.opener.document.closeEditWindow = self; - window.opener.setTimeout('window.document.closeEditWindow.close()', 1000); - } - - Joomla.submitform(task, document.getElementById('item-form')); +// Function to update input title when changed +JFactory::getDocument()->addScriptDeclaration(' + function jEditCategoryModal() { + if (window.parent && document.formvalidator.isValid(document.getElementById("item-form"))) { + return window.parent.' . $this->escape($function) . '(document.getElementById("jform_title").value); } - }; -"); - -// Fieldsets to not automatically render by /layouts/joomla/edit/params.php -$this->ignore_fieldsets = array('jmetadata', 'item_associations'); + } +'); ?> -
- -
- - - -
- -
-
- - - + + + -
- 'general')); ?> - - -
-
- form->getLabel('description'); ?> - form->getInput('description'); ?> -
-
- -
-
- - - -
-
- -
-
- -
-
- - - - - - - canDo->get('core.admin')) : ?> - - form->getInput('rules'); ?> - - - - - - - - form->getInput('extension'); ?> - - -
- +
+ setLayout('edit'); ?> + loadTemplate(); ?>
diff --git a/administrator/components/com_checkin/checkin.xml b/administrator/components/com_checkin/checkin.xml index ac1b240d73955..c45959fbbd4d0 100644 --- a/administrator/components/com_checkin/checkin.xml +++ b/administrator/components/com_checkin/checkin.xml @@ -2,6 +2,7 @@ com_checkin Joomla! Project + April 2006 (C) 2005 - 2016 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org diff --git a/administrator/components/com_config/controller/application/save.php b/administrator/components/com_config/controller/application/save.php index 550cd04198add..a2e3ced9f61eb 100644 --- a/administrator/components/com_config/controller/application/save.php +++ b/administrator/components/com_config/controller/application/save.php @@ -35,14 +35,14 @@ public function execute() // Check for request forgeries. if (!JSession::checkToken()) { - $this->app->enqueueMessage(JText::_('JINVALID_TOKEN')); + $this->app->enqueueMessage(JText::_('JINVALID_TOKEN'), 'error'); $this->app->redirect('index.php'); } // Check if the user is authorized to do this. if (!JFactory::getUser()->authorise('core.admin')) { - $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR')); + $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $this->app->redirect('index.php'); } @@ -104,7 +104,7 @@ public function execute() } // Set the success message. - $this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS')); + $this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'), 'message'); // Set the redirect based on the task. switch ($this->options[3]) diff --git a/administrator/components/com_config/controller/component/save.php b/administrator/components/com_config/controller/component/save.php index e8ef75ecb3594..4abc6c1c2cd63 100644 --- a/administrator/components/com_config/controller/component/save.php +++ b/administrator/components/com_config/controller/component/save.php @@ -36,7 +36,7 @@ public function execute() // Check for request forgeries. if (!JSession::checkToken()) { - $this->app->enqueueMessage(JText::_('JINVALID_TOKEN')); + $this->app->enqueueMessage(JText::_('JINVALID_TOKEN'), 'error'); $this->app->redirect('index.php'); } @@ -53,7 +53,7 @@ public function execute() // Check if the user is authorised to do this. if (!$user->authorise('core.admin', $option) && !$user->authorise('core.options', $option)) { - $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR')); + $this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $this->app->redirect('index.php'); } @@ -114,7 +114,7 @@ public function execute() switch ($this->options[3]) { case 'apply': - $this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS')); + $this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'), 'message'); $this->app->redirect(JRoute::_('index.php?option=com_config&view=component&component=' . $option . $redirect, false)); break; diff --git a/administrator/components/com_config/model/field/filters.php b/administrator/components/com_config/model/field/filters.php index b0c8b02e36a2e..f3f776b392487 100644 --- a/administrator/components/com_config/model/field/filters.php +++ b/administrator/components/com_config/model/field/filters.php @@ -79,9 +79,9 @@ protected function getInput() $group_filter['filter_attributes'] = !empty($group_filter['filter_attributes']) ? $group_filter['filter_attributes'] : ''; $html[] = ' '; - $html[] = ' '; - $html[] = ' ' . str_repeat('|—', $group->level) . $group->text; - $html[] = ' '; + $html[] = ' '; + $html[] = ' ' . JLayoutHelper::render('joomla.html.treeprefix', array('level' => $group->level + 1)) . $group->text; + $html[] = ' '; $html[] = ' '; $html[] = ' -
+ > - + default="hide" + > - - + + @@ -43,221 +44,244 @@ - + default="0" + class="btn-group btn-group-yesno" + > - + description="COM_CONTACT_FIELD_PRESENTATION_DESC" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="0" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + class="btn-group btn-group-yesno" + > - - - + + + default="0" + class="btn-group btn-group-yesno" + > - + default="1" + class="btn-group btn-group-yesno" + > - + > @@ -275,156 +299,171 @@ - + class="btn-group btn-group-yesno" + > - + class="btn-group btn-group-yesno" + > - - + - + - + - + - + + description="COM_CONTACT_FIELD_SHOW_TAGS_DESC" + id="show_tags" + default="1" + class="btn-group btn-group-yesno" + > -
-
- + + - - - + default="0" + > + + + - + /> - - - - -
-
+
- - + > - + > - + description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC" + default="-1" + > @@ -476,68 +523,82 @@ - + > - + > - + default="1" + class="btn-group btn-group-yesno" + > - + class="btn-group btn-group-yesno" + >
-
- + + + default="1" + class="btn-group btn-group-yesno" + > - + description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC" + default="-1" + > @@ -547,347 +608,384 @@ - + > - + > - + default="1" + class="btn-group btn-group-yesno" + > -
-
+ > + - - + + - + > - + > - + default="1" + class="btn-group btn-group-yesno" + > - + > - + > - + > - + > - + > - + > - + > - + > - + + + + - - - - - - - - - + + + - - - - - + + + +
-
+ > - - + + - + default="1" + class="btn-group btn-group-yesno" + > - + > - - - - + > - + > -
-
+ > - - + description="JGLOBAL_SHOW_FEED_LINK_DESC" + default="1" + class="btn-group btn-group-yesno" + > + + -
-
+ > - + section="component" + />
- diff --git a/administrator/components/com_contact/models/contact.php b/administrator/components/com_contact/models/contact.php index 8b0f79dbf57ed..a53da18198dcb 100644 --- a/administrator/components/com_contact/models/contact.php +++ b/administrator/components/com_contact/models/contact.php @@ -384,6 +384,31 @@ public function save($data) { $input = JFactory::getApplication()->input; + JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); + + // Cast catid to integer for comparison + $catid = (int) $data['catid']; + + // Check if New Category exists + if ($catid > 0) + { + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_contact'); + } + + // Save New Category + if ($catid == 0) + { + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_contact'; + $table['language'] = $data['language']; + $table['published'] = 1; + + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($table); + } + // Alter the name for save as copy if ($input->get('task') == 'save2copy') { diff --git a/administrator/components/com_contact/models/fields/modal/contact.php b/administrator/components/com_contact/models/fields/modal/contact.php index e127419c43ba3..b48268086d19d 100644 --- a/administrator/components/com_contact/models/fields/modal/contact.php +++ b/administrator/components/com_contact/models/fields/modal/contact.php @@ -19,7 +19,7 @@ class JFormFieldModal_Contact extends JFormField /** * The form field type. * - * @var string + * @var string * @since 1.6 */ protected $type = 'Modal_Contact'; @@ -27,7 +27,7 @@ class JFormFieldModal_Contact extends JFormField /** * Method to get the field input markup. * - * @return string The field input markup. + * @return string The field input markup. * * @since 1.6 */ @@ -39,8 +39,8 @@ protected function getInput() // Load language JFactory::getLanguage()->load('com_contact', JPATH_ADMINISTRATOR); - // Load the javascript - JHtml::_('bootstrap.tooltip'); + // The active contact id field. + $value = (int) $this->value > 0 ? (int) $this->value : ''; // Build the script. $script = array(); @@ -52,7 +52,11 @@ protected function getInput() if ($allowEdit) { - $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' if (id == "' . (int) $this->value . '") {'; + $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' } else {'; + $script[] = ' jQuery("#' . $this->id . '_edit").addClass("hidden");'; + $script[] = ' }'; } if ($allowClear) @@ -60,7 +64,7 @@ protected function getInput() $script[] = ' jQuery("#' . $this->id . '_clear").removeClass("hidden");'; } - $script[] = ' jQuery("#modalContact' . $this->id . '").modal("hide");'; + $script[] = ' jQuery("#contactSelect' . $this->id . 'Modal").modal("hide");'; if ($this->required) { @@ -70,6 +74,11 @@ protected function getInput() $script[] = ' }'; + // Edit button script + $script[] = ' function jEditContact_' . $value . '(name) {'; + $script[] = ' document.getElementById("' . $this->id . '_name").value = name;'; + $script[] = ' }'; + // Clear button script static $scriptClear; @@ -94,21 +103,30 @@ protected function getInput() // Setup variables for display. $html = array(); - $link = 'index.php?option=com_contact&view=contacts&layout=modal&tmpl=component&function=jSelectContact_' . $this->id; + + $linkContacts = 'index.php?option=com_contact&view=contacts&layout=modal&tmpl=component' + . '&function=jSelectContact_' . $this->id; + + $linkContact = 'index.php?option=com_contact&view=contact&layout=modal&tmpl=component' + . '&task=contact.edit' + . '&function=jEditContact_' . $value; if (isset($this->element['language'])) { - $link .= '&forcedLanguage=' . $this->element['language']; + $linkContacts .= '&forcedLanguage=' . $this->element['language']; + $linkContact .= '&forcedLanguage=' . $this->element['language']; } - // Get the title of the linked chart - if ((int) $this->value > 0) + $urlSelect = $linkContacts . '&' . JSession::getFormToken() . '=1'; + $urlEdit = $linkContact . '&id=' . $value . '&' . JSession::getFormToken() . '=1'; + + if ($value) { - $db = JFactory::getDbo(); + $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('name')) ->from($db->quoteName('#__contact_details')) - ->where('id = ' . (int) $this->value); + ->where($db->quoteName('id') . ' = ' . (int) $value); $db->setQuery($query); try @@ -128,46 +146,31 @@ protected function getInput() $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); - // The active contact id field. - if (0 == (int) $this->value) - { - $value = ''; - } - else - { - $value = (int) $this->value; - } - // The current contact display field. $html[] = ''; - $html[] = ''; - $html[] = 'id . '_name" type="text" value="' . $title . '" disabled="disabled" size="35" />'; + + // Select contact button + $html[] = '' . ' ' . JText::_('JSELECT') . ''; - $html[] = JHtml::_( - 'bootstrap.renderModal', - 'modalContact' . $this->id, - array( - 'url' => $link . '&' . JSession::getFormToken() . '=1"', - 'title' => JText::_('COM_CONTACT_CHANGE_CONTACT'), - 'width' => '800px', - 'height' => '300px', - 'footer' => '' - ) - ); - - // Edit contact button. + // Edit contact button if ($allowEdit) { $html[] = '' - . '' . JText::_('JACTION_EDIT') + . ' id="' . $this->id . '_edit"' + . ' data-toggle="modal"' + . ' role="button"' + . ' href="#contactEdit' . $value . 'Modal"' + . ' title="' . JHtml::tooltipText('COM_CONTACT_EDIT_CONTACT') . '">' + . ' ' . JText::_('JACTION_EDIT') . ''; } @@ -175,8 +178,8 @@ protected function getInput() if ($allowClear) { $html[] = '' . '' . JText::_('JCLEAR') . ''; @@ -184,13 +187,50 @@ protected function getInput() $html[] = ''; - // Note: class='required' for client side validation. - $class = ''; + // Select contact modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'contactSelect' . $this->id . 'Modal', + array( + 'title' => JText::_('COM_CONTACT_CHANGE_CONTACT'), + 'url' => $urlSelect, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '', + ) + ); - if ($this->required) - { - $class = ' class="required modal-value"'; - } + // Edit contact modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'contactEdit' . $value . 'Modal', + array( + 'title' => JText::_('COM_CONTACT_EDIT_CONTACT'), + 'backdrop' => 'static', + 'keyboard' => false, + 'closeButton' => false, + 'url' => $urlEdit, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '' + . '' + . '', + ) + ); + + // Note: class='required' for client side validation. + $class = $this->required ? ' class="required modal-value"' : ''; $html[] = ''; diff --git a/administrator/components/com_contact/models/forms/contact.xml b/administrator/components/com_contact/models/forms/contact.xml index 726ef91c12b17..99de8f4a92511 100644 --- a/administrator/components/com_contact/models/forms/contact.xml +++ b/administrator/components/com_contact/models/forms/contact.xml @@ -1,17 +1,21 @@
-
- + + - - - - - - - - - + + + + - - - + /> - + - + - + - + - + - - + /> - - - - - - + > - + class="btn-group btn-group-yesno" + > - - + /> - - - - + default="0" + > + + + - - - + description="COM_CONTACT_FIELD_ICONS_TELEPHONE_DESC" + hide_none="1" + /> - - -
+
- + description="COM_CONTACT_EDIT_DETAILS" + /> - + hide_none="1" + /> - - - - - - - - - - - - - + size="30" + /> - +
- + > - - + + - - - - - + > + + + + - + description="COM_CONTACT_FIELD_PRESENTATION_DESC" + > - + class="chzn-color" + > - + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + class="chzn-color" + > - + > - + default="" + > @@ -562,93 +690,115 @@ - + class="chzn-color" + > - + - - - - - - - + /> - - - + + />
-
- - + + class="chzn-color" + > - + class="chzn-color" + > - - - + - - + description="COM_CONTACT_FIELD_EMAIL_BANNED_SUBJECT_DESC" + rows="3" + cols="30" + /> - + + class="chzn-color" + > - + class="chzn-color" + > - + description="COM_CONTACT_FIELD_CONFIG_REDIRECT_DESC" + size="30" + />
+ -
- + + + > @@ -747,24 +914,35 @@ - - + size="20" + />
- - - + filter="unset" + /> + diff --git a/administrator/components/com_contact/models/forms/filter_contacts.xml b/administrator/components/com_contact/models/forms/filter_contacts.xml index fabbbf34cec6e..7e9433bbb54e7 100755 --- a/administrator/components/com_contact/models/forms/filter_contacts.xml +++ b/administrator/components/com_contact/models/forms/filter_contacts.xml @@ -1,6 +1,8 @@
+ + + + + + JOPTION_SELECT_LANGUAGE + + JOPTION_SELECT_MAX_LEVELS + + @@ -95,20 +105,31 @@ - - + + + diff --git a/administrator/components/com_contact/tables/contact.php b/administrator/components/com_contact/tables/contact.php index 5fe794904a542..ee6c1ed30981e 100644 --- a/administrator/components/com_contact/tables/contact.php +++ b/administrator/components/com_contact/tables/contact.php @@ -228,7 +228,7 @@ public function generateAlias() $this->alias = $this->name; } - $this->alias = JApplicationHelper::stringURLSafe($this->alias); + $this->alias = JApplicationHelper::stringURLSafe($this->alias, $this->language); if (trim(str_replace('-', '', $this->alias)) == '') { diff --git a/administrator/components/com_contact/views/contact/tmpl/edit.php b/administrator/components/com_contact/views/contact/tmpl/edit.php index 75f020ca69ce1..28e330d9e9092 100644 --- a/administrator/components/com_contact/views/contact/tmpl/edit.php +++ b/administrator/components/com_contact/views/contact/tmpl/edit.php @@ -13,9 +13,12 @@ JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.formvalidator'); +JHtml::_('behavior.keepalive'); JHtml::_('formbehavior.chosen', 'select'); $app = JFactory::getApplication(); +$input = $app->input; + $assoc = JLanguageAssociations::isEnabled(); JFactory::getDocument()->addScriptDeclaration(' @@ -25,15 +28,25 @@ { ' . $this->form->getField("misc")->save() . ' Joomla.submitform(task, document.getElementById("contact-form")); + + if (task !== "contact.apply") + { + window.parent.jQuery("#contactEdit' . $this->item->id . 'Modal").modal("hide"); + } } }; '); // Fieldsets to not automatically render by /layouts/joomla/edit/params.php $this->ignore_fieldsets = array('details', 'item_associations', 'jmetadata'); + +// In case of modal +$isModal = $input->get('layout') == 'modal' ? true : false; +$layout = $isModal ? 'modal' : 'edit'; +$tmpl = $isModal ? '&tmpl=component' : ''; ?> - + @@ -93,10 +106,12 @@ - + loadTemplate('associations'); ?> + + diff --git a/administrator/components/com_contact/views/contact/tmpl/modal.php b/administrator/components/com_contact/views/contact/tmpl/modal.php index 5a6bdc6605934..6756467558efe 100644 --- a/administrator/components/com_contact/views/contact/tmpl/modal.php +++ b/administrator/components/com_contact/views/contact/tmpl/modal.php @@ -9,115 +9,24 @@ defined('_JEXEC') or die; -// Include the component HTML helpers. -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); -JHtml::_('behavior.formvalidator'); -JHtml::_('formbehavior.chosen', 'select'); - -$app = JFactory::getApplication(); - -$input = $app->input; -$assoc = JLanguageAssociations::isEnabled(); +$function = JFactory::getApplication()->input->getCmd('function', 'jEditContact_' . (int) $this->item->id); +// Function to update input title when changed JFactory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function(task) - { - if (task == "contact.cancel" || document.formvalidator.isValid(document.getElementById("contact-form"))) - { - ' . $this->form->getField('misc')->save() . ' - - if (window.opener && (task == "contact.save" || task == "contact.cancel")) - { - window.opener.document.closeEditWindow = self; - window.opener.setTimeout("window.document.closeEditWindow.close()", 1000); - } - - Joomla.submitform(task, document.getElementById("contact-form")); + function jEditContactModal() { + if (window.parent && document.formvalidator.isValid(document.getElementById("contact-form"))) { + return window.parent.' . $this->escape($function) . '(document.getElementById("jform_name").value); } - }; + } '); - -// Fieldsets to not automatically render by /layouts/joomla/edit/params.php -$this->ignore_fieldsets = array('details', 'display', 'email', 'item_associations'); ?> -
+ + + -
- - - +
+ setLayout('edit'); ?> + loadTemplate(); ?>
- -
-
- - - - - -
- 'details')); ?> - - item->id) ? JText::_('COM_CONTACT_NEW_CONTACT') : JText::_('COM_CONTACT_EDIT_CONTACT')); ?> -
-
-
-
- form->renderField('user_id'); ?> - form->renderField('image'); ?> - form->renderField('con_position'); ?> - form->renderField('email_to'); ?> - form->renderField('address'); ?> - form->renderField('suburb'); ?> - form->renderField('state'); ?> - form->renderField('postcode'); ?> - form->renderField('country'); ?> -
-
- form->renderField('telephone'); ?> - form->renderField('mobile'); ?> - form->renderField('fax'); ?> - form->renderField('webpage'); ?> - form->renderField('sortname1'); ?> - form->renderField('sortname2'); ?> - form->renderField('sortname3'); ?> -
-
-
-
- -
-
- - - -
-
- form->renderField('misc'); ?> -
-
- - - -
-
- -
-
- -
-
- - - - - - - - - -
- - - diff --git a/administrator/components/com_contact/views/contacts/tmpl/modal.php b/administrator/components/com_contact/views/contacts/tmpl/modal.php index 046cea6fed360..6279cb306c7b5 100644 --- a/administrator/components/com_contact/views/contacts/tmpl/modal.php +++ b/administrator/components/com_contact/views/contacts/tmpl/modal.php @@ -14,118 +14,128 @@ JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.core'); -JHtml::_('bootstrap.tooltip'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); +// Special case for the search field tooltip. +$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter'); +JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom')); + $app = JFactory::getApplication(); $function = $app->input->getCmd('function', 'jSelectContact'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> -
-
- $this)); ?> - items)) : ?> -
- -
- - - - - - - - - - - - - - - - - - - 'icon-trash', - 0 => 'icon-unpublish', - 1 => 'icon-publish', - 2 => 'icon-archive', - ); - ?> - items as $i => $item) : ?> - language && JLanguageMultilang::isEnabled()) - { - $tag = strlen($item->language); - if ($tag == 5) +
+ + + + $this)); ?> + + items)) : ?> +
+ +
+ +
- - - - - - - - - - - -
- pagination->getListFooter(); ?> -
+ + + + + + + + + + + + + + + + + 'icon-trash', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', + ); + ?> + items as $i => $item) : ?> + language && JLanguageMultilang::isEnabled()) { - $lang = substr($item->language, 0, 2); + $tag = strlen($item->language); + if ($tag == 5) + { + $lang = substr($item->language, 0, 2); + } + elseif ($tag == 6) + { + $lang = substr($item->language, 0, 3); + } + else { + $lang = ""; + } } - elseif ($tag == 6) + elseif (!JLanguageMultilang::isEnabled()) { - $lang = substr($item->language, 0, 3); - } - else { $lang = ""; } - } - elseif (!JLanguageMultilang::isEnabled()) - { - $lang = ""; - } - ?> - - - - - - - - - - -
+ + + + + + + + + + + +
+ pagination->getListFooter(); ?> +
- - - - escape($item->name); ?> -
- escape($item->category_title); ?> -
-
- linked_user)) : ?> - linked_user; ?> - - - escape($item->access_level); ?> - - language == '*') : ?> - - - language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> - - - id; ?> -
- - - - -
+ ?> + + + + + + + escape($item->name); ?> +
+ escape($item->category_title); ?> +
+ + + linked_user)) : ?> + linked_user; ?> + + + + escape($item->access_level); ?> + + + language == '*') : ?> + + + language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> + + + + id; ?> + + + + + + + + + + + + +
diff --git a/administrator/components/com_content/config.xml b/administrator/components/com_content/config.xml index f0df9d4372837..b58cb44866b91 100644 --- a/administrator/components/com_content/config.xml +++ b/administrator/components/com_content/config.xml @@ -59,6 +59,17 @@ + + + + + 0) + { + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_content'); + } + + // Save New Category + if ($catid == 0) + { + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_content'; + $table['language'] = $data['language']; + $table['published'] = 1; + + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($table); + } + if (isset($data['urls']) && is_array($data['urls'])) { $check = $input->post->get('jform', array(), 'array'); diff --git a/administrator/components/com_content/models/fields/modal/article.php b/administrator/components/com_content/models/fields/modal/article.php index 9d529df06c169..764a17bb9676d 100644 --- a/administrator/components/com_content/models/fields/modal/article.php +++ b/administrator/components/com_content/models/fields/modal/article.php @@ -19,7 +19,7 @@ class JFormFieldModal_Article extends JFormField /** * The form field type. * - * @var string + * @var string * @since 1.6 */ protected $type = 'Modal_Article'; @@ -27,7 +27,7 @@ class JFormFieldModal_Article extends JFormField /** * Method to get the field input markup. * - * @return string The field input markup. + * @return string The field input markup. * * @since 1.6 */ @@ -39,6 +39,9 @@ protected function getInput() // Load language JFactory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR); + // The active article id field. + $value = (int) $this->value > 0 ? (int) $this->value : ''; + // Build the script. $script = array(); @@ -49,7 +52,7 @@ protected function getInput() if ($allowEdit) { - $script[] = ' if (id == "' . (int) $this->value . '") {'; + $script[] = ' if (id == "' . $value . '") {'; $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; $script[] = ' } else {'; $script[] = ' jQuery("#' . $this->id . '_edit").addClass("hidden");'; @@ -71,6 +74,11 @@ protected function getInput() $script[] = ' }'; + // Edit button script + $script[] = ' function jEditArticle_' . $value . '(title) {'; + $script[] = ' document.getElementById("' . $this->id . '_name").value = title;'; + $script[] = ' }'; + // Clear button script static $scriptClear; @@ -95,22 +103,30 @@ protected function getInput() // Setup variables for display. $html = array(); - $linkArticles = 'index.php?option=com_content&view=articles&layout=modal&tmpl=component&function=jSelectArticle_' . $this->id; - $linkArticle = 'index.php?option=com_content&view=article&layout=modal&tmpl=component&task=article.edit'; + + $linkArticles = 'index.php?option=com_content&view=articles&layout=modal&tmpl=component' + . '&function=jSelectArticle_' . $this->id; + + $linkArticle = 'index.php?option=com_content&view=article&layout=modal&tmpl=component' + . '&task=article.edit' + . '&function=jEditArticle_' . $value; if (isset($this->element['language'])) { $linkArticles .= '&forcedLanguage=' . $this->element['language']; - $linkArticle .= '&forcedLanguage=' . $this->element['language']; + $linkArticle .= '&forcedLanguage=' . $this->element['language']; } - if ((int) $this->value > 0) + $urlSelect = $linkArticles . '&' . JSession::getFormToken() . '=1'; + $urlEdit = $linkArticle . '&id=' . $value . '&' . JSession::getFormToken() . '=1'; + + if ($value) { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('title')) ->from($db->quoteName('#__content')) - ->where($db->quoteName('id') . ' = ' . (int) $this->value); + ->where($db->quoteName('id') . ' = ' . (int) $value); $db->setQuery($query); try @@ -127,94 +143,97 @@ protected function getInput() { $title = JText::_('COM_CONTENT_SELECT_AN_ARTICLE'); } - $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); - // The active article id field. - if (0 == (int) $this->value) - { - $value = ''; - } - else - { - $value = (int) $this->value; - } - - $urlSelect = $linkArticles . '&' . JSession::getFormToken() . '=1'; - $urlEdit = $linkArticle . '&id=' . $value . '&' . JSession::getFormToken() . '=1'; + $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The current article display field. $html[] = ''; - $html[] = ''; - $html[] = '' - . ' ' - . JText::_('JSELECT') . ''; + $html[] = ''; + + // Select article button + $html[] = '' + . ' ' . JText::_('JSELECT') + . ''; // Edit article button if ($allowEdit) { - $html[] = '' - . ' ' - . JText::_('JACTION_EDIT') . ''; + $html[] = '' + . ' ' . JText::_('JACTION_EDIT') + . ''; } // Clear article button if ($allowClear) { - $html[] = ''; + $html[] = '' + . '' . JText::_('JCLEAR') + . ''; } $html[] = ''; - // The class='required' for client side validation - $class = ''; - - if ($this->required) - { - $class = ' class="required modal-value"'; - } - - $html[] = ''; - + // Select article modal $html[] = JHtml::_( 'bootstrap.renderModal', 'articleSelect' . $this->id . 'Modal', array( - 'url' => $urlSelect, 'title' => JText::_('COM_CONTENT_CHANGE_ARTICLE'), - 'width' => '800px', + 'url' => $urlSelect, 'height' => '400px', - 'modalWidth' => '80', + 'width' => '800px', 'bodyHeight' => '70', + 'modalWidth' => '80', 'footer' => '' + . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '', ) ); + // Edit article modal $html[] = JHtml::_( 'bootstrap.renderModal', - 'articleEdit' . $this->id . 'Modal', + 'articleEdit' . $value . 'Modal', array( - 'url' => $urlEdit, 'title' => JText::_('COM_CONTENT_EDIT_ARTICLE'), 'backdrop' => 'static', + 'keyboard' => false, 'closeButton' => false, - 'width' => '800px', + 'url' => $urlEdit, 'height' => '400px', - 'modalWidth' => '80', + 'width' => '800px', 'bodyHeight' => '70', + 'modalWidth' => '80', 'footer' => '' - . '' + . '', ) ); + // Note: class='required' for client side validation. + $class = $this->required ? ' class="required modal-value"' : ''; + + $html[] = ''; + return implode("\n", $html); } diff --git a/administrator/components/com_content/models/forms/article.xml b/administrator/components/com_content/models/forms/article.xml index 1ed973d17fd30..e3d3df72a2914 100644 --- a/administrator/components/com_content/models/forms/article.xml +++ b/administrator/components/com_content/models/forms/article.xml @@ -42,9 +42,13 @@ JTRASHED - @@ -201,6 +205,17 @@ + + + + + + 0 )); $this->configFieldsets = array('editorConfig'); $this->hiddenFieldsets = array('basic-limited'); @@ -25,6 +25,7 @@ $app = JFactory::getApplication(); $input = $app->input; + $assoc = JLanguageAssociations::isEnabled(); // This checks if the config options have ever been saved. If they haven't they will fall back to the original settings. @@ -68,13 +69,22 @@ jQuery("#permissions-sliders select").attr("disabled", "disabled"); ' . $this->form->getField('articletext')->save() . ' Joomla.submitform(task, document.getElementById("item-form")); + + if (task !== "article.apply") + { + window.parent.jQuery("#articleEdit' . (int) $this->item->id . 'Modal").modal("hide"); + } } }; '); +// In case of modal +$isModal = $input->get('layout') == 'modal' ? true : false; +$layout = $isModal ? 'modal' : 'edit'; +$tmpl = $isModal ? '&tmpl=component' : ''; ?> -
+ @@ -127,10 +137,12 @@ - get('layout') != 'modal') : ?> + - loadTemplate('associations'); ?> + loadTemplate('associations'); ?> + + show_options = $params->show_article_options; ?> @@ -153,7 +165,5 @@ - - -
+
diff --git a/administrator/components/com_content/views/article/tmpl/modal.php b/administrator/components/com_content/views/article/tmpl/modal.php index dc3359766f64f..2352299cea96e 100644 --- a/administrator/components/com_content/views/article/tmpl/modal.php +++ b/administrator/components/com_content/views/article/tmpl/modal.php @@ -11,16 +11,19 @@ JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); -// This code is needed for proper check out in case of modal close +$function = JFactory::getApplication()->input->getCmd('function', 'jEditArticle_' . (int) $this->item->id); + +// Function to update input title when changed JFactory::getDocument()->addScriptDeclaration(' - window.parent.jQuery(".modal").on("hidden", function () { - if (typeof window.parent.jQuery("#articleEdit' . $this->item->id . 'Modal iframe").contents().find("#closeBtn") !== "undefined") { - window.parent.jQuery("#articleEdit' . $this->item->id . 'Modal iframe").contents().find("#closeBtn").click(); + function jEditArticleModal() { + if (window.parent && document.formvalidator.isValid(document.getElementById("item-form"))) { + return window.parent.' . $this->escape($function) . '(document.getElementById("jform_title").value); } - }); + } '); ?> - + +
diff --git a/administrator/components/com_content/views/articles/tmpl/modal.php b/administrator/components/com_content/views/articles/tmpl/modal.php index 0566165782556..9365c667e98e6 100644 --- a/administrator/components/com_content/views/articles/tmpl/modal.php +++ b/administrator/components/com_content/views/articles/tmpl/modal.php @@ -18,7 +18,9 @@ require_once JPATH_ROOT . '/components/com_content/helpers/route.php'; +// Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); + JHtml::_('behavior.core'); JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); @@ -40,9 +42,9 @@
items)) : ?> -
- -
+
+ +
@@ -53,7 +55,7 @@ - - @@ -118,7 +120,7 @@ - - diff --git a/administrator/components/com_contenthistory/views/compare/tmpl/compare.php b/administrator/components/com_contenthistory/views/compare/tmpl/compare.php index 6364b4a754193..cd57201884058 100644 --- a/administrator/components/com_contenthistory/views/compare/tmpl/compare.php +++ b/administrator/components/com_contenthistory/views/compare/tmpl/compare.php @@ -62,7 +62,7 @@ $value) : ?> value == $object2->$name->value) ? 'items-equal' : 'items-not-equal'; ?> - value)): ?> + value)) : ?> - - + + $name->value = is_object($object2->$name->value) ? json_encode($object2->$name->value) : $object2->$name->value; ?> - + id . 'Modal', + 'moduleEdit' . $module->id . 'Modal', array( - 'url' => $link, 'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'), 'backdrop' => 'static', + 'keyboard' => false, 'closeButton' => false, + 'url' => $link, 'height' => '400px', 'width' => '800px', - 'modalWidth' => '80', 'bodyHeight' => '70', + 'modalWidth' => '80', 'footer' => '' - . '' + . '', ) ); ?> diff --git a/administrator/components/com_menus/views/items/tmpl/default.php b/administrator/components/com_menus/views/items/tmpl/default.php index dd6688a549ab6..1494409bbffac 100644 --- a/administrator/components/com_menus/views/items/tmpl/default.php +++ b/administrator/components/com_menus/views/items/tmpl/default.php @@ -16,18 +16,18 @@ JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); -$user = JFactory::getUser(); -$app = JFactory::getApplication(); -$userId = $user->get('id'); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -$ordering = ($listOrder == 'a.lft'); -$canOrder = $user->authorise('core.edit.state', 'com_menus'); -$saveOrder = ($listOrder == 'a.lft' && strtolower($listDirn) == 'asc'); -$menutypeid = (int) $this->state->get('menutypeid'); -$menuType = (array) $app->getUserState('com_menus.items.menutype'); +$user = JFactory::getUser(); +$app = JFactory::getApplication(); +$userId = $user->get('id'); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$ordering = ($listOrder == 'a.lft'); +$canOrder = $user->authorise('core.edit.state', 'com_menus'); +$saveOrder = ($listOrder == 'a.lft' && strtolower($listDirn) == 'asc'); +$menuTypeId = (int) $this->state->get('menutypeid'); +$menuType = (string) $app->getUserState('com_menus.items.menutype', '', 'string'); -if ($saveOrder && $menuType != '*') +if ($saveOrder && $menuType) { $saveOrderingUrl = 'index.php?option=com_menus&task=items.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'itemList', 'adminForm', strtolower($listDirn), $saveOrderingUrl, false, true); @@ -35,9 +35,14 @@ $assoc = JLanguageAssociations::isEnabled(); $colSpan = ($assoc) ? 10 : 9; + +if ($menuType == '') +{ + $colSpan--; +} ?> - +sidebar)) : ?>
sidebar; ?> @@ -58,7 +63,7 @@
+ @@ -62,7 +64,7 @@ +
escape($item->access_level); ?> + language == '*'): ?> @@ -128,7 +130,7 @@ created, JText::_('DATE_FORMAT_LC4')); ?> + id; ?>
label; ?> value as $subName => $subValue): ?> @@ -71,8 +71,8 @@ value == $newSubValue) ? 'items-equal' : 'items-not-equal'; ?>
  label; ?> value; ?> @@ -84,7 +84,7 @@ label; ?> value; ?> $name->value; ?> diff --git a/administrator/components/com_installer/models/discover.php b/administrator/components/com_installer/models/discover.php index 88d1c6ad88e09..2b02c55e4925b 100644 --- a/administrator/components/com_installer/models/discover.php +++ b/administrator/components/com_installer/models/discover.php @@ -137,6 +137,7 @@ protected function getListQuery() public function discover() { // Purge the list of discovered extensions and fetch them again. + $this->purge(); $results = JInstaller::getInstance()->discover(); // Get all templates, including discovered ones diff --git a/administrator/components/com_installer/models/install.php b/administrator/components/com_installer/models/install.php index e5bf0b642d69c..515deb1ef0589 100644 --- a/administrator/components/com_installer/models/install.php +++ b/administrator/components/com_installer/models/install.php @@ -135,6 +135,41 @@ public function install() return false; } + // Get an installer instance. + $installer = JInstaller::getInstance(); + + /* + * Check for a Joomla core package. + * To do this we need to set the source path to find the manifest (the same first step as JInstaller::install()) + * + * This must be done before the unpacked check because JInstallerHelper::detectType() returns a boolean false since the manifest + * can't be found in the expected location. + */ + if (is_array($package) && isset($package['dir']) && is_dir($package['dir'])) + { + $installer->setPath('source', $package['dir']); + + if (!$installer->findManifest()) + { + // If a manifest isn't found at the source, this may be a Joomla package; check the package directory for the Joomla manifest + if (file_exists($package['dir'] . '/administrator/manifests/files/joomla.xml')) + { + // We have a Joomla package + if (in_array($installType, array('upload', 'url'))) + { + JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']); + } + + $app->enqueueMessage( + JText::sprintf('COM_INSTALLER_UNABLE_TO_INSTALL_JOOMLA_PACKAGE', JRoute::_('index.php?option=com_joomlaupdate')), + 'warning' + ); + + return false; + } + } + } + // Was the package unpacked? if (!$package || !$package['type']) { @@ -148,9 +183,6 @@ public function install() return false; } - // Get an installer instance. - $installer = JInstaller::getInstance(); - // Install the package. if (!$installer->install($package['dir'])) { diff --git a/administrator/components/com_installer/models/languages.php b/administrator/components/com_installer/models/languages.php index f4a5f9cd9ccdb..3cd4661cfc8ca 100644 --- a/administrator/components/com_installer/models/languages.php +++ b/administrator/components/com_installer/models/languages.php @@ -301,7 +301,7 @@ public function install($lids) } // Package installed successfully. - $app->enqueueMessage(JText::sprintf('COM_INSTALLER_INSTALL_SUCCESS', $language->name)); + $app->enqueueMessage(JText::sprintf('COM_INSTALLER_INSTALL_LANGUAGE_SUCCESS', $language->name)); // Cleanup the install files in tmp folder. if (!is_file($package['packagefile'])) diff --git a/administrator/components/com_installer/views/install/tmpl/default.php b/administrator/components/com_installer/views/install/tmpl/default.php index 1ec3d949a5132..cb5b53706d9d0 100644 --- a/administrator/components/com_installer/views/install/tmpl/default.php +++ b/administrator/components/com_installer/views/install/tmpl/default.php @@ -115,7 +115,7 @@ ); ?>

-   

+

diff --git a/administrator/components/com_installer/views/languages/tmpl/default.php b/administrator/components/com_installer/views/languages/tmpl/default.php index 6693d9cf16a36..46287b8344faa 100644 --- a/administrator/components/com_installer/views/languages/tmpl/default.php +++ b/administrator/components/com_installer/views/languages/tmpl/default.php @@ -16,6 +16,18 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); +// Add spindle-wheel for language installation. +JFactory::getDocument()->addScriptDeclaration(' +jQuery(document).ready(function($) { + Joomla.loadingLayer("load"); + $("#adminForm").on("submit", function(e) { + if (document.getElementsByName("task")[0].value == "languages.install") + { + Joomla.loadingLayer("show"); + } + }); +}); +'); ?>
diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php b/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php index e4ab4a09e6919..102b92f901845 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php @@ -34,10 +34,11 @@ $("#loading") .css("top", outerDiv.position().top - $(window).scrollTop()) - .css("left", outerDiv.position().left - $(window).scrollLeft()) - .css("width", outerDiv.width()) - .css("height", outerDiv.height()) + .css("left", "0") + .css("width", "100%") + .css("height", "100%") .css("display", "none") + .css("margin-top", "-10px"); }); JS; @@ -49,10 +50,9 @@ #loading { background: rgba(255, 255, 255, .8) url('$ajaxLoaderImage') 50% 15% no-repeat; position: fixed; - opacity: 0.8; + opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 80); filter: alpha(opacity = 80); - margin: -10px -50px 0 -50px; overflow: hidden; } CSS; diff --git a/administrator/components/com_languages/helpers/html/languages.php b/administrator/components/com_languages/helpers/html/languages.php index 32f619f6ddc4e..01468df548ff7 100644 --- a/administrator/components/com_languages/helpers/html/languages.php +++ b/administrator/components/com_languages/helpers/html/languages.php @@ -47,7 +47,7 @@ public static function id($rowNum, $language) . ' type="radio"' . ' id="cb' . $rowNum . '"' . ' name="cid"' - . ' value="' . htmlspecialchars($language) . '"' + . ' value="' . htmlspecialchars($language, ENT_COMPAT, 'UTF-8') . '"' . ' onclick="Joomla.isChecked(this.checked);"' . ' title="' . ($rowNum + 1) . '"' . '/>'; diff --git a/administrator/components/com_languages/languages.xml b/administrator/components/com_languages/languages.xml index 57438e3d6185d..7cbcf5ec0662e 100644 --- a/administrator/components/com_languages/languages.xml +++ b/administrator/components/com_languages/languages.xml @@ -2,7 +2,7 @@ com_languages Joomla! Project - 2006 + April 2006 (C) 2005 - 2016 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org diff --git a/administrator/components/com_media/models/manager.php b/administrator/components/com_media/models/manager.php index 25d51b050a025..e2b9598374f0e 100644 --- a/administrator/components/com_media/models/manager.php +++ b/administrator/components/com_media/models/manager.php @@ -101,7 +101,7 @@ public function getFolderList($base = null) // so both string and integer are supported. if ($asset == 0) { - $asset = htmlspecialchars(json_encode(trim($input->get('asset', 0, 'cmd')))); + $asset = htmlspecialchars(json_encode(trim($input->get('asset', 0, 'cmd'))), ENT_COMPAT, 'UTF-8'); } $author = $input->get('author', 0, 'integer'); diff --git a/administrator/components/com_media/views/images/tmpl/default.php b/administrator/components/com_media/views/images/tmpl/default.php index 8e4c09beb2293..eef3d264c12db 100644 --- a/administrator/components/com_media/views/images/tmpl/default.php +++ b/administrator/components/com_media/views/images/tmpl/default.php @@ -56,7 +56,7 @@
-
diff --git a/administrator/components/com_menus/controllers/menus.php b/administrator/components/com_menus/controllers/menus.php index d2020e731816b..01c7d64001308 100644 --- a/administrator/components/com_menus/controllers/menus.php +++ b/administrator/components/com_menus/controllers/menus.php @@ -9,6 +9,8 @@ defined('_JEXEC') or die; +use Joomla\Utilities\ArrayHelper; + /** * The Menu List Controller * @@ -60,30 +62,44 @@ public function delete() // Check for request forgeries JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); - // Get items to remove from the request. - $cid = $this->input->get('cid', array(), 'array'); + $user = JFactory::getUser(); + $app = JFactory::getApplication(); + $cids = (array) $this->input->get('cid', array(), 'array'); - if (!is_array($cid) || count($cid) < 1) + if (count($cids) < 1) { - JError::raiseWarning(500, JText::_('COM_MENUS_NO_MENUS_SELECTED')); + $app->enqueueMessage(JText::_('COM_MENUS_NO_MENUS_SELECTED'), 'notice'); } else { - // Get the model. - $model = $this->getModel(); - - // Make sure the item ids are integers - jimport('joomla.utilities.arrayhelper'); - JArrayHelper::toInteger($cid); - - // Remove the items. - if (!$model->delete($cid)) + // Access checks. + foreach ($cids as $i => $id) { - $this->setMessage($model->getError()); + if (!$user->authorise('core.delete', 'com_menus.menu.' . (int) $id)) + { + // Prune items that you can't change. + unset($cids[$i]); + $app->enqueueMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error'); + } } - else + + if (count($cids) > 0) { - $this->setMessage(JText::plural('COM_MENUS_N_MENUS_DELETED', count($cid))); + // Get the model. + $model = $this->getModel(); + + // Make sure the item ids are integers + $cids = ArrayHelper::toInteger($cids); + + // Remove the items. + if (!$model->delete($cids)) + { + $this->setMessage($model->getError()); + } + else + { + $this->setMessage(JText::plural('COM_MENUS_N_MENUS_DELETED', count($cids))); + } } } diff --git a/administrator/components/com_menus/models/forms/filter_items.xml b/administrator/components/com_menus/models/forms/filter_items.xml index dd6d8fcc5cfe6..0127766f70cfc 100644 --- a/administrator/components/com_menus/models/forms/filter_items.xml +++ b/administrator/components/com_menus/models/forms/filter_items.xml @@ -8,7 +8,7 @@ onchange="this.form.submit();" accesstype="manage" > - + getUserState('com_menus.edit.item.menutype'); - if ($app->input->getString('menutype', false)) + if ($forcedMenuType = $app->input->get('menutype', '', 'string')) { - $menuType = $app->input->getString('menutype', 'mainmenu'); + $menuType = $forcedMenuType; + + // Set the menu type on the list view state, so we return to this menu after saving. + $app->setUserState('com_menus.items.menutype', $forcedMenuType); } $this->setState('item.menutype', $menuType); diff --git a/administrator/components/com_menus/models/items.php b/administrator/components/com_menus/models/items.php index 22ec7906ca2d1..e85a977b368d0 100644 --- a/administrator/components/com_menus/models/items.php +++ b/administrator/components/com_menus/models/items.php @@ -94,8 +94,14 @@ protected function populateState($ordering = null, $direction = null) $level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level'); $this->setState('filter.level', $level); - $menuType = $app->input->getString('menutype', $app->getUserState($this->context . '.menutype', '*')); - $menuId = 0; + $currentMenuType = $app->getUserState($this->context . '.menutype', ''); + $menuType = $app->input->getString('menutype', $currentMenuType); + + // If selected menu type different from current menu type reset pagination to 0 + if ($menuType != $currentMenuType) + { + $app->input->set('limitstart', 0); + } if ($menuType) { @@ -103,22 +109,26 @@ protected function populateState($ordering = null, $direction = null) $query = $db->getQuery(true) ->select($db->qn(array('id', 'title'))) ->from($db->qn('#__menu_types')) - ->where($db->qn('menutype') . '=' . $db->q($menuType)); + ->where($db->qn('menutype') . ' = ' . $db->q($menuType)); $menuTypeItem = $db->setQuery($query)->loadObject(); - // Check if menu type was changed and if valid agains ACL - "*" needs no validation - if (($menuType == '*' || $user->authorise('core.manage', 'com_menus.menu.' . $menuTypeItem->id))) + // Check if menu type exists. + if (!$menuTypeItem) + { + $this->setError(JText::_('COM_MENUS_ERROR_MENUTYPE_NOT_FOUND')); + } + // Check if menu type was changed and if valid agains ACL + elseif ($user->authorise('core.manage', 'com_menus.menu.' . $menuTypeItem->id)) { $app->setUserState($this->context . '.menutype', $menuType); - $app->input->set('limitstart', 0); $this->setState('menutypetitle', !empty($menuTypeItem->title) ? $menuTypeItem->title : ''); $this->setState('menutypeid', !empty($menuTypeItem->id) ? $menuTypeItem->id : ''); } // Nope, not valid else { - $menuType = ''; + $this->setError(JText::_('JERROR_ALERTNOAUTHOR')); } } else @@ -289,14 +299,14 @@ protected function getListQuery() if (!empty($parentId)) { - $query->where('p.id = ' . (int) $parentId); + $query->where('a.parent_id = ' . (int) $parentId); } // Filter the items over the menu id if set. $menuType = $this->getState('filter.menutype'); - // "*" means all - if ($menuType == '*') + // "" means all + if ($menuType == '') { // Load all menu types we have manage access $query2 = $this->getDbo()->getQuery(true) @@ -326,7 +336,7 @@ protected function getListQuery() // Empty menu type => error else { - $query->where('1!=1'); + $query->where('1 != 1'); } // Filter on the access level. diff --git a/administrator/components/com_menus/views/item/tmpl/edit_modules.php b/administrator/components/com_menus/views/item/tmpl/edit_modules.php index 00166260b6f6d..6eea8070cc495 100644 --- a/administrator/components/com_menus/views/item/tmpl/edit_modules.php +++ b/administrator/components/com_menus/views/item/tmpl/edit_modules.php @@ -86,7 +86,7 @@
id . '&tmpl=component&view=module&layout=modal'; ?> - + escape($module->title); ?> @@ -133,22 +133,26 @@
- + @@ -106,10 +111,10 @@ items as $i => $item) : $orderkey = array_search($item->id, $this->ordering[$item->parent_id]); - $canCreate = $user->authorise('core.create', 'com_menus.menu.' . $menutypeid); - $canEdit = $user->authorise('core.edit', 'com_menus.menu.' . $menutypeid); + $canCreate = $user->authorise('core.create', 'com_menus.menu.' . $menuTypeId); + $canEdit = $user->authorise('core.edit', 'com_menus.menu.' . $menuTypeId); $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id')|| $item->checked_out == 0; - $canChange = $user->authorise('core.edit.state', 'com_menus.menu.' . $menutypeid) && $canCheckin; + $canChange = $user->authorise('core.edit.state', 'com_menus.menu.' . $menuTypeId) && $canCheckin; // Get the parents of item for sorting if ($item->level > 1) @@ -140,7 +145,7 @@ } ?> - + diff --git a/administrator/components/com_menus/views/items/view.html.php b/administrator/components/com_menus/views/items/view.html.php index d883a07a7fc3b..065d587cd9550 100644 --- a/administrator/components/com_menus/views/items/view.html.php +++ b/administrator/components/com_menus/views/items/view.html.php @@ -55,15 +55,6 @@ public function display($tpl = null) $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); - $menutypeId = (int) $this->state->get('menutypeid'); - $menuType = $this->state->get('filter.menutype'); - - // Do not validate "*" because, that is our "show all" selection - if ($menuType != '*' && (!$menutypeId || !$user->authorise('core.manage', 'com_menus.menu.' . (int) $menutypeId))) - { - throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'), 403); - } - MenusHelper::addSubmenu('items'); // Check for errors. diff --git a/administrator/components/com_menus/views/menu/view.html.php b/administrator/components/com_menus/views/menu/view.html.php index dcf2bd98fd48e..f4dbeba7e3439 100644 --- a/administrator/components/com_menus/views/menu/view.html.php +++ b/administrator/components/com_menus/views/menu/view.html.php @@ -52,7 +52,7 @@ public function display($tpl = null) $this->item = $this->get('Item'); $this->state = $this->get('State'); - $this->canDo = JHelperContent::getActions('com_menus'); + $this->canDo = JHelperContent::getActions('com_menus', 'menu', $this->item->id); // Check for errors. if (count($errors = $this->get('Errors'))) diff --git a/administrator/components/com_menus/views/menus/tmpl/default.php b/administrator/components/com_menus/views/menus/tmpl/default.php index d1007d89fae49..189e54f1262ac 100644 --- a/administrator/components/com_menus/views/menus/tmpl/default.php +++ b/administrator/components/com_menus/views/menus/tmpl/default.php @@ -99,9 +99,7 @@ items as $i => $item) : - $canCreate = $user->authorise('core.create', 'com_menus'); - $canEdit = $user->authorise('core.edit', 'com_menus'); - $canChange = $user->authorise('core.edit.state', 'com_menus'); + $canEdit = $user->authorise('core.edit', 'com_menus.menu.' . (int) $item->id); $canManageItems = $user->authorise('core.manage', 'com_menus.menu.' . (int) $item->id); ?> @@ -126,16 +124,31 @@ + + @@ -78,7 +82,7 @@ - @@ -174,10 +178,11 @@ + - + diff --git a/administrator/components/com_newsfeeds/config.xml b/administrator/components/com_newsfeeds/config.xml index 7331dc0154988..3091aff7bc7e0 100644 --- a/administrator/components/com_newsfeeds/config.xml +++ b/administrator/components/com_newsfeeds/config.xml @@ -1,13 +1,15 @@ -
+ description="COM_NEWSFEEDS_FIELD_CONFIG_NEWSFEED_SETTINGS_DESC" + > @@ -30,65 +32,69 @@ + description="COM_NEWSFEEDS_FIELD_SHOW_FEED_IMAGE_DESC" + id="show_feed_image" + default="1" + class="btn-group btn-group-yesno" + > + description="COM_NEWSFEEDS_FIELD_SHOW_FEED_DESCRIPTION_DESC" + id="show_feed_description" + default="1" + class="btn-group btn-group-yesno" + > + description="COM_NEWSFEEDS_FIELD_SHOW_ITEM_DESCRIPTION_DESC" + id="show_item_description" + default="1" + class="btn-group btn-group-yesno" + > + description="COM_NEWSFEEDS_FIELD_CHARACTER_COUNT_DESC" + id="feed_character_count" + default="0" + size="6" + /> + id="feed_display_order" + > @@ -97,42 +103,47 @@ name="float_first" type="list" label="COM_NEWSFEEDS_FLOAT_LABEL" - description="COM_NEWSFEEDS_FLOAT_DESC"> - - - + description="COM_NEWSFEEDS_FLOAT_DESC" + > + + + + - - - + description="COM_NEWSFEEDS_FLOAT_DESC" + > + + + + description="COM_NEWSFEEDS_FIELD_SHOW_TAGS_DESC" + id="show_tags" + default="1" + class="btn-group btn-group-yesno" + > -
+ description="COM_NEWSFEEDS_FIELD_CONFIG_CATEGORY_SETTINGS_DESC" + > - + class="btn-group btn-group-yesno" + > + description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC" + id="show_description" + default="1" + class="btn-group btn-group-yesno" + > @@ -165,20 +179,22 @@ - - - + default="1" + class="btn-group btn-group-yesno" + > + + + - + > @@ -188,72 +204,83 @@ - + > - + > + id="show_cat_items" + default="1" + class="btn-group btn-group-yesno" + > - + class="btn-group btn-group-yesno" + > -
-
+ description="COM_NEWSFEEDS_CATEGORIES_DESC" + > - + default="1" + class="btn-group btn-group-yesno" + > - + description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC" + default="-1" + > @@ -261,116 +288,123 @@ - - + > - + > - + description="COM_NEWSFEEDS_FIELD_SHOW_CAT_ITEMS_DESC" + default="1" + class="btn-group btn-group-yesno" + > -
+ description="COM_NEWSFEEDS_FIELD_CONFIG_LIST_SETTINGS_DESC" + > - - + + + default="1" + class="btn-group btn-group-yesno" + > + id="show_headings" + default="1" + class="btn-group btn-group-yesno" + > + id="show_articles" + default="1" + class="btn-group btn-group-yesno" + > + id="show_link" + default="1" + class="btn-group btn-group-yesno" + > - + default="2" + > @@ -379,16 +413,15 @@ + > -
+ section="component" + />
diff --git a/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php b/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php index 388eae05cb690..06d4e80333f83 100644 --- a/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php +++ b/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php @@ -19,7 +19,7 @@ class JFormFieldModal_Newsfeed extends JFormField /** * The form field type. * - * @var string + * @var string * @since 1.6 */ protected $type = 'Modal_Newsfeed'; @@ -27,7 +27,7 @@ class JFormFieldModal_Newsfeed extends JFormField /** * Method to get the field input markup. * - * @return string The field input markup. + * @return string The field input markup. * * @since 1.6 */ @@ -39,8 +39,8 @@ protected function getInput() // Load language JFactory::getLanguage()->load('com_newsfeeds', JPATH_ADMINISTRATOR); - // Load the javascript - JHtml::_('bootstrap.tooltip'); + // The active newsfeed id field. + $value = (int) $this->value > 0 ? (int) $this->value : ''; // Build the script. $script = array(); @@ -52,7 +52,11 @@ protected function getInput() if ($allowEdit) { - $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' if (id == "' . (int) $this->value . '") {'; + $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' } else {'; + $script[] = ' jQuery("#' . $this->id . '_edit").addClass("hidden");'; + $script[] = ' }'; } if ($allowClear) @@ -60,7 +64,7 @@ protected function getInput() $script[] = ' jQuery("#' . $this->id . '_clear").removeClass("hidden");'; } - $script[] = ' jQuery("#modalNewsfeed' . $this->id . '").modal("hide");'; + $script[] = ' jQuery("#newsfeedSelect' . $this->id . 'Modal").modal("hide");'; if ($this->required) { @@ -70,6 +74,11 @@ protected function getInput() $script[] = ' }'; + // Edit button script + $script[] = ' function jEditNewsfeed_' . $value . '(name) {'; + $script[] = ' document.getElementById("' . $this->id . '_name").value = name;'; + $script[] = ' }'; + // Clear button script static $scriptClear; @@ -79,8 +88,8 @@ protected function getInput() $script[] = ' function jClearNewsfeed(id) {'; $script[] = ' document.getElementById(id + "_id").value = "";'; - $script[] = ' document.getElementById(id + "_name").value = "' . - htmlspecialchars(JText::_('COM_NEWSFEEDS_SELECT_A_FEED', true), ENT_COMPAT, 'UTF-8') . '";'; + $script[] = ' document.getElementById(id + "_name").value = "' + . htmlspecialchars(JText::_('COM_NEWSFEEDS_SELECT_A_FEED', true), ENT_COMPAT, 'UTF-8') . '";'; $script[] = ' jQuery("#"+id + "_clear").addClass("hidden");'; $script[] = ' if (document.getElementById(id + "_edit")) {'; $script[] = ' jQuery("#"+id + "_edit").addClass("hidden");'; @@ -94,21 +103,30 @@ protected function getInput() // Setup variables for display. $html = array(); - $link = 'index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component&function=jSelectNewsfeed_' . $this->id; + + $linkNewsfeeds = 'index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component' + . '&function=jSelectNewsfeed_' . $this->id; + + $linkNewsfeed = 'index.php?option=com_newsfeeds&view=newsfeed&layout=modal&tmpl=component' + . '&task=newsfeed.edit' + . '&function=jEditNewsfeed_' . $value; if (isset($this->element['language'])) { - $link .= '&forcedLanguage=' . $this->element['language']; + $linkNewsfeeds .= '&forcedLanguage=' . $this->element['language']; + $linkNewsfeed .= '&forcedLanguage=' . $this->element['language']; } - // Get the title of the linked chart - if ((int) $this->value > 0) + $urlSelect = $linkNewsfeeds . '&' . JSession::getFormToken() . '=1'; + $urlEdit = $linkNewsfeed . '&id=' . $value . '&' . JSession::getFormToken() . '=1'; + + if ($value) { - $db = JFactory::getDbo(); + $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('name')) ->from($db->quoteName('#__newsfeeds')) - ->where($db->quoteName('id') . ' = ' . (int) $this->value); + ->where($db->quoteName('id') . ' = ' . (int) $value); $db->setQuery($query); try @@ -125,66 +143,94 @@ protected function getInput() { $title = JText::_('COM_NEWSFEEDS_SELECT_A_FEED'); } - $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); - // The active newsfeed id field. - if (0 == (int) $this->value) - { - $value = ''; - } - else - { - $value = (int) $this->value; - } + $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The current newsfeed display field. $html[] = ''; - $html[] = ''; - - $html[] = 'id . '_name" type="text" value="' . $title . '" disabled="disabled" size="35" />'; + + // Select newsfeed button + $html[] = '' . ' ' . JText::_('JSELECT') . ''; - $html[] = JHtml::_( - 'bootstrap.renderModal', - 'modalNewsfeed' . $this->id, - array( - 'url' => $link . '&' . JSession::getFormToken() . '=1"', - 'title' => JText::_('COM_NEWSFEEDS_CHANGE_FEED_BUTTON'), - 'width' => '800px', - 'height' => '300px', - 'footer' => '' - ) - ); - // Edit newsfeed button if ($allowEdit) { - $html[] = '' . JText::_('JACTION_EDIT') . ''; + $html[] = '' + . ' ' . JText::_('JACTION_EDIT') + . ''; } // Clear newsfeed button if ($allowClear) { - $html[] = ''; + $html[] = '' + . '' . JText::_('JCLEAR') + . ''; } $html[] = ''; - // Add class='required' for client side validation - $class = ''; + // Select newsfeed modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'newsfeedSelect' . $this->id . 'Modal', + array( + 'title' => JText::_('COM_NEWSFEEDS_SELECT_A_FEED'), + 'url' => $urlSelect, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '', + ) + ); - if ($this->required) - { - $class = ' class="required modal-value"'; - } + // Edit newsfeed modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'newsfeedEdit' . $value . 'Modal', + array( + 'title' => JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED'), + 'backdrop' => 'static', + 'keyboard' => false, + 'closeButton' => false, + 'url' => $urlEdit, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '' + . '' + . '', + ) + ); + + // Add class='required' for client side validation + $class = $this->required ? ' class="required modal-value"' : ''; $html[] = ''; diff --git a/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml b/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml index 14496643ff764..60f597b38c7cb 100644 --- a/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml +++ b/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml @@ -1,6 +1,8 @@ + + + + + + JOPTION_SELECT_LANGUAGE + + JOPTION_SELECT_MAX_LEVELS + + COM_NEWSFEEDS_NUM_ARTICLES_HEADING_DESC - - + + + diff --git a/administrator/components/com_newsfeeds/models/forms/newsfeed.xml b/administrator/components/com_newsfeeds/models/forms/newsfeed.xml index 01ded7187560e..a712d04783465 100644 --- a/administrator/components/com_newsfeeds/models/forms/newsfeed.xml +++ b/administrator/components/com_newsfeeds/models/forms/newsfeed.xml @@ -1,258 +1,433 @@ +
- - + + + required="true" + /> - - - - - - - + /> + + + + + + - - + allowAdd="true" + default="" + /> - + > - - + /> - - + /> - + size="60" + required="true" + filter="url" + /> - + default="5" + size="2" + required="true" + /> - + default="3600" + size="4" + required="true" + /> - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - -
- - + size="6" + readonly="true" + filter="unset" + /> + + + + + + + + + + + + + + + +
+ + + + - - - - + + - - + + + + + + + + - - - -
-
+
+ + + + +
+
- + default="5" + size="2" + required="true" + /> - + default="3600" + size="4" + required="true" + /> - - - - + default="0" + > + + + + - + > - + > - + > - + + + /> - + > @@ -278,13 +455,15 @@ +
- + @@ -292,18 +471,27 @@ - +
- - + filter="unset" + />
diff --git a/administrator/components/com_newsfeeds/models/newsfeed.php b/administrator/components/com_newsfeeds/models/newsfeed.php index 73ab821ad55df..728a90dfe9e3b 100644 --- a/administrator/components/com_newsfeeds/models/newsfeed.php +++ b/administrator/components/com_newsfeeds/models/newsfeed.php @@ -302,6 +302,31 @@ public function save($data) { $input = JFactory::getApplication()->input; + JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); + + // Cast catid to integer for comparison + $catid = (int) $data['catid']; + + // Check if New Category exists + if ($catid > 0) + { + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_newsfeeds'); + } + + // Save New Category + if ($catid == 0) + { + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_newsfeeds'; + $table['language'] = $data['language']; + $table['published'] = 1; + + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($table); + } + // Alter the name for save as copy if ($input->get('task') == 'save2copy') { @@ -393,11 +418,11 @@ protected function prepareTable($table) $user = JFactory::getUser(); $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); - $table->alias = JApplicationHelper::stringURLSafe($table->alias); + $table->alias = JApplicationHelper::stringURLSafe($table->alias, $table->language); if (empty($table->alias)) { - $table->alias = JApplicationHelper::stringURLSafe($table->name); + $table->alias = JApplicationHelper::stringURLSafe($table->name, $table->language); } if (empty($table->id)) diff --git a/administrator/components/com_newsfeeds/newsfeeds.xml b/administrator/components/com_newsfeeds/newsfeeds.xml index a071a841fde6e..4575df016a385 100644 --- a/administrator/components/com_newsfeeds/newsfeeds.xml +++ b/administrator/components/com_newsfeeds/newsfeeds.xml @@ -62,4 +62,3 @@ - diff --git a/administrator/components/com_newsfeeds/tables/newsfeed.php b/administrator/components/com_newsfeeds/tables/newsfeed.php index 4f6fea867fb9b..a982e6a45fb43 100644 --- a/administrator/components/com_newsfeeds/tables/newsfeed.php +++ b/administrator/components/com_newsfeeds/tables/newsfeed.php @@ -56,7 +56,7 @@ public function check() $this->alias = $this->name; } - $this->alias = JApplicationHelper::stringURLSafe($this->alias); + $this->alias = JApplicationHelper::stringURLSafe($this->alias, $this->language); if (trim(str_replace('-', '', $this->alias)) == '') { diff --git a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php index 2293ac8a49088..59ac6d09167c1 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php @@ -9,31 +9,42 @@ defined('_JEXEC') or die; -// Include the HTML helpers. +// Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); -JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('formbehavior.chosen', 'select', null, array('disable_search_threshold' => 0 )); -$app = JFactory::getApplication(); +$app = JFactory::getApplication(); $input = $app->input; + $assoc = JLanguageAssociations::isEnabled(); -JFactory::getDocument()->addScriptDeclaration(" +JFactory::getDocument()->addScriptDeclaration(' Joomla.submitbutton = function(task) { - if (task == 'newsfeed.cancel' || document.formvalidator.isValid(document.getElementById('newsfeed-form'))) { - Joomla.submitform(task, document.getElementById('newsfeed-form')); + if (task == "newsfeed.cancel" || document.formvalidator.isValid(document.getElementById("newsfeed-form"))) { + Joomla.submitform(task, document.getElementById("newsfeed-form")); + + if (task !== "newsfeed.apply") + { + window.parent.jQuery("#newsfeedEdit' . $this->item->id . 'Modal").modal("hide"); + } } }; -"); +'); // Fieldsets to not automatically render by /layouts/joomla/edit/params.php $this->ignore_fieldsets = array('images', 'jbasic', 'jmetadata', 'item_associations'); +// In case of modal +$isModal = $input->get('layout') == 'modal' ? true : false; +$layout = $isModal ? 'modal' : 'edit'; +$tmpl = $isModal ? '&tmpl=component' : ''; ?> -
+ + @@ -76,18 +87,18 @@ - loadTemplate('display'); ?> - - + loadTemplate('associations'); ?> + + diff --git a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php index 7eb6fbfd3593a..f709c15db2c9c 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php @@ -9,100 +9,24 @@ defined('_JEXEC') or die; -// Include the HTML helpers. -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); -JHtml::_('behavior.formvalidator'); -JHtml::_('behavior.keepalive'); -JHtml::_('formbehavior.chosen', 'select'); +$function = JFactory::getApplication()->input->getCmd('function', 'jEditNewsfeed_' . (int) $this->item->id); -$app = JFactory::getApplication(); -$input = $app->input; -$assoc = JLanguageAssociations::isEnabled(); - -JFactory::getDocument()->addScriptDeclaration(" - Joomla.submitbutton = function(task) - { - if (task == 'newsfeed.cancel' || document.formvalidator.isValid(document.getElementById('newsfeed-form'))) - { - if (window.opener && (task == 'newsfeed.save' || task == 'newsfeed.cancel')) - { - window.opener.document.closeEditWindow = self; - window.opener.setTimeout('window.document.closeEditWindow.close()', 1000); - } - - Joomla.submitform(task, document.getElementById('newsfeed-form')); +// Function to update input title when changed +JFactory::getDocument()->addScriptDeclaration(' + function jEditNewsfeedModal() { + if (window.parent && document.formvalidator.isValid(document.getElementById("newsfeed-form"))) { + return window.parent.' . $this->escape($function) . '(document.getElementById("jform_name").value); } - }; -"); - -$this->ignore_fieldsets = array('jbasic', 'item_associations'); + } +'); ?> -
+ + + -
- - - +
+ setLayout('edit'); ?> + loadTemplate(); ?>
- -
-
- - - - -
- 'details')); ?> - - item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED') : JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED')); ?> -
-
-
- form->getControlGroup('link'); ?> - form->getControlGroup('description'); ?> -
-
-
- -
-
- - - -
-
- form->getControlGroup('images'); ?> - form->getGroup('images') as $field) : ?> - getControlGroup(); ?> - -
-
- - - -
-
- -
-
- -
-
- - - - loadTemplate('display'); ?> - - - - - - - - - -
- - - diff --git a/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php b/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php index 1ee123de45dfb..139db4d59c164 100644 --- a/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php +++ b/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php @@ -14,111 +14,121 @@ JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.core'); -JHtml::_('bootstrap.tooltip'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); +// Special case for the search field tooltip. +$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter'); +JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom')); + $app = JFactory::getApplication(); $function = $app->input->getCmd('function', 'jSelectNewsfeed'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> -
-
- $this)); ?> - items)) : ?> -
- -
- -
published, $i, $canChange, 'cb'); ?> - |—', $item->level - 1) ?> + $item->level)); ?> + checked_out) : ?> editor, $item->checked_out_time, 'items.', $canCheckin); ?> @@ -190,9 +196,9 @@ escape($item->note));?> -
- —', $item->level - 1) ?> - +
+ + escape($item->item_type); ?>
- - count_published; ?> + + + count_published; ?> + + + count_published; ?> + - - count_unpublished; ?> + + + count_unpublished; ?> + + + count_unpublished; ?> + - - count_trashed; ?> + + + count_trashed; ?> + + + count_trashed; ?> + modules[$item->menutype])) : ?> @@ -149,7 +162,7 @@
  • id . '&return=' . $return . '&tmpl=component&layout=modal'); ?> - + escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?> escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?> @@ -163,34 +176,55 @@ id . '&return=' . $return . '&tmpl=component&layout=modal'); ?> id . 'Modal', + 'moduleEdit' . $module->id . 'Modal', array( - 'url' => $link, - 'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'), - 'height' => '300px', - 'width' => '800px', - 'footer' => '' - . '' + 'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'), + 'backdrop' => 'static', + 'keyboard' => false, + 'closeButton' => false, + 'url' => $link, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '' + . '' + . '', ) ); ?> - menutype); ?> - + menutype . '&tmpl=component&layout=modal'); ?> + $link, - 'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'), - 'height' => '500px', - 'width' => '800px', - 'footer' => '' + 'title' => JText::_('COM_MENUS_ADD_MENU_MODULE'), + 'backdrop' => 'static', + 'keyboard' => false, + 'closeButton' => false, + 'url' => $link, + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '' + . '' + . '', ) ); ?> diff --git a/administrator/components/com_modules/helpers/modules.php b/administrator/components/com_modules/helpers/modules.php index a7bb33ea497e2..c572033858132 100644 --- a/administrator/components/com_modules/helpers/modules.php +++ b/administrator/components/com_modules/helpers/modules.php @@ -125,7 +125,7 @@ public static function getPositions($clientId, $editPositions = false) { if (!$position && !$editPositions) { - $options[] = JHtml::_('select.option', 'none', ':: ' . JText::_('JNONE') . ' ::'); + $options[] = JHtml::_('select.option', 'none', JText::_('COM_MODULES_NONE')); } else { diff --git a/administrator/components/com_modules/models/forms/filter_modules.xml b/administrator/components/com_modules/models/forms/filter_modules.xml index c0a5b534a0362..bf193091c0905 100644 --- a/administrator/components/com_modules/models/forms/filter_modules.xml +++ b/administrator/components/com_modules/models/forms/filter_modules.xml @@ -6,7 +6,7 @@ name="client_id" type="list" label="" - onchange="jQuery('#filter_position, #filter_module, #filter_language').val('');this.form.submit();" + onchange="jQuery('#filter_position, #filter_module, #filter_language, #filter_menuitem').val('');this.form.submit();" > @@ -44,6 +44,17 @@ > + + + + setState('item.client_id', $clientId); $this->setState('item.module', $module); diff --git a/administrator/components/com_modules/models/modules.php b/administrator/components/com_modules/models/modules.php index 0f44d2b4278eb..9be3631314073 100644 --- a/administrator/components/com_modules/models/modules.php +++ b/administrator/components/com_modules/models/modules.php @@ -48,6 +48,7 @@ public function __construct($config = array()) 'position', 'a.position', 'pages', 'name', 'e.name', + 'menuitem', ); } @@ -82,6 +83,7 @@ protected function populateState($ordering = 'a.position', $direction = 'asc') $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string')); $this->setState('filter.position', $this->getUserStateFromRequest($this->context . '.filter.position', 'filter_position', '', 'string')); $this->setState('filter.module', $this->getUserStateFromRequest($this->context . '.filter.module', 'filter_module', '', 'string')); + $this->setState('filter.menuitem', $this->getUserStateFromRequest($this->context . '.filter.menuitem', 'filter_menuitem', '', 'cmd')); $this->setState('filter.access', $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', '', 'cmd')); // If in modal layout on the frontend, state and language are always forced. @@ -136,6 +138,7 @@ protected function getStoreId($id = '') $id .= ':' . $this->getState('filter.state'); $id .= ':' . $this->getState('filter.position'); $id .= ':' . $this->getState('filter.module'); + $id .= ':' . $this->getState('filter.menuitem'); $id .= ':' . $this->getState('filter.access'); $id .= ':' . $this->getState('filter.language'); @@ -331,6 +334,44 @@ protected function getListQuery() $query->where($db->quoteName('a.module') . ' = ' . $db->quote($module)); } + // Filter by menuitem id (only for site client). + if ((int) $clientId === 0 && $menuItemId = $this->getState('filter.menuitem')) + { + // If user selected the modules not assigned to any page (menu item). + if ((int) $menuItemId === -1) + { + $query->having('MIN(' . $db->quoteName('mm.menuid') . ') IS NULL'); + } + // If user selected the modules assigned to some particlar page (menu item). + else + { + // Modules in "All" pages. + $subQuery1 = $db->getQuery(true); + $subQuery1->select('MIN(' . $db->quoteName('menuid') . ')') + ->from($db->quoteName('#__modules_menu')) + ->where($db->quoteName('moduleid') . ' = ' . $db->quoteName('a.id')); + + // Modules in "Selected" pages that have the chosen menu item id. + $subQuery2 = $db->getQuery(true); + $subQuery2->select($db->quoteName('moduleid')) + ->from($db->quoteName('#__modules_menu')) + ->where($db->quoteName('menuid') . ' = ' . (int) $menuItemId); + + // Modules in "All except selected" pages that doesn't have the chosen menu item id. + $subQuery3 = $db->getQuery(true); + $subQuery3->select($db->quoteName('moduleid')) + ->from($db->quoteName('#__modules_menu')) + ->where($db->quoteName('menuid') . ' = -' . (int) $menuItemId); + + // Filter by modules assigned to the selected menu item. + $query->where('( + (' . $subQuery1 . ') = 0 + OR ((' . $subQuery1 . ') > 0 AND ' . $db->quoteName('a.id') . ' IN (' . $subQuery2 . ')) + OR ((' . $subQuery1 . ') < 0 AND ' . $db->quoteName('a.id') . ' NOT IN (' . $subQuery3 . ')) + )'); + } + } + // Filter by search in title or note or id:. $search = $this->getState('filter.search'); if (!empty($search)) diff --git a/administrator/components/com_modules/views/module/tmpl/edit.php b/administrator/components/com_modules/views/module/tmpl/edit.php index e39011fe7297a..796be57c2a243 100644 --- a/administrator/components/com_modules/views/module/tmpl/edit.php +++ b/administrator/components/com_modules/views/module/tmpl/edit.php @@ -132,19 +132,30 @@ tmpStatus.html('" . JText::_("JTrashed") . "'); if (!tmpRow.hasClass('unpublished') || tmpRow.hasClass('')) { tmpRow.addClass('unpublished'); } } + if (document.formvalidator.isValid(document.getElementById('module-form'))) { jQuery('#title-" . $this->item->id . "', parent.document).text(updTitle); jQuery('#position-" . $this->item->id . "', parent.document).text(updPosition); jQuery('#access-" . $this->item->id . "', parent.document).html(parent.viewLevels[updAccess]); + } } - window.parent.jQuery('#module" . $this->item->id . "Modal').modal('hide'); + } + + if (task !== 'module.apply') + { + window.parent.jQuery('#module" . ((int) $this->item->id == 0 ? 'Add' : 'Edit' . (int) $this->item->id) . "Modal').modal('hide'); } } };"; JFactory::getDocument()->addScriptDeclaration($script); +// In case of modal +$isModal = JFactory::getApplication()->input->get('layout') == 'modal' ? true : false; +$layout = $isModal ? 'modal' : 'edit'; +$tmpl = $isModal ? '&tmpl=component' : ''; ?> - + + diff --git a/administrator/components/com_modules/views/module/tmpl/modal.php b/administrator/components/com_modules/views/module/tmpl/modal.php index a8a8c60b69a45..2c38f757c2719 100644 --- a/administrator/components/com_modules/views/module/tmpl/modal.php +++ b/administrator/components/com_modules/views/module/tmpl/modal.php @@ -11,6 +11,7 @@ JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); ?> + diff --git a/administrator/components/com_modules/views/modules/tmpl/default.php b/administrator/components/com_modules/views/modules/tmpl/default.php index 433acbe99e9f2..065a581e57c63 100644 --- a/administrator/components/com_modules/views/modules/tmpl/default.php +++ b/administrator/components/com_modules/views/modules/tmpl/default.php @@ -13,6 +13,7 @@ JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); +$clientId = (int) $this->state->get('client_id', 0); $user = JFactory::getUser(); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); @@ -22,6 +23,7 @@ $saveOrderingUrl = 'index.php?option=com_modules&task=modules.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'moduleList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); } +$colSpan = $clientId === 1 ? 9 : 10; ?> sidebar)) : ?> @@ -62,9 +64,11 @@
  • + pagination->getListFooter(); ?>
    name;?> pages; ?> escape($item->access_level); ?>
    - - - - - - - - - - - - - - - - 'icon-trash', - 0 => 'icon-unpublish', - 1 => 'icon-publish', - 2 => 'icon-archive', - ); - ?> - items as $i => $item) : ?> - language && JLanguageMultilang::isEnabled()) - { - $tag = strlen($item->language); - if ($tag == 5) +
    + + + + $this)); ?> + + items)) : ?> +
    + +
    + +
    - - - - - - - - - -
    - pagination->getListFooter(); ?> -
    + + + + + + + + + + + + + + + + 'icon-trash', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', + ); + ?> + items as $i => $item) : ?> + language && JLanguageMultilang::isEnabled()) { - $lang = substr($item->language, 0, 2); + $tag = strlen($item->language); + if ($tag == 5) + { + $lang = substr($item->language, 0, 2); + } + elseif ($tag == 6) + { + $lang = substr($item->language, 0, 3); + } + else { + $lang = ""; + } } - elseif ($tag == 6) + elseif (!JLanguageMultilang::isEnabled()) { - $lang = substr($item->language, 0, 3); - } - else { $lang = ""; } - } - elseif (!JLanguageMultilang::isEnabled()) - { - $lang = ""; - } - ?> - - - - - - - - - -
    + + + + + + + + + +
    + pagination->getListFooter(); ?> +
    - - - - escape($item->name); ?> -
    - escape($item->category_title); ?> -
    -
    - escape($item->access_level); ?> - - language == '*'):?> - - - language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> - - - id; ?> -
    - - - - - - + ?> + + + + + + + escape($item->name); ?> +
    + escape($item->category_title); ?> +
    + + + escape($item->access_level); ?> + + + language == '*'):?> + + + language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> + + + + id; ?> + + + + + + + + + + + + + +
    diff --git a/administrator/components/com_plugins/models/plugin.php b/administrator/components/com_plugins/models/plugin.php index e1d76df586ed9..8acc1e79d34f8 100644 --- a/administrator/components/com_plugins/models/plugin.php +++ b/administrator/components/com_plugins/models/plugin.php @@ -81,6 +81,9 @@ public function getForm($data = array(), $loadData = true) $element = JArrayHelper::getValue($data, 'element', '', 'cmd'); } + // Add the default fields directory + JForm::addFieldPath(JPATH_PLUGINS . '/' . $folder . '/' . $element . '/field'); + // These variables are used to add data from the plugin XML files. $this->setState('item.folder', $folder); $this->setState('item.element', $element); diff --git a/administrator/components/com_redirect/helpers/redirect.php b/administrator/components/com_redirect/helpers/redirect.php index 6e7297bb2b5c4..624f14aa36433 100644 --- a/administrator/components/com_redirect/helpers/redirect.php +++ b/administrator/components/com_redirect/helpers/redirect.php @@ -84,7 +84,7 @@ public static function isEnabled() $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('enabled')) - ->from('#__extensions') + ->from($db->quoteName('#__extensions')) ->where($db->quoteName('folder') . ' = ' . $db->quote('system')) ->where($db->quoteName('element') . ' = ' . $db->quote('redirect')); $db->setQuery($query); @@ -101,6 +101,35 @@ public static function isEnabled() return $result; } + /** + * Gets the redirect system plugin extension id. + * + * @return int The redirect system plugin extension id. + * + * @since 3.6.0 + */ + public static function getRedirectPluginId() + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('extension_id')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('folder') . ' = ' . $db->quote('system')) + ->where($db->quoteName('element') . ' = ' . $db->quote('redirect')); + $db->setQuery($query); + + try + { + $result = (int) $db->loadResult(); + } + catch (RuntimeException $e) + { + JError::raiseWarning(500, $e->getMessage()); + } + + return $result; + } + /** * Checks whether the option "Collect URLs" is enabled for the output message * diff --git a/administrator/components/com_redirect/views/links/tmpl/default_batch.php b/administrator/components/com_redirect/views/links/tmpl/default_batch.php index e2812e5bd42c3..4b41951d3f539 100644 --- a/administrator/components/com_redirect/views/links/tmpl/default_batch.php +++ b/administrator/components/com_redirect/views/links/tmpl/default_batch.php @@ -27,7 +27,7 @@ - level > 0): ?> - —', $item->level - 1) ?> - + $item->level)); ?> checked_out) : ?> editor, $item->checked_out_time, 'tags.', $canCheckin); ?> - + escape($item->title); ?> diff --git a/administrator/components/com_templates/models/style.php b/administrator/components/com_templates/models/style.php index 261b21fab6a1c..422f15661d0f5 100644 --- a/administrator/components/com_templates/models/style.php +++ b/administrator/components/com_templates/models/style.php @@ -268,6 +268,10 @@ public function getForm($data = array(), $loadData = true) $template = JArrayHelper::getValue($data, 'template'); } + // Add the default fields directory + $baseFolder = ($clientId) ? JPATH_ADMINISTRATOR : JPATH_SITE; + JForm::addFieldPath($baseFolder . '/templates/' . $template . '/field'); + // These variables are used to add data from the plugin XML files. $this->setState('item.client_id', $clientId); $this->setState('item.template', $template); diff --git a/administrator/components/com_templates/views/style/tmpl/edit_assignment.php b/administrator/components/com_templates/views/style/tmpl/edit_assignment.php index 6fb4ee775f974..c0daf57be4cd5 100644 --- a/administrator/components/com_templates/views/style/tmpl/edit_assignment.php +++ b/administrator/components/com_templates/views/style/tmpl/edit_assignment.php @@ -12,7 +12,7 @@ // Initiasile related data. require_once JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php'; $menuTypes = MenusHelper::getMenuLinks(); -$user = JFactory::getUser(); +$user = JFactory::getUser(); ?>
    @@ -26,19 +26,21 @@
  • - -
    title ? $type->title : $type->menutype; ?>
    + +
    title ? $type->title : $type->menutype; ?>
    + + links as $link) : ?> + + - links as $link) : ?> - -
  • +
    diff --git a/administrator/components/com_users/views/debuggroup/tmpl/default.php b/administrator/components/com_users/views/debuggroup/tmpl/default.php index 5ee78b508a75b..e0620c34b4706 100644 --- a/administrator/components/com_users/views/debuggroup/tmpl/default.php +++ b/administrator/components/com_users/views/debuggroup/tmpl/default.php @@ -66,8 +66,7 @@ escape($item->title); ?> - |—', $item->level); ?> - escape($item->name); ?> + $item->level + 1)) . $this->escape($item->name); ?> actions as $action) : ?> escape($item->title); ?> - |—', $item->level); ?> - escape($item->name); ?> + $item->level + 1)) . $this->escape($item->name); ?> actions as $action) : ?> - |—', $item->level); ?> + $item->level + 1)); ?> escape($item->title); ?> diff --git a/administrator/language/en-GB/en-GB.com_config.ini b/administrator/language/en-GB/en-GB.com_config.ini index 6c8a60c7a2d58..ae2645b7c8e46 100644 --- a/administrator/language/en-GB/en-GB.com_config.ini +++ b/administrator/language/en-GB/en-GB.com_config.ini @@ -233,7 +233,7 @@ COM_CONFIG_SENDMAIL_ERROR="Test mail could not be sent." COM_CONFIG_SENDMAIL_JS_ERROR_CONNECTION_ABORT="A connection abort has occured while fetching the JSON data." COM_CONFIG_SENDMAIL_JS_ERROR_NO_CONTENT="No content was returned." COM_CONFIG_SENDMAIL_JS_ERROR_OTHER="An error has occured while fetching the JSON data: HTTP %s status code." -COM_CONFIG_SENDMAIL_JS_ERROR_PARSE="A parse error has occured while processing the following JSON data:
    %s" +COM_CONFIG_SENDMAIL_JS_ERROR_PARSE="A parse error has occured while processing the following JSON data:
    %s" COM_CONFIG_SENDMAIL_JS_ERROR_TIMEOUT="A timeout has occured while fetching the JSON data." COM_CONFIG_SENDMAIL_METHOD_MAIL="PHP Mail" COM_CONFIG_SENDMAIL_METHOD_SENDMAIL="Sendmail" diff --git a/administrator/language/en-GB/en-GB.com_contact.ini b/administrator/language/en-GB/en-GB.com_contact.ini index 7f92c0a5d82c2..9ca44bdf4f0bb 100644 --- a/administrator/language/en-GB/en-GB.com_contact.ini +++ b/administrator/language/en-GB/en-GB.com_contact.ini @@ -20,7 +20,7 @@ COM_CONTACT_CONTACT_DISPLAY_DETAILS="Display options for the individual contact COM_CONTACT_CONTACT_SETTINGS_LABEL="Contact Options" COM_CONTACT_CONTACT_VIEW_DEFAULT_DESC="This links to the contact information for one contact." COM_CONTACT_DETAILS="Contact Information" -COM_CONTACT_EDIT_CONTACT="Contact" +COM_CONTACT_EDIT_CONTACT="Edit Contact" COM_CONTACT_EDIT_DETAILS="Edit contact information displayed on an individual page." COM_CONTACT_ERROR_UNIQUE_ALIAS="Another Contact from this category has the same alias (remember it may be a trashed item)." COM_CONTACT_ERROR_ALL_LANGUAGE_ASSOCIATED="A contact item set to All languages can't be associated. Associations have not been set." diff --git a/administrator/language/en-GB/en-GB.com_content.ini b/administrator/language/en-GB/en-GB.com_content.ini index 0609253f0b751..8492e16d0769b 100644 --- a/administrator/language/en-GB/en-GB.com_content.ini +++ b/administrator/language/en-GB/en-GB.com_content.ini @@ -64,6 +64,8 @@ COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL="Caption" COM_CONTENT_FIELD_IMAGE_OPTIONS="Image Options" COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC="Puts the article information block above or below the text or splits it into two separate blocks, one above and the other below." COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL="Position of Article Info" +COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC="Displays the 'Article Info' title on top of the article information block." +COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL="Article Info Title" COM_CONTENT_FIELD_INTRO_DESC="Image for the intro text layouts such as blogs and featured." COM_CONTENT_FIELD_INTRO_LABEL="Intro Image" COM_CONTENT_FIELD_INTROTEXT="Intro Text" diff --git a/administrator/language/en-GB/en-GB.com_finder.ini b/administrator/language/en-GB/en-GB.com_finder.ini index c1f4f6c1cc64c..79eab3daf5373 100644 --- a/administrator/language/en-GB/en-GB.com_finder.ini +++ b/administrator/language/en-GB/en-GB.com_finder.ini @@ -102,8 +102,7 @@ COM_FINDER_FILTER_BRANCH_LABEL="Search by %s" COM_FINDER_FILTER_BY="Show %s:" COM_FINDER_FILTER_CONTENT_MAP_DESC="Filter the indexed content by content map." COM_FINDER_FILTER_CONTENT_MAP_LABEL="Select the Content Map" -COM_FINDER_FILTER_EDIT_TOOLBAR_TITLE="Smart Search: Filter Edit" -COM_FINDER_FILTER_NEW_TOOLBAR_TITLE="Smart Search: Filter New" +COM_FINDER_FILTER_EDIT_TOOLBAR_TITLE="Smart Search: Edit Filter" COM_FINDER_FILTER_END_DATE_DESCRIPTION="Format YYYY-MM-DD" COM_FINDER_FILTER_END_DATE_LABEL="End Date" COM_FINDER_FILTER_FIELDSET_DETAILS="Filter Details" @@ -111,6 +110,7 @@ COM_FINDER_FILTER_FIELDSET_PARAMS="Filter Timeline" COM_FINDER_FILTER_HIDE_ALL="Collapse all" COM_FINDER_FILTER_MAP_COUNT="Map Count" COM_FINDER_FILTER_MAP_COUNT_DESCRIPTION="The number of maps included in the filter." +COM_FINDER_FILTER_NEW_TOOLBAR_TITLE="Smart Search: New Filter" COM_FINDER_FILTER_SEARCH_DESCRIPTION="Filter the list by a title." COM_FINDER_FILTER_SELECT_CONTENT_MAP="- Select Content Map -" COM_FINDER_FILTER_SELECT_ALL_LABEL="Search All" diff --git a/administrator/language/en-GB/en-GB.com_installer.ini b/administrator/language/en-GB/en-GB.com_installer.ini index b891076d81a29..14fee923c34bb 100644 --- a/administrator/language/en-GB/en-GB.com_installer.ini +++ b/administrator/language/en-GB/en-GB.com_installer.ini @@ -69,6 +69,7 @@ COM_INSTALLER_INSTALL_FROM_WEB="Install from Web" COM_INSTALLER_INSTALL_FROM_WEB_ADD_TAB="Add "Install from Web" tab" COM_INSTALLER_INSTALL_FROM_WEB_INFO="Joomla! Extensions Directory™ (JED) now available with Install from Web on this page." COM_INSTALLER_INSTALL_FROM_WEB_TOS="By selecting "_QQ_"Add Install from Web tab"_QQ_" below, you agree to the JED Terms of Service and all applicable third party license terms." +COM_INSTALLER_INSTALL_LANGUAGE_SUCCESS="Installation of the %s language was successful." COM_INSTALLER_INSTALL_SUCCESS="Installation of the %s was successful." COM_INSTALLER_INSTALL_URL="Install URL" COM_INSTALLER_INVALID_EXTENSION_UPDATE="Invalid extension update" @@ -166,9 +167,9 @@ COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTSETDESC="The PHP temporary folder is the COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTWRITEABLE="The PHP temporary folder is not writeable." COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTWRITEABLEDESC="The PHP temporary folder is not writeable by the Joomla! instance, which may cause issues when attempting to upload extensions to Joomla. If you are having issues uploading extensions, check the '%s' and set it to be writeable and see if this fixes the issue." COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZE="Small PHP maximum POST size." -COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZEDESC="The maximum POST size sets the most amount of data that can be sent via POST to the server. This includes form submissions for articles, media (images, videos) and extensions. This value is less than 8MB which may impact on uploading large extensions. This is set in the php.ini under post_max_size." +COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZEDESC="The maximum POST size sets the most amount of data that can be sent via POST to the server. This includes form submissions for articles, media (images, videos) and packages. This value is less than 8MB which may impact on uploading large packages. This is set in the php.ini under post_max_size." COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZE="Maximum PHP file upload size is too small: This is set in php.ini in both upload_max_filesize and post_max_size settings of your PHP settings (located in php.ini and/or .htaccess file)." -COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZEDESC="The maximum file size for uploads is set to less than 8MB which may impact on uploading large extensions." +COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZEDESC="The maximum file size for uploads is set to less than 8MB which may impact on uploading large packages." COM_INSTALLER_MSG_WARNINGS_UPDATE_NOTICE="Before updating ensure that the update is compatible with your Joomla! installation." COM_INSTALLER_MSG_WARNINGS_UPLOADBIGGERTHANPOST="PHP Upload Size bigger than POST size." COM_INSTALLER_MSG_WARNINGS_UPLOADBIGGERTHANPOSTDESC="The value of the upload_max_filesize in the php.ini file is greater than the post_max_size variable. The post_max_size variable will take precedence and block requests larger than it. This is generally a server misconfiguration when trying to increase upload sizes. Please increase the upload_max_filesize to at least match the post_max_size variable or vice versa." @@ -235,6 +236,7 @@ COM_INSTALLER_TYPE_TYPE_PACKAGE="package" COM_INSTALLER_TYPE_TYPE_PLUGIN="plugin" COM_INSTALLER_TYPE_TYPE_TEMPLATE="template" COM_INSTALLER_UNABLE_TO_FIND_INSTALL_PACKAGE="Unable to find install package" +COM_INSTALLER_UNABLE_TO_INSTALL_JOOMLA_PACKAGE="The Joomla package cannot be installed through the Extension Manager. Please use the Joomla! Update component to update Joomla." COM_INSTALLER_UNINSTALL_ERROR="Error uninstalling %s." COM_INSTALLER_UNINSTALL_LANGUAGE="A language should always have been installed as a package.
    To uninstall a language, filter type by package and uninstall the package." COM_INSTALLER_UNINSTALL_SUCCESS="Uninstalling the %s was successful." diff --git a/administrator/language/en-GB/en-GB.com_menus.ini b/administrator/language/en-GB/en-GB.com_menus.ini index f241d10363b6d..13b1e3d7365eb 100644 --- a/administrator/language/en-GB/en-GB.com_menus.ini +++ b/administrator/language/en-GB/en-GB.com_menus.ini @@ -4,7 +4,7 @@ ; Note : All ini files need to be saved as UTF-8 COM_MENUS="Menus" -COM_MENUS_ADD_MENU_MODULE="Add a module for this menu." +COM_MENUS_ADD_MENU_MODULE="Add a module for this menu" COM_MENUS_ADVANCED_FIELDSET_LABEL="Advanced" COM_MENUS_BASIC_FIELDSET_LABEL="Options" COM_MENUS_BATCH_MENU_ITEM_CANNOT_CREATE="You are not allowed to create new menu items." @@ -17,6 +17,7 @@ COM_MENUS_EDIT_MODULE_SETTINGS="Edit module settings" COM_MENUS_ERROR_ALL_LANGUAGE_ASSOCIATED="A menu item set to All languages can't be associated. Associations have not been set." COM_MENUS_ERROR_ALREADY_HOME="Menu item already set to home." COM_MENUS_ERROR_MENUTYPE="Please change the Menu type. The terms 'menu' and 'main' are reserved for Backend usage." +COM_MENUS_ERROR_MENUTYPE_NOT_FOUND="The Menu type doesn't exist." COM_MENUS_ERROR_ONE_HOME="Only one menu item can be a home link for each language." COM_MENUS_EXTENSION_PUBLISHED_DISABLED="Component disabled and menu item published." COM_MENUS_EXTENSION_PUBLISHED_ENABLED="Component enabled and menu item published." diff --git a/administrator/language/en-GB/en-GB.com_modules.ini b/administrator/language/en-GB/en-GB.com_modules.ini index 43ed668a74796..65db2f351cf82 100644 --- a/administrator/language/en-GB/en-GB.com_modules.ini +++ b/administrator/language/en-GB/en-GB.com_modules.ini @@ -116,6 +116,7 @@ COM_MODULES_N_MODULES_DUPLICATED="%d modules successfully duplicated." COM_MODULES_N_MODULES_DUPLICATED_1="%d module successfully duplicated." COM_MODULES_NO_ITEM_SELECTED="No modules selected." COM_MODULES_NODESCRIPTION="No description available." +COM_MODULES_NONE=":: None ::" COM_MODULES_OPTION_MENU_ALL="On all pages" COM_MODULES_OPTION_MENU_EXCLUDE="On all pages except those selected" COM_MODULES_OPTION_MENU_INCLUDE="Only on the pages selected" @@ -125,6 +126,7 @@ COM_MODULES_OPTION_POSITION_TEMPLATE_DEFINED="Template" COM_MODULES_OPTION_POSITION_USER_DEFINED="User" COM_MODULES_OPTION_SELECT_CLIENT="- Select Type -" COM_MODULES_OPTION_SELECT_MODULE="- Select Type -" +COM_MODULES_OPTION_SELECT_PAGE="- Select Page -" COM_MODULES_OPTION_SELECT_POSITION="- Select Position -" COM_MODULES_OPTION_SELECT_TYPE="- Select type -" COM_MODULES_POSITION_ANALYTICS="Analytics" diff --git a/administrator/language/en-GB/en-GB.com_redirect.ini b/administrator/language/en-GB/en-GB.com_redirect.ini index 8d115d14ec160..92141fc73a9c3 100644 --- a/administrator/language/en-GB/en-GB.com_redirect.ini +++ b/administrator/language/en-GB/en-GB.com_redirect.ini @@ -78,8 +78,7 @@ COM_REDIRECT_N_LINKS_UPDATED_1="1 link has been updated." COM_REDIRECT_NEW_LINK="New Link" COM_REDIRECT_NO_ITEM_ADDED="No links added." COM_REDIRECT_NO_ITEM_SELECTED="No links selected." -; Change 'System%20-%20Redirect' to the value in plg_system_redirect.sys.ini for your language -COM_REDIRECT_PLUGIN_DISABLED="The Redirect Plugin is disabled. Enable it in the Plugin Manager." +COM_REDIRECT_PLUGIN_DISABLED="The Redirect System Plugin is disabled. It needs to be enabled for this component to work." COM_REDIRECT_PLUGIN_ENABLED="The Redirect Plugin is enabled." COM_REDIRECT_REDIRECTED_ON="Redirected on: %s." COM_REDIRECT_SAVE_SUCCESS="Link successfully saved." diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index 7ce90b93c256d..a6335f740df2c 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -188,7 +188,7 @@ JFIELD_BASIS_LOGOUT_DESCRIPTION_DESC="Text for logout page." JFIELD_BASIS_LOGOUT_DESCRIPTION_LABEL="Logout Description Text" JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_DESC="Show or hide logout description." JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_LABEL="Logout Text" -JFIELD_CATEGORY_DESC="The category that this item is assigned to." +JFIELD_CATEGORY_DESC="The category that this item is assigned to. You may select an existing category or enter a new category by typing the name in the field and pressing enter." JFIELD_ENABLED_DESC="The enabled status of this item." JFIELD_KEY_REFERENCE_DESC="Used to store information referring to an external resource." JFIELD_KEY_REFERENCE_LABEL="Key Reference" @@ -243,6 +243,7 @@ JFIELD_XREFERENCE_LABEL="External Reference" JGLOBAL_ACROSS="Across" JGLOBAL_ACTION_PERMISSIONS_LABEL="Permissions" JGLOBAL_ACTION_PERMISSIONS_DESCRIPTION="Set the action permissions for this asset" +JGLOBAL_ADD_CUSTOM_CATEGORY="Add new Category" JGLOBAL_ALL_ARTICLE="Max Levels Articles" JGLOBAL_ALL_LIST="Max Levels as List" JGLOBAL_ALLOW_COMMENTS_DESC="If Yes, viewers will be able to add and view comments for the article." @@ -303,6 +304,7 @@ JGLOBAL_CONFIRM_DELETE="Are you sure you want to delete? Confirming will permane JGLOBAL_COPY="(copy)" JGLOBAL_CREATED="Created" JGLOBAL_CREATED_DATE="Created Date" +JGLOBAL_CUSTOM_CATEGORY="New Categories" JGLOBAL_DATE_FORMAT_DESC="Optional format string for showing the date. For example, D M Y for day month year or you can use d-m-y for a short version eg. 28-12-16. See http://www.php.net/manual/en/function.date.php. If left blank, it uses DATE_FORMAT_LC1 from your language file." JGLOBAL_DATE_FORMAT_LABEL="Date Format" JGLOBAL_DESCRIPTION="Description" @@ -559,6 +561,7 @@ JGLOBAL_TOGGLE_FEATURED="Toggle featured status." JGLOBAL_TOP="Top" JGLOBAL_TPL_CPANEL_LINK_TEXT="Return to Control Panel" JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options" +JGLOBAL_TYPE_OR_SELECT_CATEGORY="Type or Select a Category" JGLOBAL_USE_GLOBAL="Use Global" JGLOBAL_USERNAME="Username" JGLOBAL_VALIDATION_FORM_FAILED="Invalid form" diff --git a/administrator/language/en-GB/en-GB.lib_joomla.ini b/administrator/language/en-GB/en-GB.lib_joomla.ini index 02aa03f027ab4..86506f1f847a6 100644 --- a/administrator/language/en-GB/en-GB.lib_joomla.ini +++ b/administrator/language/en-GB/en-GB.lib_joomla.ini @@ -258,7 +258,7 @@ JLIB_FILESYSTEM_UNABLE_TO_LOAD_ARCHIVE="Unable to load archive." JLIB_FILESYSTEM_ERROR_JFILE_FIND_COPY="JFile: :copy: Can't find or read file: $%s" JLIB_FILESYSTEM_ERROR_JFILE_STREAMS="JFile: :copy(%1$s, %2$s): %3$s" JLIB_FILESYSTEM_ERROR_COPY_FAILED="Copy failed." -JLIB_FILESYSTEM_ERROR_COPY_FAILED_ERR01="Copy failed: %1s to %2s" +JLIB_FILESYSTEM_ERROR_COPY_FAILED_ERR01="Copy failed: %1$s to %2$s" JLIB_FILESYSTEM_DELETE_FAILED="Failed deleting %s" JLIB_FILESYSTEM_CANNOT_FIND_SOURCE_FILE="Can't find source file." JLIB_FILESYSTEM_ERROR_JFILE_MOVE_STREAMS="JFile: :move: %s" @@ -269,7 +269,7 @@ JLIB_FILESYSTEM_ERROR_UPLOAD="JFile: :upload: %s" JLIB_FILESYSTEM_ERROR_WARNFS_ERR01="Warning: Failed to change file permissions!" JLIB_FILESYSTEM_ERROR_WARNFS_ERR02="Warning: Failed to move file!" JLIB_FILESYSTEM_ERROR_WARNFS_ERR03="Warning: File %s not uploaded for security reasons!" -JLIB_FILESYSTEM_ERROR_WARNFS_ERR04="Warning: Failed to move file: %1s to %2s" +JLIB_FILESYSTEM_ERROR_WARNFS_ERR04="Warning: Failed to move file: %1$s to %2$s" JLIB_FILESYSTEM_ERROR_FIND_SOURCE_FOLDER="Can't find source folder." JLIB_FILESYSTEM_ERROR_FOLDER_EXISTS="Folder already exists." JLIB_FILESYSTEM_ERROR_FOLDER_CREATE="Unable to create target folder." diff --git a/administrator/language/en-GB/en-GB.xml b/administrator/language/en-GB/en-GB.xml index c28e318aa845f..6036b1457acf8 100644 --- a/administrator/language/en-GB/en-GB.xml +++ b/administrator/language/en-GB/en-GB.xml @@ -2,7 +2,7 @@ English (en-GB) 3.6.0 - April 2016 + May 2016 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index 1a9f91cbbca5a..7855aee4f568b 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -3,7 +3,7 @@ English (United Kingdom) en-GB 3.6.0 - April 2016 + May 2016 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index cdcc742530805..aae4a486ee872 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,7 +6,7 @@ www.joomla.org (C) 2005 - 2016 Open Source Matters. All rights reserved GNU General Public License version 2 or later; see LICENSE.txt - 3.6.0-dev + 3.6.0-alpha2-dev May 2016 FILES_JOOMLA_XML_DESCRIPTION diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml index b5fdec094cf3e..bfac7ce08563c 100644 --- a/administrator/manifests/packages/pkg_en-GB.xml +++ b/administrator/manifests/packages/pkg_en-GB.xml @@ -3,7 +3,7 @@ English (en-GB) Language Pack en-GB 3.6.0.1 - 2016-05-01 + May 2016 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/modules/mod_feed/mod_feed.php b/administrator/modules/mod_feed/mod_feed.php index ec3c262972ba0..274246033913f 100644 --- a/administrator/modules/mod_feed/mod_feed.php +++ b/administrator/modules/mod_feed/mod_feed.php @@ -26,6 +26,6 @@ } $feed = ModFeedHelper::getFeed($params); -$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx')); +$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_feed', $params->get('layout', 'default')); diff --git a/administrator/modules/mod_menu/menu.php b/administrator/modules/mod_menu/menu.php index 56f0a7d5efd82..0f4ce184550d1 100644 --- a/administrator/modules/mod_menu/menu.php +++ b/administrator/modules/mod_menu/menu.php @@ -49,12 +49,12 @@ public function __construct() /** * Method to add a child * - * @param JMenuNode &$node The node to process + * @param JMenuNode $node The node to process * @param boolean $setCurrent True to set as current working node * * @return void */ - public function addChild(JMenuNode &$node, $setCurrent = false) + public function addChild(JMenuNode $node, $setCurrent = false) { $this->_current->addChild($node); diff --git a/administrator/modules/mod_menu/tmpl/default_enabled.php b/administrator/modules/mod_menu/tmpl/default_enabled.php index 766ab65a7573d..1ed1c32e73b23 100644 --- a/administrator/modules/mod_menu/tmpl/default_enabled.php +++ b/administrator/modules/mod_menu/tmpl/default_enabled.php @@ -137,8 +137,7 @@ $menu->addSeparator(); - $menu->addChild(new JMenuNode(JText::_('MOD_MENU_MENUS_ALL_ITEMS'), 'index.php?option=com_menus&view=items&menutype=*', 'class:menumgr'), $createMenu); - $menu->getParent(); + $menu->addChild(new JMenuNode(JText::_('MOD_MENU_MENUS_ALL_ITEMS'), 'index.php?option=com_menus&view=items&menutype=', 'class:allmenu')); $menu->addSeparator(); // Menu Types diff --git a/administrator/modules/mod_multilangstatus/mod_multilangstatus.xml b/administrator/modules/mod_multilangstatus/mod_multilangstatus.xml index c6e600b32f694..983040b12745a 100644 --- a/administrator/modules/mod_multilangstatus/mod_multilangstatus.xml +++ b/administrator/modules/mod_multilangstatus/mod_multilangstatus.xml @@ -9,6 +9,7 @@ www.joomla.org 3.0.0 MOD_MULTILANGSTATUS_XML_DESCRIPTION + mod_multilangstatus.php tmpl @@ -19,30 +20,37 @@ language/en-GB/en-GB.mod_multilangstatus.ini language/en-GB/en-GB.mod_multilangstatus.sys.ini + + + +
    + + description="JFIELD_ALT_MODULE_LAYOUT_DESC" + /> + description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" + /> - + description="COM_MODULES_FIELD_CACHING_DESC" + default="0" + > +
    diff --git a/administrator/modules/mod_multilangstatus/tmpl/default.php b/administrator/modules/mod_multilangstatus/tmpl/default.php index 2a7bc117b8ef7..d70114267c19e 100644 --- a/administrator/modules/mod_multilangstatus/tmpl/default.php +++ b/administrator/modules/mod_multilangstatus/tmpl/default.php @@ -14,17 +14,20 @@ // Use javascript to remove the modal added below from the current div and add it to the end of html body tag. JFactory::getDocument()->addScriptDeclaration(" -jQuery(document).ready(function($) { - var multilangueModal = $('#multiLangModal').clone(); - $('#multiLangModal').remove(); - $('body').append(multilangueModal); -});"); - -$link = JRoute::_('index.php?option=com_languages&view=multilangstatus&tmpl=component'); -$footer = ''; + jQuery(document).ready(function($) { + var multilangueModal = $('#multiLangModal').clone(); + $('#multiLangModal').remove(); + $('body').append(multilangueModal); + }); +"); ?> + @@ -33,13 +36,13 @@ 'bootstrap.renderModal', 'multiLangModal', array( - 'title' => JText::_('MOD_MULTILANGSTATUS'), - 'backdrop' => 'static', - 'keyboard' => true, - 'closeButton' => true, - 'footer' => $footer, - 'url' => $link, - 'height' => '300px', - 'width' => '500px' - ) - ); + 'title' => JText::_('MOD_MULTILANGSTATUS'), + 'url' => JRoute::_('index.php?option=com_languages&view=multilangstatus&tmpl=component'), + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => '70', + 'modalWidth' => '80', + 'footer' => '', + ) +); diff --git a/administrator/modules/mod_stats_admin/mod_stats_admin.php b/administrator/modules/mod_stats_admin/mod_stats_admin.php index 26c542b93888c..20624106c09cc 100644 --- a/administrator/modules/mod_stats_admin/mod_stats_admin.php +++ b/administrator/modules/mod_stats_admin/mod_stats_admin.php @@ -15,6 +15,6 @@ $serverinfo = $params->get('serverinfo'); $siteinfo = $params->get('siteinfo'); $list = ModStatsHelper::getStats($params); -$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx')); +$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_stats_admin', $params->get('layout', 'default')); diff --git a/administrator/modules/mod_status/tmpl/default.php b/administrator/modules/mod_status/tmpl/default.php index 4385f1757f454..bf7cdfb3e619e 100644 --- a/administrator/modules/mod_status/tmpl/default.php +++ b/administrator/modules/mod_status/tmpl/default.php @@ -16,8 +16,12 @@ // Print the Preview link to Main site. if ($params->get('show_viewsite', 1)) { + // Gets the FrontEnd Main page Uri + $frontEndUri = JUri::getInstance(JUri::root()); + $frontEndUri->setScheme(((int) JFactory::getApplication()->get('force_ssl', 0) === 2) ? 'https' : 'http'); + $output[] = '' diff --git a/administrator/modules/mod_version/tmpl/default.php b/administrator/modules/mod_version/tmpl/default.php index 00719a2b48247..f854a8fb161cc 100644 --- a/administrator/modules/mod_version/tmpl/default.php +++ b/administrator/modules/mod_version/tmpl/default.php @@ -10,5 +10,5 @@ defined('_JEXEC') or die; ?> -

    +

    diff --git a/administrator/templates/hathor/css/template_rtl.css b/administrator/templates/hathor/css/template_rtl.css index c63a3a9dd02ba..bbe70488be562 100644 --- a/administrator/templates/hathor/css/template_rtl.css +++ b/administrator/templates/hathor/css/template_rtl.css @@ -1300,4 +1300,7 @@ div.toggle-editor { } div.toggle-editor { margin-top: 14px; +} +.modal-footer button { + float: left; } \ No newline at end of file diff --git a/administrator/templates/hathor/html/com_installer/install/default_form.php b/administrator/templates/hathor/html/com_installer/install/default_form.php index 86ae4b184b6ba..2772f946452f1 100644 --- a/administrator/templates/hathor/html/com_installer/install/default_form.php +++ b/administrator/templates/hathor/html/com_installer/install/default_form.php @@ -82,7 +82,7 @@ showJedAndWebInstaller && !$this->showMessage) : ?>
    ">× -

      

    +

     

    diff --git a/administrator/templates/hathor/html/com_installer/languages/default.php b/administrator/templates/hathor/html/com_installer/languages/default.php index 09e92596e4447..ab53e6fa86f5d 100644 --- a/administrator/templates/hathor/html/com_installer/languages/default.php +++ b/administrator/templates/hathor/html/com_installer/languages/default.php @@ -17,8 +17,19 @@ $version = new JVersion; +// Add spindle-wheel for language installation. +JFactory::getDocument()->addScriptDeclaration(' +jQuery(document).ready(function($) { + Joomla.loadingLayer("load"); + $("#adminForm").on("submit", function(e) { + if (document.getElementsByName("task")[0].value == "languages.install") + { + Joomla.loadingLayer("show"); + } + }); +}); +'); ?> -
    sidebar)) : ?> diff --git a/administrator/templates/hathor/html/layouts/joomla/quickicons/icon.php b/administrator/templates/hathor/html/layouts/joomla/quickicons/icon.php index 8f4fe53ed102a..074289cd476ef 100644 --- a/administrator/templates/hathor/html/layouts/joomla/quickicons/icon.php +++ b/administrator/templates/hathor/html/layouts/joomla/quickicons/icon.php @@ -19,7 +19,7 @@
    > diff --git a/administrator/templates/hathor/html/layouts/joomla/toolbar/title.php b/administrator/templates/hathor/html/layouts/joomla/toolbar/title.php index 5edffbac9a9f7..769f32f276d7b 100644 --- a/administrator/templates/hathor/html/layouts/joomla/toolbar/title.php +++ b/administrator/templates/hathor/html/layouts/joomla/toolbar/title.php @@ -10,6 +10,7 @@ defined('_JEXEC') or die; $class = 'pagetitle'; + if (!empty($displayData['icon'])) { // Strip the extension. @@ -19,7 +20,7 @@ { $icons[$i] = 'icon-48-' . preg_replace('#\.[^.]*$#', '', $icon); } - $class .= ' ' . htmlspecialchars(implode(' ', $icons)); + $class .= ' ' . htmlspecialchars(implode(' ', $icons), ENT_COMPAT, 'UTF-8'); } ?>
    diff --git a/administrator/templates/hathor/index.php b/administrator/templates/hathor/index.php index 7463312aa1029..71f7b827cb130 100644 --- a/administrator/templates/hathor/index.php +++ b/administrator/templates/hathor/index.php @@ -99,7 +99,7 @@ -
    +
    @@ -285,7 +294,7 @@ function colorIsLight($color) countModules('status') || (!$statusFixed && $this->countModules('status'))) : ?>
    -

    +

    ©

    diff --git a/administrator/templates/isis/js/bootstrap.min.js b/administrator/templates/isis/js/bootstrap.min.js deleted file mode 100644 index 97dc88e10aae1..0000000000000 --- a/administrator/templates/isis/js/bootstrap.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger("close").removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;if(!e.length)return;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('