| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- MWF.require("MWF.widget.Common", null, false);
- MWF.require("MWF.widget.JsonTemplate", null, false);
- MWF.xDesktop.requireApp("query.ViewDesigner", "Property", null, false);
- MWF.xApplication.query.StatementDesigner.Property = MWF.SDProperty = new Class({
- Extends: MWF.xApplication.query.ViewDesigner.Property,
- Implements: [Options, Events],
- options: {
- "style": "default"
- },
- show: function () {
- if (!this.propertyContent) {
- this.getHtmlString(function () {
- if (this.htmlString) {
- this.JsonTemplate = new MWF.widget.JsonTemplate(this.data, this.htmlString);
- this.propertyContent = new Element("div", {"styles": {"overflow": "hidden"}}).inject(this.propertyNode);
- this.propertyContent.set("html", this.JsonTemplate.load());
- this.setEditNodeEvent();
- this.setEditNodeStyles(this.propertyContent);
- this.loadPropertyTab();
- this.loadPersonInput();
- this.loadPersonSelectInput();
- this.loadViewFilter();
- this.loadScriptArea();
- this.loadColumnExportEditor();
- this.loadJSONArea();
- this.loadEventsEditor();
- this.loadViewStylesArea();
- this.loadPagingStylesArea();
- this.loadActionStylesArea();
- this.loadActionArea();
- this.loadStylesList();
- this.loadMaplist();
- this.loadDataPathSelect();
- }
- }.bind(this));
- } else {
- this.propertyContent.setStyle("display", "block");
- }
- },
- loadDataPathSelect : function(){
- var nodes = this.propertyContent.getElements(".MWFDataPathSelect");
- nodes.each( function (select) {
- select.empty();
- var option = new Element("option", {"text": "none", "value" : ""}).inject(select);
- this.module.getColumnDataPath().each(function(model){
- var option = new Element("option", {
- "text": model,
- "value": model,
- "selected": (this.data[name]==model)
- }).inject(select);
- }.bind(this));
- }.bind(this))
- },
- loadViewFilter: function () {
- var nodes = this.propertyContent.getElements(".MWFViewFilter");
- var filtrData = this.view.data.data.filterList;
- var customData = this.view.data.data.customFilterList;
- nodes.each(function (node) {
- MWF.xDesktop.requireApp("query.StatementDesigner", "widget.ViewFilter", function () {
- var _slef = this;
- this.viewFilter = new MWF.xApplication.query.StatementDesigner.widget.ViewFilter(node, this.view.designer, {
- "filtrData": filtrData,
- "customData": customData
- }, {
- "onChange": function (ids) {
- var data = this.getData();
- _slef.changeJsonDate(["data", "filterList"], data.data);
- _slef.changeJsonDate(["data", "customFilterList"], data.customData);
- }
- });
- }.bind(this));
- }.bind(this));
- }
- });
|