summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-08-15 17:11:59 +0200
committerhukl <contact@smyck.org>2009-08-15 17:11:59 +0200
commitb826671766f2831439b5441683dd9019062bb4bd (patch)
tree78d3277aef2a00f47192a8bd60902859bb36b342
parent4937f4638ae74712e9aba400413ac6447b4df3ef (diff)
made the sorting a bit smoother by adding a placeholder
-rw-r--r--public/javascripts/admin_interface.js10
-rw-r--r--public/stylesheets/admin.css16
2 files changed, 25 insertions, 1 deletions
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js
index b70700b..b0e43e6 100644
--- a/public/javascripts/admin_interface.js
+++ b/public/javascripts/admin_interface.js
@@ -83,9 +83,13 @@ menu_item_sorter = {
83 83
84 initialize : function() { 84 initialize : function() {
85 $("#menu_item_list").sortable({ 85 $("#menu_item_list").sortable({
86 axis: 'y', 86 axis: 'y',
87 items: 'tr', 87 items: 'tr',
88 handle: 'td', 88 handle: 'td',
89 placeholder: 'ui-state-highlight',
90 start: function(e, ui) {
91 menu_item_sorter.placeholder_helper(e,ui);
92 },
89 stop : function(){ 93 stop : function(){
90 $.ajax({ 94 $.ajax({
91 type: "POST", 95 type: "POST",
@@ -98,6 +102,10 @@ menu_item_sorter = {
98 }); 102 });
99 } 103 }
100 }); 104 });
105 },
106
107 placeholder_helper : function(e,ui) {
108 $(".ui-state-highlight").html("<td colspan='100%'></td>");
101 } 109 }
102} 110}
103 111
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css
index faebbea..a2da502 100644
--- a/public/stylesheets/admin.css
+++ b/public/stylesheets/admin.css
@@ -340,3 +340,19 @@ table#content th.description {
340table#content th.content { 340table#content th.content {
341 width: 690px; 341 width: 690px;
342} 342}
343
344#menu_item_list {
345 border-collapse: collapse;
346}
347
348#menu_item_list tr:hover {
349 background-color: #f1f1f1;
350}
351
352#menu_item_list td {
353 height: 20px;
354}
355
356.ui-state-highlight td{
357 height: 20px;
358} \ No newline at end of file