Adding function to preview.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding function to preview.

DavidWallaceCox
I am having a difficult time figuring out how to either add an additional function button next to the preview button or adding functionality to the iFrame that is called by the preview button.  (e.g I want the user to be able to capture the link to a mysql database.) I find the the preview() function but can find no where in the xml files where this function is called. You help would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Adding function to preview.

Stanislaw Osinski
Administrator
Hi,

The function is called by the handler that reacts on the "carrot2-documents-loaded" event:

http://fisheye3.atlassian.com/browse/carrot2/trunk/applications/carrot2-webapp/web/skins/common-dynamic/js/plugins/ext/carrot2/carrot2.documents.core.js?r=trunk#l11
http://fisheye3.atlassian.com/browse/carrot2/trunk/applications/carrot2-webapp/web/skins/common-dynamic/js/plugins/ext/carrot2/carrot2.documents.core.js?r=trunk#l117

The event is invoked when the the AJAX request that loads the documents completes:

http://fisheye3.atlassian.com/browse/carrot2/trunk/applications/carrot2-webapp/web/skins/common-dynamic/js/plugins/ext/carrot2/carrot2.documents.core.js?r=trunk#l26

In other words, the preview() function is not invoked from the XML file, it's invoked from the JavaScript.

Cheers,

Staszek

On Sun, Dec 20, 2009 at 21:13, DavidWallaceCox <[hidden email]> wrote:

I am having a difficult time figuring out how to either add an additional
function button next to the preview button or adding functionality to the
iFrame that is called by the preview button.  (e.g I want the user to be
able to capture the link to a mysql database.) I find the the preview()
function but can find no where in the xml files where this function is
called. You help would be greatly appreciated.
--
View this message in context: http://n2.nabble.com/Adding-function-to-preview-tp4195810p4195810.html
Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers