ZF-5813: Zend_ProgressBar_Adapter_JsPush

Issue Type: Improvement Created: 2009-02-17T06:39:28.000+0000 Last Updated: 2012-11-20T20:52:40.000+0000 Status: Closed Fix version(s): Reporter: Jeferson Rodrigo Almeida (jeffrex) Assignee: None Tags: - Zend_ProgressBar

Related issues: Attachments: - JsPush.php


Currently, Zend_ProgressBar_Adapter_JsPush, just works if the large proccess (that wil be monitored by the progressbar) runs in a hidden Iframe. I've started a improvement to make possible to do it with a ajax call to the larg process. It is very simple, I have just removed the tags, and the parent object in the return of the the finish and notify methods. I've included a $_ajaxAccess propertie too. If you set this propertie to FALSE (using setAjaxAccess() method), the class will work normaly, if you set it to TRUE, it will work with ajax. In the moment, the improvement, only work in firefox, but I'm working to portate it to other browsers to.

In javascript ajax return function, you need to use the eval() function to execute the string that returns from the class.

I hope it could be usefull.


Posted by Jeferson Rodrigo Almeida (jeffrex) on 2009-02-17T06:41:26.000+0000

here ir the modified JsPush adapter class

Posted by Ben Scholzen (dasprid) on 2009-02-17T09:10:12.000+0000

It basically looks good, tho it can only be implemented if the major browsers are supported by this method (>= IE6, >= FF2, >= Opera 9, >= Safari 3 and Chrome). When your method works there, it will be implemented with the next mini release.

About the naming, it should probably change. This has actually nothing to do with XML, so AJAX is the wrong naming. As long as setting this option only means, taking away the script tags, it should just be named setDisableScriptTags(boolean $disable = true).

Posted by Jeferson Rodrigo Almeida (jeffrex) on 2009-02-17T09:48:10.000+0000

Ok. But the setting does not mean just taking away the tags, it's a adaptation of the adapter class, to be used without a hidden iframe in the view code (taking away the parent object too), keeping just the function name, and the paramethers. In this mode, you can call the large proccess with ajax, and execute the return string with a eval javascript funcion, every time that the Zend_ProgressBar class made a change notify.

Maybe ajax is not the better name, but I thing that setDisableScriptTags, is a strange name. It will probably create a confusion. I'm waiting for suggestions.

What about setLocalCall, or setParentCall? This is the real function of this setting.

But the name doesn't matter now, first I'll try to make the code portable for the main browsers.

Thanks Ben.

Posted by Rob Allen (rob) on 2012-11-20T20:52:40.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.