move export selection button to bottom of the list

This commit is contained in:
Thijs Wenker 2018-10-03 19:35:03 +02:00 committed by David Back
parent 50becb5c37
commit 684f7d5689
3 changed files with 25 additions and 15 deletions

View file

@ -1063,6 +1063,15 @@ textarea:enabled[scrolling="true"]::-webkit-resizer {
position: relative; /* New positioning context. */ position: relative; /* New positioning context. */
} }
#footer-text {
float: right;
margin-right: 0;
}
#entity-list-footer {
padding-top: 38px;
}
#search-area { #search-area {
padding-right: 168px; padding-right: 168px;
padding-bottom: 24px; padding-bottom: 24px;

View file

@ -1,4 +1,4 @@
<!-- <!--
// entityList.html // entityList.html
// //
// Created by Ryan Huffman on 19 Nov 2014 // Created by Ryan Huffman on 19 Nov 2014
@ -25,7 +25,6 @@
<input type="button" id="locked" class="glyph" value="&#xe006;" /> <input type="button" id="locked" class="glyph" value="&#xe006;" />
<input type="button" id="visible" class="glyph" value="&#xe007;" /> <input type="button" id="visible" class="glyph" value="&#xe007;" />
</div> </div>
<input type="button" id="export" value="Export Selection" />
<input type="button" id="pal" class="glyph" value="&#xe00c;" /> <input type="button" id="pal" class="glyph" value="&#xe00c;" />
<input type="button" class="red" id="delete" value="Delete" /> <input type="button" class="red" id="delete" value="Delete" />
</div> </div>
@ -89,7 +88,7 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td id="footer-text" colspan="12"> </td> <td colspan="12"></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
@ -99,5 +98,13 @@
</div> </div>
</div> </div>
</div> </div>
<div id="entity-list-footer">
<div>
<input type="button" id="export" value="Export Selection" />
<div id="footer-text">
<b><span id="selected-entities-count">0</span> of <span id="visible-entities-count">0</span></b> selected
</div>
</div>
</div>
</body> </body>
</html> </html>

View file

@ -20,7 +20,7 @@ const IMAGE_MODEL_NAME = 'default-image-model.fbx';
const COLLAPSE_EXTRA_INFO = "E"; const COLLAPSE_EXTRA_INFO = "E";
const EXPAND_EXTRA_INFO = "D"; const EXPAND_EXTRA_INFO = "D";
const FILTER_IN_VIEW_ATTRIBUTE = "pressed"; const FILTER_IN_VIEW_ATTRIBUTE = "pressed";
const WINDOW_NONVARIABLE_HEIGHT = 207; const WINDOW_NONVARIABLE_HEIGHT = 257;
const NUM_COLUMNS = 12; const NUM_COLUMNS = 12;
const EMPTY_ENTITY_ID = "0"; const EMPTY_ENTITY_ID = "0";
const DELETE = 46; // Key code for the delete key. const DELETE = 46; // Key code for the delete key.
@ -60,7 +60,7 @@ const COMPARE_DESCENDING = function(a, b) {
} }
// List of all entities // List of all entities
var entities = [] var entities = [];
// List of all entities, indexed by Entity ID // List of all entities, indexed by Entity ID
var entitiesByID = {}; var entitiesByID = {};
// The filtered and sorted list of entities passed to ListView // The filtered and sorted list of entities passed to ListView
@ -112,7 +112,8 @@ function loaded() {
elPal = document.getElementById("pal"); elPal = document.getElementById("pal");
elInfoToggle = document.getElementById("info-toggle"); elInfoToggle = document.getElementById("info-toggle");
elInfoToggleGlyph = elInfoToggle.firstChild; elInfoToggleGlyph = elInfoToggle.firstChild;
elFooter = document.getElementById("footer-text"); elSelectedEntitiesCount = document.getElementById("selected-entities-count");
elVisibleEntitiesCount = document.getElementById("visible-entities-count");
elNoEntitiesMessage = document.getElementById("no-entities"); elNoEntitiesMessage = document.getElementById("no-entities");
elNoEntitiesInView = document.getElementById("no-entities-in-view"); elNoEntitiesInView = document.getElementById("no-entities-in-view");
elNoEntitiesRadius = document.getElementById("no-entities-radius"); elNoEntitiesRadius = document.getElementById("no-entities-radius");
@ -440,15 +441,8 @@ function loaded() {
} }
function refreshFooter() { function refreshFooter() {
if (selectedEntities.length > 1) { elSelectedEntitiesCount.innerText = selectedEntities.length;
elFooter.firstChild.nodeValue = selectedEntities.length + " entities selected"; elVisibleEntitiesCount.innerText = visibleEntities.length;
} else if (selectedEntities.length === 1) {
elFooter.firstChild.nodeValue = "1 entity selected";
} else if (visibleEntities.length === 1) {
elFooter.firstChild.nodeValue = "1 entity found";
} else {
elFooter.firstChild.nodeValue = visibleEntities.length + " entities found";
}
} }
function refreshNoEntitiesMessage() { function refreshNoEntitiesMessage() {