- yWeb: add filemanager

This commit is contained in:
svenhoefer
2015-02-25 21:42:20 +01:00
parent 24c4f5c0cd
commit 1cc2bdaaa9
39 changed files with 49 additions and 353 deletions

View File

@@ -91,3 +91,11 @@ install_DATA = channels.js \
ywidget.css \ ywidget.css \
ywidget.js \ ywidget.js \
Y_yweb.js Y_yweb.js
# file manager
install_DATA += accordion.js \
effects.js \
Y_Filemgr.css \
Y_Filemgr.yhtm \
Y_Filemgr_Edit.yhtm \
Y_Filemgr_blocks.txt

View File

@@ -1,5 +1,5 @@
{=include-block:Y_Blocks.txt;head=} {=include-block:Y_Blocks.txt;head=}
<link rel="stylesheet" type="text/css" href="/Y_Ext_Filemgr.css"/> <link rel="stylesheet" type="text/css" href="/Y_Filemgr.css"/>
<script type="text/javascript" src="/Y_Baselib.js"></script> <script type="text/javascript" src="/Y_Baselib.js"></script>
<script type="text/javascript" src="/prototype.js"></script> <script type="text/javascript" src="/prototype.js"></script>
<script type="text/javascript" src="/effects.js"></script> <script type="text/javascript" src="/effects.js"></script>
@@ -553,7 +553,7 @@ function do_download(){
} }
function do_edit(){ function do_edit(){
if($F('ftype') != "d") if($F('ftype') != "d")
window.open("/Y_Ext_Filemgr_Edit.yhtm?file="+explorer.build_fname(),"edit", "width=800,height=600,resizable=yes"); window.open("/Y_Filemgr_Edit.yhtm?file="+explorer.build_fname(),"edit", "width=800,height=600,resizable=yes");
else else
alert("you can not edit a directory"); alert("you can not edit a directory");
} }
@@ -693,7 +693,7 @@ function ni() {
<tr><td align="right"> <tr><td align="right">
<input type="hidden" name="dummy" value="/"/> <input type="hidden" name="dummy" value="/"/>
<input type="hidden" name="path" value="/"/> <input type="hidden" name="path" value="/"/>
<input type="hidden" name="tmpl" value="/Y_Ext_Filemgr.yhtm"/> <input type="hidden" name="tmpl" value="/Y_Filemgr.yhtm"/>
<input type="hidden" name="execute" value=""/> <input type="hidden" name="execute" value=""/>
<input type="button" value="upload" name="su" onclick="do_upload()"/> <input type="button" value="upload" name="su" onclick="do_upload()"/>

View File

@@ -1,5 +1,5 @@
{=include-block:Y_Blocks.txt;head=} {=include-block:Y_Blocks.txt;head=}
<link rel="stylesheet" type="text/css" href="/Y_Ext_Filemgr.css"/> <link rel="stylesheet" type="text/css" href="/Y_Filemgr.css"/>
<script type="text/javascript" src="/Y_Baselib.js"></script> <script type="text/javascript" src="/Y_Baselib.js"></script>
<script type="text/javascript" src="/prototype.js"></script> <script type="text/javascript" src="/prototype.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@@ -56,9 +56,9 @@ function ni(){
<td title="close without save"><a href='javascript:window.close()'><img src="/images/cross.png"/></a></td> <td title="close without save"><a href='javascript:window.close()'><img src="/images/cross.png"/></a></td>
</tr> </tr>
</table> </table>
<form name="f" accept-charset="UTF-8" action="/y/cgi?execute=include-block:Y_Ext_Filemgr_blocks.txt;edit_save_settings;nix" method="POST"> <form name="f" accept-charset="UTF-8" action="/y/cgi?execute=include-block:Y_Filemgr_blocks.txt;edit_save_settings;nix" method="POST">
<textarea id="txt" name="editfile" cols="100" rows="31" wrap="off" title="Editor" style="width:100%;background : white; font : 'Courier New',medium monospace; color : #333333;">{=include:{=file=}=}</textarea> <textarea id="txt" name="editfile" cols="100" rows="31" wrap="off" title="Editor" style="width:100%;background : white; font : 'Courier New',medium monospace; color : #333333;">{=include:{=file=}=}</textarea>
<input type="hidden" name="tmpl" value="Y_Ext_Filemgr_Edit.yhtm"/> <input type="hidden" name="tmpl" value="Y_Filemgr_Edit.yhtm"/>
<input type="hidden" name="file" value="{=file=}"/> <input type="hidden" name="file" value="{=file=}"/>
</form> </form>
</div> </div>

View File

@@ -23,7 +23,6 @@ function init(){
<div class="y_menu_sec_section">{=L:main.tools=}</div> <div class="y_menu_sec_section">{=L:main.tools=}</div>
<div class="y_menu_sec"> <div class="y_menu_sec">
<ul id="secmenu_tools"> <ul id="secmenu_tools">
{=if-not-equal:{=global-var-get:boxtype=}~coolstreamm~
<li> <li>
{=if-empty:{=var-get:automount=}~ {=if-empty:{=var-get:automount=}~
<a href="javascript:void(0)" class="disabled" title="{=L:tools.not_installed=}">{=L:tools.automount=}</a> <a href="javascript:void(0)" class="disabled" title="{=L:tools.not_installed=}">{=L:tools.automount=}</a>
@@ -40,7 +39,12 @@ function init(){
{=var-set:m_link_text={=L:tools.mounts=}=} {=var-set:m_link_text={=L:tools.mounts=}=}
{=include-block:Y_Blocks.txt;management_link=} {=include-block:Y_Blocks.txt;management_link=}
</li> </li>
~=} <li>
{=var-set:m_link_href=Y_Filemgr.yhtm=}
{=var-set:m_link_desc={=L:tools.filemgr_desc=}=}
{=var-set:m_link_text={=L:tools.filemgr=}=}
{=include-block:Y_Blocks.txt;management_link=}
</li>
<li> <li>
{=if-empty:{=var-get:ether-wake=}~ {=if-empty:{=var-get:ether-wake=}~
<a href="javascript:void(0)" class="disabled" title="{=L:tools.not_installed=}">{=L:tools.wake_on_lan=}</a> <a href="javascript:void(0)" class="disabled" title="{=L:tools.not_installed=}">{=L:tools.wake_on_lan=}</a>

View File

@@ -1,4 +1,4 @@
version=2.8.0.67 version=2.8.0.68
date=05.12.2014 date=25.02.2015
type=Release type=Release
info=Port CST info=Port CST

View File

@@ -1,44 +0,0 @@
# ===========================================================
# yWeb SDK: Extention Unnstaller Include
# Extention Name: filemgr
# by yjogol
# -----------------------------------------------------------
# $Date: 2007-12-29 17:08:16 $
# $Revision: 1.3 $
# ===========================================================
yI_updatename="yWeb-Extension filemgr (02.02.2008)"
yI_Ext_Tag="filemgr"
yI_Ext_Version="1-0-0"
yI_uninstall_log="$y_path_tmp/uninstall_filemgr.log"
yI_uninstaller="filemgr_uninstall.inc"
uninstall()
{
rm $y_ywebover_dir/Y_Ext_Filemgr.yhtm
rm $y_ywebover_dir/Y_Ext_Filemgr.css
rm $y_ywebover_dir/Y_Ext_Filemgr_Edit.yhtm
rm $y_ywebover_dir/Y_Ext_Filemgr_blocks.txt
# rm $y_ywebover_dir/accordion.js
# rm $y_ywebover_dir/effects.js
rm $y_ywebover_dir/scripts/Y_NAS*
rm $y_ywebover_dir/images/chmod.png
rm $y_ywebover_dir/images/copy.gif
rm $y_ywebover_dir/images/cut.png
# rm $y_ywebover_dir/images/delete.gif
rm $y_ywebover_dir/images/dir_up.gif
rm $y_ywebover_dir/images/download.png
rm $y_ywebover_dir/images/folder_add.png
rm $y_ywebover_dir/images/ftype_file.png
rm $y_ywebover_dir/images/ftype_folder.png
rm $y_ywebover_dir/images/ftype_link.png
rm $y_ywebover_dir/images/home.png
rm $y_ywebover_dir/images/package.png
rm $y_ywebover_dir/images/page_edit.png
rm $y_ywebover_dir/images/paste.gif
rm $y_ywebover_dir/images/picture.png
rm $y_ywebover_dir/images/rename.gif
rm $y_ywebover_dir/images/text.png
rm $y_ywebover_dir/images/upload.png
rm $y_ywebover_dir/images/work.gif
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

View File

@@ -1,20 +0,0 @@
# ===========================================================
# yWeb SDK: Extention Installer Include
# Extention Name: filemgr
# by yjogol
# -----------------------------------------------------------
# $Date: 2007-12-29 10:11:37 $
# $Revision: 1.2 $
# ===========================================================
yI_updatename="yWeb-Extension filemgr (02.02.2008)"
yI_Ext_Tag="filemgr"
yI_Ext_Version="1-0-0"
yI_install_log="$y_path_tmp/install_filemgr.log"
yI_uninstaller="filemgr_uninstall.sh"
install()
{
cp -r /tmp/files/httpd/* $y_ywebover_dir
chmod 755 $y_ywebover_dir/scripts/*.sh
}

View File

@@ -1,143 +0,0 @@
# ===========================================================
# yWeb Extension: Install an Extension
# by yjogol
# -----------------------------------------------------------
# $Date: 2007-12-29 10:11:37 $
# $Revision: 1.3 $
# -----------------------------------------------------------
# Script starts in /tmp
# ===========================================================
# -----------------------------------------------------------
# Installer Configs
# -----------------------------------------------------------
yI_Version="$Revision: 1.3 $"
# -----------------------------------------------------------
# Dirs
# -----------------------------------------------------------
y_path_usrbin="/var/bin"
y_path_config="/var/tuxbox/config"
y_path_tmp="/tmp"
y_ywebover_dir="/var/httpd"
y_ext_conf_dir="$y_path_config/ext"
# -----------------------------------------------------------
# Files
# -----------------------------------------------------------
y_config_Y_Web="$y_path_config/Y-Web.conf"
y_config_nhttpd="$y_path_config/nhttpd.conf"
y_config_neutrino="$y_path_config/neutrino.conf"
y_upload_file="$y_path_tmp/upload.tmp"
# ===========================================================
# config-Dateien - lesen / schreiben
# (Zeilenformat: VarName=VarValue)
# ===========================================================
cfg=""
# -----------------------------------------------------------
# config-Datei lesen/cachen (Inhalt in $cfg)
# $1=config-Filename
# -----------------------------------------------------------
config_open()
{
cfg=""
cfg=`cat $1`
}
# -----------------------------------------------------------
# config-Datei schreiben (Inhalt in $cfg)
# $1=config-Filename
# -----------------------------------------------------------
config_write()
{
echo "$cfg" >$1
}
# -----------------------------------------------------------
# Variablenwert zurueckgeben (vorher open)
# $1=VarName
# -----------------------------------------------------------
config_get_value()
{
cmd="sed -n /^$1=/p"
tmp=`echo "$cfg" | $cmd`
cmd="sed -e s/^$1=//1"
tmp=`echo "$tmp" | $cmd`
echo $tmp
}
# -----------------------------------------------------------
# Variablenwert zurueckgeben (ohne open)
# $1=config-Filename
# $2=VarName
# -----------------------------------------------------------
config_get_value_direct()
{
config_open $1
config_get_value $2
}
# -----------------------------------------------------------
# Variablenwert setzen (vorher open)
# $1=VarName)
# $2=VarValue
# -----------------------------------------------------------
config_set_value()
{
tmp=`echo "$cfg" | sed -n "/^$1=.*/p"`
if [ "$tmp" = "" ]
then
cfg=`echo -e "$cfg\n$1=$2"`
else
cmd="sed -e s/^$1=.*/$1=$2/g"
cfg=`echo "$cfg" | $cmd`
fi
}
# -----------------------------------------------------------
# Variablenwert zurueckgeben (ohne open)
# $1=config-Filename
# $2=VarName)
# $3=VarValue
# -----------------------------------------------------------
config_set_value_direct()
{
config_open $1
config_set_value $2 $3
config_write $1
}
# ===========================================================
# Initialization
# ===========================================================
. ./install.inc
hp=`config_get_value_direct "$y_config_nhttpd" "WebsiteMain.override_directory"`
if [ "$hp" != "" ]; then
y_ywebover_dir=`echo "$hp"`
fi
mkdir -p $y_ywebover_dir
chmod -R oug+rw $y_ywebover_dir
# -----------------------------------------------------------
# prepare log
# -----------------------------------------------------------
date +%y%m%d_%H%M%S >"$yI_install_log"
echo "" >>yI_install_log
echo "installing $yI_updatename [$yI_Ext_Tag/$yI_Ext_Version]" >>"yI_install_log"
echo "installdir: $y_ywebover_dir"
# -----------------------------------------------------------
# Install (from install.inc)
# -----------------------------------------------------------
install
# -----------------------------------------------------------
# finishing
# -----------------------------------------------------------
mkdir -p $y_ext_conf_dir
chmod oug+rw $y_ext_conf_dir
chmod 755 ./uninstall*
cp ./uninstall.sh "$y_ext_conf_dir/"
cp ./*uninstall.inc "$y_ext_conf_dir/"
# -----------------------------------------------------------
# Clean Up
# -----------------------------------------------------------
cd /tmp
rm -r /tmp/files

View File

@@ -1,136 +0,0 @@
# ===========================================================
# yWeb Extension: Unnstall an Extension
# by yjogol
# -----------------------------------------------------------
# $Date: 2007-12-29 17:08:16 $
# $Revision: 1.4 $
# -----------------------------------------------------------
# Script starts in /tmp
# ===========================================================
# -----------------------------------------------------------
# Installer Configs
# -----------------------------------------------------------
yI_Version="$Revision: 1.4 $"
# -----------------------------------------------------------
# Dirs
# -----------------------------------------------------------
y_path_usrbin="/var/bin"
y_path_config="/var/tuxbox/config"
y_path_tmp="/tmp"
y_ywebover_dir="/var/httpd"
y_ext_conf_dir="$y_path_config/ext"
# -----------------------------------------------------------
# Files
# -----------------------------------------------------------
y_config_Y_Web="$y_path_config/Y-Web.conf"
y_config_nhttpd="$y_path_config/nhttpd.conf"
y_config_neutrino="$y_path_config/neutrino.conf"
y_upload_file="$y_path_tmp/upload.tmp"
# ===========================================================
# config-Dateien - lesen / schreiben
# (Zeilenformat: VarName=VarValue)
# ===========================================================
cfg=""
# -----------------------------------------------------------
# config-Datei lesen/cachen (Inhalt in $cfg)
# $1=config-Filename
# -----------------------------------------------------------
config_open()
{
cfg=""
cfg=`cat $1`
}
# -----------------------------------------------------------
# config-Datei schreiben (Inhalt in $cfg)
# $1=config-Filename
# -----------------------------------------------------------
config_write()
{
echo "$cfg" >$1
}
# -----------------------------------------------------------
# Variablenwert zurueckgeben (vorher open)
# $1=VarName
# -----------------------------------------------------------
config_get_value()
{
cmd="sed -n /^$1=/p"
tmp=`echo "$cfg" | $cmd`
cmd="sed -e s/^$1=//1"
tmp=`echo "$tmp" | $cmd`
echo $tmp
}
# -----------------------------------------------------------
# Variablenwert zurueckgeben (ohne open)
# $1=config-Filename
# $2=VarName
# -----------------------------------------------------------
config_get_value_direct()
{
config_open $1
config_get_value $2
}
# -----------------------------------------------------------
# Variablenwert setzen (vorher open)
# $1=VarName)
# $2=VarValue
# -----------------------------------------------------------
config_set_value()
{
tmp=`echo "$cfg" | sed -n "/^$1=.*/p"`
if [ "$tmp" = "" ]
then
cfg=`echo -e "$cfg\n$1=$2"`
else
cmd="sed -e s/^$1=.*/$1=$2/g"
cfg=`echo "$cfg" | $cmd`
fi
}
# -----------------------------------------------------------
# Variablenwert zurueckgeben (ohne open)
# $1=config-Filename
# $2=VarName)
# $3=VarValue
# -----------------------------------------------------------
config_set_value_direct()
{
config_open $1
config_set_value $2 $3
config_write $1
}
# ===========================================================
# Initialization
# ===========================================================
. $y_ext_conf_dir/$1
hp=`config_get_value_direct "$y_config_nhttpd" "WebsiteMain.override_directory"`
if [ "$hp" != "" ]; then
y_ywebover_dir=`echo "$hp"`
fi
mkdir -p $y_ywebover_dir
# -----------------------------------------------------------
# prepare log
# -----------------------------------------------------------
date +%y%m%d_%H%M%S >"$yI_uninstall_log"
echo "" >>"$yI_uninstall_log"
echo "uninstalling $yI_updatename [$yI_Ext_Tag/$yI_Ext_Version]" >>"$yI_uninstall_log"
#echo "installdir: $y_ywebover_dir"
# -----------------------------------------------------------
# Uninstall (from uninstal_<tag>.inc)
# -----------------------------------------------------------
uninstall
# -----------------------------------------------------------
# finishing
# -----------------------------------------------------------
rm $y_ext_conf_dir/$1
# -----------------------------------------------------------
# Clean Up
# -----------------------------------------------------------

View File

@@ -109,3 +109,23 @@ install_DATA = accept.png \
yjogol.gif \ yjogol.gif \
y.png \ y.png \
zap.png zap.png
# file manager
install_DATA += chmod.png \
copy.gif \
cut.png \
dir_up.gif \
download.png \
film.png \
folder_add.png \
ftype_file.png \
ftype_folder.png \
ftype_link.png \
home.png \
package.png \
page_edit.png \
paste.gif \
picture.png \
text.png \
upload.png \
work.gif

View File

Before

Width:  |  Height:  |  Size: 785 B

After

Width:  |  Height:  |  Size: 785 B

View File

Before

Width:  |  Height:  |  Size: 263 B

After

Width:  |  Height:  |  Size: 263 B

View File

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 648 B

View File

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 609 B

View File

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 523 B

View File

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 653 B

View File

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 668 B

View File

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 635 B

View File

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View File

Before

Width:  |  Height:  |  Size: 830 B

After

Width:  |  Height:  |  Size: 830 B

View File

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 806 B

View File

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 853 B

View File

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

View File

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

View File

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

View File

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

View File

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 516 B

View File

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 722 B

View File

@@ -420,6 +420,8 @@ tools.command=Kommando
tools.cmd.enter_command=Auszuführendes Kommando eingeben tools.cmd.enter_command=Auszuführendes Kommando eingeben
tools.cmd.execute_command=Kommando ausführen tools.cmd.execute_command=Kommando ausführen
tools.boot_logo=Boot Logo tools.boot_logo=Boot Logo
tools.filemgr_desc=Dateien und Verzeichnisse organisieren
tools.filemgr=Dateimanager
=========== LIVE Menue =========== LIVE Menue
live.heading=Live/Timer live.heading=Live/Timer

View File

@@ -423,6 +423,8 @@ tools.command=Command
tools.cmd.enter_command=enter command to execute tools.cmd.enter_command=enter command to execute
tools.cmd.execute_command=execute shell command tools.cmd.execute_command=execute shell command
tools.boot_logo=Boot Logo tools.boot_logo=Boot Logo
tools.filemgr_desc=organize files and directorys
tools.filemgr=File manager
=========== LIVE Menue =========== LIVE Menue
live.heading=Live/Timer live.heading=Live/Timer

View File

@@ -2,6 +2,9 @@ installdir = $(DATADIR)/neutrino/httpd/scripts
install_DATA= api.sh _Y_Globals.sh _Y_Library.sh Y_Live.sh Y_Tools.sh install_DATA= api.sh _Y_Globals.sh _Y_Library.sh Y_Live.sh Y_Tools.sh
# file manager
install_DATA += Y_NAS.sh
install-data-hook: install-data-hook:
chmod 0755 $(DESTDIR)$(DATADIR)/neutrino/httpd/scripts/api.sh chmod 0755 $(DESTDIR)$(DATADIR)/neutrino/httpd/scripts/api.sh
chmod 0755 $(DESTDIR)$(DATADIR)/neutrino/httpd/scripts/Y_*.sh chmod 0755 $(DESTDIR)$(DATADIR)/neutrino/httpd/scripts/Y_*.sh