forked from gwfl/BBstats
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
83 lines (69 loc) · 2.04 KB
/
Copy pathapp.js
File metadata and controls
83 lines (69 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
var ionApp = angular.module('BBstatsH', ['ionic', 'ngResource']);
ionApp.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app.main', {
url: "/main",
views: {
'menuContent': {
templateUrl: "main.html",
controller: 'AppCtrl'
}
}
})
.state('app', {
url: "/app",
abstract: true,
templateUrl: "menu.html"
});
/*
})
.state('app.roster', {
url: "/roster",
views: {
'menuContent': {
templateUrl: "roster.html",
controller: 'AppCtrl'
}
}
*/
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/app/main');
});
ionApp.run( function ($rootScope, $http) {
$rootScope.accGroup = []; // grp00={ name: "__", isShown: false };
// for (hh = 0; hh < 20; hh++) {
// $rootScope.accGroup.push(JSON.parse(JSON.stringify(tS00)));
// };
$http.get('https://api.airtable.com/v0/app0hohtq4b1nM0Kb/LookItUp?api_key=key66fQg5IghIIQmb')
.success(function (jData) {
$rootScope.rawS = jData.records;
// $rootScope.rawS = JSON.parse(JSON.stringify(jData.records));
});
});
ionApp.controller('AppCtrl', function($rootScope, $scope, $http) {
//
/* AES-256 encrypt / decrypt
$(document).ready(function () {
// encrypt listener
$('#encryptBtn').click(function () {
var t = new Date();
var ciphertext = Aes.Ctr.encrypt($('#plaintext').val(), $('#password').val(), 256);
$('#encrypt-time').html(((new Date() - t)) + 'ms');
$('#cipher').val(ciphertext);
});
// decrypt listener
$('#decryptBtn').click(function () {
var t = new Date();
var plain = Aes.Ctr.decrypt($('#cipher').val(), $('#password').val(), 256);
$('#decrypt-time').html(((new Date() - t)) + 'ms');
$('#plaintext').val(plain);
});
$('#plaintextDiv .clear').click(function () {
$('#plaintext').val("");
});
$('#cipherDiv .clear').click(function () {
$('#cipher').val("");
});
});
*/ // end AES-256 e/d
});