Sha256: d3314ef137decfaffd164a05984b3ce9c679f9dc9c51665128523e5661346546

Contents?: true

Size: 511 Bytes

Versions: 7

Compression:

Stored size: 511 Bytes

Contents

var notice = document.getElementById("<%= @successful_update ? "notice-success" : "notice-alert" %>");
notice.style.display = "block";

setTimeout(function () {
    notice.style.display = "none";
}, 1500);

if ("<%= @successful_update %>" === "true") {
    var input = document.getElementById("<%= "input_for_#{@setting.name}" %>");

    if ("<%= @setting.boolean? %>" === "true") {
        input.checked = "<%= @setting.value %>" === "true";
    } else {
        input.value = "<%= @setting.value %>";
    }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sail-3.2.0 app/views/sail/settings/update.js.erb
sail-3.1.0 app/views/sail/settings/update.js.erb
sail-3.0.1 app/views/sail/settings/update.js.erb
sail-3.0.0 app/views/sail/settings/update.js.erb
sail-2.1.1 app/views/sail/settings/update.js.erb
sail-2.1.0 app/views/sail/settings/update.js.erb
sail-2.0.0 app/views/sail/settings/update.js.erb