lib/rwd/rwd.rb in bigtinker-0.95 vs lib/rwd/rwd.rb in bigtinker-0.96
- old
+ new
@@ -4,10 +4,12 @@
require "lib/rwd/browser"
require "lib/rwd/thread"
require "md5"
require "rbconfig"
+
+
begin
require "win32ole"
require "win32/registry"
rescue LoadError
$".push "win32ole.so"
@@ -48,10 +50,26 @@
Hash.file(rcfile).each do |k, v|
ENV[k] = v unless ENV.include?(k)
end
end
+if ENV["RWDTHEME"]
+ if ENV["RWDTHEME"] = "PDA"
+ load 'lib/rwdthemes/default.rwd'
+ end
+ if ENV["RWDTHEME"] = "DEFAULT"
+ $rwdtinkerlog.info "rwd: loading theme DEFAULT"
+
+ load 'lib/rwdthemes/default.rwd'
+ end
+ if ENV["RWDTHEME"] = "WINDOWSLOOKALIKE"
+ load 'lib/rwdthemes/windowslike.rwd'
+ end
+ else
+ load 'lib/rwdthemes/default.rwd'
+ end
+
ENV["RWDBROWSER"] = (ENV["RWDBROWSER"] or defaultbrowser) or puts "No browser found."
ENV["RWDPORTS"] = (ENV["RWDPORTS"] or "7701-7709")
ENV["RWDTHEME"] = (ENV["RWDTHEME"] or "DEFAULT")
#trap("INT") {puts "Terminating..." ; exit}
@@ -248,11 +266,11 @@
return res.join("\n")
end
end
class OpenTag
- def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
+ def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda=false)
bef = before[-1]
res << Format % ["Before", @subtype] if ($rwd_debug and not bef.nil?)
res << bef if not bef.nil?
res << Format % ["Pre", @subtype] if $rwd_debug
@@ -280,11 +298,11 @@
args = @args.deep_dup
args["nohelpbutton"] = (not help)
template = $rwd_html_1
- template = $rwd_html_PDA_1 if pda
+ # template = $rwd_html_PDA_1 if pda
res << (template(template, args))
when "p" then res << "<p #{align}>"
when "pre" then res << "<pre #{align}>"
when "big" then res << "<p #{align}><big>"
@@ -474,11 +492,11 @@
before.push(bef)
after.push(aft)
end
- def postchildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
+ def postchildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda=false)
case @subtype
when "vertical", "window", "helpwindow", "tab", "panel"
res << Format % ["BefPost", @subtype] if $rwd_debug
if @args.include?("spacing")
res << "<tr><td> </td></tr>" * (@args["spacing"].to_i)
@@ -616,11 +634,11 @@
res.join("\n")
end
end
class Text
- def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
+ def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda=false)
if not @text.scan(/[^ \t\r\n]/).empty?
res << Format % ["Text", ""] if $rwd_debug
res << "#{@text}"
end
end
@@ -664,75 +682,75 @@
firstaction = ""
html = []
vars = vars.deep_dup
-begin # error wrap
+ begin # error wrap
- vars.each do |key, value|
- if not key.empty?
- if value.respond_to? "to_s"
- @rwd.gsub!(/%%#{key}%%/, value.to_s)
- @rwd.gsub!(/%#{key}%/, value.to_s.to_html)
+ vars.each do |key, value|
+ if not key.empty?
+ if value.respond_to? "to_s"
+ @rwd.gsub!(/%%#{key}%%/, value.to_s)
+ @rwd.gsub!(/%#{key}%/, value.to_s.to_html)
- @helprwd.gsub!(/%%#{key}%%/, value.to_s)
- @helprwd.gsub!(/%#{key}%/, value.to_s.to_html)
+ @helprwd.gsub!(/%%#{key}%%/, value.to_s)
+ @helprwd.gsub!(/%#{key}%/, value.to_s.to_html)
- varshtml[key] = value.to_s.to_html
- varsstring[key] = value.to_s
- end
- end
- end
+ varshtml[key] = value.to_s.to_html
+ varsstring[key] = value.to_s
+ end
+ end
+ end
- windowobject = RWDTree.new(@rwd).children.dup.delete_if{|obj| obj.subtype != "window"}[0]
- helpobject = RWDTree.new(@helprwd).children.dup.delete_if{|obj| obj.subtype != "helpwindow"}[0]
+ windowobject = RWDTree.new(@rwd).children.dup.delete_if{|obj| obj.subtype != "window"}[0]
+ helpobject = RWDTree.new(@helprwd).children.dup.delete_if{|obj| obj.subtype != "helpwindow"}[0]
- tabsobj = windowobject.children.dup.delete_if{|obj| obj.subtype != "tabs"}[0]
+ tabsobj = windowobject.children.dup.delete_if{|obj| obj.subtype != "tabs"}[0]
- if not tabsobj.nil?
- tabs = tabsobj.children.dup.delete_if{|obj| (not obj.kind_of?(OpenTag)) or (obj.subtype != "tab")}
+ if not tabsobj.nil?
+ tabs = tabsobj.children.dup.delete_if{|obj| (not obj.kind_of?(OpenTag)) or (obj.subtype != "tab")}
- if tab.empty?
- tab = tabs[0].args["name"]
- end
+ if tab.empty?
+ tab = tabs[0].args["name"]
+ end
- tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["name"] != tab}
- end
+ tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["name"] != tab}
+ end
- if help
- helpobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, false, oneormorefields, firstaction, tabs, tab, pda)
- else
- windowobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, (not @helprwd.empty?), oneormorefields, firstaction, tabs, tab, pda)
- end
+ if help
+ helpobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, false, oneormorefields, firstaction, tabs, tab, pda)
+ else
+ windowobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, (not @helprwd.empty?), oneormorefields, firstaction, tabs, tab, pda)
+ end
- html = html.join("") # ???
+ html = html.join("") # ???
- html.gsub!(/%%*[[:alnum:]_\-]+%%*/, "") if not $rwd_debug
- html.gsub!(/%%/, "%")
- html.gsub!(/\n\n*/, "\n")
+ html.gsub!(/%%*[[:alnum:]_\-]+%%*/, "") if not $rwd_debug
+ html.gsub!(/%%/, "%")
+ html.gsub!(/\n\n*/, "\n")
- if oneormorefields.empty?
- focus = ""
- else
- focus = "document.bodyform.elements[0].focus();"
- end
+ if oneormorefields.empty?
+ focus = ""
+ else
+ focus = "document.bodyform.elements[0].focus();"
+ end
- firstaction = action if windowobject.args.keys.include?("refresh") unless action.nil?
+ firstaction = action if windowobject.args.keys.include?("refresh") unless action.nil?
- html.gsub!(/\$RWD_FIRSTACTION\$/ , firstaction)
- html.gsub!(/\$RWD_FOCUS\$/ , focus)
+ html.gsub!(/\$RWD_FIRSTACTION\$/ , firstaction)
+ html.gsub!(/\$RWD_FOCUS\$/ , focus)
- html
- end
+ html
+ end
rescue
- if $DEBUG
- $stderr.puts "error in RWDWindow - render method"
+ $rwdtinkerlog.error "error in RWDWindow - render method"
+
end
end
-end
+
class RWDMessage < RWDWindow
def initialize(msg)
super("<window title='RWD Message' nobackbuttons noclosebutton><p>#{msg}</p><back/></window>")
end
end
@@ -811,11 +829,13 @@
@rwd_server = RWDServer.new(self, port, io, auth, realm)
self
end
+
+
def render(res, path, post, download, downloadfile, pda, sessionid)
# Avoid a timeout.
@rwd_time = Time.now
@@ -843,12 +863,15 @@
# Copy the vars from the window to vars. vars wil later on be copied to instance variables.
post.sort.each do |key, value|
puts "Post: #{key} -> #{value.from_html.inspect}" if $rwd_debug
+ $rwdtinkerlog.info "Post: #{key} -> #{value.from_html.inspect}\n"
vars[key] = value.from_html
+ $rwdtinkerlog.info "rwd: #{value.from_html}\n"
+
end
# Stack handling for rwd_action, rwd_window and rwd_tab.
@rwd_action = vars["rwd_action"] if vars.include?("rwd_action")
@@ -912,18 +935,28 @@
vars["rwd_tab"] = @rwd_tab
# Copy vars from window to instance.
vars.each do |k, v|
- instance_eval "@#{k} = vars['#{k}']" if ((not k.empty?) and k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}"))
+ $rwdtinkerlog.info "rwd: Post: #{k} -> #{v}\n"
+
+ if ((not k.empty?) and k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}"))
+
+ instance_eval "@#{k} = ''"
+ instance_variable_set("@#{k}", vars.fetch("#{k}"))
+ $rwdtinkerlog.info "rwd: Post: #{k} -> #{v}\n"
+
+ end
end
# Callback.
if (not back) or @rwd_call_after_back.include?(@rwd_action)
unless @rwd_action =~ /^rwd_/
- puts "Method: #{@rwd_action}(#{@rwd_args.join(", ")})" if $rwd_debug
+
+ $rwdtinkerlog.debug "Method: #{@rwd_action}(#{@rwd_args})"
+
if methods.include?(@rwd_action)
method(@rwd_action).call(*@rwd_args)
else
puts "Method '%s' is not defined." % @rwd_action
end
@@ -989,14 +1022,14 @@
if @rwd_window.empty?
@rwd_window = "main"
end
res << RWDWindow.new($rwd_gui_tinker, @rwd_window).render(pda, @rwd_refresh_action, vars, @rwd_switches, help, @rwd_tab)
rescue
- if $DEBUG
- $stderr.puts "error in render"
+
+$rwdtinkerlog.error "rwd: error in render"
+
end
- end
end
end
end
end
@@ -1069,11 +1102,13 @@
unless @rwd_timeout_thread
@rwd_timeout_thread =
Thread.new do
loop do
if Time.now - @rwd_time > @rwd_timeout
- $stderr.puts "Exiting due to timeout (#{@rwd_timeout} seconds)."
+
+ $rwdtinkerlog.info "rwd: Exiting due to timeout (#{@rwd_timeout} seconds)."
+
exit 1
end
sleep interval
end
end
@@ -1149,11 +1184,11 @@
def touch
@lastaccess = Time.now
end
- def render(res, path, post, download, downloadfile, pda)
+ def render(res, path, post, download, downloadfile, pda=false)
done = self["object"].render(res, path, post, download, downloadfile, pda, @sessionid)
res.gsub!(/\$RWD_SESSION\$/, done ? "" : "#{@sessionid}")
return done
@@ -1176,11 +1211,12 @@
# Start browser.
@browserthread =
Thread.new do
- puts "Starting the browser..."
+ $rwdtinkerlog.warn "rwd: Starting the browser..."
+
#if ENV["RWDBROWSER"].downcase =~ /iexplore/ # ???
#@ie = IE.new("http://localhost:#{port}/")
#else
browser = ENV["RWDBROWSER"].dup
@@ -1190,11 +1226,11 @@
command = "%s \"%s\"" % [browser, url]
command = browser.gsub(re, url) if browser =~ re
command.gsub!(/%port%/, port.to_s)
- system(command) or $stderr.puts "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}"
+ system(command) or $rwdtinkerlog.error "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}"
#end
puts "The browser has terminated."
end
end
@@ -1301,12 +1337,12 @@
resp["Content-Disposition"] = "attachment; filename=%s" % downloadfile unless downloadfile.empty?
resp << download
end
rescue
- puts "Sending response to browser failed."
-
+
+ $rwdtinkerlog.error "rwd: Sending response to browser failed."
@sessions.delete(session.sessionid)
end
# Eventually delete this session.
@@ -1316,12 +1352,13 @@
if @localbrowsing
resp.stop
if @browserstarted and not @browserthread.nil? and @browserthread.alive?
resp.stop do
- puts "Waiting for the browser to terminate..."
-
+
+ $rwdtinkerlog.warn "rwd: Waiting for the browser to terminate..."
+
@browserthread.join
end
end
end
end
@@ -1362,567 +1399,12 @@
end
end
end
end
-$rwd_html["DEFAULT"] = "
-<!-- Generated by RubyWebDialog. -->
-<!-- For more information, please contact Erik Veenstra <rwd@erikveen.dds.nl>. -->
-<html>
- <head>
- <title>%TITLE%</title>
- <meta http-equiv='Content-Type' content='text/html; charset=%CHARSET%'>
- <meta http-equiv='Content-Style-Type' content='text/html ; charset=UTF-8'>
- <meta http-equiv='Refresh' content='%REFRESH%, javascript:document.bodyform.submit();'>
- <link rel='shortcut icon' href='%LOGO%'>
-
- <style type='text/css'>
- <!--
-
- body {
- background : url(%WATERMARK%) white center center no-repeat fixed;
- }
-
- a {
- text-decoration : none;
- }
-
- a:hover {
- background : #AAAAAA;
- }
-
- td.panel1 {
- border-color : #888888 #EEEEEE #EEEEEE #888888;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel2 {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel1high {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel2high {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : none none none none;
- }
-
- td.panel1low {
- border-color : #888888 #EEEEEE #EEEEEE #888888;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel2low {
- border-color : #888888 #EEEEEE #EEEEEE #888888;
- border-width : 1pt;
- border-style : none none none none;
- }
-
- td.tabblad {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : none solid solid solid;
- }
-
- td.passivetab {
- background-color : #BBBBBB;
- border-color : #DDDDDD #DDDDDD #EEEEEE #DDDDDD;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.activetab {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : solid solid none solid;
- }
-
- td.notab {
- border-color : #EEEEEE #EEEEEE #EEEEEE #EEEEEE;
- border-width : 1pt;
- border-style : none none solid none;
- }
-
- //-->
- </style>
-
- <script type='text/javascript'>
- <!--
- function BodyGo() {
- $RWD_FOCUS$
- }
- //-->
- </script>
- </head>
-
- <body bgcolor='white' onload='BodyGo()' link='#000000' vlink='#000000' alink='#000000'>
- <form name='bodyform' action='/' method='post'>
- <table align='center' border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>
- <tr align='center' valign='middle'>
- <td align='center'>
-
- <table align='center' border='0' cellspacing='0' cellpadding='0'>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
-
- <td align='center'>
-
- <table align='center' border='0' cellspacing='0' cellpadding='0' %WIDTH1%>
- <tr align='center'>
- <td align='center' bgcolor='#444488'>
-
- <table align='left' border='0' cellspacing='1' cellpadding='0'>
- <tr align='center'>
- <td align='border'><img src='%LOGO%' width='14' height='14'></td>
- <td align='center'><b><small><font color='#FFFFFF'> %TITLE% </font></small></b></td>
- </tr>
- </table>
-
- <table align='right' border='0' cellspacing='1' cellpadding='0'>
- <tr align='center'>
- <!-- %HELPBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_help\";document.bodyform.submit();'> ? </a></small></b></td>
- <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_main\";document.bodyform.submit();'> << </a></small></b></td>
- <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_back\";document.bodyform.submit();'> < </a></small></b></td>
- <!-- %CLOSEBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_quit\";document.bodyform.submit();'> X </a></small></b></td>
- </tr>
- </table>
-
- </td>
- </tr>
-
- <tr align='center'>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='%WIDTH2%'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' bgcolor='#CCCCCC'>
- <table align='center' border='0' cellspacing='3' cellpadding='0'>
- %BODY%
- </table>
-
- <input name='rwd_action' value='$RWD_FIRSTACTION$' type='hidden'>
- <input name='rwd_session' value='$RWD_SESSION$' type='hidden'>
- </td>
- </tr>
- </table>
-
- </td>
-
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
- </tr>
-
- </table>
-
- </td>
- </tr>
- </table>
- </form>
- </body>
-</html>
-"
-
-$rwd_html["WINDOWSLOOKALIKE"] = "
-<!-- Generated by RubyWebDialog. -->
-<!-- For more information, please contact Erik Veenstra <rwd@erikveen.dds.nl>. -->
-<html>
- <head>
- <title>%TITLE%</title>
-
- <meta http-equiv='Content-Type' content='text/html; charset=%CHARSET%'>
- <meta http-equiv='Content-Style-Type' content='text/css; charset=UTF-8' >
- <meta http-equiv='Refresh' content='%REFRESH%, javascript:document.bodyform.submit();'>
-
- <link rel='shortcut icon' href='%LOGO%'>
-
- <style type='text/css'>
- <!--
-
- body {
- background : url(%WATERMARK%) white center center no-repeat fixed;
- }
-
- a {
- text-decoration : none;
- }
-
- a:hover {
- background : #AAAAAA;
- }
-
- td.window {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 3pt;
- border-style : solid solid solid solid;
- }
-
- td.panel1 {
- border-color : #888888 #EEEEEE #EEEEEE #888888;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel2 {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel1high {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel2high {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : none none none none;
- }
-
- td.panel1low {
- border-color : #888888 #EEEEEE #EEEEEE #888888;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.panel2low {
- border-color : #888888 #EEEEEE #EEEEEE #888888;
- border-width : 1pt;
- border-style : none none none none;
- }
-
- td.tabblad {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : none solid solid solid;
- }
-
- td.passivetab {
- background-color : #BBBBBB;
- border-color : #DDDDDD #DDDDDD #EEEEEE #DDDDDD;
- border-width : 1pt;
- border-style : solid solid solid solid;
- }
-
- td.activetab {
- border-color : #EEEEEE #888888 #888888 #EEEEEE;
- border-width : 1pt;
- border-style : solid solid none solid;
- }
-
- td.notab {
- border-color : #EEEEEE #EEEEEE #EEEEEE #EEEEEE;
- border-width : 1pt;
- border-style : none none solid none;
- }
-
- //-->
- </style>
-
- <script type='text/javascript'>
- <!--
- function BodyGo() {
- $RWD_FOCUS$
- }
- //-->
- </script>
- </head>
-
- <body bgcolor='white' onload='BodyGo()' link='#000000' vlink='#000000' alink='#000000'>
- <form name='bodyform' action='/' method='post'>
- <table align='center' border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>
- <tr align='center' valign='middle'>
- <td align='center'>
-
- <table align='center' border='0' cellspacing='0' cellpadding='0'>
-
- <tr align='center'>
- <td align='center' class='window'>
-
- <table align='center' border='0' cellspacing='0' cellpadding='0' %WIDTH1%>
- <tr align='center'>
- <td align='center' bgcolor='#444488'>
-
- <table align='left' border='0' cellspacing='1' cellpadding='0'>
- <tr align='center'>
- <td align='border'><img src='%LOGO%' width='14' height='14'></td>
- <td align='center'><b><small><font color='#FFFFFF'> %TITLE% </font></small></b></td>
- </tr>
- </table>
-
- <table align='right' border='0' cellspacing='1' cellpadding='0'>
- <tr align='center'>
- <!-- %HELPBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_help\";document.bodyform.submit();'> ? </a></small></b></td>
- <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_main\";document.bodyform.submit();'> << </a></small></b></td>
- <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_back\";document.bodyform.submit();'> < </a></small></b></td>
- <!-- %CLOSEBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_quit\";document.bodyform.submit();'> X </a></small></b></td>
- </tr>
- </table>
-
- </td>
- </tr>
-
- <tr align='center'>
- <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='%WIDTH2%'></td>
- </tr>
-
- <tr align='center'>
- <td align='center' bgcolor='#CCCCCC'>
- <table align='center' border='0' cellspacing='3' cellpadding='0'>
- %BODY%
- </table>
-
- <input name='rwd_action' value='$RWD_FIRSTACTION$' type='hidden'>
- <input name='rwd_session' value='$RWD_SESSION$' type='hidden'>
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-
- </table>
-
- </td>
- </tr>
- </table>
- </form>
- </body>
-</html>
-"
-
-$rwd_html["PDA"] = "
-<!-- Generated by RubyWebDialog. -->
-<!-- For more information, please contact Erik Veenstra <rwd@erikveen.dds.nl>. -->
-<html>
- <head>
- <title>%TITLE%</title>
-
- <meta http-equiv='Content-Type' content='text/html; charset=%CHARSET%'>
- <meta http-equiv='Refresh' content='%REFRESH%, javascript:document.bodyform.submit();'>
-
- <link rel='shortcut icon' href='%LOGO%'>
-
- <script type='text/javascript'>
- <!--
- function BodyGo() {
- $RWD_FOCUS$
- }
- //-->
- </script>
- </head>
-
- <body bgcolor='white' onload='BodyGo()' link='#000000' vlink='#000000' alink='#000000'>
- <form name='bodyform' action='/' method='post'>
- <table align='center' border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>
-
- <tr align='center'>
- <td align='center' bgcolor='#444488'>
-
- <table align='left' border='0' cellspacing='1' cellpadding='0'>
- <tr align='center'>
- <td align='border'><img src='%LOGO%' width='14' height='14'></td>
- <td align='center'><b><small><font color='#FFFFFF'> %TITLE% </font></small></b></td>
- </tr>
- </table>
-
- <table align='right' border='0' cellspacing='1' cellpadding='0'>
- <tr align='center'>
- <!-- %HELPBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_help\";document.bodyform.submit();'> ? </a></small></b></td>
- <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_main\";document.bodyform.submit();'> << </a></small></b></td>
- <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_back\";document.bodyform.submit();'> < </a></small></b></td>
- <!-- %CLOSEBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_quit\";document.bodyform.submit();'> X </a></small></b></td>
- </tr>
- </table>
-
- </td>
- </tr>
-
- <!--
- <tr align='center'>
- <td align='center' bgcolor='#FFFFFF'> </td>
- </tr>
- -->
-
- <tr align='center'>
- <td align='center' bgcolor='#FFFFFF'>
-
- <table align='center' border='0' cellspacing='0' cellpadding='0'>
- %BODY%
- </table>
-
- <input name='rwd_action' value='$RWD_FIRSTACTION$' type='hidden'>
- <input name='rwd_session' value='$RWD_SESSION$' type='hidden'>
- </td>
- </tr>
-
- </table>
- </form>
- </body>
-</html>
-"
-
$rwd_pixel = "
R0lGODlhAQABAMIAAAAAAP///+7u7kREiP///////////////yH5BAEKAAMA
LAAAAAABAAEAAAMCOAkAOw==
".unpack("m").shift
@@ -1932,11 +1414,12 @@
jefB+oo6l6AxBAx7M2HRePQph5xga0RsJqfELPI2DSUAADs=
".unpack("m").shift
$rwd_html_1, $rwd_html_2 = $rwd_html[ENV["RWDTHEME"]].split(/^\s*%BODY%\s*\r*$/)
-$rwd_html_PDA_1, $rwd_html_PDA_2 = $rwd_html["PDA"].split(/^\s*%BODY%\s*\r*$/)
-
+#if ENV["RWDTHEME"] == "PDA"
+#$rwd_html_PDA_1, $rwd_html_PDA_2 = $rwd_html["PDA"].split(/^\s*%BODY%\s*\r*$/)
+#end
#end
#
#class RWDialog < RWD::RWDialog
#end