Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorbrantje <brantje@gmail.com>2016-10-12 21:12:28 +0300
committerbrantje <brantje@gmail.com>2016-10-12 21:16:37 +0300
commit1a74def8dc02475ee0df2b9cd25d77ae7cb3007e (patch)
tree7d92b46d6a454d34c860ae27c586f3c78dbe18c8 /js
parentb658e2a4ca16e7cbec4e49186911be871f555885 (diff)
Remove unused code
Diffstat (limited to 'js')
-rw-r--r--js/app/controllers/bookmarklet.js9
-rw-r--r--js/app/controllers/credential.js6
-rw-r--r--js/app/controllers/edit_credential.js4
-rw-r--r--js/app/controllers/import.js4
-rw-r--r--js/app/controllers/public_shared_credential.js1
-rw-r--r--js/app/controllers/revision.js2
-rw-r--r--js/app/controllers/share.js13
-rw-r--r--js/app/controllers/share_settings.js2
-rw-r--r--js/app/controllers/vault.js7
-rw-r--r--js/app/directives/autoscroll.js2
-rw-r--r--js/app/directives/clickselect.js2
-rw-r--r--js/app/directives/colorfromstring.js4
-rw-r--r--js/app/directives/credentialfield.js2
-rw-r--r--js/app/directives/fileselect.js3
-rw-r--r--js/app/directives/otp.js4
-rw-r--r--js/app/directives/passwordgen.js4
-rw-r--r--js/app/directives/progressbar.js4
-rw-r--r--js/app/directives/qrreader.js7
-rw-r--r--js/app/directives/tooltip.js6
-rw-r--r--js/app/directives/use-theme.js4
-rw-r--r--js/app/services/credentialservice.js8
-rw-r--r--js/app/services/fileservice.js3
-rw-r--r--js/app/services/settingsservice.js2
-rw-r--r--js/app/services/shareservice.js2
-rw-r--r--js/app/services/tagservice.js3
-rw-r--r--js/importers/import-main.js2
-rw-r--r--js/importers/importer-clipperz.js2
-rw-r--r--js/importers/importer-dashlanecsv.js6
-rw-r--r--js/importers/importer-keepasscsv.js2
-rw-r--r--js/importers/importer-lastpasscsv.js2
-rw-r--r--js/importers/importer-passmanjson.js2
-rw-r--r--js/importers/importer-passpackcsv.js2
-rw-r--r--js/importers/importer-randomdata.js2
-rw-r--r--js/importers/importer-zohocsv.js2
34 files changed, 61 insertions, 69 deletions
diff --git a/js/app/controllers/bookmarklet.js b/js/app/controllers/bookmarklet.js
index 0c2f8f3b..825d041b 100644
--- a/js/app/controllers/bookmarklet.js
+++ b/js/app/controllers/bookmarklet.js
@@ -89,7 +89,6 @@
$scope.sharing_keys = {};
$scope.newVault = function () {
$scope.creating_vault = true;
- var _vault = {};
var key_size = 1024;
ShareService.generateRSAKeys(key_size).progress(function (progress) {
var p = progress > 0 ? 2 : 1;
@@ -121,7 +120,7 @@
VaultService.setActiveVault(_vault);
try {
- var c = EncryptService.decryptString(vault.challenge_password);
+ EncryptService.decryptString(vault.challenge_password);
if ($scope.remember_vault_password) {
SettingsService.setSetting('defaultVaultPass', vault_key);
}
@@ -149,10 +148,10 @@
test_credential.hidden = true;
test_credential.vault_id = vault.vault_id;
test_credential.password = 'lorum ipsum';
- CredentialService.createCredential(test_credential).then(function (result) {
+ CredentialService.createCredential(test_credential).then(function () {
_vault.public_sharing_key = angular.copy($scope.sharing_keys.public_sharing_key);
_vault.private_sharing_key = EncryptService.encryptString(angular.copy($scope.sharing_keys.private_sharing_key));
- VaultService.updateSharingKeys(_vault).then(function (result) {
+ VaultService.updateSharingKeys(_vault).then(function () {
_loginToVault(vault, vault_key);
});
});
@@ -351,7 +350,7 @@
if (!$scope.storedCredential.credential_id) {
$scope.storedCredential.vault_id = $scope.active_vault.vault_id;
- CredentialService.createCredential($scope.storedCredential).then(function (result) {
+ CredentialService.createCredential($scope.storedCredential).then(function () {
NotificationService.showNotification('Credential created!', 5000);
});
}
diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js
index 5457d17b..1e3629f7 100644
--- a/js/app/controllers/credential.js
+++ b/js/app/controllers/credential.js
@@ -138,7 +138,7 @@
crypted_shared_key = private_key.decrypt(forge.util.decode64(crypted_shared_key));
crypted_shared_key = EncryptService.encryptString(crypted_shared_key);
- ShareService.saveSharingRequest(share_request, crypted_shared_key).then(function (result) {
+ ShareService.saveSharingRequest(share_request, crypted_shared_key).then(function () {
var idx = $scope.incoming_share_requests.indexOf(share_request);
$scope.incoming_share_requests.splice(idx, 1);
var active_share_requests = false;
@@ -249,7 +249,7 @@
}
NotificationService.showNotification('Credential recovered', 5000,
function () {
- CredentialService.updateCredential(_credential).then(function (result) {
+ CredentialService.updateCredential(_credential).then(function () {
notification = false;
});
@@ -259,7 +259,7 @@
$scope.destroyCredential = function (credential) {
var _credential = angular.copy(credential);
- CredentialService.destroyCredential(_credential.credential_id).then(function (result) {
+ CredentialService.destroyCredential(_credential.credential_id).then(function () {
for (var i = 0; i < $scope.active_vault.credentials.length; i++) {
if ($scope.active_vault.credentials[i].credential_id === credential.credential_id) {
$scope.active_vault.credentials.splice(i, 1);
diff --git a/js/app/controllers/edit_credential.js b/js/app/controllers/edit_credential.js
index 18a60da4..e89b5536 100644
--- a/js/app/controllers/edit_credential.js
+++ b/js/app/controllers/edit_credential.js
@@ -231,7 +231,7 @@
if (!$scope.storedCredential.credential_id) {
$scope.storedCredential.vault_id = $scope.active_vault.vault_id;
- CredentialService.createCredential($scope.storedCredential).then(function (result) {
+ CredentialService.createCredential($scope.storedCredential).then(function () {
$location.path('/vault/' + $routeParams.vault_id);
NotificationService.showNotification('Credential created!', 5000);
});
@@ -259,7 +259,7 @@
var _useKey = (key != null);
var regex = /(<([^>]+)>)/ig;
_credential.description = _credential.description.replace(regex, "");
- CredentialService.updateCredential(_credential, _useKey).then(function (result) {
+ CredentialService.updateCredential(_credential, _useKey).then(function () {
SettingsService.setSetting('edit_credential', null);
$location.path('/vault/' + $routeParams.vault_id);
NotificationService.showNotification('Credential updated!', 5000);
diff --git a/js/app/controllers/import.js b/js/app/controllers/import.js
index 59edf5de..7a1a07e5 100644
--- a/js/app/controllers/import.js
+++ b/js/app/controllers/import.js
@@ -42,9 +42,9 @@
};
$scope.fileLoadError = function (file) {
- console.error('Error loading file');
+ console.error('Error loading file', file);
};
- $scope.fileSelectProgress = function (progress) {
+ $scope.fileSelectProgress = function () {
};
diff --git a/js/app/controllers/public_shared_credential.js b/js/app/controllers/public_shared_credential.js
index 20e18afd..68c95146 100644
--- a/js/app/controllers/public_shared_credential.js
+++ b/js/app/controllers/public_shared_credential.js
@@ -31,7 +31,6 @@
$scope.downloadFile = function (credential, file) {
ShareService.downloadSharedFile(credential, file).then(function (result) {
- var key = null;
if (!result.hasOwnProperty('file_data')) {
NotificationService.showNotification('Error downloading file, you probably don\'t have enough permissions', 5000);
return;
diff --git a/js/app/controllers/revision.js b/js/app/controllers/revision.js
index 78c601df..1d3ceafb 100644
--- a/js/app/controllers/revision.js
+++ b/js/app/controllers/revision.js
@@ -111,7 +111,7 @@
//Used in activity
_credential.revision_created = $filter('date')(_revision.created * 1000, "dd-MM-yyyy @ HH:mm:ss");
- CredentialService.updateCredential(_credential, (key)).then(function (result) {
+ CredentialService.updateCredential(_credential, (key)).then(function () {
SettingsService.setSetting('revision_credential', null);
$rootScope.$emit('app_menu', false);
$location.path('/vault/' + $routeParams.vault_id);
diff --git a/js/app/controllers/share.js b/js/app/controllers/share.js
index e4cb51a3..00454b16 100644
--- a/js/app/controllers/share.js
+++ b/js/app/controllers/share.js
@@ -10,8 +10,8 @@
* This file is part of passman, licensed under AGPLv3
*/
angular.module('passmanApp')
- .controller('ShareCtrl', ['$scope', 'VaultService', 'CredentialService', 'SettingsService', '$location', '$routeParams', 'ShareService', 'NotificationService', 'SharingACL', 'EncryptService', 'FileService',
- function ($scope, VaultService, CredentialService, SettingsService, $location, $routeParams, ShareService, NotificationService, SharingACL, EncryptService, FileService) {
+ .controller('ShareCtrl', ['$scope', 'VaultService', 'CredentialService', 'SettingsService', '$location', '$routeParams', 'ShareService', 'NotificationService', 'SharingACL', 'EncryptService',
+ function ($scope, VaultService, CredentialService, SettingsService, $location, $routeParams, ShareService, NotificationService, SharingACL, EncryptService) {
$scope.active_vault = VaultService.getActiveVault();
$scope.tabs = [{
@@ -144,7 +144,6 @@
});
$scope.inputSharedWith = [];
- $scope.selectedAccessLevel = '1';
$scope.searchUsers = function ($query) {
return ShareService.search($query);
@@ -157,7 +156,7 @@
$scope.setPermission = function (acl, permission) {
acl.togglePermission(permission);
};
- $scope.shareWith = function (shareWith, selectedAccessLevel) {
+ $scope.shareWith = function (shareWith) {
$scope.inputSharedWith = [];
if (shareWith.length > 0) {
for (var i = 0; i < shareWith.length; i++) {
@@ -203,7 +202,7 @@
_credential = CredentialService.encryptCredential(_credential, old_key);
CredentialService.updateCredential(_credential, true).then(function () {
NotificationService.showNotification('Credential unshared', 4000);
- CredentialService.reencryptCredential(_credential.guid, old_key, new_key).then(function (data) {
+ CredentialService.reencryptCredential(_credential.guid, old_key, new_key).then(function () {
getAcl();
});
});
@@ -292,7 +291,7 @@
var encryptedSharedCredential = angular.copy($scope.storedCredential);
var old_key = VaultService.getActiveVault().vaultKey;
- CredentialService.reencryptCredential(encryptedSharedCredential.guid, old_key, key).progress(function (data) {
+ CredentialService.reencryptCredential(encryptedSharedCredential.guid, old_key, key).progress(function () {
}).then(function (data) {
var _credential = data.cryptogram;
_credential.set_share_key = true;
@@ -336,7 +335,7 @@
user.accessLevel = angular.copy(user.acl.getAccessLevel());
ShareService.shareWithUser(storedCredential, user)
- .then(function (data) {
+ .then(function () {
$scope.share_settings.upload_progress.done++;
$scope.share_settings.upload_progress.percent = $scope.share_settings.upload_progress.done / $scope.share_settings.upload_progress.total * 100;
});
diff --git a/js/app/controllers/share_settings.js b/js/app/controllers/share_settings.js
index aa07ccec..71b7eada 100644
--- a/js/app/controllers/share_settings.js
+++ b/js/app/controllers/share_settings.js
@@ -54,7 +54,7 @@
$scope.active_vault.private_sharing_key = EncryptService.encryptString(pem.privateKey);
$scope.active_vault.public_sharing_key = pem.publicKey;
- VaultService.updateSharingKeys($scope.active_vault).then(function (result) {
+ VaultService.updateSharingKeys($scope.active_vault).then(function () {
$scope.sharing_keys = ShareService.getSharingKeys();
});
});
diff --git a/js/app/controllers/vault.js b/js/app/controllers/vault.js
index beb9f545..d179851c 100644
--- a/js/app/controllers/vault.js
+++ b/js/app/controllers/vault.js
@@ -71,7 +71,6 @@
$scope.sharing_keys = {};
$scope.newVault = function () {
$scope.creating_vault = true;
- var _vault = {};
var key_size = 1024;
ShareService.generateRSAKeys(key_size).progress(function (progress) {
var p = progress > 0 ? 2 : 1;
@@ -103,7 +102,7 @@
VaultService.setActiveVault(_vault);
try {
- var c = EncryptService.decryptString(vault.challenge_password);
+ EncryptService.decryptString(vault.challenge_password);
if ($scope.remember_vault_password) {
SettingsService.setSetting('defaultVaultPass', vault_key);
}
@@ -133,10 +132,10 @@
test_credential.hidden = true;
test_credential.vault_id = vault.vault_id;
test_credential.password = 'lorum ipsum';
- CredentialService.createCredential(test_credential).then(function (result) {
+ CredentialService.createCredential(test_credential).then(function () {
_vault.public_sharing_key = angular.copy($scope.sharing_keys.public_sharing_key);
_vault.private_sharing_key = EncryptService.encryptString(angular.copy($scope.sharing_keys.private_sharing_key));
- VaultService.updateSharingKeys(_vault).then(function (result) {
+ VaultService.updateSharingKeys(_vault).then(function () {
_loginToVault(vault, vault_key);
});
});
diff --git a/js/app/directives/autoscroll.js b/js/app/directives/autoscroll.js
index b30fd2ef..6f03b701 100644
--- a/js/app/directives/autoscroll.js
+++ b/js/app/directives/autoscroll.js
@@ -13,7 +13,7 @@
scope: {
autoScroll: '='
},
- link: function postLink (scope, element, attrs) {
+ link: function postLink (scope) {
scope.$watch('autoScroll', function () {
$('#import_log').scrollTop($('#import_log')[0].scrollHeight);
}, true);
diff --git a/js/app/directives/clickselect.js b/js/app/directives/clickselect.js
index 86220e00..dbd014e8 100644
--- a/js/app/directives/clickselect.js
+++ b/js/app/directives/clickselect.js
@@ -10,7 +10,7 @@
.directive('selectOnClick', ['$window', function ($window) {
return {
restrict: 'A',
- link: function (scope, element, attrs) {
+ link: function (scope, element) {
element.on('click', function () {
if (!$window.getSelection().toString()) {
// Required for mobile Safari
diff --git a/js/app/directives/colorfromstring.js b/js/app/directives/colorfromstring.js
index 62127749..ec9314f1 100644
--- a/js/app/directives/colorfromstring.js
+++ b/js/app/directives/colorfromstring.js
@@ -7,13 +7,13 @@
* # passwordGen
*/
angular.module('passmanApp')
- .directive('colorFromString', ['$window', function ($window) {
+ .directive('colorFromString', [function () {
return {
restrict: 'A',
scope:{
string: '=colorFromString'
},
- link: function (scope, el, attr, ctrl) {
+ link: function (scope, el) {
function genColor(str) { // java String#hashCode
var hash = 0;
for (var i = 0; i < str.length; i++) {
diff --git a/js/app/directives/credentialfield.js b/js/app/directives/credentialfield.js
index 0d040aa7..4725beae 100644
--- a/js/app/directives/credentialfield.js
+++ b/js/app/directives/credentialfield.js
@@ -27,7 +27,7 @@
'<div class="cell" ng-if="isLink"><a ng-href="{{value}}" target="_blank"><i tooltip="\'Open in new window\'" class="link fa fa-external-link"></i></a></div>' +
'<div class="cell" ngclipboard-success="onSuccess(e);" ngclipboard-error="onError(e);" ngclipboard data-clipboard-text="{{value}}"><i tooltip="copy_msg" class="fa fa-clipboard"></i></div>' +
'</div></span>',
- link: function (scope, elem, attrs, modelCtrl) {
+ link: function (scope) {
var expression = /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi;
var regex = new RegExp(expression);
diff --git a/js/app/directives/fileselect.js b/js/app/directives/fileselect.js
index 60b3e25a..8f258042 100644
--- a/js/app/directives/fileselect.js
+++ b/js/app/directives/fileselect.js
@@ -17,7 +17,7 @@
progress: '&progress'
},
- link: function (scope, el, attr, ctrl) {
+ link: function (scope, el) {
scope.success = scope.success();
scope.error = scope.error();
scope.progress = scope.progress();
@@ -44,7 +44,6 @@
el.bind('change', function (e) {
var _queueTotalFileSize = 0;
- var _queueProgressBytes = 0;
var i;
//Calcutate total size
for (i = 0; i < e.target.files.length; i++) {
diff --git a/js/app/directives/otp.js b/js/app/directives/otp.js
index b03610d0..2765c3b6 100644
--- a/js/app/directives/otp.js
+++ b/js/app/directives/otp.js
@@ -54,7 +54,7 @@
secret: '='
},
replace: true,
- link: function (scope, element) {
+ link: function (scope) {
scope.otp = null;
scope.timeleft = null;
scope.timer = null;
@@ -93,7 +93,7 @@
}, true);
scope.$on(
"$destroy",
- function (event) {
+ function () {
$timeout.cancel(scope.timer);
}
);
diff --git a/js/app/directives/passwordgen.js b/js/app/directives/passwordgen.js
index 42511aea..56367368 100644
--- a/js/app/directives/passwordgen.js
+++ b/js/app/directives/passwordgen.js
@@ -9,7 +9,7 @@
*/
angular.module('passmanApp')
- .directive('passwordGen', function ($timeout, $window) {
+ .directive('passwordGen', function ($timeout) {
/* jshint ignore:start */
function Arcfour () {
this.j = this.i = 0, this.S = []
@@ -136,7 +136,7 @@
"</button>" +
"</div>" +
"</div>",
- link: function (scope, elem, attrs, modelCtrl) {
+ link: function (scope) {
scope.callback = scope.callback();
scope.$watch("model", function () {
scope.password = scope.model;
diff --git a/js/app/directives/progressbar.js b/js/app/directives/progressbar.js
index 0b4d9e11..fd966763 100644
--- a/js/app/directives/progressbar.js
+++ b/js/app/directives/progressbar.js
@@ -7,7 +7,7 @@
* # passwordGen
*/
angular.module('passmanApp')
- .directive('progressBar', ['$window', function ($window) {
+ .directive('progressBar', [function () {
return {
restrict: 'A',
template: '' +
@@ -24,7 +24,7 @@
total: '=total'
},
- link: function (scope, el, attr, ctrl) {
+ link: function () {
}
};
diff --git a/js/app/directives/qrreader.js b/js/app/directives/qrreader.js
index 824e99a6..8e735880 100644
--- a/js/app/directives/qrreader.js
+++ b/js/app/directives/qrreader.js
@@ -7,12 +7,11 @@
* @description
* # passwordGen
*/
- angular.module('passmanApp').directive("qrread", ['$parse', '$compile',
- function ($parse, $compile) {
+ angular.module('passmanApp').directive("qrread", ['$parse',
+ function ($parse) {
return {
scope: true,
link: function (scope, element, attributes) {
- var gCtx = null, gCanvas = null, c = 0, stype = 0, gUM = false, webkit = false, moz = false;
var invoker = $parse(attributes.onRead);
scope.imageData = null;
@@ -29,7 +28,7 @@
element.bind("change", function (changeEvent) {
var reader = new FileReader(), file = changeEvent.target.files[0];
reader.readAsDataURL(file);
- reader.onload = (function (theFile) {
+ reader.onload = (function () {
return function (e) {
//gCtx.clearRect(0, 0, gCanvas.width, gCanvas.height);
scope.imageData = e.target.result;
diff --git a/js/app/directives/tooltip.js b/js/app/directives/tooltip.js
index 78c3257f..9aae59dd 100644
--- a/js/app/directives/tooltip.js
+++ b/js/app/directives/tooltip.js
@@ -7,15 +7,15 @@
* # passwordGen
*/
angular.module('passmanApp')
- .directive('tooltip', ['$window', function ($window) {
+ .directive('tooltip', [function () {
return {
restrict: 'A',
scope: {
tooltip: '=tooltip'
},
- link: function (scope, el, attr, ctrl) {
- scope.$watch('tooltip', function (newVal, old) {
+ link: function (scope, el) {
+ scope.$watch('tooltip', function () {
if (scope.tooltip) {
jQuery(el).attr('title', scope.tooltip);
jQuery(el).tooltip();
diff --git a/js/app/directives/use-theme.js b/js/app/directives/use-theme.js
index d981d158..62b0f0d0 100644
--- a/js/app/directives/use-theme.js
+++ b/js/app/directives/use-theme.js
@@ -7,7 +7,7 @@
* # passwordGen
*/
angular.module('passmanApp')
- .directive('useTheme', ['$window', function ($window) {
+ .directive('useTheme', [function () {
function invertColor (hexTripletColor) {
var color = hexTripletColor;
@@ -27,7 +27,7 @@
color: '=',
negative: '='
},
- link: function (scope, el, attr, ctrl) {
+ link: function (scope, el) {
var _color = jQuery('#header').css('background-color');
var _bg = _color;
if (scope.negative) {
diff --git a/js/app/services/credentialservice.js b/js/app/services/credentialservice.js
index 517b5162..28e09c90 100644
--- a/js/app/services/credentialservice.js
+++ b/js/app/services/credentialservice.js
@@ -181,7 +181,7 @@
// Save data
this.parent.new_credential_cryptogram.skip_revision = true;
- service.updateCredential(this.parent.new_credential_cryptogram, true).then((function (data) {
+ service.updateCredential(this.parent.new_credential_cryptogram, true).then((function () {
this.call_progress(new progress_datatype(2, 2, 'credential'));
this.call_then({
plain_text: this.parent.plain_credential,
@@ -208,7 +208,7 @@
this.call_progress(new progress_datatype(this.current, this.total, 'files'));
- FileService.updateFile(fileData, this.parent.new_password).then((function (data) {
+ FileService.updateFile(fileData, this.parent.new_password).then((function () {
this.current++;
this.call_progress(new progress_datatype(this.current, this.total, 'files'));
if (this.current === this.total) {
@@ -246,7 +246,7 @@
this.call_progress(new progress_datatype(this.current + this.upload, this.total, 'revisions'));
- service.updateRevision(_revision).then((function (data) {
+ service.updateRevision(_revision).then((function () {
this.upload++;
this.call_progress(new progress_datatype(this.upload + this.current, this.total, 'revisions'));
if (this.current + this.upload === this.total) {
@@ -298,7 +298,7 @@
master_promise.promises++;
(new C_Promise(promise_revisions_update, new password_data())).progress(function (data) {
master_promise.call_progress(data);
- }).then(function (data) {
+ }).then(function () {
console.warn("End revisions update");
master_promise.promises--;
if (master_promise.promises === 0) {
diff --git a/js/app/services/fileservice.js b/js/app/services/fileservice.js
index 655f5442..495869ef 100644
--- a/js/app/services/fileservice.js
+++ b/js/app/services/fileservice.js
@@ -77,9 +77,6 @@
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
byteString = atob(dataURI.split(',')[1]);
- // separate out the mime component
- mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
-
// write the bytes of the string to an ArrayBuffer
ab = new ArrayBuffer(byteString.length);
ia = new Uint8Array(ab);
diff --git a/js/app/services/settingsservice.js b/js/app/services/settingsservice.js
index b6095c9a..3424c3a7 100644
--- a/js/app/services/settingsservice.js
+++ b/js/app/services/settingsservice.js
@@ -15,7 +15,7 @@
defaultVault: null,
defaultVaultPass: null
};
- var neverSend = ['defaultVault', 'defaultVaultPass'];
+
var cookie = localStorageService.get('settings');
settings = angular.merge(settings, cookie);
diff --git a/js/app/services/shareservice.js b/js/app/services/shareservice.js
index 268ef34a..7a4fce37 100644
--- a/js/app/services/shareservice.js
+++ b/js/app/services/shareservice.js
@@ -178,7 +178,7 @@
return _credential;
},
- generateRSAKeys: function (key_length, progress, callback) {
+ generateRSAKeys: function (key_length) {
var p = new C_Promise(function () {
var state = forge.pki.rsa.createKeyPairGenerationState(key_length, 0x10001);
var step = function () {
diff --git a/js/app/services/tagservice.js b/js/app/services/tagservice.js
index 0d5a4850..9275d606 100644
--- a/js/app/services/tagservice.js
+++ b/js/app/services/tagservice.js
@@ -27,7 +27,8 @@
}
},
removeTag: function (tag) {
-
+ var idx = _tags.indexOf(tag);
+ _tags.splice(idx, 1);
}
};
}]);
diff --git a/js/importers/import-main.js b/js/importers/import-main.js
index 9d7625d4..5f5944bb 100644
--- a/js/importers/import-main.js
+++ b/js/importers/import-main.js
@@ -3,7 +3,7 @@ if(!window['PassmanImporter']){
var PassmanImporter = {}
}
-PassmanImporter.parseRow_ = function(row, isHeading) {
+PassmanImporter.parseRow_ = function(row) {
// Strip leading quote.
row = row.trim();
var isQuoted = false;
diff --git a/js/importers/importer-clipperz.js b/js/importers/importer-clipperz.js
index 1b7666e3..e9194bcc 100644
--- a/js/importers/importer-clipperz.js
+++ b/js/importers/importer-clipperz.js
@@ -11,7 +11,7 @@ PassmanImporter.clippers = {
}
};
-PassmanImporter.clippers.readFile = function (file_data, callback) {
+PassmanImporter.clippers.readFile = function (file_data) {
return new C_Promise(function() {
var credential_list = [];
var re = /<textarea>(.*?)<\/textarea>/gi;
diff --git a/js/importers/importer-dashlanecsv.js b/js/importers/importer-dashlanecsv.js
index 64611526..40652bac 100644
--- a/js/importers/importer-dashlanecsv.js
+++ b/js/importers/importer-dashlanecsv.js
@@ -11,12 +11,12 @@ PassmanImporter.dashLaneCsv = {
}
};
-PassmanImporter.dashLaneCsv.readFile = function (file_data, callback) {
+PassmanImporter.dashLaneCsv.readFile = function (file_data) {
return new C_Promise(function(){
var rows = file_data.split('\n');
var credential_list = [];
- for (var i = 1, row; row = rows[i]; i++) {
- row = rows[i];
+ for (var i = 0; i < rows.length; i++) {
+ var row = rows[i];
var row_data = row.split('","');
if (row_data[0].charAt(0) == '"') {
row_data[0] = row_data[0].substring(1);
diff --git a/js/importers/importer-keepasscsv.js b/js/importers/importer-keepasscsv.js
index 0ecd62cd..f328d306 100644
--- a/js/importers/importer-keepasscsv.js
+++ b/js/importers/importer-keepasscsv.js
@@ -11,7 +11,7 @@ PassmanImporter.keepassCsv = {
}
};
-PassmanImporter.keepassCsv.readFile = function (file_data, callback) {
+PassmanImporter.keepassCsv.readFile = function (file_data) {
var p = new C_Promise(function(){
var parsed_csv = PassmanImporter.readCsv(file_data);
var credential_list = [];
diff --git a/js/importers/importer-lastpasscsv.js b/js/importers/importer-lastpasscsv.js
index c13a5bd0..c370a3d2 100644
--- a/js/importers/importer-lastpasscsv.js
+++ b/js/importers/importer-lastpasscsv.js
@@ -11,7 +11,7 @@ PassmanImporter.lastpassCsv = {
}
};
-PassmanImporter.lastpassCsv.readFile = function (file_data, callback) {
+PassmanImporter.lastpassCsv.readFile = function (file_data) {
return new C_Promise(function(){
var parsed_csv = PassmanImporter.readCsv(file_data);
var credential_list = [];
diff --git a/js/importers/importer-passmanjson.js b/js/importers/importer-passmanjson.js
index b3a237a9..b4c5c6d9 100644
--- a/js/importers/importer-passmanjson.js
+++ b/js/importers/importer-passmanjson.js
@@ -11,7 +11,7 @@ PassmanImporter.passmanJson = {
}
};
-PassmanImporter.passmanJson.readFile = function (file_data, callback) {
+PassmanImporter.passmanJson.readFile = function (file_data) {
return new C_Promise(function(){
var parsed_json = PassmanImporter.readJson(file_data);
var credential_list = [];
diff --git a/js/importers/importer-passpackcsv.js b/js/importers/importer-passpackcsv.js
index 775ba967..cb26e95c 100644
--- a/js/importers/importer-passpackcsv.js
+++ b/js/importers/importer-passpackcsv.js
@@ -11,7 +11,7 @@ PassmanImporter.passpackCsv = {
}
};
-PassmanImporter.passpackCsv.readFile = function (file_data, callback) {
+PassmanImporter.passpackCsv.readFile = function (file_data) {
return new C_Promise(function(){
var parsed_csv = PassmanImporter.readCsv(file_data, false);
var credential_list = [];
diff --git a/js/importers/importer-randomdata.js b/js/importers/importer-randomdata.js
index 8aaeb4a9..b12a666a 100644
--- a/js/importers/importer-randomdata.js
+++ b/js/importers/importer-randomdata.js
@@ -11,7 +11,7 @@ PassmanImporter.randomData = {
}
};
-PassmanImporter.randomData.readFile = function (file_data, callback) {
+PassmanImporter.randomData.readFile = function () {
return new C_Promise(function () {
var tags =
['Social media',
diff --git a/js/importers/importer-zohocsv.js b/js/importers/importer-zohocsv.js
index bf3d5d75..d677572a 100644
--- a/js/importers/importer-zohocsv.js
+++ b/js/importers/importer-zohocsv.js
@@ -11,7 +11,7 @@ PassmanImporter.zohoCsv = {
}
};
-PassmanImporter.zohoCsv.readFile = function (file_data, callback) {
+PassmanImporter.zohoCsv.readFile = function (file_data) {
return new C_Promise(function(){
var parsed_csv = PassmanImporter.readCsv(file_data, false);
var credential_list = [];