1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Admin Modal Fix

This commit is contained in:
Cameron
2013-02-27 03:58:19 -08:00
parent 4259b435f3
commit 3e68fca857
2 changed files with 25 additions and 19 deletions

View File

@@ -41,6 +41,7 @@ if(e_PAGE != 'menus.php') // Quick fix for Menu Manager inactive drop-down probl
e107::css('core', 'colorbox/colorbox.css', 'jquery');
}
e107::js('core', 'bootstrap/js/bootstrap-modal.js', 'jquery', 2); // Special Version see: https://github.com/twitter/bootstrap/pull/4224
e107::css('core', 'bootstrap-editable/css/bootstrap-editable.css', 'jquery');
e107::js('core', 'bootstrap-editable/js/bootstrap-editable.min.js', 'jquery', 2);
@@ -395,6 +396,28 @@ e107::getJs()->renderJs('header_inline', 5);
echo "</head>
<body".$body_onload.">\n";
echo getModal();
function getModal($caption = '', $type='')
{
return '
<div id="uiModal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
&nbsp;
</div>
<div class="modal-body">
<p>Loading…</p>
</div>
<div class="modal-footer">
<a href="#" data-dismiss="modal" class="btn btn-primary">Close</a>
</div>
</div>';
}
// Header included notification, from this point header includes are not possible
define('HEADER_INIT', TRUE);

View File

@@ -4857,24 +4857,7 @@ class e_admin_form_ui extends e_form
return $this->renderCreateForm($forms, $models, e_AJAX_REQUEST);
}
// Inline Modal Code Markup
public function getModal($caption = '', $type='')
{
return '
<div id="uiModal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
&nbsp;
</div>
<div class="modal-body">
<p>Loading…</p>
</div>
<div class="modal-footer">
<a href="#" data-dismiss="modal" class="btn btn-primary">Close</a>
</div>
</div>';
}
/**
* Create list view
@@ -4909,7 +4892,7 @@ class e_admin_form_ui extends e_form
'form_post' => '', // markup to be added after closing form element
'fields' => $controller->getFields(), // see e_admin_ui::$fields
'fieldpref' => $controller->getFieldPref(), // see e_admin_ui::$fieldpref
'table_pre' => $this->getModal(), //'' , // markup to be added before opening table element
'table_pre' => '', // markup to be added before opening table element
'table_post' => !$tree[$id]->isEmpty() ? $this->renderBatch($controller->getBatchDelete(),$controller->getBatchCopy(),$controller->getBatchLink()) : '',
'fieldset_pre' => '', // markup to be added before opening fieldset element
'fieldset_post' => '', // markup to be added after closing fieldset element