[web2py] Re: SQLFORM deletable=True -- buggy behavior
I've switched over to web2py.js from web2py_ajax.js but the problem of multiple popups is still there. On Thursday, March 22, 2012 9:39:46 PM UTC+8, Anthony wrote: No, I'm only using the web2py_trap_form out of the cookbook. The rest of the web2py_ajax.js file is the same. If the name of the file is web2py_ajax.js, it's probably old -- it was changed to web2py.js quite a while ago. Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
On Wednesday, March 28, 2012 9:28:03 AM UTC-4, weheh wrote: I've switched over to web2py.js from web2py_ajax.js but the problem of multiple popups is still there. Can you pack up and attach a minimal app that reproduces the problem? Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
I'll have to think hard about how to extract my example whilst isolating the bug. I'll need some time ... On Wednesday, March 28, 2012 9:42:54 PM UTC+8, Anthony wrote: On Wednesday, March 28, 2012 9:28:03 AM UTC-4, weheh wrote: I've switched over to web2py.js from web2py_ajax.js but the problem of multiple popups is still there. Can you pack up and attach a minimal app that reproduces the problem? Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
Are you using the entire web2py_ajax.js file from the cookbook? If so, much of it is out of date and should not be used. Note, in the current web2py, the name of the file has actually been changed to web2py.js, and a number of changes were made, including resolving that redundant event handler bug. You should use the current web2py.js, and try to copy the special Ajax file upload code only from the cookbook (I think it is limited to the web2py_trap_form() function). Anthony On Thursday, March 22, 2012 1:52:00 AM UTC-4, Anthony wrote: It's the code straight out of the new web2py cookbook. I'm not sure ... will I be violating copyright if I post it here? Hmm... The code in this book is released under the BSD license, unless otherwise specified, and is available online on a dedicated GitHub repository listed below.
[web2py] Re: SQLFORM deletable=True -- buggy behavior
No, I'm only using the web2py_trap_form out of the cookbook. The rest of the web2py_ajax.js file is the same. I'll check out the latest web2py.js later today. On Mar 22, 2:12 pm, Anthony abasta...@gmail.com wrote: Are you using the entire web2py_ajax.js file from the cookbook? If so, much of it is out of date and should not be used. Note, in the current web2py, the name of the file has actually been changed to web2py.js, and a number of changes were made, including resolving that redundant event handler bug. You should use the current web2py.js, and try to copy the special Ajax file upload code only from the cookbook (I think it is limited to the web2py_trap_form() function). Anthony On Thursday, March 22, 2012 1:52:00 AM UTC-4, Anthony wrote: It's the code straight out of the new web2py cookbook. I'm not sure ... will I be violating copyright if I post it here? Hmm... The code in this book is released under the BSD license, unless otherwise specified, and is available online on a dedicated GitHub repository listed below.
[web2py] Re: SQLFORM deletable=True -- buggy behavior
No, I'm only using the web2py_trap_form out of the cookbook. The rest of the web2py_ajax.js file is the same. If the name of the file is web2py_ajax.js, it's probably old -- it was changed to web2py.js quite a while ago. Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
The problems are: - when user checks the delete button in the form, the Are you sure ... message pops up multiple (8) times in succession, requiring a confirmation Are you using an old version of web2py_ajax.html/web2py_ajax.js? Do you have multiple Ajax components on the page? Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
Hi Anthony, I'm running 1.99.4 stable and I'm using the latest web2py_ajax.js that came with it. I have modified that web2py_ajax.js with the web2py_trap_form(action,target) function fix for uploading files with components. And yes, I do have multiple components on the page. On Mar 21, 8:47 pm, Anthony abasta...@gmail.com wrote: The problems are: - when user checks the delete button in the form, the Are you sure ... message pops up multiple (8) times in succession, requiring a confirmation Are you using an old version of web2py_ajax.html/web2py_ajax.js? Do you have multiple Ajax components on the page? Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
Can you show your modified web2py_trap_form function? Do you components by chance happen to reload web2py.js? It looks like somehow web2py_event_handlers() is getting called each time a component is loaded, so each handler is created multiple times. If web2py.js is loaded only once with the outer page, this should not happen. Anthony On Wednesday, March 21, 2012 9:26:44 PM UTC-4, weheh wrote: Hi Anthony, I'm running 1.99.4 stable and I'm using the latest web2py_ajax.js that came with it. I have modified that web2py_ajax.js with the web2py_trap_form(action,target) function fix for uploading files with components. And yes, I do have multiple components on the page. On Mar 21, 8:47 pm, Anthony abasta...@gmail.com wrote: The problems are: - when user checks the delete button in the form, the Are you sure ... message pops up multiple (8) times in succession, requiring a confirmation Are you using an old version of web2py_ajax.html/web2py_ajax.js? Do you have multiple Ajax components on the page? Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
It's the code straight out of the new web2py cookbook. I'm not sure ... will I be violating copyright if I post it here? Hmm... On Mar 22, 12:22 pm, Anthony abasta...@gmail.com wrote: Can you show your modified web2py_trap_form function? Do you components by chance happen to reload web2py.js? It looks like somehow web2py_event_handlers() is getting called each time a component is loaded, so each handler is created multiple times. If web2py.js is loaded only once with the outer page, this should not happen. Anthony On Wednesday, March 21, 2012 9:26:44 PM UTC-4, weheh wrote: Hi Anthony, I'm running 1.99.4 stable and I'm using the latest web2py_ajax.js that came with it. I have modified that web2py_ajax.js with the web2py_trap_form(action,target) function fix for uploading files with components. And yes, I do have multiple components on the page. On Mar 21, 8:47 pm, Anthony abasta...@gmail.com wrote: The problems are: - when user checks the delete button in the form, the Are you sure ... message pops up multiple (8) times in succession, requiring a confirmation Are you using an old version of web2py_ajax.html/web2py_ajax.js? Do you have multiple Ajax components on the page? Anthony
[web2py] Re: SQLFORM deletable=True -- buggy behavior
It's the code straight out of the new web2py cookbook. I'm not sure ... will I be violating copyright if I post it here? Hmm... The code in this book is released under the BSD license, unless otherwise specified, and is available online on a dedicated GitHub repository listed below.