]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fixing conflict
authorArthur <arthur@zurb.com>
Fri, 5 Sep 2014 23:34:45 +0000 (16:34 -0700)
committerArthur <arthur@zurb.com>
Fri, 5 Sep 2014 23:34:45 +0000 (16:34 -0700)
1  2 
js/foundation/foundation.dropdown.js

index 09cbe3bf1385e52ac43cb2b0465ebbb6914fa784,a91eb1500b9caec7b69232fdbbad5bef82e74e29..cb8993d9a55b6665e2e9fb895a784eb8d930049f
@@@ -8,9 -8,15 +8,16 @@@
  
      settings : {
        active_class: 'open',
 +      mega_class: 'mega',
        align: 'bottom',
        is_hover: false,
+       smart_position: true,
+       smart_position_arrays: {
+         right:   ['right', 'bottom', 'top', 'left', 'right'],
+         left:    ['left', 'right', 'bottom', 'top', 'left'],
+         top:     ['top', 'right', 'bottom', 'left', 'top'],
+         bottom : ['bottom', 'top', 'right', 'left', 'bottom']
+       },
        opened: function(){},
        closed: function(){}
      },
  
      style : function (dropdown, target, settings) {
        var css = $.extend({position: 'absolute'},
-         this.dirs[settings.align].call(dropdown, target, settings));
++
+         this.position(dropdown, target, settings));
  
        dropdown.attr('style', '').css(css);
      },
        }
      },
  
      // Insert rule to style psuedo elements
 -    adjust_pip : function (pip_offset_base, p) {
 -      var sheet = Foundation.stylesheet;
 +    adjust_pip : function (dropdown,target,settings,position) {
 +      var sheet = Foundation.stylesheet,
 +          pip_offset_base = 8;
  
 -      if (this.small()) {
 -        pip_offset_base += p.left - 8;
 +      if (dropdown.hasClass(settings.mega_class)) {
 +        pip_offset_base = position.left + (target.outerWidth()/2) - 8;
 +      }
 +      else if (this.small()) {
 +        pip_offset_base += position.left - 8;
        }
  
        this.rule_idx = sheet.cssRules.length;