diff options
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/issues.js.coffee | 13 | ||||
-rw-r--r-- | app/assets/javascripts/notes.js | 9 |
2 files changed, 17 insertions, 5 deletions
diff --git a/app/assets/javascripts/issues.js.coffee b/app/assets/javascripts/issues.js.coffee index 67d9498c50a..c273ddbd391 100644 --- a/app/assets/javascripts/issues.js.coffee +++ b/app/assets/javascripts/issues.js.coffee @@ -22,7 +22,7 @@ backgroundColor: '#DDD' opacity: .4 ) - + reload: -> Issues.initSelects() Issues.initChecks() @@ -54,7 +54,16 @@ unless terms is last_terms last_terms = terms if terms.length >= 2 or terms.length is 0 - form.submit() + $.ajax + type: "GET" + url: location.href + data: "issue_search=" + terms + complete: -> + $(".loading").hide() + success: (data) -> + $('.issues-holder').html(data.html) + Issues.reload() + dataType: "json" checkChanged: -> checked_issues = $(".selected_issue:checked") diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index defbf81f580..e39bfc0f792 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -6,7 +6,7 @@ var NoteList = { target_type: null, init: function(tid, tt, path) { - NoteList.notes_path = path + ".js"; + NoteList.notes_path = path + ".json"; NoteList.target_id = tid; NoteList.target_type = tt; NoteList.target_params = "target_type=" + NoteList.target_type + "&target_id=" + NoteList.target_id; @@ -411,7 +411,10 @@ var NoteList = { data: NoteList.target_params, complete: function(){ $('.js-notes-busy').removeClass("loading")}, beforeSend: function() { $('.js-notes-busy').addClass("loading") }, - dataType: "script" + success: function(data) { + NoteList.setContent(data.html); + }, + dataType: "json" }); }, @@ -419,7 +422,7 @@ var NoteList = { * Called in response to getContent(). * Replaces the content of #notes-list with the given html. */ - setContent: function(newNoteIds, html) { + setContent: function(html) { $("#notes-list").html(html); }, |