Sha256: 8bea751233c31a10dd2dc61d0ff315d709c343ed185ad1254d8dd887f43105e3

Contents?: true

Size: 1.6 KB

Versions: 23

Compression:

Stored size: 1.6 KB

Contents

I"Y(function() {
  var Link;

  Link = (function() {
    function Link(page, $link) {
      this.page = page;
      this.$link = $link;
    }

    Link.prototype.allows_process = function(event) {
      return !(this._cross_origin_link(event.currentTarget) || this._non_standard_click(event));
    };

    Link.prototype.process = function() {
      var type;
      type = this.$link.data('push') === 'partial' ? 'partial' : 'template';
      return this.page.load(this.$link.attr("href"), this.$link.data('target'), type);
    };

    Link.prototype._cross_origin_link = function(link) {
      return this._different_protocol(link) || this._different_host(link) || this._different_port(link);
    };

    Link.prototype._different_protocol = function(link) {
      if (link.protocol === ':' || link.protocol === '') {
        return false;
      }
      return location.protocol !== link.protocol;
    };

    Link.prototype._different_host = function(link) {
      if (link.host === '') {
        return false;
      }
      return location.host.split(':')[0] !== link.host.split(':')[0];
    };

    Link.prototype._different_port = function(link) {
      var port_equals;
      port_equals = (location.port === link.port) || (location.port === '' && (link.port === "80" || link.port === "443"));
      return !port_equals;
    };

    Link.prototype._non_standard_click = function(event) {
      return event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
    };

    return Link;

  })();

  if (window._Wiselinks === void 0) {
    window._Wiselinks = {};
  }

  window._Wiselinks.Link = Link;

}).call(this);
:ET

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
templus_models-1.5.14 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.12 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.11 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.10 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.9 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.8 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.7 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.6 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.5 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.4 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.3 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.2 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.1 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.5.0 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.4.4 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.4.3 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.4.2 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.2.6 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.2.5 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache
templus_models-1.2.4 test/dummy/tmp/cache/assets/development/sprockets/v3.0/kZr38u_cg8ZMtc2l2-TroCyFSCGoTkhWo4mkOGaYGb8.cache