Browse Source

Core update

Valentin CARRUESCO 4 years ago
parent
commit
84eb6e7f3e
1 changed files with 16 additions and 28 deletions
  1. 16 28
      plugin/hackpoint/js/main.js

+ 16 - 28
plugin/hackpoint/js/main.js

@@ -88,36 +88,25 @@ modalize : function(options){
 
 //Récuperation d'une liste de part dans le tableau #parts
 function hackpoint_resource_part_search(callback){
-	
 		
 	$('#parts').fill({
 		action:'hackpoint_resource_part_search',
 		resource : $('#sketch-editor').attr('data-id'),
-		showItems : false
+		showing : function(li,i){
+			li.css('transform','scale(0)').removeClass('hidden');
+			setTimeout(function(){
+				li.css('transform','scale(1)');
+			},i*200);
+		}
 	},function(){
 		$('#parts li:not(:eq(0))').each(function(i,li){
-
 			hackpoint_resource_part_upload(li);
-
 			var div  = $('[data-stream]',li);
-
 			if($(div).attr('data-stream') =='') return;
 			$(div).css('background','url(data:'+$(div).attr('data-stream')+')')
 		     	.css('background-size','cover');
 		});
 
-
-		$('#parts li:not(:eq(0))').css('transform','scale(0)').removeClass('hidden')
-
-		$('#parts li:not(:eq(0))').each(function(i,li){
-			var li = $(li);
-			setTimeout(function(){
-				li.css('transform','scale(1)');
-			},i*200);
-		});
-		
-		
-
 		if(callback!=null) callback();
 	});
 }
@@ -475,7 +464,16 @@ function hackpoint_resource_search(callback,triggered){
 	$('#resources').fill({
 		action:'hackpoint_resource_search',
 		sketch : $('#sketch-form').attr('data-id'),
-		showItems : false
+		showing : function(li,i){
+			//affiche les menu de façon progressive
+	    	li.removeClass('hidden')
+	    	.css('transform','translateX(-120px)');
+	    	
+    		setTimeout(function(){
+				li
+				.css('transform','translateX(0px)');
+			},150*i);
+		}
 	},function(){
 
 
@@ -498,16 +496,6 @@ function hackpoint_resource_search(callback,triggered){
 			}
 		});
     	$( "#resources" ).disableSelection();
-
-    	//affiche les menu de façon progressive
-    	$('#resources li:not(:eq(0))').removeClass('hidden')
-    	.css('transform','translateX(-120px)');
-    	$('#resources li:visible').each(function(i,element){
-    		setTimeout(function(){
-				$(element)
-				.css('transform','translateX(0px)');
-			},150*i);
-    	});
     
     	var trigger =  '#resources li:eq(1)';
     	if(triggered){