@@ -237,7 +237,7 @@ exclude-result-prefixes="#all"
237237
238238 <!-- show drag handle on left edge hover, but not when left sidebar is active -->
239239
240- <xsl : template match =" div[contains-token(@class, 'block')][key('elements-by-class', 'drag-handle', .)][acl:mode() = '&acl;Write'][not(ixsl:style( ancestor::div[contains-token(@class, 'tab-pane')]/div[contains-token(@class, 'left-sidebar')])?display = 'block ')]" mode =" ixsl:onmousemove" priority =" 2" >
240+ <xsl : template match =" div[contains-token(@class, 'block')][key('elements-by-class', 'drag-handle', .)][acl:mode() = '&acl;Write'][not(ancestor::div[contains-token(@class, 'tab-pane')][1] /div[contains-token(@class, 'left-sidebar')]/@aria-expanded = 'true ')]" mode =" ixsl:onmousemove" priority =" 2" >
241241 <xsl : variable name =" uri" select =" xs:anyURI(ancestor::div[contains-token(@class, 'document-body')]/@about)" as =" xs:anyURI" />
242242 <xsl : variable name =" contents" select =" ixsl:get(ixsl:window(), 'LinkedDataHub.contents')" />
243243 <xsl : variable name =" cache-key" select =" '`' || $uri || '`'" as =" xs:string" />
@@ -258,7 +258,7 @@ exclude-result-prefixes="#all"
258258 <xsl : choose >
259259 <xsl : when test =" $offset-x < = $left-edge-threshold and ixsl:style($drag-handle)?display = 'none'" >
260260 <!-- get both block and span12 rectangles to calculate intersection -->
261- <xsl : variable name =" span12" select =" $drag-handle/parent ::*[contains-token(@class, 'span12')]" as =" element()" />
261+ <xsl : variable name =" span12" select =" $drag-handle/ancestor ::*[contains-token(@class, 'span12')][1 ]" as =" element()" />
262262 <xsl : variable name =" block-rect" select =" $rect" /> <!-- block's getBoundingClientRect -->
263263 <xsl : variable name =" span12-rect" select =" ixsl:call($span12, 'getBoundingClientRect', [])" />
264264
@@ -311,7 +311,7 @@ exclude-result-prefixes="#all"
311311
312312 <!-- override inline editing form for block types (do nothing if the button is disabled) - prioritize over form.xsl -->
313313
314- <xsl : template match =" div[following-sibling::div[@typeof = ('&ldh;XHTML', '&ldh;Object')]]// button[contains-token(@class, 'btn-edit')][not(contains-token(@class, 'disabled'))]" mode =" ixsl:onclick" priority =" 1" >
314+ <xsl : template match =" button[contains-token(@class, 'btn-edit')][not(contains-token(@class, 'disabled'))][ancestor::*[@typeof = ('&ldh;XHTML', '&ldh;Object')][1] ]" mode =" ixsl:onclick" priority =" 1" >
315315 <xsl : param name =" block" select =" ancestor::div[contains-token(@class, 'block')][1]" as =" element()" />
316316 <!-- for block types, button.btn-edit is placed in its own div.row-fluid, therefore the next row is the actual container -->
317317 <xsl : param name =" container" select =" $block/descendant::div[@typeof][1]" as =" element()" /> <!-- other resources can be nested within object -->
@@ -419,7 +419,7 @@ exclude-result-prefixes="#all"
419419
420420 <xsl : template match =" *[ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][acl:mode() = '&acl;Write']]" mode =" ixsl:ondragover" priority =" 1" >
421421 <xsl : variable name =" block" select =" ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][1]" as =" element()" />
422- <xsl : variable name =" uri" select =" xs:anyURI($block/parent::div/parent::div [contains-token(@class, 'document-body')]/@about)" as =" xs:anyURI" />
422+ <xsl : variable name =" uri" select =" xs:anyURI($block/ancestor::* [contains-token(@class, 'document-body')][1 ]/@about)" as =" xs:anyURI" />
423423 <xsl : variable name =" results" select =" ixsl:get(ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || $uri || '`'), 'results')" as =" document-node()" />
424424 <xsl : variable name =" mode" select =" ac:mode($results)" as =" xs:anyURI" />
425425
@@ -438,7 +438,7 @@ exclude-result-prefixes="#all"
438438
439439 <xsl : template match =" *[ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][acl:mode() = '&acl;Write']]" mode =" ixsl:ondragenter" priority =" 1" >
440440 <xsl : variable name =" block" select =" ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][1]" as =" element()" />
441- <xsl : variable name =" uri" select =" xs:anyURI($block/parent::div/parent::div [contains-token(@class, 'document-body')]/@about)" as =" xs:anyURI" />
441+ <xsl : variable name =" uri" select =" xs:anyURI($block/ancestor::* [contains-token(@class, 'document-body')][1 ]/@about)" as =" xs:anyURI" />
442442 <xsl : variable name =" results" select =" ixsl:get(ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || $uri || '`'), 'results')" as =" document-node()" />
443443 <xsl : variable name =" mode" select =" ac:mode($results)" as =" xs:anyURI" />
444444
@@ -455,7 +455,7 @@ exclude-result-prefixes="#all"
455455
456456 <xsl : template match =" *[ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][acl:mode() = '&acl;Write']]" mode =" ixsl:ondragleave" priority =" 1" >
457457 <xsl : variable name =" block" select =" ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][1]" as =" element()" />
458- <xsl : variable name =" uri" select =" xs:anyURI($block/parent::div/parent::div [contains-token(@class, 'document-body')]/@about)" as =" xs:anyURI" />
458+ <xsl : variable name =" uri" select =" xs:anyURI($block/ancestor::* [contains-token(@class, 'document-body')][1 ]/@about)" as =" xs:anyURI" />
459459 <xsl : variable name =" results" select =" ixsl:get(ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || $uri || '`'), 'results')" as =" document-node()" />
460460 <xsl : variable name =" mode" select =" ac:mode($results)" as =" xs:anyURI" />
461461
@@ -478,7 +478,7 @@ exclude-result-prefixes="#all"
478478
479479 <xsl : template match =" *[ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][acl:mode() = '&acl;Write']]" mode =" ixsl:ondrop" priority =" 1" >
480480 <xsl : variable name =" block" select =" ancestor-or-self::div[contains-token(@class, 'block')][parent::div[contains-token(@class, 'content-body')]][1]" as =" element()" />
481- <xsl : variable name =" uri" select =" xs:anyURI($block/parent::div/parent::div [contains-token(@class, 'document-body')]/@about)" as =" xs:anyURI" />
481+ <xsl : variable name =" uri" select =" xs:anyURI($block/ancestor::* [contains-token(@class, 'document-body')][1 ]/@about)" as =" xs:anyURI" />
482482 <xsl : variable name =" results" select =" ixsl:get(ixsl:get(ixsl:get(ixsl:window(), 'LinkedDataHub.contents'), '`' || $uri || '`'), 'results')" as =" document-node()" />
483483 <xsl : variable name =" mode" select =" ac:mode($results)" as =" xs:anyURI" />
484484
0 commit comments