Tim Bartel

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromTim Bartel
ToMe
SubjectNeed Restore Down for Movable Mini Windows
Date11 October 2006 00:28
Please accept these two enhancement requests for Movable Mini Windows:
 
1.  Add the ablity to "Restore Down" after having Maximized miniwindows.
2.  Add a Close All open windows option.  Presently I can refresh the
page and that will go back to default but all window sizes and
possitions will be lost.
 
Thank you,
 
Tim Bartel
FromMe
ToTim Bartel
SubjectRe: Need Restore Down for Movable Mini Windows
Date11 October 2006 09:39
Tim,

> 1.  Add the ablity to "Restore Down" after having Maximized miniwindows.

I looked at that when I originally implemented maximising, and could not
think of a convenient way to implement it, sorry.

> 2.  Add a Close All open windows option.

I assume your script keeps track of all of the mini windows it has created.
You can simply close them all manually:

hideMinWin('MWJminiwinMAX1');
hideMinWin('MWJminiwinMIN1');
hideMinWin('MWJminiwinMAX2');
hideMinWin('MWJminiwinMIN2');
hideMinWin('MWJminiwinMAX3');
hideMinWin('MWJminiwinMIN3');


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromTim Bartel
ToMe
SubjectRe: Need Restore Down for Movable Mini Windows
Date11 October 2006 16:09
Thanks for your quick response.  I don't write JavaScript but I can
tweak it if not too complicated.  This is fine script that could be
awesome with a few enhancements.  Thanks so much for making it
available.

For Restore down wouldn't the process be something like the minimize
option where the button gets swapped out for the restore button?  Would
have to get X,Y coordinates and window size before maximizing.

For close all/ minimize all, isn't there a way to loop through all open
windows by adding +1 to window name?
FromMe
ToTim Bartel
SubjectRe: Need Restore Down for Movable Mini Windows
Date12 October 2006 19:43
Tim,

> For Restore down wouldn't the process be something like the minimize
> option where the button gets swapped out for the restore button?  Would
> have to get X,Y coordinates and window size before maximizing.

No. It is much more complicated. It is basically like using the drag handle
to resize it, and dragging the window at the same time. It would need to
store the size before a resize (even though it actually does not know it ;)
), watch for manual resizing afterwards, then decide when it is next clicked
if it should maximise again, or restore.

Minimise is actually done with a separate mini window that has no content,
and minimise hides the main one and shows the minimised one.

In any case, I could not find a nice way to do it. However, if you want to
make a simple restore function that resizes to a specific size instead of
the previous size, you can use the resizeWin function, and moveWin function:

<a href="javascript:
  resizeWin('MWJminiwinMAX1','MWJminiwinMIN1',200,100);
  moveWin('MWJminiwinMAX1','MWJminiwinMIN1',10,10);
">

> For close all/ minimize all, isn't there a way to loop through all open
> windows by adding +1 to window name?

var oCount = 1;
while( getRefToDivNest('MWJminiwinMAX'+oCount) ) {
  hideMinWin('MWJminiwinMAX'+oCount);
  hideMinWin('MWJminiwinMIN'+oCount);
  oCount++;
}

That should work, I think.
FromTim Bartel
ToMe
SubjectRe: Need Restore Down for Movable Mini Windows
Date13 October 2006 16:27
Yes, very nice.  The Resize suggestion is a good work around for Restore
and the close All loop makes sense.  I'll let you know if they work.
Thanks

BTW, have you seen this Prototype Window Class website? 
[URL]
[Ed. I do not like to comment on other people's scripts]

Tim
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.