diff --git a/dist/core.js b/dist/core.js index f95bb05e12..be03bb1888 100644 --- a/dist/core.js +++ b/dist/core.js @@ -18554,26 +18554,28 @@ BI.ShowListener = BI.inherit(BI.OB, { _init: function () { BI.ShowListener.superclass._init.apply(this, arguments); var self = this, o = this.options; - o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) { - if (type === BI.Events.CLICK) { - v = v || o.eventObj.getValue(); - v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v; - if (BI.isNull(v)) { - throw new Error("value cannot be null"); - } - var cardName = o.cardNameCreator(v); - if (!o.cardLayout.isCardExisted(cardName)) { - var card = o.cardCreator(cardName); - o.cardLayout.addCardByName(cardName, card); - o.afterCardCreated(cardName); + if (o.eventObj) { + o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) { + if (type === BI.Events.CLICK) { + v = v || o.eventObj.getValue(); + v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v; + if (BI.isNull(v)) { + throw new Error("value cannot be null"); + } + var cardName = o.cardNameCreator(v); + if (!o.cardLayout.isCardExisted(cardName)) { + var card = o.cardCreator(cardName); + o.cardLayout.addCardByName(cardName, card); + o.afterCardCreated(cardName); + } + o.cardLayout.showCardByName(cardName); + BI.nextTick(function () { + o.afterCardShow(cardName); + self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName); + }); } - o.cardLayout.showCardByName(cardName); - BI.nextTick(function () { - o.afterCardShow(cardName); - self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName); - }); - } - }); + }); + } } }); BI.ShowListener.EVENT_CHANGE = "ShowListener.EVENT_CHANGE";/** diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 5aa650fc2d..2b8a6a1afa 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -18300,26 +18300,28 @@ BI.ShowListener = BI.inherit(BI.OB, { _init: function () { BI.ShowListener.superclass._init.apply(this, arguments); var self = this, o = this.options; - o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) { - if (type === BI.Events.CLICK) { - v = v || o.eventObj.getValue(); - v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v; - if (BI.isNull(v)) { - throw new Error("value cannot be null"); - } - var cardName = o.cardNameCreator(v); - if (!o.cardLayout.isCardExisted(cardName)) { - var card = o.cardCreator(cardName); - o.cardLayout.addCardByName(cardName, card); - o.afterCardCreated(cardName); - } - o.cardLayout.showCardByName(cardName); - BI.nextTick(function () { - o.afterCardShow(cardName); - self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName); - }); - } - }); + if (o.eventObj) { + o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) { + if (type === BI.Events.CLICK) { + v = v || o.eventObj.getValue(); + v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v; + if (BI.isNull(v)) { + throw new Error("value cannot be null"); + } + var cardName = o.cardNameCreator(v); + if (!o.cardLayout.isCardExisted(cardName)) { + var card = o.cardCreator(cardName); + o.cardLayout.addCardByName(cardName, card); + o.afterCardCreated(cardName); + } + o.cardLayout.showCardByName(cardName); + BI.nextTick(function () { + o.afterCardShow(cardName); + self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName); + }); + } + }); + } } }); BI.ShowListener.EVENT_CHANGE = "ShowListener.EVENT_CHANGE";/** diff --git a/dist/utils.js b/dist/utils.js index 85db250312..6cd9b3623a 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -15906,7 +15906,8 @@ BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];BI.i18n = { "BI-Basic_Minute": "分", "BI-Basic_Wan": "万", "BI-Basic_Million": "百万", - "BI-Basic_Billion": "亿" + "BI-Basic_Billion": "亿", + "BI-Basic_Quarter": "季度" };/** * 缓冲池 * @type {{Buffer: {}}} diff --git a/public/js/fineui.i18n.js b/public/js/fineui.i18n.js index 6931ade1ed..05e5d7b3e7 100644 --- a/public/js/fineui.i18n.js +++ b/public/js/fineui.i18n.js @@ -183,5 +183,6 @@ BI.i18n = { "BI-Basic_Minute": "分", "BI-Basic_Wan": "万", "BI-Basic_Million": "百万", - "BI-Basic_Billion": "亿" + "BI-Basic_Billion": "亿", + "BI-Basic_Quarter": "季度" }; \ No newline at end of file diff --git a/src/core/listener/listener.show.js b/src/core/listener/listener.show.js index 61e6107446..e571dac7ef 100644 --- a/src/core/listener/listener.show.js +++ b/src/core/listener/listener.show.js @@ -22,26 +22,28 @@ BI.ShowListener = BI.inherit(BI.OB, { _init: function () { BI.ShowListener.superclass._init.apply(this, arguments); var self = this, o = this.options; - o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) { - if (type === BI.Events.CLICK) { - v = v || o.eventObj.getValue(); - v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v; - if (BI.isNull(v)) { - throw new Error("value cannot be null"); + if (o.eventObj) { + o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) { + if (type === BI.Events.CLICK) { + v = v || o.eventObj.getValue(); + v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v; + if (BI.isNull(v)) { + throw new Error("value cannot be null"); + } + var cardName = o.cardNameCreator(v); + if (!o.cardLayout.isCardExisted(cardName)) { + var card = o.cardCreator(cardName); + o.cardLayout.addCardByName(cardName, card); + o.afterCardCreated(cardName); + } + o.cardLayout.showCardByName(cardName); + BI.nextTick(function () { + o.afterCardShow(cardName); + self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName); + }); } - var cardName = o.cardNameCreator(v); - if (!o.cardLayout.isCardExisted(cardName)) { - var card = o.cardCreator(cardName); - o.cardLayout.addCardByName(cardName, card); - o.afterCardCreated(cardName); - } - o.cardLayout.showCardByName(cardName); - BI.nextTick(function () { - o.afterCardShow(cardName); - self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName); - }); - } - }); + }); + } } }); BI.ShowListener.EVENT_CHANGE = "ShowListener.EVENT_CHANGE"; \ No newline at end of file