Implemented animated tab page changes.

The tab pages in the editor are zero-height though, I couldn't figure
out how to solve that, so I'll just go back to it later. The Polymer
elements are in, and that's what matters at this stage.
This commit is contained in:
Oliver Hamlet
2014-11-13 04:58:28 +00:00
parent 9bf755f931
commit 9a247d0cf8
5 changed files with 107 additions and 102 deletions
+2 -1
View File
@@ -29,6 +29,7 @@
"Jed": "SlexAxton/Jed#a9d03e1bbca9211a8b29a93a298a7ee9ddb353f0",
"marked": "chjj/marked#~0.3.2",
"requirejs": "jrburke/requirejs-bower#~2.1.15",
"paper-progress": "Polymer/paper-progress#~0.5.0"
"paper-progress": "Polymer/paper-progress#~0.5.0",
"core-animated-pages": "Polymer/core-animated-pages#~0.5.1"
}
}
+5
View File
@@ -63,4 +63,9 @@ html /deep/ paper-dialog#progressDialog {
left: 0;
bottom: 0;
right: 0;
}
/* This stops transitions from overflowing onto other elements. */
html /deep/ core-animated-pages {
overflow: hidden;
}
+68 -71
View File
@@ -29,6 +29,8 @@ loot-clear-metadata
<link rel="import" href="../bower_components/paper-button/paper-button.html">
<link rel="import" href="../bower_components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../bower_components/core-animated-pages/core-animated-pages.html">
<link rel="import" href="../bower_components/core-animated-pages/transitions/slide-from-right.html">
<link rel="import" href="editable-table.html">
@@ -252,69 +254,71 @@ loot-clear-metadata
<paper-tab data-for="dirty">Dirty Info</paper-tab>
<paper-tab data-for="locations">Locations</paper-tab>
</paper-tabs>
<table is="editable-table" id="loadAfter" data-template="fileRow">
<thead>
<tr><th>Filename</th><th>Display Name</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- File rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="req" class="hidden" data-template="fileRow">
<thead>
<tr><th>Filename</th><th>Display Name</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- File rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="inc" class="hidden" data-template="fileRow">
<thead>
<tr><th>Filename</th><th>Display Name</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- File rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="message" class="hidden" data-template="messageRow">
<thead>
<tr><th>Type</th><th>Content</th><th>Condition</th><th>Language</th><th></th></tr>
</thead>
<tbody>
<!-- Message rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="tags" class="hidden" data-template="tagRow">
<thead>
<tr><th>Add/Remove</th><th>Bash Tag</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- Bash Tag rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="dirty" class="hidden" data-template="dirtyInfoRow">
<thead>
<tr><th>CRC</th><th>ITM Count</th><th>Deleted References</th><th>Deleted Navmeshes</th><th>Cleaning Utility</th><th></th></tr>
</thead>
<tbody>
<!-- Dirty info rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="locations" class="hidden" data-template="locationRow">
<thead>
<tr><th>URL</th><th>Version</th><th></th></tr>
</thead>
<tbody>
<!-- Location rows go here. -->
<tr><td colspan="3">Add new row...</td><td></td></tr>
</tbody>
</table>
<core-animated-pages selected="loadAfter" valueattr="id" transitions="slide-from-right">
<table is="editable-table" id="loadAfter" data-template="fileRow">
<thead>
<tr><th>Filename</th><th>Display Name</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- File rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="req" data-template="fileRow">
<thead>
<tr><th>Filename</th><th>Display Name</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- File rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="inc" data-template="fileRow">
<thead>
<tr><th>Filename</th><th>Display Name</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- File rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="message" data-template="messageRow">
<thead>
<tr><th>Type</th><th>Content</th><th>Condition</th><th>Language</th><th></th></tr>
</thead>
<tbody>
<!-- Message rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="tags" data-template="tagRow">
<thead>
<tr><th>Add/Remove</th><th>Bash Tag</th><th>Condition</th><th></th></tr>
</thead>
<tbody>
<!-- Bash Tag rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="dirty" data-template="dirtyInfoRow">
<thead>
<tr><th>CRC</th><th>ITM Count</th><th>Deleted References</th><th>Deleted Navmeshes</th><th>Cleaning Utility</th><th></th></tr>
</thead>
<tbody>
<!-- Dirty info rows go here. -->
<tr><td colspan="4">Add new row...</td><td></td></tr>
</tbody>
</table>
<table is="editable-table" id="locations" data-template="locationRow">
<thead>
<tr><th>URL</th><th>Version</th><th></th></tr>
</thead>
<tbody>
<!-- Location rows go here. -->
<tr><td colspan="3">Add new row...</td><td></td></tr>
</tbody>
</table>
</core-animated-pages>
</div>
<div id="buttons">
<paper-button id="accept">Apply</paper-button>
@@ -388,14 +392,7 @@ loot-clear-metadata
},
onShowEditorTable: function(evt) {
var tables = evt.target.parentElement.getElementsByTagName('table');
for (var i = 0; i < tables.length; ++i) {
if (tables[i].id != evt.target.selected) {
tables[i].classList.toggle('hidden', true);
} else {
tables[i].classList.toggle('hidden', false);
}
}
evt.target.nextElementSibling.selected = evt.target.selected;
},
readFromEditor: function(oldData) {
+1 -3
View File
@@ -919,9 +919,7 @@ function openMenu(evt) {
}
}
function switchSidebarTab(evt) {
var isFirstSelected = evt.target.selected == 0;
evt.target.nextElementSibling.classList.toggle('hidden', !isFirstSelected);
evt.target.nextElementSibling.nextElementSibling.classList.toggle('hidden', isFirstSelected);
evt.target.nextElementSibling.selected = evt.target.selected;
}
function showAboutDialog(evt) {
+31 -27
View File
@@ -21,6 +21,8 @@
<link rel="import" href="bower_components/core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="bower_components/core-menu/core-menu.html">
<link rel="import" href="bower_components/core-menu/core-submenu.html">
<link rel="import" href="bower_components/core-animated-pages/core-animated-pages.html">
<link rel="import" href="bower_components/core-animated-pages/transitions/slide-from-right.html">
<link rel="import" href="bower_components/paper-menu-button/paper-menu-button.html">
<link rel="import" href="bower_components/paper-item/paper-item.html">
@@ -100,33 +102,35 @@
<paper-tab>Plugins</paper-tab>
<paper-tab>Filters</paper-tab>
</paper-tabs>
<core-menu id="cardsNav" class="tab-content" flex>
<paper-item>
<a href="#summary">Summary</a>
</paper-item>
<paper-item>
<a href="#generalMessages">General Messages</a>
</paper-item>
<!-- Generated <loot-plugin-item> elements go here, containing # links to each plugin's section in the list. -->
</core-menu>
<core-menu id="filters" class="tab-content hidden" flex>
<paper-checkbox id="hideVersionNumbers" data-class="version" label="Hide version numbers"></paper-checkbox>
<paper-checkbox id="hideCRCs" data-class="crc" label="Hide CRCs"></paper-checkbox>
<paper-checkbox id="hideBashTags" data-class="tag" label="Hide Bash Tags"></paper-checkbox>
<paper-checkbox id="hideNotes" label="Hide notes"></paper-checkbox>
<paper-checkbox id="hideDoNotCleanMessages" label="Hide 'Do not clean' messages"></paper-checkbox>
<paper-checkbox id="hideInactivePluginMessages" label="Hide inactive plugin messages"></paper-checkbox>
<paper-checkbox id="hideAllPluginMessages" label="Hide all plugin messages"></paper-checkbox>
<paper-checkbox id="hideMessagelessPlugins" label="Hide messageless plugins"></paper-checkbox>
<div center horizontal layout>
<div id="hiddenPluginsTxt" flex>Hidden plugins:</div>
<div><span id="hiddenPluginNo">0</span> / <span id="filterTotalPluginNo">0</span></div>
</div>
<div center horizontal layout>
<div id="hiddenMessagesTxt" flex>Hidden messages:</div>
<div><span id="hiddenMessageNo">0</span> / <span id="filterTotalMessageNo">0</span></div>
</div>
</core-menu>
<core-animated-pages selected="0" transitions="slide-from-right" flex>
<core-menu id="cardsNav" class="tab-content" flex>
<paper-item>
<a href="#summary">Summary</a>
</paper-item>
<paper-item>
<a href="#generalMessages">General Messages</a>
</paper-item>
<!-- Generated <loot-plugin-item> elements go here, containing # links to each plugin's section in the list. -->
</core-menu>
<core-menu id="filters" class="tab-content" flex>
<paper-checkbox id="hideVersionNumbers" data-class="version" label="Hide version numbers"></paper-checkbox>
<paper-checkbox id="hideCRCs" data-class="crc" label="Hide CRCs"></paper-checkbox>
<paper-checkbox id="hideBashTags" data-class="tag" label="Hide Bash Tags"></paper-checkbox>
<paper-checkbox id="hideNotes" label="Hide notes"></paper-checkbox>
<paper-checkbox id="hideDoNotCleanMessages" label="Hide 'Do not clean' messages"></paper-checkbox>
<paper-checkbox id="hideInactivePluginMessages" label="Hide inactive plugin messages"></paper-checkbox>
<paper-checkbox id="hideAllPluginMessages" label="Hide all plugin messages"></paper-checkbox>
<paper-checkbox id="hideMessagelessPlugins" label="Hide messageless plugins"></paper-checkbox>
<div center horizontal layout>
<div id="hiddenPluginsTxt" flex>Hidden plugins:</div>
<div><span id="hiddenPluginNo">0</span> / <span id="filterTotalPluginNo">0</span></div>
</div>
<div center horizontal layout>
<div id="hiddenMessagesTxt" flex>Hidden messages:</div>
<div><span id="hiddenMessageNo">0</span> / <span id="filterTotalMessageNo">0</span></div>
</div>
</core-menu>
</core-animated-pages>
<core-tooltip label="Press Enter when searching to select the next match." position="top">
<paper-input id="searchBox" type="search" label="Search content..."></paper-input>
</core-tooltip>