diff options
| author | hukl <contact@smyck.org> | 2009-09-13 13:37:29 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-13 13:37:29 +0200 |
| commit | bb4afc944049652f1c51124808fd64de6ebe338a (patch) | |
| tree | a2e4aace96d8bf71fd9cf35b360e0c13f7d76ec5 | |
| parent | c91ac2f125d622df59d13f263887c6c8a8adedcb (diff) | |
drag handles for menu item interface
Closes #12 #20
| -rw-r--r-- | app/views/menu_items/index.html.erb | 5 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/app/views/menu_items/index.html.erb b/app/views/menu_items/index.html.erb index f4316bf..123a07a 100644 --- a/app/views/menu_items/index.html.erb +++ b/app/views/menu_items/index.html.erb | |||
| @@ -8,7 +8,10 @@ | |||
| 8 | <table id="menu_item_list"> | 8 | <table id="menu_item_list"> |
| 9 | <% @menu_items.each do |menu_item| %> | 9 | <% @menu_items.each do |menu_item| %> |
| 10 | <tr id="menu_items-<%= menu_item.id %>"> | 10 | <tr id="menu_items-<%= menu_item.id %>"> |
| 11 | <td><%= menu_item.title %></td> | 11 | <td class="menu_sort_handle"> |
| 12 | <div></div> | ||
| 13 | </td> | ||
| 14 | <td class="menu_item_title"><%= menu_item.title %></td> | ||
| 12 | <td><%= link_to "Edit", edit_menu_item_path(menu_item) %></td> | 15 | <td><%= link_to "Edit", edit_menu_item_path(menu_item) %></td> |
| 13 | <td> | 16 | <td> |
| 14 | <%= link_to( | 17 | <%= link_to( |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 575ddff..d74632b 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -387,6 +387,20 @@ table#content th.content { | |||
| 387 | height: 20px; | 387 | height: 20px; |
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | #menu_item_list td.menu_sort_handle div { | ||
| 391 | background-color: #989898; | ||
| 392 | height: 10px; | ||
| 393 | width: 10px; | ||
| 394 | } | ||
| 395 | |||
| 396 | #menu_item_list td.menu_sort_handle div:hover { | ||
| 397 | cursor: move; | ||
| 398 | } | ||
| 399 | |||
| 400 | #menu_item_list td.menu_item_title { | ||
| 401 | width: 100px; | ||
| 402 | } | ||
| 403 | |||
| 390 | .ui-state-highlight td{ | 404 | .ui-state-highlight td{ |
| 391 | height: 20px; | 405 | height: 20px; |
| 392 | } | 406 | } |
