Clean code and workaround mongoid embedded with carrierwave
This commit is contained in:
1 parent
a1391493a3
commit
a571d1dcff
7 files changed
+55
-66
No files matched your search
@@ -59,9 +59,9 @@ $(".r_snapshot").live({
|
||||
);
|
||||
|
||||
$('input.multi_files').live("change", function(){
|
||||
$(this).parent().prev("ul").append("<li>"+$(this).val()+"</li>");
|
||||
new_node =$(this).parent().clone();
|
||||
$(this).css("display","none");
|
||||
$(this).parent().prev("ul").append("<li>" + $(this).val() + "</li>");
|
||||
new_node = $(this).parent().clone();
|
||||
$(this).parent().css("display","none");
|
||||
new_node.children('input.multi_files').val("");
|
||||
$(this).parent().before(new_node);
|
||||
});
|
||||
@@ -69,8 +69,8 @@ $('input.multi_files').live("change", function(){
|
||||
$('a.remove_mark').live("click",function(){
|
||||
$(this).prev("input").val("true");
|
||||
$(this).parent().css("text-decoration","line-through")
|
||||
$(this).parent("li").removeClass("r_snapshot");
|
||||
$(this).next("span").remove();
|
||||
$(this).parent().removeClass("r_snapshot");
|
||||
$(this).next().remove();
|
||||
$(this).remove();
|
||||
return false;
|
||||
});
|
||||
Reference in new issue
Block a user