EasyUI Forum
September 13, 2025, 04:32:13 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: dialog/window not displayed in center in 1.4.1  (Read 8051 times)
azmiahmad
Newbie
*
Posts: 2


View Profile
« on: November 28, 2014, 07:42:26 AM »

I tried upgrading from 1.3.6 to 1.4.1. After upgrade new dialog and window are opened at random locations on screen. They always used to open in center until version 1.3.6. Looking at the source I figured a workaround to call method 'center' on load.
Code:
$('#dialog').dialog('center');
But this is not scalable as I am using dialog at 100+ places. Is there a way to ensure that all dialog/window open in center of screen by default. This is a blocker for me and I can't upgrade.

Please help !!
Logged
ehussain
Newbie
*
Posts: 16


View Profile Email
« Reply #1 on: January 16, 2015, 01:06:52 PM »

use this

$.extend($.fn.dialog.methods, {
    mymove: function(jq, newposition){
        return jq.each(function(){
            $(this).dialog('move', newposition);
        });
    }
});


$(dialogName).dialog('move', {
   left: 10,
   top: 200
});
         
$(dialogName).dialog('open').dialog('setTitle','abcd Details');
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!