Skip to content

Commit 5448c6d

Browse files
committed
Merge branch 'next' of github.com:Semantic-Org/Semantic-UI-Docs
2 parents da5c202 + 227c694 commit 5448c6d

4 files changed

Lines changed: 48 additions & 41 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "git://github.com/Semantic-Org/Semantic-UI-Docs.git"
1111
},
1212
"dependencies": {
13-
"docpad": "~6.78.1",
13+
"docpad": "~6.79.0",
1414
"docpad-plugin-copy": "~2.1.3",
1515
"docpad-plugin-eco": "~2.1.0",
1616
"docpad-plugin-partials": "~2.9.2"

server/documents/elements/icon.html.eco

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ themes : ['Default']
12391239
<div class="column"><i class="delicious icon"></i>Delicious</div>
12401240
<div class="column"><i class="deviantart icon"></i>Deviantart</div>
12411241
<div class="column"><i class="digg icon"></i>Digg</div>
1242-
<div class="column"><i class="dribbble icon"></i>Dribbble</div>
1242+
<div class="column"><i class="dribble icon"></i>Dribble</div>
12431243
<div class="column"><i class="dropbox icon"></i>Dropbox</div>
12441244
<div class="column"><i class="drupal icon"></i>Drupal</div>
12451245
<div class="column"><i class="empire icon"></i>Empire</div>

server/documents/hotfix.html.eco

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,56 @@ title : 'Test Page'
77
type : 'Library'
88
---
99
<div class="ui container">
10-
<form class="ui form">
11-
<div class="fields">
12-
<div class="seven wide field">
13-
<label>Card Number</label>
14-
<div class="ui fluid button" tabindex="0">Submit Order</div>
15-
</div>
16-
<div class="three wide field">
17-
<label>CVC</label>
18-
<input type="text" name="card[cvc]" maxlength="3" placeholder="CVC">
19-
</div>
20-
<div class="six wide field">
21-
<label>Expiration</label>
22-
<div class="two fields">
23-
<div class="field">
24-
<select class="ui fluid dropdown" name="card[expire-month]">
25-
<option value="">Month</option>
26-
<option value="1">January</option>
27-
<option value="2">February</option>
28-
<option value="3">March</option>
29-
<option value="4">April</option>
30-
<option value="5">May</option>
31-
<option value="6">June</option>
32-
<option value="7">July</option>
33-
<option value="8">August</option>
34-
<option value="9">September</option>
35-
<option value="10">October</option>
36-
<option value="11">November</option>
37-
<option value="12">December</option>
38-
</select>
39-
</div>
40-
<div class="field">
41-
<input type="text" name="card[expire-year]" maxlength="4" placeholder="Year">
42-
</div>
43-
</div>
44-
</div>
45-
</div>
46-
</form>
10+
<div class="ui basic segment">
11+
1. After "First" tab is clicked, click the "ClickMe" button. Alert will appear<br />
12+
2. <b>BUG:</b> When "First" tab is clicked on again, button stops working. Changing <i>cacheType</i> doesnt change anything!<br />
13+
3. <b>The goal is to run JS once and then leave it be</b>. So scripts must be evaluated once and tab should not reload, if focused on again.
4714
</div>
4815

16+
<div class="ui top attached tabular menu">
17+
<a class="active item" data-tab="first">First</a>
18+
<a class="item" data-tab="second">Second</a>
19+
</div>
20+
<div class="ui bottom attached active tab segment" data-tab="first">
21+
22+
</div>
23+
<div class="ui bottom attached tab segment" data-tab="second">
24+
25+
</div>
4926
</div>
5027
<script>
5128
$(document).ready(function() {
52-
$('.ui.dropdown').dropdown();
29+
var firstTabContent = "<div id='testfirst'>One&nbsp;<button>ClickMe</button></div> \n" +
30+
"<script type='text/javascript'>\n" +
31+
" $(function() { $('button').click(function() { alert(1) }); $('#testfirst').append('<div>dynamically appended div <b>(will disappear if tab is clicked again!)</b> ' + (new Date()).getTime() + '</div>') });\n" +
32+
"</scr" + "ipt>";
33+
34+
$('.menu .item')
35+
.tab({
36+
cache: true,
37+
cacheType: 'DOM',
38+
evaluateScripts: true,
39+
onFirstLoad: function(tabPath, parameterArray, historyEvent) {
40+
console.log('Initialized tab: ' + tabPath);
41+
},
42+
onLoad: function(tabPath, parameterArray, historyEvent) { //tab selected
43+
console.log('Selected tab: ' + tabPath);
44+
},
45+
apiSettings: {
46+
loadingDuration : 300,
47+
mockResponse : function(settings) {
48+
var response = {
49+
first : firstTabContent,
50+
51+
second : 'Two',
52+
53+
third : 'Three'
54+
};
55+
56+
return response[settings.urlData.tab];
57+
}
58+
}
59+
});
5360
});
5461

5562
</script>

server/documents/modules/tab.html.eco

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ themes : ['Default']
671671
<tr>
672672
<td>cacheType <div class="ui horizontal label">2.2</div></td>
673673
<td>response</td>
674-
<td>Can be set to either <code>response</code> or <code>html</code>. Response will cache the original response on load, this way callbacks always receive the same content. Using `html` will cache the resulting html after all callbacks, making sure any changes to content are preserved.</td>
674+
<td>Can be set to either <code>response</code>, <code>DOM</code> or <code>html</code>. Using <code>DOM</code> will cache the a clone of the DOM tree, preserving all events as they existed on render. <code>response</code> will cache the original response on load, this way callbacks always receive the same content. Using <code>html</code> will cache the resulting html after all callbacks, making sure any changes to content are preserved.</td>
675675
</tr>
676676
<tr>
677677
<td>cache</td>

0 commit comments

Comments
 (0)