@ -71,7 +71,6 @@
var parts = this . model . contentType . split ( '/' ) ;
var parts = this . model . contentType . split ( '/' ) ;
this . contentType = parts [ 0 ] ;
this . contentType = parts [ 0 ] ;
this . fileType = parts [ 1 ] ;
if ( options . timestamp ) {
if ( options . timestamp ) {
this . timestamp = options . timestamp ;
this . timestamp = options . timestamp ;
}
}
@ -79,6 +78,12 @@
events : {
events : {
'click' : 'onclick'
'click' : 'onclick'
} ,
} ,
getFileType : function ( ) {
switch ( this . model . contentType ) {
case 'video/quicktime' : return 'mov' ;
default : return this . model . contentType . split ( '/' ) [ 1 ] ;
}
} ,
onclick : function ( e ) {
onclick : function ( e ) {
switch ( this . contentType ) {
switch ( this . contentType ) {
case 'image' :
case 'image' :
@ -105,8 +110,9 @@
if ( this . timestamp ) {
if ( this . timestamp ) {
suggestion += moment ( this . timestamp ) . format ( '-YYYY-MM-DD-HHmmss' ) ;
suggestion += moment ( this . timestamp ) . format ( '-YYYY-MM-DD-HHmmss' ) ;
}
}
if ( this . fileType ) {
var fileType = this . getFileType ( ) ;
suggestion += '.' + this . fileType ;
if ( fileType ) {
suggestion += '.' + fileType ;
}
}
return suggestion ;
return suggestion ;
} ,
} ,