Skip to content

Commit 8956c93

Browse files
committed
Update docs, fix menu having 'down' class
1 parent 55b27ce commit 8956c93

3 files changed

Lines changed: 37 additions & 58 deletions

File tree

server/documents/collections/menu.html.eco

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -717,16 +717,6 @@ themes : ['Default', 'Chubby', 'GitHub', 'Material']
717717
</div>
718718

719719

720-
<div class="example">
721-
<h4 class="ui header">Down</h4>
722-
<p>A menu item can be pressed in</p>
723-
<div class="ui compact menu">
724-
<div class="down item">
725-
Link
726-
</div>
727-
</div>
728-
</div>
729-
730720
<div class="example">
731721
<h4 class="ui header">Active</h4>
732722
<p>A menu item can be active</p>

server/documents/hotfix.html.eco

Lines changed: 33 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,45 @@ title : 'Test Page'
77
type : 'Library'
88
---
99
<div class="ui container">
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.
14-
</div>
15-
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-
10+
<div id="first" class="ui search">
11+
<div class="ui left icon input">
12+
<input class="prompt" type="text" placeholder="Search countries">
13+
<i class="icon"></i>
14+
</div>
2515
</div>
2616
</div>
2717
<script>
2818
$(document).ready(function() {
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,
19+
var content = [
20+
{ title: 'Andorra' },
21+
{ title: 'United Arab Emirates' },
22+
{ title: 'Afghanistan' },
23+
{ title: 'Antigua' },
24+
{ title: 'Anguilla' },
25+
{ title: 'Albania' },
26+
{ title: 'Armenia' },
27+
{ title: 'Netherlands Antilles' },
28+
{ title: 'Angola' },
29+
{ title: 'Argentina' },
30+
{ title: 'American Samoa' },
31+
{ title: 'Austria' },
32+
{ title: 'Australia' },
33+
{ title: 'Aruba' },
34+
{ title: 'Aland Islands' },
35+
{ title: 'Azerbaijan' },
36+
{ title: 'Bosnia' },
37+
{ title: 'Barbados' },
38+
{ title: 'Bangladesh' },
39+
{ title: 'Belgium' },
40+
{ title: 'Burkina Faso' },
41+
{ title: 'Bulgaria' },
42+
{ title: 'Bahrain' },
43+
{ title: 'Burundi' }
44+
// etc
45+
];
46+
$('#first').search({source: content ,showNoResults: false});
5047

51-
second : 'Two',
5248

53-
third : 'Three'
54-
};
55-
56-
return response[settings.urlData.tab];
57-
}
58-
}
59-
});
6049
});
6150

6251
</script>

server/documents/modules/search.html.eco

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ type : 'UI Module'
376376
</thead>
377377
<tbody>
378378
<tr>
379-
<td>query</td>
379+
<td>query (callback)</td>
380380
<td>Search for value currently set in search input</td>
381381
</tr>
382382
<tr>
@@ -396,7 +396,7 @@ type : 'UI Module'
396396
<td>Whether has minimum characters</td>
397397
</tr>
398398
<tr>
399-
<td>search remote(query)</td>
399+
<td>search remote(query, callback)</td>
400400
<td>Search remote endpoint for specified query and display results</td>
401401
</tr>
402402
<tr>
@@ -448,11 +448,11 @@ type : 'UI Module'
448448
<td>Adds HTML to results and displays</td>
449449
</tr>
450450
<tr>
451-
<td>show results</td>
451+
<td>show results(callback)</td>
452452
<td>Shows results container</td>
453453
</tr>
454454
<tr>
455-
<td>hide results</td>
455+
<td>hide results(callback)</td>
456456
<td>Hides results container</td>
457457
</tr>
458458
<tr>

0 commit comments

Comments
 (0)