src/pyams_skin/resources/js/ext/tinymce/dev/classes/ui/FieldSet.js
changeset 557 bca7a7e058a3
equal deleted inserted replaced
-1:000000000000 557:bca7a7e058a3
       
     1 /**
       
     2  * FieldSet.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  * This class creates fieldset containers.
       
    13  *
       
    14  * @-x-less FieldSet.less
       
    15  * @class tinymce.ui.FieldSet
       
    16  * @extends tinymce.ui.Form
       
    17  */
       
    18 define("tinymce/ui/FieldSet", [
       
    19 	"tinymce/ui/Form"
       
    20 ], function(Form) {
       
    21 	"use strict";
       
    22 
       
    23 	return Form.extend({
       
    24 		Defaults: {
       
    25 			containerCls: 'fieldset',
       
    26 			layout: 'flex',
       
    27 			direction: 'column',
       
    28 			align: 'stretch',
       
    29 			flex: 1,
       
    30 			padding: "25 15 5 15",
       
    31 			labelGap: 30,
       
    32 			spacing: 10,
       
    33 			border: 1
       
    34 		},
       
    35 
       
    36 		/**
       
    37 		 * Renders the control as a HTML string.
       
    38 		 *
       
    39 		 * @method renderHtml
       
    40 		 * @return {String} HTML representing the control.
       
    41 		 */
       
    42 		renderHtml: function() {
       
    43 			var self = this, layout = self._layout, prefix = self.classPrefix;
       
    44 
       
    45 			self.preRender();
       
    46 			layout.preRender(self);
       
    47 
       
    48 			return (
       
    49 				'<fieldset id="' + self._id + '" class="' + self.classes() + '" hidefocus="1" tabindex="-1">' +
       
    50 					(self.settings.title ? ('<legend id="' + self._id + '-title" class="' + prefix + 'fieldset-title">' +
       
    51 						self.settings.title + '</legend>') : '') +
       
    52 					'<div id="' + self._id + '-body" class="' + self.classes('body') + '">' +
       
    53 						(self.settings.html || '') + layout.renderHtml(self) +
       
    54 					'</div>' +
       
    55 				'</fieldset>'
       
    56 			);
       
    57 		}
       
    58 	});
       
    59 });