all repos — litestore @ bfaf9633a6259f119b0c70ec12241fc952a4f6eb

A minimalist nosql document store.

app/js/components.js

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
var app = app || {};

var bsNavDropdown = function() {
  var dropdown = {}
  dropdown.view = function(ctrl) {
    return m("li.dropdown", [
      m("a.dropdown-toggle[href='#'][data-toggle='dropdown'][role='button'][aria-expanded='false']",
        [m("span", ctrl.title()+" "), m("span.caret")]),
      m("ul.dropdown-menu[role='menu']", 
        ctrl.links().map(function(e){
          return m("li", 
            [m("a", {href: e.path, config: m.route}, e.title)])}))
      ])
  };
  return dropdown;
};