150
151
152
153
154
155
156
157
158
159
160
161
162
|
# File 'lib/reactive_record/active_record/reactive_record/while_loading.rb', line 150
def add_style_sheet
unless @style_sheet_added
%x{
var style_el = document.createElement("style");
style_el.setAttribute("type", "text/css");
style_el.innerHTML = ".reactive_record_is_loading > .reactive_record_show_when_loaded { display: none; }\n" +
".reactive_record_is_loaded > .reactive_record_show_while_loading { display: none; }";
document.head.append(style_el);
}
@style_sheet_added = true
end
end
|