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

Fixes bootstrap reusable modal window issue.

This commit is contained in:
Cameron 2013-03-02 01:03:52 -08:00
parent 3556ebf743
commit 0becdb3cbf
2 changed files with 46 additions and 1 deletions

View File

@ -83,7 +83,7 @@ a.brand:hover img {
}
.modal { min-width:800px; }
.modal { min-width:800px }
@media (min-width: 1500px) {

View File

@ -23,6 +23,51 @@ $(document).ready(function()
$.fn.editable.defaults.mode = 'popup';
$('.e-editable').editable();
// Fix for boostrap modal cache.
// $('.modal').on('hidden',function(){
// $(this).removeData('.modal');
// $('#uiModal .modal-label').text('Loading');
// $('#uiModal .modal-body').html('default_body');
// });
$('body').on('hidden', '.modal', function () {
$(this).removeData('modal');
$('#uiModal .modal-label').text('Loading...');
$('#uiModal .modal-body').text(' ');
});
/*
$('a[data-toggle="modal"]').on('click', function()
{
$(this).removeData('modal');
$('#uiModal .modal-header').text($(this).attr('title'));
var link = $(this).attr('href');
alert(link);
$('#uiModal .modal-body').html( 'table' );
//return false;
return this;
$('#uiModal .modal-body').load(link, function(response, status, xhr)
{
if (status === 'error')
{
//console.log('got here');
$('#uiModal .modal-body').html('<h2>Oh boy</h2><p>Sorry, but there was an error:' + xhr.status + ' ' + xhr.statusText+ '</p>');
}
return false;
return this;
}
)
});
*/
// run tips on .field-help
$("button,input,textarea,select,label,.e-tip").each(function(c) {