change base64 third-party library
This commit is contained in:
parent
9a71545303
commit
c26034f7ab
|
@ -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",
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
'pascalprecht.translate',
|
'pascalprecht.translate',
|
||||||
'angularMoment',
|
'angularMoment',
|
||||||
'ngWebSocket',
|
'ngWebSocket',
|
||||||
'base64',
|
'ab-base64',
|
||||||
'LocalStorageModule',
|
'LocalStorageModule',
|
||||||
'cgBusy',
|
'cgBusy',
|
||||||
'angularPromiseButtons',
|
'angularPromiseButtons',
|
||||||
|
|
|
@ -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;
|
||||||
},
|
},
|
||||||
|
@ -122,13 +122,13 @@
|
||||||
if (!angular.isArray(array) || array.length < 1) {
|
if (!angular.isArray(array) || array.length < 1) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
|
||||||
for (var i = 0; i < array.length; i++) {
|
for (var i = 0; i < array.length; i++) {
|
||||||
count += (array[i] == value ? 1 : 0);
|
count += (array[i] == value ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
},
|
},
|
||||||
parseOrderType: function (value) {
|
parseOrderType: function (value) {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Reference in a new issue