mirror of https://github.com/apache/cloudstack.git
Dialog: Auto-center dialogs on load and window resize
This commit is contained in:
parent
116e06e3ba
commit
ec4361e2f5
|
|
@ -15,6 +15,18 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
(function($, cloudStack, _l) {
|
||||
$(function() {
|
||||
$.ui.dialog.prototype.options.autoReposition = true;
|
||||
$(window).resize(function () {
|
||||
$(".ui-dialog-content:visible").each(function () {
|
||||
var dialog = $(this).data("dialog");
|
||||
if (dialog.options.autoReposition) {
|
||||
dialog.option("position", dialog.options.position);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
cloudStack.dialog = {
|
||||
/**
|
||||
* Error message form
|
||||
|
|
|
|||
Loading…
Reference in New Issue