aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/xml_tables.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-10-12 10:52:35 -0400
committerRalph Amissah <ralph@amissah.com>2014-10-12 10:52:35 -0400
commit32fd8f3908bc8632e2d8ab4d872f6e4362fe031b (patch)
tree8094371a7fd511409992200f4b7c1cb4c33582d6 /lib/sisu/v5/xml_tables.rb
parentv6: '*_parts', remove defaults.rb & some relics related to sisu skins, long gone (diff)
v5: merge v6: remove defaults.rb & some relics related to sisu skinssisu_5.7.0
Diffstat (limited to 'lib/sisu/v5/xml_tables.rb')
-rw-r--r--lib/sisu/v5/xml_tables.rb24
1 files changed, 15 insertions, 9 deletions
diff --git a/lib/sisu/v5/xml_tables.rb b/lib/sisu/v5/xml_tables.rb
index fe957a99..76ecffe1 100644
--- a/lib/sisu/v5/xml_tables.rb
+++ b/lib/sisu/v5/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