|
@@ -88,7 +88,8 @@ function hackpoint_part_save(element){
|
|
}
|
|
}
|
|
$.action(data,function(r){
|
|
$.action(data,function(r){
|
|
|
|
|
|
-
|
|
|
|
|
|
+ li.attr('data-part',r.part);
|
|
|
|
+ li.attr('data-id',r.id)
|
|
$.message('success','Enregistré');
|
|
$.message('success','Enregistré');
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -387,7 +388,7 @@ function resource_add_document(files){
|
|
line.find('i.pointer').attr('onclick', 'resource_delete_document(this)');
|
|
line.find('i.pointer').attr('onclick', 'resource_delete_document(this)');
|
|
if($('.hackpoint').hasClass('readonly')) line.find('i.pointer').hide();
|
|
if($('.hackpoint').hasClass('readonly')) line.find('i.pointer').hide();
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
if(!file.icon){
|
|
if(!file.icon){
|
|
line.find('img').attr('src', file.url);
|
|
line.find('img').attr('src', file.url);
|
|
}else{
|
|
}else{
|
|
@@ -480,7 +481,19 @@ function hackpoint_resource_save(element){
|
|
type:$(element).attr('data-slug')
|
|
type:$(element).attr('data-slug')
|
|
}
|
|
}
|
|
$.action(data,function(r){
|
|
$.action(data,function(r){
|
|
- hackpoint_resource_search(null,'#resources li[data-id="'+r.id+'"]');
|
|
|
|
|
|
+
|
|
|
|
+ var tpl = $('#resources li:eq(0)').get(0).outerHTML;
|
|
|
|
+ var element = $(Mustache.render(tpl,r));
|
|
|
|
+ $('#resources').append(element);
|
|
|
|
+
|
|
|
|
+ element.removeClass('hidden')
|
|
|
|
+ .css('transform','translateX(-120px)');
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ $(element).css('transform','translateX(0px)');
|
|
|
|
+ },150);
|
|
|
|
+
|
|
|
|
+ element.trigger('click');
|
|
|
|
+
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|