Sha256: 65d1d64dc90ae14826dffbb12b75e3e626dbda06ae5481d9e417e60050c9a493

Contents?: true

Size: 720 Bytes

Versions: 14

Compression:

Stored size: 720 Bytes

Contents

window.messageContainer = document.getElementById("response-message");
window.profilesContainer = document.getElementById("profiles-container");
window.indicator = document.getElementsByClassName("active-indicator")[0];

window.messageContainer.innerText = "<%= @new_record ? I18n.t("sail.profile_created") : I18n.t("sail.profile_updated") %>";

<% if @new_record %>
  window.profilesContainer.insertAdjacentHTML('beforeend', '<%= j render(partial: "sail/profiles/profile", locals: { profile: @profile }) %>');
<% elsif @profile.active? %>
  window.indicator.classList.remove("yellow");
  window.indicator.classList.add("green");
<% end %>

setTimeout(function () {
    window.messageContainer.innerText = "";
}, 1500);

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sail-3.6.1 app/views/sail/profiles/create.js.erb
sail-3.6.0 app/views/sail/profiles/create.js.erb
sail-3.5.1 app/views/sail/profiles/create.js.erb
sail-3.5.0 app/views/sail/profiles/create.js.erb
sail-3.4.0 app/views/sail/profiles/create.js.erb
sail-3.3.0 app/views/sail/profiles/create.js.erb
sail-3.2.4 app/views/sail/profiles/create.js.erb
sail-3.2.3 app/views/sail/profiles/create.js.erb
sail-3.2.2 app/views/sail/profiles/create.js.erb
sail-3.2.1 app/views/sail/profiles/create.js.erb
sail-3.2.0 app/views/sail/profiles/create.js.erb
sail-3.1.0 app/views/sail/profiles/create.js.erb
sail-3.0.1 app/views/sail/profiles/create.js.erb
sail-3.0.0 app/views/sail/profiles/create.js.erb