• R/O
  • SSH
  • HTTPS

tenarai: 提交


Commit MetaInfo

修訂78 (tree)
時間2008-04-14 20:10:20
作者junkikuchi

Log Message

updated.

Change Summary

差異

--- trunk/init_model.rb (revision 77)
+++ trunk/init_model.rb (revision 78)
@@ -28,7 +28,7 @@
2828 :name => 'index',
2929 :class => 'Content',
3030 :row => {
31- 'title' => 'index',
31+ 'title' => 'インデックスページ',
3232 'body' => '
3333 コンテンツについて記述。サマリー。
3434
@@ -109,6 +109,11 @@
109109 :class => 'View',
110110 :row => {'name' => 'edit'},
111111 },
112+ {
113+ :name => 'resource.index.delete',
114+ :class => 'View',
115+ :row => {'name' => 'delete'},
116+ },
112117 ],
113118
114119 'widget' => [
@@ -145,10 +150,7 @@
145150 :row => {},
146151 :relation => {'view' => 'view:resource'},
147152 :preference => {
148- 'html.size.height' => '100%',
149- #'body.font.font_size' => '122%',
150153 'body.text.text_align' => 'left',
151- 'body.size.height' => '100%',
152154 }
153155 },
154156 {
@@ -175,8 +177,7 @@
175177 :row => {},
176178 :relation => {'view' => 'view:resource.index'},
177179 :preference => {
178- 'box.size.width' => '900px',
179- 'box.size.height' => '100%',
180+ 'box.size.width' => '900px',
180181 'box.margin.margin_left' => 'auto',
181182 'box.margin.margin_right' => 'auto',
182183 }
@@ -210,12 +211,15 @@
210211 :preference => {
211212 'ul.text.text_align' => 'right',
212213 'ul.padding.padding_bottom' => '5px',
213- 'li.layout.display' => 'inline',
214- 'a.text.text_decoration' => 'none',
215- 'a.padding.padding_top' => '5px',
216- 'a.padding.padding_right' => '5px',
217- 'a.padding.padding_bottom' => '5px',
218- 'a.padding.padding_left' => '5px',
214+
215+ 'li.layout.display' => 'inline',
216+
217+ 'a.text.text_decoration' => 'none',
218+
219+ 'a.padding.padding_top' => '5px',
220+ 'a.padding.padding_right' => '5px',
221+ 'a.padding.padding_bottom' => '5px',
222+ 'a.padding.padding_left' => '5px',
219223 }
220224 },
221225 {
@@ -244,11 +248,12 @@
244248 :row => {},
245249 :relation => {'view' => 'view:resource.index'},
246250 :preference => {
247- 'box.size.width' => '100%',
248- 'ul.margin.margin_bottom' => '10px',
249- 'a.text.text_decoration' => 'none',
250- 'a.margin.margin_right' => '10px',
251- 'a.margin.margin_bottom' => '10px',
251+ #'box.size.width' => '100%',
252+
253+ 'li_ul.margin.margin_bottom' => '0',
254+ 'ul_li.margin.margin_left' => '1em',
255+
256+ 'a.text.text_decoration' => 'none',
252257 }
253258 },
254259 {
@@ -257,16 +262,12 @@
257262 :row => {},
258263 :relation => {'view' => 'view:resource.index'},
259264 :preference => {
260- 'box.margin.margin_top' => '10px',
261- 'box.margin.margin_bottom' => '10px',
262- 'ul.layout.display' => 'inline',
263- 'ul.padding.padding_top' => '10px',
264- 'ul.padding.padding_bottom' => '10px',
265- 'li.layout.display' => 'inline',
266- 'a.text.text_decoration' => 'none',
267- 'a.padding.padding_top' => '10px',
268- 'a.padding.padding_right' => '10px',
269- 'a.padding.padding_bottom' => '10px',
265+ 'box.margin.margin_bottom' => '10px',
266+
267+ 'ul.layout.display' => 'inline',
268+ 'ul_li.layout.display' => 'inline',
269+
270+ 'a.text.text_decoration' => 'none',
270271 }
271272 },
272273 {
@@ -276,18 +277,8 @@
276277 :relation => {'view' => 'view:resource.index'},
277278 :preference => {
278279 'box.font.font_size' => '197%',
279-=begin
280- 'box.padding.padding_top' => '5px',
281- 'box.padding.padding_right' => '10px',
282- 'box.padding.padding_bottom' => '5px',
283- 'box.padding.padding_left' => '5px',
284280
285- 'box.border.border_top' => 'solid 1px silver',
286- 'box.border.border_right' => 'solid 1px silver',
287- 'box.border.border_bottom' => 'solid 1px silver',
288- 'box.border.border_left' => 'solid 10px red',
289-=end
290- 'box.margin.margin_bottom' => '10px',
281+ 'box.margin.margin_bottom' => '10px',
291282 }
292283 },
293284 {
@@ -401,6 +392,7 @@
401392
402393 'li_ul.margin.margin_bottom' => '0',
403394 'ul_li.margin.margin_left' => '1em',
395+ 'ul_li.list.list_style_type' => 'disc',
404396
405397 'ol.margin.margin_bottom' => '10px',
406398 'ol.margin.margin_left' => '10px',
@@ -407,6 +399,7 @@
407399
408400 'li_ol.margin.margin_bottom' => '0',
409401 'ol_li.margin.margin_left' => '1em',
402+ 'ol_li.list.list_style_type' => 'decimal',
410403 }
411404 },
412405 {
@@ -415,13 +408,16 @@
415408 :row => {},
416409 :relation => {'view' => 'view:resource.index.new'},
417410 :preference => {
418- 'form.form.type' => 'new',
419- 'label.layout.display' => 'block',
420- 'label.margin.margin_bottom' => '5px',
421- 'title.size.width' => '100%',
422- 'title.margin.margin_bottom' => '10px',
423- 'content.size.width' => '100%',
424- 'content.size.height' => '350px',
411+ 'form.form.type' => 'new',
412+
413+ 'label.layout.display' => 'block',
414+ 'label.margin.margin_bottom' => '5px',
415+
416+ 'title.size.width' => '100%',
417+ 'title.margin.margin_bottom' => '10px',
418+
419+ 'content.size.width' => '100%',
420+ 'content.size.height' => '300px',
425421 'content.margin.margin_bottom' => '10px',
426422 }
427423 },
@@ -431,13 +427,16 @@
431427 :row => {},
432428 :relation => {'view' => 'view:resource.index.edit'},
433429 :preference => {
434- 'form.form.type' => 'edit',
435- 'label.layout.display' => 'block',
436- 'label.margin.margin_bottom' => '5px',
437- 'title.size.width' => '100%',
438- 'title.margin.margin_bottom' => '10px',
439- 'content.size.width' => '100%',
440- 'content.size.height' => '350px',
430+ 'form.form.type' => 'edit',
431+
432+ 'label.layout.display' => 'block',
433+ 'label.margin.margin_bottom' => '5px',
434+
435+ 'title.size.width' => '100%',
436+ 'title.margin.margin_bottom' => '10px',
437+
438+ 'content.size.width' => '100%',
439+ 'content.size.height' => '300px',
441440 'content.margin.margin_bottom' => '10px',
442441 }
443442 },
--- trunk/main.rb (revision 77)
+++ trunk/main.rb (revision 78)
@@ -25,8 +25,15 @@
2525 model do |m|
2626 m['service'].pub_dir = @config[:server][:pub_dir]
2727 Tenarai::Server.new(@config[:server]) do |request, response|
28- m['service'].dispatch(m, request, response)
29- m.refresh
28+ begin
29+ m['service'].dispatch(m, request, response)
30+ m.refresh
31+ rescue
32+ p $!
33+ $!.backtrace.each do |val|
34+ puts ' ' + val
35+ end
36+ end
3037 end.__send__(name)
3138 end
3239 end
@@ -43,25 +50,8 @@
4350 server('mongrel')
4451 end
4552
46- def error
47- p $!
48- $!.backtrace.each do |val|
49- puts ' ' + val
50- end
51- end
52-
53- def database(&block)
54- begin
55- Tenarai::DB.new(@config[:db]) do |db|
56- block.call(db)
57- end
58- rescue
59- error
60- end
61- end
62-
6353 def model(&block)
64- database do |db|
54+ Tenarai::DB.new(@config[:db]) do |db|
6555 block.call(Tenarai::DB::Container.new(db, @config[:model]))
6656 end
6757 end
--- trunk/webapp/Widget/Content/Wiki.rb (revision 77)
+++ trunk/webapp/Widget/Content/Wiki.rb (revision 78)
@@ -32,12 +32,6 @@
3232 preference_css 'li_ol', 'li ol'
3333 preference_css 'ol_li', 'ol li'
3434
35- def render_css(css, builder)
36- css.selector('%s ul li' % css_id)['list-style-type'] = 'disc'
37- css.selector('%s ol li' % css_id)['list-style-type'] = 'decimal'
38- super
39- end
40-
4135 def render_html(xml, builder)
4236 xml.tag('div', 'id' => html_id) do |div|
4337 div << Tenarai::Wiki.new(resource.content.body)
--- trunk/webapp/Widget/Content/List.rb (revision 77)
+++ trunk/webapp/Widget/Content/List.rb (revision 78)
@@ -11,7 +11,8 @@
1111
1212 preference_css 'box'
1313 preference_css 'ul', 'ul'
14- preference_css 'li', 'li'
14+ preference_css 'li_ul', 'li ul'
15+ preference_css 'ul_li', 'ul li'
1516 preference_css 'a', 'a'
1617 preference_css 'a_selected', 'a.selected'
1718 preference_css 'a_hover', 'a:hover'
--- trunk/webapp/Widget/Content/Path.rb (revision 77)
+++ trunk/webapp/Widget/Content/Path.rb (revision 78)
@@ -11,7 +11,9 @@
1111
1212 preference_css 'box'
1313 preference_css 'ul', 'ul'
14- preference_css 'li', 'li'
14+ preference_css 'ul_li', 'ul li'
15+ preference_css 'li_ul', 'li ul'
16+ preference_css 'li_ul_li', 'li ul li'
1517 preference_css 'a', 'a'
1618 preference_css 'a_selected', 'a.selected'
1719 preference_css 'a_hover', 'a:hover'
--- trunk/webapp/Widget.rb (revision 77)
+++ trunk/webapp/Widget.rb (revision 78)
@@ -86,6 +86,10 @@
8686 'display',
8787 ],
8888
89+ 'list' => [
90+ 'list_style_type',
91+ ],
92+
8993 'ui' => [
9094 'cursor'
9195 ],
Show on old repository browser