+ },
+ checkPrefixNameImport: function(rObj, cir_callback){
+ js_log('::checkPrefixNameImport:: ');
+ var cp = rObj.pSobj.cp;
+ var _this = this;
+ //update target_resource_title with resource repository prefix:
+ rObj.target_resource_title = cp.resource_prefix + rObj.target_resource_title;
+ //check if the file exists:
+ _this.checkForFile( rObj.target_resource_title, function( imagePage ){
+ if( imagePage ){
+ //update to local src
+ rObj.local_src = imagePage['imageinfo'][0].url;
+ //@@todo maybe update poster too?
+ rObj.local_poster = imagePage['imageinfo'][0].thumburl;
+ //update the title:
+ rObj.target_resource_title = imagePage.title.replace(/File:|Image:/,'');
+ cir_callback( rObj );
+ }else{
+ //close the dialog and display the import interface:
+ $j.closeLoaderDialog();
+ _this.doImportInterface(rObj, cir_callback);
+ }
+ });