c&d: html, ocn link back to self reinstated
authorRalph Amissah <ralph@amissah.com>
Thu, 8 Jan 2015 00:04:46 +0000 (19:04 -0500)
committerRalph Amissah <ralph@amissah.com>
Thu, 8 Jan 2015 03:42:40 +0000 (22:42 -0500)
* requested, used as quick means to get object url reference link
* d: removed ocn_html_identifier variable, unnecessary in html5
  (requirement previously forced by html4)

data/doc/sisu/CHANGELOG_v5
data/doc/sisu/CHANGELOG_v6
lib/sisu/current/css.rb
lib/sisu/current/html_format.rb
lib/sisu/develop/ao_idx.rb
lib/sisu/develop/css.rb
lib/sisu/develop/html.rb
lib/sisu/develop/html_format.rb
lib/sisu/develop/html_lite_shared.rb
lib/sisu/develop/html_minitoc.rb

index 526109485793edf3561018079603d6bcd3e46f9e..02a8fa3ac4b39bbbcedc021d64b31dd7277bae54 100644 (file)
@@ -73,7 +73,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.8.0.orig.tar.xz
     reflected in generated cgi, sample search form, so, does not
     jump to the (otherwise correctly) identified location
 
-  * html, output by filename, filenames, fix
+  * html,
+    * output by filename, filenames, fix
+    * ocn link back to self reinstated
+      (requested, used as quick means to get object url reference link)
 
   * sisu.org addition, modification, consider
 
index a75a680ac0dade9834e5185460f364f6e1454ecd..a451ea3f7ed9515d962ae8b681aaa88987afc676 100644 (file)
@@ -81,7 +81,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.4.0.orig.tar.xz
     reflected in generated cgi, sample search form, so, does not
     jump to the (otherwise correctly) identified location
 
-  * html, output by filename, filenames, fix
+  * html,
+    * output by filename, filenames, fix
+    * ocn link back to self reinstated
+      (removed ocn_html_identifier variable, unnecessary in html5,
+      requirement previously forced by html4)
+      (requested, used as quick means to get object url reference link)
 
   * sisu.org addition, modification, consider
 
index 8e57abba2d662a88a909c6394cb2f45f24c6b975..1832b66c8042ea08fa82aadcc57d9de844c3635d 100644 (file)
@@ -355,16 +355,6 @@ WOK
     color: #000000;
     background-color: #f9f9aa;
   }
-  a.lnkocn:link {
-    color: #777777;
-    text-decoration: none;
-  }
-/*
-  a:hover {
-    border-bottom: 2px solid #777777;
-    background-color: #fff3b6;
-  }
-*/
   a:hover img {
     background-color: #ffffff;
   }
@@ -372,6 +362,14 @@ WOK
     color: #003399;
     text-decoration: underline;
   }
+  a.lnkocn:link {
+    color: #777777;
+    text-decoration: none;
+  }
+  a.lnkocn:visited {
+    color: #555555;
+    text-decoration: none;
+  }
   div {
     margin-left: 0;
     margin-right: 0;
index af9b9c3c0ca0f31ae8682a5b0f61f9bfd03879bb..8f83219fddce8d11a6b4fb10f46347195db51cc1 100644 (file)
@@ -69,7 +69,7 @@ module SiSU_HTML_Format
         or @ocn.empty?
           ''
         else
-          %{<label class="ocn">#{@ocn}</label>}
+          %{<label class="ocn"><a href="##{@ocn_html_identifier}#{@ocn}" class="lnkocn">#{@ocn}</a></label>}
         end
       else
         ''
index cd24854f99a3374539e870c3031cd6b4a38b581a..80dca60155ae0804837522858cf397eb6886b225 100644 (file)
@@ -61,8 +61,6 @@ module SiSU_AO_BookIndex
       @rgx_idx=/#{Mx[:idx_o]}(?:.+?)#{Mx[:idx_c]}\s*/
       @rgx_idx_ocn_seg=/(.+?)~(\d+)~(\S+)/
       @rgx_idx_ocn=/(.+?)~(\d+)/
-      @ocn_html_identifier=
-        SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
       @env ||=SiSU_Env::InfoEnv.new(@md.fns)
     end
     def indexing_song
@@ -261,13 +259,13 @@ module SiSU_AO_BookIndex
                 if a[:range]
                   idx[:sst_rel_html_seg][@o]=
                     idx[:sst_rel_html_seg][@o] +
-                    %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, }
+                    %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, }
                   idx[:sst_rel][@t]=
                     idx[:sst_rel][@t] +
                     %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, }
                   idx[:html][@q]=
                     idx[:html][@q] +
-                    %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:range]}</a>, }
+                    %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:range]}</a>, }
                   idx[:xhtml][@q]=
                     idx[:xhtml][@q] +
                     %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:range]}</a>, }
@@ -275,13 +273,13 @@ module SiSU_AO_BookIndex
                 elsif a[:ocn]
                   idx[:sst_rel_html_seg][@o]=
                     idx[:sst_rel_html_seg][@o] +
-                    %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, }
+                    %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, }
                   idx[:sst_rel][@t]=
                     idx[:sst_rel][@t] +
                     %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, }
                   idx[:html][@q]=
                     idx[:html][@q] +
-                    %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:ocn]}</a>, }
+                    %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:ocn]}</a>, }
                   idx[:xhtml][@q]=
                     idx[:xhtml][@q] +
                     %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:ocn]}</a>, }
@@ -313,13 +311,13 @@ module SiSU_AO_BookIndex
                     if z[:range]
                       idx[:sst_rel_html_seg][@o]=
                         idx[:sst_rel_html_seg][@o] +
-                        %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, }
+                        %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, }
                       idx[:sst_rel][@t]=
                         idx[:sst_rel][@t] +
                         %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, }
                       idx[:html][@q]=
                         idx[:html][@q] +
-                        %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:range]}</a>, }
+                        %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:range]}</a>, }
                       idx[:xhtml][@q]=
                         idx[:xhtml][@q] +
                         %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:range]}</a>, }
@@ -327,13 +325,13 @@ module SiSU_AO_BookIndex
                     elsif z[:ocn]
                       idx[:sst_rel_html_seg][@o]=
                         idx[:sst_rel_html_seg][@o] +
-                        %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, }
+                        %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, }
                       idx[:sst_rel][@t]=
                         idx[:sst_rel][@t] +
                         %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, }
                       idx[:html][@q]=
                         idx[:html][@q] +
-                        %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:ocn]}</a>, }
+                        %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:ocn]}</a>, }
                       idx[:xhtml][@q]=
                         idx[:xhtml][@q] +
                         %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:ocn]}</a>, }
index b32bfc50858a46c180e63625fbd0586b58289935..19c87c07e4352d8ae2fd8c851483075615964a70 100644 (file)
@@ -355,16 +355,6 @@ WOK
     color: #000000;
     background-color: #f9f9aa;
   }
-  a.lnkocn:link {
-    color: #777777;
-    text-decoration: none;
-  }
-/*
-  a:hover {
-    border-bottom: 2px solid #777777;
-    background-color: #fff3b6;
-  }
-*/
   a:hover img {
     background-color: #ffffff;
   }
@@ -372,6 +362,14 @@ WOK
     color: #003399;
     text-decoration: underline;
   }
+  a.lnkocn:link {
+    color: #777777;
+    text-decoration: none;
+  }
+  a.lnkocn:visited {
+    color: #555555;
+    text-decoration: none;
+  }
   div {
     margin-left: 0;
     margin-right: 0;
index 737d532e423f5e00a579b0c648bb210776f16131..2386394f06d8a4d96d740da610830783070f876d 100644 (file)
@@ -261,8 +261,6 @@ module SiSU_HTML
       @@firstseg=nil
       def initialize(md=nil,data='')
         @data,@md=data,md
-        @ocn_html_identifier=
-          SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
         @tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
       end
       def songsheet #extracts toc for scroll & seg
@@ -377,7 +375,7 @@ WOK
         title=if dob.ocn ==0 then linkname
         else
           @@toc[:scr] <<  '<br>'
-          %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
+          %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
         end
         txt_obj={ txt: title }
         format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -419,7 +417,7 @@ WOK
           end
         else
           @@toc[:scr] <<  '<br>'
-          %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
+          %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
         end
         txt_obj={ txt: title }
         format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -536,7 +534,7 @@ WOK
           }
           f=@md.file.base_filename.html_seg(fnh)
           p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
-          lnk_n_txt=%{  <a href="#{f}##{@ocn_html_identifier}#{ocn}">
+          lnk_n_txt=%{  <a href="#{f}##{ocn}">
     #{linkname}
   </a>}
           txt_obj={ txt: lnk_n_txt }
@@ -561,7 +559,7 @@ WOK
           }
           f=@md.file.base_filename.html_seg(fnh)
           p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
-          lnk_n_txt=%{  <a href="#{f}##{@ocn_html_identifier}#{ocn}">
+          lnk_n_txt=%{  <a href="#{f}##{ocn}">
   #{linkname}
 </a>}
           txt_obj={ txt: lnk_n_txt }
index 5d7a4a7dcfc27348954675981e80a27e4cbb6c4d..1692e452325b3efd89e4b73e702ed6aa785c34ff 100644 (file)
@@ -60,7 +60,6 @@ module SiSU_HTML_Format
     def initialize(md,ocn)
       @md,@ocn=md,ocn.to_s
       @ocn ||=''
-      @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
       @make=SiSU_Env::ProcessingSettings.new(@md)
     end
     def ocn_display
@@ -69,7 +68,7 @@ module SiSU_HTML_Format
         or @ocn.empty?
           ''
         else
-          %{<label class="ocn">#{@ocn}</label>}
+          %{<label class="ocn"><a href="##{@ocn}" class="lnkocn">#{@ocn}</a></label>}
         end
       else
         ''
@@ -89,7 +88,7 @@ module SiSU_HTML_Format
     end
     def goto
       (@ocn==nil || @ocn.empty?) \
-      ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">}
+      ? '' : %{<a href="##{@ocn}">}
     end
   end
   class HeadInformation
@@ -1147,7 +1146,6 @@ WOK
     end
     def subtoc_lev(tag,attrib)
       @txt=clean(@txt)
-      @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
       txt=if @txt \
       and @txt =~/<\/?i>|<a\s+name="\S+?">/mi
         @txt.gsub(/<\/?i>|<a\s+name="\S+?">/mi,'') #removes name markers from subtoc, go directly to substantive text
@@ -1161,7 +1159,7 @@ WOK
           gsub(/<a[\s]+name="-\d+"[\s]+href="#_\d+">&nbsp;<sup>\d+<\/sup>&nbsp;/m,'')
       end
       %{<#{tag} class="#{attrib}">
-    <a href="##{@ocn_html_identifier}#{@ocn}"><i>#{txt}</i></a> #{note}
+    <a href="##{@ocn}"><i>#{txt}</i></a> #{note}
   </#{tag}>}
     end
     def subtoc_lev5
index 65c0537d8f544ac3197eaef4b06523c484a27139..5c74fa857b63de7c61fc5211ed2828c994f392fc 100644 (file)
@@ -75,7 +75,6 @@ module SiSU_FormatShared
       else @@hname
       end
       @tab="\t"
-      @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
       @@tablehead,@@tablefoot=[],[]
       @env=SiSU_Env::InfoEnv.new(@md.fns)
       @base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html"
@@ -204,7 +203,7 @@ GSUB
       %{<p class="#{h[:class]}" type="#{h[:type]}">#{h[:txt]}</a></p>\n}  << "\n"
     end
     def lev_toc_hname
-      %{<p class="toc#{@lv}" header="#{@hname}"><a href="##{@ocn_html_identifier}#{@ocn}">#{@txt}</a></p>\n}  #<< "\n"
+      %{<p class="toc#{@lv}" header="#{@hname}"><a href="##{@ocn}">#{@txt}</a></p>\n}  #<< "\n"
     end
     def lev_toc
       h={ txt: txt, class: "toc#{@lv}", type: 'toc' }
index 3cb87577ce038e5ecf42fc2a3c0e34ed4adbddb6..96da06d79b6b2707daa2cda530e8be13b424e4d5 100644 (file)
@@ -64,7 +64,6 @@
       def initialize(md,data)
         @md,@data=md,data
         @pat_strip_heading_name=/<a name="h?\d.*?">(.+?)<\/a>/
-        @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
         @tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
       end
       def songsheet
           fn: @@seg_url,
         }
         f=@md.file.base_filename.html_seg(fnh)
-        lnk_n_txt=%{  <a href="#{f}##{@ocn_html_identifier}#{txt.ocn}">
+        lnk_n_txt=%{  <a href="#{f}##{txt.ocn}">
     #{txt.obj}
   </a>}
           txt_obj={ txt: lnk_n_txt }
           fn: @@seg_url,
         }
         f=@md.file.base_filename.html_seg(fnh)
-        lnk_n_txt=%{  <a href="#{f}##{@ocn_html_identifier}#{txt.ocn}">
+        lnk_n_txt=%{  <a href="#{f}##{txt.ocn}">
     #{txt.obj}
   </a>}
           txt_obj={ txt: lnk_n_txt }