Quick modal window opening leads to js error

3 views
Skip to first unread message

Alexander Obuhovich

unread,
Mar 4, 2010, 4:51:44 AM3/4/10
to In-Portal Bugs
When you have some slow js on the page, like 500 records per page and while they are being loaded try to open a window like pressing "Add" toolbar button, then you will get JS error about "TB.imgLoader" being undefined. Here is the patch to fix that.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
modal_window_opening_error_fix.patch

Alexander Obuhovich

unread,
Mar 4, 2010, 5:39:43 AM3/4/10
to In-Portal Bugs
Also it will be good to disable all toolbar buttons until page is fully loaded, since working with half loaded javascript could produce strange error, especially in modal window mode. Here is the patch for that too.
disable_toolbar_until_page_is_ready.patch

Phil ..:: domicilis.biz ::..

unread,
Mar 4, 2010, 7:48:28 AM3/4/10
to in-port...@googlegroups.com
good work, I've noticed for a long time that when you clic on any
button while page isn't fully loaded, nothing happens, and then all
toolbar buttons won't work, until we reload the whole page.

But the source problem remains; when we have a page very slow to load,
we won't be able to perform any operation while page isn't loaded. On
big DB, it means that if we miss a step and select 500 instead of 100
for example, we loose time.

Should it be possible to load first all JS toolbar, to make it fully
functionnal, and after loading content? And another question I wanted
to ask too : who should me reload toolbar eachtime? A toolbar is meant
to be tools, applying to any page, can't we let it in place, if we use
ajax?


2010/3/4 Alexander Obuhovich <aik....@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "In-Portal Bugs Team" group.
> To post to this group, send email to in-port...@googlegroups.com.
> To unsubscribe from this group, send email to
> in-portal-bug...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/in-portal-bugs?hl=en.
>

Alexander Obuhovich

unread,
Mar 4, 2010, 8:22:08 AM3/4/10
to in-port...@googlegroups.com
When all grids will be transformed to ajax, then toolbar won't be reloaded (like in catalog for now) and grid under toolbar will be updated with nice "Loading ..." indicator as you say. Also for now, when you have large grid (e.g. 500 rows), then while it's not loaded completely, then bottom HTML (what is under the grid) is also not loaded, but in case of modal windows we have modal window loading image there, which is important.

Also when (only for modal windows) you have large grid and when it's not completely loaded press "Add" button (with 1st patch applied), then you notice, then new item adding modal window is opened + top and left frames are hidden to enlarge editing area. Then when loading of large grid is completed it refreshes the page with that new modal window, so we:
  • loose that window
  • don't see top and left frame
This is mostly why I had to disable toolbar buttons. That modal window approach (when grids are not on ajax) makes all modal windows to die, when main list is going to refresh. When grids are loaded via ajax (like in catalog), then all modal windows will stay where they are, even, when large grid is completed it's loading process in background. That whole modal window interface is easy crushable, when you click very fast on not completely loaded page. Old popup approach is more stable in that matter.

Phil ..:: domicilis.biz ::..

unread,
Mar 4, 2010, 11:39:57 AM3/4/10
to in-port...@googlegroups.com
thank you for this very detailed reply. I'm not fan of modal windows,
neither pop-up ones, as they don't add any benefit, because we can't
open more than one at once, and when opened, everything else is
disabled.
I personnaly use "single window" mode, and I don't understand the need
of modal window in an admin interface... may you could tell me what
I'm missing? :)


2010/3/4 Alexander Obuhovich <aik....@gmail.com>:

Alexander Obuhovich

unread,
Mar 4, 2010, 3:13:42 PM3/4/10
to in-port...@googlegroups.com
Modal windows are for users who are afraid of too many windows on taskbar while editing an item. Popups are useful, when while working with one item you want to look on another without interrupting first item editing.

Phil ..:: domicilis.biz ::..

unread,
Mar 6, 2010, 4:59:22 AM3/6/10
to in-port...@googlegroups.com
ok, I undersrtand now, it fit all users likes :-)

2010/3/4 Alexander Obuhovich <aik....@gmail.com>

Dmitry A.

unread,
Mar 7, 2010, 4:47:44 PM3/7/10
to In-Portal Bugs Team
Hi Phil,


As you can see - we have though about everyones Interface preferences
and have implemented option to set any of 3 editing modes :)

I bet you already found where to change this.


Cheers!

DA


On Mar 6, 3:59 am, "Phil ..:: domicilis.biz ::.." <p...@domicilis.biz>
wrote:


> ok, I undersrtand now, it fit all users likes :-)
>

> 2010/3/4 Alexander Obuhovich <aik.b...@gmail.com>


>
>
>
> > Modal windows are for users who are afraid of too many windows on taskbar
> > while editing an item. Popups are useful, when while working with one item
> > you want to look on another without interrupting first item editing.
>
> > On Thu, Mar 4, 2010 at 6:39 PM, Phil ..:: domicilis.biz ::.. <
> > p...@domicilis.biz> wrote:
>
> >> thank you for this very detailed reply. I'm not fan of modal windows,
> >> neither pop-up ones, as they don't add any benefit, because we can't
> >> open more than one at once, and when opened, everything else is
> >> disabled.
> >> I personnaly use "single window" mode, and I don't understand the need
> >> of modal window in an admin interface... may you could tell me what
> >> I'm missing? :)
>

> >> 2010/3/4 Alexander Obuhovich <aik.b...@gmail.com>:

> >> >> 2010/3/4 Alexander Obuhovich <aik.b...@gmail.com>:


> >> >> > Also it will be good to disable all toolbar buttons until page is
> >> fully
> >> >> > loaded, since working with half loaded javascript could produce
> >> strange
> >> >> > error, especially in modal window mode. Here is the patch for that
> >> too.
>
> >> >> > On Thu, Mar 4, 2010 at 11:51 AM, Alexander Obuhovich

> >> >> > <aik.b...@gmail.com>


> >> >> > wrote:
>
> >> >> >> When you have some slow js on the page, like 500 records per page
> >> and
> >> >> >> while they are being loaded try to open a window like pressing "Add"
> >> >> >> toolbar
> >> >> >> button, then you will get JS error about "TB.imgLoader" being
> >> >> >> undefined.
> >> >> >> Here is the patch to fix that.
>
> >> >> >> --
> >> >> >> Best Regards,
>
> >> >> >>http://www.in-portal.com
> >> >> >>http://www.alex-time.com
>
> >> >> > --
> >> >> > Best Regards,
>
> >> >> >http://www.in-portal.com
> >> >> >http://www.alex-time.com
>
> >> >> > --
> >> >> > You received this message because you are subscribed to the Google
> >> >> > Groups
> >> >> > "In-Portal Bugs Team" group.
> >> >> > To post to this group, send email to in-port...@googlegroups.com
> >> .
> >> >> > To unsubscribe from this group, send email to

> >> >> > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>


> >> .
> >> >> > For more options, visit this group at
> >> >> >http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >> >> --
> >> >> You received this message because you are subscribed to the Google
> >> Groups
> >> >> "In-Portal Bugs Team" group.
> >> >> To post to this group, send email to in-port...@googlegroups.com.
> >> >> To unsubscribe from this group, send email to

> >> >> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>


> >> .
> >> >> For more options, visit this group at
> >> >>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >> > --
> >> > Best Regards,
>
> >> >http://www.in-portal.com
> >> >http://www.alex-time.com
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> Groups
> >> > "In-Portal Bugs Team" group.
> >> > To post to this group, send email to in-port...@googlegroups.com.
> >> > To unsubscribe from this group, send email to

> >> > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>


> >> .
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "In-Portal Bugs Team" group.
> >> To post to this group, send email to in-port...@googlegroups.com.
> >> To unsubscribe from this group, send email to

> >> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>


> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> > --
> > Best Regards,
>
> >http://www.in-portal.com
> >http://www.alex-time.com
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "In-Portal Bugs Team" group.
> > To post to this group, send email to in-port...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>

Phil ..:: domicilis.biz ::..

unread,
Mar 7, 2010, 4:57:56 PM3/7/10
to in-port...@googlegroups.com
Hi Dmitry,

yes, I've tested them, and definitivly I'll stick on "same window", as
"pop-up" windows can cause changes to be lost if you open another
window to copy/paste ;-)

cheers
Phil.

2010/3/7 Dmitry A. <dand...@gmail.com>:

> To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

Dmitry A.

unread,
Mar 9, 2010, 11:51:50 PM3/9/10
to In-Portal Bugs Team
New bug has been filed, patches attached. Still needs to be scheduled
and tested.


594: Quick "Modal Window" opening leads to js error

http://tracker.in-portal.org/view.php?id=594


DA

On Mar 7, 3:57 pm, "Phil ..:: domicilis.biz ::.." <p...@domicilis.biz>
wrote:


> Hi Dmitry,
>
> yes, I've tested them, and definitivly I'll stick on "same window", as
> "pop-up" windows can cause changes to be lost if you open another
> window to copy/paste ;-)
>
> cheers
> Phil.
>

> 2010/3/7 Dmitry A. <dandre...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages