mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-13 16:37:34 +00:00
Updated functions tab
This commit is contained in:
parent
5f6ec391e3
commit
f1a13c4ee5
3 changed files with 32 additions and 10 deletions
|
@ -133,7 +133,7 @@ function interpret_color(str) {
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="ancestor">
|
<div id="ancestor">
|
||||||
<span style="font-size: 30pt">fish</span><p id="global_error" class="error_msg"></p>
|
<span style="font-size: 16pt; color: #8888FF">fish</span><p id="global_error" class="error_msg"></p>
|
||||||
<div id="parent">
|
<div id="parent">
|
||||||
<div id="tab_parent" ng-controller="main">
|
<div id="tab_parent" ng-controller="main">
|
||||||
<div ng-class="tabCssClass('colors')" id="tab_colors" ng-click="changeView('colors')">colors</div>
|
<div ng-class="tabCssClass('colors')" id="tab_colors" ng-click="changeView('colors')">colors</div>
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
<div id="tab_contents">
|
<div class="master_detail_table">
|
||||||
<div id="master_detail_table" style="display: table;">
|
<div class="master">
|
||||||
<div id="master">
|
|
||||||
<div ng-repeat="func in functions">
|
<div ng-repeat="func in functions">
|
||||||
<div id="master_{{func}}" ng-class="{'master_element': true, 'selected_master_elem': func == selectedFunction }" ng-style="'color: #aaaaaa'" ng-click="selectFunction(func)">
|
<div id="master_{{func}}" ng-class="{'master_element': true, 'selected_master_elem': func == selectedFunction }" ng-style="'color: #aaaaaa'" ng-click="selectFunction(func)">
|
||||||
<span class="master_element_text" style="font-size: 11pt;">{{ func }}</span>
|
<span class="master_element_text" style="font-size: 11pt;">{{ func }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="detail">
|
<div class="detail">
|
||||||
<div id="detail_function">
|
<div class="detail_function">
|
||||||
<div id="detail_function" style="display: block;">
|
<div class="detail_function">
|
||||||
{{ functionDefinition }}
|
{{ functionDefinition }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
|
@ -577,10 +577,34 @@ webconfig.controller("variablesController", function($scope, $http) {
|
||||||
$scope.fetchVariables();
|
$scope.fetchVariables();
|
||||||
});
|
});
|
||||||
|
|
||||||
webconfig.controller("historyController", function($scope, $http) {
|
webconfig.controller("historyController", function($scope, $http, $timeout) {
|
||||||
|
$scope.historyItems = [];
|
||||||
|
$scope.historySize = 0;
|
||||||
|
// Stores items which are yet to be added in history items
|
||||||
|
$scope.remainingItems = [];
|
||||||
|
|
||||||
|
// Populate history items in parts
|
||||||
|
$scope.loadHistory = function() {
|
||||||
|
if ($scope.remainingItems.length <= 0) {
|
||||||
|
$scope.loadingText = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var to_load = $scope.remainingItems.splice(0, 100);
|
||||||
|
for (i in to_load) {
|
||||||
|
$scope.historyItems.push(to_load[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.loadingText = "Loading " + $scope.historyItems.length + "/" + $scope.historySize;
|
||||||
|
$timeout($scope.loadHistory, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get history from server
|
||||||
$scope.fetchHistory = function() {
|
$scope.fetchHistory = function() {
|
||||||
$http.get("/history/").success(function(data, status, headers, config) {
|
$http.get("/history/").success(function(data, status, headers, config) {
|
||||||
$scope.historyItems = data;
|
$scope.historySize = data.length;
|
||||||
|
$scope.remainingItems = data;
|
||||||
|
$timeout($scope.loadHistory, 100);
|
||||||
})};
|
})};
|
||||||
|
|
||||||
$scope.deleteHistoryItem = function(item) {
|
$scope.deleteHistoryItem = function(item) {
|
||||||
|
|
Loading…
Reference in a new issue