mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
Javascripting support for FHEMWEB
git-svn-id: https://svn.fhem.de/fhem/trunk@438 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6d94e14344
commit
c889ef8163
@ -529,3 +529,4 @@
|
||||
- feature: CUL: device acces code reorganized, TCP/IP support added
|
||||
- feature: Pachube module from Axel
|
||||
- feature: dumpdef module from Axel in contrib
|
||||
- feature: javascripting support in FHEMWEB (Klaus/Axel)
|
||||
|
@ -229,12 +229,14 @@ FW_AnswerCall($)
|
||||
close(FH);
|
||||
$__RETTYPE = "text/plain; charset=ISO-8859-1" if($f !~ m/\.*html$/);
|
||||
return 1;
|
||||
|
||||
} elsif($arg =~ m,^$__ME/(.*).css,) {
|
||||
open(FH, "$__dir/$1.css") || return;
|
||||
pO join("", <FH>);
|
||||
close(FH);
|
||||
$__RETTYPE = "text/css";
|
||||
return 1;
|
||||
|
||||
} elsif($arg =~ m,^$__ME/icons/(.*)$,) {
|
||||
open(FH, "$__dir/$1") || return;
|
||||
binmode (FH); # necessary for Windows
|
||||
@ -243,9 +245,18 @@ FW_AnswerCall($)
|
||||
my @f_ext = split(/\./,$1); #kpb
|
||||
$__RETTYPE = "image/$f_ext[-1]";
|
||||
return 1;
|
||||
|
||||
} elsif($arg =~ m,^$__ME/(.*).js,) { #kpb java include
|
||||
open(FH, "$__dir/$1.js") || return;
|
||||
pO join("", <FH>);
|
||||
close(FH);
|
||||
$__RETTYPE = "application/javascript";
|
||||
return 1;
|
||||
|
||||
} elsif($arg !~ m/^$__ME(.*)/) {
|
||||
Log(5, "Unknown document $arg requested");
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
##############################
|
||||
|
Loading…
x
Reference in New Issue
Block a user