Browse Source

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

* commit '9b446078cb656f62c09046b3106afc447e28eb4d':
  长按button
master
windy 8 years ago
parent
commit
6e3b8ff49b
  1. 6
      bi/base.js
  2. 4
      bi/widget.js
  3. 6
      docs/base.js
  4. 4
      docs/widget.js
  5. 6
      src/base/single/button/button.basic.js
  6. 4
      src/widget/finetuningnumbereditor/finetuning.number.editor.js

6
bi/base.js

@ -685,7 +685,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
return;
}
hand = hand.element;
switch (o.trigger) {
var triggerArr = (o.trigger || "").split(",");
BI.each(triggerArr, function (idx, trigger) {
switch (trigger) {
case "mouseup":
var mouseDown = false;
hand.mousedown(function () {
@ -774,6 +776,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
hand.click(clk);
break;
}
});
//之后的300ms点击无效
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true);

4
bi/widget.js

@ -7055,6 +7055,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
@ -7063,6 +7064,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
@ -7105,7 +7107,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
_finetuning: function(add){
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
this.bottomBtn.setEnable((v + add) !== -1);
this.bottomBtn.setEnable((v + add) > -1);
},
getValue: function () {

6
docs/base.js

@ -685,7 +685,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
return;
}
hand = hand.element;
switch (o.trigger) {
var triggerArr = (o.trigger || "").split(",");
BI.each(triggerArr, function (idx, trigger) {
switch (trigger) {
case "mouseup":
var mouseDown = false;
hand.mousedown(function () {
@ -774,6 +776,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
hand.click(clk);
break;
}
});
//之后的300ms点击无效
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true);

4
docs/widget.js

@ -7055,6 +7055,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
@ -7063,6 +7064,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
@ -7105,7 +7107,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
_finetuning: function(add){
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
this.bottomBtn.setEnable((v + add) !== -1);
this.bottomBtn.setEnable((v + add) > -1);
},
getValue: function () {

6
src/base/single/button/button.basic.js

@ -102,7 +102,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
return;
}
hand = hand.element;
switch (o.trigger) {
var triggerArr = (o.trigger || "").split(",");
BI.each(triggerArr, function (idx, trigger) {
switch (trigger) {
case "mouseup":
var mouseDown = false;
hand.mousedown(function () {
@ -191,6 +193,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
hand.click(clk);
break;
}
});
//之后的300ms点击无效
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true);

4
src/widget/finetuningnumbereditor/finetuning.number.editor.js

@ -27,6 +27,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
@ -35,6 +36,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
@ -77,7 +79,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
_finetuning: function(add){
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
this.bottomBtn.setEnable((v + add) !== -1);
this.bottomBtn.setEnable((v + add) > -1);
},
getValue: function () {

Loading…
Cancel
Save