css - How can i enable use of background elements when the dialog is appeared? -
i created dojo dialog using the example . work maps in background. problem when dialog appeared, background blocked , can't use map(the dialog no underlaying). there way enable using background when dialog appeard on background?
you can little hack :
require(["dijit/dialog", "dijit/dialogunderlay", "dojo/domready!"], function(dialog, dialogunderlay){ //just snippets right styling document.body.classname = "tundra"; mydialog = new dialog({ title: "my dialog", content: "test content.", style: "width: 300px" }); mydialog2 = new dialog({ title: "my dialog", content: "test content.", style: "width: 300px" }); showdialog2 = function () { mydialog2.show().then(function() { dialogunderlay.hide() //little hack avoid js error when closing dialog dialogunderlay._singleton.bgiframe = {destroy: function() {}} }); } }); <script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"></script> <link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/resources/dojo.css"> <link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dijit/themes/tundra/tundra.css"> <button onclick="mydialog.show();">show underlay</button> <button onclick="showdialog2();">show without underlay</button>
Comments
Post a Comment