aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-09-17 19:51:34 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-09-17 19:51:34 +0200
commit5ae0a52cfe96dc9afb7b37229028fea71f1f5afc (patch)
tree09fdeaf2d3b81b897dd63b4c21d6226d69e67f1b /sonar-server/src/main/webapp/WEB-INF
parent3d3efbbce15f5ff1dfee98f639cd72a0a5d02596 (diff)
downloadsonarqube-5ae0a52cfe96dc9afb7b37229028fea71f1f5afc.tar.gz
sonarqube-5ae0a52cfe96dc9afb7b37229028fea71f1f5afc.zip
SONAR-3802 integration select2 3.2 + rename jquery.js
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/dev_controller.rb12
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dev/form.html.erb9
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb4
3 files changed, 24 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dev_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dev_controller.rb
index 2fb2e7d6b5a..2242ba9da58 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dev_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dev_controller.rb
@@ -21,6 +21,9 @@ class DevController < ApplicationController
SECTION=Navigation::SECTION_HOME
+ # some actions load secured information
+ before_filter :admin_required
+
def layout
render :text => '', :layout => true
end
@@ -29,4 +32,13 @@ class DevController < ApplicationController
render :text => ''
end
+ def breadcrumb
+ files = Project.find(:all, :conditions => {:qualifier => ['FIL', 'CLA'], :enabled => true})
+ @resource = files[0] unless files.empty?
+ render :text => '', :layout => true
+ end
+
+ def form
+
+ end
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dev/form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dev/form.html.erb
new file mode 100644
index 00000000000..cb1a35b9ff0
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dev/form.html.erb
@@ -0,0 +1,9 @@
+Select a file:
+<select id="select-file" name="file" multiple="multiple" style="width: 300px">
+ <% Project.find(:all, :conditions => {:qualifier => ['FIL', 'CLA'], :enabled => true}, :order => 'name').each do |file| %>
+ <option value="<%= file.id -%>"><%= h file.name -%></option>
+ <% end %>
+</select>
+<script>
+ $j('#select-file').select2();
+</script> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
index 91ef035e22c..7b7e60203d5 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
@@ -26,6 +26,7 @@
%><%= stylesheet_link_tag 'sonar', :media => 'all' -%><%= javascript_include_tag 'sonar'
-%><% else %>
<%= stylesheet_link_tag 'yui-reset-font.css', :media => 'all' %>
+<%= stylesheet_link_tag 'select2', :media => 'all' %>
<%= stylesheet_link_tag 'layout.css', :media => 'all' %>
<%= stylesheet_link_tag 'style', :media => 'all' %>
<%= stylesheet_link_tag 'sonar-colorizer', :media => 'all' %>
@@ -33,7 +34,8 @@
<%= javascript_include_tag 'prototype' %>
<%= javascript_include_tag 'scriptaculous' %>
<%= javascript_include_tag 'tablekit' %>
-<%= javascript_include_tag 'jquery-1.8.1.min' %>
+<%= javascript_include_tag 'jquery.min' %>
+<%= javascript_include_tag 'select2.min' %>
<%= javascript_include_tag 'protovis' %>
<%= javascript_include_tag 'protovis-sonar' %>
<%= javascript_include_tag 'application' %>