Browse Source

debug tab | encrypt/decrypt json finished

release/v0.1
mirrt 9 years ago
committed by vineetbhargav86
parent
commit
7f58d37d54
  1. 6
      iguana/index.html
  2. 11
      iguana/js/debugJson.js

6
iguana/index.html

@ -397,8 +397,10 @@ data-path="{tc}/{config}">
Permanentfile
</label>
<div class="col-sm-7 col-md-7">
<input type="text" class="form-control" id='debug_permanentfile'>
<span class='material-input'></span>
<div>
<input type="file" id='debug_permanentfile'>
<input type="text" readonly class="form-control" >
</div>
</div>
</div>
<div class="form-group">

11
iguana/js/debugJson.js

@ -23,7 +23,7 @@ dJson._checkJson = function(json) {
return false;
};
return ogj;
return obj;
};
//{"agent":"SuperNET","method":"encryptjson","passphrase":"<passphrase>","permanentfile":"<filename>","fromform":"valuefromform", "fromform2":"valuefromform2",...rest of form at top level}
@ -32,7 +32,7 @@ dJson.encrypt = function(credentials, json, cb) {
var jsonObj;
if(jsonObj = this._checkJson) {
if(jsonObj = this._checkJson(json)) {
this.ENCRYPTED = true;
this.request.method = "encryptjson";
@ -54,7 +54,7 @@ dJson.encrypt = function(credentials, json, cb) {
cb(null);
};
//{"agent":"SuperNET","method":"encryptjson","passphrase":"<passphrase>","permanentfile":"<filename>"}
//{"agent":"SuperNET","method":"decryptjson","passphrase":"<passphrase>","permanentfile":"<filename>"}
dJson.decrypt = function(credentials, cb) {
this._init(credentials);
@ -78,7 +78,6 @@ $(document).ready(function() {
permFile = $('#debug_permanentfile'),
jsonSrc = $('#debug_json_src');
$(encryptBtn).click(function(e) {
e.preventDefault();
debugJsonResult.text('');
@ -90,8 +89,8 @@ $(document).ready(function() {
jsonSrc.val(),
function(response) {
debugJsonResult.text(response || 'wrong json');
}
);
});
});
$(decryptBtn).click(function(e) {

Loading…
Cancel
Save