diff --git a/administrator/components/com_contenthistory/views/history/tmpl/modal.php b/administrator/components/com_contenthistory/views/history/tmpl/modal.php index 5a1c168e285ca..511c6c6c13280 100644 --- a/administrator/components/com_contenthistory/views/history/tmpl/modal.php +++ b/administrator/components/com_contenthistory/views/history/tmpl/modal.php @@ -87,7 +87,6 @@ ); ?> -

"; diff --git a/administrator/templates/isis/css/template-rtl.css b/administrator/templates/isis/css/template-rtl.css index 1e03b879b8a1e..7c6abb7660d96 100644 --- a/administrator/templates/isis/css/template-rtl.css +++ b/administrator/templates/isis/css/template-rtl.css @@ -3906,13 +3906,15 @@ input[type="submit"].btn.btn-mini { line-height: 30px; } .modal-body { + width: 98%; position: relative; overflow-y: auto; - max-height: 400px; - padding: 15px; + max-height: none; + padding: 1%; } .modal-body iframe { - max-height: 390px; + width: 100%; + max-height: none; border: 0 !important; } .modal-form { @@ -6151,11 +6153,11 @@ th .tooltip-inner { } div.modal { position: fixed; - top: 10%; + top: 5%; left: 50%; z-index: 1050; - width: 580px; - margin-left: -280px; + width: 80%; + margin-left: -40%; background-color: #fff; border: 1px solid #999; border: 1px solid rgba(0,0,0,0.3); @@ -6179,7 +6181,7 @@ div.modal.fade { top: -25%; } div.modal.fade.in { - top: 10%; + top: 5%; } .modal-batch { overflow-y: visible; diff --git a/administrator/templates/isis/css/template.css b/administrator/templates/isis/css/template.css index ceb73a908c3b8..eca1433bf0db5 100644 --- a/administrator/templates/isis/css/template.css +++ b/administrator/templates/isis/css/template.css @@ -3906,13 +3906,15 @@ input[type="submit"].btn.btn-mini { line-height: 30px; } .modal-body { + width: 98%; position: relative; overflow-y: auto; - max-height: 400px; - padding: 15px; + max-height: none; + padding: 1%; } .modal-body iframe { - max-height: 390px; + width: 100%; + max-height: none; border: 0 !important; } .modal-form { @@ -6151,11 +6153,11 @@ th .tooltip-inner { } div.modal { position: fixed; - top: 10%; + top: 5%; left: 50%; z-index: 1050; - width: 580px; - margin-left: -280px; + width: 80%; + margin-left: -40%; background-color: #fff; border: 1px solid #999; border: 1px solid rgba(0,0,0,0.3); @@ -6179,7 +6181,7 @@ div.modal.fade { top: -25%; } div.modal.fade.in { - top: 10%; + top: 5%; } .modal-batch { overflow-y: visible; diff --git a/components/com_content/views/article/tmpl/default_links.php b/components/com_content/views/article/tmpl/default_links.php index bfe22f0748415..b66fe5967dacb 100644 --- a/components/com_content/views/article/tmpl/default_links.php +++ b/components/com_content/views/article/tmpl/default_links.php @@ -62,7 +62,7 @@ // open in a modal window JHtml::_('behavior.modal', 'a.modal'); echo ''. - htmlspecialchars($label) . ' '; + htmlspecialchars($label) . ' '; break; default: diff --git a/components/com_weblinks/views/category/tmpl/default_items.php b/components/com_weblinks/views/category/tmpl/default_items.php index e35366242e701..ff5be3a04b2f7 100644 --- a/components/com_weblinks/views/category/tmpl/default_items.php +++ b/components/com_weblinks/views/category/tmpl/default_items.php @@ -117,7 +117,7 @@ // Open in a modal window JHtml::_('behavior.modal', 'a.modal'); echo '' . - $this->escape($item->title) . ' '; + $this->escape($item->title) . ' '; break; default: diff --git a/layouts/joomla/toolbar/versions.php b/layouts/joomla/toolbar/versions.php index 6add897ae609c..095ddc1a59a48 100644 --- a/layouts/joomla/toolbar/versions.php +++ b/layouts/joomla/toolbar/versions.php @@ -8,9 +8,24 @@ */ defined('_JEXEC') or die; + +$link = 'index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&item_id=' + . (int) $displayData['itemId'] . '&type_id=' . $displayData['typeId'] . '&type_alias=' + . $displayData['typeAlias'] . '&' . JSession::getFormToken() . '=1'; + +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 33478dd0dc6b8..7801e320ea378 100644 --- a/libraries/cms/form/field/contenthistory.php +++ b/libraries/cms/form/field/contenthistory.php @@ -43,14 +43,25 @@ protected function getInput() . $this->id . '&item_id=' . $itemId . '&type_id=' . $typeId . '&type_alias=' . $this->element['data-typeAlias'] . '&' . JSession::getFormToken() . '=1'; - // Load the modal behavior script. - JHtml::_('behavior.modal', 'button.modal_' . $this->id); + if (JFactory::getApplication()->isSite()) + { + // Load the modal behavior script. + JHtml::_('behavior.modal', 'button.modal_' . $this->id); - $html[] = ' '; + $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); } diff --git a/media/jui/less/modals.joomla.less b/media/jui/less/modals.joomla.less index a047bd10e8043..6895d8d80aa68 100644 --- a/media/jui/less/modals.joomla.less +++ b/media/jui/less/modals.joomla.less @@ -8,11 +8,11 @@ // Base modal div.modal { position: fixed; - top: 10%; + top: 5%; left: 50%; z-index: @zindexModal; - width: 580px; - margin-left: -280px; + width: 80%; + margin-left: -40%; background-color: @white; border: 1px solid #999; border: 1px solid rgba(0,0,0,.3); @@ -24,10 +24,10 @@ div.modal { outline: none; &.fade { - .transition(e('opacity .3s linear, top .3s ease-out')); - top: -25%; + .transition(e('opacity .3s linear, top .3s ease-out')); + top: -25%; } - &.fade.in { top: 10%; } + &.fade.in { top: 5%; } } //Modal for Batch views .modal-batch { diff --git a/media/jui/less/modals.less b/media/jui/less/modals.less index e85c92311b557..425302cad731f 100644 --- a/media/jui/less/modals.less +++ b/media/jui/less/modals.less @@ -32,21 +32,23 @@ .close { margin-top: 2px; } // Heading h3 { - margin: 0; - line-height: 30px; + margin: 0; + line-height: 30px; } } // Body (where all modal content resides) .modal-body { + width: 98%; position: relative; overflow-y: auto; - max-height: 400px; - padding: 15px; + max-height: none; + padding: 1%; } // Remove border and scrollbar from iframe modal .modal-body iframe { - max-height: 390px; + width: 100%; + max-height: none; border: 0 !important; } // Remove bottom margin if need be @@ -67,15 +69,15 @@ // Properly space out buttons .btn + .btn { - margin-left: 5px; - margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs + margin-left: 5px; + margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs } // but override that for button groups .btn-group .btn + .btn { - margin-left: -1px; + margin-left: -1px; } // and override it for block buttons as well .btn-block + .btn-block { - margin-left: 0; + margin-left: 0; } } diff --git a/templates/protostar/css/template.css b/templates/protostar/css/template.css index 567c058fb5bad..54167d78153ad 100644 --- a/templates/protostar/css/template.css +++ b/templates/protostar/css/template.css @@ -3906,13 +3906,15 @@ input[type="submit"].btn.btn-mini { line-height: 30px; } .modal-body { + width: 98%; position: relative; overflow-y: auto; - max-height: 400px; - padding: 15px; + max-height: none; + padding: 1%; } .modal-body iframe { - max-height: 390px; + width: 100%; + max-height: none; border: 0 !important; } .modal-form { @@ -6151,11 +6153,11 @@ th .tooltip-inner { } div.modal { position: fixed; - top: 10%; + top: 5%; left: 50%; z-index: 1050; - width: 580px; - margin-left: -280px; + width: 80%; + margin-left: -40%; background-color: #fff; border: 1px solid #999; border: 1px solid rgba(0,0,0,0.3); @@ -6179,7 +6181,7 @@ div.modal.fade { top: -25%; } div.modal.fade.in { - top: 10%; + top: 5%; } .modal-batch { overflow-y: visible;