Use jquery to get the window width

remotes/origin/ldap_group_count
Robin Appelman 11 years ago
parent 46d6cb739d
commit c85e6d919e
  1. 4
      core/js/jquery.ocdialog.js

@ -67,8 +67,8 @@
self.parent = self.$dialog.parent().length > 0 ? self.$dialog.parent() : $('body');
var pos = self.parent.position();
self.$dialog.css({
left: pos.left + (window.innerWidth - self.$dialog.outerWidth())/2,
top: pos.top + (window.innerHeight - self.$dialog.outerHeight())/2
left: pos.left + ($(window).innerWidth() - self.$dialog.outerWidth())/2,
top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2
});
});

Loading…
Cancel
Save