Sha256: eedf5bbb899c455fe9fdde48a87ad20eb1ad85ff9803433e95f861e2f2eeda85
Contents?: true
Size: 1.38 KB
Versions: 20
Compression:
Stored size: 1.38 KB
Contents
<% if @r_object.errors.blank? %> // Inserting the row on top of the table and highlighting it $('#div_<%= @resource_options[:item_name] %>_index table > tbody').prepend("<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/row", locals: {@resource_options[:item_name].to_sym => @r_object, meta_taggable: @meta_taggable, i: -1})) %>"); $("#tr_<%= @resource_options[:item_name] %>_<%= @r_object.id %>").css("background-color", "#fffddd"); // Closing the modal if it is opened closeLargeModal(); // Showing Growl Like Message notifySuccess("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>"); <% else %> // Reload the form with errors var heading = "Add <%= @resource_options[:item_name] %>"; var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/form", locals: {meta_taggable: @meta_taggable})) %>"; showLargeModal(heading, bodyContent, true); // Show Main Error Message on the form <% error_message = content_tag(:div, I18n.t('errors.errors_highlighted'), class: "alert alert-danger mt-20") %> $("#<%= @resource_options[:item_name] %>_form_error").html("<%= escape_javascript(error_message) %>"); // Showing Growl Like Message notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>"); <% end %>
Version data entries
20 entries across 20 versions & 1 rubygems