d64eefe32d9ee12284e01ea40bbb2aef2bf52c9f
[ccsdk/features.git] /
1 (function( $, app ) {
2
3         var ui = app.ns("ui");
4
5         ui.Toolbar = ui.AbstractWidget.extend({
6                 defaults: {
7                         label: "",
8                         left: [],
9                         right: []
10                 },
11                 init: function(parent) {
12                         this._super();
13                         this.el = $.joey(this._main_template());
14                 },
15                 _main_template: function() {
16                         return { tag: "DIV", cls: "uiToolbar", children: [
17                                 { tag: "DIV", cls: "pull-left", children: [
18                                         { tag: "H2", text: this.config.label }
19                                 ].concat(this.config.left) },
20                                 { tag: "DIV", cls: "pull-right", children: this.config.right }
21                         ]};
22                 }
23         });
24
25 })( this.jQuery, this.app );