olelo 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/config.ru +0 -5
- data/config/config.yml.default +0 -2
- data/lib/olelo/application.rb +16 -6
- data/lib/olelo/helper.rb +7 -4
- data/lib/olelo/locale.yml +1 -4
- data/lib/olelo/util.rb +0 -4
- data/lib/olelo/version.rb +1 -1
- data/plugins/aspects/imageinfo.rb +3 -11
- data/plugins/blog/main.rb +1 -1
- data/plugins/misc/variables.rb +1 -0
- data/plugins/repositories/rugged_repository.rb +1 -0
- data/plugins/tags/code.rb +1 -1
- data/plugins/tags/footnotes.rb +1 -1
- data/plugins/tags/gist.rb +1 -1
- data/plugins/tags/include.rb +1 -1
- data/plugins/tags/main.rb +2 -2
- data/plugins/tags/math.rb +1 -1
- data/plugins/tags/redirect.rb +21 -0
- data/plugins/tags/scripting.rb +6 -6
- data/plugins/tags/tabs.rb +1 -1
- data/plugins/treeview/main.rb +1 -1
- data/plugins/treeview/script.js +2 -2
- data/plugins/treeview/script/init.js +3 -3
- data/static/themes/atlantis/menu.scss +23 -23
- data/static/themes/atlantis/screen.scss +10 -0
- data/static/themes/atlantis/style.css +1 -1
- data/views/layout.slim +6 -8
- metadata +2 -2
- data/lib/olelo/middleware/blacklist.rb +0 -25
data/config.ru
CHANGED
@@ -71,11 +71,6 @@ end
|
|
71
71
|
use Rack::MethodOverride
|
72
72
|
use Rack::CommonLogger, LoggerOutput.new(logger)
|
73
73
|
|
74
|
-
if !Olelo::Config['rack.blacklist'].empty?
|
75
|
-
require 'olelo/middleware/blacklist'
|
76
|
-
use Olelo::Middleware::Blacklist, :blacklist => Olelo::Config['rack.blacklist']
|
77
|
-
end
|
78
|
-
|
79
74
|
use Olelo::Middleware::ForceEncoding
|
80
75
|
use Olelo::Middleware::Flash, :set_accessors => %w(error warn info)
|
81
76
|
use Rack::RelativeRedirect
|
data/config/config.yml.default
CHANGED
@@ -122,8 +122,6 @@ rack:
|
|
122
122
|
#session_secret: 'Change the secret! Use random string!'
|
123
123
|
# Use the deflater to compress data (Rack::Deflater)
|
124
124
|
deflater: true
|
125
|
-
# Specify a list of blacklisted ips which cannot post data
|
126
|
-
blacklist: []
|
127
125
|
|
128
126
|
##################################################
|
129
127
|
# Logging configuration
|
data/lib/olelo/application.rb
CHANGED
@@ -52,11 +52,11 @@ module Olelo
|
|
52
52
|
hook :menu do |menu|
|
53
53
|
if menu.name == :actions && page && !page.new?
|
54
54
|
menu.item(:view, :href => build_path(page.path), :accesskey => 'v')
|
55
|
-
edit_menu = menu.item(:edit, :href => build_path(page, :action => :edit), :accesskey => 'e')
|
56
|
-
edit_menu.item(:new, :href => build_path(page, :action => :new), :accesskey => 'n')
|
55
|
+
edit_menu = menu.item(:edit, :href => build_path(page, :action => :edit), :accesskey => 'e', :rel => 'nofollow')
|
56
|
+
edit_menu.item(:new, :href => build_path(page, :action => :new), :accesskey => 'n', :rel => 'nofollow')
|
57
57
|
if !page.root?
|
58
|
-
edit_menu.item(:move, :href => build_path(page, :action => :move))
|
59
|
-
edit_menu.item(:delete, :href => build_path(page, :action => :delete))
|
58
|
+
edit_menu.item(:move, :href => build_path(page, :action => :move), :rel => 'nofollow')
|
59
|
+
edit_menu.item(:delete, :href => build_path(page, :action => :delete), :rel => 'nofollow')
|
60
60
|
end
|
61
61
|
history_menu = menu.item(:history, :href => build_path(page, :action => :history), :accesskey => 'h')
|
62
62
|
|
@@ -136,7 +136,12 @@ module Olelo
|
|
136
136
|
|
137
137
|
get '/changes/:version(/:path)' do
|
138
138
|
@page = Page.find!(params[:path])
|
139
|
-
|
139
|
+
begin
|
140
|
+
@diff = page.diff(nil, params[:version])
|
141
|
+
rescue => ex
|
142
|
+
Olelo.logger.debug ex
|
143
|
+
raise NotFound
|
144
|
+
end
|
140
145
|
@version = @diff.to
|
141
146
|
cache_control :version => @version
|
142
147
|
render :changes
|
@@ -179,7 +184,12 @@ module Olelo
|
|
179
184
|
get '/compare/:versions(/:path)', :versions => '(?:\w+)\.{2,3}(?:\w+)' do
|
180
185
|
@page = Page.find!(params[:path])
|
181
186
|
versions = params[:versions].split(/\.{2,3}/)
|
182
|
-
|
187
|
+
begin
|
188
|
+
@diff = page.diff(versions.first, versions.last)
|
189
|
+
rescue => ex
|
190
|
+
Olelo.logger.debug ex
|
191
|
+
raise NotFound
|
192
|
+
end
|
183
193
|
render :compare
|
184
194
|
end
|
185
195
|
|
data/lib/olelo/helper.rb
CHANGED
@@ -109,15 +109,15 @@ module Olelo
|
|
109
109
|
|
110
110
|
def breadcrumbs(page)
|
111
111
|
path = page.try(:path) || ''
|
112
|
-
li = [%{<li
|
112
|
+
li = [%{<li>
|
113
113
|
<a accesskey="z" href="#{escape_html build_path(nil, :version => page)}">#{escape_html :root.t}</a></li>}]
|
114
114
|
path.split('/').inject('') do |parent,elem|
|
115
115
|
current = parent/elem
|
116
|
-
li << %{<li
|
116
|
+
li << %{<li>
|
117
117
|
<a href="#{escape_html build_path(current, :version => page)}">#{escape_html elem}</a></li>}
|
118
118
|
current
|
119
119
|
end
|
120
|
-
|
120
|
+
('<ul class="breadcrumbs">' << li.join('<li>/</li>') << '</ul>').html_safe
|
121
121
|
end
|
122
122
|
|
123
123
|
def build_path(page, options = {})
|
@@ -135,7 +135,10 @@ module Olelo
|
|
135
135
|
path = 'version'/version/path if version && (options.delete(:force_version) || !version.head?)
|
136
136
|
end
|
137
137
|
|
138
|
-
|
138
|
+
unless options.empty?
|
139
|
+
query = build_query(options)
|
140
|
+
path += '?' + query unless query.empty?
|
141
|
+
end
|
139
142
|
'/' + (Config['base_path'] / path)
|
140
143
|
end
|
141
144
|
|
data/lib/olelo/locale.yml
CHANGED
@@ -52,7 +52,6 @@ en:
|
|
52
52
|
newer: 'Newer'
|
53
53
|
new_page: 'New Page'
|
54
54
|
no_changes: 'No changes'
|
55
|
-
not_found: '#{id} not found'
|
56
55
|
old_password: 'Old password'
|
57
56
|
page: 'Page'
|
58
57
|
page_edited: '#{page} edited'
|
@@ -148,7 +147,6 @@ de:
|
|
148
147
|
name: 'Name'
|
149
148
|
new_page: 'Neue Seite'
|
150
149
|
no_changes: 'Keine Änderungen'
|
151
|
-
not_found: '#{id} nicht gefunden'
|
152
150
|
old_password: 'Altes Passwort'
|
153
151
|
page: 'Seite'
|
154
152
|
page_edited: '#{page} edited'
|
@@ -238,7 +236,7 @@ cs_CZ:
|
|
238
236
|
menu_actions_history: 'Historie'
|
239
237
|
menu_actions_history_newer: 'Novější'
|
240
238
|
menu_actions_history_older: 'Starší'
|
241
|
-
menu_actions_history_head: 'Aktuální'
|
239
|
+
menu_actions_history_head: 'Aktuální'
|
242
240
|
menu_actions_view: 'Zobrazit'
|
243
241
|
move: 'Přesunout'
|
244
242
|
move_page: 'Přesunout stránku #{page}'
|
@@ -246,7 +244,6 @@ cs_CZ:
|
|
246
244
|
newer: 'Novější'
|
247
245
|
new_page: 'Nová stránka'
|
248
246
|
no_changes: 'Žádné změny'
|
249
|
-
not_found: '#{id}: nenalezeno'
|
250
247
|
old_password: 'Staré heslo'
|
251
248
|
page: 'Stránka'
|
252
249
|
page_edited: 'Stránka #{page} editována'
|
data/lib/olelo/util.rb
CHANGED
data/lib/olelo/version.rb
CHANGED
@@ -4,18 +4,10 @@ dependencies 'utils/image_magick'
|
|
4
4
|
Aspect.create(:imageinfo, :priority => 1, :layout => true, :cacheable => true, :accepts => %r{^image/}) do
|
5
5
|
def call(context, page)
|
6
6
|
@page = page
|
7
|
-
identify = ImageMagick.identify('-format',
|
7
|
+
identify = ImageMagick.identify('-format', "%m\n%h\n%w\n%[EXIF:*]", '-').run(page.content).split("\n")
|
8
8
|
@type = identify[0]
|
9
9
|
@geometry = "#{identify[1]}x#{identify[2]}"
|
10
|
-
|
11
|
-
@exif = Shell.exif('-m', '/dev/stdin').run(page.content)
|
12
|
-
@exif.force_encoding(Encoding.default_external)
|
13
|
-
@exif = @exif.split("\n").map {|line| line.split("\t") }
|
14
|
-
@exif = nil if !@exif[0] || !@exif[0][1]
|
15
|
-
rescue => ex
|
16
|
-
Olelo.logger.warn "Exif data could not be read: #{ex.message}"
|
17
|
-
@exif = nil
|
18
|
-
end
|
10
|
+
@exif = identify[3..-1].to_a.map {|line| line.sub(/^exif:/, '').split('=', 2) }
|
19
11
|
render :info
|
20
12
|
end
|
21
13
|
end
|
@@ -50,7 +42,7 @@ table
|
|
50
42
|
tr
|
51
43
|
td= :version.t
|
52
44
|
td.version= @page.version
|
53
|
-
-
|
45
|
+
- unless @exif.empty?
|
54
46
|
h3= :exif.t
|
55
47
|
table
|
56
48
|
thead
|
data/plugins/blog/main.rb
CHANGED
@@ -7,7 +7,7 @@ Application.get '(/:path)/:year(/:month)', :year => '20\d{2}', :month => '(?:0[1
|
|
7
7
|
send('GET /')
|
8
8
|
end
|
9
9
|
|
10
|
-
Tags::Tag.define 'menu', :optional =>
|
10
|
+
Tags::Tag.define 'menu', :optional => 'path', :description => 'Show blog menu', :dynamic => true do |context, attrs, content|
|
11
11
|
page = Page.find(attrs[:path]) rescue nil
|
12
12
|
if page
|
13
13
|
Cache.cache("blog-#{page.path}-#{page.version.cache_id}", :update => context.request.no_cache?, :defer => true) do
|
data/plugins/misc/variables.rb
CHANGED
data/plugins/tags/code.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
description 'Code tag with syntax highlighting'
|
2
2
|
dependencies 'utils/pygments'
|
3
3
|
|
4
|
-
Tag.define :code, :requires =>
|
4
|
+
Tag.define :code, :requires => 'lang' do |context, attrs, content|
|
5
5
|
Pygments.pygmentize(content, attrs['lang'])
|
6
6
|
end
|
data/plugins/tags/footnotes.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
description 'Footnote support'
|
2
2
|
|
3
|
-
Tag.define :ref, :optional =>
|
3
|
+
Tag.define :ref, :optional => 'name', :description => 'Create footnote' do |context, attrs, content|
|
4
4
|
footnotes = context[:footnotes] ||= []
|
5
5
|
hash = context[:footnotes_hash] ||= {}
|
6
6
|
name = attrs['name']
|
data/plugins/tags/gist.rb
CHANGED
@@ -2,7 +2,7 @@ description 'Tag to embed github gist'
|
|
2
2
|
export_scripts 'gist-embed.css'
|
3
3
|
require 'open-uri'
|
4
4
|
|
5
|
-
Tag.define :gist, :requires =>
|
5
|
+
Tag.define :gist, :requires => 'id' do |context, attrs|
|
6
6
|
if attrs['id'] =~ /^\d+$/
|
7
7
|
body = open("https://gist.github.com/#{attrs['id']}.json").read
|
8
8
|
gist = JSON.parse(body)
|
data/plugins/tags/include.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
description 'Include tags'
|
2
2
|
|
3
|
-
Tag.define :include, :optional => '*', :requires =>
|
3
|
+
Tag.define :include, :optional => '*', :requires => 'page', :limit => 10, :description => 'Include page' do |context, attrs|
|
4
4
|
path = attrs['page']
|
5
5
|
path = context.page.path/'..'/path if !path.starts_with? '/'
|
6
6
|
if page = Page.find(path, context.page.tree_version)
|
data/plugins/tags/main.rb
CHANGED
@@ -158,8 +158,8 @@ class Tag < Filters::NestingFilter
|
|
158
158
|
# Find the plugin which provided this tag.
|
159
159
|
plugin = Plugin.for(block)
|
160
160
|
options.merge!(:name => name.to_s, :plugin => plugin, :autoclose => block.arity == 2,
|
161
|
-
:optional => Set.new([*options[:optional]].compact.flatten
|
162
|
-
:requires => Set.new([*options[:requires]].compact.flatten
|
161
|
+
:optional => Set.new([*options[:optional]].compact.flatten),
|
162
|
+
:requires => Set.new([*options[:requires]].compact.flatten))
|
163
163
|
options[:description] ||= plugin.description
|
164
164
|
options[:namespace] ||= plugin.path.split('/').last
|
165
165
|
tag = TagInfo.new(options)
|
data/plugins/tags/math.rb
CHANGED
@@ -92,7 +92,7 @@ class LaTeXRenderer < MathRenderer
|
|
92
92
|
register 'mathjax', LaTeXRenderer
|
93
93
|
end
|
94
94
|
|
95
|
-
Tag.define :math, :optional =>
|
95
|
+
Tag.define :math, :optional => 'display' do |context, attrs, code|
|
96
96
|
raise('Limits exceeded') if code.size > 10240
|
97
97
|
MathRenderer.instance.render(code, attrs['display'] == 'block' ? 'block' : 'inline')
|
98
98
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
description 'Tag to redirect to other pages'
|
2
|
+
|
3
|
+
Application.hook :render do |name, xml, layout|
|
4
|
+
if params[:redirect] && layout
|
5
|
+
links = [params[:redirect]].flatten.map do |link|
|
6
|
+
%{<a href="#{escape_html build_path(link, :action => :edit)}">#{escape_html link}</a>}
|
7
|
+
end.join(' → ')
|
8
|
+
xml.sub!(/<div id="menu">.*?<\/ul>/m, "\\0Redirected from #{links} → ◎ ")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
Tag.define :redirect, :requires => 'to', :dynamic => true do |context, attrs|
|
13
|
+
list = context.params[:redirect] || []
|
14
|
+
to = attrs['to']
|
15
|
+
if list.include?(to)
|
16
|
+
raise "Invalid redirect to #{to}"
|
17
|
+
else
|
18
|
+
list << context.page.path
|
19
|
+
throw :redirect, build_path(to, 'redirect[]' => list, :version => !context.page.head? && context.page)
|
20
|
+
end
|
21
|
+
end
|
data/plugins/tags/scripting.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
description 'Scripting tags'
|
2
2
|
require 'evaluator'
|
3
3
|
|
4
|
-
Tag.define :value, :requires =>
|
4
|
+
Tag.define :value, :requires => 'of', :immediate => true, :description => 'Print value' do |context, attrs|
|
5
5
|
Evaluator.eval(attrs['of'], context.params)
|
6
6
|
end
|
7
7
|
|
8
|
-
Tag.define :def, :optional => %w(value args), :requires =>
|
8
|
+
Tag.define :def, :optional => %w(value args), :requires => 'name',
|
9
9
|
:immediate => true, :description => 'Define variable' do |context, attrs, content|
|
10
10
|
name = attrs['name'].downcase
|
11
11
|
if attrs['value']
|
@@ -17,7 +17,7 @@ Tag.define :def, :optional => %w(value args), :requires => :name,
|
|
17
17
|
nil
|
18
18
|
end
|
19
19
|
|
20
|
-
Tag.define :call, :optional => '*', :requires =>
|
20
|
+
Tag.define :call, :optional => '*', :requires => 'name', :immediate => true, :description => 'Call function' do |context, attrs|
|
21
21
|
name = attrs['name'].downcase
|
22
22
|
functions = context[:functions]
|
23
23
|
raise NameError, "Function #{name} not found" if !functions || !functions[name]
|
@@ -36,7 +36,7 @@ Tag.define :call, :optional => '*', :requires => :name, :immediate => true, :des
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
Tag.define :for, :optional =>
|
39
|
+
Tag.define :for, :optional => 'counter', :requires => %w(from to),
|
40
40
|
:immediate => true, :limit => 50, :description => 'For loop' do |context, attrs, content|
|
41
41
|
to = attrs['to'].to_i
|
42
42
|
from = attrs['from'].to_i
|
@@ -47,7 +47,7 @@ Tag.define :for, :optional => :counter, :requires => %w(from to),
|
|
47
47
|
end.join
|
48
48
|
end
|
49
49
|
|
50
|
-
Tag.define :repeat, :optional =>
|
50
|
+
Tag.define :repeat, :optional => 'counter', :requires => 'times',
|
51
51
|
:immediate => true, :limit => 50, :description => 'Repeat loop' do |context, attrs, content|
|
52
52
|
n = attrs['times'].to_i
|
53
53
|
raise 'Limits exceeded' if n > 10
|
@@ -57,7 +57,7 @@ Tag.define :repeat, :optional => :counter, :requires => :times,
|
|
57
57
|
end.join
|
58
58
|
end
|
59
59
|
|
60
|
-
Tag.define :if, :requires =>
|
60
|
+
Tag.define :if, :requires => 'test', :immediate => true, :description => 'If statement' do |context, attrs, content|
|
61
61
|
if Evaluator.eval(attrs['test'], context.params)
|
62
62
|
nested_tags(context.subcontext, content)
|
63
63
|
end
|
data/plugins/tags/tabs.rb
CHANGED
@@ -13,7 +13,7 @@ Tag.define :tabs do |context, attrs, content|
|
|
13
13
|
%{<ul class="tabs">#{li.join}</ul>} + content
|
14
14
|
end
|
15
15
|
|
16
|
-
Tag.define :tab, :requires =>
|
16
|
+
Tag.define :tab, :requires => 'name' do |context, attrs, content|
|
17
17
|
raise '<tab> can only be used in <tabs>' if !context[:tabs]
|
18
18
|
context[:tabs] << attrs['name']
|
19
19
|
%{<div class="tab" id="tab-#{context[:tabs_prefix]}-#{context[:tabs].size - 1}">#{subfilter(context, content)}</div>}
|
data/plugins/treeview/main.rb
CHANGED
data/plugins/treeview/script.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
(function(c){c.fn.treeView=function(a){function l(b,e){if(a.stateStore){var d=jStorage.get(a.stateStore,[]);if(e)c.inArray(b,d)<0&&d.push(b);else d=c.grep(d,function(f){return f!=b});jStorage.set(a.stateStore,d)}}function m(b){var e=b[2],d=c('<li><div class="'+(b[0]?"hitarea collapsed":"placeholder")+'"><div class="arrow"/><div class="'+b[1]+'"/></div><a href="'+e+'">'+b[3]+"</a></li>"),f=d.children(".hitarea");d.data("name",b[3]);f.click(function(){if(f.hasClass("collapsed")){n(d,e);f.removeClass("collapsed").addClass("expanded")}else{d.children("ul").hide();
|
2
2
|
f.removeClass("expanded").addClass("collapsed")}l(e,f.hasClass("expanded"));return false});if(a.stateStore&&c.inArray(e,jStorage.get(a.stateStore,[]))>=0){n(d,e);f.removeClass("collapsed").addClass("expanded")}return d}function n(b,e){function d(i){var j=c("<ul/>");c.each(i,function(o,k){j.append(m(k))});e==a.root&&b.empty();b.children("ul").remove();b.append(j)}function f(i){g&&jStorage.set(g,i);var j={},o=[];c.each(i,function(k,h){j[h[3]]=h});c("> ul > li",b).each(function(){var k=c(this),h=k.data("name");
|
3
3
|
if(j[h])delete j[h];else k.remove();o.push(c(this))});c.each(j,function(k,h){var p=false;c.each(o,function(t,q){if(k<q.data("name")){p=true;q.before(m(h));return false}});p||b.children("ul").append(m(h))})}function r(){setTimeout(function(){a.ajax(e,f,function(){g&&jStorage.remove(g)})},a.delay)}var g=a.cacheStore?a.cacheStore+":"+e:null;if(b.children("ul").length!==0){b.children("ul").show();r()}else{var s=g?jStorage.get(g):null;if(s){d(s);r()}else{b.addClass("wait");a.ajax(e,function(i){b.removeClass("wait");
|
4
|
-
d(i);g&&jStorage.set(g,i)},function(){b.removeClass("wait")})}}}a||(a={});if(!a.root)a.root="/";if(!a.url)a.url="/treeview.json";if(!a.delay)a.delay=2E3;if(!a.ajax)a.ajax=function(b,e,d){c.ajax({url:a.url,data:{dir:b},success:e,error:d,dataType:"json"})};this.each(function(){n(c(this),a.root)})}})(jQuery);$.translations({en:{menu:"Menu",tree:"Tree"},de:{menu:"Men\u00fc",tree:"Baumansicht"},cs:{menu:"Menu",tree:"Strom"}});$("#sidebar").wrapInner('<div id="sidebar-menu"/>').prepend('<div id="sidebar-tree" style="display: none"><h1>'+$.t("tree")+'</h1><div id="treeview"/></div>');$("#menu
|
5
|
-
$("#treeview").treeView({stateStore:"treeview-state",cacheStore:"treeview-cache",ajax:function(c,a,l){$.ajax({url:c,data:{aspect:"treeview.json"},success:a,error:l,dataType:"json"})}});
|
4
|
+
d(i);g&&jStorage.set(g,i)},function(){b.removeClass("wait")})}}}a||(a={});if(!a.root)a.root="/";if(!a.url)a.url="/treeview.json";if(!a.delay)a.delay=2E3;if(!a.ajax)a.ajax=function(b,e,d){c.ajax({url:a.url,data:{dir:b},success:e,error:d,dataType:"json"})};this.each(function(){n(c(this),a.root)})}})(jQuery);$.translations({en:{menu:"Menu",tree:"Tree"},de:{menu:"Men\u00fc",tree:"Baumansicht"},cs:{menu:"Menu",tree:"Strom"}});$("#sidebar").wrapInner('<div id="sidebar-menu"/>').prepend('<div id="sidebar-tree" style="display: none"><h1>'+$.t("tree")+'</h1><div id="treeview"/></div>');$("#menu").prepend('<ul><li class="selected" id="sidebar-tab-menu"><a href="#sidebar-menu">'+$.t("menu")+'</a></li><li id="sidebar-tab-tree"><a href="#sidebar-tree">'+$.t("tree")+"</a></li></ul>");$("#sidebar-tab-menu, #sidebar-tab-tree").tabWidget({store:"sidebar-tab"});
|
5
|
+
$("#treeview").treeView({stateStore:"treeview-state",cacheStore:"treeview-cache",root:Olelo.base_path,ajax:function(c,a,l){$.ajax({url:c,data:{aspect:"treeview.json"},success:a,error:l,dataType:"json"})}});
|
@@ -17,9 +17,9 @@ $.translations({
|
|
17
17
|
// Start tree view
|
18
18
|
$('#sidebar').wrapInner('<div id="sidebar-menu"/>').prepend('<div id="sidebar-tree" style="display: none"><h1>' + $.t('tree') +
|
19
19
|
'</h1><div id="treeview"/></div>');
|
20
|
-
$('#menu
|
21
|
-
|
20
|
+
$('#menu').prepend('<ul><li class="selected" id="sidebar-tab-menu"><a href="#sidebar-menu">' + $.t('menu') +
|
21
|
+
'</a></li><li id="sidebar-tab-tree"><a href="#sidebar-tree">' + $.t('tree') + '</a></li></ul>');
|
22
22
|
$('#sidebar-tab-menu, #sidebar-tab-tree').tabWidget({store: 'sidebar-tab'});
|
23
|
-
$('#treeview').treeView({stateStore: 'treeview-state', cacheStore: 'treeview-cache', ajax: function(path, success, error) {
|
23
|
+
$('#treeview').treeView({stateStore: 'treeview-state', cacheStore: 'treeview-cache', root: Olelo.base_path, ajax: function(path, success, error) {
|
24
24
|
$.ajax({url: path, data: { aspect: 'treeview.json' }, success: success, error: error, dataType: 'json'});
|
25
25
|
}});
|
@@ -16,6 +16,7 @@
|
|
16
16
|
#menu {
|
17
17
|
background: $main_bg;
|
18
18
|
height: 1.6em;
|
19
|
+
line-height: 1.6em;
|
19
20
|
border-top: $border;
|
20
21
|
border-bottom: $border;
|
21
22
|
ul {
|
@@ -42,29 +43,6 @@
|
|
42
43
|
line-height: 1.6em;
|
43
44
|
border-right: $border;
|
44
45
|
color: $dark_color;
|
45
|
-
&.noborder {
|
46
|
-
padding: 0 1em;
|
47
|
-
border: none;
|
48
|
-
}
|
49
|
-
&.breadcrumb {
|
50
|
-
border: none;
|
51
|
-
a {
|
52
|
-
padding: 0 0.3em;
|
53
|
-
}
|
54
|
-
&.first a {
|
55
|
-
padding-left: 1em;
|
56
|
-
text-indent: -999px;
|
57
|
-
display: block;
|
58
|
-
width: 16px;
|
59
|
-
background: url(images/actions/home.png) no-repeat 1em 0.1em;
|
60
|
-
}
|
61
|
-
&.last {
|
62
|
-
border-right: $border;
|
63
|
-
a {
|
64
|
-
padding-right: 1em;
|
65
|
-
}
|
66
|
-
}
|
67
|
-
}
|
68
46
|
a {
|
69
47
|
display: block;
|
70
48
|
text-decoration: none;
|
@@ -96,4 +74,26 @@
|
|
96
74
|
}
|
97
75
|
}
|
98
76
|
}
|
77
|
+
.breadcrumbs {
|
78
|
+
margin-right: 1em;
|
79
|
+
> li {
|
80
|
+
border: none;
|
81
|
+
a {
|
82
|
+
padding: 0 0.3em;
|
83
|
+
}
|
84
|
+
&:first-child a {
|
85
|
+
padding-left: 1em;
|
86
|
+
text-indent: -999px;
|
87
|
+
display: block;
|
88
|
+
width: 16px;
|
89
|
+
background: url(images/actions/home.png) no-repeat 1em 0.1em;
|
90
|
+
}
|
91
|
+
&:last-child {
|
92
|
+
border-right: $border;
|
93
|
+
a {
|
94
|
+
padding-right: 1em;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
99
|
}
|
@@ -105,6 +105,16 @@ ul.button-bar, ul.pagination {
|
|
105
105
|
}
|
106
106
|
}
|
107
107
|
|
108
|
+
dt {
|
109
|
+
font-weight: bold;
|
110
|
+
text-decoration: underline;
|
111
|
+
}
|
112
|
+
|
113
|
+
dd {
|
114
|
+
margin: 0;
|
115
|
+
padding: 0 0 0.5em 0;
|
116
|
+
}
|
117
|
+
|
108
118
|
table {
|
109
119
|
border-collapse: separate;
|
110
120
|
border-spacing: 0px;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
@media screen{.patch{width:100%;border:1px solid #BBB;border-collapse:collapse;border-spacing:0}.patch tr td{padding:0.5em;border-top:1px solid #BBB;font-family:"Bitstream Vera Sans Mono", monospace}.patch tr td pre{border:0px none;margin:0;padding:0}.patch tr td ins{background:#d4ffd4;text-decoration:none}.patch tr td del{color:#555555;text-decoration:line-through}.patch tr th{font-variant:normal;padding:0.2em 0.5em;border:1px solid #BBB}.patch tr.new th{background:url(images/actions/new.png) 2px 2px no-repeat;padding-left:20px}.patch tr.delete th{background:url(images/actions/delete.png) 2px 2px no-repeat;padding-left:20px}.patch tr.move th{background:url(images/actions/move.png) 2px 2px no-repeat;padding-left:20px}.patch tr.edit th{background:url(images/actions/edit.png) 2px 2px no-repeat;padding-left:20px}.patch-summary{width:100%}.patch-summary .ins,.patch-summary .del{width:1em}.patch-summary .ins{color:#5A5}.patch-summary .del{color:#A55}.patch-summary .new{background:#d4ffd4}.patch-summary .new .name{background:url(images/actions/new.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .delete{background:#ffd4d4}.patch-summary .delete .name{background:url(images/actions/delete.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .move{background:#ffc}.patch-summary .move .name{background:url(images/actions/move.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .edit{background:#fff}.patch-summary .edit .name{background:url(images/actions/edit.png) 2px 2px no-repeat;padding-left:20px}.ui-autocomplete{position:absolute;cursor:default;list-style:none;padding:2px;margin:0;display:block;float:left;background:#FFF;border:1px solid #BBB}.ui-autocomplete a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.2em;color:#333}.ui-autocomplete .ui-state-hover{background:#DDD}.ui-autocomplete-input{margin-right:0}.ui-combo-button{-webkit-border-top-left-radius:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;border-left:0px none;margin-left:0;padding:0}.ui-combo-button:before{content:'\25BE'}.ui-helper-hidden-accessible{display:none}#header{background:url(images/bg/header.jpg) #153b7a;padding-left:0.5em;clear:both;height:3em}#header h1{margin:0;padding:0;border:0;outline:0;font-size:200%;font-weight:bold;float:left}#header h1 a,#header h1 a:visited,#header h1 a:active,#header h1 a:hover{color:#eeeeee}#info{float:right;background:#fff;padding:0.3em;margin:0.65em 0.5em 0 0;opacity:0.8}#search{opacity:0.8;float:right;border:none}#search input{margin:0.65em 0.5em 0 0;width:10em;padding:0.2em;padding-left:20px;background:#fff url(images/search.png) no-repeat 0.2em 0.2em}html,body{height:100%}#container{min-height:520px;position:relative;display:block;overflow:hidden;padding-right:7em;padding-left:156px;background:url(images/bg/container.png) top left repeat-y;z-index:10}#content{position:relative;float:left;width:100%;padding:2.5em 3.5em;background:url(images/bg/content.png) top left repeat-x}#sidebar{background:#e5efff;position:relative;width:156px;float:left;padding-bottom:3.5em;margin-left:-156px}#sidebar h1,#sidebar h2,#sidebar h3,#sidebar h4,#sidebar h5,#sidebar h6{font-size:140%;background:white;font-weight:normal;line-height:1.2em;margin:1em 0 0 0;padding:0 0.2em;border-top:1px solid #95bbff;border-bottom:1px solid #95bbff;display:block}#sidebar ul{margin:0;padding:0;border:0;outline:0;list-style:none}#sidebar ul li{margin:0}#sidebar ul li a{padding:0 5px;display:block}#sidebar ul ul a{padding:0 20px}#sidebar ul ul ul a{padding:0 35px}#footer{clear:both;position:relative;color:#555;font-size:90%;background:url(images/bg/footer.png) top left repeat-x;margin-top:-10px;padding:2em;text-align:right;z-index:1 !important}#footer .powered_by{margin-top:1em;color:#aaaaaa;font-size:90%}#item-actions-edit>a:before{content:url(images/actions/edit.png) "\00a0"}#item-actions-history>a:before{content:url(images/actions/history.png) "\00a0"}#item-actions-edit-new>a:before{content:url(images/actions/new.png) "\00a0"}#item-actions-edit-delete>a:before{content:url(images/actions/delete.png) "\00a0"}#item-actions-edit-move>a:before{content:url(images/actions/move.png) "\00a0"}#menu{background:#fff;height:1.6em;border-top:1px solid #bbb;border-bottom:1px solid #bbb}#menu ul{margin:0;padding:0;border:0;outline:0;list-style-type:none;margin-left:0px;display:block;float:left;height:1.6em}#menu ul li{float:left}#menu ul#menu-actions{float:right}#menu ul#menu-actions li{border-left:1px solid #bbb;border-right:none}#menu ul#menu-actions .selected a:before{content:"\2022\00a0"}#menu ul#menu-actions .download{background:#e5efff}#menu ul li{margin:0;padding:0;border:0;outline:0;display:block;float:left;height:1.6em;line-height:1.6em;border-right:1px solid #bbb;color:#333}#menu ul li.noborder{padding:0 1em;border:none}#menu ul li.breadcrumb{border:none}#menu ul li.breadcrumb a{padding:0 0.3em}#menu ul li.breadcrumb.first a{padding-left:1em;text-indent:-999px;display:block;width:16px;background:url(images/actions/home.png) no-repeat 1em 0.1em}#menu ul li.breadcrumb.last{border-right:1px solid #bbb}#menu ul li.breadcrumb.last a{padding-right:1em}#menu ul li a{display:block;text-decoration:none;white-space:nowrap;padding:0 1em;height:1.6em;color:#333;cursor:pointer}#menu ul li a:hover,#menu ul li a:focus,#menu ul li a:active{text-shadow:#333333 1px 1px 2px}#menu ul li ul{display:none;z-index:99;position:absolute;border-top:1px solid #bbb;margin-left:-1px}#menu ul li ul li{background:#fff;clear:both;border:1px solid #bbb !important;border-top:none !important;width:100%}#menu ul li:hover>ul{display:block}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}*:focus{outline:0}body{line-height:1em;color:black;background:white}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0;vertical-align:middle}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:"" ""}q:before,q:after,blockquote:before,blockquote:after{content:""}img a{border:none}body{color:#111111;background:white;font-family:"URW Gothic L","DejaVu Sans",Verdana,sans-serif;font-size:10pt;line-height:1.2em}h1{font-size:185%}h2{font-size:170%}h3{font-size:155%}h4{font-size:140%}h5{font-size:125%}h6{font-size:110%}h1,h2,h3,h4,h5,h6{font-family:"Book Antiqua",Palatino,FreeSerif,serif;color:#153b7a;margin:1em 0 0.5em 0;line-height:1.2em}h1{margin-top:0}strong{font-weight:bold}em{font-style:italic}ul,ol,p{margin:0.8em 0 0.8em 0}ul,ol ul,ol{margin:0}ul{list-style-type:disc}ol{list-style-type:decimal}ul,ol{list-style-position:outside;padding-left:1.5em}ul.pagination{height:3em}ul.button-bar,ul.pagination{list-style-type:none;margin:0;display:block;padding:0;width:100%}ul.button-bar li,ul.pagination li{float:left;padding:0;margin:0}ul.button-bar li a,ul.button-bar li span,ul.pagination li a,ul.pagination li span{display:block;background:url(images/bg/button.png) repeat-x left bottom transparent;border:1px solid #bbb;border-left:0px none;color:#333;padding:0em 0.5em;line-height:1.5em}ul.button-bar li a:active,ul.button-bar li a.current,ul.button-bar li a.loading,ul.button-bar li span:active,ul.button-bar li span.current,ul.button-bar li span.loading,ul.pagination li a:active,ul.pagination li a.current,ul.pagination li a.loading,ul.pagination li span:active,ul.pagination li span.current,ul.pagination li span.loading{background:url(images/bg/button.png) repeat-x left bottom #d4e4ff}ul.button-bar li a.loading,ul.button-bar li span.loading,ul.pagination li a.loading,ul.pagination li span.loading{background:#d4e4ff url(images/loading.gif) repeat}ul.button-bar li a.ellipsis:before,ul.button-bar li span.ellipsis:before,ul.pagination li a.ellipsis:before,ul.pagination li span.ellipsis:before{content:'\22EF'}ul.button-bar li a.disabled,ul.button-bar li span.disabled,ul.pagination li a.disabled,ul.pagination li span.disabled{color:#bbb}ul.button-bar li:first-child a,ul.button-bar li:first-child span,ul.pagination li:first-child a,ul.pagination li:first-child span{border-left:1px solid #bbb;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}ul.button-bar li:last-child a,ul.button-bar li:last-child span,ul.pagination li:last-child a,ul.pagination li:last-child span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}table{border-collapse:separate;border-spacing:0px;background:#bbb;padding:1px;margin:0 0 2em 0}table td,table th{border-top:1px solid #E5E5E5;padding:0.2em 0.5em}table td.link,table th.link{padding:0}table td.link a,table th.link a{margin:0;padding:0.2em 0.5em;display:block}table tr{background:#fff}table tr:first-child td{border-top:0px none}table thead tr{background:url(images/bg/button.png) repeat-x left bottom #d4e4ff}table thead tr th{border-bottom:1px solid #bbb;border-top:0px none}a,a:visited{color:#153b7a;text-decoration:none}a.img{background:transparent}span.img a{border:1px solid #bbb;float:right;text-align:center;color:black;background:#fff;padding:0.2em}span.img a img{display:block}.editsection{border-radius:4px;-webkit-border-radius:4px;border:1px solid #bbb;display:block;background:url(images/bg/button.png) repeat-x left bottom #fff;font-family:"URW Gothic L","DejaVu Sans",Verdana,sans-serif;font-size:9pt;line-height:9pt;margin-top:2px;padding:2px;color:#333;float:right;font-variant:normal}.editsection:visited{color:#333}sub{vertical-align:text-bottom;font-size:75%}sup{vertical-align:text-top;font-size:75%}img{vertical-align:middle}hr{background:#bbb;border:none;height:1px}.version,tt,pre,code,kbd{font-family:"Andale Mono","Bitstream Vera Sans Mono",monospace}pre{border:1px solid #bbb;padding:0.2em;min-width:60%;white-space:pre-wrap;display:block}#history-table .compare{padding:0;width:1em}#history-table .compare button{margin:1px;display:inline;font-size:small}#history-table .compare input{display:inline;margin:0 3px}table.full,#history-table,#subpages-table{width:100%}table.full td,table.full th,#history-table td,#history-table th,#subpages-table td,#subpages-table th{white-space:nowrap}#subpages-table .actions{width:80px;padding:0px}#subpages-table .action-edit{text-indent:-999px;background:url(images/actions/edit.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .action-history{text-indent:-999px;background:url(images/actions/history.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .action-delete{text-indent:-999px;background:url(images/actions/delete.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .action-move{text-indent:-999px;background:url(images/actions/move.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .page:before{content:url(images/page.png) "\00a0"}#subpages-table .folder:before{content:url(images/folder.png) "\00a0"}#subpages-table .file-type-7z:before{content:url(images/filetypes/7z.png) "\00a0"}#subpages-table .file-type-bz2:before{content:url(images/filetypes/bz2.png) "\00a0"}#subpages-table .file-type-doc:before{content:url(images/filetypes/doc.png) "\00a0"}#subpages-table .file-type-flac:before{content:url(images/filetypes/flac.png) "\00a0"}#subpages-table .file-type-gz:before{content:url(images/filetypes/gz.png) "\00a0"}#subpages-table .file-type-html:before{content:url(images/filetypes/html.png) "\00a0"}#subpages-table .file-type-java:before{content:url(images/filetypes/java.png) "\00a0"}#subpages-table .file-type-jpg:before{content:url(images/filetypes/jpg.png) "\00a0"}#subpages-table .file-type-midi:before{content:url(images/filetypes/midi.png) "\00a0"}#subpages-table .file-type-mp3:before{content:url(images/filetypes/mp3.png) "\00a0"}#subpages-table .file-type-ogg:before{content:url(images/filetypes/ogg.png) "\00a0"}#subpages-table .file-type-pdf:before{content:url(images/filetypes/pdf.png) "\00a0"}#subpages-table .file-type-php:before{content:url(images/filetypes/php.png) "\00a0"}#subpages-table .file-type-png:before{content:url(images/filetypes/png.png) "\00a0"}#subpages-table .file-type-ppt:before{content:url(images/filetypes/ppt.png) "\00a0"}#subpages-table .file-type-psd:before{content:url(images/filetypes/psd.png) "\00a0"}#subpages-table .file-type-rar:before{content:url(images/filetypes/rar.png) "\00a0"}#subpages-table .file-type-rb:before{content:url(images/filetypes/rb.png) "\00a0"}#subpages-table .file-type-sh:before{content:url(images/filetypes/sh.png) "\00a0"}#subpages-table .file-type-tar:before{content:url(images/filetypes/tar.png) "\00a0"}#subpages-table .file-type-txt:before{content:url(images/filetypes/txt.png) "\00a0"}#subpages-table .file-type-wma:before{content:url(images/filetypes/wma.png) "\00a0"}#subpages-table .file-type-xls:before{content:url(images/filetypes/xls.png) "\00a0"}#subpages-table .file-type-zip:before{content:url(images/filetypes/zip.png) "\00a0"}.info{color:#333}.warn{color:#a50}.error{color:#a00}.ref{vertical-align:super;font-size:80%}button{border-radius:4px;-webkit-border-radius:4px;background:url(images/bg/button.png) repeat-x left bottom #fff;float:left;margin:0.3em 0.5em 0.3em 0;padding:2px;border:1px solid #bbb;color:#333;white-space:nowrap}button:active:not([disabled]),button.loading{background:url(images/bg/button.png) repeat-x left bottom #d4e4ff}button.loading{background:url(images/loading.gif) repeat #d4e4ff}button[disabled]{color:#999}form{display:inline}form select,form textarea,form input{float:left;margin:0.3em 0.5em 0.3em 0;padding:2px;border:1px solid #bbb;background:#fff;color:#333}form select:focus,form textarea:focus,form input:focus{border-style:dotted}form label{float:left;margin:0;padding:0.4em 0.5em 0.4em 0;border:none;background:none;color:#333}form label.unsaved{font-style:italic}form .fieldset label{width:12em;text-align:right}form .indent{margin-left:12.5em}form .indent label{width:auto}form input[type=text],form input[type=password]{font-family:"Andale Mono","Bitstream Vera Sans Mono",monospace;width:20em}form select{width:20em}form textarea{width:100%;font-family:"Andale Mono","Bitstream Vera Sans Mono",monospace;font-size:100%}form input[type=image],form input[type=image]:focus,form input[type=checkbox]{border:none;background:none}form input[type=hidden]{display:none}form br{clear:left}.flash{margin:0.5em 0;border:1px solid #d33;list-style-type:none;padding:0.5em;background:#fdd}table input{margin:0}.box,.fieldset,.tab{border-radius:4px;-webkit-border-radius:4px;box-shadow:2px 2px 8px #bbb;-webkit-box-shadow:2px 2px 8px #bbb;clear:both;display:block;border:1px solid #bbb;padding:0.5em 1em;margin:1em 0;overflow:auto}.box h1,.box h2,.box h3,.box h4,.box h5,.box h6,.fieldset h1,.fieldset h2,.fieldset h3,.fieldset h4,.fieldset h5,.fieldset h6,.tab h1,.tab h2,.tab h3,.tab h4,.tab h5,.tab h6{margin:0.2em 0}.js .tabs{margin:0;padding:0;border:0;outline:0;list-style-type:none;margin-left:0px;display:block;float:left;margin:0 0 1px 0;height:1.5em;width:100%;z-index:100;position:relative}.js .tabs li{float:left}.js .tabs>li{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;background:url(images/bg/button.png) repeat-x left bottom #d4e4ff;float:left;padding:0;margin:0 4px 0 0;height:1.5em;line-height:1.5em;border:1px solid #bbb}.js .tabs>li.selected>a{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;background:#fff;border-bottom:1px solid white}.js .tabs>li>a{display:block;text-decoration:none;white-space:nowrap;padding:0 0.8em;color:#333}.js .tabs>li>a:hover,.js .tabs>li>a:active,.js .tabs>li>a:focus{text-shadow:#333333 1px 1px 2px}.js .tab{-webkit-border-top-left-radius:0px;border-top-left-radius:0px}.no-js .tabs{display:none}.hidden{display:none !important}.toc .toc1{font-weight:bold}.toc .toc1>ol{margin-bottom:1em}.toc .toc1 .toc2{font-weight:normal}a.absent{color:#A55}.archive #header{background:url(images/bg/header_gray.jpg) #333}.error_page{padding-left:120px;min-height:400px;background:url(images/bug.png) top left no-repeat}.not_found_page{padding-left:120px;min-height:400px;background:url(images/not_found.png) top left no-repeat}* html #container{width:100%;padding:0;background:transparent;border-bottom:1px solid #bbb}* html #sidebar{margin:0;border-right:1px solid #bbb;border-bottom:1px solid #bbb}* html #content{width:70%;background:transparent}* html #footer{background:transparent;margin-top:0;padding-top:0}*:first-child+html #container{padding-right:7.1em}*:first-child+html #menu ul li li{width:8em}
|
1
|
+
@media screen{.patch{width:100%;border:1px solid #BBB;border-collapse:collapse;border-spacing:0}.patch tr td{padding:0.5em;border-top:1px solid #BBB;font-family:"Bitstream Vera Sans Mono", monospace}.patch tr td pre{border:0px none;margin:0;padding:0}.patch tr td ins{background:#d4ffd4;text-decoration:none}.patch tr td del{color:#555555;text-decoration:line-through}.patch tr th{font-variant:normal;padding:0.2em 0.5em;border:1px solid #BBB}.patch tr.new th{background:url(images/actions/new.png) 2px 2px no-repeat;padding-left:20px}.patch tr.delete th{background:url(images/actions/delete.png) 2px 2px no-repeat;padding-left:20px}.patch tr.move th{background:url(images/actions/move.png) 2px 2px no-repeat;padding-left:20px}.patch tr.edit th{background:url(images/actions/edit.png) 2px 2px no-repeat;padding-left:20px}.patch-summary{width:100%}.patch-summary .ins,.patch-summary .del{width:1em}.patch-summary .ins{color:#5A5}.patch-summary .del{color:#A55}.patch-summary .new{background:#d4ffd4}.patch-summary .new .name{background:url(images/actions/new.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .delete{background:#ffd4d4}.patch-summary .delete .name{background:url(images/actions/delete.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .move{background:#ffc}.patch-summary .move .name{background:url(images/actions/move.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .edit{background:#fff}.patch-summary .edit .name{background:url(images/actions/edit.png) 2px 2px no-repeat;padding-left:20px}.ui-autocomplete{position:absolute;cursor:default;list-style:none;padding:2px;margin:0;display:block;float:left;background:#FFF;border:1px solid #BBB}.ui-autocomplete a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.2em;color:#333}.ui-autocomplete .ui-state-hover{background:#DDD}.ui-autocomplete-input{margin-right:0}.ui-combo-button{-webkit-border-top-left-radius:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;border-left:0px none;margin-left:0;padding:0}.ui-combo-button:before{content:'\25BE'}.ui-helper-hidden-accessible{display:none}#header{background:url(images/bg/header.jpg) #153b7a;padding-left:0.5em;clear:both;height:3em}#header h1{margin:0;padding:0;border:0;outline:0;font-size:200%;font-weight:bold;float:left}#header h1 a,#header h1 a:visited,#header h1 a:active,#header h1 a:hover{color:#eeeeee}#info{float:right;background:#fff;padding:0.3em;margin:0.65em 0.5em 0 0;opacity:0.8}#search{opacity:0.8;float:right;border:none}#search input{margin:0.65em 0.5em 0 0;width:10em;padding:0.2em;padding-left:20px;background:#fff url(images/search.png) no-repeat 0.2em 0.2em}html,body{height:100%}#container{min-height:520px;position:relative;display:block;overflow:hidden;padding-right:7em;padding-left:156px;background:url(images/bg/container.png) top left repeat-y;z-index:10}#content{position:relative;float:left;width:100%;padding:2.5em 3.5em;background:url(images/bg/content.png) top left repeat-x}#sidebar{background:#e5efff;position:relative;width:156px;float:left;padding-bottom:3.5em;margin-left:-156px}#sidebar h1,#sidebar h2,#sidebar h3,#sidebar h4,#sidebar h5,#sidebar h6{font-size:140%;background:white;font-weight:normal;line-height:1.2em;margin:1em 0 0 0;padding:0 0.2em;border-top:1px solid #95bbff;border-bottom:1px solid #95bbff;display:block}#sidebar ul{margin:0;padding:0;border:0;outline:0;list-style:none}#sidebar ul li{margin:0}#sidebar ul li a{padding:0 5px;display:block}#sidebar ul ul a{padding:0 20px}#sidebar ul ul ul a{padding:0 35px}#footer{clear:both;position:relative;color:#555;font-size:90%;background:url(images/bg/footer.png) top left repeat-x;margin-top:-10px;padding:2em;text-align:right;z-index:1 !important}#footer .powered_by{margin-top:1em;color:#aaaaaa;font-size:90%}#item-actions-edit>a:before{content:url(images/actions/edit.png) "\00a0"}#item-actions-history>a:before{content:url(images/actions/history.png) "\00a0"}#item-actions-edit-new>a:before{content:url(images/actions/new.png) "\00a0"}#item-actions-edit-delete>a:before{content:url(images/actions/delete.png) "\00a0"}#item-actions-edit-move>a:before{content:url(images/actions/move.png) "\00a0"}#menu{background:#fff;height:1.6em;line-height:1.6em;border-top:1px solid #bbb;border-bottom:1px solid #bbb}#menu ul{margin:0;padding:0;border:0;outline:0;list-style-type:none;margin-left:0px;display:block;float:left;height:1.6em}#menu ul li{float:left}#menu ul#menu-actions{float:right}#menu ul#menu-actions li{border-left:1px solid #bbb;border-right:none}#menu ul#menu-actions .selected a:before{content:"\2022\00a0"}#menu ul#menu-actions .download{background:#e5efff}#menu ul li{margin:0;padding:0;border:0;outline:0;display:block;float:left;height:1.6em;line-height:1.6em;border-right:1px solid #bbb;color:#333}#menu ul li a{display:block;text-decoration:none;white-space:nowrap;padding:0 1em;height:1.6em;color:#333;cursor:pointer}#menu ul li a:hover,#menu ul li a:focus,#menu ul li a:active{text-shadow:#333333 1px 1px 2px}#menu ul li ul{display:none;z-index:99;position:absolute;border-top:1px solid #bbb;margin-left:-1px}#menu ul li ul li{background:#fff;clear:both;border:1px solid #bbb !important;border-top:none !important;width:100%}#menu ul li:hover>ul{display:block}#menu .breadcrumbs{margin-right:1em}#menu .breadcrumbs>li{border:none}#menu .breadcrumbs>li a{padding:0 0.3em}#menu .breadcrumbs>li:first-child a{padding-left:1em;text-indent:-999px;display:block;width:16px;background:url(images/actions/home.png) no-repeat 1em 0.1em}#menu .breadcrumbs>li:last-child{border-right:1px solid #bbb}#menu .breadcrumbs>li:last-child a{padding-right:1em}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}*:focus{outline:0}body{line-height:1em;color:black;background:white}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0;vertical-align:middle}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:"" ""}q:before,q:after,blockquote:before,blockquote:after{content:""}img a{border:none}body{color:#111111;background:white;font-family:"URW Gothic L","DejaVu Sans",Verdana,sans-serif;font-size:10pt;line-height:1.2em}h1{font-size:185%}h2{font-size:170%}h3{font-size:155%}h4{font-size:140%}h5{font-size:125%}h6{font-size:110%}h1,h2,h3,h4,h5,h6{font-family:"Book Antiqua",Palatino,FreeSerif,serif;color:#153b7a;margin:1em 0 0.5em 0;line-height:1.2em}h1{margin-top:0}strong{font-weight:bold}em{font-style:italic}ul,ol,p{margin:0.8em 0 0.8em 0}ul,ol ul,ol{margin:0}ul{list-style-type:disc}ol{list-style-type:decimal}ul,ol{list-style-position:outside;padding-left:1.5em}ul.pagination{height:3em}ul.button-bar,ul.pagination{list-style-type:none;margin:0;display:block;padding:0;width:100%}ul.button-bar li,ul.pagination li{float:left;padding:0;margin:0}ul.button-bar li a,ul.button-bar li span,ul.pagination li a,ul.pagination li span{display:block;background:url(images/bg/button.png) repeat-x left bottom transparent;border:1px solid #bbb;border-left:0px none;color:#333;padding:0em 0.5em;line-height:1.5em}ul.button-bar li a:active,ul.button-bar li a.current,ul.button-bar li a.loading,ul.button-bar li span:active,ul.button-bar li span.current,ul.button-bar li span.loading,ul.pagination li a:active,ul.pagination li a.current,ul.pagination li a.loading,ul.pagination li span:active,ul.pagination li span.current,ul.pagination li span.loading{background:url(images/bg/button.png) repeat-x left bottom #d4e4ff}ul.button-bar li a.loading,ul.button-bar li span.loading,ul.pagination li a.loading,ul.pagination li span.loading{background:#d4e4ff url(images/loading.gif) repeat}ul.button-bar li a.ellipsis:before,ul.button-bar li span.ellipsis:before,ul.pagination li a.ellipsis:before,ul.pagination li span.ellipsis:before{content:'\22EF'}ul.button-bar li a.disabled,ul.button-bar li span.disabled,ul.pagination li a.disabled,ul.pagination li span.disabled{color:#bbb}ul.button-bar li:first-child a,ul.button-bar li:first-child span,ul.pagination li:first-child a,ul.pagination li:first-child span{border-left:1px solid #bbb;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}ul.button-bar li:last-child a,ul.button-bar li:last-child span,ul.pagination li:last-child a,ul.pagination li:last-child span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}dt{font-weight:bold;text-decoration:underline}dd{margin:0;padding:0 0 0.5em 0}table{border-collapse:separate;border-spacing:0px;background:#bbb;padding:1px;margin:0 0 2em 0}table td,table th{border-top:1px solid #E5E5E5;padding:0.2em 0.5em}table td.link,table th.link{padding:0}table td.link a,table th.link a{margin:0;padding:0.2em 0.5em;display:block}table tr{background:#fff}table tr:first-child td{border-top:0px none}table thead tr{background:url(images/bg/button.png) repeat-x left bottom #d4e4ff}table thead tr th{border-bottom:1px solid #bbb;border-top:0px none}a,a:visited{color:#153b7a;text-decoration:none}a.img{background:transparent}span.img a{border:1px solid #bbb;float:right;text-align:center;color:black;background:#fff;padding:0.2em}span.img a img{display:block}.editsection{border-radius:4px;-webkit-border-radius:4px;border:1px solid #bbb;display:block;background:url(images/bg/button.png) repeat-x left bottom #fff;font-family:"URW Gothic L","DejaVu Sans",Verdana,sans-serif;font-size:9pt;line-height:9pt;margin-top:2px;padding:2px;color:#333;float:right;font-variant:normal}.editsection:visited{color:#333}sub{vertical-align:text-bottom;font-size:75%}sup{vertical-align:text-top;font-size:75%}img{vertical-align:middle}hr{background:#bbb;border:none;height:1px}.version,tt,pre,code,kbd{font-family:"Andale Mono","Bitstream Vera Sans Mono",monospace}pre{border:1px solid #bbb;padding:0.2em;min-width:60%;white-space:pre-wrap;display:block}#history-table .compare{padding:0;width:1em}#history-table .compare button{margin:1px;display:inline;font-size:small}#history-table .compare input{display:inline;margin:0 3px}table.full,#history-table,#subpages-table{width:100%}table.full td,table.full th,#history-table td,#history-table th,#subpages-table td,#subpages-table th{white-space:nowrap}#subpages-table .actions{width:80px;padding:0px}#subpages-table .action-edit{text-indent:-999px;background:url(images/actions/edit.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .action-history{text-indent:-999px;background:url(images/actions/history.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .action-delete{text-indent:-999px;background:url(images/actions/delete.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .action-move{text-indent:-999px;background:url(images/actions/move.png) no-repeat top left;float:left;width:16px;height:16px;overflow:hidden}#subpages-table .page:before{content:url(images/page.png) "\00a0"}#subpages-table .folder:before{content:url(images/folder.png) "\00a0"}#subpages-table .file-type-7z:before{content:url(images/filetypes/7z.png) "\00a0"}#subpages-table .file-type-bz2:before{content:url(images/filetypes/bz2.png) "\00a0"}#subpages-table .file-type-doc:before{content:url(images/filetypes/doc.png) "\00a0"}#subpages-table .file-type-flac:before{content:url(images/filetypes/flac.png) "\00a0"}#subpages-table .file-type-gz:before{content:url(images/filetypes/gz.png) "\00a0"}#subpages-table .file-type-html:before{content:url(images/filetypes/html.png) "\00a0"}#subpages-table .file-type-java:before{content:url(images/filetypes/java.png) "\00a0"}#subpages-table .file-type-jpg:before{content:url(images/filetypes/jpg.png) "\00a0"}#subpages-table .file-type-midi:before{content:url(images/filetypes/midi.png) "\00a0"}#subpages-table .file-type-mp3:before{content:url(images/filetypes/mp3.png) "\00a0"}#subpages-table .file-type-ogg:before{content:url(images/filetypes/ogg.png) "\00a0"}#subpages-table .file-type-pdf:before{content:url(images/filetypes/pdf.png) "\00a0"}#subpages-table .file-type-php:before{content:url(images/filetypes/php.png) "\00a0"}#subpages-table .file-type-png:before{content:url(images/filetypes/png.png) "\00a0"}#subpages-table .file-type-ppt:before{content:url(images/filetypes/ppt.png) "\00a0"}#subpages-table .file-type-psd:before{content:url(images/filetypes/psd.png) "\00a0"}#subpages-table .file-type-rar:before{content:url(images/filetypes/rar.png) "\00a0"}#subpages-table .file-type-rb:before{content:url(images/filetypes/rb.png) "\00a0"}#subpages-table .file-type-sh:before{content:url(images/filetypes/sh.png) "\00a0"}#subpages-table .file-type-tar:before{content:url(images/filetypes/tar.png) "\00a0"}#subpages-table .file-type-txt:before{content:url(images/filetypes/txt.png) "\00a0"}#subpages-table .file-type-wma:before{content:url(images/filetypes/wma.png) "\00a0"}#subpages-table .file-type-xls:before{content:url(images/filetypes/xls.png) "\00a0"}#subpages-table .file-type-zip:before{content:url(images/filetypes/zip.png) "\00a0"}.info{color:#333}.warn{color:#a50}.error{color:#a00}.ref{vertical-align:super;font-size:80%}button{border-radius:4px;-webkit-border-radius:4px;background:url(images/bg/button.png) repeat-x left bottom #fff;float:left;margin:0.3em 0.5em 0.3em 0;padding:2px;border:1px solid #bbb;color:#333;white-space:nowrap}button:active:not([disabled]),button.loading{background:url(images/bg/button.png) repeat-x left bottom #d4e4ff}button.loading{background:url(images/loading.gif) repeat #d4e4ff}button[disabled]{color:#999}form{display:inline}form select,form textarea,form input{float:left;margin:0.3em 0.5em 0.3em 0;padding:2px;border:1px solid #bbb;background:#fff;color:#333}form select:focus,form textarea:focus,form input:focus{border-style:dotted}form label{float:left;margin:0;padding:0.4em 0.5em 0.4em 0;border:none;background:none;color:#333}form label.unsaved{font-style:italic}form .fieldset label{width:12em;text-align:right}form .indent{margin-left:12.5em}form .indent label{width:auto}form input[type=text],form input[type=password]{font-family:"Andale Mono","Bitstream Vera Sans Mono",monospace;width:20em}form select{width:20em}form textarea{width:100%;font-family:"Andale Mono","Bitstream Vera Sans Mono",monospace;font-size:100%}form input[type=image],form input[type=image]:focus,form input[type=checkbox]{border:none;background:none}form input[type=hidden]{display:none}form br{clear:left}.flash{margin:0.5em 0;border:1px solid #d33;list-style-type:none;padding:0.5em;background:#fdd}table input{margin:0}.box,.fieldset,.tab{border-radius:4px;-webkit-border-radius:4px;box-shadow:2px 2px 8px #bbb;-webkit-box-shadow:2px 2px 8px #bbb;clear:both;display:block;border:1px solid #bbb;padding:0.5em 1em;margin:1em 0;overflow:auto}.box h1,.box h2,.box h3,.box h4,.box h5,.box h6,.fieldset h1,.fieldset h2,.fieldset h3,.fieldset h4,.fieldset h5,.fieldset h6,.tab h1,.tab h2,.tab h3,.tab h4,.tab h5,.tab h6{margin:0.2em 0}.js .tabs{margin:0;padding:0;border:0;outline:0;list-style-type:none;margin-left:0px;display:block;float:left;margin:0 0 1px 0;height:1.5em;width:100%;z-index:100;position:relative}.js .tabs li{float:left}.js .tabs>li{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;background:url(images/bg/button.png) repeat-x left bottom #d4e4ff;float:left;padding:0;margin:0 4px 0 0;height:1.5em;line-height:1.5em;border:1px solid #bbb}.js .tabs>li.selected>a{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;background:#fff;border-bottom:1px solid white}.js .tabs>li>a{display:block;text-decoration:none;white-space:nowrap;padding:0 0.8em;color:#333}.js .tabs>li>a:hover,.js .tabs>li>a:active,.js .tabs>li>a:focus{text-shadow:#333333 1px 1px 2px}.js .tab{-webkit-border-top-left-radius:0px;border-top-left-radius:0px}.no-js .tabs{display:none}.hidden{display:none !important}.toc .toc1{font-weight:bold}.toc .toc1>ol{margin-bottom:1em}.toc .toc1 .toc2{font-weight:normal}a.absent{color:#A55}.archive #header{background:url(images/bg/header_gray.jpg) #333}.error_page{padding-left:120px;min-height:400px;background:url(images/bug.png) top left no-repeat}.not_found_page{padding-left:120px;min-height:400px;background:url(images/not_found.png) top left no-repeat}* html #container{width:100%;padding:0;background:transparent;border-bottom:1px solid #bbb}* html #sidebar{margin:0;border-right:1px solid #bbb;border-bottom:1px solid #bbb}* html #content{width:70%;background:transparent}* html #footer{background:transparent;margin-top:0;padding-top:0}*:first-child+html #container{padding-right:7.1em}*:first-child+html #menu ul li li{width:8em}
|
2
2
|
}@media print{.patch{width:100%;border:1px solid #BBB;border-collapse:collapse;border-spacing:0}.patch tr td{padding:0.5em;border-top:1px solid #BBB;font-family:"Bitstream Vera Sans Mono", monospace}.patch tr td pre{border:0px none;margin:0;padding:0}.patch tr td ins{background:#d4ffd4;text-decoration:none}.patch tr td del{color:#555555;text-decoration:line-through}.patch tr th{font-variant:normal;padding:0.2em 0.5em;border:1px solid #BBB}.patch tr.new th{background:url(images/actions/new.png) 2px 2px no-repeat;padding-left:20px}.patch tr.delete th{background:url(images/actions/delete.png) 2px 2px no-repeat;padding-left:20px}.patch tr.move th{background:url(images/actions/move.png) 2px 2px no-repeat;padding-left:20px}.patch tr.edit th{background:url(images/actions/edit.png) 2px 2px no-repeat;padding-left:20px}.patch-summary{width:100%}.patch-summary .ins,.patch-summary .del{width:1em}.patch-summary .ins{color:#5A5}.patch-summary .del{color:#A55}.patch-summary .new{background:#d4ffd4}.patch-summary .new .name{background:url(images/actions/new.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .delete{background:#ffd4d4}.patch-summary .delete .name{background:url(images/actions/delete.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .move{background:#ffc}.patch-summary .move .name{background:url(images/actions/move.png) 2px 2px no-repeat;padding-left:20px}.patch-summary .edit{background:#fff}.patch-summary .edit .name{background:url(images/actions/edit.png) 2px 2px no-repeat;padding-left:20px}body{color:black;background:#fff;font-family:"URW Gothic L","DejaVu Sans",Verdana,sans-serif;font-size:10pt;line-height:1.2em}h1{font-size:185%}h2{font-size:170%}h3{font-size:155%}h4{font-size:140%}h5{font-size:125%}h6{font-size:110%}h1,h2,h3,h4,h5,h6{font-family:"Book Antiqua",Palatino,FreeSerif,serif;color:#153b7a;margin:2em 0 0.5em 0}ul,ol,p{margin:0.8em 0 0.8em 0}ul,ol ul,ol{margin:0}ul{list-style-type:disc}ol{list-style-type:decimal}ul,ol{list-style-position:outside;padding-left:1.5em}table{border-collapse:collapse;border-spacing:0;border:1px solid #bbb}table tr td,table tr th{border:1px solid #bbb;padding:0.2em 0.5em}table tr td.link,table tr th.link{padding:0}table tr td.link a,table tr th.link a{margin:0;padding:0.2em 0.5em;display:block}a,a:visited{color:#153b7a;text-decoration:none}a.img{background:transparent}div.img a{border:1px solid #bbb;float:right;text-align:center;color:black;background:#fff;padding:0.2em}div.img a img{display:block}img{vertical-align:middle}hr{background:#bbb;border:none;height:1px}#header,#sidebar,#menu,.editsection,.backref,.hidden,.noprint{display:none !important}#footer{display:block;margin-top:1em}.ref,.ref:visited,.ref:active,.ref:hover{vertical-align:super;font-size:80%;color:black}.date .ago{display:none !important}.date .full{display:inline !important}.toc{padding:0.5em 2em}.toc ul{margin:0}.toc .toc1{font-weight:bold}.toc .toc1 .toc2{font-weight:normal}
|
3
3
|
}
|
data/views/layout.slim
CHANGED
@@ -10,22 +10,20 @@ html.no-js lang=Olelo::Config['locale'].sub('_', '-') class={page && !page.head?
|
|
10
10
|
a href=Olelo::Config['base_path'] = Olelo::Config['title']
|
11
11
|
#info
|
12
12
|
- if Olelo::User.logged_in?
|
13
|
-
a href=build_path(:profile) = Olelo::User.current.name
|
13
|
+
a rel="nofollow" href=build_path(:profile) = Olelo::User.current.name
|
14
14
|
' |
|
15
|
-
a href=build_path(:logout) = :logout.t
|
15
|
+
a rel="nofollow" href=build_path(:logout) = :logout.t
|
16
16
|
- else
|
17
|
-
a href=build_path(:login) = :login.t
|
17
|
+
a rel="nofollow" href=build_path(:login) = :login.t
|
18
18
|
#search
|
19
19
|
form action=build_path(:search) method='get'
|
20
20
|
div
|
21
21
|
label.hidden for='pattern' = :search.t
|
22
22
|
&text id='pattern' name='pattern' value={params[:pattern]} placeholder=:search.t
|
23
23
|
#menu
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
li.noborder
|
28
|
-
= date page.version.date
|
24
|
+
= breadcrumbs(page)
|
25
|
+
- if page && !page.head?
|
26
|
+
= date page.version.date
|
29
27
|
= menu :actions
|
30
28
|
#container
|
31
29
|
#sidebar == include_page(Olelo::Config['sidebar_page'])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: olelo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -205,7 +205,6 @@ files:
|
|
205
205
|
- lib/olelo/locale.rb
|
206
206
|
- lib/olelo/locale.yml
|
207
207
|
- lib/olelo/menu.rb
|
208
|
-
- lib/olelo/middleware/blacklist.rb
|
209
208
|
- lib/olelo/middleware/degrade_mime_type.rb
|
210
209
|
- lib/olelo/middleware/flash.rb
|
211
210
|
- lib/olelo/middleware/force_encoding.rb
|
@@ -326,6 +325,7 @@ files:
|
|
326
325
|
- plugins/tags/include.rb
|
327
326
|
- plugins/tags/main.rb
|
328
327
|
- plugins/tags/math.rb
|
328
|
+
- plugins/tags/redirect.rb
|
329
329
|
- plugins/tags/scripting.rb
|
330
330
|
- plugins/tags/sort.rb
|
331
331
|
- plugins/tags/tabs.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# coding: binary
|
2
|
-
# Coding is required for StringIO
|
3
|
-
module Olelo
|
4
|
-
module Middleware
|
5
|
-
class Blacklist
|
6
|
-
NULL_IO = StringIO.new('')
|
7
|
-
|
8
|
-
def initialize(app, options)
|
9
|
-
@app = app
|
10
|
-
@list = options[:blacklist]
|
11
|
-
end
|
12
|
-
|
13
|
-
def call(env)
|
14
|
-
if %w(POST PUT DELETE).include?(env['REQUEST_METHOD']) && @list.include?(Rack::Request.new(env).ip)
|
15
|
-
env.delete('rack.request.form_vars')
|
16
|
-
env.delete('rack.request.form_hash')
|
17
|
-
env.delete('rack.request.form_input')
|
18
|
-
env['rack.input'] = NULL_IO
|
19
|
-
env['REQUEST_METHOD'] = 'GET'
|
20
|
-
end
|
21
|
-
@app.call(env)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|