Announcement
Collapse
No announcement yet.
Own button opening a custom window/tab
Collapse
X
-
Look at the member of ox.widgets.toolBar. All default tabs and sections are stored there.
-
Is there no way to get this done? I don't believe that it is impossible.
Leave a comment:
-
ok, I guess I understand the tab-based code, but I don't get how to add only one button to an existing tab. I need the $p, but $p = ox.gui.initToolBar(). If I use this, I create a second ToolBar at the top. And $p.add only adds a whole tab, e.g. the edit-tab. Do I have to rebuild everything just to add one button?
Leave a comment:
-
MenuNodes is wrapper for backward compatibility. The old API had no notion of multiple tabs, and that's why all buttons land on the first tab.
The tab-based code is implemented in js/wtk/classes/, with examples of how it's used in js/wtk/.
Leave a comment:
-
Well, this works for adding a big button to the new-tab in the mail section
Code:var section = MenuNodes.contexts["moveid"] = { node: new ox.gui.PanelMenuSection("movemail") }; var item = ox.widgets.toolBar.menuItems["moveid"] = new ox.gui.MenuItem({ id: "moveid", title: "MoveMailTitle", icons: "themes/default/img/menu/btn_save.gif", big: true, action: null }); section.node.add(item); changeDisplay("mail", "moveid");
Leave a comment:
-
Ok, the function MenuNodes.createBigButtonContext contains this value. But only using
Code:MenuNodes.createBigButtonContext ( "myId", "mailEdit", "themes/default/img/menu/btn_save.gif", alert("This is my own big button") );
I meant this example here: http://oxpedia.org/wiki/index.php?ti...s_in_the_panel
Leave a comment:
-
I'm not sure which example you mean, but the buttons appear in the section to which they are added. The default sections are stored in ox.widgets.toolBar.sections.
The option to create a big button is a boolean called "big":
Code:var button = new ox.gui.MenuItem({ big: true, ... })
Leave a comment:
-
Great, that's exactly what I was looking for
Now there is a new question. Which parameter has to be changed (from the own-panel-button-example) to add the button to the edit-tab and not the new-tab? And how do I make a big button instead of the small ones?
Leave a comment:
-
Then you want to use ox.api.window.open(). The first aprameter is the path to your HTML file, the second parameter is an options object. See js/api.js around line 1800 for details.
Leave a comment:
-
ox.api.mail.open(); does open the new-mail-window. But where is this function defined to look how the window i built?
Leave a comment:
-
Isn't it possible to create an own inside-window like OX does e.g. with a new-mail-window?
Leave a comment:
-
For the menu, see this post.
For opening a new window, just use window.open() with your own HTML page as URL. This page can reuse scripts and CSS files of the GUI to get the same look as the main window.
Leave a comment:
-
Own button opening a custom window/tab
Hey,
I'm working with OX community edition and try to integrate an own plugin.
I already studies the plugin-page and I understood the SMS-button in the contacts-panel. But I can't find a guide or a hint to add these buttons to a different tab (actually it's in the "new-tab") or to the E-Mail-Section.
The second problem for me is opening a new custom window with labels, buttons etc. I only found how to add own configuration-tabs.
The guides are a bit outdated sometimes but I want to learnTags: None
Leave a comment: