Skip to content

Instantly share code, notes, and snippets.

@makishvili
Created July 21, 2014 09:08
Show Gist options
  • Save makishvili/b1ae862b9df74e1f6110 to your computer and use it in GitHub Desktop.
Save makishvili/b1ae862b9df74e1f6110 to your computer and use it in GitHub Desktop.
modules.define(
'add-analyst',
['inherit', 'y-block'],
function (provide, inherit, YBlock) {
var AddAnalyst = inherit(YBlock, {
__constructor: function () {
this.__base.apply(this, arguments);
var input = this._findElement('input');
var button = this._findElement('button');
this._bindTo(button, 'submit', this._onFormSubmit);
},
_onFormSubmit: function (e) {
e.preventDefault();
console.log('clicked');
}
}, {
getBlockName: function () {
return 'add-analyst';
}
});
provide(AddAnalyst);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment