2012-03-19 22:06:02 +01:00
|
|
|
/**
|
2013-04-13 21:00:13 +02:00
|
|
|
* EGroupware eTemplate2 - JS Groupbox object
|
2012-03-19 22:06:02 +01:00
|
|
|
*
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package etemplate
|
|
|
|
* @subpackage api
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @author Nathan Gray
|
|
|
|
* @copyright Nathan Gray 2012
|
|
|
|
* @version $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*egw:uses
|
|
|
|
et2_core_baseWidget;
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2013-04-13 21:00:13 +02:00
|
|
|
* Class which implements the groupbox tag
|
2013-12-20 13:47:49 +01:00
|
|
|
*
|
2013-04-13 21:00:13 +02:00
|
|
|
* @augments et2_baseWidget
|
2013-12-20 13:47:49 +01:00
|
|
|
*/
|
2016-02-29 21:40:43 +01:00
|
|
|
var et2_groupbox = (function(){ "use strict"; return et2_baseWidget.extend(
|
2013-04-13 21:00:13 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Constructor
|
2013-12-20 13:47:49 +01:00
|
|
|
*
|
2013-04-13 21:00:13 +02:00
|
|
|
* @memberOf et2_groupbox
|
|
|
|
*/
|
2012-03-19 22:06:02 +01:00
|
|
|
init: function() {
|
|
|
|
this._super.apply(this, arguments);
|
|
|
|
|
|
|
|
this.setDOMNode(document.createElement("fieldset"));
|
|
|
|
}
|
2016-02-29 21:40:43 +01:00
|
|
|
});}).call(this);
|
2012-03-19 22:06:02 +01:00
|
|
|
et2_register_widget(et2_groupbox, ["groupbox"]);
|
|
|
|
|
2013-04-13 21:00:13 +02:00
|
|
|
/**
|
|
|
|
* @augments et2_baseWidget
|
|
|
|
*/
|
2016-02-29 21:40:43 +01:00
|
|
|
var et2_groupbox_legend = (function(){ "use strict"; return et2_baseWidget.extend(
|
2013-04-13 21:00:13 +02:00
|
|
|
{
|
2012-03-19 22:06:02 +01:00
|
|
|
attributes: {
|
|
|
|
"label": {
|
2013-04-13 21:00:13 +02:00
|
|
|
"name": "Label",
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
2013-12-20 13:47:49 +01:00
|
|
|
"description": "Label for group box",
|
|
|
|
"translate" : true
|
2013-04-13 21:00:13 +02:00
|
|
|
}
|
2012-03-19 22:06:02 +01:00
|
|
|
},
|
2013-12-20 13:47:49 +01:00
|
|
|
|
2013-04-13 21:00:13 +02:00
|
|
|
/**
|
|
|
|
* Constructor
|
2013-12-20 13:47:49 +01:00
|
|
|
*
|
2013-04-13 21:00:13 +02:00
|
|
|
* @memberOf et2_groupbox_legend
|
|
|
|
*/
|
2012-03-19 22:06:02 +01:00
|
|
|
init: function() {
|
|
|
|
this._super.apply(this, arguments);
|
|
|
|
|
2014-11-21 12:18:42 +01:00
|
|
|
var legend = jQuery(document.createElement("legend")).text(this.options.label);
|
2012-03-19 22:06:02 +01:00
|
|
|
this.setDOMNode(legend[0]);
|
|
|
|
}
|
2016-02-29 21:40:43 +01:00
|
|
|
});}).call(this);
|
2012-03-19 22:06:02 +01:00
|
|
|
et2_register_widget(et2_groupbox_legend, ["caption"]);
|