Add some JS for design uploading

This commit is contained in:
Matthew Fu committed 2011-07-19 18:31:53 +08:00
1 parent c3ada90365
commit c48a11d9f5
10 files changed
+97 -17

No files matched your search

+1
View File
@@ -4,6 +4,7 @@
// // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// // the compiled file.
// //
// //= require design_temp
// //= require jquery
// //= require jquery_ujs
+25
View File
@@ -0,0 +1,25 @@
$(".r_snapshot").hover(
function(){
$(this).append($("<span></span>").html('<p class="z-preview"><img src="'+$(this).attr("path")+'"width="220" height="19" /></p>'));
}
,
function(){
$(this).find("span:last").remove();
}
);
$('input.multi_files').change(function(){
$(this).prev("ul").append("<li>"+$(this).val()+"</li>");
new_node =$(this).clone();
new_node.css("display","none");
//new_node.val("asd");
$(this).parent().append(new_node);
$(this).val("");
});
$('a.remove_mark').live("click",function(){
$(this).prev("input").value("true");
$(this).parent().css("text-decoration","line-through")
$(this).remove();
return false;
});
+12
View File
@@ -0,0 +1,12 @@
.z-preview * {
width: 100%;
height: 100%;
}
.z-preview {
background: white;
border: solid;
position: absolute;
width: 200px;
float: right;
height: 200px;
}