This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function addStatus(options) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| - data: { text: $('#new-status textarea').val() }, | |
| - success: function(data) { | |
| - $('#statuses ul').append('<li>' + data.text + '</li>'); | |
| - $('#new-status textarea').val(''); | |
| - } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -function addStatus(options) { | |
| +var Statuses = function() { | |
| +}; | |
| +Statuses.prototype.add = function(options) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| data: { text: options.text }, | |
| success: options.success |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Statuses = function() { | |
| }; | |
| Statuses.prototype.add = function(options) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| data: { text: options.text }, | |
| success: options.success | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Statuses = function() { | |
| }; | |
| Statuses.prototype.add = function(options) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| data: { text: options.text }, | |
| success: options.success | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Statuses = function() { | |
| }; | |
| Statuses.prototype.add = function(options) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| data: { text: options.text }, | |
| success: options.success | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Statuses = function() { | |
| }; | |
| Statuses.prototype.add = function(options) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| data: { text: options.text }, | |
| success: options.success | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +var events = _.clone(Backbone.Events); | |
| + | |
| var Statuses = function() { | |
| }; | |
| Statuses.prototype.add = function(options) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| data: { text: options.text }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var events = _.clone(Backbone.Events); | |
| var Statuses = function() { | |
| }; | |
| -Statuses.prototype.add = function(options) { | |
| +Statuses.prototype.add = function(text) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var events = _.clone(Backbone.Events); | |
| var Statuses = function() { | |
| }; | |
| Statuses.prototype.add = function(text) { | |
| $.ajax({ | |
| url: '/status', | |
| type: 'POST', | |
| dataType: 'json', | |
| data: { text: text }, |