mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
- yWeb: add distributor style sheet
This commit is contained in:
@@ -30,6 +30,7 @@ start-block~yWeb_save_settings
|
||||
{=ini-set:/var/tuxbox/config/Y-Web.conf;wol_desc_3;{=wol_desc_3=}~cache=}
|
||||
{=ini-set:/var/tuxbox/config/Y-Web.conf;fb;{=fb=}~cache=}
|
||||
{=ini-set:/var/tuxbox/config/Y-Web.conf;start_page;{=start_page=}~cache=}
|
||||
{=ini-set:/var/tuxbox/config/Y-Web.conf;style;{=style=}~cache=}
|
||||
{=ini-set:/var/tuxbox/config/Y-Web.conf;yweb_box_name;{=yweb_box_name=}~cache=}
|
||||
{=ini-set:/var/tuxbox/config/Y-Web.conf;yweb_box_color;{=yweb_box_color=}~save=}
|
||||
end-block~yWeb_save_settings
|
||||
@@ -271,6 +272,7 @@ start-block~head
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<title>yWeb</title>
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Dist.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_User.css" />
|
||||
end-block~head
|
||||
|
||||
@@ -283,6 +285,7 @@ start-block~headCache
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>yWeb</title>
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Dist.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_User.css" />
|
||||
end-block~headCache
|
||||
|
||||
@@ -294,6 +297,7 @@ start-block~head_no_charset
|
||||
<head>
|
||||
<title>yWeb</title>
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Dist.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_User.css" />
|
||||
end-block~head_no_charset
|
||||
|
||||
@@ -305,6 +309,7 @@ start-block~frame_head
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Dist.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_User.css" />
|
||||
<title>yWeb</title>
|
||||
end-block~frame_head
|
||||
@@ -317,6 +322,7 @@ start-block~frame_iso_head
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Dist.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_User.css" />
|
||||
<title>yWeb</title>
|
||||
end-block~frame_iso_head
|
||||
|
6
src/nhttpd/web/Y_Dist.css
Normal file
6
src/nhttpd/web/Y_Dist.css
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
Original yWeb Style - Do not modify.
|
||||
|
||||
When you're a distributor, use your own styles/Y_Dist-<name>.css file.
|
||||
When you're a user, use Y_User.css.
|
||||
*/
|
@@ -306,6 +306,10 @@ tr {
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
}
|
||||
.work_box .work_box {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.work_box_head {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@@ -44,7 +44,6 @@ function init(){
|
||||
{=var-set:m_link_text={=L:set.menue.timer_settings=}=}
|
||||
{=include-block:Y_Blocks.txt;management_link=}
|
||||
</li>
|
||||
<!--<li><a title="change layout skin" target="work" href="Y_Settings_Skin.yhtm">Skins</a></li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="y_menu_sec_section">Neutrino</div>
|
||||
|
@@ -1,37 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Main.css">
|
||||
<link rel="stylesheet" type="text/css" href="/Y_User.css">
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
function do_it()
|
||||
{
|
||||
_url="/control/exec?Y_Plugins&skin_set&"+
|
||||
document.f.skin.value;
|
||||
parent.frames[1].location.href=_url;
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<br>
|
||||
<div class="y_head">Skin {=var-set:help_url=Neutrino:yWeb:Settings#Skins=}{=include-block:Y_Blocks.txt;wiki_help=}</div>
|
||||
<div class="y_work_box">
|
||||
<form name="f" action="">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>Skin</td>
|
||||
<td><select size="1" name="skin">
|
||||
{=script:Y_Plugins skin_get=}
|
||||
</select></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<br>
|
||||
<input type="button" value="Setzen" name="B1" title="submit values" onClick='do_it()'>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -5,8 +5,25 @@
|
||||
//<![CDATA[
|
||||
function do_submit(){
|
||||
show_waitbox(true);
|
||||
do_reload = false;
|
||||
style_new = document.f.style.value;
|
||||
if (style_old != style_new)
|
||||
{
|
||||
do_reload = true;
|
||||
loadSyncURL("/control/exec?Y_Tools&style_set&" + style_new);
|
||||
}
|
||||
yhttpd_cache_clear("");
|
||||
document.f.submit();
|
||||
if (do_reload == true)
|
||||
{
|
||||
alert("Style changed. Maybe you'll have to reload this site.");
|
||||
/* ugly mess */
|
||||
top.top_main.prim_menu.location.reload();
|
||||
top.top_main.base.sec_menu.location.reload();
|
||||
//FIXME top.top_main.base.work.location.reload();
|
||||
top.top_left.location.reload();
|
||||
top.top_right.location.reload();
|
||||
}
|
||||
}
|
||||
function do_init(){
|
||||
val = "{=ini-get:/var/tuxbox/config/Y-Web.conf;fb;0~open=}";
|
||||
@@ -34,9 +51,16 @@ function do_init(){
|
||||
case "control": sel=1; break;
|
||||
}
|
||||
document.f.start_page.selectedIndex = sel;
|
||||
style_old = "{=ini-get:/var/tuxbox/config/Y-Web.conf;style~cache=}";
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<style type="text/css">
|
||||
input[type="text"],
|
||||
select {
|
||||
width: 220px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="do_init()">
|
||||
{=var-set:wait_text={=L:save_values=}=}{=include-block:Y_Blocks.txt;snip_wait=}
|
||||
@@ -104,11 +128,22 @@ function do_init(){
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{=L:set.yweb.start_page=}</td>
|
||||
<td colspan="3"> <select name="start_page" title="{=L:start_page=}">
|
||||
<option value="bouquets" selected="selected">{=L:bc.menue.bouquets=}</option>
|
||||
<option value="control">{=L:bc.menue.control=}</option>
|
||||
<option value="none">{=L:empty=}</option>
|
||||
</select></td>
|
||||
<td colspan="3">
|
||||
<select name="start_page" title="{=L:start_page=}">
|
||||
<option value="bouquets" selected="selected">{=L:bc.menue.bouquets=}</option>
|
||||
<option value="control">{=L:bc.menue.control=}</option>
|
||||
<option value="remote">{=L:bc.menue.remote=}</option>
|
||||
<option value="none">{=L:empty=}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Styles</td>
|
||||
<td>
|
||||
<select name="style" title="Style">
|
||||
{=script:Y_Tools style_get=}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
@@ -118,7 +153,6 @@ function do_init(){
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{=include-block:Y_Blocks.txt;management_check_bottom=}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
version=2.9.0.7
|
||||
date=25.02.2015
|
||||
version=2.9.0.8
|
||||
date=01.03.2015
|
||||
type=Release
|
||||
info=Port CST
|
||||
|
@@ -5,6 +5,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>yWeb</title>
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_Dist.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Y_User.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -7,48 +7,40 @@
|
||||
. ./_Y_Globals.sh
|
||||
. ./_Y_Library.sh
|
||||
# ===========================================================
|
||||
# Settings : Skins
|
||||
# Settings : Styles
|
||||
# ===========================================================
|
||||
# -----------------------------------------------------------
|
||||
# Skin List [Function inactive]
|
||||
# Style List
|
||||
# -----------------------------------------------------------
|
||||
skin_get()
|
||||
style_get()
|
||||
{
|
||||
check_Y_Web_conf
|
||||
active_skin=`config_get_value_direct $y_config_Y_Web 'skin'`
|
||||
active_style=`config_get_value_direct $y_config_Y_Web 'style'`
|
||||
html_option_list=""
|
||||
skin_list=`find $y_path_httpd -name 'Y_Main-*'`
|
||||
for f in $skin_list
|
||||
style_list=`find $y_path_httpd/styles -name 'Y_Dist-*'`
|
||||
for f in $style_list
|
||||
do
|
||||
skin=`echo "$f"|sed -e s/^.*Y_Main-//g|sed -e s/.css//g`
|
||||
if [ "$skin" = "$active_skin" ]
|
||||
style=$(echo "$f" | sed -e s/^.*Y_Dist-//g | sed -e s/.css//g)
|
||||
sname=${style//_/ } # replace '_' with ' '
|
||||
if [ "$style" = "$active_style" ]
|
||||
then
|
||||
selec="selected"
|
||||
sel="selected='selected'"
|
||||
else
|
||||
selec=""
|
||||
sel=""
|
||||
fi
|
||||
opt="<option $selec value='$skin'>$skin</option>"
|
||||
opt="<option value='$style' $sel>$sname</option>"
|
||||
html_option_list="$html_option_list $opt"
|
||||
done
|
||||
echo "$html_option_list"
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
# Set Skin: override css $1=Skin-Name [Function inactive]
|
||||
# Set Style: override Y_Main.css $1=Style-Name
|
||||
# -----------------------------------------------------------
|
||||
skin_set()
|
||||
style_set()
|
||||
{
|
||||
cd $y_path_httpd
|
||||
cp Y_Main-$1.css Y_Main.css
|
||||
if [ -e global-$1.css ]
|
||||
then
|
||||
cp global-$1.css global.css
|
||||
else
|
||||
cp global-Standard.css global.css
|
||||
fi
|
||||
config_set_value_direct $y_config_Y_Web 'skin' $1
|
||||
|
||||
msg="Skin changed - Now browsers Refresh/actualization explain"
|
||||
y_format_message_html
|
||||
cp styles/Y_Dist-$1.css Y_Dist.css
|
||||
#config_set_value_direct $y_config_Y_Web 'style' $1
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
# Image Backup - build form
|
||||
@@ -366,6 +358,7 @@ do_installer()
|
||||
then
|
||||
echo '<html><head>'
|
||||
echo '<link rel="stylesheet" type="text/css" href="/Y_Main.css">'
|
||||
echo '<link rel="stylesheet" type="text/css" href="/Y_Dist.css">'
|
||||
echo '<link rel="stylesheet" type="text/css" href="/Y_User.css">'
|
||||
echo "<meta http-equiv='refresh' content='0; $y_out_html'>"
|
||||
echo '</head>'
|
||||
@@ -375,6 +368,7 @@ do_installer()
|
||||
else
|
||||
echo '<html><head>'
|
||||
echo '<link rel="stylesheet" type="text/css" href="/Y_Main.css">'
|
||||
echo '<link rel="stylesheet" type="text/css" href="/Y_Dist.css">'
|
||||
echo '<link rel="stylesheet" type="text/css" href="/Y_User.css">'
|
||||
echo '</head>'
|
||||
echo '<body>'
|
||||
@@ -531,8 +525,8 @@ restart_neutrino()
|
||||
#debug
|
||||
# echo "call:$*" >> "/tmp/debug.txt"
|
||||
case "$1" in
|
||||
skin_set) skin_set $2 ;;
|
||||
skin_get) skin_get ;;
|
||||
style_set) style_set $2 ;;
|
||||
style_get) style_get ;;
|
||||
image_upload) image_upload ;;
|
||||
image_backup) image_backup_mtd $2; echo "/tmp/flash_mtd$2.img" ;;
|
||||
image_flash) shift 1; flash_mtd $* ;;
|
||||
|
@@ -74,6 +74,7 @@ y_format_message_html()
|
||||
{
|
||||
tmp="<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_Main.css'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_Dist.css'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_User.css'></head>"
|
||||
tmp="$tmp <body><div class='work_box'><div class='work_box_head'><div class='work_box_head_h2'>Results</div></div><div class='work_box_body' style='overflow:auto'>"
|
||||
tmp="$tmp <pre>\n$msg\n</pre></div></div></body></html>"
|
||||
@@ -85,6 +86,7 @@ y_format_message_html2()
|
||||
{
|
||||
tmp="<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_Main.css'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_Dist.css'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_User.css'></head>"
|
||||
tmp="$tmp <body><div class='work_box'><div class='work_box_head'><div class='work_box_head_h2'>Results</div></div><div class='work_box_body'>"
|
||||
tmp="$tmp $msg</div></div></body></html>"
|
||||
@@ -94,6 +96,7 @@ y_format_message_html_plain()
|
||||
{
|
||||
tmp="<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_Main.css'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_Dist.css'>"
|
||||
tmp="$tmp <link rel='stylesheet' type='text/css' href='/Y_User.css'></head>"
|
||||
tmp="$tmp <body>$msg</body></html>"
|
||||
echo "$tmp"
|
||||
|
6
src/nhttpd/web/styles/Y_Dist-Original_yWeb.css
Normal file
6
src/nhttpd/web/styles/Y_Dist-Original_yWeb.css
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
Original yWeb Style - Do not modify.
|
||||
|
||||
When you're a distributor, use your own styles/Y_Dist-<name>.css file.
|
||||
When you're a user, use Y_User.css.
|
||||
*/
|
Reference in New Issue
Block a user