Sha256: af18d460b13c01e56a8caec07e54c27d67987c3a810b071ccd72cd57bc0f57a5

Contents?: true

Size: 1.21 KB

Versions: 7

Compression:

Stored size: 1.21 KB

Contents

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

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

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

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


var recipients = $("#_recipients").fcbkcomplete({
        json_url: "<%= contacts_path(:format => :json) %>",
	cache: true,
	filter_case: true,
	filter_hide: true,
	newel: false,
	height: 6
});


$('#body').ckeditor(
);

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');
}

<% unless @recipient.nil? %>
	$("#_recipients").trigger("addItem",[{"title": "<%= @recipient.name %>", "value": "<%= @recipient.id %>"}]);
<% end %>

$(".new_message").validate();

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
social_stream-base-0.5.2 app/views/messages/new.js.erb
social_stream-base-0.5.1 app/views/messages/new.js.erb
social_stream-base-0.5.0 app/views/messages/new.js.erb
social_stream-0.4.6 app/views/messages/new.js.erb
social_stream-0.4.5 app/views/messages/new.js.erb
social_stream-0.4.4 app/views/messages/new.js.erb
social_stream-0.4.3 app/views/messages/new.js.erb