Sha256: 7ccea456d4d61ebb9d58de33e008a8ed06cc7122a1512425f116dc0ee43d5138

Contents?: true

Size: 1.52 KB

Versions: 58

Compression:

Stored size: 1.52 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 this.value = "";
        }
      });
      form.find("textarea").val("");
      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 25 versions & 1 rubygems

Version Path
dorsale-2.2.11 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/pI6WFy1XoFJZ-w-kWMtSFlAjdmqNdCuUbf1mxlHWQRY.cache
dorsale-2.2.11 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.11 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.10 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/pI6WFy1XoFJZ-w-kWMtSFlAjdmqNdCuUbf1mxlHWQRY.cache
dorsale-2.2.10 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.10 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.9 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.9 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/pI6WFy1XoFJZ-w-kWMtSFlAjdmqNdCuUbf1mxlHWQRY.cache
dorsale-2.2.9 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.8 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.8 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/pI6WFy1XoFJZ-w-kWMtSFlAjdmqNdCuUbf1mxlHWQRY.cache
dorsale-2.2.8 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.6 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/pI6WFy1XoFJZ-w-kWMtSFlAjdmqNdCuUbf1mxlHWQRY.cache
dorsale-2.2.6 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.6 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.5 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/pI6WFy1XoFJZ-w-kWMtSFlAjdmqNdCuUbf1mxlHWQRY.cache
dorsale-2.2.5 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.5 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.4 spec/dummy/tmp/cache/assets/development/sprockets/v3.0/IFkv7N38eBBgzqh9jLN9iaJEnexMX6rnGEiZvy7vdd0.cache
dorsale-2.2.4 spec/dummy/tmp/cache/assets/test/sprockets/v3.0/pI6WFy1XoFJZ-w-kWMtSFlAjdmqNdCuUbf1mxlHWQRY.cache