Sha256: 32ac577d54bebe417d8ee7287fee8e5aa549b8771ff5f37c8c706c464d276d2e

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents



  if ($("#notice").length == 0){

    $("#content").prepend('<div id="notice"></div>');
    
  } 
	
<% if @user.valid? %>
 	
  $("#notice").html("<h2>Form Submitted!</h2><br/>");
	$("#notice").removeClass('error_explanation');
  $("#notice").addClass('confirmed');
  $("#sidebarContent").replaceWith("<%= escape_javascript(render(:partial => 'sidebar_show'))%>");
	
  $("#contact_info").addClass('section_normal');
  $("#experience_info").addClass('section_normal');
	$("#personal_info").addClass('section_normal');
	
  <% if !params[:section].present? or params[:section].eql?("about_me") %>	                  
		$("#personal_info").removeClass('section_normal');
		$("#personal_info").addClass('section_highlight');
	<%end%>
	
	<% if !params[:section].present? or params[:section].eql?("contact_info") %>
		$("#contact_info").removeClass('section_normal');
		$("#contact_info").addClass('section_highlight');
	<%end%>

	<% if !params[:section].present? or params[:section].eql?("my_experience") %>
		$("#experience_info").removeClass('section_normal');
		$("#experience_info").addClass('section_highlight');
	<%end%>
	
<% else %>
  $("#notice").html("<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>"
	 +"<ul><% @user.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul><br/>");
	$("#notice").removeClass('confirmed');
	$("#notice").addClass('error_explanation'); 

<% end %>


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
social_stream-0.4.0 app/views/users/update.js.erb