mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 08:20:11 +00:00
...
This commit is contained in:
parent
5c49a8297f
commit
8273e7d150
@ -47,6 +47,7 @@
|
||||
"position": "",
|
||||
"summary": "",
|
||||
"start": "",
|
||||
"end": "",
|
||||
"keywords": [],
|
||||
"highlights": []
|
||||
}
|
||||
|
@ -213,6 +213,15 @@ Definition of the FRESHResume class.
|
||||
delete this.social;
|
||||
};
|
||||
|
||||
/**
|
||||
Get a safe count of the number of things in a section.
|
||||
*/
|
||||
FreshResume.prototype.count = function( obj ) {
|
||||
if( !obj ) return 0;
|
||||
if( obj.history ) return obj.history.length;
|
||||
return obj.length || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
Get the default (empty) sheet.
|
||||
*/
|
||||
@ -226,8 +235,13 @@ Definition of the FRESHResume class.
|
||||
*/
|
||||
FreshResume.prototype.add = function( moniker ) {
|
||||
var defSheet = FreshResume.default();
|
||||
var newObject = $.extend( true, {}, defSheet[ moniker ][0] );
|
||||
var newObject = defSheet[moniker].history ?
|
||||
$.extend( true, {}, defSheet[ moniker ].history[0] ) :
|
||||
$.extend( true, {}, defSheet[ moniker ][0] );
|
||||
this[ moniker ] = this[ moniker ] || [];
|
||||
if( this[ moniker ].history )
|
||||
this[ moniker ].history.push( newObject );
|
||||
else
|
||||
this[ moniker ].push( newObject );
|
||||
return newObject;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user