GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
Report Generator: Narrative_2014.04.10: Sources/Citations target frame change to _blank


https://support.genopro.com/Topic33783.aspx
Print Topic | Close Window

By stephen.digby - Thursday, August 7, 2014
When Source/Citation links are clicked the narrative report, the right frame is split to show the requested info (see image).

Report Generator: Narrative_2014.04.10: Request for Sources/Citations

http://support.genopro.com/Uploads/Images/7fb6051f-0bd1-43f5-aade-ef29.jpg


Increasingly, I and my family access my site from mobile devices where this makes viewing far more difficult.

Request: Can the target frame for Sources/Citations target frame be changed to _blank.

OR, if this is not supported, can some-one tell me where I can change the code for this ??
By genome - Friday, August 8, 2014
I jumped in with my first response (now deleted) and then realized I hadn't read the post carefully.

The short answer is no it is not supported at present.  However I consider the requested change has merit and I believe I have a solution that will provide this feature as (yet another) option.  I should hopefully be able to deliver a revised skin in a 'few' days, depending on whether or not events occur beyond my control (e.g. grandchildren are on school holiday and may demand time w00t).

If you want to 'go it alone' then search for lines containing target='popup' in the skin file Code\Util.vbs and change the last two occurences.
By stephen.digby - Saturday, August 9, 2014
Thanks for the quick reply and the hint !!!

Fixed it (for me):

Code/util.vbs  Line 1135/1146  changed popup to _blank - Causes all Source/Citation links to open in a new page !!!

         IfcollSources.Count > 0 Then ' write details of remaining source/citations

              If NotSession("NestSourceRefs") Then Report.WriteBrDic.Plurial("SourceCitation" & Util.IfElse(g_collFootnotes.Count> 0, "_Other",""), collSources.Count)

              strSep =""

              For EachoFootnote in collSources

                 strTitle = StrPlainText(oFootnote,Util.FirstNonEmpty(oFootnote.Subtitle, oFootnote.Description,oFootnote.QuotedText, Dic("SourceInformation")))

                  If (strTitle <> "") Then

                     strTitle = Util.FormatString(" title='{}'", strTitle)

                  EndIf

                 Report.WriteFormatted strSep & " <ahref='source-{&t}.htm'onclick='showPopUpFrame("""");' target='_blank'{}><i>{}</i></a>", oFootnote.ID, strTitle,JoinSourceCitationNames(oFootnote, StrFormatText(oFootnote,StrParseText(oFootnote.title, True)), true)

                 strSep = Util.IfElse(Session("NestSourceRefs"), "<br/>", ",")

              Next

          End If
By stephen.digby - Saturday, August 9, 2014
Tiny residual problem 
My small code change doesn't stop the display of the Source/Citation subframe which just appears blank....
Hints ?? Suggestions ??

Happy to help experiment..... or wait....
By genome - Saturday, August 9, 2014
Try removing the onclick attribute Smile
By stephen.digby - Wednesday, August 13, 2014
Thanks again !!! it did exactly what I wanted:

Summary: 
To stop Source/Citation links from opening in a sub-frame on the right hand side, change:

Code/util.vbs  Lines 1135/1146

         IfcollSources.Count > 0 Then ' write details of remaining source/citations

              If NotSession("NestSourceRefs") Then Report.WriteBrDic.Plurial("SourceCitation" & Util.IfElse(g_collFootnotes.Count> 0, "_Other",""), collSources.Count)

              strSep =""

              For EachoFootnote in collSources

                 strTitle = StrPlainText(oFootnote,Util.FirstNonEmpty(oFootnote.Subtitle, oFootnote.Description,oFootnote.QuotedText, Dic("SourceInformation")))

                  If(strTitle <> "") Then

                     strTitle = Util.FormatString(" title='{}'", strTitle)

                  EndIf

                 Report.WriteFormatted strSep & " <ahref='source-{&t}.htm' onclick='showPopUpFrame("""");'target='_blank'{}><i>{}</i></a>", oFootnote.ID, strTitle,JoinSourceCitationNames(oFootnote, StrFormatText(oFootnote,StrParseText(oFootnote.title, True)), true)

                 strSep = Util.IfElse(Session("NestSourceRefs"), "<br />","<br >")

              Next

          End If


i.e. remove the aonclick showpopup behaviour AND change target to _blank.

This makes Source/Citation pages open in a new window.

By genome - Thursday, August 14, 2014
I decided to adopt a more generic approach to this issue in release 2014.08.14 (now available).  

This version provides an option via Config Params to open all 'popup' content in a maximised frame. This also avoids proliferation of tabs/windows that would have occurred if links in 'popup'  frames were followed.

I am looking to implement automatic detection of tablet/smartphone platform and switch according.
By stephen.digby - Tuesday, October 28, 2014
Even after selecting the "presentation" option to "Open popup frame to maximum size....", i don't get citations in a new window.

Still needed to change 

Code/ Utils.vbs Line 1145:  

Report.WriteFormattedstrSep & " <a href='source-{&t}.htm' target='_blank'{}><i>{}</i></a>", oFootnote.ID, strTitle,JoinSourceCitationNames(oFootnote, StrFormatText(oFootnote,StrParseText(oFootnote.title, True)), true)