Browse Source

[showmore_dyn] Normalize addon use setting display with accordion behavior

pull/1066/head
Hypolite Petovan 11 months ago
parent
commit
14ebf55d56
  1. 2
      showmore_dyn/showmore_dyn.php
  2. 9
      showmore_dyn/templates/settings.tpl

2
showmore_dyn/showmore_dyn.php

@ -57,7 +57,7 @@ function showmore_dyn_settings(App &$a, &$o)
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/showmore_dyn/');
$o .= Renderer::replaceMacros($t, [
'$submit' => DI::l10n()->t('Save Settings'),
'$title' => 'Showmore Dynamic',
'$header' => 'Show More Dynamic',
'$limitHeight' => ['limitHeight', DI::l10n()->t('Limit Height'), $limitHeight, 'The maximal pixel height of posts, 0 to disable', '', '', 'number'],
]);

9
showmore_dyn/templates/settings.tpl

@ -1,5 +1,10 @@
<div class="settings-block">
<h3 class="settings-heading">{{$title}}</h3>
<span id="settings_showmore_dyn_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose('settings_showmore_dyn_expanded'); openClose('settings_showmore_dyn_inflated');">
<h3>{{$header}}</h3>
</span>
<div id="settings_showmore_dyn_expanded" class="settings-block" style="display: none;">
<span class="fakelink" onclick="openClose('settings_showmore_dyn_expanded'); openClose('settings_showmore_dyn_inflated');">
<h3>{{$header}}</h3>
</span>
{{include file="field_input.tpl" field=$limitHeight}}
<div class="settings-submit-wrapper">

Loading…
Cancel
Save