Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup Upload#index

Using the content_for trick in the view doesn't work with the asset pipeline.
We have to include upload.js in the dradis3.js bundle. Some of its code is
the same we have in configurations.js so we can remove it.
  • Loading branch information...
commit b6838a7665c108739dcccdbbc3903825dcf728db 1 parent 495b1c2
@etdsoft etdsoft authored
View
3  app/assets/javascripts/dradis3.js
@@ -1,4 +1,5 @@
//= require jquery
//= require jquery_ujs
//= require jquery.form
-//= require configurations
+//= require configurations
+//= require upload
View
9 app/assets/javascripts/upload.js
@@ -1,12 +1,3 @@
-jQuery.ajaxSetup({
- beforeSend: function(xhr) {
- xhr.setRequestHeader("Accept", "text/javascript");
- var token = $("meta[name='csrf-token']").attr("content");
- xhr.setRequestHeader("X-CSRF-Token", token);
- }
-});
-
-
$(function(){
$('form').ajaxForm({dataType: 'script'});
View
1  app/views/layouts/dradis3.html.erb
@@ -7,7 +7,6 @@
<%= javascript_include_tag 'dradis3' %>
<%= stylesheet_link_tag 'dradis3' %>
<%= csrf_meta_tag %>
- <%= yield(:head) %>
</head>
<body>
View
3  app/views/upload/index.html.erb
@@ -1,7 +1,4 @@
<% title 'Upload Manager' %>
-<% content_for :head do -%>
-<%= javascript_include_tag 'upload' %>
-<% end -%>
<p>Use the form below to upload output files from other tools. Once you have
uploaded them you can process with the different <a href="#" id="available">plugins available</a>. </p>
Please sign in to comment.
Something went wrong with that request. Please try again.