forked from olton/metroui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.js
More file actions
51 lines (38 loc) · 1.24 KB
/
plugin.js
File metadata and controls
51 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* global Metro */
(function(Metro, $) {
'use strict';
var MyObjectDefaultConfig = {
onMyObjectCreate: Metro.noop
};
Metro.myObjectSetup = function (options) {
MyObjectDefaultConfig = $.extend({}, MyObjectDefaultConfig, options);
};
if (typeof window["metroMyObjectSetup"] !== undefined) {
Metro.myObjectSetup(window["metroMyObjectSetup"]);
}
Metro.Component('name', {
init: function( options, elem ) {
this._super(elem, options, MyObjectDefaultConfig, {
// define instance vars here
});
return this;
},
_create: function(){
var that = this, element = this.element, o = this.options;
this._createStructure();
this._createEvents();
this._fireEvent('component-create');
},
_createStructure: function(){
var that = this, element = this.element, o = this.options;
},
_createEvents: function(){
var that = this, element = this.element, o = this.options;
},
changeAttribute: function(attr, newValue){
},
destroy: function(){
this.element.remove();
}
});
}(Metro, m4q));