From 8279a0d477585a524c5407869af71fe5f83b3a86 Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Mon, 21 Oct 2013 23:42:16 +0530 Subject: [PATCH] Display bindings, history and variables in multiple lines on click --- share/tools/web_config/js/controllers.js | 10 ++++++++++ share/tools/web_config/partials/bindings.html | 2 +- share/tools/web_config/partials/history.html | 4 ++-- share/tools/web_config/partials/variables.html | 5 +++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/share/tools/web_config/js/controllers.js b/share/tools/web_config/js/controllers.js index a85d5677c..f415f0774 100644 --- a/share/tools/web_config/js/controllers.js +++ b/share/tools/web_config/js/controllers.js @@ -173,6 +173,7 @@ controllers.controller("historyController", function($scope, $http, $timeout) { $scope.historySize = 0; // Stores items which are yet to be added in history items $scope.remainingItems = []; + $scope.selectedItems = []; // Populate history items in parts $scope.loadHistory = function() { @@ -190,6 +191,15 @@ controllers.controller("historyController", function($scope, $http, $timeout) { $timeout($scope.loadHistory, 100); } + $scope.selectItem = function(item) { + var index = $scope.selectedItems.indexOf(item); + if ( index >= 0) { + $scope.selectedItems.splice(index,1); + } + else { + $scope.selectedItems.push(item); + } + } // Get history from server $scope.fetchHistory = function() { $http.get("/history/").success(function(data, status, headers, config) { diff --git a/share/tools/web_config/partials/bindings.html b/share/tools/web_config/partials/bindings.html index f80be0b34..3a78ca5f2 100644 --- a/share/tools/web_config/partials/bindings.html +++ b/share/tools/web_config/partials/bindings.html @@ -5,7 +5,7 @@ - + diff --git a/share/tools/web_config/partials/history.html b/share/tools/web_config/partials/history.html index 06efbf6e0..ef4b04f5a 100644 --- a/share/tools/web_config/partials/history.html +++ b/share/tools/web_config/partials/history.html @@ -1,11 +1,11 @@ -
+
{{ loadingText }}
{{ binding.command }}{{ binding.command }} {{ binding.binding }}
- + - + +
{{ item }}{{ item }} diff --git a/share/tools/web_config/partials/variables.html b/share/tools/web_config/partials/variables.html index 711249dbf..04b223881 100644 --- a/share/tools/web_config/partials/variables.html +++ b/share/tools/web_config/partials/variables.html @@ -1,4 +1,4 @@ -
+
@@ -6,7 +6,8 @@
{{ variable.name }}{{ variable.value }}{{ variable.value }}