Commit 42276a73 authored by danielgrippi's avatar danielgrippi Committed by Dennis Collinson

remove old stream initialization from js pages; remove websocket js code

from the layout; rename templates to have a .jst extension
(JavaScriptTemplate?)
parent 3268726a
......@@ -61,6 +61,10 @@
- unless @landing_page
= include_javascripts :main
:javascript
Diaspora.I18n.loadLocale(#{get_javascript_strings_for(I18n.locale).to_json}, "#{I18n.locale}");
Diaspora.Page = "#{params[:controller].camelcase}#{params[:action].camelcase}";
- if current_user
app.user({
current_user: #{current_user.person.as_api_response(:backbone).to_json}
});
......
......@@ -2,33 +2,16 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%script{:id => "header-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/header.ujs")
%script{:id => "feedback-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/feedback.ujs")
%script{:id => "static-text-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/static_text.ujs")
%script{:id => "stream-element-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/stream_element.ujs")
%script{:id => "comment-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/comment.ujs")
%script{:id => "comment-stream-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/comment_stream.ujs")
%script{:id => "status-message-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/status_message.ujs")
%script{:id => "reshare-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/reshare.ujs")
%script{:id => "activity-streams-photo-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/activity-streams-photo.ujs")
%script{:id => "likes-info-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/likes_info.ujs")
- ["header",
"feedback",
"static_text",
"stream_element",
"comment_stream",
"comment",
"status_message",
"activity_streams_photo",
"reshare",
"likes_info"].each do |template_name|
%script{:id => "#{template_name.gsub("_","-")}-template", :type => 'text/template'}
!= File.read("#{Rails.root}/app/views/templates/#{template_name}.jst")
......@@ -5,9 +5,9 @@ gzip_assets: off
javascripts:
flash_socket:
- public/javascripts/vendor/FABridge.js
- public/javascripts/vendor/swfobject.js
- public/javascripts/vendor/web_socket.js
#- public/javascripts/vendor/FABridge.js
#- public/javascripts/vendor/swfobject.js
#- public/javascripts/vendor/web_socket.js
jquery:
- public/javascripts/vendor/jquery-1.7.1.min.js
......
......@@ -3,7 +3,5 @@ Diaspora.Pages.AspectsIndex = function() {
this.subscribe("page/ready", function(evt, document) {
self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav"));
self.stream = self.instantiate("Stream", document.find("#aspect_stream_container"));
self.infiniteScroll = self.instantiate("InfiniteScroll");
});
};
......@@ -2,10 +2,7 @@ Diaspora.Pages.CommentStreamIndex = function() {
var self = this;
this.subscribe("page/ready", function(evt, document) {
self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav"));
self.stream = self.instantiate("Stream", document.find("#aspect_stream_container"));
self.infiniteScroll = self.instantiate("InfiniteScroll");
});
};
......@@ -3,7 +3,6 @@ Diaspora.Pages.ContactsIndex = function() {
this.subscribe("page/ready", function(evt, document) {
self.infiniteScroll = self.instantiate("InfiniteScroll");
$('.conversation_button').twipsy({position: 'below'});
});
};
......@@ -2,9 +2,6 @@ Diaspora.Pages.LikeStreamIndex = function() {
var self = this;
this.subscribe("page/ready", function(evt, document) {
self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav"));
self.stream = self.instantiate("Stream", document.find("#aspect_stream_container"));
self.infiniteScroll = self.instantiate("InfiniteScroll");
});
};
......@@ -2,9 +2,6 @@ Diaspora.Pages.PostsIndex = function() {
var self = this;
this.subscribe("page/ready", function(evt, document) {
self.aspectNavigation = self.instantiate("AspectNavigation", document.find("ul#aspect_nav"));
self.stream = self.instantiate("Stream", document.find("#aspect_stream_container"));
self.infiniteScroll = self.instantiate("InfiniteScroll");
});
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment