Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ protected function getInput()
JFactory::getLanguage()->load('com_contact', JPATH_ADMINISTRATOR);

// Load the javascript
JHtml::_('behavior.framework');
JHtml::_('behavior.modal', 'a.modal');
JHtml::_('bootstrap.tooltip');

// Build the script.
Expand All @@ -62,7 +60,8 @@ protected function getInput()
$script[] = ' jQuery("#' . $this->id . '_clear").removeClass("hidden");';
}

$script[] = ' jModalClose();';
$script[] = ' jQuery("#modalContact").modal("hide");';

$script[] = ' }';

// Clear button script
Expand Down Expand Up @@ -136,14 +135,22 @@ protected function getInput()
// The current contact display field.
$html[] = '<span class="input-append">';
$html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
$html[] = '<a'
. ' class="modal btn hasTooltip"'
. ' title="' . JHtml::tooltipText('COM_CONTACT_CHANGE_CONTACT') . '"'
. ' href="' . $link . '&amp;' . JSession::getFormToken() . '=1"'
. ' rel="{handler: \'iframe\', size: {x: 800, y: 450}}">'
$html[] = '<a href="#modalContact" class="btn hasTooltip" role="button" data-toggle="modal"'
. ' title="' . JHtml::tooltipText('COM_CONTACT_CHANGE_CONTACT') . '">'
. '<i class="icon-file"></i> ' . JText::_('JSELECT')
. '</a>';

$html[] = JHtmlBootstrap::renderModal(
'modalContact', array(
'url' => $link . '&amp;' . JSession::getFormToken() . '=1"',
'title' => JText::_('COM_CONTACT_CHANGE_CONTACT'),
'width' => '800px',
'height' => '300px',
'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
)
);

// Edit contact button.
if ($allowEdit)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ protected function getInput()
// Load language
JFactory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR);

// Load the modal behavior script.
JHtml::_('behavior.modal', 'a.modal');

// Build the script.
$script = array();

Expand All @@ -60,7 +57,8 @@ protected function getInput()
$script[] = ' jQuery("#' . $this->id . '_clear").removeClass("hidden");';
}

$script[] = ' jModalClose();';
$script[] = ' jQuery("#modalArticle").modal("hide");';

$script[] = ' }';

// Clear button script
Expand Down Expand Up @@ -129,11 +127,14 @@ protected function getInput()
$value = (int) $this->value;
}

$url = $link . '&amp;' . JSession::getFormToken() . '=1';
// The current article display field.
$html[] = '<span class="input-append">';
$html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
$html[] = '<a class="modal btn hasTooltip" title="' . JHtml::tooltipText('COM_CONTENT_CHANGE_ARTICLE') . '" href="' . $link . '&amp;' . JSession::getFormToken() .
'=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('JSELECT') . '</a>';
$html[] = '<a href="#modalArticle" class="btn hasTooltip" role="button" data-toggle="modal" title="'
. JHtml::tooltipText('COM_CONTENT_CHANGE_ARTICLE') . '">
<i class="icon-file"></i> '
. JText::_('JSELECT') . '</a>';

// Edit article button
if ($allowEdit)
Expand All @@ -160,6 +161,16 @@ protected function getInput()

$html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';

$html[] = JHtmlBootstrap::renderModal(
'modalArticle', array(
'url' => $url,
'title' => JText::_('COM_CONTENT_CHANGE_ARTICLE'),
'width' => '800px',
'height' => '300px',
'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
)
);
return implode("\n", $html);
}
}
14 changes: 11 additions & 3 deletions administrator/components/com_menus/models/fields/menutype.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,22 @@ protected function getInput()
JFactory::getDocument()->addScriptDeclaration('
function jSelectPosition_' . $this->id . '(name) {
document.getElementById("' . $this->id . '").value = name;
jQuery("#menuTypeModal").modal("hide");
}
');

$link = JRoute::_('index.php?option=com_menus&view=menutypes&tmpl=component&recordId=' . $recordId);
$html[] = '<span class="input-append"><input type="text" ' . $required . ' disabled="disabled" readonly="readonly" id="' . $this->id . '" value="' . $value . '"' . $size . $class . ' />';
$html[] = '<span class="input-append"><input type="text" ' . $required . ' readonly="readonly" id="' . $this->id . '" value="' . $value . '"' . $size . $class . ' />';
$html[] = '<a href="#menuTypeModal" role="button" class="btn btn-primary" data-toggle="modal" title="' . JText::_('JSELECT') . '"><i class="icon-list icon-white"></i> ' . JText::_('JSELECT') . '</a></span>';
$html[] = JHtmlBootstrap::renderModal('menuTypeModal', array( 'url' => $link, 'title' => JText::_('COM_MENUS_ITEM_FIELD_TYPE_LABEL'),'height' => '600px', 'width' => '800px'), '');
$html[] = JHtmlBootstrap::renderModal(
'menuTypeModal', array(
'url' => $link,
'title' => JText::_('COM_MENUS_ITEM_FIELD_TYPE_LABEL'),
'width' => '800px',
'height' => '300px',
'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
)
);
$html[] = '<input class="input-small" type="hidden" name="' . $this->name . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '" />';

return implode("\n", $html);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,19 @@
</span>
<?php endif; ?>
</td>
<?php echo JHtmlBootstrap::renderModal('module' . $module->id . 'Modal', array( 'url' => $link, 'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'),'height' => '500px', 'width' => '800px'), ''); ?>
<?php echo JHtmlBootstrap::renderModal(
'module' . $module->id . 'Modal',
array(
'url' => $link,
'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'),
'height' => '300px',
'width' => '800px',
'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
. '<button class="btn btn-success" data-dismiss="modal" aria-hidden="true" onclick="jQuery(\'#module' . $module->id . 'Modal iframe\').contents().find(\'#saveBtn\').click();">'
. JText::_("JSAVE") . '</button>'
)
); ?>
</tr>
<?php endforeach; ?>
</tbody>
Expand Down
16 changes: 15 additions & 1 deletion administrator/components/com_menus/views/menus/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,21 @@
<?php foreach ($this->modules[$item->menutype] as &$module) : ?>
<?php if ($canEdit) : ?>
<?php $link = JRoute::_('index.php?option=com_modules&task=module.edit&id=' . $module->id . '&return=' . $return . '&tmpl=component&layout=modal'); ?>
<?php echo JHtmlBootstrap::renderModal('module' . $module->id . 'Modal', array( 'url' => $link, 'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'),'height' => '500px', 'width' => '800px'), ''); ?>
<?php echo
JHtmlBootstrap::renderModal(
'module' . $module->id . 'Modal',
array(
'url' => $link,
'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'),
'height' => '300px',
'width' => '800px',
'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
. '<button class="btn btn-success" data-dismiss="modal" aria-hidden="true" onclick="jQuery(\'#module' . $module->id . 'Modal iframe\').contents().find(\'#saveBtn\').click();">'
. JText::_("JSAVE") . '</button>'
)
);
?>
<?php endif; ?>
<?php endforeach; ?>
<?php elseif ($modMenuId) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
if (tmpl)
{
window.parent.Joomla.submitbutton("item.setType", type);
window.parent.jModalClose();
window.parent.jQuery("#menuTypeModal").modal("hide");
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
jQuery('#position-" . $this->item->id . "', parent.document).text(updPosition);
jQuery('#access-" . $this->item->id . "', parent.document).html(parent.viewLevels[updAccess]);
}
window.parent.jQuery('.modal').modal('hide');
window.parent.jQuery('#module" . $this->item->id . "Modal').modal('hide');
}
}
};";
Expand Down
20 changes: 8 additions & 12 deletions administrator/components/com_modules/views/module/tmpl/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,17 @@

defined('_JEXEC') or die;

// This code is needed for proper check out in case of modal close
JFactory::getDocument()->addScriptDeclaration('
window.parent.jQuery(".modal").on("hidden", function () { Joomla.submitbutton("module.cancel"); });
window.parent.jQuery(".modal").on("hidden", function () {
if (typeof window.parent.jQuery("#module' . $this->item->id . 'Modal iframe").contents().find("#closeBtn") !== "undefined") {
window.parent.jQuery("#module' . $this->item->id . 'Modal iframe").contents().find("#closeBtn").click();
}
});
');
?>
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('module.save');">
<?php echo JText::_('JSAVE');?></button>
</div>
<div class="btn-group">
<button type="button" class="btn" onclick="Joomla.submitbutton('module.cancel'); window.parent.jQuery('.modal').modal('hide');">
<?php echo JText::_('JCANCEL');?></button>
</div>
<div class="clearfix"></div>
</div>
<button id="saveBtn" type="button" class="hidden" onclick="Joomla.submitbutton('module.save');"></button>
<button id="closeBtn" type="button" class="hidden" onclick="Joomla.submitbutton('module.cancel');"></button>

<?php
$this->setLayout('edit');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ protected function getInput()
JFactory::getLanguage()->load('com_newsfeeds', JPATH_ADMINISTRATOR);

// Load the javascript
JHtml::_('behavior.framework');
JHtml::_('behavior.modal', 'a.modal');
JHtml::_('bootstrap.tooltip');

// Build the script.
Expand All @@ -62,7 +60,8 @@ protected function getInput()
$script[] = ' jQuery("#' . $this->id . '_clear").removeClass("hidden");';
}

$script[] = ' jModalClose();';
$script[] = ' jQuery("#modalNewsfeed").modal("hide");';

$script[] = ' }';

// Clear button script
Expand Down Expand Up @@ -136,10 +135,22 @@ protected function getInput()
$html[] = '<span class="input-append">';
$html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title .
'" disabled="disabled" size="35" />';
$html[] = '<a class="modal btn hasTooltip" title="' . JHtml::tooltipText('COM_NEWSFEEDS_CHANGE_FEED_BUTTON') .
'" href="' . $link . '&amp;' . JSession::getFormToken() .
'=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' .
JText::_('JSELECT') . '</a>';

$html[] = '<a href="#modalNewsfeed" class="btn hasTooltip" role="button" data-toggle="modal"'
. ' title="' . JHtml::tooltipText('COM_NEWSFEEDS_CHANGE_FEED_BUTTON') . '">'
. '<i class="icon-file"></i> ' . JText::_('JSELECT')
. '</a>';

$html[] = JHtmlBootstrap::renderModal(
'modalNewsfeed', array(
'url' => $link . '&amp;' . JSession::getFormToken() . '=1"',
'title' => JText::_('COM_NEWSFEEDS_CHANGE_FEED_BUTTON'),
'width' => '800px',
'height' => '300px',
'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
)
);

// Edit newsfeed button
if ($allowEdit)
Expand Down
96 changes: 46 additions & 50 deletions administrator/templates/hathor/css/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@
.collapse.in {
height: auto;
}
.modal-open .dropdown-menu {
z-index: 2050;
}
.modal-open .dropdown.open {
*z-index: 2050;
}
.modal-open .popover {
z-index: 2060;
}
.modal-open .tooltip {
z-index: 2080;
}
.modal-backdrop {
position: fixed;
top: 0;
Expand All @@ -64,28 +76,50 @@
opacity: 0.8;
filter: alpha(opacity=80);
}
div.modal {
position: fixed;
top: 50%;
left: 50%;
z-index: 1050;
overflow: auto;
width: 80%;
margin: -250px 0 0 -40%;
background-color: #ffffff;
border: 1px solid #999;
border: 1px solid rgba(0,0,0,0.3);
*border: 1px solid #999;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3);
-moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3);
box-shadow: 0 3px 7px rgba(0,0,0,0.3);
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
}
div.modal.fade {
-webkit-transition: opacity .3s linear, top .3s ease-out;
-moz-transition: opacity .3s linear, top .3s ease-out;
-o-transition: opacity .3s linear, top .3s ease-out;
transition: opacity .3s linear, top .3s ease-out;
top: -25%;
}
div.modal.fade.in {
top: 50%;
}
.modal-header {
padding: 9px 15px;
border-bottom: 1px solid #eee;
}
.modal-header .close {
float: right;
margin-top: 2px;
}
.modal-header h3 {
margin: 0;
line-height: 30px;
}
.modal-body {
width: 98%;
position: relative;
overflow-y: auto;
max-height: 400px;
padding: 1%;
}
.modal-body iframe {
width: 100%;
max-height: none;
border: 0 !important;
padding: 15px;
}
.modal-form {
margin-bottom: 0;
Expand Down Expand Up @@ -120,44 +154,6 @@
.modal-footer .btn-group .btn + .btn {
margin-left: -1px;
}
.modal-footer .btn-block + .btn-block {
margin-left: 0;
}
div.modal {
position: fixed;
top: 5%;
left: 50%;
z-index: 1050;
width: 80%;
margin-left: -40%;
background-color: #ffffff;
border: 1px solid #999;
border: 1px solid rgba(0,0,0,0.3);
*border: 1px solid #999;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3);
-moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3);
box-shadow: 0 3px 7px rgba(0,0,0,0.3);
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
outline: none;
}
div.modal.fade {
-webkit-transition: opacity .3s linear, top .3s ease-out;
-moz-transition: opacity .3s linear, top .3s ease-out;
-o-transition: opacity .3s linear, top .3s ease-out;
transition: opacity .3s linear, top .3s ease-out;
top: -25%;
}
div.modal.fade.in {
top: 5%;
}
.modal-batch {
overflow-y: visible;
}
@font-face {
font-family: 'IcoMoon';
src: url('../../../../media/jui/fonts/IcoMoon.eot');
Expand Down
Loading