require "formula" class LibpokerEval < Formula homepage "http://pokersource.sourceforge.net" url "http://download.gna.org/pokersource/sources/poker-eval-138.0.tar.gz" sha1 "b31e8731dd1cd6717002e175a00d309fc8b02781" bottle do cellar :any revision 1 sha1 "c9296719a25202cc2e285b9424765b323457a074" => :yosemite sha1 "80b6927bcbcef1e0c64bed7c57e57ddf0fdef008" => :mavericks sha1 "dd113717a5f0dabf6942217b6f48c65d62263755" => :mountain_lion end def install system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" system "make", "install" end end a1604c12262b66ce3b8004994fb4841fb8b87d'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/a.js
blob: 0cd04ec4170c33df532f32a0790b73d5249e8f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';

/**
 * @ngdoc directive
 * @name ng.directive:a
 * @restrict E
 *
 * @description
 * Modifies the default behavior of html A tag, so that the default action is prevented when href
 * attribute is empty.
 *
 * The reasoning for this change is to allow easy creation of action links with `ngClick` directive
 * without changing the location or causing page reloads, e.g.:
 * <a href="" ng-click="model.$save()">Save</a>
 */
var htmlAnchorDirective = valueFn({
  restrict: 'E',
  compile: function(element, attr) {
    // turn <a href ng-click="..">link</a> into a link in IE
    // but only if it doesn't have name attribute, in which case it's an anchor
    if (!attr.href) {
      attr.$set('href', '');
    }

    return function(scope, element) {
      element.bind('click', function(event){
        // if we have no href url, then don't navigate anywhere.
        if (!element.attr('href')) {
          event.preventDefault();
          return false; // Needed for opera
        }
      });
    }
  }
});