Sha256: 83d69fa7ef942d8107fc2a3fe0c022e9f652bf0e5f333db93b19f072373f82ad

Contents?: true

Size: 1.64 KB

Versions: 58

Compression:

Stored size: 1.64 KB

Contents

I"ˆ(function() {
  $(document).on("ready page:load", function() {
    $("button.reset").click(function() {
      var form;
      form = $(this).parents("form");
      form.find("select option:first-child").map(function() {
        return this.selected = true;
      });
      form.find("input").map(function() {
        if (this.type.match(/submit|hidden|button/)) {
          return;
        }
        return this.value = $(this).data("default-value") || "";
      });
      form.find("textarea").map(function() {
        return this.value = $(this).data("default-value") || "";
      });
      return form.find("select").map(function() {
        if (this.selectize) {
          return this.selectize.clear();
        }
      });
    });
    $("form").submit(function() {
      var input;
      if (this.method.toUpperCase() === "GET") {
        return;
      }
      if ($(this).find("[name=back_url]").length > 0) {
        return;
      }
      input = document.createElement("input");
      input.type = "hidden";
      input.name = "back_url";
      input.value = location.href;
      return $(this).append(input);
    });
    return $(".form-group.upload").map(function() {
      $(this).find("label").map(function() {
        return this.dataset.defaultValue = $(this).html();
      });
      return $(this).find("input").change(function() {
        if (this.value !== "") {
          return $(this).parents(".upload").find("label").html(this.value);
        } else {
          return $(this).parents(".upload").find("label").map(function() {
            return $(this).html(this.dataset.defaultValue);
          });
        }
      });
    });
  });

}).call(this);
:ET

Version data entries

58 entries across 29 versions & 1 rubygems

Version Path
dorsale-2.6.8 spec/dummy/tmp/cache/assets/sprockets/v3.0/ZF/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.8 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.8 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.7 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.7 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.7 spec/dummy/tmp/cache/assets/sprockets/v3.0/ZF/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.6 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.6 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.5 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.5 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.4 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.4 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.3 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.3 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.2 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.2 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.1 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.1 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.0 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache
dorsale-2.6.0 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF9Gs7aIuyH4fNfCkRYKHxqbWN46YiCSNDxsl4H28Zg.cache