1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-22 08:20:11 +00:00

Prosecute FCVD updates.

This commit is contained in:
devlinjd 2015-12-16 11:25:50 -05:00
parent 8361cf9960
commit 1603a4bc73
2 changed files with 7 additions and 1 deletions

View File

@ -92,6 +92,7 @@
"sets": [ "sets": [
{ {
"name": "", "name": "",
"level": "",
"skills": [] "skills": []
} }
], ],

View File

@ -219,6 +219,7 @@ Definition of the FRESHResume class.
FreshResume.prototype.count = function( obj ) { FreshResume.prototype.count = function( obj ) {
if( !obj ) return 0; if( !obj ) return 0;
if( obj.history ) return obj.history.length; if( obj.history ) return obj.history.length;
if( obj.sets ) return obj.sets.length;
return obj.length || 0; return obj.length || 0;
} }
@ -237,10 +238,14 @@ Definition of the FRESHResume class.
var defSheet = FreshResume.default(); var defSheet = FreshResume.default();
var newObject = defSheet[moniker].history ? var newObject = defSheet[moniker].history ?
$.extend( true, {}, defSheet[ moniker ].history[0] ) : $.extend( true, {}, defSheet[ moniker ].history[0] ) :
$.extend( true, {}, defSheet[ moniker ][0] ); (moniker === 'skills' ?
$.extend( true, {}, defSheet.skills.sets[0] ) :
$.extend( true, {}, defSheet[ moniker ][0] ));
this[ moniker ] = this[ moniker ] || []; this[ moniker ] = this[ moniker ] || [];
if( this[ moniker ].history ) if( this[ moniker ].history )
this[ moniker ].history.push( newObject ); this[ moniker ].history.push( newObject );
else if( moniker === 'skills' )
this.skills.sets.push( newObject );
else else
this[ moniker ].push( newObject ); this[ moniker ].push( newObject );
return newObject; return newObject;