diff --git a/src/base/single/editor/editor.multifile.js b/src/base/single/editor/editor.multifile.js index 21765474d..2be8de9d2 100644 --- a/src/base/single/editor/editor.multifile.js +++ b/src/base/single/editor/editor.multifile.js @@ -43,12 +43,14 @@ BI.MultifileEditor = BI.inherit(BI.Widget, { }); this.file.on(BI.File.EVENT_ERROR, function () { self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments); + self._reset(); }); this.file.on(BI.File.EVENT_PROGRESS, function () { self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments); }); this.file.on(BI.File.EVENT_UPLOADED, function () { self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments); + self._reset(); }); BI.createWidget({ @@ -93,7 +95,6 @@ BI.MultifileEditor = BI.inherit(BI.Widget, { }, upload: function () { - this._reset(); this.file.upload(); }, diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index 290970141..a17bb4955 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -56,7 +56,7 @@ del: document.removeEventListener ? function (node, name, callback) { node.removeEventListener(name, callback, false); - + return this; } : function (node, name, callback) { @@ -113,8 +113,8 @@ if (isFunction(handler.onerror)) { handler.onerror(); } - - return; + + return; } for (var xhr = new XMLHttpRequest, upload = xhr.upload || { @@ -245,7 +245,7 @@ form.append("FileData", handler.file); xhr.send(form); } - + return handler; }; } else { @@ -298,7 +298,7 @@ handler.onload(rpe, { responseText: responseText }); } } - + try { // IE < 8 does not accept enctype attribute ... var form = document.createElement("
"), iframe = handler.iframe || (handler.iframe = document.createElement("")); @@ -353,7 +353,7 @@ }; } xhr = null; - + return sendFile; }(Object.prototype.toString)); @@ -705,6 +705,7 @@ reset: function () { if (this.wrap) { + this.wrap.files = []; this.wrap.attach_array = []; this.wrap.attach_names = []; this.wrap.attachNum = 0; diff --git a/src/base/single/label/abstract.label.js b/src/base/single/label/abstract.label.js index c0443b39d..ab67a671a 100644 --- a/src/base/single/label/abstract.label.js +++ b/src/base/single/label/abstract.label.js @@ -24,23 +24,6 @@ }); }, - getTitle: function () { - var title = this.options.title; - var text = this.options.text; - if (BI.isFunction(title)) { - return title(); - } - if (BI.isNotNull(title)) { - return title; - } - - if (BI.isFunction(text)) { - return text(); - } - - return text; - }, - _createJson: function () { var o = this.options; diff --git a/src/base/single/label/label.js b/src/base/single/label/label.js index 98bfa3707..905efd29a 100644 --- a/src/base/single/label/label.js +++ b/src/base/single/label/label.js @@ -10,6 +10,23 @@ BI.Label = BI.inherit(BI.AbstractLabel, { keyword: "", }, + getTitle: function () { + var title = this.options.title; + var text = this.options.text; + if (BI.isFunction(title)) { + return title(); + } + if (BI.isNotNull(title)) { + return title; + } + + if (BI.isFunction(text)) { + return text(); + } + + return text; + }, + doRedMark: function () { this.text.doRedMark.apply(this.text, arguments); }, diff --git a/src/base/single/tip/tip.tooltip.js b/src/base/single/tip/tip.tooltip.js index 0357530e8..eadbd05e9 100644 --- a/src/base/single/tip/tip.tooltip.js +++ b/src/base/single/tip/tip.tooltip.js @@ -25,12 +25,10 @@ BI.Tooltip = BI.inherit(BI.Tip, { render: function () { var o = this.options; this.element.addClass("tooltip-" + o.level); - function fn(e) { o.stopPropagation && e.stopPropagation(); o.stopEvent && e.stopEvent(); } - this.element.bind({ click: fn, mousedown: fn, @@ -50,21 +48,23 @@ BI.Tooltip = BI.inherit(BI.Tip, { innerVgap: this._const.vgap, items: BI.map(texts, function (i, text) { return { - type: "bi.text", + type: "bi.label", textAlign: o.textAlign, whiteSpace: "normal", text: text, textHeight: 18, + title: null, }; }), }); } else { this.text = BI.createWidget({ - type: "bi.text", + type: "bi.label", element: this, textAlign: o.textAlign, whiteSpace: "normal", text: o.text, + title: null, textHeight: 18, hgap: this._const.hgap, vgap: this._const.vgap, diff --git a/src/router/router.js b/src/router/router.js index 40ca8f3c4..4a2cf0c2f 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -2326,7 +2326,7 @@ route.matched[lastRouteIndex] === current.matched[lastCurrentIndex] ) { this.ensureURL(); - return abort(createNavigationDuplicatedError(current, route)) + return; } var ref = resolveQueue(