mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Update loot-plugin-editor
Editor data is now set only with setEditorData(), the `data` member has been removed. All metadata changes need to be propagated using setEditorData(). Plugin name, version and crc now exist in the editor's light DOM.
This commit is contained in:
@@ -66,6 +66,7 @@ function vulcanizeTests(releasePath) {
|
||||
'test_loot-custom-icons.html',
|
||||
'test_loot-dropdown-menu.html',
|
||||
'test_loot-message-dialog.html',
|
||||
'test_loot-plugin-editor.html',
|
||||
'test_loot-plugin-item.html',
|
||||
'test_loot-search-toolbar.html',
|
||||
];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>test_loot-plugin-editor.html</title>
|
||||
|
||||
<link rel="import" href="../../../../gui/html/native-shadow-dom.html">
|
||||
|
||||
<link rel="import" href="../../../../gui/html/elements/loot-plugin-editor.html">
|
||||
|
||||
<script src="../../../../gui/html/js/plugin.js"></script>
|
||||
<script src="../../../../gui/html/js/translator.js"></script>
|
||||
<script src="../../../../gui/html/js/filters.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<loot-plugin-editor id="editor">
|
||||
<h1>Skyrim.esm</h1>
|
||||
<span class="version">1.9</span>
|
||||
<span class="crc">ABCDEF01</span>
|
||||
</loot-plugin-editor>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
function onEditorToggle() {
|
||||
alert('An editor close button was pressed.');
|
||||
}
|
||||
|
||||
loot.filters = new loot.Filters(new loot.Translator());
|
||||
const plugin = new loot.Plugin({
|
||||
name: 'Skyrim.esm',
|
||||
priority: -999999,
|
||||
});
|
||||
|
||||
document.getElementById('editor').setEditorData(plugin);
|
||||
document.addEventListener('loot-editor-close', onEditorToggle);
|
||||
</script>
|
||||
</body>
|
||||
Reference in New Issue
Block a user