I found this function in the toolbox-widget.js source:

Exhibit.ToolboxWidget.prototype._showExportMenu = function(elmt) {
    var self = this;
    var popupDom = Exhibit.UI.createPopupMenuDom(elmt);

    var makeMenuItem = function(exporter) {
        popupDom.appendMenuItem(
            exporter.getLabel(),
            null,
            function() {
                var database = self._uiContext.getDatabase();
                var text = ("itemID" in self._settings) ?
                    exporter.exportOne(self._settings.itemID,
database) :
                    exporter.exportMany(
 
self._uiContext.getCollection().getRestrictedItems(),
                        database
                    );
 
Exhibit.ToolboxWidget.createExportDialogBox(text).open();
            }
        );
    }

Exhibit.ToolboxWidget.createExportDialogBox(text).open() opens up a
dialogue with text.
But I do not understand, how to obtain the text from the bibtex
exporter.
What are the scopes to call the getDatabase(), exportOne(),
exportMany() functions?


On Sep 6, 2:41 am, David Karger <[email protected]> wrote:
> the function that gets invoked on hovering over a view is
> Exhibit.ToolboxWidget.prototype._showExportMenu but I can't guarantee
> that just calling it in any old context will work.  Look in source at
> webapp/api/script/ui/widgets/toolbox-widget.js
>
>
>
>
>
>
>
> On Monday, September 05, 2011 8:03:50 PM, Skip wrote:
> > Hello, I would like to introduce a button, for displaying the exporter
> > popup on a button-click.
> > Which function do I have to call onclick?
>
> > Thnx to all!

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to