Skip to content

Commit 8b6898f

Browse files
Merged sources and filters to make more room for the save data button.
Now sources and filters are shown in the same panel and are distinct because they have different icons to their left. This commit also adds the ability to select whether the server-side process should be shut down when users leaves the page. Change-Id: I3c9cf151a054ba37a08ab2e1e9c6922f85b53e90
1 parent 71439c9 commit 8b6898f

File tree

3 files changed

+43
-10
lines changed

3 files changed

+43
-10
lines changed

Web/Applications/Visualizer/www/index.html

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
class='vtk-icon-doc-text clickable padding inspector-selector' data-type='files' data-toggle='tooltip' data-placement='bottom' title='Show File List'>
3030
</span>
3131
<span
32-
class='vtk-icon-plus clickable padding inspector-selector' data-type='sources' data-toggle='tooltip' data-placement='bottom' title='Show Sources'>
33-
</span>
34-
<span
35-
class='vtk-icon-filter clickable padding inspector-selector need-input-source' data-type='filters' data-toggle='tooltip' data-placement='bottom' title='Show Filters'>
32+
class='vtk-icon-plus clickable padding inspector-selector' data-type='sources' data-toggle='tooltip' data-placement='bottom' title='Show Sources/Filters'>
3633
</span>
3734
<span
3835
class='vtk-icon-info-1 clickable padding inspector-selector need-input-source' data-type='info' data-toggle='tooltip' data-placement='bottom' title='Show Data Info'>
@@ -75,9 +72,7 @@
7572
<div class="row inspector" data-type="sources">
7673
<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 pv-source-list nopadding'>
7774
</div>
78-
</div>
79-
<div class="row inspector" data-type="filters">
80-
<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 pv-filter-list nopadding'>
75+
<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 pv-filter-list nopadding need-input-source'>
8176
</div>
8277
</div>
8378
<div class="row inspector" data-type="info">
@@ -87,7 +82,10 @@
8782
<div class="row inspector" data-type="preferences">
8883
<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 pv-preferences'>
8984
<div class="row" style='margin-top: 15px;'>
90-
<label class='col-sm-5 control-label'>Rendering</label>
85+
<label class='col-sm-5 control-label'
86+
data-toggle='tooltip'
87+
data-placement='right'
88+
title='Select rendering mode'>Rendering</label>
9189
<div class='col-sm-5'>
9290
<select class='pv-update-viewport' data-property-name='ActiveRendererType'>
9391
<option value='image'>Remote</option>
@@ -97,11 +95,24 @@
9795
</div>
9896
</div>
9997
<div class="row">
100-
<label class='col-sm-5 control-label'>Rendering statistics</label>
98+
<label class='col-sm-5 control-label'
99+
data-toggle='tooltip'
100+
data-placement='right'
101+
title='Toggle local rendering statistics'>Statistics</label>
101102
<div class='col-sm-5'>
102103
<input type='checkbox' class='pv-update-viewport checkbox' data-property-name='Stats'/>
103104
</div>
104105
</div>
106+
<div class="row">
107+
<label class='col-sm-5 control-label'
108+
data-toggle='tooltip'
109+
data-placement='right'
110+
title='Shutdown server process when leaving page'>Auto&nbsp;shutdown</label>
111+
<div class='col-sm-5'>
112+
<input type='checkbox' class='pv-update-viewport checkbox' data-property-name='CloseBehavior' checked/>
113+
</div>
114+
</div>
115+
<div class="row" style="height: 15px;"><br/></div>
105116
</div>
106117
<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 pv-global-settings-editor'>
107118
</div>
@@ -119,6 +130,7 @@
119130
sessionManagerURL: vtkWeb.properties.sessionManagerURL,
120131
application: "visualizer"
121132
},
133+
reallyStop = true,
122134
stop = vtkWeb.NoOp,
123135
start = function(connection) {
124136
$('.app-wait-start-page').remove();
@@ -132,7 +144,9 @@
132144

133145
// Update stop method to use the connection
134146
stop = function() {
135-
connection.session.call('application.exit');
147+
if (reallyStop === true) {
148+
connection.session.call('application.exit');
149+
}
136150
}
137151
};
138152

Web/Applications/Visualizer/www/main.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44
.fix-height { position: relative; top: 0; left: 0; }
55
.pv-time-input { position: relative; top: 2px; width: 80px; border: solid 1px white; background: none; padding: 2px 10px; }
66

7+
/* ---- Sources/Filters Icons ---- */
8+
9+
.pv-source-list ul, .pv-filter-list ul {
10+
margin-bottom: 0;
11+
}
12+
.pvActionList li:before {
13+
font-family: "fontello";
14+
width: 16px;
15+
display: inline-block;
16+
}
17+
.pv-source-list li:before { content: '\e94e'; }
18+
.pv-filter-list li:before { content: '\e81c'; }
19+
720
/* ---- Font - colors - Cursor ----- */
821

922
.clickable { cursor: pointer; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; }

Web/Applications/Visualizer/www/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@
205205
viewport.invalidateScene();
206206
} else if(propName === 'Stats') {
207207
viewport.showStatistics(value === 1);
208+
} else if(propName === 'CloseBehavior') {
209+
if(value === 1) {
210+
reallyStop = true;
211+
} else {
212+
reallyStop = false;
213+
}
208214
}
209215
});
210216
}

0 commit comments

Comments
 (0)