Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions src/test/test-tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<link type="text/css" rel="stylesheet" href=
"https://linkeddata.github.io/tabulator-firefox/content/tabbedtab.css" />

<style type="application/javascript">
<style type="text/css">
<![CDATA[

input { background-color: #eef; padding: 0.5em; border: .5em solid white; font-size: 120%; };
Expand All @@ -31,7 +31,7 @@
]]>
</style>
<script type="text/javascript" src=
"../../../mashlib/dist/mashlib-prealpha.js">
"../../../mashlib/dist/mashlib.js">
</script>
<!-- "https://linkeddata.github.io/app-schedule/schedule.js" -->

Expand Down Expand Up @@ -74,7 +74,7 @@ <h2>Test Tabs widget</h2>
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://cnn.com/&gt; &lt;https://webfoundation.org/&gt; ) .

#ends

</pre>
</td>

Expand All @@ -91,7 +91,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -108,7 +108,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -125,7 +125,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -144,7 +144,7 @@ <h2>Test Tabs widget</h2>
trip:attachmentList ( &lt;http://acm.org/&gt; &lt;http://aclu.org/&gt;
&lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt;
&lt;http://www.zenith.org/&gt; ) .

</pre>
</td>

Expand All @@ -169,7 +169,7 @@ <h2>Test Tabs widget</h2>
&lt;http://aclu.org/&gt;
&lt;http://acm.org/&gt;
) .

</pre>
</td>

Expand All @@ -186,7 +186,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -202,7 +202,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -219,7 +219,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -236,7 +236,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -253,7 +253,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -272,7 +272,7 @@ <h2>Test Tabs widget</h2>
trip:attachmentList ( &lt;http://acm.org/&gt; &lt;http://aclu.org/&gt;
&lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt;
&lt;http://www.zenith.org/&gt; ) .

</pre>
</td>

Expand All @@ -297,7 +297,7 @@ <h2>Test Tabs widget</h2>
&lt;http://aclu.org/&gt;
&lt;http://acm.org/&gt;
) .

</pre>
</td>

Expand All @@ -314,7 +314,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -330,7 +330,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -347,7 +347,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -364,7 +364,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -381,7 +381,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -400,7 +400,7 @@ <h2>Test Tabs widget</h2>
trip:attachmentList ( &lt;http://acm.org/&gt; &lt;http://aclu.org/&gt;
&lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt;
&lt;http://www.zenith.org/&gt; ) .

</pre>
</td>

Expand All @@ -425,7 +425,7 @@ <h2>Test Tabs widget</h2>
&lt;http://aclu.org/&gt;
&lt;http://acm.org/&gt;
) .

</pre>
</td>

Expand All @@ -442,7 +442,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -458,7 +458,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -475,7 +475,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -492,7 +492,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -509,7 +509,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;http://aclu.org/&gt; &lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand All @@ -528,7 +528,7 @@ <h2>Test Tabs widget</h2>
trip:attachmentList ( &lt;http://acm.org/&gt; &lt;http://aclu.org/&gt;
&lt;http://bbc.co.uk/&gt; &lt;http://cbc.ca/&gt; &lt;http://dbp.de/&gt; &lt;https://webfoundation.org/&gt;
&lt;http://www.zenith.org/&gt; ) .

</pre>
</td>

Expand All @@ -553,7 +553,7 @@ <h2>Test Tabs widget</h2>
&lt;http://aclu.org/&gt;
&lt;http://acm.org/&gt;
) .

</pre>
</td>

Expand All @@ -570,7 +570,7 @@ <h2>Test Tabs widget</h2>
ui:subject &lt;#it&gt;.
&lt;#it&gt;
trip:attachmentList ( &lt;https://webfoundation.org/&gt; ) .

</pre>
</td>

Expand Down
7 changes: 4 additions & 3 deletions src/test/test-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
document.addEventListener('DOMContentLoaded', function () {
/// ///////////////////////////////////////////

var UI = require('mashlib')
var UI = panes.UI
var kb = UI.store
var dom = document

Expand Down Expand Up @@ -48,7 +48,8 @@ document.addEventListener('DOMContentLoaded', function () {
options.subject = kb.the(target, UI.ns.ui('subject'))
options.ordered = kb.the(target, UI.ns.ui('ordered')).value === '1'
options.orientation = kb.the(target, UI.ns.ui('orientation')).value

options.onClose = function(e) {} // Test it can make a close button is a good place
// todo: test both cases
var tabs = div.appendChild(UI.tabs.tabWidget(options))
return tabs
}
Expand All @@ -60,7 +61,7 @@ document.addEventListener('DOMContentLoaded', function () {

var tabContentCache = []

options.showMain = function (container, subject) {
options.renderMain = function (container, subject) {
container.innerHTML = ''
if (tabContentCache[subject.uri]) {
container.appendChild(tabContentCache[subject.uri])
Expand Down