Browse Source

fix: toGMTString已经被废除,使用toUTCString代替

es6
qcc 5 years ago
parent
commit
b423643ce6
  1. 4
      dist/core.js
  2. 2
      dist/core_without_normalize.css.map
  3. 4
      dist/fineui.ie.js
  4. 4
      dist/fineui.js
  5. 65
      dist/fineui_without_jquery_polyfill.js
  6. 2
      dist/fineui_without_jquery_polyfill.js.map
  7. 4
      dist/utils.js
  8. 4
      src/core/utils/cache.js

4
dist/core.js vendored

@ -14861,7 +14861,7 @@ BI.Cache = {
var date = new Date(); var date = new Date();
// expires是标准GMT格式时间,应该使用时间戳作为起始时间 // expires是标准GMT格式时间,应该使用时间戳作为起始时间
date.setTime(date.getTime() + expiresHours * 3600 * 1000); date.setTime(date.getTime() + expiresHours * 3600 * 1000);
cookieString = cookieString + "; expires=" + date.toGMTString(); cookieString = cookieString + "; expires=" + date.toUTCString();
} }
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
@ -14876,7 +14876,7 @@ BI.Cache = {
deleteCookie: function (name, path) { deleteCookie: function (name, path) {
var date = new Date(); var date = new Date();
date.setTime(date.getTime() - 10000); date.setTime(date.getTime() - 10000);
var cookieString = name + "=v; expires=" + date.toGMTString(); var cookieString = name + "=v; expires=" + date.toUTCString();
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
} }

2
dist/core_without_normalize.css.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.js vendored

@ -15108,7 +15108,7 @@ BI.Cache = {
var date = new Date(); var date = new Date();
// expires是标准GMT格式时间,应该使用时间戳作为起始时间 // expires是标准GMT格式时间,应该使用时间戳作为起始时间
date.setTime(date.getTime() + expiresHours * 3600 * 1000); date.setTime(date.getTime() + expiresHours * 3600 * 1000);
cookieString = cookieString + "; expires=" + date.toGMTString(); cookieString = cookieString + "; expires=" + date.toUTCString();
} }
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
@ -15123,7 +15123,7 @@ BI.Cache = {
deleteCookie: function (name, path) { deleteCookie: function (name, path) {
var date = new Date(); var date = new Date();
date.setTime(date.getTime() - 10000); date.setTime(date.getTime() - 10000);
var cookieString = name + "=v; expires=" + date.toGMTString(); var cookieString = name + "=v; expires=" + date.toUTCString();
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
} }

4
dist/fineui.js vendored

@ -15108,7 +15108,7 @@ BI.Cache = {
var date = new Date(); var date = new Date();
// expires是标准GMT格式时间,应该使用时间戳作为起始时间 // expires是标准GMT格式时间,应该使用时间戳作为起始时间
date.setTime(date.getTime() + expiresHours * 3600 * 1000); date.setTime(date.getTime() + expiresHours * 3600 * 1000);
cookieString = cookieString + "; expires=" + date.toGMTString(); cookieString = cookieString + "; expires=" + date.toUTCString();
} }
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
@ -15123,7 +15123,7 @@ BI.Cache = {
deleteCookie: function (name, path) { deleteCookie: function (name, path) {
var date = new Date(); var date = new Date();
date.setTime(date.getTime() - 10000); date.setTime(date.getTime() - 10000);
var cookieString = name + "=v; expires=" + date.toGMTString(); var cookieString = name + "=v; expires=" + date.toUTCString();
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
} }

65
dist/fineui_without_jquery_polyfill.js vendored

@ -14859,8 +14859,9 @@ BI.Cache = {
// 判断是否设置过期时间 // 判断是否设置过期时间
if (expiresHours && expiresHours > 0) { if (expiresHours && expiresHours > 0) {
var date = new Date(); var date = new Date();
date.setTime(BI.getTime() + expiresHours * 3600 * 1000); // expires是标准GMT格式时间,应该使用时间戳作为起始时间
cookieString = cookieString + "; expires=" + date.toGMTString(); date.setTime(date.getTime() + expiresHours * 3600 * 1000);
cookieString = cookieString + "; expires=" + date.toUTCString();
} }
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
@ -14874,8 +14875,8 @@ BI.Cache = {
}, },
deleteCookie: function (name, path) { deleteCookie: function (name, path) {
var date = new Date(); var date = new Date();
date.setTime(BI.getTime() - 10000); date.setTime(date.getTime() - 10000);
var cookieString = name + "=v; expires=" + date.toGMTString(); var cookieString = name + "=v; expires=" + date.toUTCString();
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
} }
@ -47837,6 +47838,7 @@ BI.extend(BI.DynamicDateCard, {
toggle: false, toggle: false,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
destroyWhenHide: true,
el: { el: {
type: "bi.dynamic_date_trigger", type: "bi.dynamic_date_trigger",
min: opts.minDate, min: opts.minDate,
@ -47981,9 +47983,9 @@ BI.extend(BI.DynamicDateCard, {
listeners: [{ listeners: [{
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: function () { action: function () {
self.popup.setValue(self.storeValue);
self.popup.setMinDate(opts.minDate); self.popup.setMinDate(opts.minDate);
self.popup.setMaxDate(opts.maxDate); self.popup.setMaxDate(opts.maxDate);
self.popup.setValue(self.storeValue);
self.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW); self.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW);
} }
}] }]
@ -48397,16 +48399,16 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
setMinDate: function (minDate) { setMinDate: function (minDate) {
if (this.options.min !== minDate) { if (this.options.min !== minDate) {
this.options.min = minDate;
this.ymd.setMinDate(minDate); this.ymd.setMinDate(minDate);
} }
this.options.min = minDate;
}, },
setMaxDate: function (maxDate) { setMaxDate: function (maxDate) {
if (this.options.max !== maxDate) { if (this.options.max !== maxDate) {
this.options.max = maxDate;
this.ymd.setMaxDate(maxDate); this.ymd.setMaxDate(maxDate);
} }
this.options.max = maxDate;
}, },
setValue: function (v) { setValue: function (v) {
@ -48845,6 +48847,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
destroyWhenHide: true,
container: opts.container, container: opts.container,
ref: function () { ref: function () {
self.combo = this; self.combo = this;
@ -49001,6 +49004,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: function () { action: function () {
self.popup.setValue(self.storeValue); self.popup.setValue(self.storeValue);
self.popup.setMinDate(opts.minDate);
self.popup.setMaxDate(opts.maxDate);
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW);
} }
}], }],
@ -49307,16 +49312,16 @@ BI.extend(BI.DynamicDateTimeCombo, {
setMinDate: function (minDate) { setMinDate: function (minDate) {
if (this.options.min !== minDate) { if (this.options.min !== minDate) {
this.options.min = minDate;
this.ymd.setMinDate(minDate); this.ymd.setMinDate(minDate);
} }
this.options.min = minDate;
}, },
setMaxDate: function (maxDate) { setMaxDate: function (maxDate) {
if (this.options.max !== maxDate) { if (this.options.max !== maxDate) {
this.options.max = maxDate;
this.ymd.setMaxDate(maxDate); this.ymd.setMaxDate(maxDate);
} }
this.options.max = maxDate;
}, },
setValue: function (v) { setValue: function (v) {
@ -50711,11 +50716,15 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
valueTwo = BI.parseFloat(valueTwo); valueTwo = BI.parseFloat(valueTwo);
if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) { if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) {
var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left); var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left);
this.labelOne.element.css({left: isSliderOneLeft ? "0%" : "100%"}); this._resetLabelPosition(!isSliderOneLeft);
this.labelTwo.element.css({left: isSliderOneLeft ? "100%" : "0%"});
} }
}, },
_resetLabelPosition: function(needReverse) {
this.labelOne.element.css({left: needReverse ? "100%" : "0%"});
this.labelTwo.element.css({left: needReverse ? "0%" : "100%"});
},
_setSliderOnePosition: function (percent) { _setSliderOnePosition: function (percent) {
this.sliderOne.element.css({left: percent + "%"}); this.sliderOne.element.css({left: percent + "%"});
}, },
@ -50858,8 +50867,8 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
var o = this.options; var o = this.options;
var valueOne = BI.parseFloat(v.min); var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max); var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit); valueOne = o.digit === false ? valueOne : BI.parseFloat(valueOne.toFixed(o.digit));
valueTwo = o.digit === false ? valueTwo : valueTwo.toFixed(o.digit); valueTwo = o.digit === false ? valueTwo : BI.parseFloat(valueTwo.toFixed(o.digit));
if (!isNaN(valueOne) && !isNaN(valueTwo)) { if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) { if (this._checkValidation(valueOne)) {
this.valueOne = (this.valueOne <= this.valueTwo ? valueOne : valueTwo); this.valueOne = (this.valueOne <= this.valueTwo ? valueOne : valueTwo);
@ -50900,6 +50909,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
this.labelTwo.setValue(this.max); this.labelTwo.setValue(this.max);
this._setAllPosition(0, 100); this._setAllPosition(0, 100);
} }
this._resetLabelPosition();
} }
} }
}); });
@ -54541,7 +54551,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
toggle: false, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,
adjustLength: 1, adjustLength: 1,
@ -54976,7 +54986,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
toggle: false, toggle: !o.allowEdit,
el: this.trigger, el: this.trigger,
adjustLength: 1, adjustLength: 1,
container: o.container, container: o.container,
@ -57376,6 +57386,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
type: "bi.multi_select_editor", type: "bi.multi_select_editor",
height: o.height, height: o.height,
text: o.text, text: o.text,
watermark: o.watermark,
listeners: [{ listeners: [{
eventName: BI.MultiSelectEditor.EVENT_FOCUS, eventName: BI.MultiSelectEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -59018,7 +59029,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-combo", baseCls: "bi-multi-tree-combo",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24 height: 24,
allowEdit: true
}); });
}, },
@ -59034,6 +59046,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height, height: o.height,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
text: o.text, text: o.text,
@ -59051,7 +59064,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
toggle: false, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,
adjustLength: 1, adjustLength: 1,
@ -59402,7 +59415,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
toggle: false, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,
adjustLength: 1, adjustLength: 1,
@ -59769,7 +59782,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
toggle: false, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,
adjustLength: 1, adjustLength: 1,
@ -60442,6 +60455,8 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.multi_select_editor", type: "bi.multi_select_editor",
height: o.height, height: o.height,
text: o.text,
watermark: o.watermark,
el: { el: {
type: "bi.simple_state_editor", type: "bi.simple_state_editor",
height: o.height height: o.height
@ -68683,18 +68698,18 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
setMinDate: function (minDate) { setMinDate: function (minDate) {
if (this.options.min !== minDate) { if (this.options.min !== minDate) {
this.options.min = minDate;
this.yearPicker.setMinDate(minDate); this.yearPicker.setMinDate(minDate);
this._checkMonthStatus(this.selectedYear); this._checkMonthStatus(this.selectedYear);
} }
this.options.min = minDate;
}, },
setMaxDate: function (maxDate) { setMaxDate: function (maxDate) {
if (this.options.max !== maxDate) { if (this.options.max !== maxDate) {
this.options.max = maxDate;
this.yearPicker.setMaxDate(maxDate); this.yearPicker.setMaxDate(maxDate);
this._checkMonthStatus(this.selectedYear); this._checkMonthStatus(this.selectedYear);
} }
this.options.max = maxDate;
}, },
getValue: function () { getValue: function () {
@ -69086,16 +69101,16 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
setMinDate: function (minDate) { setMinDate: function (minDate) {
if (this.options.min !== minDate) { if (this.options.min !== minDate) {
this.options.min = minDate;
this.year.setMinDate(minDate); this.year.setMinDate(minDate);
} }
this.options.min = minDate;
}, },
setMaxDate: function (maxDate) { setMaxDate: function (maxDate) {
if (this.options.max !== maxDate) { if (this.options.max !== maxDate) {
this.options.max = maxDate;
this.year.setMaxDate(maxDate); this.year.setMaxDate(maxDate);
} }
this.options.max = maxDate;
}, },
setValue: function (v) { setValue: function (v) {
@ -71820,6 +71835,7 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
} }
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.multi_tree_insert_combo", type: "bi.multi_tree_insert_combo",
allowEdit: o.allowEdit,
text: o.text, text: o.text,
value: o.value, value: o.value,
watermark: o.watermark, watermark: o.watermark,
@ -71910,6 +71926,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.multi_tree_combo", type: "bi.multi_tree_combo",
text: o.text, text: o.text,
allowEdit: o.allowEdit,
value: o.value, value: o.value,
watermark: o.watermark, watermark: o.watermark,
element: this, element: this,
@ -72140,6 +72157,7 @@ BI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.multi_select_insert_combo", type: "bi.multi_select_insert_combo",
element: this, element: this,
allowEdit: o.allowEdit,
text: o.text, text: o.text,
value: o.value, value: o.value,
itemsCreator: BI.bind(this._itemsCreator, this), itemsCreator: BI.bind(this._itemsCreator, this),
@ -72235,6 +72253,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.multi_select_combo", type: "bi.multi_select_combo",
element: this, element: this,
allowEdit: o.allowEdit,
text: o.text, text: o.text,
value: o.value, value: o.value,
itemsCreator: BI.bind(this._itemsCreator, this), itemsCreator: BI.bind(this._itemsCreator, this),

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.js vendored

@ -16273,7 +16273,7 @@ BI.Cache = {
var date = new Date(); var date = new Date();
// expires是标准GMT格式时间,应该使用时间戳作为起始时间 // expires是标准GMT格式时间,应该使用时间戳作为起始时间
date.setTime(date.getTime() + expiresHours * 3600 * 1000); date.setTime(date.getTime() + expiresHours * 3600 * 1000);
cookieString = cookieString + "; expires=" + date.toGMTString(); cookieString = cookieString + "; expires=" + date.toUTCString();
} }
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
@ -16288,7 +16288,7 @@ BI.Cache = {
deleteCookie: function (name, path) { deleteCookie: function (name, path) {
var date = new Date(); var date = new Date();
date.setTime(date.getTime() - 10000); date.setTime(date.getTime() - 10000);
var cookieString = name + "=v; expires=" + date.toGMTString(); var cookieString = name + "=v; expires=" + date.toUTCString();
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
} }

4
src/core/utils/cache.js

@ -53,7 +53,7 @@ BI.Cache = {
var date = new Date(); var date = new Date();
// expires是标准GMT格式时间,应该使用时间戳作为起始时间 // expires是标准GMT格式时间,应该使用时间戳作为起始时间
date.setTime(date.getTime() + expiresHours * 3600 * 1000); date.setTime(date.getTime() + expiresHours * 3600 * 1000);
cookieString = cookieString + "; expires=" + date.toGMTString(); cookieString = cookieString + "; expires=" + date.toUTCString();
} }
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
@ -68,7 +68,7 @@ BI.Cache = {
deleteCookie: function (name, path) { deleteCookie: function (name, path) {
var date = new Date(); var date = new Date();
date.setTime(date.getTime() - 10000); date.setTime(date.getTime() - 10000);
var cookieString = name + "=v; expires=" + date.toGMTString(); var cookieString = name + "=v; expires=" + date.toUTCString();
if (path) { if (path) {
cookieString = cookieString + "; path=" + path; cookieString = cookieString + "; path=" + path;
} }

Loading…
Cancel
Save