2020-01-31 19:42:02 -05:00
|
|
|
<script src="{{$baseurl}}/view/theme/quattro/jquery.tools.min.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
|
|
|
|
<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js?v={{$smarty.const.FRIENDICA_VERSION}}" ></script>
|
2016-03-28 10:29:05 -04:00
|
|
|
|
2018-04-24 20:26:14 -04:00
|
|
|
{{include file="field_select.tpl" field=$scheme}}
|
2016-03-28 10:29:05 -04:00
|
|
|
|
2020-08-15 19:29:51 -04:00
|
|
|
{{if $share_string}}{{include file="field_input.tpl" field=$share_string}}{{/if}}
|
2016-04-28 19:49:09 -04:00
|
|
|
{{if $nav_bg}}{{include file="field_colorinput.tpl" field=$nav_bg}}{{/if}}
|
|
|
|
{{if $nav_icon_color}}{{include file="field_colorinput.tpl" field=$nav_icon_color}}{{/if}}
|
|
|
|
{{if $link_color}}{{include file="field_colorinput.tpl" field=$link_color}}{{/if}}
|
2016-03-28 10:29:05 -04:00
|
|
|
|
2018-04-24 20:37:04 -04:00
|
|
|
{{if $background_color}}{{include file="field_colorinput.tpl" field=$background_color}}{{/if}}
|
2016-03-28 10:29:05 -04:00
|
|
|
|
|
|
|
{{* The slider for the content opacity - We use no template for this since it is only used at this page *}}
|
2016-04-28 19:49:09 -04:00
|
|
|
{{if $contentbg_transp}}
|
2016-03-28 10:29:05 -04:00
|
|
|
<div class="form-group field input color">
|
|
|
|
<label for="id_{{$contentbg_transp.0}}" id="label_{{$contentbg_transp.0}}">{{$contentbg_transp.1}}</label>
|
2019-04-25 22:17:04 -04:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-9">
|
2020-08-15 20:18:05 -04:00
|
|
|
<input type="range" class="form-control" id="{{$contentbg_transp.0}}_range" min="0" max="100" step="1" value="{{$contentbg_transp.2}}" onchange="{{$contentbg_transp.0}}.value = this.value" oninput="{{$contentbg_transp.0}}.value = this.value">
|
2019-04-25 22:17:04 -04:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-3">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="form-control input-sm" name="{{$contentbg_transp.0}}" id="{{$contentbg_transp.0}}" value="{{$contentbg_transp.2}}" onchange="{{$contentbg_transp.0}}_range.value = this.value" oninput="{{$contentbg_transp.0}}_range.value = this.value" aria-describedby="{{$contentbg_transp.0}}_tip">
|
|
|
|
<span class="input-group-addon image-select">%</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-01-03 11:38:08 -05:00
|
|
|
<span id="{{$contentbg_transp.0}}_tip" class="help-block" role="tooltip">{{$contentbg_transp.3}}</span>
|
2016-03-28 10:29:05 -04:00
|
|
|
<div id="end_{{$contentbg_transp.0}}" class="field_end"></div>
|
|
|
|
</div>
|
2016-04-28 19:49:09 -04:00
|
|
|
{{/if}}
|
2016-03-28 10:29:05 -04:00
|
|
|
|
2016-05-09 17:30:09 -04:00
|
|
|
{{if $background_image}}{{include file="field_fileinput.tpl" field=$background_image}}{{/if}}
|
2016-03-28 10:29:05 -04:00
|
|
|
|
|
|
|
<div id="frio_bg_image_options" style="display: none;">
|
2018-12-13 22:28:12 -05:00
|
|
|
<label>{{$bg_image_options_title}}:</label>
|
2016-03-28 10:29:05 -04:00
|
|
|
{{foreach $bg_image_options as $options}}
|
|
|
|
{{include file="field_radio.tpl" field=$options}}
|
|
|
|
{{/foreach}}
|
|
|
|
</div>
|
|
|
|
|
2018-01-14 13:19:24 -05:00
|
|
|
{{if $login_bg_image}}{{include file="field_fileinput.tpl" field=$login_bg_image}}{{/if}}
|
2018-01-17 10:33:27 -05:00
|
|
|
{{if $login_bg_color}}{{include file="field_colorinput.tpl" field=$login_bg_color}}{{/if}}
|
2018-01-14 13:19:24 -05:00
|
|
|
|
2017-10-20 09:21:42 -04:00
|
|
|
<script type="text/javascript">
|
2017-10-23 09:16:23 -04:00
|
|
|
$(document).ready(function() {
|
2019-02-21 12:37:11 -05:00
|
|
|
|
2019-02-22 06:02:45 -05:00
|
|
|
function GenerateShareString() {
|
|
|
|
var theme = {};
|
|
|
|
// Parse initial share_string
|
|
|
|
if ($("#id_frio_nav_bg").length) {
|
|
|
|
theme.nav_bg = $("#id_frio_nav_bg").val();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_nav_icon_color").length) {
|
|
|
|
theme.nav_icon_color = $("#id_frio_nav_icon_color").val();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_link_color").length) {
|
|
|
|
theme.link_color = $("#id_frio_link_color").val();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_background_color").length) {
|
|
|
|
theme.background_color = $("#id_frio_background_color").val();
|
|
|
|
}
|
|
|
|
|
2019-02-22 06:42:51 -05:00
|
|
|
if ($("#id_frio_background_image").length) {
|
|
|
|
theme.background_image = $("#id_frio_background_image").val();
|
|
|
|
|
2019-02-22 08:13:07 -05:00
|
|
|
if (theme.background_image.length > 0) {
|
|
|
|
if ($("#id_frio_bg_image_option_stretch").is(":checked") == true) {
|
|
|
|
theme.background_image_option = "stretch";
|
|
|
|
}
|
|
|
|
if ($("#id_frio_bg_image_option_cover").is(":checked") == true) {
|
|
|
|
theme.background_image_option = "cover";
|
|
|
|
}
|
|
|
|
if ($("#id_frio_bg_image_option_contain").is(":checked") == true) {
|
|
|
|
theme.background_image_option = "contain";
|
|
|
|
}
|
|
|
|
if ($("#id_frio_bg_image_option_repeat").is(":checked") == true) {
|
|
|
|
theme.background_image_option = "repeat";
|
|
|
|
}
|
|
|
|
}
|
2019-02-22 06:42:51 -05:00
|
|
|
}
|
|
|
|
|
2019-02-22 06:02:45 -05:00
|
|
|
if ($("#frio_contentbg_transp").length) {
|
|
|
|
theme.contentbg_transp = $("#frio_contentbg_transp").val();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_login_bg_image").length) {
|
|
|
|
theme.login_bg_image = $("#id_frio_login_bg_image").val();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_login_bg_color").length) {
|
|
|
|
theme.login_bg_color = $("#id_frio_login_bg_color").val();
|
|
|
|
}
|
2019-02-22 10:44:12 -05:00
|
|
|
if (!($("#id_frio_share_string").is(":focus"))){
|
|
|
|
var share_string = JSON.stringify(theme);
|
|
|
|
$("#id_frio_share_string").val(share_string);
|
|
|
|
}
|
2019-02-22 06:02:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// interval because jquery.val does not trigger events
|
|
|
|
window.setInterval(GenerateShareString, 500);
|
|
|
|
GenerateShareString();
|
|
|
|
|
2019-02-22 07:11:10 -05:00
|
|
|
// Take advantage of the effects of previous comment
|
2019-04-02 09:13:44 -04:00
|
|
|
$(document).on("input", "#id_frio_share_string", function() {
|
2019-02-22 06:16:48 -05:00
|
|
|
theme = JSON.parse($("#id_frio_share_string").val());
|
|
|
|
|
|
|
|
if ($("#id_frio_nav_bg").length) {
|
|
|
|
$("#id_frio_nav_bg").val(theme.nav_bg);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_nav_icon_color").length) {
|
|
|
|
$("#id_frio_nav_icon_color").val(theme.nav_icon_color);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_link_color").length) {
|
|
|
|
$("#id_frio_link_color").val(theme.link_color);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_background_color").length) {
|
|
|
|
$("#id_frio_background_color").val(theme.background_color);
|
|
|
|
}
|
|
|
|
|
2019-02-22 06:42:51 -05:00
|
|
|
if ($("#id_frio_background_image").length) {
|
|
|
|
$("#id_frio_background_image").val(theme.background_image);
|
|
|
|
var elText = theme.background_image;
|
|
|
|
if(elText.length !== 0) {
|
|
|
|
$("#frio_bg_image_options").show();
|
2019-02-22 08:13:07 -05:00
|
|
|
} else {
|
|
|
|
$("#frio_bg_image_options").hide();
|
|
|
|
}
|
2019-02-22 06:42:51 -05:00
|
|
|
|
|
|
|
switch (theme.background_image_option) {
|
2019-02-22 08:13:07 -05:00
|
|
|
case 'stretch':
|
|
|
|
$("#id_frio_bg_image_option_stretch").prop("checked", true);
|
|
|
|
break;
|
|
|
|
case 'cover':
|
|
|
|
$("#id_frio_bg_image_option_cover").prop("checked", true);
|
|
|
|
break;
|
|
|
|
case 'contain':
|
|
|
|
$("#id_frio_bg_image_option_contain").prop("checked", true);
|
|
|
|
break;
|
|
|
|
case 'repeat':
|
|
|
|
$("#id_frio_bg_image_option_repeat").prop("checked", true);
|
|
|
|
break;
|
2019-02-22 06:42:51 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-22 06:16:48 -05:00
|
|
|
if ($("#frio_contentbg_transp").length) {
|
|
|
|
$("#frio_contentbg_transp").val(theme.contentbg_transp);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_login_bg_image").length) {
|
|
|
|
$("#id_frio_login_bg_image").val(theme.login_bg_image);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($("#id_frio_login_bg_color").length) {
|
|
|
|
$("#id_frio_login_bg_color").val(theme.login_bg_color);
|
|
|
|
}
|
|
|
|
});
|
2019-02-22 06:02:45 -05:00
|
|
|
// Create colorpickers
|
2018-01-17 10:33:27 -05:00
|
|
|
$("#frio_nav_bg, #frio_nav_icon_color, #frio_background_color, #frio_link_color, #frio_login_bg_color").colorpicker({format: 'hex', align: 'left'});
|
2016-03-28 10:29:05 -04:00
|
|
|
|
|
|
|
// show image options when user user starts to type the address of the image
|
2016-04-28 17:20:54 -04:00
|
|
|
$("#id_frio_background_image").keyup(function(){
|
|
|
|
var elText = $(this).val();
|
|
|
|
if(elText.length !== 0) {
|
2016-03-28 10:29:05 -04:00
|
|
|
$("#frio_bg_image_options").show();
|
2016-04-28 17:20:54 -04:00
|
|
|
} else {
|
|
|
|
$("#frio_bg_image_options").hide();
|
|
|
|
}
|
|
|
|
});
|
2016-03-28 10:29:05 -04:00
|
|
|
|
|
|
|
// show the image options is there is allready an image
|
|
|
|
if($("#id_frio_background_image").val().length != 0) {
|
|
|
|
$("#frio_bg_image_options").show();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-08-15 20:18:05 -04:00
|
|
|
<div class="settings-submit-wrapper pull-right">
|
2016-06-13 04:57:42 -04:00
|
|
|
<button type="submit" value="{{$submit}}" class="settings-submit btn btn-primary" name="frio-settings-submit">{{$submit}}</button>
|
2016-03-28 10:29:05 -04:00
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|