Browse Source

Merge pull request #185 in ~GUY/fineui from ~WINDY/fineui:master to master

* commit '23e56722012cefbc390b55eda8291e6c52a8c529':
  update
  datepicker
master
windy 7 years ago
parent
commit
8cdd71a96f
  1. 2
      Gruntfile.js
  2. 11142
      bi/core.js
  3. 3
      bi/sliders.js
  4. 22
      bi/widget.js
  5. 22
      dist/bundle.js
  6. 22
      dist/bundle.min.js
  7. 3
      dist/sliders.js
  8. 22
      dist/widget.js
  9. 22
      src/widget/date/calendar/picker.date.js

2
Gruntfile.js

@ -154,6 +154,8 @@ module.exports = function (grunt) {
bi_coreJs: {
src: [
'src/core/jquery.js',
'src/core/underscore.js',
'src/core/foundation.js',
'src/core/mvc/**/*.js',
'src/core/base.js',

11142
bi/core.js

File diff suppressed because it is too large Load Diff

3
bi/sliders.js

@ -641,7 +641,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
}]
}],
rgap: c.EDITOR_R_GAP,
height: 70
height: 50
},
top: 0,
left: 0,
@ -875,7 +875,6 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) {
this.valueOne = valueOne;

22
bi/widget.js

@ -2007,6 +2007,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.right = BI.createWidget({
@ -2029,6 +2031,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.year = BI.createWidget({
@ -2078,11 +2082,29 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
},
_checkLeftValid: function () {
var o = this.options;
var valid = !(this._month === 0 && this._year === Date.parseDateTime(o.min, "%Y-%X-%d").getFullYear());
this.left.setEnable(valid);
return valid;
},
_checkRightValid: function () {
var o = this.options;
var valid = !(this._month === 11 && this._year === Date.parseDateTime(o.max, "%Y-%X-%d").getFullYear());
this.right.setEnable(valid);
return valid;
},
setValue: function (ob) {
this._year = ob.year;
this._month = ob.month;
this.year.setValue(ob.year);
this.month.setValue(ob.month);
this._checkLeftValid();
this._checkRightValid();
},
getValue: function () {

22
dist/bundle.js vendored

@ -80506,6 +80506,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.right = BI.createWidget({
@ -80528,6 +80530,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.year = BI.createWidget({
@ -80577,11 +80581,29 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
},
_checkLeftValid: function () {
var o = this.options;
var valid = !(this._month === 0 && this._year === Date.parseDateTime(o.min, "%Y-%X-%d").getFullYear());
this.left.setEnable(valid);
return valid;
},
_checkRightValid: function () {
var o = this.options;
var valid = !(this._month === 11 && this._year === Date.parseDateTime(o.max, "%Y-%X-%d").getFullYear());
this.right.setEnable(valid);
return valid;
},
setValue: function (ob) {
this._year = ob.year;
this._month = ob.month;
this.year.setValue(ob.year);
this.month.setValue(ob.month);
this._checkLeftValid();
this._checkRightValid();
},
getValue: function () {

22
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/sliders.js vendored

@ -641,7 +641,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
}]
}],
rgap: c.EDITOR_R_GAP,
height: 70
height: 50
},
top: 0,
left: 0,
@ -875,7 +875,6 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
var valueOne = BI.parseFloat(v.min);
var valueTwo = BI.parseFloat(v.max);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
valueOne = o.digit === false ? valueOne : valueOne.toFixed(o.digit);
if (!isNaN(valueOne) && !isNaN(valueTwo)) {
if (this._checkValidation(valueOne)) {
this.valueOne = valueOne;

22
dist/widget.js vendored

@ -2007,6 +2007,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.right = BI.createWidget({
@ -2029,6 +2031,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.year = BI.createWidget({
@ -2078,11 +2082,29 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
},
_checkLeftValid: function () {
var o = this.options;
var valid = !(this._month === 0 && this._year === Date.parseDateTime(o.min, "%Y-%X-%d").getFullYear());
this.left.setEnable(valid);
return valid;
},
_checkRightValid: function () {
var o = this.options;
var valid = !(this._month === 11 && this._year === Date.parseDateTime(o.max, "%Y-%X-%d").getFullYear());
this.right.setEnable(valid);
return valid;
},
setValue: function (ob) {
this._year = ob.year;
this._month = ob.month;
this.year.setValue(ob.year);
this.month.setValue(ob.month);
this._checkLeftValid();
this._checkRightValid();
},
getValue: function () {

22
src/widget/date/calendar/picker.date.js

@ -38,6 +38,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.right = BI.createWidget({
@ -60,6 +62,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
});
this.year = BI.createWidget({
@ -109,11 +113,29 @@ BI.DatePicker = BI.inherit(BI.Widget, {
})
},
_checkLeftValid: function () {
var o = this.options;
var valid = !(this._month === 0 && this._year === Date.parseDateTime(o.min, "%Y-%X-%d").getFullYear());
this.left.setEnable(valid);
return valid;
},
_checkRightValid: function () {
var o = this.options;
var valid = !(this._month === 11 && this._year === Date.parseDateTime(o.max, "%Y-%X-%d").getFullYear());
this.right.setEnable(valid);
return valid;
},
setValue: function (ob) {
this._year = ob.year;
this._month = ob.month;
this.year.setValue(ob.year);
this.month.setValue(ob.month);
this._checkLeftValid();
this._checkRightValid();
},
getValue: function () {

Loading…
Cancel
Save