diff --git a/administrator/components/com_plugins/views/plugin/tmpl/edit.php b/administrator/components/com_plugins/views/plugin/tmpl/edit.php index e7e1d11f2ed5f..a8ef8fa57f54e 100644 --- a/administrator/components/com_plugins/views/plugin/tmpl/edit.php +++ b/administrator/components/com_plugins/views/plugin/tmpl/edit.php @@ -20,6 +20,11 @@ { if (task == 'plugin.cancel' || document.formvalidator.isValid(document.getElementById('style-form'))) { Joomla.submitform(task, document.getElementById('style-form')); + + if (self != top){ + window.top.setTimeout('window.parent.jModalClose()', 1000); + window.parent.jQuery('#plugin" . $this->item->extension_id . "Modal').modal('hide'); + } } }; "); diff --git a/administrator/components/com_plugins/views/plugin/tmpl/modal.php b/administrator/components/com_plugins/views/plugin/tmpl/modal.php new file mode 100644 index 0000000000000..87faa774c05f9 --- /dev/null +++ b/administrator/components/com_plugins/views/plugin/tmpl/modal.php @@ -0,0 +1,26 @@ +addScriptDeclaration(' + window.parent.jQuery(".modal").on("hidden", function () { + if (typeof window.parent.jQuery("#plugin' . $this->item->extension_id . 'Modal iframe").contents().find("#closeBtn") !== "undefined") { + window.parent.jQuery("#plugin' . $this->item->extension_id . 'Modal iframe").contents().find("#closeBtn").click(); + } + }); +'); +?> + + + +setLayout('edit'); +echo $this->loadTemplate(); diff --git a/administrator/components/com_redirect/helpers/redirect.php b/administrator/components/com_redirect/helpers/redirect.php index 5373a97bf65ef..44973c260ec9e 100644 --- a/administrator/components/com_redirect/helpers/redirect.php +++ b/administrator/components/com_redirect/helpers/redirect.php @@ -73,17 +73,17 @@ public static function publishedOptions() } /** - * Determines if the plugin for Redirect to work is enabled. + * get the redirect system plugin id to use for direct access * - * @return boolean + * @return int * - * @since 1.6 + * @since 3.4 */ - public static function isEnabled() + public static function getRedirectPluginId() { $db = JFactory::getDbo(); $query = $db->getQuery(true) - ->select($db->quoteName('enabled')) + ->select($db->quoteName('extension_id')) ->from('#__extensions') ->where($db->quoteName('folder') . ' = ' . $db->quote('system')) ->where($db->quoteName('element') . ' = ' . $db->quote('redirect')); @@ -91,7 +91,7 @@ public static function isEnabled() try { - $result = (boolean) $db->loadResult(); + $result = (int) $db->loadResult(); } catch (RuntimeException $e) { diff --git a/administrator/components/com_redirect/views/links/tmpl/default.php b/administrator/components/com_redirect/views/links/tmpl/default.php index 27aeae5fe992b..c90c6a335d0ad 100755 --- a/administrator/components/com_redirect/views/links/tmpl/default.php +++ b/administrator/components/com_redirect/views/links/tmpl/default.php @@ -35,8 +35,8 @@