diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-12 01:46:43 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-12 01:46:43 +0000 |
commit | b202816324c3a6bf515a8d938c33e882106f26da (patch) | |
tree | 0bbe5fc57440cb7446c84e3e2167185d85c527bf /modules/local_import/js/local_import.js | |
parent | 35067cbced6dadbc4cb7e7a45334485320eb473b (diff) |
Remove the attempt at a local import module
Diffstat (limited to 'modules/local_import/js/local_import.js')
-rw-r--r-- | modules/local_import/js/local_import.js | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/modules/local_import/js/local_import.js b/modules/local_import/js/local_import.js deleted file mode 100644 index 3ad01ce8..00000000 --- a/modules/local_import/js/local_import.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Set up autocomplete on the server path list - * - */ -$("document").ready(function() { - var previous_search = ""; - $("#gLocalImportAdmin input").autocomplete({ - url: base_url + "admin/local_import/autocomplete", - mustMatch: true, - }); - ajaxify_form({ - form: "#gLocalImportAdmin form", - url: "admin/local_import/", - returnCode: 200, - callback: function(xhr, statusText) { - $("#gImportLocalDirList").html(xhr.responseText); - setDroppable("#gImportLocalDirList #gRemoveDir"); - setDraggable("#gImportLocalDirList li"); - } - }); - - setDroppable("#gImportLocalDirList #gRemoveDir"); - setDraggable("#gImportLocalDirList li"); -}); - -function setDraggable(selector) { - $(selector).draggable({ - helper: 'clone', -// containment: "#gImportLocalDirList", - opacity: .6, - revert: "invalid" - }); -} - -function setDroppable(selector) { - $(selector).droppable({ - accept: "#gImportLocalDirList li", - drop: function(ev, ui) { - var element = ui.draggable[0]; - - if (confirm("Do you really want to remove " + element.textContent)) { - $.ajax({ - data: "path=" + element.textContent, - url: base_url + "admin/local_import/remove", - success: function(data, textStatus) { - $("#gImportLocalDirList").html(data); - setDroppable("#gImportLocalDirList #gRemoveDir"); - setDraggable("#gImportLocalDirList li"); - }, - error: function(xhr, textStatus, errorThrown) { - alert("Text Status: " + textStatus + " Http Error Code: " + xhr.status); - }, - type: "POST" - }); - } - } - }); -} - -function ajaxify_form(options) { - $(options.form).ajaxForm({ - complete:function(xhr, statusText) { - options.callback(xhr, statusText); - $(options.form).clearForm(); - } - }); -} |