brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [4/7] incubator-brooklyn git commit: JSGUI IE8 fixes
Date Wed, 07 Jan 2015 14:50:48 GMT
JSGUI IE8 fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/ba033491
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/ba033491
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/ba033491

Branch: refs/heads/master
Commit: ba0334913cf6cd7bfff9db0018f6bfb3d8c5e3ad
Parents: 1afc46c
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Tue Jan 6 19:17:32 2015 +0200
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Wed Jan 7 14:17:45 2015 +0200

----------------------------------------------------------------------
 usage/jsgui/src/main/webapp/assets/css/base.css     |   5 +++--
 .../assets/img/magnifying-glass-right-icon.png      | Bin 0 -> 958 bytes
 .../src/main/webapp/assets/js/model/task-summary.js |   2 +-
 .../webapp/assets/js/view/application-add-wizard.js |  15 ++++++++++-----
 .../jsgui/src/main/webapp/assets/js/view/catalog.js |   7 ++++++-
 5 files changed, 20 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ba033491/usage/jsgui/src/main/webapp/assets/css/base.css
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/css/base.css b/usage/jsgui/src/main/webapp/assets/css/base.css
index cb988b6..8674b47 100644
--- a/usage/jsgui/src/main/webapp/assets/css/base.css
+++ b/usage/jsgui/src/main/webapp/assets/css/base.css
@@ -196,7 +196,7 @@ li.text-filter input {
     width: 10em;
     margin-top: 3px;
     /* taken from datatables_filter input */    
-    background-image: url("../img/magnifying-glass-right.png");
+    background-image: url("../img/magnifying-glass-right-icon.png");
     background-size:12px 12px;
     background-repeat: no-repeat;
     background-position: 8px 5px;
@@ -360,6 +360,7 @@ input[type="color"]:focus,.uneditable-input:focus {
     padding: 10px 0px 0px 74px !important;
     width: 298px !important;
     height: 201px !important;
+    margin-right: 0;
 }
 
 .addApplication:hover {
@@ -904,7 +905,7 @@ padding: 2px 5px;
 margin: 0;
 }
 .dataTables_filter input {
-    background-image: url("../img/magnifying-glass-right.png");
+    background-image: url("../img/magnifying-glass-right-icon.png");
     /* url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ5JREFUeNpi+P//PwMQMANxERCfAeI/UBrEZwbJQ9WAFR0A4u1AbAnEbFB6O1ScGaawGoi3wHQiYyBYDZKHKbwHxLo4FOqC5GEKf4Ksw6EQ5IyfIDYTkPEUiNUZsAOQ+F9GRkYJEKcFiDficSOIcRjE4QTiY0C8DuRbqAJLKP8/FP9kQArHUiA+jySJjA8w4LAS5KZd0MAHhaccQIABALsMiBZy4YLtAAAAAElFTkSuQmCC);
*/
     background-size:12px 12px;
     background-repeat: no-repeat;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ba033491/usage/jsgui/src/main/webapp/assets/img/magnifying-glass-right-icon.png
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/img/magnifying-glass-right-icon.png b/usage/jsgui/src/main/webapp/assets/img/magnifying-glass-right-icon.png
new file mode 100644
index 0000000..16d4819
Binary files /dev/null and b/usage/jsgui/src/main/webapp/assets/img/magnifying-glass-right-icon.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ba033491/usage/jsgui/src/main/webapp/assets/js/model/task-summary.js
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/js/model/task-summary.js b/usage/jsgui/src/main/webapp/assets/js/model/task-summary.js
index afc3549..6a54e4b 100644
--- a/usage/jsgui/src/main/webapp/assets/js/model/task-summary.js
+++ b/usage/jsgui/src/main/webapp/assets/js/model/task-summary.js
@@ -63,7 +63,7 @@ define([
         // added from https://github.com/jashkenas/backbone/issues/1069#issuecomment-17511573
         // to clear attributes locally if they aren't in the server-side function
         parse: function(resp) {
-            _.keys(this.attributes).forEach(function(key) {
+            _.forEach(_.keys(this.attributes), function(key) {
               if (resp[key] === undefined) {
                 resp[key] = null;
               }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ba033491/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js b/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js
index d0bf8ec..45eb5fb 100644
--- a/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js
+++ b/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js
@@ -283,8 +283,12 @@ define([
             'click #remove-config':'removeConfigRow',
             'click #add-config':'addConfigRow',
             'click .template-lozenge':'templateClick',
-            'input .text-filter input':'applyFilter',
-            'input #yaml_code':'onYamlCodeChange',
+            'keyup .text-filter input':'applyFilter',
+            'change .text-filter input':'applyFilter',
+            'paste .text-filter input':'applyFilter',
+            'keyup #yaml_code':'onYamlCodeChange',
+            'change #yaml_code':'onYamlCodeChange',
+            'paste #yaml_code':'onYamlCodeChange',
             'shown a[data-toggle="tab"]':'onTabChange'
         },
         template:_.template(CreateHtml),
@@ -329,15 +333,16 @@ define([
             return this
         },
         onTabChange: function(e) {
-            if (e.target.text=="Catalog") {
+            var tabText = $(e.target).text();
+            if (tabText=="Catalog") {
                 $("li.text-filter").show()
             } else {
                 $("li.text-filter").hide()
             }
 
-            if (e.target.text=="YAML") {
+            if (tabText=="YAML") {
                 this.model.mode = "yaml";
-            } else if (e.target.text=="Template") {
+            } else if (tabText=="Template") {
                 this.model.mode = "template";
             } else {
                 this.model.mode = "other";

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ba033491/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/js/view/catalog.js b/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
index 7f849af..576b280 100644
--- a/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
+++ b/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
@@ -254,7 +254,12 @@ define([
             if (!this.name) {
                 throw new Error("Catalog collection must know its name");
             }
+            //this.model is a constructor so it shouldn't be _.bind'ed to this
+            //It actually works when a browser provided .bind is used, but the
+            //fallback implementation doesn't support it.
+            var model = this.model;
             _.bindAll(this);
+            this.model = model;
         },
         url: function() {
             return "/v1/catalog/" + this.name;
@@ -384,7 +389,7 @@ define([
                 return items[0];
             }
 
-            var catalogTree = orderedIds.map(function(symbolicName) {
+            var catalogTree = _.map(orderedIds, function(symbolicName) {
                 var group = groups[symbolicName];
                 var root = getLatestStableVersion(group);
                 var children = _.reject(group, function(model) {return root.id == model.id;});


Mime
View raw message