]> git.mxchange.org Git - friendica-addons.git/commitdiff
[showmore_dyn] Normalize addon use setting display with accordion behavior
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 31 Dec 2020 14:13:42 +0000 (09:13 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 31 Dec 2020 14:13:42 +0000 (09:13 -0500)
showmore_dyn/showmore_dyn.php
showmore_dyn/templates/settings.tpl

index ccb96bc653bbcd92c90a39c5ae1a06211d8c1d4d..da384faaf08786f1a627538962acf463e19aa1d5 100644 (file)
@@ -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'],
        ]);
 
index 5e8bc3f1e8428f5107baf4379e5c70ce66b6f939..ac37e937d2d13de45ea8ff4f8cb11bcc42fe0d16 100644 (file)
@@ -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">