LibreJS should work with most of the site

This commit is contained in:
Paul Hill 2014-10-21 02:48:18 +01:00
parent 954627c16c
commit ac4607d75c
117 changed files with 457 additions and 5 deletions

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require_self
//= require_tree ./helpers
@ -129,3 +131,5 @@ var app = {
$(function() {
app.initialize();
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.collections.Aspects = Backbone.Collection.extend({
model: app.models.Aspect,
@ -24,3 +26,5 @@ app.collections.Aspects = Backbone.Collection.extend({
return this.selectedAspects('name').join(separator).replace(/,\s([^,]+)$/, ' ' + Diaspora.I18n.t("and") + ' $1') || Diaspora.I18n.t("my_aspects");
}
})
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.collections.Comments = Backbone.Collection.extend({
model: app.models.Comment,
url: function() { return _.result(this.post, 'url') + '/comments'; },
@ -22,3 +24,5 @@ app.collections.Comments = Backbone.Collection.extend({
return deferred;
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.collections.Likes = Backbone.Collection.extend({
model: app.models.Like,
@ -5,3 +7,5 @@ app.collections.Likes = Backbone.Collection.extend({
this.url = "/posts/" + options.post.id + "/likes" //not delegating to post.url() because when it is in a stream collection it delegates to that url
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.collections.Photos = Backbone.Collection.extend({
url : "/photos",
@ -10,3 +12,5 @@ app.collections.Photos = Backbone.Collection.extend({
return resp.photos;
}
});
// @license-end

View file

@ -1,4 +1,8 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.collections.Posts = Backbone.Collection.extend({
model: app.models.Post,
url : "/posts"
});
// @license-end

View file

@ -1,4 +1,8 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.collections.Reshares = Backbone.Collection.extend({
model: app.models.Reshare,
url : "/reshares"
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.collections.TagFollowings = Backbone.Collection.extend({
model: app.models.TagFollowing,
@ -17,3 +19,5 @@ app.collections.TagFollowings = Backbone.Collection.extend({
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
(function(){
app.helpers.dateFormatter = {
parse:function (dateString) {
@ -14,3 +16,5 @@
}
}
})();
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
(function() {
app.helpers.txtDirection = {
setCssFor: function(str, on_element) {
@ -89,3 +91,5 @@
}
};
})();
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
Handlebars.registerHelper('t', function(scope, values) {
return Diaspora.I18n.t(scope, values.hash)
});
@ -105,3 +107,5 @@ Handlebars.registerHelper('isCurrentProfilePage', function(id, diaspora_handle,
return Handlebars.helpers.isCurrentPage('person', id, options) ||
Handlebars.helpers.isCurrentPage('user_profile', username, options);
});
// @license-end

View file

@ -1,4 +1,8 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* we need to wrap this in a document ready to ensure JST is accessible */
$(function(){
Handlebars.registerPartial('status-message', HandlebarsTemplates['status-message_tpl'])
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
(function(){
app.helpers.oEmbed = {
html : function (o_embed_cache) {
@ -11,4 +13,6 @@
}
}
}
})();
})();
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
(function(){
app.helpers.openGraph = {
html : function (open_graph_cache) {
@ -6,3 +8,5 @@
}
}
})();
// @license-end

View file

@ -1,3 +1,4 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
// cache url regex globally, for direct acces when testing
$(function() {
@ -141,4 +142,5 @@ $(function() {
app.helpers.textFormatter = textFormatter;
})();
// @license-end

View file

@ -1,3 +1,4 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
// Mixin to provide date formatting and "createdAt" method
// other attributes can be accessed by calling this.timeOf("timestamp-field")
@ -14,3 +15,5 @@ app.models.formatDateMixin = {
}
};
// @license-end

View file

@ -1,5 +1,9 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Aspect = Backbone.Model.extend({
toggleSelected: function(){
this.set({'selected' : !this.get('selected')}, {async: false});
}
});
// @license-end

View file

@ -1,7 +1,11 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/**
* this model represents the assignment of an aspect to a person.
* (only valid for the context of the current user)
*/
app.models.AspectMembership = Backbone.Model.extend({
urlRoot: "/aspect_memberships"
});
});
// @license-end

View file

@ -1,3 +1,7 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Block = Backbone.Model.extend({
urlRoot : "/blocks"
});
// @license-end

View file

@ -1,3 +1,7 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Comment = Backbone.Model.extend({
urlRoot: "/comments"
});
// @license-end

View file

@ -1 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Like = Backbone.Model.extend({ });
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Person = Backbone.Model.extend({
url: function() {
return Routes.person_path(this.get('guid'));
@ -47,3 +49,5 @@ app.models.Person = Backbone.Model.extend({
.done(function() { app.events.trigger('person:unblock:'+self.id); });
}
});
// @license-end

View file

@ -1,6 +1,10 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Photo = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, {
urlRoot : "/photos",
initialize : function() {},
}));
// @license-end

View file

@ -1,5 +1,9 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.PollParticipation = Backbone.Model.extend({
urlRoot: function(){
return '/posts/' + this.get('post_id') + "/poll_participations";
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, {
urlRoot : "/posts",
@ -68,3 +70,5 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin,
return $.trim(this.get("text")) !== ""
}
}));
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//require ../post
app.models.Post.Interactions = Backbone.Model.extend({
@ -134,3 +136,5 @@ app.models.Post.Interactions = Backbone.Model.extend({
return publicPost && app.currentUser.authenticated() && userIsNotAuthor && userIsNotRootAuthor && notReshared;
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Profile = Backbone.Model.extend({
urlRoot : "/profiles"
}, {
@ -18,3 +20,5 @@ app.models.Profile = Backbone.Model.extend({
return person
}
});
// @license-end

View file

@ -1,4 +1,8 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Report = Backbone.Model.extend({
urlRoot: '/report',
type: 'POST'
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.Reshare = app.models.Post.extend({
urlRoot : "/reshares",
@ -14,3 +16,5 @@ app.models.Reshare = app.models.Post.extend({
return this.rootPost().reshareAuthor()
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.StatusMessage = app.models.Post.extend({
url : function(){
return this.isNew() ? '/status_messages' : '/posts/' + this.get("id");
@ -18,3 +20,5 @@ app.models.StatusMessage = app.models.Post.extend({
}
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require ../collections/posts
//= require ../collections/photos
app.models.Stream = Backbone.Collection.extend({
@ -91,3 +93,5 @@ app.models.Stream = Backbone.Collection.extend({
this.trigger("fetched")
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.StreamAspects = app.models.Stream.extend({
url : function(){
@ -22,3 +24,5 @@ app.models.StreamAspects = app.models.Stream.extend({
.done(_.bind(this.triggerFetchedEvents, this));
}
});
// @license-end

View file

@ -1,3 +1,7 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.TagFollowing = Backbone.Model.extend({
urlRoot: "/tag_followings"
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.models.User = Backbone.Model.extend({
toggleNsfwState : function() {
if(!app.currentUser.authenticated()){ return false }
@ -21,3 +23,5 @@ app.models.User = Backbone.Model.extend({
return this.authenticated() && model.get("author").id == this.id;
}
});
// @license-end

View file

@ -1,3 +1,4 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.pages.Profile = app.views.Base.extend({
events: {
@ -128,3 +129,5 @@ app.pages.Profile = app.views.Base.extend({
this.$('#profile').removeClass('loading');
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.pages.SinglePostViewer = app.views.Base.extend({
templateName: "single-post-viewer",
@ -38,3 +40,5 @@ app.pages.SinglePostViewer = app.views.Base.extend({
},
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.Router = Backbone.Router.extend({
routes: {
"help": "help",
@ -152,4 +154,5 @@ app.Router = Backbone.Router.extend({
}); });
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Base = Backbone.View.extend({
initialize : function(options) {
@ -147,3 +149,5 @@ app.views.StaticContentView = app.views.Base.extend({
return this.data;
},
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/**
* this view lets the user (de-)select aspect memberships in the context
* of another users profile or the contact page.
@ -166,3 +168,5 @@ app.views.AspectMembershipBlueprint = Backbone.View.extend({
return Diaspora.I18n.t('aspect_dropdown.toggle', { 'count':cnt.toString() });
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require ./aspects_dropdown_view
/**
@ -139,3 +141,5 @@ app.views.AspectMembership = app.views.AspectsDropdown.extend({
this._updateButton('green');
},
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Aspect = app.views.Base.extend({
templateName: "aspect",
@ -22,3 +24,5 @@ app.views.Aspect = app.views.Base.extend({
})
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/*
* Aspects view for the publishers aspect dropdown and the aspect membership dropdown.
*/
@ -45,3 +47,5 @@ app.views.AspectsDropdown = app.views.Base.extend({
button.find('.text').text(buttonText);
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.AspectsList = app.views.Base.extend({
templateName: 'aspects-list',
@ -62,3 +64,5 @@ app.views.AspectsList = app.views.Base.extend({
this.$el.empty();
},
})
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Bookmarklet = Backbone.View.extend({
separator: ' - ',
@ -43,3 +45,5 @@ app.views.Bookmarklet = Backbone.View.extend({
this.$('h4').text(Diaspora.I18n.t('bookmarklet.post_something'));
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.CommentStream = app.views.Base.extend({
templateName: "comment-stream",
@ -96,3 +98,5 @@ app.views.CommentStream = app.views.Base.extend({
});
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require ./content_view
app.views.Comment = app.views.Content.extend({
templateName: "comment",
@ -39,3 +41,5 @@ app.views.ExpandedComment = app.views.Comment.extend({
postRenderTemplate : function(){
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Contacts = Backbone.View.extend({
el: "#contacts_container",
@ -110,3 +112,5 @@ app.views.Contacts = Backbone.View.extend({
});
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Content = app.views.Base.extend({
events: {
"click .expander": "expandPost"
@ -116,3 +118,5 @@ app.views.OEmbed = app.views.Base.extend({
app.views.OpenGraph = app.views.Base.extend({
templateName : "opengraph"
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.ConversationsForm = Backbone.View.extend({
initialize: function(opts) {
@ -25,3 +27,5 @@ app.views.ConversationsForm = Backbone.View.extend({
}).focus();
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Conversations = Backbone.View.extend({
el: "#conversations_container",
@ -32,3 +34,5 @@ app.views.Conversations = Backbone.View.extend({
$(e.currentTarget).find('.participants').slideDown('300');
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.FaqQuestionView = app.views.Base.extend({
templateName: "faq_question",
@ -34,4 +36,6 @@ app.views.FaqQuestionView = app.views.Base.extend({
e.preventDefault();
},
});
});
// @license-end

View file

@ -1,7 +1,11 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//=require "./feedback_view"
app.views.FeedbackActions = app.views.Feedback.extend({
id : "user-controls",
templateName : "feedback-actions",
events: {},
initialize: function(){}
});
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Feedback = app.views.Base.extend({
templateName: "feedback",
@ -40,3 +42,5 @@ app.views.Feedback = app.views.Base.extend({
this.model.interactions.reshare();
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Header = app.views.Base.extend({
templateName : "header",
@ -43,3 +45,5 @@ app.views.Header = app.views.Base.extend({
return false;
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.HelpSectionView = app.views.StaticContentView.extend({
events: {
@ -52,3 +54,5 @@ app.views.HelpSectionView = app.views.StaticContentView.extend({
},
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Help = app.views.StaticContentView.extend({
templateName : "help",
@ -156,3 +158,5 @@ app.views.Help = app.views.StaticContentView.extend({
return "<a href=\"" + url + "\" target=\"_blank\">" + text + "</a>";
},
});
// @license-end

View file

@ -1,3 +1,4 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Hovercard = app.views.Base.extend({
templateName: 'hovercard',
@ -141,3 +142,5 @@ app.views.Hovercard = app.views.Base.extend({
});
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
// Abstract Infinite Scroll View Super Class
// Requires:
// a stream model, assigned to this.stream
@ -105,3 +107,5 @@ app.views.InfScroll = app.views.Base.extend({
}
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.LikesInfo = app.views.Base.extend({
templateName : "likes-info",
@ -25,3 +27,5 @@ app.views.LikesInfo = app.views.Base.extend({
this.model.interactions.fetch()
}
});
// @license-end

View file

@ -1,3 +1,7 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.LocationStream = app.views.Content.extend({
templateName: "status-message-location"
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Location = Backbone.View.extend({
el: "#location",
@ -22,4 +24,5 @@ app.views.Location = Backbone.View.extend({
});
},
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Notifications = Backbone.View.extend({
events: {
@ -90,3 +92,5 @@ app.views.Notifications = Backbone.View.extend({
}
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Photo = app.views.Base.extend({
templateName: "photo",
@ -22,3 +24,5 @@ app.views.Photo = app.views.Base.extend({
});
}
});
// @license-end

View file

@ -1,7 +1,11 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.PhotoViewer = app.views.Base.extend({
templateName : "photo-viewer",
presenter : function(){
return { photos : this.model.get("photos") } //json array of attributes, not backbone models, yet.
}
});
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Photos = app.views.InfScroll.extend({
initialize : function(options) {
this.stream = this.model;
@ -21,3 +23,5 @@ app.views.Photos = app.views.InfScroll.extend({
$(this.el).delegate("a.photo-link", "click", this.lightbox.lightboxImageClicked);
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Poll = app.views.Base.extend({
templateName: "poll",
@ -107,3 +109,5 @@ app.views.Poll = app.views.Base.extend({
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Post = app.views.Base.extend({
presenter : function() {
return _.extend(this.defaultPresenter(), {
@ -11,3 +13,5 @@ app.views.Post = app.views.Base.extend({
return (app.currentUser.get("showNsfw")) || !this.model.get("nsfw")
}
});
// @license-end

View file

@ -1,3 +1,4 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.ProfileHeader = app.views.Base.extend({
templateName: 'profile_header',
@ -65,3 +66,5 @@ app.views.ProfileHeader = app.views.Base.extend({
app.page.asyncSubHeader && app.page.asyncSubHeader.resovle();
}
});
// @license-end

View file

@ -1,3 +1,4 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.ProfileSidebar = app.views.Base.extend({
templateName: 'profile_sidebar',
@ -12,3 +13,5 @@ app.views.ProfileSidebar = app.views.Base.extend({
return (this.model.isSharing() || this.model.get('is_own_profile'));
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* Copyright (c) 2010-2012, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
@ -88,3 +90,5 @@ app.views.PublisherAspectSelectorBlueprint = Backbone.View.extend({
);
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require ../aspects_dropdown_view
/*
@ -66,3 +68,5 @@ app.views.PublisherAspectSelector = app.views.AspectsDropdown.extend({
});
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* Copyright (c) 2010-2012, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
@ -74,3 +76,5 @@ app.views.PublisherGettingStarted = Backbone.View.extend({
}, timeout);
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.PublisherPollCreator = app.views.Base.extend({
templateName: "poll_creator",
@ -103,3 +105,5 @@ app.views.PublisherPollCreator = app.views.Base.extend({
return pollValid;
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* Copyright (c) 2010-2012, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
@ -61,3 +63,5 @@ app.views.PublisherServices = Backbone.View.extend({
}
}
});
// @license-end

View file

@ -1,3 +1,4 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
// Uploader view for the publisher.
// Initializes the file uploader plugin and handles callbacks for the upload
@ -152,3 +153,5 @@ app.views.PublisherUploader = Backbone.View.extend({
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* Copyright (c) 2010-2012, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
@ -491,3 +493,5 @@ $.fn.serializeObject = function()
});
return o;
};
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Sidebar = app.views.Base.extend({
el: '.rightBar',
@ -9,3 +11,5 @@ app.views.Sidebar = app.views.Base.extend({
event.target.select();
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.SinglePostActions = app.views.Feedback.extend({
templateName: "single-post-viewer/single-post-actions",
@ -34,3 +36,5 @@ app.views.SinglePostActions = app.views.Feedback.extend({
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.SinglePostCommentStream = app.views.CommentStream.extend({
tooltipSelector: "time, .controls a",
@ -40,3 +42,5 @@ app.views.SinglePostCommentStream = app.views.CommentStream.extend({
})
},
})
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.SinglePostContent = app.views.Base.extend({
templateName: 'single-post-viewer/single-post-content',
tooltipSelector: "time, .post_scope",
@ -35,3 +37,5 @@ app.views.SinglePostContent = app.views.Base.extend({
return (app.currentUser.get("showNsfw")) || !this.model.get("nsfw")
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.SinglePostInteractions = app.views.Base.extend({
templateName: "single-post-viewer/single-post-interactions",
tooltipSelector: ".avatar.micro",
@ -23,3 +25,5 @@ app.views.SinglePostInteractions = app.views.Base.extend({
}
},
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.StreamShortcuts = {
_headerSize: 50,
@ -103,3 +105,5 @@ app.views.StreamShortcuts = {
element.className+=" shortcut_selected highlighted";
},
};
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.StreamFaces = app.views.Base.extend({
templateName : "stream-faces",
@ -27,3 +29,5 @@ app.views.StreamFaces = app.views.Base.extend({
this.render();
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.StreamPost = app.views.Post.extend({
templateName: "stream-element",
className : "stream_element loaded",
@ -113,3 +115,5 @@ app.views.StreamPost = app.views.Post.extend({
}
})
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require ./stream/shortcuts
app.views.Stream = app.views.InfScroll.extend(_.extend(
@ -38,3 +40,5 @@ app.views.Stream = app.views.InfScroll.extend(_.extend(
streamSelection.find("[data-stream='" + activeStream + "']").addClass("selected");
}
}));
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.TagFollowingAction = app.views.Base.extend({
templateName: "tag_following_action",
@ -60,3 +62,5 @@ app.views.TagFollowingAction = app.views.Base.extend({
}
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
//= require jquery.autoSuggest.custom
app.views.TagFollowingList = app.views.Base.extend({
@ -77,3 +79,5 @@ app.views.TagFollowingList = app.views.Base.extend({
this.$el.empty();
},
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.TagFollowing = app.views.Base.extend({
templateName: "tag_following",
@ -31,3 +33,5 @@ app.views.TagFollowing = app.views.Base.extend({
}
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
// Copyright (c) 2010-2012, Diaspora Inc. This file is
// licensed under the Affero General Public License version 3 or later. See
// the COPYRIGHT file.
@ -73,3 +75,5 @@ var AspectsDropdown = {
}
};
// @license-end

View file

@ -1,5 +1,9 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
jQuery.browser = {};
jQuery.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.opera = /opera/.test(navigator.userAgent.toLowerCase());
jQuery.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());
// @license-end

View file

@ -16,3 +16,4 @@ $.fn.clearForm = function() {
$(this).blur();
});
};

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
var List = {
runDelayedSearch: function( searchTerm ) {
$.getJSON('/people/refresh_search',
@ -19,3 +21,5 @@ var List = {
setTimeout( "List.runDelayedSearch('" + theSearch + "')", 10000);
}
};
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* Copyright (c) 2010-2011, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
@ -93,3 +95,5 @@
$(Diaspora.instantiatePage);
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
Diaspora.Alert = {
faceboxTemplate:
'<div id="diaspora_alert">' +
@ -28,3 +30,5 @@ $(function() {
$("#diaspora_alert").remove();
});
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
Diaspora.I18n = {
language: "en",
locale: {
@ -77,3 +79,5 @@ Diaspora.I18n = {
this.locale.data = arguments[0];
}
};
// @license-end

View file

@ -1,2 +1,6 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
document.createElement('header');
document.createElement('footer');
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* Copyright (c) 2010-2011, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
@ -72,3 +74,5 @@ $(document).ready(function(){
if (xhr.status == 404) { $('a.next_page').remove(); }
});
});
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
var Mentions = {
initialize: function(mentionsInput) {
return mentionsInput.mentionsInput(Mentions.options);
@ -43,3 +45,5 @@ var Mentions = {
}
}
};
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
/* Copyright (c) 2010-2011, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
@ -371,3 +373,5 @@ function createUploader(){
});
}
createUploader();
// @license-end

View file

@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
OSM = {};
OSM.Locator = function(){
@ -21,3 +23,5 @@ OSM.Locator = function(){
}
}
// @license-end

Some files were not shown because too many files have changed in this diff Show more