mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-01 14:58:50 +01:00
New todo form working with Ajax
This commit is contained in:
parent
e43a7945d5
commit
a09b55d6b6
4 changed files with 18 additions and 72 deletions
|
|
@ -220,6 +220,15 @@ function setup_container_toggles(){
|
|||
});
|
||||
}
|
||||
|
||||
function askIfNewContextProvided() {
|
||||
var givenContextName = $('#todo_context_name').val();
|
||||
if (givenContextName.length == 0) return true; // do nothing and depend on rails validation error
|
||||
for (var i = 0; i < contextNames.length; ++i) {
|
||||
if (contextNames[i] == givenContextName) return true;
|
||||
}
|
||||
return confirm('New context "' + givenContextName + '" will be also created. Are you sure?');
|
||||
}
|
||||
|
||||
/* Unobtrusive jQuery behavior */
|
||||
|
||||
$(document).ready(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue