Changes

Jump to navigation Jump to search
m
no edit summary
Line 119: Line 119:  
button_export.on( 'click', function () {
 
button_export.on( 'click', function () {
   −
var get_record = indexedDBobject.EnqueuePDIO('update record');
+
var get_record = indexedDBobject.EnqueuePDIO('get record');
    
get_record.then( function(result) {
 
get_record.then( function(result) {
 +
if ( result === undefined ) { alert("No data to export") };
 +
 
var filename_tosaveas = "pdiolocalexport_" + result.name.user + "_" + Date.now();
 
var filename_tosaveas = "pdiolocalexport_" + result.name.user + "_" + Date.now();
 +
 
result.id = '';
 
result.id = '';
 
result.name.user = '';
 
result.name.user = '';
 +
 
var export_to_text = JSON.stringify(result);
 
var export_to_text = JSON.stringify(result);
 
var textFileAsBlob = new Blob([export_to_text], {type:'text/plain'});
 
var textFileAsBlob = new Blob([export_to_text], {type:'text/plain'});
Line 150: Line 154:  
});
 
});
   −
mw.notify( $( button_import.$element, '<br>', button_export.$element ) );
+
mw.notify( $( button_import.$element ), { autoHide: false }  );
 
+
mw.notify( $( button_export.$element ), { autoHide: false }  );
    
}
 
}
    
}
 
}
530

edits

Navigation menu