Sha256: 7178a50a276bfd16a00191b15cb2694df8f2d22528d185411985d6500b030861
Contents?: true
Size: 506 Bytes
Versions: 6
Compression:
Stored size: 506 Bytes
Contents
UserModel = -> self = this self.email = ko.observable() self.password = ko.observable() self.subscriptions = ko.observableArray() self.login = -> $.post('/dashboard.json', {email: self.email(), password: self.password()}, (data) -> ko.mapping.fromJS(data, {}, self) ) false return ko.applyBindings(window.viewModel = new UserModel()) $(document).ajaxSend(-> $('#btnLogin').button('loading') ) $(document).ajaxComplete(-> $('#btnLogin').button('reset') )
Version data entries
6 entries across 6 versions & 1 rubygems