aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/xml_tables.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/xml_tables.rb')
-rw-r--r--lib/sisu/v6/xml_tables.rb24
1 files changed, 15 insertions, 9 deletions
diff --git a/lib/sisu/v6/xml_tables.rb b/lib/sisu/v6/xml_tables.rb
index eedd74d5..468963ff 100644
--- a/lib/sisu/v6/xml_tables.rb
+++ b/lib/sisu/v6/xml_tables.rb
@@ -58,13 +58,11 @@
=end
module SiSU_Tables
- require_relative 'defaults' # defaults.rb
- include SiSU_Viz
class Table #_xml
@@tablehead=0
@@tablefoot=[] #watch #bug??? #check was @@tablefoot
def initialize(one,ocn='')
- @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Viz::Defaults.new
+ @one,@parablock,@ocn=one,one,ocn
end
def table_split #% used but, no longer operational, revisit
@new_content=[]
@@ -79,7 +77,7 @@ module SiSU_Tables
@@tablehead=0
@@tablefoot=[]
def initialize(one,ocn='')
- @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Viz::Defaults.new
+ @one,@parablock,@ocn=one,one,ocn
end
def table
m=@parablock[/<!f(.+?)!>/,1]
@@ -124,7 +122,6 @@ module SiSU_Tables
@@tablefoot=[] #watch
def initialize(table,id='')
@table_obj,@id=table,id
- @vz=SiSU_Viz::Defaults.new
end
def spaces
Ax[:spaces]
@@ -181,7 +178,14 @@ module SiSU_Tables
@@tablehead=0
@@tablefoot=[]
def initialize(one)
- @one,@parablock,@vz=one,one,SiSU_Viz::Defaults.new
+ @one,@parablock=one,one
+ end
+ def table_close
+ '</td></tr>
+</table>'
+ end
+ def margin_numless
+ '</td><td width="4%" align="right" valign="top">'
end
def table_head(inf)
%{<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
@@ -193,7 +197,7 @@ module SiSU_Tables
<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">}
end
def table_end(tablefoot='')
- %{</table>#{@vz.margin_numless}#{@vz.margin_numless}&nbsp;#{@vz.table_close}
+ %{</table>#{the_margin_numless}#{the_margin_numless}&nbsp;#{the_table_close}
#{tablefoot}}
end
def table_row(inf,h=false)
@@ -216,13 +220,15 @@ module SiSU_Tables
@@tablefoot << m if m
@parablock=@parablock.gsub(/<!f.+?!>/,'')
@@tablehead=1 if @parablock =~/#{Mx[:gr_o]}Th#{Mx[:tc_p]}/u
- if @parablock =~/#{Mx[:gr_o]}Th?#{Mx[:tc_p]}.+?#{Mx[:tc_p]}~(\d+);\w\d+;\w\d+#{Mx[:gr_c]}/u; @parablock=table_head($1)
+ if @parablock =~/#{Mx[:gr_o]}Th?#{Mx[:tc_p]}.+?#{Mx[:tc_p]}~(\d+);\w\d+;\w\d+#{Mx[:gr_c]}/u
+ @parablock=table_head($1)
end
if @parablock =~/#{Mx[:gr_o]}TZ#{Mx[:gr_c]}/
tablefoot=[]
@@tablefoot.each {|x| tablefoot << ''}
@@tablefoot=[]
- if @parablock =~/#{Mx[:gr_o]}TZ#{Mx[:gr_c]}/; @parablock=table_end
+ if @parablock =~/#{Mx[:gr_o]}TZ#{Mx[:gr_c]}/
+ @parablock=table_end
end
end
if @@tablehead==1