Created
October 8, 2013 04:17
-
-
Save ankurkaushal/6879379 to your computer and use it in GitHub Desktop.
App.js
This file contains 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
App.ProjectController = Ember.ArrayController.extend({ | |
)}; | |
App.Project = App.Model.extend({ | |
id : null, | |
projectname : null, | |
projectdesc : null, | |
projectbudget : null | |
}); | |
App.ProjectRoute = Ember.Route.extend({ | |
}); | |
App.Project.reopenClass({ | |
createNew : function() { | |
//Grab TextBox values and store them in dataString. | |
dataString = { | |
'projectname' : $("#projectname").val(), //These are the form fields | |
'projectdesc' : $("#projectdesc").val(), | |
'projectbudget' : $("#projectbudget").val() | |
}; | |
console.log('check'); | |
//Breakpoint for checking any inconsistencies | |
$.ajax({ | |
type : "POST", | |
url : "http://pioneerdev.us/users/createNewProject", | |
data : dataString, | |
dataType : "json", | |
success : function(data) { | |
console.log('success'); | |
alert(''); | |
} | |
}); | |
return false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment