Implemented dialog display for clearing metadata.

This commit is contained in:
WrinklyNinja
2014-07-12 15:20:13 +01:00
parent db4d17b5c5
commit bfa1f8b04d
2 changed files with 36 additions and 31 deletions
+4
View File
@@ -266,6 +266,10 @@ function processButtonClick(evt) {
}
} else if (action == 'redate-plugins') {
redatePlugins();
} else if (action == 'clear-metadata') {
clearMetadata(evt.target.parentNode.parentNode.parentNode.parentNode.children[0].textContent);
} else if (action == 'wipe-userlist') {
clearAllMetadata();
}
}
function setupEventHandlers() {
+32 -31
View File
@@ -38,11 +38,12 @@
<li class="loadsBSA fa fa-archive hidden" title="Loads BSA">
<li class="hasUserEdits fa fa-user hidden" title="Has User Metadata">
<li class=" fa fa-ellipsis-v fa-lg pluginMenu" data-action="show-menu">
<li class="hidden"><ol class="menu">
<li data-action="view-ui" data-target="editor"><span class="fa fa-pencil fa-fw"></span> Edit Metadata
<li data-action="copy-metadata"><span class="fa fa-copy fa-fw"></span> Copy Metadata As Text
<li data-action="clear-metadata"><span class="fa fa-trash-o fa-fw"></span> Clear User Metadata
</ol>
<li class="hidden">
<ol class="menu">
<li data-action="view-ui" data-target="editor"><span class="fa fa-pencil fa-fw"></span> Edit Metadata
<li data-action="copy-metadata"><span class="fa fa-copy fa-fw"></span> Copy Metadata As Text
<li data-action="clear-metadata"><span class="fa fa-trash-o fa-fw"></span> Clear User Metadata
</ol>
</ol>
</section>
</template>
@@ -188,34 +189,34 @@ along with LOOT. If not, see &lt;http://www.gnu.org/licenses/&gt;.
<div id="settings" class="dialog hidden" data-overlay="1">
<h1>Settings</h1>
<form>
<label for="defaultGameSelect">Default Game</label>
<select id="defaultGameSelect">
<!-- Game <option> elements go here. -->
</select><br>
<label for="languageSelect">Language</label>
<select id="languageSelect">
<!-- Language <option> elements go here. -->
</select><br>
<label for="debugVerbositySelect">Debug Verbosity</label>
<select id="debugVerbositySelect">
<option value="0">None</option>
<option value="1">Low</option>
<option value="2">Medium</option>
<option value="3">High</option>
</select><br>
<!-- Need to add an editable multi-column game list here. -->
<table>
<thead>
<tr><th>Name<th>Base Game<th>LOOT Folder<th>Master File<th>Masterlist Repository URL<th>Masterlist Repository Branch<th>Install Path<th>Install Path Registry Key
<tbody id="gameTable">
<!-- Game rows go here. -->
</table>
<p>Language and game changes will be applied after LOOT is restarted.
<hr>
<label for="defaultGameSelect">Default Game</label>
<select id="defaultGameSelect">
<!-- Game <option> elements go here. -->
</select><br>
<label for="languageSelect">Language</label>
<select id="languageSelect">
<!-- Language <option> elements go here. -->
</select><br>
<label for="debugVerbositySelect">Debug Verbosity</label>
<select id="debugVerbositySelect">
<option value="0">None</option>
<option value="1">Low</option>
<option value="2">Medium</option>
<option value="3">High</option>
</select><br>
<!-- Need to add an editable multi-column game list here. -->
<table>
<thead>
<tr><th>Name<th>Base Game<th>LOOT Folder<th>Master File<th>Masterlist Repository URL<th>Masterlist Repository Branch<th>Install Path<th>Install Path Registry Key
<tbody id="gameTable">
<!-- Game rows go here. -->
</table>
<p>Language and game changes will be applied after LOOT is restarted.
<hr>
<div class="buttons">
<button>Apply</button>
<button>Cancel</button>
</form>
</div>
</div>
<div id="overlay" class="hidden"></div>