Skip to content

Commit

Permalink
rewrite open #dialog div functions, to work with modals instead of ui…
Browse files Browse the repository at this point in the history
…-dialog.
  • Loading branch information
mariez committed Mar 30, 2016
1 parent 1a4533d commit fe1a9b9
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion js/phpList3ToBootstrap.js
Expand Up @@ -118,11 +118,31 @@ var myfunction = function() {

}

$( window ).load(myfunction);


/******** RESPONSIVE TABS *******/
$.getScript("ui/bootlist/js/bootstrap-tabcollapse.js", function(){
$('.tabbed').tabCollapse();
});

$( window ).load(myfunction);

/******** modals instead of dialog *******/

function openHelpDialog(url) {
$("#dialog").html('<div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodalLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><button type="button" class="close externo" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button><div class="modal-content well col-lg-12"><div class="openhelpimage">'+busyImage+'</div></div></div></div>');
var destpage = urlParameter('page',url);
url = url.replace(/page=/,'origpage=');
$("#dialog .modal-content").load(url+'&ajaxed=true&page=pageaction&action='+destpage);
$("#dialog #mymodal").modal('show');
}

function initialiseTranslation(text) {
$("#dialog").html('<div class="modal fade" id="mymodaltrans" tabindex="-1" role="dialog" aria-labelledby="mymodaltransLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><button type="button" class="close externo" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button><div class="modal-content well col-lg-12"><div class="openhelpimage">'+text+'<br />'+busyImage+'</div></div></div></div>');
$("#dialog .modal-content").load('./?ajaxed=true&page=pageaction&action=initlanguage');
$("#dialog #mymodaltrans").modal('show');
$('#dialog #mymodaltrans').bind("DOMSubtreeModified",function(){ $('#dialog #mymodaltrans').modal('hide'); });
}



0 comments on commit fe1a9b9

Please sign in to comment.