Sha256: 2af9e15602c273702ca1dd88122dcc884b8ece5aececf1d1e77e648a39fba6fd

Contents?: true

Size: 1.24 KB

Versions: 11

Compression:

Stored size: 1.24 KB

Contents

I"é(function() {
  App.UI.Tabs = (function() {
    function Tabs(node, delegator) {
      this.sel = $(node);
      this.delegator = delegator;
      this.handle();
    }

    Tabs.prototype.handle = function() {
      var elementsSize;
      elementsSize = this.sel.find('a').size();
      return this.sel.find('a').click((function(_this) {
        return function(e) {
          var child, i, index, left, len, ref, width;
          e.preventDefault();
          if ($(e.target).hasClass("active")) {
            return;
          }
          index = 0;
          ref = $(e.target).parent().children('a');
          for (i = 0, len = ref.length; i < len; i++) {
            child = ref[i];
            if ($(child).text() === $(e.target).text()) {
              break;
            }
            index += 1;
          }
          width = parseInt(_this.sel.css('width'));
          left = width / elementsSize * index;
          _this.sel.find('a.active').removeClass('active');
          $(e.target).addClass('active');
          _this.sel.find('div.background').velocity({
            left: left
          }, 200);
          return _this.delegator[$(e.target).data("action")]();
        };
      })(this));
    };

    return Tabs;

  })();

}).call(this);
:ET

Version data entries

11 entries across 4 versions & 1 rubygems

Version Path
loco-rails-1.0.2 test/dummy/tmp/cache/assets/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache
loco-rails-1.0.2 test/dummy/tmp/cache/assets/test/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache
loco-rails-1.0.2 test/dummy/tmp/cache/assets/sprockets/v3.0/Ur0Ri_EtmEyceFRLOImPNTS47AY4Ma1_kl3xhH8Wb0g.cache
loco-rails-1.0.1 test/dummy/tmp/cache/assets/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache
loco-rails-1.0.1 test/dummy/tmp/cache/assets/sprockets/v3.0/Ur0Ri_EtmEyceFRLOImPNTS47AY4Ma1_kl3xhH8Wb0g.cache
loco-rails-1.0.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache
loco-rails-1.0.0 test/dummy/tmp/cache/assets/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache
loco-rails-1.0.0 test/dummy/tmp/cache/assets/sprockets/v3.0/Ur0Ri_EtmEyceFRLOImPNTS47AY4Ma1_kl3xhH8Wb0g.cache
loco-rails-1.0.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache
loco-rails-0.0.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache
loco-rails-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/v3.0/BCnvRnQl3IU-s7e3QcgX4LmB2eerhvMbkvu5fECDips.cache