change base64 third-party library

This commit is contained in:
MaysWind 2016-06-25 10:04:26 +08:00
parent 9a71545303
commit c26034f7ab
5 changed files with 12 additions and 12 deletions

View file

@ -42,7 +42,7 @@
"angular-translate-loader-static-files": "^2.11.0", "angular-translate-loader-static-files": "^2.11.0",
"angular-moment": "1.0.0-beta.6", "angular-moment": "1.0.0-beta.6",
"angular-websocket": "^1.1.0", "angular-websocket": "^1.1.0",
"angular-base64": "^2.0.5", "angular-utf8-base64": "^0.0.5",
"angular-local-storage": "^0.2.7", "angular-local-storage": "^0.2.7",
"angular-busy": "^4.1.3", "angular-busy": "^4.1.3",
"angular-promise-buttons": "^0.1.14", "angular-promise-buttons": "^0.1.14",

View file

@ -261,7 +261,7 @@
<script src="../bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js"></script> <script src="../bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js"></script>
<script src="../bower_components/angular-moment/angular-moment.min.js"></script> <script src="../bower_components/angular-moment/angular-moment.min.js"></script>
<script src="../bower_components/angular-websocket/angular-websocket.min.js"></script> <script src="../bower_components/angular-websocket/angular-websocket.min.js"></script>
<script src="../bower_components/angular-base64/angular-base64.min.js"></script> <script src="../bower_components/angular-utf8-base64/angular-utf8-base64.min.js"></script>
<script src="../bower_components/angular-local-storage/dist/angular-local-storage.min.js"></script> <script src="../bower_components/angular-local-storage/dist/angular-local-storage.min.js"></script>
<script src="../bower_components/angular-busy/dist/angular-busy.min.js"></script> <script src="../bower_components/angular-busy/dist/angular-busy.min.js"></script>
<script src="../bower_components/angular-promise-buttons/dist/angular-promise-buttons.min.js"></script> <script src="../bower_components/angular-promise-buttons/dist/angular-promise-buttons.min.js"></script>

View file

@ -11,7 +11,7 @@
'pascalprecht.translate', 'pascalprecht.translate',
'angularMoment', 'angularMoment',
'ngWebSocket', 'ngWebSocket',
'base64', 'ab-base64',
'LocalStorageModule', 'LocalStorageModule',
'cgBusy', 'cgBusy',
'angularPromiseButtons', 'angularPromiseButtons',

View file

@ -1,11 +1,11 @@
(function () { (function () {
'use strict'; 'use strict';
angular.module('ariaNg').factory('ariaNgCommonService', ['$location', '$timeout', '$base64', 'SweetAlert', '$translate', 'ariaNgConstants', function ($location, $timeout, $base64, SweetAlert, $translate, ariaNgConstants) { angular.module('ariaNg').factory('ariaNgCommonService', ['$location', '$timeout', 'base64', 'SweetAlert', '$translate', 'ariaNgConstants', function ($location, $timeout, base64, SweetAlert, $translate, ariaNgConstants) {
return { return {
generateUniqueId: function () { generateUniqueId: function () {
var sourceId = ariaNgConstants.appPrefix + '_' + Math.round(new Date().getTime() / 1000) + '_' + Math.random(); var sourceId = ariaNgConstants.appPrefix + '_' + Math.round(new Date().getTime() / 1000) + '_' + Math.random();
var hashedId = $base64.encode(sourceId); var hashedId = base64.encode(sourceId);
return hashedId; return hashedId;
}, },

View file

@ -1,7 +1,7 @@
(function () { (function () {
'use strict'; 'use strict';
angular.module('ariaNg').factory('ariaNgSettingService', ['$location', '$base64', '$translate', 'amMoment', 'localStorageService', 'ariaNgConstants', 'ariaNgDefaultOptions', 'ariaNgLanguages', function ($location, $base64, $translate, amMoment, localStorageService, ariaNgConstants, ariaNgDefaultOptions, ariaNgLanguages) { angular.module('ariaNg').factory('ariaNgSettingService', ['$location', '$translate', 'base64', 'amMoment', 'localStorageService', 'ariaNgConstants', 'ariaNgDefaultOptions', 'ariaNgLanguages', function ($location, $translate, base64, amMoment, localStorageService, ariaNgConstants, ariaNgDefaultOptions, ariaNgLanguages) {
var getDefaultRpcHost = function () { var getDefaultRpcHost = function () {
return $location.$$host; return $location.$$host;
}; };
@ -48,7 +48,7 @@
} }
if (options.secret) { if (options.secret) {
options.secret = $base64.decode(options.secret); options.secret = base64.decode(options.secret);
} }
return options; return options;
@ -96,11 +96,11 @@
}, },
getSecret: function () { getSecret: function () {
var value = getOption('secret'); var value = getOption('secret');
return (value ? $base64.decode(value) : value); return (value ? base64.decode(value) : value);
}, },
setSecret: function (value) { setSecret: function (value) {
if (value) { if (value) {
value = $base64.encode(value); value = base64.encode(value);
} }
setOption('secret', value); setOption('secret', value);