social_stream 0.3.6 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +6 -0
  3. data/app/controllers/api_controller.rb +39 -0
  4. data/app/controllers/frontpage_controller.rb +2 -0
  5. data/app/controllers/groups_controller.rb +8 -2
  6. data/app/controllers/likes_controller.rb +9 -29
  7. data/app/controllers/logos_controller.rb +21 -0
  8. data/app/controllers/mailbox/conversation_controller.rb +110 -0
  9. data/app/controllers/mailbox_controller.rb +35 -0
  10. data/app/controllers/posts_controller.rb +2 -0
  11. data/app/controllers/profiles_controller.rb +3 -0
  12. data/app/controllers/ties_controller.rb +10 -0
  13. data/app/controllers/users_controller.rb +5 -5
  14. data/app/helpers/groups_helper.rb +0 -2
  15. data/app/helpers/subjects_helper.rb +11 -0
  16. data/app/helpers/ties_helper.rb +1 -1
  17. data/app/models/activity.rb +24 -1
  18. data/app/models/activity_object.rb +10 -0
  19. data/app/models/activity_object_activity.rb +10 -0
  20. data/app/models/actor.rb +87 -60
  21. data/app/models/group.rb +10 -4
  22. data/app/models/like.rb +34 -0
  23. data/app/models/logo.rb +51 -0
  24. data/app/models/permission.rb +7 -5
  25. data/app/models/profile.rb +24 -8
  26. data/app/models/tie.rb +15 -2
  27. data/app/models/user.rb +2 -2
  28. data/app/views/activities/_activities.html.erb +1 -1
  29. data/app/views/activities/_new.html.erb +12 -7
  30. data/app/views/api/activity_atom_feed.atom.builder +40 -0
  31. data/app/views/comments/_new.html.erb +1 -1
  32. data/app/views/devise/passwords/edit.html.erb +21 -0
  33. data/app/views/devise/passwords/new.html.erb +16 -0
  34. data/app/views/devise/registrations/new.html.erb +35 -19
  35. data/app/views/devise/sessions/new.html.erb +30 -0
  36. data/app/views/frontpage/_header.html.erb +18 -20
  37. data/app/views/frontpage/_search.html.erb +13 -0
  38. data/app/views/frontpage/_sponsor.html.erb +12 -13
  39. data/app/views/frontpage/index.html.erb +88 -80
  40. data/app/views/groups/_group.html.erb +2 -6
  41. data/app/views/groups/_index.html.erb +22 -25
  42. data/app/views/groups/_logo.html.erb +1 -1
  43. data/app/views/groups/_new.html.erb +56 -39
  44. data/app/views/groups/_profile.html.erb +142 -0
  45. data/app/views/groups/_sidebar_index.html.erb +73 -0
  46. data/app/views/groups/{_middle_show.html.erb → _sidebar_show.html.erb} +2 -2
  47. data/app/views/groups/_tabs.html.erb +37 -31
  48. data/app/views/groups/_toolbar_show.html.erb +12 -0
  49. data/app/views/groups/edit.html.erb +136 -0
  50. data/app/views/groups/index.html.erb +47 -46
  51. data/app/views/groups/new.html.erb +2 -0
  52. data/app/views/groups/show.html.erb +9 -4
  53. data/app/views/groups/update.js.erb +39 -0
  54. data/app/views/home/_groups.html.erb +4 -5
  55. data/app/views/{users/_middle_index.html.erb → home/_sidebar.html.erb} +0 -2
  56. data/app/views/home/index.html.erb +3 -5
  57. data/app/views/layouts/_footer.html.erb +4 -0
  58. data/app/views/layouts/_header.erb +29 -37
  59. data/app/views/layouts/_representation.html.erb +2 -2
  60. data/app/views/layouts/application.html.erb +47 -74
  61. data/app/views/layouts/frontpage.html.erb +27 -48
  62. data/app/views/layouts/test.html +44 -0
  63. data/app/views/likes/create.js.erb +1 -1
  64. data/app/views/likes/destroy.js.erb +1 -1
  65. data/app/views/logos/_form.html.erb +33 -0
  66. data/app/views/logos/_precrop.html.erb +48 -0
  67. data/app/views/logos/edit.html.erb +6 -0
  68. data/app/views/logos/index.html.erb +27 -0
  69. data/app/views/logos/new.html.erb +20 -0
  70. data/app/views/logos/show.html.erb +5 -0
  71. data/app/views/mailbox/_conversation.html.erb +23 -0
  72. data/app/views/mailbox/_conversations.html.erb +9 -0
  73. data/app/views/mailbox/_index.html.erb +16 -0
  74. data/app/views/{messages → mailbox}/_location.html.erb +0 -0
  75. data/app/views/mailbox/_menu_options.html.erb +19 -0
  76. data/app/views/mailbox/_show.html.erb +15 -0
  77. data/app/views/mailbox/conversation/_conversation.html.erb +40 -0
  78. data/app/views/mailbox/conversation/_form.html.erb +54 -0
  79. data/app/views/mailbox/conversation/_location.html.erb +3 -0
  80. data/app/views/mailbox/conversation/_new.html.erb +19 -0
  81. data/app/views/mailbox/conversation/_show.html.erb +27 -0
  82. data/app/views/mailbox/conversation/edit.html.erb +6 -0
  83. data/app/views/mailbox/conversation/new.html.erb +10 -0
  84. data/app/views/mailbox/conversation/new.js.erb +1 -0
  85. data/app/views/mailbox/conversation/show.html.erb +1 -0
  86. data/app/views/{messages → mailbox}/edit.html.erb +0 -0
  87. data/app/views/mailbox/index.html.erb +10 -0
  88. data/app/views/{messages → mailbox}/index.js.erb +0 -0
  89. data/app/views/mailbox/new.html.erb +14 -0
  90. data/app/views/mailbox/show.html.erb +11 -0
  91. data/app/views/mailbox/show.js.erb +1 -0
  92. data/app/views/menu/_group.html.erb +15 -0
  93. data/{lib/generators/social_stream/templates/public/stylesheets/users.css → app/views/menu/_home_user.html.erb} +0 -0
  94. data/app/views/menu/_options.html.erb +11 -0
  95. data/app/views/menu/_services.html.erb +11 -0
  96. data/app/views/menu/_tiesGroup.html.erb +14 -0
  97. data/app/views/menu/_tiesUser.html.erb +11 -0
  98. data/app/views/menu/_user.html.erb +15 -0
  99. data/app/views/profiles/show.html.erb +1 -0
  100. data/app/views/subjects/_contacts.html.erb +8 -9
  101. data/app/views/subjects/_menu_options.html.erb +14 -0
  102. data/app/views/subjects/_toolbar.html.erb +15 -0
  103. data/app/views/ties/_new.html.erb +3 -2
  104. data/app/views/ties/_pendings.html.erb +7 -12
  105. data/app/views/ties/_suggestions.html.erb +12 -12
  106. data/app/views/ties/_tie.html.erb +9 -7
  107. data/app/views/ties/new.js.erb +1 -2
  108. data/app/views/users/_groups.html.erb +4 -3
  109. data/app/views/users/_index.html.erb +24 -22
  110. data/app/views/users/_logo.html.erb +1 -1
  111. data/app/views/users/_profile.html.erb +167 -164
  112. data/app/views/users/_sidebar_index.html.erb +6 -0
  113. data/app/views/users/{_middle_show.html.erb → _sidebar_show.html.erb} +0 -0
  114. data/app/views/users/_toolbar_show.html.erb +17 -0
  115. data/app/views/users/edit.html.erb +193 -165
  116. data/app/views/users/index.html.erb +34 -47
  117. data/{spec/dummy/public/stylesheets/.gitkeep → app/views/users/info.html.erb} +0 -0
  118. data/app/views/users/show.html.erb +4 -4
  119. data/app/views/users/show.xml.builder +28 -0
  120. data/app/views/users/update.js.erb +3 -1
  121. data/config/locales/en.yml +88 -9
  122. data/config/routes.rb +30 -14
  123. data/lib/generators/social_stream/install_generator.rb +8 -2
  124. data/lib/generators/social_stream/templates/migration.rb +75 -81
  125. data/lib/generators/social_stream/templates/public/images/{frontpage/facebook.png → btn/1-facebook.png} +0 -0
  126. data/lib/generators/social_stream/templates/public/images/btn/edit.png +0 -0
  127. data/lib/generators/social_stream/templates/public/images/btn/facebook.png +0 -0
  128. data/lib/generators/social_stream/templates/public/images/btn/linkedin.png +0 -0
  129. data/lib/generators/social_stream/templates/public/images/btn/twitter-follow-icon.png +0 -0
  130. data/lib/generators/social_stream/templates/public/images/btn/twitter.png +0 -0
  131. data/lib/generators/social_stream/templates/public/images/frontpage/collaborate.png +0 -0
  132. data/lib/generators/social_stream/templates/public/images/frontpage/meet.png +0 -0
  133. data/lib/generators/social_stream/templates/public/images/frontpage/share.png +0 -0
  134. data/lib/generators/social_stream/templates/public/images/icons/favicon.ico +0 -0
  135. data/lib/generators/social_stream/templates/public/images/logo.png +0 -0
  136. data/lib/generators/social_stream/templates/public/images/w3c_css.png +0 -0
  137. data/lib/generators/social_stream/templates/public/images/w3c_xhtml.png +0 -0
  138. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui-1.8.4.custom.min.js +3 -3
  139. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui-personalized-1.5.2.packed.js +1 -0
  140. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui.min.js +3 -3
  141. data/lib/generators/social_stream/templates/public/javascripts/jquery.Jcrop.min.js +163 -0
  142. data/lib/generators/social_stream/templates/public/javascripts/jquery.fcbkcomplete.min.js +76 -76
  143. data/lib/generators/social_stream/templates/public/javascripts/jquery.min.js +156 -5
  144. data/lib/generators/social_stream/templates/public/javascripts/main.js +9 -0
  145. data/lib/generators/social_stream/templates/public/javascripts/menu-collapsed.js +42 -0
  146. data/lib/generators/social_stream/templates/public/javascripts/menu.js +1 -1
  147. data/lib/generators/social_stream/templates/public/javascripts/rails.js +30 -29
  148. data/lib/generators/social_stream/templates/public/javascripts/superfish.js +121 -0
  149. data/lib/generators/social_stream/templates/public/stylesheets/default/activities.css +72 -0
  150. data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +150 -0
  151. data/lib/generators/social_stream/templates/public/stylesheets/default/carousel.css +23 -0
  152. data/lib/generators/social_stream/templates/public/stylesheets/{fcbkComplete.css → default/fcbkComplete.css} +2 -2
  153. data/lib/generators/social_stream/templates/public/stylesheets/default/footer.css +25 -0
  154. data/lib/generators/social_stream/templates/public/stylesheets/default/frontpage.css +54 -0
  155. data/lib/generators/social_stream/templates/public/stylesheets/default/header.css +44 -0
  156. data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +44 -0
  157. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  158. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_flat_75_ffffff_40x100.png +0 -0
  159. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  160. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  161. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_75_dadada_1x400.png +0 -0
  162. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  163. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  164. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  165. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_222222_256x240.png +0 -0
  166. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_2e83ff_256x240.png +0 -0
  167. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_454545_256x240.png +0 -0
  168. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_888888_256x240.png +0 -0
  169. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_cd0a0a_256x240.png +0 -0
  170. data/lib/generators/social_stream/templates/public/stylesheets/default/jqcloud.css +15 -0
  171. data/lib/generators/social_stream/templates/public/stylesheets/{jquery-ui.css → default/jquery-ui.css} +0 -0
  172. data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.Jcrop.css +35 -0
  173. data/lib/generators/social_stream/templates/public/stylesheets/default/menu.css +33 -0
  174. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  175. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  176. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  177. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  178. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  179. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  180. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  181. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  182. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_222222_256x240.png +0 -0
  183. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_2e83ff_256x240.png +0 -0
  184. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_454545_256x240.png +0 -0
  185. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_888888_256x240.png +0 -0
  186. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_cd0a0a_256x240.png +0 -0
  187. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/jquery-ui-1.7.3.custom.css +0 -0
  188. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/jquery-ui-1.8.4.custom.css +0 -0
  189. data/lib/social_stream.rb +11 -2
  190. data/lib/social_stream/ability.rb +21 -3
  191. data/lib/social_stream/models/object.rb +5 -3
  192. data/lib/social_stream/models/subject.rb +50 -31
  193. data/lib/social_stream/rails.rb +5 -0
  194. data/lib/social_stream/test_helpers.rb +11 -0
  195. data/lib/social_stream/test_helpers/controllers.rb +64 -0
  196. data/lib/social_stream/version.rb +1 -1
  197. data/lib/tasks/db/populate.rake +110 -25
  198. data/social_stream.gemspec +7 -1
  199. data/spec/controllers/contacts_controller_spec.rb +1 -1
  200. data/spec/controllers/groups_controller_spec.rb +8 -0
  201. data/spec/controllers/home_controller_spec.rb +15 -0
  202. data/spec/controllers/likes_controller_spec.rb +29 -0
  203. data/spec/controllers/posts_controller_spec.rb +41 -0
  204. data/spec/controllers/profiles_controller_spec.rb +46 -0
  205. data/spec/controllers/users_controller_spec.rb +2 -2
  206. data/spec/dummy/.gitignore +4 -0
  207. data/spec/dummy/config/database.yml +8 -0
  208. data/spec/dummy/config/environments/test_pg.rb +35 -0
  209. data/spec/dummy/config/routes.rb +2 -0
  210. data/spec/factories/group.rb +1 -1
  211. data/spec/integration/navigation_spec.rb +1 -1
  212. data/spec/models/actor_spec.rb +4 -4
  213. data/spec/models/user_spec.rb +2 -2
  214. data/spec/spec_helper.rb +1 -1
  215. data/spec/support/db.rb +7 -0
  216. metadata +198 -116
  217. data/app/controllers/messages_controller.rb +0 -3
  218. data/app/models/message.rb +0 -2
  219. data/app/views/groups/_middle_index.html.erb +0 -74
  220. data/app/views/groups/_right_index.html.erb +0 -19
  221. data/app/views/groups/_right_show.html.erb +0 -8
  222. data/app/views/home/_middle.html.erb +0 -4
  223. data/app/views/home/_options.html.erb +0 -8
  224. data/app/views/home/_right.html.erb +0 -17
  225. data/app/views/messages/_form.html.erb +0 -24
  226. data/app/views/messages/_index.html.erb +0 -24
  227. data/app/views/messages/_message.html.erb +0 -17
  228. data/app/views/messages/_messages.html.erb +0 -2
  229. data/app/views/messages/index.html.erb +0 -1
  230. data/app/views/messages/new.html.erb +0 -14
  231. data/app/views/messages/show.html.erb +0 -21
  232. data/app/views/users/_menu.html.erb +0 -7
  233. data/app/views/users/_options.html.erb +0 -5
  234. data/app/views/users/_right_index.html.erb +0 -19
  235. data/app/views/users/_right_show.html.erb +0 -14
  236. data/lib/generators/social_stream/templates/public/images/btn/btn_share.png +0 -0
  237. data/lib/generators/social_stream/templates/public/images/favicon.ico +0 -0
  238. data/lib/generators/social_stream/templates/public/images/frontpage/collaborate.gif +0 -0
  239. data/lib/generators/social_stream/templates/public/images/frontpage/meet.gif +0 -0
  240. data/lib/generators/social_stream/templates/public/images/frontpage/share.gif +0 -0
  241. data/lib/generators/social_stream/templates/public/javascripts/hoverIntent.js +0 -84
  242. data/lib/generators/social_stream/templates/public/stylesheets/activities.css +0 -235
  243. data/lib/generators/social_stream/templates/public/stylesheets/base.css +0 -68
  244. data/lib/generators/social_stream/templates/public/stylesheets/boxy.css +0 -49
  245. data/lib/generators/social_stream/templates/public/stylesheets/browse.css +0 -162
  246. data/lib/generators/social_stream/templates/public/stylesheets/carousel.css +0 -57
  247. data/lib/generators/social_stream/templates/public/stylesheets/edit_user.css +0 -104
  248. data/lib/generators/social_stream/templates/public/stylesheets/frontpage.css +0 -708
  249. data/lib/generators/social_stream/templates/public/stylesheets/header.css +0 -116
  250. data/lib/generators/social_stream/templates/public/stylesheets/home.css +0 -121
  251. data/lib/generators/social_stream/templates/public/stylesheets/index.css +0 -625
  252. data/lib/generators/social_stream/templates/public/stylesheets/jqcloud.css +0 -62
  253. data/lib/generators/social_stream/templates/public/stylesheets/menu.css +0 -83
  254. data/lib/generators/social_stream/templates/public/stylesheets/message.css +0 -46
  255. data/lib/generators/social_stream/templates/public/stylesheets/middle.css +0 -113
  256. data/lib/generators/social_stream/templates/public/stylesheets/right.css +0 -58
  257. data/lib/generators/social_stream/templates/public/stylesheets/social_stream.css +0 -78
  258. data/lib/generators/social_stream/templates/public/stylesheets/ui.dropdownchecklist.css +0 -21
  259. data/spec/dummy/db/.gitignore +0 -2
  260. data/spec/dummy/log/.gitignore +0 -1
  261. data/spec/dummy/public/javascripts/application.js +0 -2
  262. data/spec/dummy/public/javascripts/controls.js +0 -965
  263. data/spec/dummy/public/javascripts/dragdrop.js +0 -974
  264. data/spec/dummy/public/javascripts/effects.js +0 -1123
  265. data/spec/dummy/public/javascripts/prototype.js +0 -6001
  266. data/spec/dummy/public/javascripts/rails.js +0 -175
@@ -0,0 +1,9 @@
1
+ // initialise plugins
2
+ jQuery(function(){
3
+ jQuery('ul.sf-menu').superfish();
4
+ });
5
+
6
+ $(document).ready(function() {
7
+ $('#tabright> ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
8
+ });
9
+
@@ -0,0 +1,42 @@
1
+ /*
2
+ Simple JQuery Collapsing menu.
3
+ HTML structure to use:
4
+
5
+ <ul id="menu">
6
+ <li><a href="#">Sub menu heading</a>
7
+ <ul>
8
+ <li><a href="http://site.com/">Link</a></li>
9
+ <li><a href="http://site.com/">Link</a></li>
10
+ <li><a href="http://site.com/">Link</a></li>
11
+ ...
12
+ ...
13
+ </ul>
14
+ <li><a href="#">Sub menu heading</a>
15
+ <ul>
16
+ <li><a href="http://site.com/">Link</a></li>
17
+ <li><a href="http://site.com/">Link</a></li>
18
+ <li><a href="http://site.com/">Link</a></li>
19
+ ...
20
+ ...
21
+ </ul>
22
+ ...
23
+ ...
24
+ </ul>
25
+
26
+ Copyright 2007 by Marco van Hylckama Vlieg
27
+
28
+ web: http://www.i-marco.nl/weblog/
29
+ email: marco@i-marco.nl
30
+
31
+ Free for non-commercial use
32
+ */
33
+
34
+ function initMenu() {
35
+ $('#menu ul').hide();
36
+ $('#menu li a').click(
37
+ function() {
38
+ $(this).next().slideToggle('normal');
39
+ }
40
+ );
41
+ }
42
+ $(document).ready(function() {initMenu();});
@@ -96,4 +96,4 @@ jQuery.fn.initMenu = function() {
96
96
  });
97
97
  };
98
98
 
99
- $(document).ready(function() {$('.menu').initMenu();});
99
+ $(document).ready(function() {$('.toolbar').initMenu();});
@@ -16,7 +16,7 @@
16
16
 
17
17
  // Triggers an event on an element and returns the event result
18
18
  function fire(obj, name, data) {
19
- var event = new $.Event(name);
19
+ var event = $.Event(name);
20
20
  obj.trigger(event, data);
21
21
  return event.result !== false;
22
22
  }
@@ -24,8 +24,9 @@
24
24
  // Submits "remote" forms and links with ajax
25
25
  function handleRemote(element) {
26
26
  var method, url, data,
27
- dataType = element.attr('data-type') || ($.ajaxSettings && $.ajaxSettings.dataType);
27
+ dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
28
28
 
29
+ if (fire(element, 'ajax:before')) {
29
30
  if (element.is('form')) {
30
31
  method = element.attr('method');
31
32
  url = element.attr('action');
@@ -37,37 +38,37 @@
37
38
  element.data('ujs:submit-button', null);
38
39
  }
39
40
  } else {
40
- method = element.attr('data-method');
41
+ method = element.data('method');
41
42
  url = element.attr('href');
42
43
  data = null;
43
44
  }
44
-
45
- $.ajax({
46
- url: url, type: method || 'GET', data: data, dataType: dataType,
47
- // stopping the "ajax:beforeSend" event will cancel the ajax request
48
- beforeSend: function(xhr, settings) {
49
- if (settings.dataType === undefined) {
50
- xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
45
+ $.ajax({
46
+ url: url, type: method || 'GET', data: data, dataType: dataType,
47
+ // stopping the "ajax:beforeSend" event will cancel the ajax request
48
+ beforeSend: function(xhr, settings) {
49
+ if (settings.dataType === undefined) {
50
+ xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
51
+ }
52
+ return fire(element, 'ajax:beforeSend', [xhr, settings]);
53
+ },
54
+ success: function(data, status, xhr) {
55
+ element.trigger('ajax:success', [data, status, xhr]);
56
+ },
57
+ complete: function(xhr, status) {
58
+ element.trigger('ajax:complete', [xhr, status]);
59
+ },
60
+ error: function(xhr, status, error) {
61
+ element.trigger('ajax:error', [xhr, status, error]);
51
62
  }
52
- return fire(element, 'ajax:beforeSend', [xhr, settings]);
53
- },
54
- success: function(data, status, xhr) {
55
- element.trigger('ajax:success', [data, status, xhr]);
56
- },
57
- complete: function(xhr, status) {
58
- element.trigger('ajax:complete', [xhr, status]);
59
- },
60
- error: function(xhr, status, error) {
61
- element.trigger('ajax:error', [xhr, status, error]);
62
- }
63
- });
63
+ });
64
+ }
64
65
  }
65
66
 
66
67
  // Handles "data-method" on links such as:
67
68
  // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
68
69
  function handleMethod(link) {
69
70
  var href = link.attr('href'),
70
- method = link.attr('data-method'),
71
+ method = link.data('method'),
71
72
  csrf_token = $('meta[name=csrf-token]').attr('content'),
72
73
  csrf_param = $('meta[name=csrf-param]').attr('content'),
73
74
  form = $('<form method="post" action="' + href + '"></form>'),
@@ -85,7 +86,7 @@
85
86
  form.find('input[data-disable-with]').each(function() {
86
87
  var input = $(this);
87
88
  input.data('ujs:enable-with', input.val())
88
- .val(input.attr('data-disable-with'))
89
+ .val(input.data('disable-with'))
89
90
  .attr('disabled', 'disabled');
90
91
  });
91
92
  }
@@ -98,7 +99,7 @@
98
99
  }
99
100
 
100
101
  function allowAction(element) {
101
- var message = element.attr('data-confirm');
102
+ var message = element.data('confirm');
102
103
  return !message || (fire(element, 'confirm') && confirm(message));
103
104
  }
104
105
 
@@ -114,17 +115,17 @@
114
115
  var link = $(this);
115
116
  if (!allowAction(link)) return false;
116
117
 
117
- if (link.attr('data-remote') != undefined) {
118
+ if (link.data('remote') != undefined) {
118
119
  handleRemote(link);
119
120
  return false;
120
- } else if (link.attr('data-method')) {
121
+ } else if (link.data('method')) {
121
122
  handleMethod(link);
122
123
  return false;
123
124
  }
124
125
  });
125
126
 
126
127
  $('form').live('submit.rails', function(e) {
127
- var form = $(this), remote = form.attr('data-remote') != undefined;
128
+ var form = $(this), remote = form.data('remote') != undefined;
128
129
  if (!allowAction(form)) return false;
129
130
 
130
131
  // skip other logic when required values are missing
@@ -146,7 +147,7 @@
146
147
  var name = button.attr('name'), data = name ? {name:name, value:button.val()} : null;
147
148
  button.closest('form').data('ujs:submit-button', data);
148
149
  });
149
-
150
+
150
151
  $('form').live('ajax:beforeSend.rails', function(event) {
151
152
  if (this == event.target) disableFormElements($(this));
152
153
  });
@@ -0,0 +1,121 @@
1
+
2
+ /*
3
+ * Superfish v1.4.8 - jQuery menu widget
4
+ * Copyright (c) 2008 Joel Birch
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
11
+ */
12
+
13
+ ;(function($){
14
+ $.fn.superfish = function(op){
15
+
16
+ var sf = $.fn.superfish,
17
+ c = sf.c,
18
+ $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
19
+ over = function(){
20
+ var $$ = $(this), menu = getMenu($$);
21
+ clearTimeout(menu.sfTimer);
22
+ $$.showSuperfishUl().siblings().hideSuperfishUl();
23
+ },
24
+ out = function(){
25
+ var $$ = $(this), menu = getMenu($$), o = sf.op;
26
+ clearTimeout(menu.sfTimer);
27
+ menu.sfTimer=setTimeout(function(){
28
+ o.retainPath=($.inArray($$[0],o.$path)>-1);
29
+ $$.hideSuperfishUl();
30
+ if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
31
+ },o.delay);
32
+ },
33
+ getMenu = function($menu){
34
+ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
35
+ sf.op = sf.o[menu.serial];
36
+ return menu;
37
+ },
38
+ addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
39
+
40
+ return this.each(function() {
41
+ var s = this.serial = sf.o.length;
42
+ var o = $.extend({},sf.defaults,op);
43
+ o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
44
+ $(this).addClass([o.hoverClass,c.bcClass].join(' '))
45
+ .filter('li:has(ul)').removeClass(o.pathClass);
46
+ });
47
+ sf.o[s] = sf.op = o;
48
+
49
+ $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
50
+ if (o.autoArrows) addArrow( $('>a:first-child',this) );
51
+ })
52
+ .not('.'+c.bcClass)
53
+ .hideSuperfishUl();
54
+
55
+ var $a = $('a',this);
56
+ $a.each(function(i){
57
+ var $li = $a.eq(i).parents('li');
58
+ $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
59
+ });
60
+ o.onInit.call(this);
61
+
62
+ }).each(function() {
63
+ var menuClasses = [c.menuClass];
64
+ if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
65
+ $(this).addClass(menuClasses.join(' '));
66
+ });
67
+ };
68
+
69
+ var sf = $.fn.superfish;
70
+ sf.o = [];
71
+ sf.op = {};
72
+ sf.IE7fix = function(){
73
+ var o = sf.op;
74
+ if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
75
+ this.toggleClass(sf.c.shadowClass+'-off');
76
+ };
77
+ sf.c = {
78
+ bcClass : 'sf-breadcrumb',
79
+ menuClass : 'sf-js-enabled',
80
+ anchorClass : 'sf-with-ul',
81
+ arrowClass : 'sf-sub-indicator',
82
+ shadowClass : 'sf-shadow'
83
+ };
84
+ sf.defaults = {
85
+ hoverClass : 'sfHover',
86
+ pathClass : 'overideThisToUse',
87
+ pathLevels : 1,
88
+ delay : 800,
89
+ animation : {opacity:'show'},
90
+ speed : 'normal',
91
+ autoArrows : true,
92
+ dropShadows : true,
93
+ disableHI : false, // true disables hoverIntent detection
94
+ onInit : function(){}, // callback functions
95
+ onBeforeShow: function(){},
96
+ onShow : function(){},
97
+ onHide : function(){}
98
+ };
99
+ $.fn.extend({
100
+ hideSuperfishUl : function(){
101
+ var o = sf.op,
102
+ not = (o.retainPath===true) ? o.$path : '';
103
+ o.retainPath = false;
104
+ var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
105
+ .find('>ul').hide().css('visibility','hidden');
106
+ o.onHide.call($ul);
107
+ return this;
108
+ },
109
+ showSuperfishUl : function(){
110
+ var o = sf.op,
111
+ sh = sf.c.shadowClass+'-off',
112
+ $ul = this.addClass(o.hoverClass)
113
+ .find('>ul:hidden').css('visibility','visible');
114
+ sf.IE7fix.call($ul);
115
+ o.onBeforeShow.call($ul);
116
+ $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
117
+ return this;
118
+ }
119
+ });
120
+
121
+ })(jQuery);
@@ -0,0 +1,72 @@
1
+ /****************** WALL - ACTIVITIES *********************/
2
+ #wrapper_activities {}
3
+ #wall{ text-align:center;}
4
+
5
+
6
+ /****************** WALL - HEADER *********************/
7
+ #wrapper_activities_header { padding-top: 5px; padding-bottom: 5px; background-color: #deeff8;}
8
+ #activities_title { vertical-align: top; margin-left: 10px; font-weight: bold;}
9
+ #activities_header { width: 100%; margin-bottom: 5px; text-align: center; padding-top: 5px;}
10
+ #input_activities { border-color: #0656a4; color: #2A3890; padding: 5px 5px 5px 5px;
11
+ border:1px solid #BDC7D8; width:95%;}
12
+ #activities_share_btn { text-align: right; padding: 5px 16px 0px 10px; vertical-align: middle;}
13
+ #securities{ display:inline-block; text-align:left;}
14
+
15
+ /******************* WALL - ACTIVITY ***************/
16
+ .activity { text-align:left; display: block; vertical-align: top; padding: 10px 5px 0px 0px;
17
+ display: inline-block; color: #000; width: 100%; font-size: 13px; color: #2A3890;}
18
+ .actor_logo { width: 38px; padding: 8px 0px 8px 5px; display: inline-block; vertical-align: top;}
19
+ .activity_content { padding: 8px 0px 0px 0px; display: inline-block; color: #000; width: 90%;}
20
+ .actor_name { font-weight: bold; color: #2A3890; font-size: 13px;}
21
+ .post a { color: #2A3890;}
22
+
23
+ /***************** ACTIVITY OPTIONS ***/
24
+ .activity_options { color: #2A3890; font-size: 10px; display: inline-block;}
25
+ .actor_name-activity_objects{ font-weight: bold; color: #2A3890; font-size:12px;}
26
+ .subactivity_objects{ color: #000; font-weight:normal; font-size:11px;}
27
+ .post_time_ago { color: #6c6d6f;}
28
+ .activity_options { list-style:none; margin:0; padding:0;}
29
+ .activity_options li { padding-left:0px; padding-right:5px; float:left;}
30
+ .activity_options li a { text-decoration:none;}
31
+ .activity_options li a:hover { text-decoration:underline;}
32
+ .icon_gray{ list-style-image:url("/images/point_gray.png");}
33
+ .activity_options .icon_blue{ padding-left:5px; list-style-image:url("/images/point_blue.png");
34
+ list-style-position:inside;}
35
+
36
+
37
+
38
+ /************* ACTIVITY - FOOTER *********/
39
+ .space_comments { padding-top: 1px; padding-bottom: 1px;}
40
+ .space_activities { text-align:center; padding: 0px 0px 0px 1px; width:100%;}
41
+ .space_sub_activities{ padding: 1px 30px 0px 30px; border-bottom: thin solid #D4E4E4;
42
+ width:100%; text-align:center; display: inline;}
43
+ .space_sub{ display: inline; padding: 1px 200px 1px 200px; border-bottom: thin solid #D4E4E4;
44
+ font-size: 2px; text-align:center;}
45
+
46
+
47
+ /****************** SUB-ACTIVITY by ACTIVITY ********/
48
+
49
+
50
+ .activity_new_comment{ font-size: 11px; padding-left: 5px; background: #deeff8;
51
+ border: thin solid #D4E4E4;}
52
+ .actor_logo_subactivity { width: 40px; padding: 5px 3px 5px 2px; display: inline-block;
53
+ vertical-align: top;}
54
+ .input_new_comments{ border:1px solid #BDC7D8; width:98%; padding: 2px;}
55
+ .activity_new_comment{ font-size: 11px; width:100%; padding-top: 3px; padding-bottom: 3px;}
56
+ .subactivity{ font-size: 11px; padding: 0px 0px 0px 5px; background: #deeff8;
57
+ border: thin solid #D4E4E4;}
58
+ .space_comments { padding-top: 1px; padding-bottom: 1px;}
59
+ #input_activities { border-color: #0656a4; color: #2A3890; padding: 5px 5px 5px 5px;
60
+ border:1px solid #BDC7D8;}
61
+ #activities_share_btn { text-align: right; padding: 5px 16px 0px 10px; vertical-align: middle;}
62
+ .activities_comment_btn{ text-align: right; padding: 2px 5px 2px 10px; vertical-align: middle;}
63
+
64
+
65
+ /*********** DROP DOWN**********/
66
+ /** Simple modifications needed for DropDownCheckList to take advantage of ThemeRoller settings */
67
+ .ui-dropdownchecklist .ui-widget-content,.ui-dropdownchecklist-selector .ui-state-default { border: none; vertical-align:middle;}
68
+ .ui-dropdownchecklist-selector-wrapper { vertical-align: middle;}
69
+ .ui-dropdownchecklist-selector {}
70
+ .ui-dropdownchecklist-group {}
71
+ .ui-dropdownchecklist-text{ padding:3px 3px 0px;}
72
+
@@ -0,0 +1,150 @@
1
+ /*************Basic ********************/
2
+ * { margin: 0; padding: 0; font-family: Arial; }
3
+ html, body {height: 100%;}
4
+ .p { margin: 0px; padding: 0px; font-size: inherit; font-family: inherit; font-weight: inherit;
5
+ text-align: inherit; color: inherit; line-height: inherit; vertical-align: top;}
6
+ p { padding-top: 0px; margin-top: 0px;}
7
+ img { border: 0px;}
8
+ div { margin: 0px; padding: 0px; font-family: Helvetica; font-size: 11px;}
9
+ .AbsWrap { width: 100%; position: relative;}
10
+ .rowWrap { width: 100%;}
11
+ a:link,a:visited { color: inherit; text-decoration: inherit;}
12
+ a:hover { text-decoration: underline;}
13
+ .clearfloat { clear: both; height: 0px;}
14
+
15
+
16
+ /******* Main Structure ***************************/
17
+ body{font-size:1.0em; color:#2A3890; background-color:#ffffff; }
18
+ #wrapper { background-color: #f5f5f5; width: 100%; margin: 0px auto; }
19
+ #wrapper_body{min-height: 552px; width: 960px; margin:0px auto; margin-left: auto; margin-right: auto;
20
+ margin-top: auto; margin-bottom:auto;}
21
+
22
+ * html #wrapper_body, {height: 100%;}
23
+ /*********** Errors *********************/
24
+ /*
25
+ #notice { padding:2px; color:red; font-weight:bold; font-size:1.3em; display:block; text-align:center;}
26
+ #error_explanation { width: 80%; border: 2px solid red; padding: 7px; padding-bottom: 0;
27
+ margin-bottom: 20px; background-color: #f0f0f0; color:#fff;}
28
+ #error_explanation h2 { text-align: left; font-weight: bold; padding: 5px 5px 5px 15px;
29
+ font-size: 1.6em; margin: -7px; margin-bottom: 0px; background-color: #c00; color:#fff;}
30
+ #error_explanation ul li { font-size: 12px; list-style: square; margin-left:10px;}
31
+ */
32
+
33
+ #notice { padding:2px; color:#1F4A75; font-weight:bold; font-size:1.3em; display:block; text-align:center;}
34
+ .error, .notice, .success {padding:.8em;margin-bottom:1em;}
35
+ .error{padding:.8em;margin-bottom:1em;color:red;}
36
+ /*
37
+ .error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
38
+ .error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
39
+ .notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
40
+ .success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
41
+ .error a {color:#8a1f11;}
42
+ .notice a {color:#514721;}
43
+ .success a {color:#264409;}
44
+ */
45
+
46
+ /********* Menu header ************/
47
+ .menu_list ul{list-style-type:none;}
48
+ .menu_list li{display: inline;padding-right: 2px; padding-left: 2px; }
49
+
50
+
51
+ /************Forms **************/
52
+ input.other_blue{ background:#497FC1; border:0px; cursor:pointer; font-size:1.0em; line-height:135%;
53
+ margin-right:4px; color:white; padding:1px;}
54
+
55
+
56
+ /************ Forms - Buttons ***************************/
57
+ .myButton{ cursor:pointer;
58
+ background-image: -webkit-gradient(linear,left bottom,left top, color-stop(0.01, rgb(116,191,67)),
59
+ color-stop(0.51, rgb(117,189,68)),color-stop(0.76, rgb(195,222,171)));
60
+ background-image: -moz-linear-gradient(center bottom,rgb(116,191,67) 1%,rgb(117,189,68) 51%,
61
+ rgb(195,222,171) 76%);
62
+ border-radius: 0.2em; color: #fff; width: 88px; height: 26px; border: none;}
63
+ .myButton span { display: block; line-height: 14px; padding: 5px 0 5px 18px;}
64
+ .myButton:active { background-position: bottom right; color: #000; outline: none;}
65
+ .myButton:active span { background-position: bottom left; padding: 6px 0 4px 18px;}
66
+
67
+ .myButtonBlue{ cursor:pointer;
68
+ background-image: -webkit-gradient( linear, left bottom, left top,
69
+ color-stop(0.16, rgb(0,122,193)), color-stop(0.58, rgb(56,148,209)), color-stop(0.79, rgb(168,222,249)) );
70
+ background-image: -moz-linear-gradient(center bottom,
71
+ rgb(0,122,193) 16%, rgb(56,148,209) 58%, rgb(168,222,249) 79%);
72
+ border-radius: 0.2em; color: #fff; width: 60px; height: 22px; border: none;}
73
+ .myButtonBlue span { display: block; line-height: 14px; padding: 3px 0 3px 10px;}
74
+ .myButtonBlue:active { background-position: bottom right; color: #000; outline: none; }
75
+ .myButtonBlue:active span { background-position: bottom left; padding: 3px 0 2px 18px; }
76
+
77
+ .myButtonLarge{ cursor:pointer;
78
+ background-image: -webkit-gradient(linear,left bottom,left top,
79
+ color-stop(0.01, rgb(116,191,67)),color-stop(0.51, rgb(117,189,68)),
80
+ color-stop(0.76, rgb(195,222,171)) );
81
+ background-image: -moz-linear-gradient(center bottom,rgb(116,191,67) 1%,
82
+ rgb(117,189,68) 51%,rgb(195,222,171) 76%);
83
+ border-radius: 0.2em;color: #fff; width: 200px; height: 26px; border: none;}
84
+ .myButtonLarge span { display: block; line-height: 14px; padding: 5px 0 5px 18px;}
85
+ .myButtonLarge:active { background-position: bottom right; color: #000; outline: none;}
86
+ .myButtonLarge:active span { background-position: bottom left; padding: 6px 0 4px 18px;}
87
+
88
+ .button{margin: 10px 0 10px 10px;padding: 3px 3px 3px 3px;color:#FFFFFF;background-color: #1F4A75;}
89
+
90
+
91
+ .field_x{ border: thin solid #005C84; width: 130px;}
92
+ .line{ display:block; margin:10px 2px 10px 10px;}
93
+
94
+
95
+ /********* links **********/
96
+ .tie_link a{ text-decoration:none;}
97
+ .tie_link a:hover{ text-decoration:underline;}
98
+
99
+
100
+ /*************SPACES*************/
101
+ .space_center { padding-top: 9px; padding-right: 4px; text-align: center;}
102
+
103
+
104
+ /******** DIVS FORMS *******/
105
+ .block .field{ display:inline; padding: 0px; width:50%;}
106
+ .block .form_tag{border-color: #0656a4; color: #2A3890; padding: 5px 5px 5px 5px; border:1px solid #BDC7D8; width:90%;}
107
+ .block .form_tag_long{border-color: #0656a4; color: #2A3890; padding: 5px 5px 5px 5px; border:1px solid #BDC7D8; width:91%;}
108
+ .block .form_label{display:inline-block; width:25%; font-weight:bold; vertical-align:top; padding-top:3px;}
109
+ .block .form_field{ display:inline-block; padding: 0px; width:73%;}
110
+ .block .form_row { display: block; padding:5px; padding-left:20px; }
111
+ .block .label{ display:inline-block; width:49%; }
112
+
113
+
114
+ /************** BLOCK DIV *********/
115
+ .block .brief { color: #6C6D6F;}
116
+ .block .center{ text-align:center;}
117
+ .block .close { float:right; vertical-align:top;}
118
+ .block .content{ padding: 5px 4px 5px 4px;}
119
+ .block .header{vertical-align: middle; background: transparent url(/images/title_background.png) scroll 0px;
120
+ padding-left: 10px; display: block; height:20px; font-weight:bold;}
121
+ .block .header_icon{ margin-top: 2px; width:14px; height:14px; }
122
+ .block .header_icon_right { float: right; padding-right: 5px; padding-top: 3px;}
123
+ .block .header_text { margin-bottom: 3px; display: inline-block;}
124
+ .block .logo{ display: inline-block; vertical-align:top;}
125
+ .block .right{padding-right:20px; float:right;}
126
+ .block .row { display: block;}
127
+ .block .title{ display:inline-block; }
128
+ .block .sub-block{ display: inline-block; padding-left:3px; width:70%; text-align:left;}
129
+
130
+
131
+
132
+ /******BLOCK TAB CONTENT ********/
133
+ .block .tab { margin-top: 2px; background: #fff; /*border-top: thin solid #D4E4EA;*/
134
+ padding: 2px 0px 2px 0px;}
135
+ .block .tab_content{ padding:5px; text-align:center;}
136
+ .block .tab li { display: inline; list-style: none; padding-right: 2px;}
137
+ .block .tab li a { background-color: #deeff8; text-decoration: none; padding: 4px 3px; outline: none;}
138
+ .block .tab ul { background: #deeff8;}
139
+ .block .tab li a:hover,
140
+ .block .tab li.ui-tabs-nav a,
141
+ .block .tab li.ui-tabs-selected a,
142
+ .block .tab li a:active { background-color: #deeff8; font-weight: bold; text-decoration: none;}
143
+ .block .tab_browse{ width:49%; display:inline-block;}
144
+ .ui-tabs-hide { display: none;}
145
+
146
+
147
+
148
+ /*************MENU ICON**********/
149
+ .menu_header{ border-bottom: thin solid #D4E4EA; width:14.5em; padding-left:3px; padding-right:3px;}
150
+ .menu_icon{ vertical-align: middle; padding-bottom: 3px; padding-right: 3px; padding-left: 3px; display: inline-block;}