Vorlage:ButtonOpenTab: Unterschied zwischen den Versionen

Aus DIQA-Homepage
Wechseln zu:Navigation, Suche
(Added to the wiki via WikiImport-Script.)
 
(Added to the wiki via WikiImport-Script.)
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 8: Zeile 8:
 
* downloadpage.js
 
* downloadpage.js
 
* #accordion on the page
 
* #accordion on the page
 +
test:
 +
{{ButtonOpenTab|solid=|expandsection=|anchor=test test test|text=test}}
 +
{{ButtonOpenTab|solid=solid|expandsection=|anchor=test test test|text=test}}
  
 
</noinclude><includeonly>
 
</noinclude><includeonly>
{| style="margin: auto;"
+
{{#ifeq:{{{solid|}}}||<!--
|<div class="diqabutton" style="background-color: {{{color|#A0B844}}}; margin: 0.4em;"><span class="buttontext {{#ifeq:{{{fontsize|}}}|small|small|}}"><html><a href="http://</html>{{SERVERNAME}}{{localurl:{{PAGENAME}}|expandsection={{{expandsection|}}}}}"<html> target="_self" class="openTab"> &#9654;&nbsp;</html>{{{text|}}}<html></a></html></span></div>
+
    solid background --><div class="diqabutton" style="background-color: {{{color|#A0B844}}}; margin: 0.4em;"><span class="buttontext {{#ifeq:{{{fontsize|}}}|small|small|}}"><html><a href="http://</html>{{SERVERNAME}}{{#if:{{{expandsection|}}}|{{localurl:{{PAGENAME}}|expandsection={{{expandsection|}}}}}|}}{{#if:{{{anchor|}}}|{{localurl:{{PAGENAME}}}}#{{{anchor|}}}|}}"<html> target="_self" class="openTab"> &#9654;&nbsp;</html>{{{text|}}}<html></a></html></span></div>|<!--
|}</includeonly>
+
    transparent background --><span class="{{#ifeq:{{{fontsize|}}}|small|small|}}" style="color: black; margin: 0.4em;"><html><a href="http://</html>{{SERVERNAME}}{{#if:{{{expandsection|}}}|{{localurl:{{PAGENAME}}|expandsection={{{expandsection|}}}}}|}}{{#if:{{{anchor|}}}|{{localurl:{{PAGENAME}}}}#{{{anchor|}}}|}}"<html> target="_self" style="" class="openTab"> &#9654;&nbsp;</html>{{{text|}}}<html></a></html></span>
 +
}}</includeonly>

Aktuelle Version vom 12. Oktober 2018, 14:57 Uhr

opens an accordion tab.

uses a js-method to open the tab,as soon as jquery.ui has been loaded (the event handler is replaced in this case!) reloads the entire page if jquery has not been loaded.

requires:

  • downloadpage.js
  • #accordion on the page

test:

▶ test