Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
35
gaia/apps/keyboard/js/views/base_view.js
Executable file
35
gaia/apps/keyboard/js/views/base_view.js
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
(function(exports) {
|
||||
|
||||
/**
|
||||
* BaseView is the base of all simple views in the keyboard app.
|
||||
* It provides the common interface like, highlight() and hide().
|
||||
*/
|
||||
function BaseView(target, options, viewManager) {
|
||||
this.target = target;
|
||||
this.options = options;
|
||||
this.viewManager = viewManager;
|
||||
}
|
||||
|
||||
// element property is the DOM element created by this View instance.
|
||||
BaseView.prototype.element = null;
|
||||
|
||||
BaseView.prototype.highlight = function() {
|
||||
this.element.classList.add('highlighted');
|
||||
};
|
||||
|
||||
BaseView.prototype.unHighlight = function() {
|
||||
this.element.classList.remove('highlighted');
|
||||
};
|
||||
|
||||
BaseView.prototype.show = function() {
|
||||
this.element.classList.remove('hide');
|
||||
};
|
||||
|
||||
BaseView.prototype.hide = function() {
|
||||
this.element.classList.add('hide');
|
||||
};
|
||||
|
||||
exports.BaseView = BaseView;
|
||||
|
||||
})(window);
|
||||
Loading…
Reference in a new issue