EasyUI Forum
May 03, 2024, 04:47:01 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: Desktop Widget in Easyui Desktop  (Read 5548 times)
Alfred
Full Member
***
Posts: 134


-Licensed User-


View Profile
« on: September 07, 2018, 11:09:17 AM »

How can I add a widget panel on Easyui Desktop. The content of the widget would be from remote data. Please see my expected output. I want something like this one:

Please check the link.

Please help.

Thanks and regards
Alfred
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: September 08, 2018, 01:19:25 AM »

After create the desktop, create a panel and append it to the desktop.
Code:
$('body').desktop(...);
var p = $('<div></div>').appendTo('body');
p.panel({
width: 400,
height: 200,
style: {
position: 'absolute',
right: 0
},
href: '_about.html'
})
Logged
Alfred
Full Member
***
Posts: 134


-Licensed User-


View Profile
« Reply #2 on: September 09, 2018, 09:02:28 PM »

Thanks this works. How do I center the panel on the desktop?

Thanks and regards,
Alfred
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: September 10, 2018, 01:40:05 AM »

Please set the styles as:
Code:
p.panel({
width: 400,
height: 200,
style: {
position: 'relative',
top: '50%',
margin: '-100px auto 0 auto'
},
href: '_about.html'
})
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!