diff --git a/assets/static/js/ajax_form.js b/assets/static/js/ajax_form.js deleted file mode 100644 index f4ffcf43..00000000 --- a/assets/static/js/ajax_form.js +++ /dev/null @@ -1,41 +0,0 @@ - - - - -function formAssetSearch() { - $.ajax({ - url : "/asset/filter/", // the endpoint - type : "POST", // http method - data : { - sender: 'asset_update', - form: "csrfmiddlewaretoken=" + $('input[name=csrfmiddlewaretoken]').val() + "&asset_id=" + $('#parent_search').val() - }, - traditional: true, - - success : function(data) { - // console.log(data); - $('#formAssetSearchResult').html(data); - // window.location.href = data['url']; - }, - - error : function(xhr) {console.log(xhr.status + ": " + xhr.responseText)} - }); -} - -function deleteAsset(asset_id) { - $.ajax({ - url : "/asset/delete/", // the endpoint - type : "POST", // http method - data : { - asset_id: asset_id - }, - traditional: true, - - success : function(data) { - // console.log(data); - window.location.href = data['url']; - }, - - error : function(xhr) {console.log(xhr.status + ": " + xhr.responseText)} - }); -} \ No newline at end of file diff --git a/assets/templates/asset_create.html b/assets/templates/asset_create.html index 1e58c720..cb235392 100644 --- a/assets/templates/asset_create.html +++ b/assets/templates/asset_create.html @@ -53,8 +53,6 @@ - {% include 'partials/confirm_delete.html' with object=object %} - {% endblock %} {% block js%} diff --git a/assets/templates/asset_update.html b/assets/templates/asset_update.html index e4cbaa6f..8b734962 100644 --- a/assets/templates/asset_update.html +++ b/assets/templates/asset_update.html @@ -52,8 +52,6 @@ -{% include 'partials/confirm_delete.html' with object=object %} - {% endblock %} {% block js%} diff --git a/assets/templates/partials/asset_buttons.html b/assets/templates/partials/asset_buttons.html index bf302351..4d6507db 100644 --- a/assets/templates/partials/asset_buttons.html +++ b/assets/templates/partials/asset_buttons.html @@ -2,7 +2,6 @@ Duplicate - Delete {% elif duplicate %} @@ -14,7 +13,6 @@
{% endif %} {% if create or edit or duplicate %} diff --git a/assets/templates/partials/confirm_delete.html b/assets/templates/partials/confirm_delete.html deleted file mode 100644 index c0cb011d..00000000 --- a/assets/templates/partials/confirm_delete.html +++ /dev/null @@ -1,20 +0,0 @@ -