• R/O
  • SSH
  • HTTPS

tenarai: 提交


Commit MetaInfo

修訂108 (tree)
時間2008-09-05 21:42:52
作者junkikuchi

Log Message

updated.

Change Summary

差異

--- trunk/webapp/Widget/Widget/Preview.rb (revision 107)
+++ trunk/webapp/Widget/Widget/Preview.rb (revision 108)
@@ -12,11 +12,11 @@
1212 css
1313
1414 def render_html(head, body)
15- body.tag('div', html_attr) do |div|
16- @preview = true
17- resource.resource.content.preview(@service, [], head, div)
18- div.text('') if div.empty?
19- end unless @preview
15+ #body.tag('div', html_attr) do |div|
16+ # @preview = true
17+ # resource.resource.content.preview(@service, [], head, div)
18+ # div.text('') if div.empty?
19+ #end unless @preview
2020 end
2121 end
2222 end
--- trunk/webapp/Widget/Widget/Property.rb (revision 107)
+++ trunk/webapp/Widget/Widget/Property.rb (revision 108)
@@ -12,40 +12,33 @@
1212 css
1313
1414 def render_property_form(xml, widget)
15- widget.property.each do |ppt|
16- xml.tag('h3').text(ppt.name)
17- ppt.each do |group|
18- xml.tag(
19- 'form',
20- 'method' => 'post',
21- 'action' => uri(
22- @builder.view,
23- resource.content.id
24- ) do |query|
25- query[form_id('update')] = nil
26- end
27- ) do |form|
28- form.tag('h4').text(group.name)
29- form.tag('dl') do |dl|
30- group.each do |item|
31- _id = form_id(item.path_name)
32- dl.tag('dt').tag('label', 'for' => _id).text(item.name)
33- dl.tag('dd').tag(
34- 'input',
35- 'type' => 'text',
36- 'id' => _id,
37- 'name' => _id,
38- 'value' => item.value
39- )
40- end
41- dl.tag('dt').tag('br')
15+ xml.tag(
16+ 'form',
17+ 'method' => 'post',
18+ 'action' => uri(
19+ @builder.view,
20+ resource.content.id
21+ ) do |query|
22+ query[form_id('update')] = nil
23+ end
24+ ) do |form|
25+ form.tag('dl') do |dl|
26+ widget.property.each do |key, val|
27+ dl.tag('dt').tag('label', 'for' => key.to_s).text(key)
4228 dl.tag('dd').tag(
4329 'input',
44- 'type' => 'submit',
45- 'value' => 'update'
30+ 'type' => 'text',
31+ 'id' => key.to_s,
32+ 'name' => key.to_s,
33+ 'value' => val
4634 )
47- end
4835 end
36+ dl.tag('dt').tag('br')
37+ dl.tag('dd').tag(
38+ 'input',
39+ 'type' => 'submit',
40+ 'value' => 'update'
41+ )
4942 end
5043 end
5144 end
@@ -59,7 +52,7 @@
5952
6053 def post(query={})
6154 query.each do |key, val|
62- resource.content.property.find(key).value = if val.empty?
55+ resource.content.property[key.to_sym] = if val.empty?
6356 nil
6457 else
6558 val
--- trunk/webapp/Widget/Widget/CSS.rb (revision 107)
+++ trunk/webapp/Widget/Widget/CSS.rb (revision 108)
@@ -54,7 +54,7 @@
5454
5555 def render_html(head, body)
5656 body.tag('div', html_attr) do |div|
57- render_css_form(div, resource.content)
57+ #render_css_form(div, resource.content)
5858 div.text('') if div.empty?
5959 end
6060 end
Show on old repository browser