re-add #no-styles when inline-search deletes the last one

This commit is contained in:
tophf 2017-12-12 05:21:06 +03:00
parent 5452979366
commit bb8dc04954
3 changed files with 6 additions and 2 deletions

View File

@ -55,7 +55,7 @@
</template> </template>
<template data-id="noStyles"> <template data-id="noStyles">
<div id="no-styles" class="entry" i18n-text="noStylesForSite"></div> <div id="no-styles" i18n-text="noStylesForSite"></div>
</template> </template>
<template data-id="regexpProblemIndicator"> <template data-id="regexpProblemIndicator">

View File

@ -101,7 +101,8 @@ body > div:not(#installed):not(#message-box):not(.colorpicker-popup) {
} }
#no-styles { #no-styles {
font-style: italic; padding: 4px 9px 6px;
font-weight: bold;
} }
#find-styles-link { #find-styles-link {

View File

@ -468,6 +468,9 @@ function handleUpdate(style) {
function handleDelete(id) { function handleDelete(id) {
$.remove(ENTRY_ID_PREFIX + id); $.remove(ENTRY_ID_PREFIX + id);
if (!installed.firstElementChild) {
installed.appendChild(template.noStyles.cloneNode(true));
}
} }