aboutsummaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2012-01-25 21:30:45 +0100
committerJochen Topf <jochen@topf.org>2012-01-25 21:30:45 +0100
commit00801bb205496202bfc20e4e4ed134e939835ea2 (patch)
treef45c9504046f9e3ca31c912e90aa6f64c9c4accd /web/lib
parentde903779fea3d3b52ddcfb4611780e94ca56749b (diff)
downloadtaginfo-00801bb205496202bfc20e4e4ed134e939835ea2.tar
taginfo-00801bb205496202bfc20e4e4ed134e939835ea2.tar.gz
Javascript cleanup
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/ui/keys_tags.rb3
-rw-r--r--web/lib/ui/reports.rb3
-rw-r--r--web/lib/ui/search.rb1
3 files changed, 7 insertions, 0 deletions
diff --git a/web/lib/ui/keys_tags.rb b/web/lib/ui/keys_tags.rb
index 01f17d9..1412b50 100644
--- a/web/lib/ui/keys_tags.rb
+++ b/web/lib/ui/keys_tags.rb
@@ -58,6 +58,8 @@ class Taginfo < Sinatra::Base
@img_width = TaginfoConfig.get('geodistribution.width') * TaginfoConfig.get('geodistribution.scale_image')
@img_height = TaginfoConfig.get('geodistribution.height') * TaginfoConfig.get('geodistribution.scale_image')
+ javascript 'protovis-r3.2'
+ javascript "#{ r18n.locale.code }/key"
erb :key
end
@@ -112,6 +114,7 @@ class Taginfo < Sinatra::Base
@desc = "<span title='#{ t.pages.tag.description_from_wiki }' tipsy='w'>#{ @desc }</span"
end
+ javascript "#{ r18n.locale.code }/tag"
erb :tag
end
diff --git a/web/lib/ui/reports.rb b/web/lib/ui/reports.rb
index c26e35d..5096a4f 100644
--- a/web/lib/ui/reports.rb
+++ b/web/lib/ui/reports.rb
@@ -10,6 +10,9 @@ class Taginfo < Sinatra::Base
get report.url do
@title = report.title
section :reports
+ if File.exists?("viewsjs/reports/#{ report.name }.js.erb")
+ javascript "#{ r18n.locale.code }/reports/#{ report.name }"
+ end
erb ('reports/' + report.name).to_sym
end
end
diff --git a/web/lib/ui/search.rb b/web/lib/ui/search.rb
index 8630cb6..1aac663 100644
--- a/web/lib/ui/search.rb
+++ b/web/lib/ui/search.rb
@@ -5,6 +5,7 @@ class Taginfo < Sinatra::Base
get '/search' do
@title = t.pages.search.title
+ javascript "#{ r18n.locale.code }/search"
@query = params[:q]
if @query =~ /(.*)=(.*)/
erb :search_tags