mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
migrate editing a context and refactor project with it
This commit is contained in:
parent
4e9777dc88
commit
fb39d841a7
13 changed files with 163 additions and 43 deletions
|
|
@ -629,7 +629,8 @@ $(document).ready(function() {
|
|||
async: true,
|
||||
buttons_dom_elem: $(this),
|
||||
beforeSend: function() {
|
||||
this.buttons_dom_elem.block({message: null});}
|
||||
this.buttons_dom_elem.block({message: null});},
|
||||
complete: function() {this.buttons_dom_elem.unblock();}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
|
@ -654,6 +655,31 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
/* set behavior for edit context settings link in projects list page and project page
|
||||
* TODO: refactor this and the edit for project because the function looks the same */
|
||||
$("a.context_edit_settings").live('click', function (ev) {
|
||||
$.ajax({
|
||||
url: this.href,
|
||||
async: true,
|
||||
context_dom_elem: $(this).parent().parent(),
|
||||
dataType: 'script',
|
||||
beforeSend: function() {this.context_dom_elem.block({message: null});},
|
||||
complete:function() {this.context_dom_elem.unblock(); enable_rich_interaction();}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("form.edit-context-form button.positive").live('click', function (ev) {
|
||||
$('form.edit-context-form').ajaxSubmit({
|
||||
type: 'POST',
|
||||
async: true,
|
||||
buttons_dom_elem: $(this),
|
||||
beforeSend: function() {
|
||||
this.buttons_dom_elem.block({message: null});},
|
||||
complete: function() {this.buttons_dom_elem.unblock();}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("form#context-form button.positive").live('click', function (ev) {
|
||||
$('form.#context-form').ajaxSubmit({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue