social_stream 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -12
- data/app/controllers/activities_controller.rb +17 -1
- data/app/controllers/api_controller.rb +2 -2
- data/app/controllers/avatars_controller.rb +44 -0
- data/app/controllers/contacts_controller.rb +13 -21
- data/app/controllers/conversations_controller.rb +107 -0
- data/app/controllers/groups_controller.rb +7 -11
- data/app/controllers/messages_controller.rb +21 -88
- data/app/controllers/profiles_controller.rb +3 -1
- data/app/controllers/pshb_controller.rb +37 -1
- data/app/controllers/ties_controller.rb +7 -8
- data/app/controllers/users_controller.rb +19 -43
- data/app/helpers/location_helper.rb +34 -0
- data/app/helpers/subjects_helper.rb +18 -1
- data/app/models/activity.rb +67 -27
- data/app/models/activity_verb.rb +1 -1
- data/app/models/actor.rb +85 -37
- data/app/models/avatar.rb +90 -0
- data/app/models/group.rb +2 -2
- data/app/models/profile.rb +8 -0
- data/app/models/tie.rb +20 -22
- data/app/models/user.rb +2 -8
- data/app/views/activities/_index.html.erb +22 -0
- data/app/views/activities/_options.html.erb +3 -1
- data/app/views/activities/_root.html.erb +4 -2
- data/app/views/activities/_walls.html.erb +34 -0
- data/app/views/activities/index.js.erb +1 -0
- data/app/views/avatars/_form.html.erb +23 -0
- data/app/views/{logos → avatars}/_precrop.html.erb +23 -15
- data/app/views/avatars/edit.html.erb +6 -0
- data/app/views/avatars/index.html.erb +42 -0
- data/app/views/{logos → avatars}/new.html.erb +7 -11
- data/app/views/avatars/show.html.erb +5 -0
- data/app/views/contacts/_index.html.erb +33 -0
- data/app/views/contacts/index.html.erb +35 -2
- data/app/views/contacts/index.js.erb +1 -0
- data/app/views/conversations/_conversation.html.erb +37 -0
- data/app/views/conversations/_conversation_full.html.erb +52 -0
- data/app/views/{messages → conversations}/_conversations.html.erb +2 -1
- data/app/views/conversations/_index.html.erb +23 -0
- data/app/views/{messages → conversations}/_menu_options.html.erb +2 -2
- data/app/views/conversations/_show.html.erb +21 -0
- data/app/views/{messages → conversations}/edit.html.erb +0 -0
- data/app/views/{messages → conversations}/index.html.erb +1 -3
- data/app/views/conversations/index.js.erb +7 -0
- data/app/views/conversations/show.html.erb +47 -0
- data/app/views/conversations/show.js.erb +39 -0
- data/app/views/frontpage/_header.html.erb +5 -1
- data/app/views/groups/_new.html.erb +50 -48
- data/app/views/groups/_sidebar_show.html.erb +1 -1
- data/app/views/groups/index.html.erb +1 -1
- data/app/views/groups/new.html.erb +6 -1
- data/app/views/groups/show.html.erb +1 -3
- data/app/views/home/_menu.html.erb +46 -0
- data/app/views/home/_sidebar.html.erb +12 -0
- data/app/views/home/index.html.erb +3 -3
- data/app/views/layouts/application.html.erb +1 -1
- data/app/views/layouts/test.html +58 -41
- data/app/views/location/_location.html.erb +3 -0
- data/app/views/messages/_form.html.erb +5 -52
- data/app/views/messages/_message.html.erb +31 -0
- data/app/views/messages/_new.html.erb +10 -16
- data/app/views/messages/new.html.erb +48 -3
- data/app/views/messages/new.js.erb +38 -1
- data/app/views/profiles/_profile.html.erb +194 -0
- data/app/views/profiles/edit.html.erb +168 -0
- data/app/views/profiles/show.html.erb +2 -175
- data/app/views/{users → profiles}/update.js.erb +12 -15
- data/app/views/subjects/_contacts.html.erb +2 -3
- data/app/views/subjects/_toolbar_home.html.erb +1 -1
- data/app/views/subjects/_toolbar_home_menu.html.erb +4 -1
- data/app/views/subjects/_toolbar_home_menu_options.html.erb +4 -7
- data/app/views/subjects/_toolbar_home_menu_options_subjects.html.erb +0 -3
- data/app/views/subjects/_toolbar_logo.html.erb +1 -1
- data/app/views/subjects/_toolbar_message_menu.html.erb +17 -0
- data/app/views/subjects/_toolbar_profile.html.erb +4 -12
- data/app/views/subjects/_toolbar_profile_menu.html.erb +9 -10
- data/app/views/subjects/_toolbar_profile_menu_basic_options.html.erb +6 -5
- data/app/views/subjects/_toolbar_profile_menu_tie_options.html.erb +13 -13
- data/app/views/ties/_new.html.erb +30 -25
- data/app/views/ties/_suggestions.html.erb +1 -0
- data/app/views/ties/new.js.erb +2 -0
- data/app/views/users/_index.html.erb +1 -1
- data/app/views/users/index.html.erb +1 -3
- data/app/views/users/show.html.erb +4 -3
- data/config/locales/en.yml +79 -24
- data/config/routes.rb +8 -2
- data/lib/generators/social_stream/install_generator.rb +1 -1
- data/lib/generators/social_stream/templates/migration.rb +17 -11
- data/lib/generators/social_stream/templates/public/images/btn/message_conversation.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_inbox.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_new.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_sentbox.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/message_trash.png +0 -0
- data/lib/generators/social_stream/templates/public/javascripts/ajax.paginate.js +1 -1
- data/lib/generators/social_stream/templates/public/javascripts/menu.js +9 -99
- data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +14 -5
- data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +1 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/jquery-ui.css +13 -10
- data/lib/generators/social_stream/templates/public/stylesheets/default/menu.css +5 -11
- data/lib/generators/social_stream/templates/public/stylesheets/default/messages.css +96 -20
- data/lib/generators/social_stream/templates/relations.yml +1 -0
- data/lib/paperclip/social_stream.rb +1 -1
- data/lib/social_stream/ability.rb +1 -0
- data/lib/social_stream/controllers/helpers.rb +20 -0
- data/lib/social_stream/models/subject.rb +13 -12
- data/lib/social_stream/rails.rb +4 -1
- data/lib/social_stream/version.rb +1 -1
- data/lib/tasks/db/populate.rake +14 -4
- data/social_stream.gemspec +31 -5
- data/spec/controllers/contacts_controller_spec.rb +6 -0
- data/spec/controllers/profiles_controller_spec.rb +3 -4
- data/spec/dummy/config/initializers/devise.rb +4 -1
- data/spec/dummy/config/relations.yml +1 -0
- data/spec/models/activity_spec.rb +24 -0
- metadata +91 -89
- data/app/controllers/logos_controller.rb +0 -37
- data/app/models/logo.rb +0 -88
- data/app/views/activities/_activities.html.erb +0 -46
- data/app/views/groups/_profile.html.erb +0 -142
- data/app/views/groups/edit.html.erb +0 -135
- data/app/views/groups/update.js.erb +0 -39
- data/app/views/logos/_form.html.erb +0 -33
- data/app/views/logos/edit.html.erb +0 -6
- data/app/views/logos/index.html.erb +0 -27
- data/app/views/logos/show.html.erb +0 -5
- data/app/views/menu/_group.html.erb +0 -15
- data/app/views/menu/_home_user.html.erb +0 -0
- data/app/views/menu/_optionsGroups.html.erb +0 -11
- data/app/views/menu/_optionsUser.html.erb +0 -11
- data/app/views/menu/_services.html.erb +0 -11
- data/app/views/menu/_tiesGroup.html.erb +0 -14
- data/app/views/menu/_tiesUser.html.erb +0 -11
- data/app/views/menu/_user.html.erb +0 -15
- data/app/views/messages/_conversation.html.erb +0 -34
- data/app/views/messages/_conversation_full.html.erb +0 -65
- data/app/views/messages/_index.html.erb +0 -19
- data/app/views/messages/_location.html.erb +0 -3
- data/app/views/messages/_show.html.erb +0 -22
- data/app/views/messages/index.js.erb +0 -1
- data/app/views/messages/show.html.erb +0 -10
- data/app/views/messages/show.js.erb +0 -1
- data/app/views/users/_profile.html.erb +0 -171
- data/app/views/users/_sidebar_show.html.erb +0 -1
- data/app/views/users/edit.html.erb +0 -194
@@ -1,7 +1,7 @@
|
|
1
1
|
<% content_for :headers do -%>
|
2
|
+
<%= javascript_include_tag 'jqcloud-0.1.3.min','jquery.ba-url','ajax.paginate' %>
|
2
3
|
<%= stylesheet_link_tag 'smoothness/jquery-ui-1.8.4.custom' %>
|
3
4
|
<% end -%>
|
4
|
-
<% javascript_include_tag 'jqcloud-0.1.3.min','ajax.paginate','jquery.min.js' %>
|
5
5
|
|
6
6
|
<% toolbar if user_signed_in? %>
|
7
7
|
|
@@ -1,3 +1,8 @@
|
|
1
|
-
<%
|
1
|
+
<% content_for :headers do %>
|
2
|
+
<%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
|
3
|
+
<%= javascript_include_tag 'jquery.fcbkcomplete.min', 'jquery.validate' %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% toolbar%>
|
2
7
|
|
3
8
|
<%= render :partial => 'new' %>
|
@@ -13,6 +13,4 @@
|
|
13
13
|
<div class="space_center">
|
14
14
|
</div>
|
15
15
|
|
16
|
-
<%= render :partial =>
|
17
|
-
:locals => { :activities => @group.profile_wall(current_subject),
|
18
|
-
:owner => @group } %>
|
16
|
+
<%= render :partial => 'activities/walls', :locals => { :owner => @group } %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<% content_for :headers do %>
|
2
|
+
<%= stylesheet_link_tag "menu", :media => "screen, projection" %>
|
3
|
+
<%= javascript_include_tag 'menu' %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<ul id="menu">
|
7
|
+
<li>
|
8
|
+
<a href="#">Weblog Tools</a>
|
9
|
+
<ul>
|
10
|
+
<li><a href="http://www.pivotx.net/">PivotX</a></li>
|
11
|
+
<li><a href="http://www.wordpress.org/">WordPress</a></li>
|
12
|
+
<li><a href="http://www.textpattern.com/">Textpattern</a></li>
|
13
|
+
<li><a href="http://typosphere.org/">Typo</a></li>
|
14
|
+
</ul>
|
15
|
+
</li>
|
16
|
+
<li>
|
17
|
+
<a href="#">Programming Languages</a>
|
18
|
+
<ul>
|
19
|
+
<li><a href="http://www.php.net/">PHP</a></li>
|
20
|
+
<li><a href="http://www.ruby-lang.org/en/">Ruby</a></li>
|
21
|
+
<li><a href="http://www.python.org/">Python</a></li>
|
22
|
+
<li><a href="http://www.perl.org/">PERL</a></li>
|
23
|
+
<li><a href="http://java.sun.com/">Java</a></li>
|
24
|
+
<li><a href="http://en.wikipedia.org/wiki/C_Sharp">C#</a></li>
|
25
|
+
</ul>
|
26
|
+
</li>
|
27
|
+
<li><a href="http://www.i-marco.nl/weblog/">Marco's blog (no submenu)</a></li>
|
28
|
+
<li>
|
29
|
+
<a href="#">Cool Stuff</a>
|
30
|
+
<ul>
|
31
|
+
<li><a href="http://www.apple.com/">Apple</a></li>
|
32
|
+
<li><a href="http://www.nikon.com/">Nikon</a></li>
|
33
|
+
<li><a href="http://www.xbox.com/en-US/">XBOX360</a></li>
|
34
|
+
<li><a href="http://www.nintendo.com/">Nintendo</a></li>
|
35
|
+
</ul>
|
36
|
+
</li>
|
37
|
+
<li>
|
38
|
+
<a href="#">Search Engines</a>
|
39
|
+
<ul>
|
40
|
+
<li><a href="http://search.yahoo.com/">Yahoo!</a></li>
|
41
|
+
<li><a href="http://www.google.com/">Google</a></li>
|
42
|
+
<li><a href="http://www.ask.com/">Ask.com</a></li>
|
43
|
+
<li><a href="http://www.live.com/?searchonly=true">Live Search</a></li>
|
44
|
+
</ul>
|
45
|
+
</li>
|
46
|
+
</ul>
|
@@ -2,3 +2,15 @@
|
|
2
2
|
<%= render :partial => "ties/suggestions" %>
|
3
3
|
<div class="space_center"></div>
|
4
4
|
<%= render :partial => 'ties/pendings' %>
|
5
|
+
|
6
|
+
<% content_for :javascript do %>
|
7
|
+
|
8
|
+
$(".suggestions .tie_close").livequery("click",function(){
|
9
|
+
temp = $(this);
|
10
|
+
$.get("<%=suggestion_ties_path%>", function(data) {
|
11
|
+
temp.parents(".tie").replaceWith(data);
|
12
|
+
});
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% content_for :sidebar do %>
|
2
|
-
|
2
|
+
<% render :partial => 'sidebar' %>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% toolbar %>
|
@@ -16,6 +16,6 @@
|
|
16
16
|
</div>
|
17
17
|
<% end %>
|
18
18
|
|
19
|
-
<%= render :partial => "activities/
|
20
|
-
:locals => { :activities => current_subject.
|
19
|
+
<%= render :partial => "activities/index",
|
20
|
+
:locals => { :activities => current_subject.wall(:home).paginate(:page => params[:page]),
|
21
21
|
:owner => current_subject } %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<title><%= yield(:title) || t('socialstream') %></title>
|
6
6
|
<%= stylesheet_link_tag "base", "header","home","footer",
|
7
7
|
:media => "screen, projection" %>
|
8
|
-
<%= javascript_include_tag 'jquery.min', 'jquery-ui.min','rails', 'jquery.livequery', '
|
8
|
+
<%= javascript_include_tag 'jquery.min', 'jquery-ui.min','rails', 'jquery.livequery', 'ui.dropdownchecklist'%>
|
9
9
|
|
10
10
|
<%= yield :headers %>
|
11
11
|
|
data/app/views/layouts/test.html
CHANGED
@@ -1,44 +1,61 @@
|
|
1
|
-
<!DOCTYPE
|
2
|
-
<html lang="en">
|
3
|
-
<head
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
font-size: 75%;
|
16
|
-
}
|
17
|
-
h1 {
|
18
|
-
font-size: 1.4em;
|
19
|
-
padding: 10px 10px 0;
|
20
|
-
}
|
21
|
-
p {
|
22
|
-
padding: 0 10px 1em;
|
23
|
-
}
|
24
|
-
#container {
|
25
|
-
min-height: 100%;
|
26
|
-
background-color: #DDD;
|
27
|
-
border-left: 2px solid #666;
|
28
|
-
border-right: 2px solid #666;
|
29
|
-
width: 676px;
|
30
|
-
margin: 0 auto;
|
31
|
-
}
|
32
|
-
* html #container {
|
33
|
-
height: 100%;
|
34
|
-
}</style>
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-EN">
|
3
|
+
<head>
|
4
|
+
<script src="jquery-1.2.1.min.js" type="text/javascript"></script>
|
5
|
+
<script src="menu.js" type="text/javascript"></script>
|
6
|
+
<link rel="stylesheet" type="text/css" href="style.css" />
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
8
|
+
<title>Simple JQuery Accordion menu</title>
|
9
|
+
<!--[if lt IE 8]>
|
10
|
+
<style type="text/css">
|
11
|
+
li a {display:inline-block;}
|
12
|
+
li a {display:block;}
|
13
|
+
</style>
|
14
|
+
<![endif]-->
|
35
15
|
</head>
|
36
16
|
<body>
|
37
|
-
|
38
|
-
<
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
</
|
17
|
+
|
18
|
+
<ul id="menu">
|
19
|
+
<li>
|
20
|
+
<a href="#">Weblog Tools</a>
|
21
|
+
<ul>
|
22
|
+
<li><a href="http://www.pivotx.net/">PivotX</a></li>
|
23
|
+
<li><a href="http://www.wordpress.org/">WordPress</a></li>
|
24
|
+
<li><a href="http://www.textpattern.com/">Textpattern</a></li>
|
25
|
+
<li><a href="http://typosphere.org/">Typo</a></li>
|
26
|
+
</ul>
|
27
|
+
</li>
|
28
|
+
<li>
|
29
|
+
<a href="#">Programming Languages</a>
|
30
|
+
<ul>
|
31
|
+
<li><a href="http://www.php.net/">PHP</a></li>
|
32
|
+
<li><a href="http://www.ruby-lang.org/en/">Ruby</a></li>
|
33
|
+
<li><a href="http://www.python.org/">Python</a></li>
|
34
|
+
<li><a href="http://www.perl.org/">PERL</a></li>
|
35
|
+
<li><a href="http://java.sun.com/">Java</a></li>
|
36
|
+
<li><a href="http://en.wikipedia.org/wiki/C_Sharp">C#</a></li>
|
37
|
+
</ul>
|
38
|
+
</li>
|
39
|
+
<li><a href="http://www.i-marco.nl/weblog/">Marco's blog (no submenu)</a></li>
|
40
|
+
<li>
|
41
|
+
<a href="#">Cool Stuff</a>
|
42
|
+
<ul>
|
43
|
+
<li><a href="http://www.apple.com/">Apple</a></li>
|
44
|
+
<li><a href="http://www.nikon.com/">Nikon</a></li>
|
45
|
+
<li><a href="http://www.xbox.com/en-US/">XBOX360</a></li>
|
46
|
+
<li><a href="http://www.nintendo.com/">Nintendo</a></li>
|
47
|
+
</ul>
|
48
|
+
</li>
|
49
|
+
<li>
|
50
|
+
<a href="#">Search Engines</a>
|
51
|
+
<ul>
|
52
|
+
<li><a href="http://search.yahoo.com/">Yahoo!</a></li>
|
53
|
+
<li><a href="http://www.google.com/">Google</a></li>
|
54
|
+
<li><a href="http://www.ask.com/">Ask.com</a></li>
|
55
|
+
<li><a href="http://www.live.com/?searchonly=true">Live Search</a></li>
|
56
|
+
</ul>
|
57
|
+
</li>
|
58
|
+
</ul>
|
59
|
+
|
43
60
|
</body>
|
44
|
-
</html>
|
61
|
+
</html>
|
@@ -1,57 +1,10 @@
|
|
1
|
-
<% content_for :headers do %>
|
2
|
-
<%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
|
3
|
-
<%= javascript_include_tag 'jquery.fcbkcomplete.min','jquery.validate','ckeditor/ckeditor.js','ckeditor/adapters/jquery.js' %>
|
4
|
-
<% end %>
|
5
|
-
|
6
|
-
<% content_for :javascript do %>
|
7
|
-
|
8
|
-
var recipients = $("#_recipients").fcbkcomplete({
|
9
|
-
json_url: "../../contacts/index.json",
|
10
|
-
cache: true,
|
11
|
-
filter_case: true,
|
12
|
-
filter_hide: true,
|
13
|
-
newel: false,
|
14
|
-
height: 6
|
15
|
-
});
|
16
|
-
|
17
|
-
|
18
|
-
$('#body').ckeditor(
|
19
|
-
function(){
|
20
|
-
$('#cke_top_body').click( updateTextArea);
|
21
|
-
},
|
22
|
-
{ width:493 }
|
23
|
-
);
|
24
|
-
|
25
|
-
var editor = $('#body').ckeditorGet();
|
26
|
-
|
27
|
-
editor.on("instanceReady", function(){
|
28
|
-
this.document.on("keyup", updateTextArea);
|
29
|
-
this.document.on("paste", updateTextArea);
|
30
|
-
this.document.on("mousedown", updateTextArea);
|
31
|
-
});
|
32
|
-
|
33
|
-
var updateTextArea = function (){
|
34
|
-
editor.updateElement();
|
35
|
-
$("#body").trigger('keyup');
|
36
|
-
}
|
37
|
-
|
38
|
-
|
39
|
-
<% unless @recipient.nil? %>
|
40
|
-
$("#_recipients").trigger("addItem",[{"title": "<%= @recipient.name %>", "value": "<%= @recipient.id %>"}]);
|
41
|
-
<% end %>
|
42
|
-
|
43
|
-
$(".new_message").validate();
|
44
|
-
|
45
|
-
<% end %>
|
46
|
-
|
47
|
-
|
48
1
|
<h2>New Message</h2>
|
49
2
|
<%= form_tag messages_path, :method => :post , :class => "new_message" do %>
|
50
|
-
<% if @
|
51
|
-
<div
|
52
|
-
<h2><%= pluralize(@
|
3
|
+
<% if @receipt and @receipt.errors.any? %>
|
4
|
+
<div class="error">
|
5
|
+
<h2><%= pluralize(@receipt.errors.count, "error") %> prohibited this message from being sent:</h2>
|
53
6
|
<ul>
|
54
|
-
<% @
|
7
|
+
<% @receipt.errors.full_messages.each do |msg| %>
|
55
8
|
<li>
|
56
9
|
<%= msg %>
|
57
10
|
</li>
|
@@ -83,4 +36,4 @@
|
|
83
36
|
<%= submit_tag "Send Message", :name => :send_message, :class => "button" %>
|
84
37
|
</div>
|
85
38
|
</div>
|
86
|
-
<% end %>
|
39
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%= div_for(message, :class => read_class) do%>
|
2
|
+
<div class="sender_photo">
|
3
|
+
<%= link_to image_tag(message.sender.logo.url(:actor),
|
4
|
+
:title => message.sender.name, :alt => message.sender.name),
|
5
|
+
message.sender.subject %>
|
6
|
+
</div>
|
7
|
+
<div class="container">
|
8
|
+
<div class="header">
|
9
|
+
<div class="content_left">
|
10
|
+
<div class="sender_name">
|
11
|
+
<%= link_to message.sender.name, message.sender.subject %>
|
12
|
+
</div>
|
13
|
+
<div class="date">
|
14
|
+
<%= t('time.ago', :time => time_ago_in_words(message.updated_at)) %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<div class="content_right">
|
18
|
+
<div class="subject">
|
19
|
+
<%= truncate(message.subject, :length => 70) %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="clearfloat">
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<div class="body">
|
26
|
+
<%= raw(message.body) %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<div class="clearfloat">
|
30
|
+
</div>
|
31
|
+
<% end %>
|
@@ -1,21 +1,15 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
1
|
+
|
2
|
+
<%= location(
|
3
|
+
link_to(image_tag("btn/new.png", :class => "menu_icon")+t('message.other'), conversations_path,:remote => true),
|
4
|
+
link_to(image_tag("btn/message_new.png", :class => "menu_icon")+ t('message.new'), new_message_path, :remote => true)
|
5
|
+
) %>
|
6
|
+
|
4
7
|
|
5
8
|
<br class="clearfloat" />
|
6
|
-
<div class="space_center">
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<%= link_to 'Back', messages_path(:box => @box) %>
|
11
|
-
<% else %>
|
12
|
-
<%= link_to 'Back', messages_path %>
|
13
|
-
<% end %>
|
14
|
-
</div>
|
15
|
-
<div class="space_center">
|
16
|
-
</div>
|
17
|
-
<div class="space_center">
|
18
|
-
</div>
|
9
|
+
<div class="space_center"></div>
|
10
|
+
<div class="space_center"></div>
|
11
|
+
|
12
|
+
|
19
13
|
<div id="conversation">
|
20
14
|
<%= render :partial => 'form' %>
|
21
15
|
</div>
|
@@ -2,9 +2,54 @@
|
|
2
2
|
<%= render :partial => 'home/sidebar' %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
-
<% toolbar
|
6
|
-
|
5
|
+
<% toolbar %>
|
6
|
+
|
7
|
+
<% content_for :headers do %>
|
8
|
+
<%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
|
9
|
+
<%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
|
10
|
+
<%= javascript_include_tag 'jquery.fcbkcomplete.min','jquery.validate','ckeditor/ckeditor.js','ckeditor/adapters/jquery.js' %>
|
11
|
+
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% content_for :javascript do %>
|
15
|
+
|
16
|
+
var recipients = $("#_recipients").fcbkcomplete({
|
17
|
+
json_url: "<%= contacts_path(:format => :json) %>",
|
18
|
+
cache: true,
|
19
|
+
filter_case: true,
|
20
|
+
filter_hide: true,
|
21
|
+
newel: false,
|
22
|
+
height: 6
|
23
|
+
});
|
24
|
+
|
25
|
+
|
26
|
+
$('#body').ckeditor(
|
27
|
+
function(){
|
28
|
+
$('#cke_top_body').click( updateTextArea);
|
29
|
+
},
|
30
|
+
{ width:493 }
|
31
|
+
);
|
32
|
+
|
33
|
+
var editor = $('#body').ckeditorGet();
|
34
|
+
|
35
|
+
editor.on("instanceReady", function(){
|
36
|
+
this.document.on("keyup", updateTextArea);
|
37
|
+
this.document.on("paste", updateTextArea);
|
38
|
+
this.document.on("mousedown", updateTextArea);
|
39
|
+
});
|
40
|
+
|
41
|
+
var updateTextArea = function (){
|
42
|
+
editor.updateElement();
|
43
|
+
$("#body").trigger('keyup');
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
<% unless @recipient.nil? %>
|
48
|
+
$("#_recipients").trigger("addItem",[{"title": "<%= @recipient.name %>", "value": "<%= @recipient.id %>"}]);
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
$(".new_message").validate();
|
52
|
+
|
7
53
|
<% end %>
|
8
54
|
|
9
|
-
<%= render :partial => 'location' %>
|
10
55
|
<%= render :partial => 'new' %>
|
@@ -1 +1,38 @@
|
|
1
|
-
$("#content").html("<%=escape_javascript(render :partial => 'new') %>");
|
1
|
+
$("#content").html("<%= escape_javascript(render :partial => 'new') %>");
|
2
|
+
|
3
|
+
$("head").append($("<%= escape_javascript(stylesheet_link_tag "messages.css", :media => "screen, projection") %>"));
|
4
|
+
$("head").append($("<%= escape_javascript(stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection") %>"));
|
5
|
+
|
6
|
+
$("head").append($("<%= escape_javascript(javascript_include_tag 'jquery.fcbkcomplete.min','jquery.validate','ckeditor/ckeditor.js','ckeditor/adapters/jquery.js') %>"));
|
7
|
+
|
8
|
+
var recipients = $("#_recipients").fcbkcomplete({
|
9
|
+
json_url: "<%= contacts_path(:format => :json) %>",
|
10
|
+
cache: true,
|
11
|
+
filter_case: true,
|
12
|
+
filter_hide: true,
|
13
|
+
newel: false,
|
14
|
+
height: 6
|
15
|
+
});
|
16
|
+
|
17
|
+
|
18
|
+
$('#body').ckeditor(
|
19
|
+
);
|
20
|
+
|
21
|
+
var editor = $('#body').ckeditorGet();
|
22
|
+
|
23
|
+
editor.on("instanceReady", function(){
|
24
|
+
this.document.on("keyup", updateTextArea);
|
25
|
+
this.document.on("paste", updateTextArea);
|
26
|
+
this.document.on("mousedown", updateTextArea);
|
27
|
+
});
|
28
|
+
|
29
|
+
var updateTextArea = function (){
|
30
|
+
editor.updateElement();
|
31
|
+
$("#body").trigger('keyup');
|
32
|
+
}
|
33
|
+
|
34
|
+
<% unless @recipient.nil? %>
|
35
|
+
$("#_recipients").trigger("addItem",[{"title": "<%= @recipient.name %>", "value": "<%= @recipient.id %>"}]);
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
$(".new_message").validate();
|