]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/debian/missing-sources/framework/Web/Javascripts/source/tinymce-405/classes/ui/Panel.js
baculum: Add missing-sources directory in debian metadata structure
[bacula/bacula] / gui / baculum / debian / missing-sources / framework / Web / Javascripts / source / tinymce-405 / classes / ui / Panel.js
1 /**
2  * Panel.js
3  *
4  * Copyright, Moxiecode Systems AB
5  * Released under LGPL License.
6  *
7  * License: http://www.tinymce.com/license
8  * Contributing: http://www.tinymce.com/contributing
9  */
10
11 /**
12  * Creates a new panel.
13  *
14  * @-x-less Panel.less
15  * @class tinymce.ui.Panel
16  * @extends tinymce.ui.Container
17  * @mixes tinymce.ui.Scrollable
18  */
19 define("tinymce/ui/Panel", [
20         "tinymce/ui/Container",
21         "tinymce/ui/Scrollable"
22 ], function(Container, Scrollable) {
23         "use strict";
24
25         return Container.extend({
26                 Defaults: {
27                         layout: 'fit',
28                         containerCls: 'panel'
29                 },
30
31                 Mixins: [Scrollable],
32
33                 /**
34                  * Renders the control as a HTML string.
35                  *
36                  * @method renderHtml
37                  * @return {String} HTML representing the control.
38                  */
39                 renderHtml: function() {
40                         var self = this, layout = self._layout, innerHtml = self.settings.html;
41
42                         self.preRender();
43                         layout.preRender(self);
44
45                         if (typeof(innerHtml) == "undefined") {
46                                 innerHtml = (
47                                         '<div id="' + self._id + '-body" class="' + self.classes('body') + '">' +
48                                                 layout.renderHtml(self) +
49                                         '</div>'
50                                 );
51                         } else {
52                                 if (typeof(innerHtml) == 'function') {
53                                         innerHtml = innerHtml.call(self);
54                                 }
55
56                                 self._hasBody = false;
57                         }
58
59                         return (
60                                 '<div id="' + self._id + '" class="' + self.classes() + '" hideFocus="1" tabIndex="-1">' +
61                                         (self._preBodyHtml || '') +
62                                         innerHtml +
63                                 '</div>'
64                         );
65                 }
66         });
67 });