~minos-archive/minos/firefox-minos-settings

« back to all changes in this revision

Viewing changes to firefox27/firefox/h5xyzl6e.default/extensions/lazarus@interclue.com/chrome/content/generate-keys.js

  • Committer: Javier Lopez
  • Date: 2015-07-08 01:10:19 UTC
  • Revision ID: git-v1:d8c3500bae00a8a67d74f8f96235ec11d75231be
rename mozilla-minos-settings -> firefox-minos-settings

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
Lazarus.db = Lazarus.getBrowser().Lazarus.db;
 
4
Lazarus.Crypto = Lazarus.getBrowser().Lazarus.Crypto;
 
5
 
 
6
/**
 
7
 
8
*/
 
9
function onAccept(){
 
10
    
 
11
    //and dont let them cancel it 
 
12
    //document.getElementById('').disabled = true;    
 
13
    if (Lazarus.getBrowser().Lazarus.enterMasterPassword()){  
 
14
        //okey dokey, lets do it.
 
15
        //better tell the user that this might take a while
 
16
        document.getElementById('generate-keys-progress').style.visibility = "visible";
 
17
        document.getElementById('generate-keys-text').style.visibility = "visible";
 
18
        
 
19
                                if (Lazarus.getBrowser().Lazarus.generateEncryptionKeys()){
 
20
                                        alert(strings['keys-generated']);
 
21
                                }
 
22
                                else {
 
23
                                        alert(strings['key-generation-error']);
 
24
                                }
 
25
                                //and close the dialog
 
26
                                return true;
 
27
    }
 
28
    else {
 
29
        alert(strings['password-not-entered']);
 
30
        return false;
 
31
    }
 
32
}
 
33
 
 
34
 
 
35
/**
 
36
 
37
*/
 
38
function onCancel(){
 
39
    alert(strings['key-generation-cancelled']);
 
40
}