EasyUI Forum
April 29, 2024, 11:48:03 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: Feature requests for Portal Layout  (Read 13952 times)
tslatt
Jr. Member
**
Posts: 85



View Profile
« on: July 28, 2011, 09:01:05 AM »

The portal layout extension is the best I've found so far, but there are a few extra features that I wish it had. Can anyone offer any assistance with the following?

(1) Maximize/Restore - The maximize/restore features of the EasyUI panels is quirky within the portal layout. The size a panel maximizes to seems to vary, and if you move it around between different width columns while maximized and then restore it, it restores to the previous column's width, not the current column's. What would be most helpful within a portal layout is if on maximize, the panel filled the entire portal area (all columns), with all other panels hidden. Then on restore, it should return to its previous size and position with all of the other panels doing the same.   --   I think this could be achieved either by (A) using display:none all other panels and all other columns, making that panel's column 100% width, and then maximizing it, or (B) maximizing it to the full portal width/height and absolutely positioning it on top of all other panels.

(2) Resizing Panels Horizontally Across Multiple Columns - It would be great if you could stretch a panel across multiple columns. I haven't got a clue as to how that could be implemented, though.

Any help would be appreciated, whether it's just some guidelines on how to proceed, or of course, code. I am fairly new to query programming.
Logged
tslatt
Jr. Member
**
Posts: 85



View Profile
« Reply #1 on: October 05, 2011, 08:04:47 AM »

FYI, I implemented my own maximize/restore features by calling my own functions on those events:

Code:
$(".easyui-panel").each(function(index) {//for all widgets
  $(this).panel({//for this widget

  onMaximize: function() {//do this on widget maximize
  maximizePortalWidget($(this)); //maximize chosen widget and hide others
  },//end on widget maximize

  onRestore: function() {//do this on widget restore (unmaximized)
  restorePortalWidgets(); //restore portal to pre-maximized state
  }

  });//end for this widget
});//end for all widgets

On maximize, I hide all of the panels and all of the portal columns. Then I show just the column that the maximized panel is in and I show just that panel. Next I adjust the width of the column and panel so they fill the page. I also set the panel's height to "auto", because otherwise the built-in maximize function makes the panel too tall.

On restore, I re-show all of the panels and columns and I resize the portal so that the widths/heights automatically go back to normal.

Other tweaks are needed to make sure that (1) while a panel is maximized, resizing the browser or clicking on or moving the panel doesn't reset its size, and (2) that on restore I don't reshow a panel that was closed (not just temporarily hidden during the maximize).
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!