fix the intermittent theme preview

This commit is contained in:
friendica 2014-05-25 18:24:27 -07:00
parent e6015e7169
commit f7d99ed7ff
3 changed files with 3 additions and 5 deletions

View File

@ -714,7 +714,7 @@ function settings_content(&$a) {
$unsupported = file_exists('view/theme/' . $th . '/unsupported');
$is_mobile = file_exists('view/theme/' . $th . '/mobile');
if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
$theme_name = (($is_experimental) ? sprintf("%s - \x28Experimental\x29", $f) : $f);
$theme_name = (($is_experimental) ? sprintf(t('%s - (Experimental)'), $f) : $f);
if($is_mobile) {
$mobile_themes[$f]=$theme_name;
}
@ -736,8 +736,6 @@ function settings_content(&$a) {
$nosmile = get_pconfig(local_user(),'system','no_smilies');
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
// $chanview = intval(get_pconfig(local_user(),'system','chanview_full'));
$theme_config = "";
if( ($themeconfigfile = get_theme_config_file($theme_selected)) != null){
require_once($themeconfigfile);

View File

@ -1 +1 @@
2014-05-24.685
2014-05-25.686

View File

@ -1,4 +1,4 @@
<script>$(function(){ previewTheme($("#id_{{$field.0}}")[0]); });</script>
<script>$(document).ready(function(){ previewTheme($("#id_{{$field.0}}")[0]); });</script>
<div class='field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<select name='{{$field.0}}' id='id_{{$field.0}}' {{if $field.5=='preview'}}onchange="previewTheme(this);"{{/if}} >