Sha256: fe6536882fb652973359da6e6d0f5d95a2ed8f80fe707be4c75a379c8a6cb852

Contents?: true

Size: 1.53 KB

Versions: 14

Compression:

Stored size: 1.53 KB

Contents

$("#content").html("<%= escape_javascript(render :partial => 'show') %>");

$("head").append($("<%= escape_javascript(stylesheet_link_tag "messages.css", :media => "screen, projection")  %>"));

$("head").append($("<%= escape_javascript(javascript_include_tag 'ckeditor/ckeditor.js','ckeditor/adapters/jquery.js','jquery.scrollTo.min.js', 'jquery.validate')  %>"));

<%= toolbar :option => :messages %>

$('.cont_conversation').validate();
<% unless @box.eql?'trash' %>
	$('#body').ckeditor(
		function(){$('#cke_top_body').click( updateTextArea);
		var message_hash = window.location.hash.match(/^.*message_(\d+).*$/);
		if (message_hash && message_hash.length > 0){
			$.scrollTo('#message_' + message_hash[1] ,1500,{axis:'y'});
		}else{
			$.scrollTo('#message_<%= @conversation.last_message.id %>',1500,{axis:'y'});		
		}
		},
		{ width:525, customConfig:'/javascripts/ckeditor/config.js',skin:'../javascripts/ckeditor/skins/kama'}
	);
	var editor = $('#body').ckeditorGet();
		editor.on("instanceReady", function(){
			this.document.on("keyup", updateTextArea);
			this.document.on("paste", updateTextArea);
			this.document.on("mousedown", updateTextArea);
		}
	);
	
	var updateTextArea = function (){
		editor.updateElement();
		$("#body").trigger('keyup');
	}
<% else %>
	var message_hash = window.location.hash.match(/^.*message_(\d+).*$/);
		if (message_hash && message_hash.length > 0){
			$.scrollTo('#message_' + message_hash[1] ,1500,{axis:'y'});
		}else{
			$.scrollTo('#message_<%= @conversation.last_message.id %>',1500,{axis:'y'});		
		}
<% end %>

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
social_stream-base-0.6.8 app/views/conversations/show.js.erb
social_stream-base-0.6.6 app/views/conversations/show.js.erb
social_stream-base-0.6.5 app/views/conversations/show.js.erb
social_stream-base-0.6.3 app/views/conversations/show.js.erb
social_stream-base-0.6.2 app/views/conversations/show.js.erb
social_stream-base-0.6.1 app/views/conversations/show.js.erb
social_stream-base-0.6.0 app/views/conversations/show.js.erb
social_stream-base-0.5.2 app/views/conversations/show.js.erb
social_stream-base-0.5.1 app/views/conversations/show.js.erb
social_stream-base-0.5.0 app/views/conversations/show.js.erb
social_stream-0.4.6 app/views/conversations/show.js.erb
social_stream-0.4.5 app/views/conversations/show.js.erb
social_stream-0.4.4 app/views/conversations/show.js.erb
social_stream-0.4.3 app/views/conversations/show.js.erb