Re: [fossil-users] Constructing Base URI With TH1 Variables

2016-07-19 Thread John L. Poole



On 7/17/2016 7:10 AM, John L. Poole wrote:




On 7/17/2016 12:45 AM, Ron W wrote:
On Sun, Jul 17, 2016 at 2:08 AM, John L. Poole > wrote:


On your suggestion, I inserted code on the setup_header page to this:


if {[hascap r]} {
html "\n"
}



And that worked: the baseURI variable in DOM was set to
"http://themis:8080/tktview?name=149873cca9;


However, each page now complains
"ERROR: no such variable: tkt_uuid"
and is missing styling and the heading matter.


Test $current_page for "tktview". If true:
html "\n"
else:
html "\n"


Thank you, that worked.  Here's what I used:



if {$current_page eq "tktview"} {
  html "\n"
} else {
  html ""
}


...

Caveat: changing the baseURI value to a specific ticket page 
introduced a problem in that ticketview pages are not having their CSS 
files loading correctly; the URIs for the CSS assume the baseURI to be 
$baseurl/$current_page.  I'll have to go down the line and introduce 
$baseurl/$current_page prefixes to URIs that assume that the baseURI 
has been set to $baseurl/$current_page




Trying  to use the variable $tkt_uuid in the header results in the error 
message
"ERROR: no such variable: tkt_uuid" and setting TH_ERROR and that, in 
turn, causes the rest of

the header processing function style_header() [style.c]  to be abandoned.

By happenstance, not redefining the baseURI with the tag  is 
the better approach, for now.
This is because the natural course of events will cause the DOM variable 
baseURI to be set to
the specific ticket page and then the SVG resolver properly can access 
the predeclared nodes within

the SVG.

This is what I ended up having in Edit Page Header section:

 


if {$current_page eq "tktview"} {
# do not change the baseURI so that embedded SVG markers properly resolve
} else {
  html ""
}

$: $

And now the page displays the SVG properly and the CSS formatting 
works.  I wonder what
cost this will be as there must have been a reason for redefining the 
baseURI.


For propriety, here are my notes in analyzing this:
tkt.c 443 commences the generation of the page. Line 482 calls 
style_header("View Ticket")

located at style.c 387.
style_header() at 424 calls  Th_Render(zHeader) [th_main.c 2300]
Th_Render calls Th_GetVar(g.interp, (char*)zVar, nVar) [th.c 1234] and 
when Th_GetVar()
determines the variable is not defined set TH_ERROR which results in 
sendError() [th_main.c 333]

being called and 337-341 cause the error output to display on the page.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Constructing Base URI With TH1 Variables

2016-07-17 Thread John L. Poole



On 7/17/2016 12:45 AM, Ron W wrote:
On Sun, Jul 17, 2016 at 2:08 AM, John L. Poole > wrote:


On your suggestion, I inserted code on the setup_header page to this:


if {[hascap r]} {
html "\n"
}



And that worked: the baseURI variable in DOM was set to
"http://themis:8080/tktview?name=149873cca9;


However, each page now complains
"ERROR: no such variable: tkt_uuid"
and is missing styling and the heading matter.


Test $current_page for "tktview". If true:
html "\n"
else:
html "\n"


Thank you, that worked.  Here's what I used:



if {$current_page eq "tktview"} {
  html "\n"
} else {
  html ""
}


...

Caveat: changing the baseURI value to a specific ticket page introduced 
a problem in that ticketview pages are not having their CSS files 
loading correctly; the URIs for the CSS assume the baseURI to be 
$baseurl/$current_page.  I'll have to go down the line and introduce 
$baseurl/$current_page prefixes to URIs that assume that the baseURI has 
been set to $baseurl/$current_page


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Constructing Base URI With TH1 Variables

2016-07-17 Thread Ron W
On Sun, Jul 17, 2016 at 2:08 AM, John L. Poole  wrote:

> On your suggestion, I inserted code on the setup_header page to this:
>  
>  if {[hascap r]} {
>   html "\n"
>  }
>  
>  
>
> And that worked: the baseURI variable in DOM was set to
> "http://themis:8080/tktview?name=149873cca9;
> 
>
> However, each page now complains
> "ERROR: no such variable: tkt_uuid"
> and is missing styling and the heading matter.
>

Test  $current_page for "tktview". If true:
 html "\n"
else:
 html "\n"
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Constructing Base URI With TH1 Variables

2016-07-17 Thread John L. Poole



On 7/16/2016 8:20 PM, Ron W wrote:
On Sat, Jul 16, 2016 at 1:49 PM, John L. Poole > wrote:


The Edit Page Header allows one to define an HTML page 
element's child
using TH1 variables:

   

[...]

But the Base URI as defined by the above concatenation is really:

http://themis:8080/tktview

since $current_page is valued at "tkview".

What I'd like is to have a TH1 variable that allows me to
construct a value like"tkview?name=149873cca9" or
"tkview/149873cca9e566ab28d2b9922e44a515a639c3ff
"


You can specify the TH1 and HTML for tktview. In that, you will have a 
variable with the ticket ID (don't recall name right now and replying 
from my tablet), so could build the URL using it.



Thank you.

On your suggestion, I inserted code on the setup_header page to this:

 


if {[hascap r]} {
html "\n"
}



And that worked: the baseURI variable in DOM was set to
"http://themis:8080/tktview?name=149873cca9;

However, each page now complains
"ERROR: no such variable: tkt_uuid"
and is missing styling and the heading matter.

I had tried to have the  element inserted from the Ticket View 
page,
but I think the first definition of  prevails, so that 
subsequent declarations

such as might be before the Ticket table is ignored.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Constructing Base URI With TH1 Variables

2016-07-16 Thread Ron W
On Sat, Jul 16, 2016 at 1:49 PM, John L. Poole  wrote:

> The Edit Page Header allows one to define an HTML page  element's
> child
> using TH1 variables:
>
>
>
[...]

> But the Base URI as defined by the above concatenation is really:
>
>http://themis:8080/tktview
>
> since $current_page is valued at "tkview".
>
> What I'd like is to have a TH1 variable that allows me to construct a
> value like"tkview?name=149873cca9" or
> "tkview/149873cca9e566ab28d2b9922e44a515a639c3ff  http://themis:8080/tktview>"
>

You can specify the TH1 and HTML for tktview. In that, you will have a
variable with the ticket ID (don't recall name right now and replying from
my tablet), so could build the URL using it.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Constructing Base URI With TH1 Variables

2016-07-16 Thread John L. Poole
The Edit Page Header allows one to define an HTML page  element's 
child

using TH1 variables:

   

THE QUESTION:
Is there a TH1 variable that contains the a more accurate address of the 
page?

For example, when viewing a specific ticket, the URL might be:

http://themis:8080/tktview/149873cca9e566ab28d2b9922e44a515a639c3ff

or

   http://themis:8080/tktview?name=149873cca9

But the Base URI as defined by the above concatenation is really:

   http://themis:8080/tktview

since $current_page is valued at "tkview".

What I'd like is to have a TH1 variable that allows me to construct a 
value like"tkview?name=149873cca9" or 
"tkview/149873cca9e566ab28d2b9922e44a515a639c3ff 
"


THE PROBLEM:

The problem I am experiencing concerns  elements and the mechanism
where internal markers are resolved.  For example, if I have an SVG that 
contains
a line with an arrowhead, the construction is basically a line element 
with an

additional marker that has to be resolved within the .

Here's an simple working example SVG:

http://www.w3.org/2000/svg; 
xmlns:svg="http://www.w3.org/2000/svg;>

 
 
  viewBox="0 0 100 100" se_type="rightarrow" orient="auto" 
markerUnits="strokeWidth" id="se_marker_end_svg_1">
   d="m100,50l-100,40l30,-40l-30,-40z">

  
 
 
  Layer 1
  x2="230" y1="50" x1="100" fill-opacity="0" stroke-linecap="null" 
stroke-linejoin="null" stroke-dasharray="null" stroke-width="5" 
stroke="#ff" fill="none">

 


The marker-end attribute of the  tag contains a function "url()" 
which references an internal  element as defined within the 
SVG's   element.  In order to properly resolve, the Base URI needs 
to be to the specific document.
Try added the above ... into a ticket in HTML mode and notice 
that in the "preview" mode, the arrowhead will appear, whereas if you 
save the ticket, the line will display without an arrowhead.  This is 
because the Base URI defined does not correlate with whatever mechanism 
the url() function uses.


I found that if I open an already saved Ticket where the line is missing 
the arrowheads, I can alter the HTML's Base URI from:
 http://themis:8080/tktview 
" />

to:
href="http://themis:8080/tktview/149873cca9e566ab28d2b9922e44a515a639c3ff 
" />


or to:

http://themis:8080/tktview?name=149873cca9 
" />


and the arrowhead will display.

Likewise, I can edit within the SVG the value for the marker-end 
attribute from:


url(#se_marker_end_svg_1)
to:

url(http://themis:8080/tktview?name=149873cca9#se_marker_end_svg_1)

and then the arrowhead displays.


-- John Poole


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users