scrap tagLineBreak option

This commit is contained in:
siikamiika 2017-10-15 10:38:30 +03:00
parent 293606d2b1
commit 7913b094b7
6 changed files with 12 additions and 21 deletions

View File

@ -141,7 +141,6 @@ function optionsSetDefaults(options) {
popupOffset: 10,
showGuide: true,
compactTags: false,
tagLineBreak: true,
compactGlossaries: false
},
@ -216,7 +215,6 @@ function optionsVersion(options) {
options.general.resultOutputMode = 'split';
}
options.general.compactTags = false;
options.general.tagLineBreak = true;
options.general.compactGlossaries = false;
}
];

View File

@ -23,7 +23,6 @@ async function formRead() {
optionsNew.general.showGuide = $('#show-usage-guide').prop('checked');
optionsNew.general.compactTags = $('#compact-tags').prop('checked');
optionsNew.general.tagLineBreak = $('#tag-line-break').prop('checked');
optionsNew.general.compactGlossaries = $('#compact-glossaries').prop('checked');
optionsNew.general.resultOutputMode = $('#result-output-mode').val();
optionsNew.general.audioSource = $('#audio-playback-source').val();
@ -130,7 +129,6 @@ async function onReady() {
$('#show-usage-guide').prop('checked', options.general.showGuide);
$('#compact-tags').prop('checked', options.general.compactTags);
$('#tag-line-break').prop('checked', options.general.tagLineBreak);
$('#compact-glossaries').prop('checked', options.general.compactGlossaries);
$('#result-output-mode').val(options.general.resultOutputMode);
$('#audio-playback-source').val(options.general.audioSource);

View File

@ -215,7 +215,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia
var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});
return "<div "
+ ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.tagLineBreak : depth0),{"name":"unless","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.compactGlossaries : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ ">\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.definitionTags : depth0),{"name":"each","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "</div>\n";
@ -438,12 +438,12 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia
var stack1;
return " <li>"
+ ((stack1 = container.invokePartial(partials.definition,depth0,{"name":"definition","hash":{"compactGlossaries":(depths[1] != null ? depths[1].compactGlossaries : depths[1]),"tagLineBreak":(depths[1] != null ? depths[1].tagLineBreak : depths[1])},"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ ((stack1 = container.invokePartial(partials.definition,depth0,{"name":"definition","hash":{"compactGlossaries":(depths[1] != null ? depths[1].compactGlossaries : depths[1])},"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ "</li>\n";
},"58":function(container,depth0,helpers,partials,data) {
var stack1;
return ((stack1 = container.invokePartial(partials.definition,((stack1 = (depth0 != null ? depth0.definitions : depth0)) != null ? stack1["0"] : stack1),{"name":"definition","hash":{"compactGlossaries":(depth0 != null ? depth0.compactGlossaries : depth0),"tagLineBreak":(depth0 != null ? depth0.tagLineBreak : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "");
return ((stack1 = container.invokePartial(partials.definition,((stack1 = (depth0 != null ? depth0.definitions : depth0)) != null ? stack1["0"] : stack1),{"name":"definition","hash":{"compactGlossaries":(depth0 != null ? depth0.compactGlossaries : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "");
},"60":function(container,depth0,helpers,partials,data,blockParams,depths) {
var stack1;
@ -451,7 +451,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia
},"61":function(container,depth0,helpers,partials,data) {
var stack1;
return ((stack1 = container.invokePartial(partials.definition,depth0,{"name":"definition","hash":{"compactGlossaries":(depth0 != null ? depth0.compactGlossaries : depth0),"tagLineBreak":(depth0 != null ? depth0.tagLineBreak : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
return ((stack1 = container.invokePartial(partials.definition,depth0,{"name":"definition","hash":{"compactGlossaries":(depth0 != null ? depth0.compactGlossaries : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
+ " ";
},"63":function(container,depth0,helpers,partials,data) {
var stack1, helper, options, buffer =
@ -469,7 +469,7 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia
return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(data && data.first),{"name":"unless","hash":{},"fn":container.program(67, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "\n"
+ ((stack1 = container.invokePartial(partials.term,depth0,{"name":"term","hash":{"compactGlossaries":(depths[1] != null ? depths[1].compactGlossaries : depths[1]),"tagLineBreak":(depths[1] != null ? depths[1].tagLineBreak : depths[1]),"playback":(depths[1] != null ? depths[1].playback : depths[1]),"addable":(depths[1] != null ? depths[1].addable : depths[1]),"merged":(depths[1] != null ? depths[1].merged : depths[1]),"grouped":(depths[1] != null ? depths[1].grouped : depths[1]),"debug":(depths[1] != null ? depths[1].debug : depths[1])},"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "");
+ ((stack1 = container.invokePartial(partials.term,depth0,{"name":"term","hash":{"compactGlossaries":(depths[1] != null ? depths[1].compactGlossaries : depths[1]),"playback":(depths[1] != null ? depths[1].playback : depths[1]),"addable":(depths[1] != null ? depths[1].addable : depths[1]),"merged":(depths[1] != null ? depths[1].merged : depths[1]),"grouped":(depths[1] != null ? depths[1].grouped : depths[1]),"debug":(depths[1] != null ? depths[1].debug : depths[1])},"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "");
},"67":function(container,depth0,helpers,partials,data) {
return "<hr>";
},"69":function(container,depth0,helpers,partials,data) {

View File

@ -39,10 +39,6 @@
<label><input type="checkbox" id="compact-tags"> Compact tags</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="tag-line-break"> Line break after tags</label>
</div>
<div class="checkbox">
<label><input type="checkbox" id="compact-glossaries"> Compact glossaries</label>
</div>

View File

@ -239,7 +239,6 @@ class Display {
grouped: options.general.resultOutputMode === 'group',
merged: options.general.resultOutputMode === 'merge',
playback: options.general.audioSource !== 'disabled',
tagLineBreak: options.general.tagLineBreak,
compactGlossaries: options.general.compactGlossaries,
debug: options.general.debugInfo
};

View File

@ -1,6 +1,6 @@
{{#*inline "definition"}}
{{#if definitionTags}}
<div {{#unless tagLineBreak}}style="display: inline-block;"{{/unless}}>
<div {{#if compactGlossaries}}style="display: inline-block;"{{/if}}>
{{#each definitionTags}}
<span class="label label-default tag-{{category}}" title="{{notes}}">{{name}}</span>
{{/each}}
@ -100,24 +100,24 @@
{{#if definitions.[1]}}
<ol>
{{#each definitions}}
<li>{{> definition tagLineBreak=../tagLineBreak compactGlossaries=../compactGlossaries}}</li>
<li>{{> definition compactGlossaries=../compactGlossaries}}</li>
{{/each}}
</ol>
{{else}}
{{> definition definitions.[0] tagLineBreak=tagLineBreak compactGlossaries=compactGlossaries}}
{{> definition definitions.[0] compactGlossaries=compactGlossaries}}
{{/if}}
{{else if merged}}
{{#if definitions.[1]}}
<ol>
{{#each definitions}}
<li>{{> definition tagLineBreak=../tagLineBreak compactGlossaries=../compactGlossaries}}</li>
<li>{{> definition compactGlossaries=../compactGlossaries}}</li>
{{/each}}
</ol>
{{else}}
{{> definition definitions.[0] tagLineBreak=tagLineBreak compactGlossaries=compactGlossaries}}
{{> definition definitions.[0] compactGlossaries=compactGlossaries}}
{{/if}}
{{else}}
{{> definition tagLineBreak=tagLineBreak compactGlossaries=compactGlossaries}}
{{> definition compactGlossaries=compactGlossaries}}
{{/if}}
</div>
@ -130,7 +130,7 @@
{{#if definitions}}
{{#each definitions}}
{{#unless @first}}<hr>{{/unless}}
{{> term debug=../debug grouped=../grouped merged=../merged addable=../addable playback=../playback tagLineBreak=../tagLineBreak compactGlossaries=../compactGlossaries}}
{{> term debug=../debug grouped=../grouped merged=../merged addable=../addable playback=../playback compactGlossaries=../compactGlossaries}}
{{/each}}
{{else}}
<p class="note">No results found.</p>