From 2ea1544143089eb437a5c90e791b251e84c56cef Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 19 Apr 2018 19:11:09 +0800 Subject: [PATCH] update --- dist/bundle.js | 22 ++++++++++----------- dist/widget.js | 22 ++++++++++----------- src/widget/downlist/popup.downlist.js | 20 +++++++++---------- src/widget/yearquarter/popup.yearquarter.js | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 1046bae40..fe719b167 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -89946,7 +89946,8 @@ BI.DownListPopup = BI.inherit(BI.Pane, { this.singleValues = []; this.childValueMap = {}; this.fatherValueMap = {}; - var self = this, o = this.options, children = this._createChildren(o.items); + this.items = BI.deepClone(this.options.items); + var self = this, o = this.options, children = this._createChildren(this.items); this.popup = BI.createWidget({ type: "bi.button_tree", items: BI.createItems(children, @@ -89996,7 +89997,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, { _createChildren: function (items) { var self = this, result = []; // 不能修改populate进来的item的引用 - BI.each(BI.deepClone(items), function (i, it) { + BI.each(items, function (i, it) { var item_done = { type: "bi.down_list_group", items: [] @@ -90115,9 +90116,8 @@ BI.DownListPopup = BI.inherit(BI.Pane, { }, _checkValues: function (values) { - var self = this, o = this.options; var value = []; - BI.each(o.items, function (idx, itemGroup) { + BI.each(this.items, function (idx, itemGroup) { BI.each(itemGroup, function (id, item) { if(BI.isNotNull(item.children)) { var childValues = BI.map(item.children, "value"); @@ -90150,17 +90150,17 @@ BI.DownListPopup = BI.inherit(BI.Pane, { populate: function (items) { BI.DownListPopup.superclass.populate.apply(this, arguments); - var self = this; - self.childValueMap = {}; - self.fatherValueMap = {}; - self.singleValues = []; - var children = self._createChildren(items); + this.items = BI.deepClone(items); + this.childValueMap = {}; + this.fatherValueMap = {}; + this.singleValues = []; + var children = this._createChildren(this.items); var popupItem = BI.createItems(children, {}, { adjustLength: -2 } ); - self.popup.populate(popupItem); + this.popup.populate(popupItem); }, setValue: function (valueItem) { @@ -109986,7 +109986,7 @@ BI.extend(BI.DynamicYearQuarterCombo, { this.textButton.setEnable(true); } else { var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()); - date = date.print("%Y-%x"); + date = date.print("%Y-%Q"); this.textButton.setValue(date); this.textButton.setEnable(false); } diff --git a/dist/widget.js b/dist/widget.js index 33499e790..38bba7e6c 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -2809,7 +2809,8 @@ BI.DownListPopup = BI.inherit(BI.Pane, { this.singleValues = []; this.childValueMap = {}; this.fatherValueMap = {}; - var self = this, o = this.options, children = this._createChildren(o.items); + this.items = BI.deepClone(this.options.items); + var self = this, o = this.options, children = this._createChildren(this.items); this.popup = BI.createWidget({ type: "bi.button_tree", items: BI.createItems(children, @@ -2859,7 +2860,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, { _createChildren: function (items) { var self = this, result = []; // 不能修改populate进来的item的引用 - BI.each(BI.deepClone(items), function (i, it) { + BI.each(items, function (i, it) { var item_done = { type: "bi.down_list_group", items: [] @@ -2978,9 +2979,8 @@ BI.DownListPopup = BI.inherit(BI.Pane, { }, _checkValues: function (values) { - var self = this, o = this.options; var value = []; - BI.each(o.items, function (idx, itemGroup) { + BI.each(this.items, function (idx, itemGroup) { BI.each(itemGroup, function (id, item) { if(BI.isNotNull(item.children)) { var childValues = BI.map(item.children, "value"); @@ -3013,17 +3013,17 @@ BI.DownListPopup = BI.inherit(BI.Pane, { populate: function (items) { BI.DownListPopup.superclass.populate.apply(this, arguments); - var self = this; - self.childValueMap = {}; - self.fatherValueMap = {}; - self.singleValues = []; - var children = self._createChildren(items); + this.items = BI.deepClone(items); + this.childValueMap = {}; + this.fatherValueMap = {}; + this.singleValues = []; + var children = this._createChildren(this.items); var popupItem = BI.createItems(children, {}, { adjustLength: -2 } ); - self.popup.populate(popupItem); + this.popup.populate(popupItem); }, setValue: function (valueItem) { @@ -22849,7 +22849,7 @@ BI.extend(BI.DynamicYearQuarterCombo, { this.textButton.setEnable(true); } else { var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()); - date = date.print("%Y-%x"); + date = date.print("%Y-%Q"); this.textButton.setValue(date); this.textButton.setEnable(false); } diff --git a/src/widget/downlist/popup.downlist.js b/src/widget/downlist/popup.downlist.js index c4b7472ec..b931822d1 100644 --- a/src/widget/downlist/popup.downlist.js +++ b/src/widget/downlist/popup.downlist.js @@ -26,7 +26,8 @@ BI.DownListPopup = BI.inherit(BI.Pane, { this.singleValues = []; this.childValueMap = {}; this.fatherValueMap = {}; - var self = this, o = this.options, children = this._createChildren(o.items); + this.items = BI.deepClone(this.options.items); + var self = this, o = this.options, children = this._createChildren(this.items); this.popup = BI.createWidget({ type: "bi.button_tree", items: BI.createItems(children, @@ -76,7 +77,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, { _createChildren: function (items) { var self = this, result = []; // 不能修改populate进来的item的引用 - BI.each(BI.deepClone(items), function (i, it) { + BI.each(items, function (i, it) { var item_done = { type: "bi.down_list_group", items: [] @@ -195,9 +196,8 @@ BI.DownListPopup = BI.inherit(BI.Pane, { }, _checkValues: function (values) { - var self = this, o = this.options; var value = []; - BI.each(o.items, function (idx, itemGroup) { + BI.each(this.items, function (idx, itemGroup) { BI.each(itemGroup, function (id, item) { if(BI.isNotNull(item.children)) { var childValues = BI.map(item.children, "value"); @@ -230,17 +230,17 @@ BI.DownListPopup = BI.inherit(BI.Pane, { populate: function (items) { BI.DownListPopup.superclass.populate.apply(this, arguments); - var self = this; - self.childValueMap = {}; - self.fatherValueMap = {}; - self.singleValues = []; - var children = self._createChildren(items); + this.items = BI.deepClone(items); + this.childValueMap = {}; + this.fatherValueMap = {}; + this.singleValues = []; + var children = this._createChildren(this.items); var popupItem = BI.createItems(children, {}, { adjustLength: -2 } ); - self.popup.populate(popupItem); + this.popup.populate(popupItem); }, setValue: function (valueItem) { diff --git a/src/widget/yearquarter/popup.yearquarter.js b/src/widget/yearquarter/popup.yearquarter.js index 5b8e1d5b7..6b2f464fe 100644 --- a/src/widget/yearquarter/popup.yearquarter.js +++ b/src/widget/yearquarter/popup.yearquarter.js @@ -74,7 +74,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { this.textButton.setEnable(true); } else { var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()); - date = date.print("%Y-%x"); + date = date.print("%Y-%Q"); this.textButton.setValue(date); this.textButton.setEnable(false); }