[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 
http://themis:8080/tktview>"


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 
http://themis:8080/tktview>" />

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


or to:

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


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


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


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

2016-07-16 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
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.



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