Sha256: 95f376c91759c2c50eddb8d2525fbdcf81618fe6dd7e02fe385b0c481975d7dc

Contents?: true

Size: 1.16 KB

Versions: 12

Compression:

Stored size: 1.16 KB

Contents

I"›(function() {
  this.app.directive('repeaterField', [
    '$compile', '$timeout', function($compile, $timeout) {
      return {
        restrict: 'A',
        scope: true,
        link: function($scope, $el, $attrs) {
          var $rows, template;
          $rows = $('.rows', $el);
          template = $('.template', $el).text();
          $scope.addRow = function() {
            var $dom, $row, uid;
            uid = Math.uid();
            $row = $(template);
            $row.attr('data-uid', uid);
            $rows.append($row);
            $dom = $("[data-uid='" + uid + "']", $rows);
            $compile($dom)($scope);
            $timeout(function() {
              return $dom.trigger('init.fndtn');
            });
            return true;
          };
          if (!$rows.children().length) {
            return $scope.addRow();
          }
        }
      };
    }
  ]);

  this.app.directive('repeaterRow', function() {
    return {
      restrict: 'A',
      scope: true,
      link: function($scope, $el, $attrs) {
        return $scope.removeRow = function() {
          $el.remove();
          return true;
        };
      }
    };
  });

}).call(this);
:ET

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
push_type_auth-0.7.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/iYjRDVTnJaFN_g4rg7S_c_LjbsYyVbpudALs4w-W6Jk.cache
push_type_admin-0.7.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/iYjRDVTnJaFN_g4rg7S_c_LjbsYyVbpudALs4w-W6Jk.cache
push_type_auth-0.7.0.beta.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_admin-0.7.0.beta.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_auth-0.6.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_admin-0.6.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_auth-0.6.0.beta.4 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_admin-0.6.0.beta.4 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_auth-0.6.0.beta.3 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_admin-0.6.0.beta.3 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_auth-0.6.0.beta.2 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache
push_type_admin-0.6.0.beta.2 test/dummy/tmp/cache/assets/test/sprockets/v3.0/3LxVbFL3l9A2TlSeH7h2o-F13L_JW1mkCx_M9d4C7A8.cache