You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/05/17 19:49:49 UTC

[1/7] guacamole-client git commit: GUACAMOLE-152: Remove unneeded formattedScale method.

Repository: guacamole-client
Updated Branches:
  refs/heads/master fed513329 -> 1710c31fc


GUACAMOLE-152: Remove unneeded formattedScale method.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/64589f27
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/64589f27
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/64589f27

Branch: refs/heads/master
Commit: 64589f27f468447fb26c7d748b57cbf6657e081f
Parents: 242e0b7
Author: Nick Couchman <vn...@apache.org>
Authored: Fri May 4 03:56:39 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Fri May 4 17:44:15 2018 -0400

----------------------------------------------------------------------
 .../src/main/webapp/app/client/controllers/clientController.js   | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/64589f27/guacamole/src/main/webapp/app/client/controllers/clientController.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js
index cf4ba5b..4fce87b 100644
--- a/guacamole/src/main/webapp/app/client/controllers/clientController.js
+++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js
@@ -731,10 +731,6 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
 
     });
 
-    $scope.formattedScale = function formattedScale() {
-        return Math.round($scope.client.clientProperties.scale * 100);
-    };
-    
     $scope.zoomIn = function zoomIn() {
         $scope.menu.autoFit = false;
         $scope.client.clientProperties.autoFit = false;


[3/7] guacamole-client git commit: GUACAMOLE-152: Update zoom level on blur and submit, remove debounce.

Posted by mj...@apache.org.
GUACAMOLE-152: Update zoom level on blur and submit, remove debounce.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/10b0afe0
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/10b0afe0
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/10b0afe0

Branch: refs/heads/master
Commit: 10b0afe0cb4a7a3e47b270cf7dd7f7236a5364ac
Parents: 64589f2
Author: Nick Couchman <vn...@apache.org>
Authored: Fri May 4 18:05:10 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Fri May 4 18:05:10 2018 -0400

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/client/templates/client.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/10b0afe0/guacamole/src/main/webapp/app/client/templates/client.html
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html
index d152d80..f79163b 100644
--- a/guacamole/src/main/webapp/app/client/templates/client.html
+++ b/guacamole/src/main/webapp/app/client/templates/client.html
@@ -151,7 +151,9 @@
                     <div class="content">
                         <div id="zoom-settings">
                             <div ng-click="zoomOut()" id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
-                            <input type="number" class="zoom-ctrl" guac-zoom-ctrl ng-model="client.clientProperties.scale" ng-model-options="{ debounce: 500 }" />%
+                            <input type="number" class="zoom-ctrl" guac-zoom-ctrl
+                                    ng-model="client.clientProperties.scale"
+                                    ng-model-options="{ updateOn: 'blur submit' }" />%
                             <div ng-click="zoomIn()" id="zoom-in"><img src="images/settings/zoom-in.png" alt="+"/></div>
                         </div>
                         <div><label><input ng-model="menu.autoFit" ng-change="changeAutoFit()" ng-disabled="autoFitDisabled()" type="checkbox" id="auto-fit"/> {{'CLIENT.TEXT_ZOOM_AUTO_FIT' | translate}}</label></div>


[2/7] guacamole-client git commit: GUACAMOLE-152: Allow zoom/scale to be manually entered.

Posted by mj...@apache.org.
GUACAMOLE-152: Allow zoom/scale to be manually entered.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/242e0b7c
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/242e0b7c
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/242e0b7c

Branch: refs/heads/master
Commit: 242e0b7cf0e1e762cfed3c9b117c3528a27436c0
Parents: 9b99b18
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Apr 30 13:35:08 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Fri May 4 17:44:15 2018 -0400

----------------------------------------------------------------------
 .../app/client/directives/guacZoomCtrl.js       | 42 ++++++++++++++++++++
 .../src/main/webapp/app/client/styles/menu.css  | 10 +++++
 .../webapp/app/client/templates/client.html     |  2 +-
 3 files changed, 53 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/242e0b7c/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js b/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js
new file mode 100644
index 0000000..5971439
--- /dev/null
+++ b/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * A directive which converts between human-readable zoom
+ * percentage and display scale.
+ */
+angular.module('client').directive('guacZoomCtrl', function guacZoomCtrl() {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        priority: 101,
+        link: function(scope, element, attr, ngModel) {
+
+            // When pushing to the menu, mutiply by 100.
+            ngModel.$formatters.push(function(value) {
+                return Math.round(value * 100);
+            });
+           
+            // When parsing value from menu, divide by 100.
+            ngModel.$parsers.push(function(value) {
+                return Math.round(value) / 100;
+            });
+        }
+    }
+});

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/242e0b7c/guacamole/src/main/webapp/app/client/styles/menu.css
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/styles/menu.css b/guacamole/src/main/webapp/app/client/styles/menu.css
index a7980bf..3fb6f57 100644
--- a/guacamole/src/main/webapp/app/client/styles/menu.css
+++ b/guacamole/src/main/webapp/app/client/styles/menu.css
@@ -134,6 +134,16 @@
     padding-top: 1em;
 }
 
+.menu-section .zoom-ctrl {
+    width: 4em;
+}
+
+.menu-section .zoom-ctrl::-webkit-inner-spin-button,
+.menu-section .zoom-ctrl::-webkit-outer-spin-button {
+    -webkit-appearance: none;
+    margin: 0;
+}
+
 .menu,
 .menu.closed {
     left: -480px;

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/242e0b7c/guacamole/src/main/webapp/app/client/templates/client.html
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html
index 8468218..d152d80 100644
--- a/guacamole/src/main/webapp/app/client/templates/client.html
+++ b/guacamole/src/main/webapp/app/client/templates/client.html
@@ -151,7 +151,7 @@
                     <div class="content">
                         <div id="zoom-settings">
                             <div ng-click="zoomOut()" id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
-                            <div id="zoom-state">{{formattedScale()}}%</div>
+                            <input type="number" class="zoom-ctrl" guac-zoom-ctrl ng-model="client.clientProperties.scale" ng-model-options="{ debounce: 500 }" />%
                             <div ng-click="zoomIn()" id="zoom-in"><img src="images/settings/zoom-in.png" alt="+"/></div>
                         </div>
                         <div><label><input ng-model="menu.autoFit" ng-change="changeAutoFit()" ng-disabled="autoFitDisabled()" type="checkbox" id="auto-fit"/> {{'CLIENT.TEXT_ZOOM_AUTO_FIT' | translate}}</label></div>


[7/7] guacamole-client git commit: GUACAMOLE-152: Merge changes adding support for explicitly specifying the zoom level.

Posted by mj...@apache.org.
GUACAMOLE-152: Merge changes adding support for explicitly specifying the zoom level.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/1710c31f
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/1710c31f
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/1710c31f

Branch: refs/heads/master
Commit: 1710c31fc2c0c8f56326e4175d13b21640d477ba
Parents: fed5133 a020082
Author: Michael Jumper <mj...@apache.org>
Authored: Thu May 17 12:49:01 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Thu May 17 12:49:01 2018 -0700

----------------------------------------------------------------------
 .../app/client/controllers/clientController.js  | 14 ++++--
 .../app/client/directives/guacZoomCtrl.js       | 48 ++++++++++++++++++++
 .../src/main/webapp/app/client/styles/menu.css  | 21 +++++++++
 .../webapp/app/client/templates/client.html     |  7 ++-
 4 files changed, 85 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[6/7] guacamole-client git commit: GUACAMOLE-152: Remove superfluous semicolon.

Posted by mj...@apache.org.
GUACAMOLE-152: Remove superfluous semicolon.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/a0200824
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/a0200824
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/a0200824

Branch: refs/heads/master
Commit: a0200824afb66154d2635e82d6e05b3715064f4b
Parents: b34d97f
Author: Nick Couchman <vn...@apache.org>
Authored: Wed May 16 10:43:07 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Wed May 16 10:43:07 2018 -0400

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/client/templates/client.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/a0200824/guacamole/src/main/webapp/app/client/templates/client.html
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html
index 6fda594..054cbcf 100644
--- a/guacamole/src/main/webapp/app/client/templates/client.html
+++ b/guacamole/src/main/webapp/app/client/templates/client.html
@@ -155,7 +155,7 @@
                                 <input type="number" class="zoom-ctrl" guac-zoom-ctrl
                                         ng-model="client.clientProperties.scale"
                                         ng-model-options="{ updateOn: 'blur submit' }"
-                                        ng-change="zoomSet();" />%
+                                        ng-change="zoomSet()" />%
                             </div>
                             <div ng-click="zoomIn()" id="zoom-in"><img src="images/settings/zoom-in.png" alt="+"/></div>
                         </div>


[5/7] guacamole-client git commit: GUACAMOLE-152: Handle zoom changes with autoFit correctly.

Posted by mj...@apache.org.
GUACAMOLE-152: Handle zoom changes with autoFit correctly.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/b34d97f8
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/b34d97f8
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/b34d97f8

Branch: refs/heads/master
Commit: b34d97f82dc5a9b28a89e2072b3ec477fda17464
Parents: b4c8bc8
Author: Nick Couchman <vn...@apache.org>
Authored: Sat May 12 08:13:15 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Sat May 12 08:13:15 2018 -0400

----------------------------------------------------------------------
 .../webapp/app/client/controllers/clientController.js     | 10 ++++++++++
 .../src/main/webapp/app/client/directives/guacZoomCtrl.js |  8 +++++++-
 .../src/main/webapp/app/client/templates/client.html      |  3 ++-
 3 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b34d97f8/guacamole/src/main/webapp/app/client/controllers/clientController.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js
index 4fce87b..af1d726 100644
--- a/guacamole/src/main/webapp/app/client/controllers/clientController.js
+++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js
@@ -741,6 +741,16 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
         $scope.client.clientProperties.autoFit = false;
         $scope.client.clientProperties.scale -= 0.1;
     };
+
+    /**
+     * When zoom is manually set by entering a value
+     * into the controller, this method turns off autoFit,
+     * both in the menu and the clientProperties.
+     */
+    $scope.zoomSet = function zoomSet() {
+        $scope.menu.autoFit = false;
+        $scope.client.clientProperties.autoFit = false;
+    };
     
     $scope.changeAutoFit = function changeAutoFit() {
         if ($scope.menu.autoFit && $scope.client.clientProperties.minScale) {

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b34d97f8/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js b/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js
index 5971439..3e5b468 100644
--- a/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js
+++ b/guacamole/src/main/webapp/app/client/directives/guacZoomCtrl.js
@@ -26,7 +26,13 @@ angular.module('client').directive('guacZoomCtrl', function guacZoomCtrl() {
         restrict: 'A',
         require: 'ngModel',
         priority: 101,
-        link: function(scope, element, attr, ngModel) {
+        link: function(scope, element, attrs, ngModel) {
+
+            // Evaluate the ngChange attribute when the model
+            // changes.
+            ngModel.$viewChangeListeners.push(function() {
+                scope.$eval(attrs.ngChange);
+            });
 
             // When pushing to the menu, mutiply by 100.
             ngModel.$formatters.push(function(value) {

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b34d97f8/guacamole/src/main/webapp/app/client/templates/client.html
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html
index 5abea64..6fda594 100644
--- a/guacamole/src/main/webapp/app/client/templates/client.html
+++ b/guacamole/src/main/webapp/app/client/templates/client.html
@@ -154,7 +154,8 @@
                             <div class="zoom-ctrl">
                                 <input type="number" class="zoom-ctrl" guac-zoom-ctrl
                                         ng-model="client.clientProperties.scale"
-                                        ng-model-options="{ updateOn: 'blur submit' }" />%
+                                        ng-model-options="{ updateOn: 'blur submit' }"
+                                        ng-change="zoomSet();" />%
                             </div>
                             <div ng-click="zoomIn()" id="zoom-in"><img src="images/settings/zoom-in.png" alt="+"/></div>
                         </div>


[4/7] guacamole-client git commit: GUACAMOLE-152: Fix up new zoom control style.

Posted by mj...@apache.org.
GUACAMOLE-152: Fix up new zoom control style.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/b4c8bc80
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/b4c8bc80
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/b4c8bc80

Branch: refs/heads/master
Commit: b4c8bc8058b9b367c3769a34ccfffdd5aa5458ea
Parents: 10b0afe
Author: Nick Couchman <vn...@apache.org>
Authored: Fri May 11 06:29:05 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Fri May 11 06:29:05 2018 -0400

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/client/styles/menu.css | 15 +++++++++++++--
 .../src/main/webapp/app/client/templates/client.html |  8 +++++---
 2 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b4c8bc80/guacamole/src/main/webapp/app/client/styles/menu.css
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/styles/menu.css b/guacamole/src/main/webapp/app/client/styles/menu.css
index 3fb6f57..4021d3c 100644
--- a/guacamole/src/main/webapp/app/client/styles/menu.css
+++ b/guacamole/src/main/webapp/app/client/styles/menu.css
@@ -134,8 +134,19 @@
     padding-top: 1em;
 }
 
-.menu-section .zoom-ctrl {
-    width: 4em;
+.menu-section input.zoom-ctrl {
+    width: 2em;
+    font-size: 1em;
+    padding: 0;
+    background: transparent;
+    border-color: rgba(0, 0, 0, 0.125);
+}
+
+.menu-section div.zoom-ctrl {
+    font-size: 1.5em;
+    display: inline;
+    align-content: center;
+    vertical-align: middle;
 }
 
 .menu-section .zoom-ctrl::-webkit-inner-spin-button,

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b4c8bc80/guacamole/src/main/webapp/app/client/templates/client.html
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html
index f79163b..5abea64 100644
--- a/guacamole/src/main/webapp/app/client/templates/client.html
+++ b/guacamole/src/main/webapp/app/client/templates/client.html
@@ -151,9 +151,11 @@
                     <div class="content">
                         <div id="zoom-settings">
                             <div ng-click="zoomOut()" id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
-                            <input type="number" class="zoom-ctrl" guac-zoom-ctrl
-                                    ng-model="client.clientProperties.scale"
-                                    ng-model-options="{ updateOn: 'blur submit' }" />%
+                            <div class="zoom-ctrl">
+                                <input type="number" class="zoom-ctrl" guac-zoom-ctrl
+                                        ng-model="client.clientProperties.scale"
+                                        ng-model-options="{ updateOn: 'blur submit' }" />%
+                            </div>
                             <div ng-click="zoomIn()" id="zoom-in"><img src="images/settings/zoom-in.png" alt="+"/></div>
                         </div>
                         <div><label><input ng-model="menu.autoFit" ng-change="changeAutoFit()" ng-disabled="autoFitDisabled()" type="checkbox" id="auto-fit"/> {{'CLIENT.TEXT_ZOOM_AUTO_FIT' | translate}}</label></div>