Browse Source

Merge pull request #188 in FUI/fineui from ~GUY/fineui:master to master

* commit 'c285aa6ea39dfa02266e6f68d3a8bdf118e88c57':
  update
  update
es6
guy 7 years ago
parent
commit
7d059d93ac
  1. 7
      bi/base.js
  2. 24
      bi/core.js
  3. 7
      dist/base.js
  4. 31
      dist/bundle.js
  5. 28
      dist/bundle.min.js
  6. 24
      dist/core.js
  7. 7
      src/base/single/button/button.basic.js
  8. 24
      src/core/inject.js

7
bi/base.js

@ -763,7 +763,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
return;
}
interval = setInterval(function () {
if(self.isEnabled()){
if (self.isEnabled()) {
self.doClick();
}
}, 100);
@ -805,7 +805,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_trigger: function () {
var o = this.options;
if(!this.isEnabled()){
if (!this.isEnabled()) {
return;
}
if (!this.isDisableSelected()) {
@ -818,6 +818,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, o);
}
}
},

24
bi/core.js

@ -20165,7 +20165,7 @@ BI.extend(BI.DOM, {
};
var storeInjection = {};
BI.stores = function (xtype, cls) {
BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed");
}
@ -20192,6 +20192,20 @@ BI.extend(BI.DOM, {
}
}
var actions = {}
BI.action = function (type, actionFn) {
if (!actions[type]) {
actions[type] = [];
}
actions[type].push(actionFn)
return function () {
actions[type].remove(actionFn);
if (actions[type].length === 0) {
delete actions[type];
}
}
}
BI.Constants = {
getConstant: function (type) {
return constantInjection[type];
@ -20228,6 +20242,14 @@ BI.extend(BI.DOM, {
return providerInstance[type];
}
}
BI.Actions = {
runAction: function (type, config) {
BI.each(actions[type], function (i, act) {
act(config);
})
}
}
})();
/**
* guy

7
dist/base.js vendored

@ -763,7 +763,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
return;
}
interval = setInterval(function () {
if(self.isEnabled()){
if (self.isEnabled()) {
self.doClick();
}
}, 100);
@ -805,7 +805,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_trigger: function () {
var o = this.options;
if(!this.isEnabled()){
if (!this.isEnabled()) {
return;
}
if (!this.isDisableSelected()) {
@ -818,6 +818,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, o);
}
}
},

31
dist/bundle.js vendored

@ -20165,7 +20165,7 @@ BI.extend(BI.DOM, {
};
var storeInjection = {};
BI.stores = function (xtype, cls) {
BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed");
}
@ -20192,6 +20192,20 @@ BI.extend(BI.DOM, {
}
}
var actions = {}
BI.action = function (type, actionFn) {
if (!actions[type]) {
actions[type] = [];
}
actions[type].push(actionFn)
return function () {
actions[type].remove(actionFn);
if (actions[type].length === 0) {
delete actions[type];
}
}
}
BI.Constants = {
getConstant: function (type) {
return constantInjection[type];
@ -20228,6 +20242,14 @@ BI.extend(BI.DOM, {
return providerInstance[type];
}
}
BI.Actions = {
runAction: function (type, config) {
BI.each(actions[type], function (i, act) {
act(config);
})
}
}
})();
/**
* guy
@ -26588,7 +26610,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
return;
}
interval = setInterval(function () {
if(self.isEnabled()){
if (self.isEnabled()) {
self.doClick();
}
}, 100);
@ -26630,7 +26652,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_trigger: function () {
var o = this.options;
if(!this.isEnabled()){
if (!this.isEnabled()) {
return;
}
if (!this.isDisableSelected()) {
@ -26643,6 +26665,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, o);
}
}
},

28
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

24
dist/core.js vendored

@ -20165,7 +20165,7 @@ BI.extend(BI.DOM, {
};
var storeInjection = {};
BI.stores = function (xtype, cls) {
BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed");
}
@ -20192,6 +20192,20 @@ BI.extend(BI.DOM, {
}
}
var actions = {}
BI.action = function (type, actionFn) {
if (!actions[type]) {
actions[type] = [];
}
actions[type].push(actionFn)
return function () {
actions[type].remove(actionFn);
if (actions[type].length === 0) {
delete actions[type];
}
}
}
BI.Constants = {
getConstant: function (type) {
return constantInjection[type];
@ -20228,6 +20242,14 @@ BI.extend(BI.DOM, {
return providerInstance[type];
}
}
BI.Actions = {
runAction: function (type, config) {
BI.each(actions[type], function (i, act) {
act(config);
})
}
}
})();
/**
* guy

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

@ -176,7 +176,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
return;
}
interval = setInterval(function () {
if(self.isEnabled()){
if (self.isEnabled()) {
self.doClick();
}
}, 100);
@ -218,7 +218,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_trigger: function () {
var o = this.options;
if(!this.isEnabled()){
if (!this.isEnabled()) {
return;
}
if (!this.isDisableSelected()) {
@ -231,6 +231,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, o);
}
}
},

24
src/core/inject.js

@ -16,7 +16,7 @@
};
var storeInjection = {};
BI.stores = function (xtype, cls) {
BI.store = function (xtype, cls) {
if (storeInjection[xtype] != null) {
throw ("store:[" + xtype + "] has been registed");
}
@ -43,6 +43,20 @@
}
}
var actions = {}
BI.action = function (type, actionFn) {
if (!actions[type]) {
actions[type] = [];
}
actions[type].push(actionFn)
return function () {
actions[type].remove(actionFn);
if (actions[type].length === 0) {
delete actions[type];
}
}
}
BI.Constants = {
getConstant: function (type) {
return constantInjection[type];
@ -79,4 +93,12 @@
return providerInstance[type];
}
}
BI.Actions = {
runAction: function (type, config) {
BI.each(actions[type], function (i, act) {
act(config);
})
}
}
})();

Loading…
Cancel
Save