From 57dfd1f46af2a80e64827f4943f8670f5f1dd964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=94=E6=99=A8?= Date: Thu, 23 Jul 2015 15:56:23 +0800 Subject: [PATCH] fix base64 issue --- ui/index.html | 7 ++----- ui/javascripts/app/models.js | 5 ++++- ui/scripts/compile.rb | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/index.html b/ui/index.html index 19571cec4..27a8ad3e6 100644 --- a/ui/index.html +++ b/ui/index.html @@ -8,7 +8,7 @@ - + @@ -744,15 +744,12 @@ + diff --git a/ui/javascripts/app/models.js b/ui/javascripts/app/models.js index 400e01881..46fdeb1f9 100644 --- a/ui/javascripts/app/models.js +++ b/ui/javascripts/app/models.js @@ -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'), diff --git a/ui/scripts/compile.rb b/ui/scripts/compile.rb index c59feeedc..36339837d 100644 --- a/ui/scripts/compile.rb +++ b/ui/scripts/compile.rb @@ -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",