Fix code style

This commit is contained in:
brantje 2017-07-01 16:05:32 +02:00
parent 1b173e76a1
commit 2c0455ead1
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
3 changed files with 11 additions and 12 deletions

View file

@ -46,8 +46,8 @@ PassmanExporter.csv.export = function (credentials, FileService, EncryptService)
for (var t = 0; t < _credential[field].length; t++) {
_tags.push(_credential[field][t].text);
}
var data = '[' + _tags.join(",") + ']';
row_data.push('"' + data + '"');
var tag_data = '[' + _tags.join(",") + ']';
row_data.push('"' + tag_data + '"');
}
else if (field == 'custom_fields' || field == 'files') {
var _fields = JSON.stringify(_credential[field]);
@ -68,7 +68,7 @@ PassmanExporter.csv.export = function (credentials, FileService, EncryptService)
}
this.call_then();
download(file_data, 'passman-export.csv');
}).bind(this)).progress(function(progress) {
}).bind(this)).progress(function() {
});

View file

@ -33,7 +33,7 @@ PassmanExporter.json = {
PassmanExporter.json.export = function (credentials, FileService, EncryptService) {
/** global: C_Promise */
return new C_Promise(function () {
PassmanExporter.getCredentialsWithFiles(credentials, FileService, EncryptService).then((function(data){
PassmanExporter.getCredentialsWithFiles(credentials, FileService, EncryptService).then((function(){
var _output = [];
for (var i = 0; i < credentials.length; i++) {
var _credential = angular.copy(credentials[i]);
@ -42,7 +42,6 @@ PassmanExporter.json.export = function (credentials, FileService, EncryptService
delete _credential.vault_id;
delete _credential.shared_key;
console.log(_credential);
_output.push(_credential);
var progress = {
@ -55,8 +54,8 @@ PassmanExporter.json.export = function (credentials, FileService, EncryptService
var file_data = JSON.stringify(_output);
this.call_then();
download(file_data, 'passman-export.json');
}).bind(this)).progress(function(progress) {
console.log(progress);
}).bind(this)).progress(function() {
});

View file

@ -28,10 +28,10 @@ if (!window['PassmanExporter']) {
cred: credentials,
FS: FileService,
ES: EncryptService
}
};
/** global: C_Promise */
return new C_Promise(function() {
_this = this.parent;
var _this = this.parent;
var credentials = _this.cred;
this.parent.total = 0;
this.parent.finished = 0;
@ -68,7 +68,7 @@ if (!window['PassmanExporter']) {
var item = credentials[i];
// Custom fields
for (var c = 0; c < item.custom_fields.length; c++) {
for (c = 0; c < item.custom_fields.length; c++) {
var cf = item.custom_fields[c];
if (cf.field_type === 'file') {
this.parent.total ++;
@ -100,5 +100,5 @@ if (!window['PassmanExporter']) {
}
}, t);
}
}
};
}