fix base64 issue

This commit is contained in:
孔晨 2015-07-23 15:56:23 +08:00
parent 3cd8a0c214
commit 57dfd1f46a
3 changed files with 7 additions and 6 deletions

View File

@ -8,7 +8,7 @@
<link rel="stylesheet" href="static/bootstrap.min.css">
<link rel="stylesheet" href="static/base.css">
<link rel="shortcut icon" href="static/favicon.png">
<script src="javascripts/libs/base64.min.js"></script>
</head>
<body>
@ -744,15 +744,12 @@
<script>
// Enable query params, must be loaded before ember is
EmberENV = {FEATURES: {'query-params-new': true}};
if (Base64.extendString) {
// you have to explicitly extend String.prototype
Base64.extendString();
}
</script>
<!-- ASSETS -->
<script src="javascripts/libs/jquery-1.10.2.min.js"></script>
<script src="javascripts/libs/handlebars-1.3.0.min.js"></script>
<script src="javascripts/libs/base64.min.js"></script>
<script src="javascripts/libs/ember-debug.min.js"></script>
<script src="javascripts/libs/ember-validations.min.js"></script>
<script src="javascripts/libs/list-view.min.js"></script>

View File

@ -194,7 +194,10 @@ App.Key = Ember.Object.extend(Ember.Validations.Mixin, {
if (this.get('Value') === null) {
return "";
}
if (Base64.extendString) {
// you have to explicitly extend String.prototype
Base64.extendString();
}
// base64 decode the value
return (this.get('Value').fromBase64());
}.property('Value'),

View File

@ -6,6 +6,7 @@ libs = [
"javascripts/libs/jquery-1.10.2.min.js",
"javascripts/libs/handlebars-1.3.0.min.js",
"javascripts/libs/ember.min.js",
"javascripts/libs/base64.min.js",
"javascripts/libs/ember-validations.min.js",
"javascripts/libs/list-view.min.js",
"javascripts/libs/classie.js",