Sha256: 3e2e210cd201413821c5b68d41e751f4ee2d33088da60f6098d819ff7f5dc533

Contents?: true

Size: 1.3 KB

Versions: 5

Compression:

Stored size: 1.3 KB

Contents

<% if @feature.errors.blank? %>

  // Inserting the row on top of the table and highlighting it
  $('#tr_feature_index table > tbody > tr:first').before("<%= escape_javascript(render(:partial=>'/usman/admin/features/row', locals: {feature: @feature})) %>")
  $("#tr_feature_<%= @feature.id %>").css("background-color", "#fffddd");

  // Showing the saved data in the modal
  var heading = "<%= raw @feature.name %>";
  var bodyContent = "<%= escape_javascript(render(:partial=>'/usman/admin/features/show')) %>";
  showLargeModal(heading, bodyContent, false);

  // Showing Growl Like Message
  notifySuccess("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");

<% else %>
  
  // Reload the form with errors
  var heading = "Add a User";
  var bodyContent = "<%= escape_javascript(render(:partial=>'/usman/admin/features/form')) %>";
  showLargeModal(heading, bodyContent);

  // Show Main Error Message on the form
  <% error_message = content_tag(:div, I18n.t('errors.errors_highlighted'), class: "alert alert-danger mt-20") %>
  $("#feature_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

5 entries across 5 versions & 1 rubygems

Version Path
usman-0.1.5 app/views/usman/admin/features/temp/create.js.erb
usman-0.1.4 app/views/usman/admin/features/temp/create.js.erb
usman-0.1.3 app/views/usman/admin/features/temp/create.js.erb
usman-0.1.2 app/views/usman/admin/features/temp/create.js.erb
usman-0.1.1 app/views/usman/admin/features/temp/create.js.erb