Sha256: f2ae501798374f09c483a59eb8849ebf048e941c784178373338cffe28768995

Contents?: true

Size: 1.19 KB

Versions: 7

Compression:

Stored size: 1.19 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_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 & 1 rubygems

Version Path
social_stream-base-0.6.8 app/views/messages/new.js.erb
social_stream-base-0.6.6 app/views/messages/new.js.erb
social_stream-base-0.6.5 app/views/messages/new.js.erb
social_stream-base-0.6.3 app/views/messages/new.js.erb
social_stream-base-0.6.2 app/views/messages/new.js.erb
social_stream-base-0.6.1 app/views/messages/new.js.erb
social_stream-base-0.6.0 app/views/messages/new.js.erb