]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/templates/theme_settings.tpl
Frio: add input for login backround image in admin settings
[friendica.git] / view / theme / frio / templates / theme_settings.tpl
index 83b466b73b292d38bb71df70f49033c60879f5fb..38311f27ba3c8b8b0f1fa6a5e3a6f235257f9c4b 100644 (file)
 {{/foreach}}
 </div>
 
-<script>
-       $(function(){
+{{if $login_bg_image}}{{include file="field_fileinput.tpl" field=$login_bg_image}}{{/if}}
+
+<script type="text/javascript">
+       $(document).ready(function() {
                $("#frio_nav_bg, #frio_nav_icon_color, #frio_background_color, #frio_link_color").colorpicker({format: 'hex', align: 'left'});
 
                // show image options when user user starts to type the address of the image
                        theme: 'theme-frio',
                });
 
+               // The position of the slider is wrong calculated on hidden elements.
+               // So set an event listener toggle and update the jRange value.
+               $(document).on('click', '#custom-settings-title a', function() {
+                       var bgTransp = $('#frio_contentbg_transp').val();
+                       $('.slider-input').jRange('setValue', bgTransp);
+               });
+
        });
 </script>
 
@@ -68,6 +77,6 @@
 </div>
 <div class="clearfix"></div>
 
-<script>
+<script type="text/javascript">
     $(".inputRange").rangeinput();
 </script>