• R/O
  • SSH
  • HTTPS

tenarai: 提交


Commit MetaInfo

修訂29 (tree)
時間2007-11-29 23:45:20
作者junkikuchi

Log Message

updated widgets.

Change Summary

差異

--- trunk/Rakefile (revision 28)
+++ trunk/Rakefile (revision 29)
@@ -372,7 +372,7 @@
372372 :relations => {'view' => 'views:admin_root.admin'},
373373 :preference => {
374374 'box.background.background_color' => '#ffffff',
375- 'box.border.border_bottom' => 'solid 1px #c3d9ff',
375+ 'box.border.border_bottom' => 'solid 5px #c3d9ff',
376376 'box.padding.padding_top' => '5px',
377377 'box.padding.padding_bottom' => '5px',
378378 'tab.border.border_top' => 'solid 1px #c3d9ff',
@@ -381,9 +381,9 @@
381381 'tab.background.background_color' => '#e8eef7',
382382 'tab.margin.margin_left' => '5px',
383383 'tab.padding.padding_top' => '5px',
384- 'tab.padding.padding_right' => '5px',
384+ 'tab.padding.padding_right' => '10px',
385385 'tab.padding.padding_bottom' => '5px',
386- 'tab.padding.padding_left' => '5px',
386+ 'tab.padding.padding_left' => '10px',
387387 'tab_selected.background.background_color' => '#c3d9ff',
388388 'tab_hover.background.background_color' => '#c3d9ff',
389389 }
@@ -408,9 +408,11 @@
408408 #'box.border.border_bottom' => 'solid 5px #c3d9ff',
409409 'box.border.border_left' => 'solid 5px #c3d9ff',
410410 'menu.padding.padding_top' => '5px',
411- 'menu.padding.padding_right' => '5px',
411+ 'menu.padding.padding_right' => '10px',
412412 'menu.padding.padding_bottom' => '5px',
413- 'menu.padding.padding_left' => '5px',
413+ 'menu.padding.padding_left' => '10px',
414+ 'menu_selected.background.background_color' => '#e8eef7',
415+ 'menu_hover.background.background_color' => '#e8eef7',
414416 'list' => :'views:admin_root.admin.content.list',
415417 'new' => :'views:admin_root.admin.content.new',
416418 }
--- trunk/webapp/Widget/Content/AdminMenu.rb (revision 28)
+++ trunk/webapp/Widget/Content/AdminMenu.rb (revision 29)
@@ -10,25 +10,39 @@
1010 extend Tenarai::ClassLoader
1111
1212 preference_css 'box'
13- preference_css 'menu', 'span'
13+ preference_css 'menu', 'a'
14+ preference_css 'menu_selected', 'a.selected'
15+ preference_css 'menu_hover', 'a:hover'
1416
1517 preference 'list'
1618 preference 'new'
1719
20+ def render_css(css)
21+ super
22+ css.style(css_id + ' li') do |s|
23+ s['list-style'] = 'none'
24+ s['display'] = 'inline'
25+ s['margin'] = '0'
26+ end
27+ end
28+
1829 def render_body(xml)
19- xml.tag('div', 'id' => html_id) do |div|
20- div.tag('span').tag(
21- 'a',
22- 'href' => url(
23- :view => service.models['views'].fetch(preference.list.value)
24- )
25- ).text('List')
26- div.tag('span').tag(
27- 'a',
28- 'href' => url(
29- :view => service.models['views'].fetch(preference.new.value)
30- )
31- ).text('New')
30+ xml.tag('ul', 'id' => html_id) do |ul|
31+ list = service.models['views'].fetch(preference.list.value)
32+ ul.tag('li') do |li|
33+ li.tag('a') do |a|
34+ a['href'] = url(:view => list)
35+ a['class'] = 'selected' if service.view.equal?(list)
36+ end.text('List')
37+ end
38+
39+ new = service.models['views'].fetch(preference.new.value)
40+ ul.tag('li') do |li|
41+ li.tag('a') do |a|
42+ a['href'] = url(:view => new)
43+ a['class'] = 'selected' if service.view.equal?(new)
44+ end.text('New')
45+ end
3246 end
3347 end
3448 end
--- trunk/webapp/Widget/Content/Tab.rb (revision 28)
+++ trunk/webapp/Widget/Content/Tab.rb (revision 29)
@@ -28,13 +28,15 @@
2828 c = service._content
2929 xml.tag('ul', 'id' => html_id) do |ul|
3030 ul.tag('li') do |li|
31- li.tag('a', 'href' => url(:content => c)) do |a|
31+ li.tag('a') do |a|
32+ a['href'] = url(:content => c)
3233 a['class'] = 'selected' if model.content == c
3334 end.text(c.title)
3435 end
3536 c.nodes.each do |val|
3637 ul.tag('li') do |li|
37- li.tag('a', 'href' => url(:content => val)) do |a|
38+ li.tag('a') do |a|
39+ a['href'] = url(:content => val)
3840 a['class'] = 'selected' if model.content == val
3941 end.text(val.title)
4042 end
Show on old repository browser