Deprecated: Function set_magic_quotes_runtime() is deprecated in /home4/mfoster/public_html/cb/forums/include/common.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 34
Cross-Browser.com / [xFenster]

Cross-Browser.com

X Library Forums

You are not logged in.

Announcement

New user registration is currently disabled.

#1 May 24, 2007 1:57:31 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

[xFenster]

xFenster has been very popular. See this xFenster-related topic. Zaid, of ALT Mobile fame, has also provided great feedback regarding xFenster. Many other people have also provided feedback. As a result I've added many new features to xFenster and have been thinking more about how to improve it.

Here are some ideas for the next changes I may make to xFenster:

1. The maximize/restore, close and resize buttons should all be optional. Perhaps "moving" (dragging) the fenster should also be optional.

2. Their should be call-back hooks for xFenster-related events: maximize/restore, close and resize. And perhaps there should also be hooks for these events: move, load, paint, unload.

What do you think?

Offline

 

#2 May 28, 2007 9:49:29 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

I made a few changes based on some feedback from Zaid and Patrick. It appears that Safari may have a bug related to xClientHeight, while xClientWidth works fine.

Please try Maximize/Restore in Safari and see if it works now.

*Edit

I don't think it was an actual "bug" in Safari, but the problem resulted from me not realizing that document.compatMode does not exist in Safari.

Last edited by MikeFoster (May 31, 2007 5:09:05 pm)

Offline

 

#3 May 28, 2007 11:42:15 am

dpaddy
New Member
Registered: May 26, 2007
Posts: 1

Re: [xFenster]

Maximizing xFenster works fine in Safari. Thanks Mike!

Offline

 

#4 May 28, 2007 11:46:51 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Hi dpaddy,

Welcome to the forums!

Thanks for the Safari test report!

If you have time, it would be great if you could check out this topic regarding xEvent.button, especially in regards to Safari support.

Thanks! smiletup

Offline

 

#5 May 30, 2007 11:38:27 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

I've been playing around with xFenster smile

I added enable/disable support for: Move, Resize, MaxRes, Close.

I added call-back function support for: Move, Resize, MaxRes, Close, Focus.

As a test for the new features I re-implemented the Property Viewer page. Here's the new Property Viewer which utilizes the xFenster revision 8 features.

Offline

 

#6 May 31, 2007 5:02:55 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

I've been doing some cross-browser testing, including Apollo, for xFenster. This led to several changes.

For more info: xFenster

Offline

 

#7 June 20, 2007 5:57:49 pm

gebura
Member
From: France
Registered: June 20, 2007
Posts: 25
Website

Re: [xFenster]

Hello Mike

When trying to build my own x.js file for developing i find this on xFenster

me.con.style.display = 'none'


Without ";" ,this disallow use of compression

This also cause some bugs like having Fenster badly positioned and sized (as i told you by mail, before knowing why...)


I also find another bug:

When charging http://json.org/json.js , iframe fenster is broken
(this file doesn't looks bad but it also cause problems with prototype js library, don't have time to search for the problem explanation)

You can see the bug at http://gebura.gebura.eu.org/work/tmp/essai.html (just copy file and uncomment lines you will find in <head>)

I hope this is a good start in this forum wink

Offline

 

#8 June 20, 2007 10:23:03 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Ack! Yes you are right - the missing ';' will cause other problems when using compression.

The code from "json.js" is causing a problem because it adds properties to "Object.prototype" and I'm using "for...in". I'm now using hasOwnProperty in those loops. I tested it with "json.js" and had no problems.

Thanks very much for catching these! smile

I've uploaded the updated xfenster .js and .xml files. They are not yet in the distribution file but will be in the next release.

Offline

 

#9 June 23, 2007 2:49:29 pm

gebura
Member
From: France
Registered: June 20, 2007
Posts: 25
Website

Re: [xFenster]

Hello

I have added this really sort piece of code, for having a public property for maximize:

 me.maximizeOrUn = maxClick


This is prety simple but i find it usefull, maybe it can interest other peoples

Offline

 

#10 June 25, 2007 3:13:28 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Good tip, gebura. Thanks smile

Offline

 

#11 June 29, 2007 4:31:32 am

Zaid
New Member
Registered: May 24, 2007
Posts: 3

Re: [xFenster]

Hi Mike,

I'm porting to the xfenster codebase and I'm a bit confused about how to calculate the height and width of the xFenster instance. It seems that the docs identify a future property "con" so should we currently use xWidth/xHeight something like this:

function updateTitlebar() {
  xGetElementsByClassName("xfCon", null, "div", fnCallback);
}
function fnCallback (ele) {
  // update the sole mashup viewer's title bar
  viewerXFenster.title ( "Widget Prototype [" + xWidth(ele) + " X " + xHeight(ele) + "]");
}


thanks.

Offline

 

#12 June 29, 2007 4:49:49 am

Zaid
New Member
Registered: May 24, 2007
Posts: 3

Re: [xFenster]

Hi Mike,

if I want to dynamically hide and show the status bar, it seems that I can't use display:none somthing like this:

function toggle() {
  xGetElementsByClassName("xfSBarF", null, "div", fnCallback);
}
function fnCallback (ele) {
  // toggle the sole mashup viewer's status bar

  if (ele.style.display == 'none') {
     ele.style.display = 'block';
  }
  else {
     ele.style.display = 'none';
  }
}

as the xFenster instance does not resize it's "client" property. Any suggestions?

thanks.

Offline

 

#13 June 29, 2007 6:02:14 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Hi Zaid,

Welcome to the X Forums!

Sorry but I'll be gone most of today. I'll address your questions as soon as I return.

Thanks! smile

Offline

 

#14 June 29, 2007 2:11:53 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

I'm porting to the xfenster codebase and I'm a bit confused about how to calculate the height and width of the xFenster instance.


The latest version of xFenster has two more public properties: conW and conH and these are always the current size of the fenster's outermost element (con).

The latest version of xFenster is not yet in the distribution file. Copy it from here: xFenster and use that to replace the contents of "/x/lib/xfenster.js".

If you have a version of xFenster which has the con property but not 'conW' and 'conH' then just use: fensterObj.con.offsetWidth and fensterObj.con.offsetHeight.


if I want to dynamically hide and show the status bar, it seems that I can't use display:none somthing like this:
...
as the xFenster instance does not resize it's "client" property. Any suggestions?


The latest version of xFenster exposes the status bar element as the sbar property on the xFenster object. So you can reference it directly.

After hiding the statusbar, call the fenster's paint method and pass it all zeros. The parameters to the paint method are 'added' to the existing size and height.

smile

Offline

 

#15 June 29, 2007 7:19:45 pm

Zaid
New Member
Registered: May 24, 2007
Posts: 3

Re: [xFenster]

superior

Offline

 

#16 July 10, 2007 10:35:47 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

I've made some changes to xFenster which, unfortunately, may affect people's applications, so be sure to read the updated documentation: xFenster.

The following change may require changes in your application code: All callback functions, if provided, are called before their event occurs and must return true or false to allow or cancel the event's default action. The documentation above has been updated to explain these changes.

Offline

 

#17 July 27, 2007 10:00:45 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Here is an experimental feature which was not implemented in revision 16.

Last edited by MikeFoster (August 19, 2007 9:23:35 am)

Offline

 

#18 July 31, 2007 4:55:04 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Here is a new xFenster experiment.

Last edited by MikeFoster (August 19, 2007 9:24:19 am)

Offline

 

#19 August 16, 2007 3:43:29 pm

ekangas1
Member
Registered: June 5, 2007
Posts: 12

Re: [xFenster]

Hello,

We are just starting to use Fenster and it is really great.  We are using the latest r16 from the site.  It is working great in FireFox; however, in IE 7 we get title bars that are only as wide as the title text.  I see from this thread and the notes that there have been issues with title bars in IE and I also see that your latest experiments actually have title bars that work in my IE 7.  Do you have any specific suggestions as to what the common cause of this is and how to resolve?

Thank you,

-Erik Kangas

Offline

 

#20 August 19, 2007 9:50:01 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Crap. I had a typo on line 27. Notice the ")", which should not be there:

        me.sbar.style.top = me.conH - me.sbar.offsetHeight - M - B2);



Thanks for the heads-up, Erik! smile

Offline

 

#21 August 21, 2007 3:59:37 pm

ekangas1
Member
Registered: June 5, 2007
Posts: 12

Re: [xFenster]

I see what the problem is now.  My JavaScript "compaction" library is stripping out the conditional compilation comments and that is breaking some things. 

-Erik

Offline

 

#22 September 18, 2007 9:09:29 am

jshurmatz
New Member
Registered: September 18, 2007
Posts: 2

Re: [xFenster]

Mike,

We have been evaluating xFenster for a while now and you have made great strides with it.  One thing we noticed with r17 is that the Fensters minimize without respect to fence containers.  Was that your intention?  Thanks!

Last edited by jshurmatz (September 19, 2007 11:28:14 am)

Offline

 

#23 August 25, 2008 2:13:35 pm

IdeaG
New Member
Registered: August 25, 2008
Posts: 1

Re: [xFenster]

Hi, I have trouble with setting fence object for Fenster. do you have a working example somwhere?
P.S. I use Firefox

Last edited by IdeaG (August 25, 2008 2:15:34 pm)

Offline

 

#24 February 12, 2010 9:31:35 am

hmel
New Member
Registered: February 9, 2010
Posts: 5

Re: [xFenster]

Hi, Mike.
(Sorry for my bad english)

I would like to propose you some changes in minimize\restore functions.
Features:
1. If xFenster was created with parent fence, then minimized fenster has position according with fence bounds
2. If xFenster was created with parent fence, then maximized fenster has position and size according with fence bounds
3. If minimized fenster was restored, then other fensters will "compact" own position
4. Minimized fensters will not be able to resize\move

Here is the code:

me.restore = function()
  {
    var b, i, t;
    if (me.maximized) {
      b = me.mbtn;
      b.onclick = maxClick;
      i = clsMI;
      t = txtMax || '';
      me.maximized = !me.maximized;
    }
    else if (me.minimized) {
      b = me.nbtn;
      b.onclick = minClick;
      i = clsNI;
      t = txtMin || '';
      me.minimized = !me.minimized;

// ===========================HMEL===================================
// enable move&resize on restore from minimize
// ===========================HMEL===================================
    me.tbar.xDragEnabled = true;
    me.rbtn.xDragEnabled = true;
    compactMinimized();
// ===========================HMEL===================================

      me.client.style.display = 'block';
      if (me.sbar) me.sbar.style.display = 'block';
    }
    else {
      return false;
    }
    xMoveTo(me.con, rX, rY);
    b.className = i;
    b.title = t;
    if (me.rbtn) {me.rbtn.style.display = 'block';}
    me.conW = rW;
    me.conH = rH;
    me.paint(0, 0);
    if (fnRestore) fnRestore(me);
    return true;
  };


  function minClick()
  {
    var r = 1, x = 2, y, h, i, o = xFenster.instances;
    if (!fnMinimize || fnMinimize(me)) {
// ===========================HMEL===================================
// Calculating minimized position with fence
// ===========================HMEL===================================
        var pwidth = xClientWidth();
        h = me.tbar.offsetHeight + M2 + B2;
        compactMinimized();

        if (fenceId) {
            pf = xGetElementById(fenceId);
            ptop = xTop(pf);
            pleft = xLeft(pf);
            phei = xHeight(pf);
            pwidth = xWidth(pf);
        }

        for (i in o) {
            if (o.hasOwnProperty(i) && o[i] && o[i].minimized) {
                x += xWidth(o[i].con) + 2;
                if (x > pwidth) {
                    x = 2 + xWidth(o[i].con) + 2;
                    ++r;
                }
            }
        }
        if (x + miniW + 2 > pwidth) {
            x = 2;
            ++r;
        }

        if (fenceId) {
            y = (ptop + phei) - (r * (h + 2));
            if (enFixed) y -= 5;
            x += pleft; // maybe it should not do if enFixed ???
        }
        else {
            y = xClientHeight() - (r * (h + 2));
            if (!enFixed) y += xScrollTop();
        }

// ===========================HMEL===================================

////
        me.restore();
        me.client.style.display = 'none';
        if (me.sbar) me.sbar.style.display = 'none';
        me.minimized = !me.minimized;

// ===========================HMEL===================================
// disable move&resize on minimize
// ===========================HMEL===================================
        me.tbar.xDragEnabled = false;
        me.rbtn.xDragEnabled = false;
// ===========================HMEL===================================

        minmax(me.nbtn, miniW, h, x, y);
    }
  }


  function compactMinimized()
  {
// ===========================HMEL===================================
// compact other minimized fensters
// ===========================HMEL===================================
    var io, o = xFenster.instances, x, x_init = 2, r = 1, y, pwidth = xClientWidth(), pleft = 0;

    if (fenceId) {
    // get initial x position with fense
        pf = xGetElementById(fenceId);
        pleft = xLeft(pf);
        pwidth = xWidth(pf);
        ptop = xTop(pf);
        phei = xHeight(pf);

        x_init += pleft; // maybe it should not do if enFixed ???
    }

    x = x_init;
    for (io in o) {
        if (o.hasOwnProperty(io) && o[io] && o[io].minimized) {
            if (x + xWidth(o[io].con) > pwidth + pleft) {
                x = x_init;
                ++r;
            }

            h = o[io].tbar.offsetHeight + M2 + B2;
            if (fenceId) {
                y = (ptop + phei) - (r * (h + 2));
                if (enFixed) y -= 5;
            }
            else {
                y = xClientHeight() - (r * (h + 2));
                if (!enFixed) y += xScrollTop();
            }

            xMoveTo(o[io].con, x, y);
            x += xWidth(o[io].con) + 2;
        }
    }
// ===========================HMEL===================================
  }


  function winResize()
  {
    if (me.maximized) {
      xResizeTo(me.con, 100, 100); // ensure fenster isn't causing scrollbars

// ===========================HMEL===================================
// set fenster size\position by fenceID size\position (if fenceID)
// ===========================HMEL===================================
    if (fenceId) {
        pf = xGetElementById(fenceId);
        me.conW = xWidth(pf);
        me.conH = xHeight(pf);
        me.paint(0, 0);
    }
    else {
        if (!enFixed) xMoveTo(me.con, xScrollLeft(), xScrollTop());
        me.conW = xClientWidth();
        me.conH = xClientHeight();
        me.paint(0, 0);
    }
// ===========================HMEL===================================
    }
  }

Last edited by hmel (February 12, 2010 10:05:40 am)

Offline

 

#25 February 12, 2010 3:37:35 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xFenster]

Hi hmel, Welcome to the forums!

Hey that looks great - thank you! I'll check it out in more detail as soon as I can.

Offline

 

Board footer

Powered by PunBB 1.2.15
Copyright © 2002–2005 Rickard Andersson

Expand Restore Select Format Eval Load