Browse Source

finally uses legit dropdown for page chooser

Former-commit-id: f844f1329e
Former-commit-id: 1baaa42174
pull/258/head
Jack Lukic 11 years ago
parent
commit
60d77564d7
3 changed files with 11 additions and 3 deletions
  1. 1
      node/src/documents/modules/dropdown.html
  2. 8
      node/src/files/javascript/semantic.js
  3. 5
      node/src/layouts/default.html.eco

1
node/src/documents/modules/dropdown.html

@ -6,7 +6,6 @@ title : 'Dropdown'
type : 'UI Module' type : 'UI Module'
--- ---
<script src="/components/semantic/modules/dropdown.js"></script>
<script src="/javascript/dropdown.js"></script> <script src="/javascript/dropdown.js"></script>
<div class="segment"> <div class="segment">

8
node/src/files/javascript/semantic.js

@ -34,6 +34,7 @@ semantic.ready = function() {
$waypoints = $('.main.container').find('h2').first().siblings('h2').andSelf(), $waypoints = $('.main.container').find('h2').first().siblings('h2').andSelf(),
$menuPopup = $('.ui.main.menu .popup.item'), $menuPopup = $('.ui.main.menu .popup.item'),
$menuDropdown = $('.ui.main.menu .dropdown'),
$example = $('.example'), $example = $('.example'),
$shownExample = $example.filter('.shown'), $shownExample = $example.filter('.shown'),
@ -449,6 +450,13 @@ semantic.ready = function() {
}) })
; ;
$menuDropdown
.dropdown({
on : 'hover',
action : 'none'
})
;
$menu $menu
.sidr({ .sidr({
name: 'menu' name: 'menu'

5
node/src/layouts/default.html.eco

@ -76,6 +76,7 @@
<script src="/components/semantic/modules/behavior/state.js"></script> <script src="/components/semantic/modules/behavior/state.js"></script>
<script src="/components/semantic/modules/checkbox.js"></script> <script src="/components/semantic/modules/checkbox.js"></script>
<script src="/components/semantic/modules/dimmer.js"></script> <script src="/components/semantic/modules/dimmer.js"></script>
<script src="/components/semantic/modules/dropdown.js"></script>
<script src="/components/semantic/modules/popup.js"></script> <script src="/components/semantic/modules/popup.js"></script>
<script src="/components/semantic/modules/tab.js"></script> <script src="/components/semantic/modules/tab.js"></script>
<script src="/components/semantic/modules/transition.js"></script> <script src="/components/semantic/modules/transition.js"></script>
@ -167,8 +168,8 @@
<i class="left arrow icon"></i> <i class="left arrow icon"></i>
<% end %> <% end %>
</div> </div>
<div class="section ui simple dropdown item">
<span class="count"><%= "#{pageNumber} of #{pageCount}" %></span>
<div class="section ui dropdown item">
<a class="count"><%= "#{pageNumber} of #{pageCount}" %></a>
<div class="menu"> <div class="menu">
<% for element, index in currentCollection: %> <% for element, index in currentCollection: %>
<div class="<%= if element.id is @document.id then 'active ' %>item"> <div class="<%= if element.id is @document.id then 'active ' %>item">

Loading…
Cancel
Save