• R/O
  • SSH
  • HTTPS

tenarai: 提交


Commit MetaInfo

修訂95 (tree)
時間2008-05-25 23:40:15
作者junkikuchi

Log Message

updated.

Change Summary

差異

--- trunk/webapp/Widget/Session.rb (revision 94)
+++ trunk/webapp/Widget/Session.rb (revision 95)
@@ -38,7 +38,7 @@
3838 )
3939 end
4040
41- def build_uri(path, query, param=[])
41+ def widget_uri(path, query, param=[])
4242 super(path, query, ['a'])
4343 end
4444 end
--- trunk/webapp/Widget/View/List.rb (revision 94)
+++ trunk/webapp/Widget/View/List.rb (revision 95)
@@ -12,9 +12,9 @@
1212 preference_css 'box'
1313 preference_list
1414
15- def uri(*param, &block)
16- build_uri(param, &block)
17- end
15+ #def uri(*param, &block)
16+ # build_uri(*param, &block)
17+ #end
1818
1919 def render_html(xml, builder, content=nil)
2020 content = resource.content.parent if content.nil?
--- trunk/webapp/Widget.rb (revision 94)
+++ trunk/webapp/Widget.rb (revision 95)
@@ -164,6 +164,22 @@
164164 def widget_uri(path, query, param=[])
165165 end
166166
167+ def build_uri(param=[], &block)
168+ query = Tenarai::CGI::Query.new
169+ block.call(query) if block_given?
170+ service.build_uri(
171+ path.inject([]) do |ret, val|
172+ if val.equal?(self)
173+ val.widget_uri(ret, query, param)
174+ else
175+ val.widget_uri(ret, query)
176+ end
177+ ret
178+ end,
179+ query
180+ )
181+ end
182+
167183 def uri(*param, &block)
168184 resource.uri(*param, &block)
169185 end
--- trunk/webapp/Resource.rb (revision 94)
+++ trunk/webapp/Resource.rb (revision 95)
@@ -18,7 +18,6 @@
1818
1919 def widget_uri(path, query, param=[])
2020 param = [@content.id] if param.empty? && @content
21-
2221 if view.path.size == 1
2322 path << param.join(',')
2423 else
@@ -26,22 +25,6 @@
2625 end
2726 end
2827
29- def build_uri(param=[], &block)
30- query = Tenarai::CGI::Query.new
31- block.call(query) if block_given?
32- service.widget_uri(
33- path.inject([]) do |ret, val|
34- if val.equal?(self)
35- val.widget_uri(ret, query, param)
36- else
37- val.widget_uri(ret, query)
38- end
39- ret
40- end,
41- query
42- )
43- end
44-
4528 def uri(*param, &block)
4629 build_uri(param, &block)
4730 end
Show on old repository browser