-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move content history to bs modal #4561
Changes from 5 commits
6983f9e
e55364f
ef9edbd
969d1d6
7b5d84a
cd347a8
b4e084b
f6d6a1e
3350991
6b16e43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,29 @@ | |
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
JFactory::getDocument()->addStyleDeclaration(' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you will get problem with approval, with such things ... problem:
This make problems for support this code in future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree strongly with @Fedik. Don't use inline styles and especially no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One more think to get 100% B/C is needed here: |
||
@media only screen and (min-width : 768px) { | ||
#versionsModal { | ||
width: 80% !important; | ||
margin-left:-40% !important; | ||
height:auto; | ||
} | ||
#versionsModal #versionsModal-container .modal-body iframe { | ||
margin:0; | ||
padding:0; | ||
display:block; | ||
width:100%; | ||
height:400px !important; | ||
border:none; | ||
} | ||
}'); | ||
|
||
$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'; | ||
|
||
echo JHtmlBootstrap::renderModal('versionsModal', array( 'url' => $link, 'title' => JText::_('COM_CONTENTHISTORY_MODAL_TITLE'),'height' => '600px', 'width' => '800px'), ''); | ||
?> | ||
<a rel="{handler: 'iframe', size: {x: <?php echo $displayData['height']; ?>, y: <?php echo $displayData['width']; ?>}}" | ||
href="index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&item_id=<?php echo (int) $displayData['itemId']; ?>&type_id=<?php echo $displayData['typeId']; ?>&type_alias=<?php echo $displayData['typeAlias']; ?>&<?php echo JSession::getFormToken(); ?>=1" | ||
title="<?php echo $displayData['title']; ?>" class="btn btn-small modal_jform_contenthistory"> | ||
<i class="icon-archive"></i> <?php echo $displayData['title']; ?> | ||
</a> | ||
<button onclick="jQuery('#versionsModal').modal('show')" class="btn btn-small" data-toggle="modal" title="<?php echo $displayData['title']; ?>"> | ||
<span class="icon-archive"></span><?php echo $displayData['title']; ?></button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need that. Just use the constant
JPATH_BASE
which already does exactly that. Or passnull
, because the default value for the argument isJPATH_BASE
😄