aboutsummaryrefslogtreecommitdiffstats
path: root/demos/real-world
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2008-09-03 13:29:43 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2008-09-03 13:29:43 +0000
commitb59354a4b2942ab8954c81e0164db231d753d7cf (patch)
tree0048321db578c80cbcac836f648f8294ab287014 /demos/real-world
parentd0b0281db1c187aec10231492e276ec5aa9603a2 (diff)
downloadjquery-ui-b59354a4b2942ab8954c81e0164db231d753d7cf.tar.gz
jquery-ui-b59354a4b2942ab8954c81e0164db231d753d7cf.zip
layout demo: fixed positioning of add-button, border-top of header got messed up in IE
Diffstat (limited to 'demos/real-world')
-rw-r--r--demos/real-world/layout/demo-ie.css2
-rw-r--r--demos/real-world/layout/demo.css4
-rw-r--r--demos/real-world/layout/demo.js5
3 files changed, 7 insertions, 4 deletions
diff --git a/demos/real-world/layout/demo-ie.css b/demos/real-world/layout/demo-ie.css
index bb59ee43c..0ba108cd1 100644
--- a/demos/real-world/layout/demo-ie.css
+++ b/demos/real-world/layout/demo-ie.css
@@ -1 +1,3 @@
+.ui-sortable h2 { top: -4px; }
+
#overlay #preloader img { margin-top: 11px; } \ No newline at end of file
diff --git a/demos/real-world/layout/demo.css b/demos/real-world/layout/demo.css
index 0076da023..151c770f3 100644
--- a/demos/real-world/layout/demo.css
+++ b/demos/real-world/layout/demo.css
@@ -11,7 +11,7 @@ a { color:#FFF; }
#overlay #preloader img { margin:0; vertical-align:middle; }
.ui-sortable { background-color:#FFF; border:1px solid #555; color:#222; margin:0 15px 15px 0; padding:0 10px 10px; width:175px; }
-.ui-sortable h2 { background-color:#555; border-top:3px solid #666; color:#FFF; font-size:11px; margin:0 -10px 10px; line-height:2; padding:0 10px; }
+.ui-sortable h2 { background-color:#555; border-top:3px solid #666; color:#FFF; font-size:11px; margin:0 -10px 10px; line-height:2; padding:0 10px; position:relative; }
dl.sort { color:#222; margin:10px 0; }
#uidemo dl.first { margin-top:0; }
@@ -27,7 +27,7 @@ span.options { cursor:default; font-size:1px; line-height:1px; position:absolute
span.options a { background-color:#FFF; cursor:pointer; display:block; float:left; text-indent:-9000px; }
span.options a.add { background: url(add.png) no-repeat; }
-.ui-sortable h2 span.options { right:10px; top:8px; width:30px; }
+.ui-sortable h2 span.options { right:-12px; top:5px; width:30px; }
.ui-sortable h2 span.options a { height:12px; width:30px; }
dl.sort dt span.options { right:5px; top:5px; width:27px; }
diff --git a/demos/real-world/layout/demo.js b/demos/real-world/layout/demo.js
index df1a9f90a..d93c76d4c 100644
--- a/demos/real-world/layout/demo.js
+++ b/demos/real-world/layout/demo.js
@@ -22,12 +22,13 @@
updateUpDown(dl.parent());
};
+ var counter = 1;
function addItem(){
var sortable = $(this).parents('.ui-sortable');
var options = '<span class="options"><a class="up">up</a><a class="down">down</a></span>';
var tpl = '<dl class="sort"><dt>{name}' + options + '</dt><dd>{desc}</dd></dl>';
- var html = tpl.replace(/{name}/g, 'Dynamic name :D').replace(/{desc}/g, 'Description');
-
+ var html = tpl.replace(/{name}/g, 'Dynamic name ' + counter).replace(/{desc}/g, 'Description');
+ counter += 1;
sortable.append(html).sortable('refresh').find('a.up, a.down').bind('click', moveUpDown);
updateUpDown(sortable);
};