diff --git a/components/com_content/views/article/tmpl/default_links.php b/components/com_content/views/article/tmpl/default_links.php
index 60c3350e0dec8..b66fe5967dacb 100644
--- a/components/com_content/views/article/tmpl/default_links.php
+++ b/components/com_content/views/article/tmpl/default_links.php
@@ -60,9 +60,9 @@
break;
case 3:
// open in a modal window
- JHtml::_('bootstrap.modal');
- echo '' . htmlspecialchars($label) . ' ';
- echo JHtmlBootstrap::renderModal('webLinkLangModal', array( 'url' => htmlspecialchars($link), 'title' => htmlspecialchars($label),'height' => '600px', 'width' => '600px'));
+ JHtml::_('behavior.modal', 'a.modal');
+ echo ''.
+ htmlspecialchars($label) . ' ';
break;
default:
diff --git a/components/com_content/views/form/tmpl/edit.php b/components/com_content/views/form/tmpl/edit.php
index 2ccf15c6ce473..dd48ee413f033 100644
--- a/components/com_content/views/form/tmpl/edit.php
+++ b/components/com_content/views/form/tmpl/edit.php
@@ -14,7 +14,7 @@
JHtml::_('behavior.calendar');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
-JHtml::_('bootstrap.modal');
+JHtml::_('behavior.modal', 'a.modal_jform_contenthistory');
// Create shortcut to parameters.
$params = $this->state->get('params');
diff --git a/components/com_weblinks/views/category/tmpl/default_items.php b/components/com_weblinks/views/category/tmpl/default_items.php
index 525ce9f862fd1..ff5be3a04b2f7 100644
--- a/components/com_weblinks/views/category/tmpl/default_items.php
+++ b/components/com_weblinks/views/category/tmpl/default_items.php
@@ -11,7 +11,7 @@
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
-JHtml::_('bootstrap.modal');
+JHtml::_('behavior.framework');
// Create a shortcut for params.
$params = &$this->item->params;
@@ -115,9 +115,9 @@
break;
case 3:
// Open in a modal window
- JHtml::_('bootstrap.modal');
- echo '' . $this->escape($item->title) . ' ';
- echo JHtmlBootstrap::renderModal('webLinkLangModal', array( 'url' => $link, 'title' => $this->escape($item->title),'height' => $this->escape($width), 'width' => $this->escape($height)));
+ JHtml::_('behavior.modal', 'a.modal');
+ echo '' .
+ $this->escape($item->title) . ' ';
break;
default:
diff --git a/components/com_weblinks/views/form/tmpl/edit.php b/components/com_weblinks/views/form/tmpl/edit.php
index 493f5019cb531..dd9b5d9f531ab 100644
--- a/components/com_weblinks/views/form/tmpl/edit.php
+++ b/components/com_weblinks/views/form/tmpl/edit.php
@@ -12,7 +12,7 @@
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
-JHtml::_('bootstrap.modal');
+JHtml::_('behavior.modal', 'a.modal_jform_contenthistory');
// Create shortcut to parameters.
$params = $this->state->get('params');
diff --git a/layouts/joomla/toolbar/versions.php b/layouts/joomla/toolbar/versions.php
index 63e7fb1ee6bd6..095ddc1a59a48 100644
--- a/layouts/joomla/toolbar/versions.php
+++ b/layouts/joomla/toolbar/versions.php
@@ -13,7 +13,19 @@
. (int) $displayData['itemId'] . '&type_id=' . $displayData['typeId'] . '&type_alias='
. $displayData['typeAlias'] . '&' . JSession::getFormToken() . '=1';
-echo JHtmlBootstrap::renderModal('versionsModal', array( 'url' => $link, 'title' => JText::_('COM_CONTENTHISTORY_MODAL_TITLE'),'height' => '600px', 'width' => '800px'), '');
+if (JFactory::getApplication()->isAdmin()) {
+ echo JHtmlBootstrap::renderModal('versionsModal', array( 'url' => $link, 'title' => JText::_('COM_CONTENTHISTORY_MODAL_TITLE'),'height' => '600px', 'width' => '800px'), '');
+}
?>
+isAdmin()) : ?>
+
+
+isSite()) : ?>
+
+
+
+
diff --git a/libraries/cms/form/field/contenthistory.php b/libraries/cms/form/field/contenthistory.php
index 3abf9472502df..7801e320ea378 100644
--- a/libraries/cms/form/field/contenthistory.php
+++ b/libraries/cms/form/field/contenthistory.php
@@ -43,11 +43,25 @@ protected function getInput()
. $this->id . '&item_id=' . $itemId . '&type_id=' . $typeId . '&type_alias='
. $this->element['data-typeAlias'] . '&' . JSession::getFormToken() . '=1';
- // Include jQuery
- JHtml::_('jquery.framework');
- JHtml::_('bootstrap.modal');
- $html[] = '';
- $html[] = JHtmlBootstrap::renderModal('versionsModal', array( 'url' => $link, 'title' => $label ,'height' => '600px', 'width' => '800px'), '');
+ if (JFactory::getApplication()->isSite())
+ {
+ // Load the modal behavior script.
+ JHtml::_('behavior.modal', 'button.modal_' . $this->id);
+
+ $html[] = ' ';
+ }
+ elseif (JFactory::getApplication()->isAdmin())
+ {
+ // Include jQuery
+ JHtml::_('jquery.framework');
+ JHtml::_('bootstrap.modal');
+ $html[] = '';
+ $html[] = JHtmlBootstrap::renderModal('versionsModal', array( 'url' => $link, 'title' => $label ,'height' => '600px', 'width' => '800px'), '');
+ }
return implode("\n", $html);
}