This commit is contained in:
2021-10-06 22:13:08 +03:00
parent 51fe7cf2ff
commit e6eda2d0be
14 changed files with 165 additions and 54 deletions
+27 -5
View File
@@ -5,8 +5,9 @@
kit.PluginManager.register('UserActionManager',function(module, exports, require, global) {
var Collection = require('collection');
var support = require('support');
var actionList = ['click', 'hover'];
var actionList = ['popover', 'hint'];
var UserAction = function () {
@@ -82,7 +83,7 @@ kit.PluginManager.register('UserActionManager',function(module, exports, require
break;
}
};
proto.addDocumentEventListener = function() {
document.addEventListener('click', this.documentListenerHandler, false);
};
@@ -157,11 +158,32 @@ kit.PluginManager.register('UserActionManager',function(module, exports, require
/**
* @memberof kitCore
* @instance
* @class UserActionManager
* @memberOf kit
*/
var UserActionManager = function () {
var UserActionManager = function (actions = []) {
this.test = new Collection([]);
this.collection = new Collection([]);
if(!Array.isArray(actions)) {
actions = [actions];
}
actions.forEach(function (act) {
}.bind(this));
/**
* @static
*/
this.actions = {
popover: 'popover',
hint: 'hint',
};
return this;
};
UserActionManager.prototype.setAction = function(action){
this.action = action;
this.collection.put();
};
return module.exports = UserActionManager;