vpn.email
Version:
vpn.email client
39 lines (28 loc) • 787 B
JavaScript
$.widget( "metro.widget" , {
version: "1.0.0",
options: {
someValue: null
},
_create: function () {
var that = this, element = this.element, o = this.options;
this._setOptionsFromDOM();
element.data('widget', this);
},
_setOptionsFromDOM: function(){
var that = this, element = this.element, o = this.options;
$.each(element.data(), function(key, value){
if (key in o) {
try {
o[key] = $.parseJSON(value);
} catch (e) {
o[key] = value;
}
}
});
},
_destroy: function () {
},
_setOption: function ( key, value ) {
this._super('_setOption', key, value);
}
});