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
|
2021-06-07 17:33:53 +02:00
|
|
|
* @link https://www.egroupware.org
|
2012-03-19 22:06:02 +01:00
|
|
|
* @author Nathan Gray
|
|
|
|
* @copyright Nathan Gray 2012
|
|
|
|
*/
|
|
|
|
/*egw:uses
|
2020-02-10 14:33:15 +01:00
|
|
|
et2_core_baseWidget;
|
2012-03-19 22:06:02 +01:00
|
|
|
*/
|
2021-06-07 17:33:53 +02:00
|
|
|
import { et2_register_widget } from "./et2_core_widget";
|
|
|
|
import { et2_baseWidget } from "./et2_core_baseWidget";
|
|
|
|
import { ClassWithAttributes } from "./et2_core_inheritance";
|
2012-03-19 22:06:02 +01:00
|
|
|
/**
|
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
|
|
|
*/
|
2021-06-07 17:33:53 +02:00
|
|
|
export class et2_groupbox extends et2_baseWidget {
|
2020-02-10 14:33:15 +01:00
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*
|
|
|
|
* @memberOf et2_groupbox
|
|
|
|
*/
|
2021-06-07 17:33:53 +02:00
|
|
|
constructor(_parent, _attrs, _child) {
|
2020-02-10 14:33:15 +01:00
|
|
|
// Call the inherited constructor
|
2021-06-07 17:33:53 +02:00
|
|
|
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_groupbox._attributes, _child || {}));
|
|
|
|
this.setDOMNode(document.createElement("fieldset"));
|
2020-02-10 14:33:15 +01:00
|
|
|
}
|
2021-06-07 17:33:53 +02:00
|
|
|
}
|
|
|
|
et2_register_widget(et2_groupbox, ["groupbox"]);
|
2013-04-13 21:00:13 +02:00
|
|
|
/**
|
|
|
|
* @augments et2_baseWidget
|
|
|
|
*/
|
2021-06-07 17:33:53 +02:00
|
|
|
export class et2_groupbox_legend extends et2_baseWidget {
|
2020-02-10 14:33:15 +01:00
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*
|
|
|
|
* @memberOf et2_groupbox_legend
|
|
|
|
*/
|
2021-06-07 17:33:53 +02:00
|
|
|
constructor(_parent, _attrs, _child) {
|
2020-02-10 14:33:15 +01:00
|
|
|
// Call the inherited constructor
|
2021-06-07 17:33:53 +02:00
|
|
|
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_groupbox_legend._attributes, _child || {}));
|
|
|
|
let legend = jQuery(document.createElement("legend")).text(this.options.label);
|
|
|
|
this.setDOMNode(legend[0]);
|
2020-02-10 14:33:15 +01:00
|
|
|
}
|
2021-06-07 17:33:53 +02:00
|
|
|
}
|
|
|
|
et2_groupbox_legend._attributes = {
|
|
|
|
"label": {
|
|
|
|
"name": "Label",
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
|
|
|
"description": "Label for group box",
|
|
|
|
"translate": true
|
|
|
|
}
|
|
|
|
};
|
|
|
|
et2_register_widget(et2_groupbox_legend, ["caption"]);
|
2020-02-10 14:33:15 +01:00
|
|
|
//# sourceMappingURL=et2_widget_groupbox.js.map
|