Browse files

Rohit Added coffee script calls to the global functions and removed d…

…ownloads of individual files
  • Loading branch information...
1 parent e37bf01 commit dbe9902af265997e9af197c0b1e5da35277d5fed @rohitggarg rohitggarg committed Mar 6, 2013
View
7 app/views/facebook_share_widget/facebook/change_employer.html.haml
@@ -1,3 +1,6 @@
-= javascript_include_tag 'widget/submit_employer'
-= javascript_include_tag 'widget/no_employers'
+
= render partial: 'employers_list', locals: { friends_employers_list: true }
+:coffeescript
+ $ ->
+ window.Cs.submit_employer();
+ window.Cs.no_employers();
View
8 app/views/facebook_share_widget/facebook/employers.html.haml
@@ -1,4 +1,6 @@
-= javascript_include_tag 'widget/submit_employer'
-= javascript_include_tag 'widget/employers'
.employers
- = render partial: 'employers_list', locals: { friends_employers_list: false }
+ = render partial: 'employers_list', locals: { friends_employers_list: false }
+:coffeescript
+ $ ->
+ window.Cs.submit_employer();
+ window.Cs.employers();
View
6 app/views/facebook_share_widget/facebook/no_employers.html.haml
@@ -1,3 +1,5 @@
-= javascript_include_tag 'widget/employers'
.employers
- Oops! Looks like you have no employers listed in your Facebook profile
+ Oops! Looks like you have no employers listed in your Facebook profile
+:coffeescript
+ $ ->
+ window.Cs.employers();
View
6 app/views/facebook_share_widget/facebook/no_friends_employers.html.haml
@@ -1,2 +1,4 @@
-= javascript_include_tag 'widget/no_employers'
-Oops! Looks like your friends have not listed any employers on their Facebook profile
+Oops! Looks like your friends have not listed any employers on their Facebook profile
+:coffeescript
+ $ ->
+ window.Cs.no_employers();

1 comment on commit dbe9902

@woodhull
ControlShift member

I'm really confused about what's going on here. Why do these functions need to be global? Can't they be constrained to the widget?

The widget is open source and the intent was that others could use it in their own projects (rather than being intimately tied to code in our app and vice versa).

Please sign in to comment.