plugins/looptag/looptag.js
function(obj,keys,key,Template,Context,desc){
	var name = key === Template.language.other('name'),
		value = key === null || key === Template.language.other('value');
	keys = keys.sort(function(a,b){
		if(value){
			a = obj[a];
			b = obj[b];
			if(typeof a === "object" && typeof a.execute !== "undefined")
				a = a.execute(Template,Context);
			if(typeof b === "object" && typeof b.execute !== "undefined")
				b = b.execute(Template,Context);
		}
		else if(!name){
			a = obj[a];
			b = obj[b];
			if(typeof a === "object" && typeof a.execute !== "undefined")
				a = a.execute(Template,Context);
			if(typeof b === "object" && typeof b.execute !== "undefined")
				b = b.execute(Template,Context);
			a = a[key];
			b = b[key];
			if(typeof a === "object" && typeof a.execute !== "undefined")
				a = a.execute(Template,Context);
			if(typeof b === "object" && typeof b.execute !== "undefined")
				b = b.execute(Template,Context);
		}
		if(desc){
			return b - a;
		}
		else{
			return a - b;
		}
	});
	return keys;
}
function(obj,keys,key,Template,Context,desc){
	var name = key === Template.language.other('name'),
		value = key === null || key === Template.language.other('value');
	keys = keys.sort(function(a,b){
		if(value){
			a = obj[a];
			b = obj[b];
			if(typeof a === "object" && typeof a.execute !== "undefined")
				a = a.execute(Template,Context);
			if(typeof b === "object" && typeof b.execute !== "undefined")
				b = b.execute(Template,Context);
		}
		else if(!name){
			a = obj[a];
			b = obj[b];
			if(typeof a === "object" && typeof a.execute !== "undefined")
				a = a.execute(Template,Context);
			if(typeof b === "object" && typeof b.execute !== "undefined")
				b = b.execute(Template,Context);
			a = a[key];
			b = b[key];
			if(typeof a === "object" && typeof a.execute !== "undefined")
				a = a.execute(Template,Context);
			if(typeof b === "object" && typeof b.execute !== "undefined")
				b = b.execute(Template,Context);
		}
		if(desc){
			return b - a;
		}
		else{
			return a - b;
		}
	});
	return keys;
}
function ( obj , keys , key , Template , Context , desc ) { var name = key === Template . language . other ( 'name' ) , value = key === null || key === Template . language . other ( 'value' ) ; keys = keys . sort ( function ( a , b ) { if ( value ) { a = obj [ a ] ; b = obj [ b ] ; if ( typeof a === "object" && typeof a . execute !== "undefined" ) a = a . execute ( Template , Context ) ; if ( typeof b === "object" && typeof b . execute !== "undefined" ) b = b . execute ( Template , Context ) ; } else if ( ! name ) { a = obj [ a ] ; b = obj [ b ] ; if ( typeof a === "object" && typeof a . execute !== "undefined" ) a = a . execute ( Template , Context ) ; if ( typeof b === "object" && typeof b . execute !== "undefined" ) b = b . execute ( Template , Context ) ; a = a [ key ] ; b = b [ key ] ; if ( typeof a === "object" && typeof a . execute !== "undefined" ) a = a . execute ( Template , Context ) ; if ( typeof b === "object" && typeof b . execute !== "undefined" ) b = b . execute ( Template , Context ) ; } if ( desc ) { return b - a ; } else { return a - b ; } } ) ; return keys ; }
/*--module--
name:sortFunc
description: sort function for sortloop.
/ * -- module -- name : sortFunc description : sort function for sortloop .