pbw 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
 - data/MIT-LICENSE +1 -1
 - data/Rakefile +7 -0
 - data/app/controllers/pbw/application_controller.rb +9 -3
 - data/app/controllers/pbw/areas_controller.rb +7 -0
 - data/app/controllers/pbw/base_models_controller.rb +106 -0
 - data/app/controllers/pbw/capabilities_controller.rb +7 -0
 - data/app/controllers/pbw/constraints_controller.rb +7 -0
 - data/app/controllers/pbw/item_containers_controller.rb +7 -0
 - data/app/controllers/pbw/item_conversions_controller.rb +7 -0
 - data/app/controllers/pbw/item_transfers_controller.rb +7 -0
 - data/app/controllers/pbw/items_controller.rb +7 -0
 - data/app/controllers/pbw/processes_controller.rb +7 -0
 - data/app/controllers/pbw/roles_controller.rb +5 -2
 - data/app/controllers/pbw/tokens_controller.rb +7 -0
 - data/app/controllers/pbw/triggers_controller.rb +7 -0
 - data/app/controllers/pbw/user_tokens_controller.rb +7 -0
 - data/app/models/pbw/area.rb +17 -0
 - data/app/models/pbw/capability.rb +5 -0
 - data/app/models/pbw/constraint.rb +6 -0
 - data/app/models/pbw/item.rb +15 -0
 - data/app/models/pbw/item_container.rb +12 -0
 - data/app/models/pbw/item_conversion.rb +9 -0
 - data/app/models/pbw/item_transfer.rb +9 -0
 - data/app/models/pbw/permission.rb +1 -0
 - data/app/models/pbw/process.rb +10 -0
 - data/app/models/pbw/role.rb +1 -0
 - data/app/models/pbw/rule.rb +11 -0
 - data/app/models/pbw/token.rb +16 -0
 - data/app/models/pbw/trigger.rb +7 -0
 - data/app/models/pbw/user.rb +7 -5
 - data/app/models/pbw/user_token.rb +16 -0
 - data/app/views/layouts/pbw/application.html.erb +41 -8
 - data/config/initializers/devise.rb +80 -4
 - data/config/locales/devise.en.yml +59 -0
 - data/config/routes.rb +11 -0
 - data/lib/generators/pbw/install/install_generator.rb +9 -1
 - data/lib/generators/pbw/install/templates/application.html.erb +47 -0
 - data/lib/pbw/engine.rb +33 -13
 - data/lib/pbw/version.rb +1 -1
 - data/public/Foundation-MIT-LICENSE.txt +20 -0
 - data/public/config.rb +26 -0
 - data/public/humans.txt +8 -0
 - data/public/javascripts/foundation/foundation.alerts.js +52 -0
 - data/public/javascripts/foundation/foundation.clearing.js +516 -0
 - data/public/javascripts/foundation/foundation.cookie.js +74 -0
 - data/public/javascripts/foundation/foundation.dropdown.js +178 -0
 - data/public/javascripts/foundation/foundation.forms.js +525 -0
 - data/public/javascripts/foundation/foundation.interchange.js +271 -0
 - data/public/javascripts/foundation/foundation.joyride.js +844 -0
 - data/public/javascripts/foundation/foundation.js +447 -0
 - data/public/javascripts/foundation/foundation.magellan.js +134 -0
 - data/public/javascripts/foundation/foundation.orbit.js +390 -0
 - data/public/javascripts/foundation/foundation.placeholder.js +179 -0
 - data/public/javascripts/foundation/foundation.reveal.js +330 -0
 - data/public/javascripts/foundation/foundation.section.js +422 -0
 - data/public/javascripts/foundation/foundation.tooltips.js +208 -0
 - data/public/javascripts/foundation/foundation.topbar.js +303 -0
 - data/public/javascripts/vendor/custom.modernizr.js +4 -0
 - data/public/javascripts/vendor/jquery.js +9807 -0
 - data/public/javascripts/vendor/zepto.js +2000 -0
 - data/public/robots.txt +4 -0
 - data/public/sass/_normalize.scss +402 -0
 - data/public/sass/_settings.scss +1271 -0
 - data/public/sass/app.scss +48 -0
 - data/public/stylesheets/app.css +6686 -0
 - metadata +82 -4
 - data/app/assets/javascripts/pbw/application.js +0 -13
 - data/app/assets/stylesheets/pbw/application.css +0 -13
 
| 
         @@ -0,0 +1,303 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /*jslint unparam: true, browser: true, indent: 2 */
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ;(function ($, window, document, undefined) {
         
     | 
| 
      
 4 
     | 
    
         
            +
              'use strict';
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              Foundation.libs.topbar = {
         
     | 
| 
      
 7 
     | 
    
         
            +
                name : 'topbar',
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                version : '4.2.3',
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                settings : {
         
     | 
| 
      
 12 
     | 
    
         
            +
                  index : 0,
         
     | 
| 
      
 13 
     | 
    
         
            +
                  stickyClass : 'sticky',
         
     | 
| 
      
 14 
     | 
    
         
            +
                  custom_back_text: true,
         
     | 
| 
      
 15 
     | 
    
         
            +
                  back_text: 'Back',
         
     | 
| 
      
 16 
     | 
    
         
            +
                  is_hover: true,
         
     | 
| 
      
 17 
     | 
    
         
            +
                  scrolltop : true, // jump to top when sticky nav menu toggle is clicked
         
     | 
| 
      
 18 
     | 
    
         
            +
                  init : false
         
     | 
| 
      
 19 
     | 
    
         
            +
                },
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                init : function (section, method, options) {
         
     | 
| 
      
 22 
     | 
    
         
            +
                  Foundation.inherit(this, 'data_options');
         
     | 
| 
      
 23 
     | 
    
         
            +
                  var self = this;
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                  if (typeof method === 'object') {
         
     | 
| 
      
 26 
     | 
    
         
            +
                    $.extend(true, this.settings, method);
         
     | 
| 
      
 27 
     | 
    
         
            +
                  } else if (typeof options !== 'undefined') {
         
     | 
| 
      
 28 
     | 
    
         
            +
                    $.extend(true, this.settings, options);
         
     | 
| 
      
 29 
     | 
    
         
            +
                  }
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                  if (typeof method !== 'string') {
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                    $('.top-bar, [data-topbar]').each(function () {
         
     | 
| 
      
 34 
     | 
    
         
            +
                      $.extend(true, self.settings, self.data_options($(this)));
         
     | 
| 
      
 35 
     | 
    
         
            +
                      self.settings.$w = $(window);
         
     | 
| 
      
 36 
     | 
    
         
            +
                      self.settings.$topbar = $(this);
         
     | 
| 
      
 37 
     | 
    
         
            +
                      self.settings.$section = self.settings.$topbar.find('section');
         
     | 
| 
      
 38 
     | 
    
         
            +
                      self.settings.$titlebar = self.settings.$topbar.children('ul').first();
         
     | 
| 
      
 39 
     | 
    
         
            +
                      self.settings.$topbar.data('index', 0);
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                      var breakpoint = $("<div class='top-bar-js-breakpoint'/>").insertAfter(self.settings.$topbar);
         
     | 
| 
      
 42 
     | 
    
         
            +
                      self.settings.breakPoint = breakpoint.width();
         
     | 
| 
      
 43 
     | 
    
         
            +
                      breakpoint.remove();
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                      self.assemble();
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                      if (self.settings.$topbar.parent().hasClass('fixed')) {
         
     | 
| 
      
 48 
     | 
    
         
            +
                        $('body').css('padding-top', self.outerHeight(self.settings.$topbar));
         
     | 
| 
      
 49 
     | 
    
         
            +
                      }
         
     | 
| 
      
 50 
     | 
    
         
            +
                    });
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                    if (!self.settings.init) {
         
     | 
| 
      
 53 
     | 
    
         
            +
                      this.events();
         
     | 
| 
      
 54 
     | 
    
         
            +
                    }
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                    return this.settings.init;
         
     | 
| 
      
 57 
     | 
    
         
            +
                  } else {
         
     | 
| 
      
 58 
     | 
    
         
            +
                    // fire method
         
     | 
| 
      
 59 
     | 
    
         
            +
                    return this[method].call(this, options);
         
     | 
| 
      
 60 
     | 
    
         
            +
                  }
         
     | 
| 
      
 61 
     | 
    
         
            +
                },
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                events : function () {
         
     | 
| 
      
 64 
     | 
    
         
            +
                  var self = this;
         
     | 
| 
      
 65 
     | 
    
         
            +
                  var offst = this.outerHeight($('.top-bar, [data-topbar]'));
         
     | 
| 
      
 66 
     | 
    
         
            +
                  $(this.scope)
         
     | 
| 
      
 67 
     | 
    
         
            +
                    .off('.fndtn.topbar')
         
     | 
| 
      
 68 
     | 
    
         
            +
                    .on('click.fndtn.topbar', '.top-bar .toggle-topbar, [data-topbar] .toggle-topbar', function (e) {
         
     | 
| 
      
 69 
     | 
    
         
            +
                      var topbar = $(this).closest('.top-bar, [data-topbar]'),
         
     | 
| 
      
 70 
     | 
    
         
            +
                          section = topbar.find('section, .section'),
         
     | 
| 
      
 71 
     | 
    
         
            +
                          titlebar = topbar.children('ul').first();
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
                      e.preventDefault();
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
                      if (self.breakpoint()) {
         
     | 
| 
      
 76 
     | 
    
         
            +
                        if (!self.rtl) {
         
     | 
| 
      
 77 
     | 
    
         
            +
                          section.css({left: '0%'});
         
     | 
| 
      
 78 
     | 
    
         
            +
                          section.find('>.name').css({left: '100%'});
         
     | 
| 
      
 79 
     | 
    
         
            +
                        } else {
         
     | 
| 
      
 80 
     | 
    
         
            +
                          section.css({right: '0%'});
         
     | 
| 
      
 81 
     | 
    
         
            +
                          section.find('>.name').css({right: '100%'});
         
     | 
| 
      
 82 
     | 
    
         
            +
                        }
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                        section.find('li.moved').removeClass('moved');
         
     | 
| 
      
 85 
     | 
    
         
            +
                        topbar.data('index', 0);
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
                        topbar
         
     | 
| 
      
 88 
     | 
    
         
            +
                          .toggleClass('expanded')
         
     | 
| 
      
 89 
     | 
    
         
            +
                          .css('height', '');
         
     | 
| 
      
 90 
     | 
    
         
            +
                      }
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
                      if (!topbar.hasClass('expanded')) {
         
     | 
| 
      
 93 
     | 
    
         
            +
                        if (topbar.hasClass('fixed')) {
         
     | 
| 
      
 94 
     | 
    
         
            +
                          topbar.parent().addClass('fixed');
         
     | 
| 
      
 95 
     | 
    
         
            +
                          topbar.removeClass('fixed');
         
     | 
| 
      
 96 
     | 
    
         
            +
                          $('body').css('padding-top',offst);
         
     | 
| 
      
 97 
     | 
    
         
            +
                        }
         
     | 
| 
      
 98 
     | 
    
         
            +
                      } else if (topbar.parent().hasClass('fixed')) {
         
     | 
| 
      
 99 
     | 
    
         
            +
                        topbar.parent().removeClass('fixed');
         
     | 
| 
      
 100 
     | 
    
         
            +
                        topbar.addClass('fixed');
         
     | 
| 
      
 101 
     | 
    
         
            +
                        $('body').css('padding-top','0');
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
                        if (self.settings.scrolltop) {
         
     | 
| 
      
 104 
     | 
    
         
            +
                          window.scrollTo(0,0);
         
     | 
| 
      
 105 
     | 
    
         
            +
                        }
         
     | 
| 
      
 106 
     | 
    
         
            +
                      }
         
     | 
| 
      
 107 
     | 
    
         
            +
                    })
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
                    .on('mouseenter mouseleave', '.top-bar li', function (e) {
         
     | 
| 
      
 110 
     | 
    
         
            +
                      if (!self.settings.is_hover) return;
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
                      if (/enter|over/i.test(e.type)) {
         
     | 
| 
      
 113 
     | 
    
         
            +
                        $(this).addClass('hover');
         
     | 
| 
      
 114 
     | 
    
         
            +
                      } else {
         
     | 
| 
      
 115 
     | 
    
         
            +
                        $(this).removeClass('hover');
         
     | 
| 
      
 116 
     | 
    
         
            +
                      }
         
     | 
| 
      
 117 
     | 
    
         
            +
                    })
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
                    .on('click.fndtn.topbar', '.top-bar li.has-dropdown', function (e) {
         
     | 
| 
      
 120 
     | 
    
         
            +
                      if (self.breakpoint()) return;
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
                      var li = $(this),
         
     | 
| 
      
 123 
     | 
    
         
            +
                          target = $(e.target),
         
     | 
| 
      
 124 
     | 
    
         
            +
                          topbar = li.closest('[data-topbar], .top-bar'),
         
     | 
| 
      
 125 
     | 
    
         
            +
                          is_hover = topbar.data('topbar');
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
                      if (self.settings.is_hover && !Modernizr.touch) return;
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                      e.stopImmediatePropagation();
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
                      if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) {
         
     | 
| 
      
 132 
     | 
    
         
            +
                        e.preventDefault();
         
     | 
| 
      
 133 
     | 
    
         
            +
                      }
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
                      if (li.hasClass('hover')) {
         
     | 
| 
      
 136 
     | 
    
         
            +
                        li
         
     | 
| 
      
 137 
     | 
    
         
            +
                          .removeClass('hover')
         
     | 
| 
      
 138 
     | 
    
         
            +
                          .find('li')
         
     | 
| 
      
 139 
     | 
    
         
            +
                          .removeClass('hover');
         
     | 
| 
      
 140 
     | 
    
         
            +
                      } else {
         
     | 
| 
      
 141 
     | 
    
         
            +
                        li.addClass('hover');
         
     | 
| 
      
 142 
     | 
    
         
            +
                      }
         
     | 
| 
      
 143 
     | 
    
         
            +
                    })
         
     | 
| 
      
 144 
     | 
    
         
            +
             
     | 
| 
      
 145 
     | 
    
         
            +
                    .on('click.fndtn.topbar', '.top-bar .has-dropdown>a, [data-topbar] .has-dropdown>a', function (e) {
         
     | 
| 
      
 146 
     | 
    
         
            +
                      if (self.breakpoint()) {
         
     | 
| 
      
 147 
     | 
    
         
            +
                        e.preventDefault();
         
     | 
| 
      
 148 
     | 
    
         
            +
             
     | 
| 
      
 149 
     | 
    
         
            +
                        var $this = $(this),
         
     | 
| 
      
 150 
     | 
    
         
            +
                            topbar = $this.closest('.top-bar, [data-topbar]'),
         
     | 
| 
      
 151 
     | 
    
         
            +
                            section = topbar.find('section, .section'),
         
     | 
| 
      
 152 
     | 
    
         
            +
                            titlebar = topbar.children('ul').first(),
         
     | 
| 
      
 153 
     | 
    
         
            +
                            dropdownHeight = $this.next('.dropdown').outerHeight(),
         
     | 
| 
      
 154 
     | 
    
         
            +
                            $selectedLi = $this.closest('li');
         
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
                        topbar.data('index', topbar.data('index') + 1);
         
     | 
| 
      
 157 
     | 
    
         
            +
                        $selectedLi.addClass('moved');
         
     | 
| 
      
 158 
     | 
    
         
            +
             
     | 
| 
      
 159 
     | 
    
         
            +
                        if (!self.rtl) {
         
     | 
| 
      
 160 
     | 
    
         
            +
                          section.css({left: -(100 * topbar.data('index')) + '%'});
         
     | 
| 
      
 161 
     | 
    
         
            +
                          section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
         
     | 
| 
      
 162 
     | 
    
         
            +
                        } else {
         
     | 
| 
      
 163 
     | 
    
         
            +
                          section.css({right: -(100 * topbar.data('index')) + '%'});
         
     | 
| 
      
 164 
     | 
    
         
            +
                          section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
         
     | 
| 
      
 165 
     | 
    
         
            +
                        }
         
     | 
| 
      
 166 
     | 
    
         
            +
             
     | 
| 
      
 167 
     | 
    
         
            +
                        topbar.css('height', self.outerHeight($this.siblings('ul'), true) + self.outerHeight(titlebar, true));
         
     | 
| 
      
 168 
     | 
    
         
            +
                      }
         
     | 
| 
      
 169 
     | 
    
         
            +
                    });
         
     | 
| 
      
 170 
     | 
    
         
            +
             
     | 
| 
      
 171 
     | 
    
         
            +
                  $(window).on('resize.fndtn.topbar', function () {
         
     | 
| 
      
 172 
     | 
    
         
            +
                    if (!self.breakpoint()) {
         
     | 
| 
      
 173 
     | 
    
         
            +
                      $('.top-bar, [data-topbar]')
         
     | 
| 
      
 174 
     | 
    
         
            +
                        .css('height', '')
         
     | 
| 
      
 175 
     | 
    
         
            +
                        .removeClass('expanded')
         
     | 
| 
      
 176 
     | 
    
         
            +
                        .find('li')
         
     | 
| 
      
 177 
     | 
    
         
            +
                        .removeClass('hover');
         
     | 
| 
      
 178 
     | 
    
         
            +
                    }
         
     | 
| 
      
 179 
     | 
    
         
            +
                  }.bind(this));
         
     | 
| 
      
 180 
     | 
    
         
            +
             
     | 
| 
      
 181 
     | 
    
         
            +
                  $('body').on('click.fndtn.topbar', function (e) {
         
     | 
| 
      
 182 
     | 
    
         
            +
                    var parent = $(e.target).closest('[data-topbar], .top-bar');
         
     | 
| 
      
 183 
     | 
    
         
            +
             
     | 
| 
      
 184 
     | 
    
         
            +
                    if (parent.length > 0) {
         
     | 
| 
      
 185 
     | 
    
         
            +
                      return;
         
     | 
| 
      
 186 
     | 
    
         
            +
                    }
         
     | 
| 
      
 187 
     | 
    
         
            +
             
     | 
| 
      
 188 
     | 
    
         
            +
                    $('.top-bar li, [data-topbar] li').removeClass('hover');
         
     | 
| 
      
 189 
     | 
    
         
            +
                  });
         
     | 
| 
      
 190 
     | 
    
         
            +
             
     | 
| 
      
 191 
     | 
    
         
            +
                  // Go up a level on Click
         
     | 
| 
      
 192 
     | 
    
         
            +
                  $(this.scope).on('click.fndtn', '.top-bar .has-dropdown .back, [data-topbar] .has-dropdown .back', function (e) {
         
     | 
| 
      
 193 
     | 
    
         
            +
                    e.preventDefault();
         
     | 
| 
      
 194 
     | 
    
         
            +
             
     | 
| 
      
 195 
     | 
    
         
            +
                    var $this = $(this),
         
     | 
| 
      
 196 
     | 
    
         
            +
                        topbar = $this.closest('.top-bar, [data-topbar]'),
         
     | 
| 
      
 197 
     | 
    
         
            +
                        titlebar = topbar.children('ul').first(),
         
     | 
| 
      
 198 
     | 
    
         
            +
                        section = topbar.find('section, .section'),
         
     | 
| 
      
 199 
     | 
    
         
            +
                        $movedLi = $this.closest('li.moved'),
         
     | 
| 
      
 200 
     | 
    
         
            +
                        $previousLevelUl = $movedLi.parent();
         
     | 
| 
      
 201 
     | 
    
         
            +
             
     | 
| 
      
 202 
     | 
    
         
            +
                    topbar.data('index', topbar.data('index') - 1);
         
     | 
| 
      
 203 
     | 
    
         
            +
             
     | 
| 
      
 204 
     | 
    
         
            +
                    if (!self.rtl) {
         
     | 
| 
      
 205 
     | 
    
         
            +
                      section.css({left: -(100 * topbar.data('index')) + '%'});
         
     | 
| 
      
 206 
     | 
    
         
            +
                      section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
         
     | 
| 
      
 207 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 208 
     | 
    
         
            +
                      section.css({right: -(100 * topbar.data('index')) + '%'});
         
     | 
| 
      
 209 
     | 
    
         
            +
                      section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
         
     | 
| 
      
 210 
     | 
    
         
            +
                    }
         
     | 
| 
      
 211 
     | 
    
         
            +
             
     | 
| 
      
 212 
     | 
    
         
            +
                    if (topbar.data('index') === 0) {
         
     | 
| 
      
 213 
     | 
    
         
            +
                      topbar.css('height', '');
         
     | 
| 
      
 214 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 215 
     | 
    
         
            +
                      topbar.css('height', self.outerHeight($previousLevelUl, true) + self.outerHeight(titlebar, true));
         
     | 
| 
      
 216 
     | 
    
         
            +
                    }
         
     | 
| 
      
 217 
     | 
    
         
            +
             
     | 
| 
      
 218 
     | 
    
         
            +
                    setTimeout(function () {
         
     | 
| 
      
 219 
     | 
    
         
            +
                      $movedLi.removeClass('moved');
         
     | 
| 
      
 220 
     | 
    
         
            +
                    }, 300);
         
     | 
| 
      
 221 
     | 
    
         
            +
                  });
         
     | 
| 
      
 222 
     | 
    
         
            +
                },
         
     | 
| 
      
 223 
     | 
    
         
            +
             
     | 
| 
      
 224 
     | 
    
         
            +
                breakpoint : function () {
         
     | 
| 
      
 225 
     | 
    
         
            +
                  return $(document).width() <= this.settings.breakPoint || $('html').hasClass('lt-ie9');
         
     | 
| 
      
 226 
     | 
    
         
            +
                },
         
     | 
| 
      
 227 
     | 
    
         
            +
             
     | 
| 
      
 228 
     | 
    
         
            +
                assemble : function () {
         
     | 
| 
      
 229 
     | 
    
         
            +
                  var self = this;
         
     | 
| 
      
 230 
     | 
    
         
            +
                  // Pull element out of the DOM for manipulation
         
     | 
| 
      
 231 
     | 
    
         
            +
                  this.settings.$section.detach();
         
     | 
| 
      
 232 
     | 
    
         
            +
             
     | 
| 
      
 233 
     | 
    
         
            +
                  this.settings.$section.find('.has-dropdown>a').each(function () {
         
     | 
| 
      
 234 
     | 
    
         
            +
                    var $link = $(this),
         
     | 
| 
      
 235 
     | 
    
         
            +
                        $dropdown = $link.siblings('.dropdown'),
         
     | 
| 
      
 236 
     | 
    
         
            +
                        url = $link.attr('href');
         
     | 
| 
      
 237 
     | 
    
         
            +
             
     | 
| 
      
 238 
     | 
    
         
            +
                    if (url && url.length > 1) {
         
     | 
| 
      
 239 
     | 
    
         
            +
                      var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
         
     | 
| 
      
 240 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 241 
     | 
    
         
            +
                      var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');
         
     | 
| 
      
 242 
     | 
    
         
            +
                    }
         
     | 
| 
      
 243 
     | 
    
         
            +
             
     | 
| 
      
 244 
     | 
    
         
            +
                    // Copy link to subnav
         
     | 
| 
      
 245 
     | 
    
         
            +
                    if (self.settings.custom_back_text == true) {
         
     | 
| 
      
 246 
     | 
    
         
            +
                      $titleLi.find('h5>a').html('« ' + self.settings.back_text);
         
     | 
| 
      
 247 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 248 
     | 
    
         
            +
                      $titleLi.find('h5>a').html('« ' + $link.html());
         
     | 
| 
      
 249 
     | 
    
         
            +
                    }
         
     | 
| 
      
 250 
     | 
    
         
            +
                    $dropdown.prepend($titleLi);
         
     | 
| 
      
 251 
     | 
    
         
            +
                  });
         
     | 
| 
      
 252 
     | 
    
         
            +
             
     | 
| 
      
 253 
     | 
    
         
            +
                  // Put element back in the DOM
         
     | 
| 
      
 254 
     | 
    
         
            +
                  this.settings.$section.appendTo(this.settings.$topbar);
         
     | 
| 
      
 255 
     | 
    
         
            +
             
     | 
| 
      
 256 
     | 
    
         
            +
                  // check for sticky
         
     | 
| 
      
 257 
     | 
    
         
            +
                  this.sticky();
         
     | 
| 
      
 258 
     | 
    
         
            +
                },
         
     | 
| 
      
 259 
     | 
    
         
            +
             
     | 
| 
      
 260 
     | 
    
         
            +
                height : function (ul) {
         
     | 
| 
      
 261 
     | 
    
         
            +
                  var total = 0,
         
     | 
| 
      
 262 
     | 
    
         
            +
                      self = this;
         
     | 
| 
      
 263 
     | 
    
         
            +
             
     | 
| 
      
 264 
     | 
    
         
            +
                  ul.find('> li').each(function () { total += self.outerHeight($(this), true); });
         
     | 
| 
      
 265 
     | 
    
         
            +
             
     | 
| 
      
 266 
     | 
    
         
            +
                  return total;
         
     | 
| 
      
 267 
     | 
    
         
            +
                },
         
     | 
| 
      
 268 
     | 
    
         
            +
             
     | 
| 
      
 269 
     | 
    
         
            +
                sticky : function () {
         
     | 
| 
      
 270 
     | 
    
         
            +
                  var klass = '.' + this.settings.stickyClass;
         
     | 
| 
      
 271 
     | 
    
         
            +
                  if ($(klass).length > 0) {
         
     | 
| 
      
 272 
     | 
    
         
            +
                    var distance = $(klass).length ? $(klass).offset().top: 0,
         
     | 
| 
      
 273 
     | 
    
         
            +
                        $window = $(window);
         
     | 
| 
      
 274 
     | 
    
         
            +
                        var offst = this.outerHeight($('.top-bar'));
         
     | 
| 
      
 275 
     | 
    
         
            +
                    //Whe resize elements of the page on windows resize. Must recalculate distance
         
     | 
| 
      
 276 
     | 
    
         
            +
            		$(window).resize(function() {
         
     | 
| 
      
 277 
     | 
    
         
            +
                        clearTimeout(t_top);
         
     | 
| 
      
 278 
     | 
    
         
            +
            			t_top = setTimeout (function() {
         
     | 
| 
      
 279 
     | 
    
         
            +
            				distance = $(klass).offset().top;
         
     | 
| 
      
 280 
     | 
    
         
            +
            			},105);
         
     | 
| 
      
 281 
     | 
    
         
            +
            		});
         
     | 
| 
      
 282 
     | 
    
         
            +
                      $window.scroll(function() {
         
     | 
| 
      
 283 
     | 
    
         
            +
                        if ($window.scrollTop() > (distance)) {
         
     | 
| 
      
 284 
     | 
    
         
            +
                          $(klass).addClass("fixed");
         
     | 
| 
      
 285 
     | 
    
         
            +
                          $('body').css('padding-top',offst);
         
     | 
| 
      
 286 
     | 
    
         
            +
                        }
         
     | 
| 
      
 287 
     | 
    
         
            +
             
     | 
| 
      
 288 
     | 
    
         
            +
                        else if ($window.scrollTop() <= distance) {
         
     | 
| 
      
 289 
     | 
    
         
            +
                          $(klass).removeClass("fixed");
         
     | 
| 
      
 290 
     | 
    
         
            +
                          $('body').css('padding-top','0');
         
     | 
| 
      
 291 
     | 
    
         
            +
                        }
         
     | 
| 
      
 292 
     | 
    
         
            +
                    });
         
     | 
| 
      
 293 
     | 
    
         
            +
                  }
         
     | 
| 
      
 294 
     | 
    
         
            +
                },
         
     | 
| 
      
 295 
     | 
    
         
            +
             
     | 
| 
      
 296 
     | 
    
         
            +
                off : function () {
         
     | 
| 
      
 297 
     | 
    
         
            +
                  $(this.scope).off('.fndtn.topbar');
         
     | 
| 
      
 298 
     | 
    
         
            +
                  $(window).off('.fndtn.topbar');
         
     | 
| 
      
 299 
     | 
    
         
            +
                },
         
     | 
| 
      
 300 
     | 
    
         
            +
             
     | 
| 
      
 301 
     | 
    
         
            +
                reflow : function () {}
         
     | 
| 
      
 302 
     | 
    
         
            +
              };
         
     | 
| 
      
 303 
     | 
    
         
            +
            }(Foundation.zj, this, this.document));
         
     | 
| 
         @@ -0,0 +1,4 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /* Modernizr 2.6.2 (Custom Build) | MIT & BSD
         
     | 
| 
      
 2 
     | 
    
         
            +
             * Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load
         
     | 
| 
      
 3 
     | 
    
         
            +
             */
         
     | 
| 
      
 4 
     | 
    
         
            +
            ;window.Modernizr=function(a,b,c){function y(a){j.cssText=a}function z(a,b){return y(m.join(a+";")+(b||""))}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={svg:"http://www.w3.org/2000/svg"},o={},p={},q={},r=[],s=r.slice,t,u=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},v=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return u("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},w={}.hasOwnProperty,x;!A(w,"undefined")&&!A(w.call,"undefined")?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=s.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:u(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},o.svg=function(){return!!b.createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==n.svg},o.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(n.svg,"clipPath")))};for(var D in o)x(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.mq=v,e.testStyles=u,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+r.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return!window.addEventListener&&document.documentMode&&document.documentMode===7});
         
     |