Skip to content
Extraits de code Groupes Projets
Valider a9a480da rédigé par Steffen van Bergerem's avatar Steffen van Bergerem
Parcourir les fichiers

JSHint semicolon errors

parent 6b0a5823
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 96 ajouts et 109 suppressions
...@@ -36,7 +36,7 @@ var app = { ...@@ -36,7 +36,7 @@ var app = {
user: function(userAttrs) { user: function(userAttrs) {
if(userAttrs) { return this._user = new app.models.User(userAttrs) } if(userAttrs) { return this._user = new app.models.User(userAttrs) }
return this._user || false return this._user || false;
}, },
initialize: function() { initialize: function() {
...@@ -52,21 +52,21 @@ var app = { ...@@ -52,21 +52,21 @@ var app = {
}, },
hasPreload : function(prop) { hasPreload : function(prop) {
return !!(window.gon.preloads && window.gon.preloads[prop]) //returning boolean variable so that parsePreloads, which cleans up properly is used instead return !!(window.gon.preloads && window.gon.preloads[prop]); //returning boolean variable so that parsePreloads, which cleans up properly is used instead
}, },
setPreload : function(prop, val) { setPreload : function(prop, val) {
window.gon.preloads = window.gon.preloads || {} window.gon.preloads = window.gon.preloads || {};
window.gon.preloads[prop] = val window.gon.preloads[prop] = val;
}, },
parsePreload : function(prop) { parsePreload : function(prop) {
if(!app.hasPreload(prop)) { return } if(!app.hasPreload(prop)) { return }
var preload = window.gon.preloads[prop] var preload = window.gon.preloads[prop];
delete window.gon.preloads[prop] //prevent dirty state across navigates delete window.gon.preloads[prop]; //prevent dirty state across navigates
return(preload) return(preload);
}, },
setupDummyPreloads: function() { setupDummyPreloads: function() {
...@@ -101,8 +101,8 @@ var app = { ...@@ -101,8 +101,8 @@ var app = {
evt.preventDefault(); evt.preventDefault();
var link = $(this); var link = $(this);
$(".stream_title").text(link.text()) $(".stream_title").text(link.text());
app.router.navigate(link.attr("href").substring(1) ,true) app.router.navigate(link.attr("href").substring(1) ,true);
}); });
}, },
...@@ -118,7 +118,7 @@ var app = { ...@@ -118,7 +118,7 @@ var app = {
/* mixpanel wrapper function */ /* mixpanel wrapper function */
instrument : function(type, name, object, callback) { instrument : function(type, name, object, callback) {
if(!window.mixpanel) { return } if(!window.mixpanel) { return }
window.mixpanel[type](name, object, callback) window.mixpanel[type](name, object, callback);
}, },
setupDisabledLinks: function() { setupDisabledLinks: function() {
...@@ -132,4 +132,3 @@ $(function() { ...@@ -132,4 +132,3 @@ $(function() {
app.initialize(); app.initialize();
}); });
// @license-end // @license-end
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
app.collections.AspectMemberships = Backbone.Collection.extend({ app.collections.AspectMemberships = Backbone.Collection.extend({
model: app.models.AspectMembership model: app.models.AspectMembership
}) });
// @license-end // @license-end
...@@ -25,6 +25,5 @@ app.collections.Aspects = Backbone.Collection.extend({ ...@@ -25,6 +25,5 @@ app.collections.Aspects = Backbone.Collection.extend({
var separator = Diaspora.I18n.t("comma") + ' '; var separator = Diaspora.I18n.t("comma") + ' ';
return this.selectedAspects('name').join(separator).replace(/,\s([^,]+)$/, ' ' + Diaspora.I18n.t("and") + ' $1') || Diaspora.I18n.t("my_aspects"); return this.selectedAspects('name').join(separator).replace(/,\s([^,]+)$/, ' ' + Diaspora.I18n.t("and") + ' $1') || Diaspora.I18n.t("my_aspects");
} }
}) });
// @license-end // @license-end
...@@ -16,8 +16,8 @@ app.collections.Comments = Backbone.Collection.extend({ ...@@ -16,8 +16,8 @@ app.collections.Comments = Backbone.Collection.extend({
var deferred = comment.save({}, { var deferred = comment.save({}, {
url: '/posts/'+this.post.id+'/comments', url: '/posts/'+this.post.id+'/comments',
success: function() { success: function() {
comment.set({author: app.currentUser.toJSON(), parent: self.post }) comment.set({author: app.currentUser.toJSON(), parent: self.post });
self.add(comment) self.add(comment);
} }
}); });
...@@ -25,4 +25,3 @@ app.collections.Comments = Backbone.Collection.extend({ ...@@ -25,4 +25,3 @@ app.collections.Comments = Backbone.Collection.extend({
} }
}); });
// @license-end // @license-end
...@@ -4,8 +4,7 @@ app.collections.Likes = Backbone.Collection.extend({ ...@@ -4,8 +4,7 @@ app.collections.Likes = Backbone.Collection.extend({
model: app.models.Like, model: app.models.Like,
initialize : function(models, options) { initialize : function(models, options) {
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 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 // @license-end
...@@ -4,7 +4,7 @@ app.collections.Photos = Backbone.Collection.extend({ ...@@ -4,7 +4,7 @@ app.collections.Photos = Backbone.Collection.extend({
url : "/photos", url : "/photos",
model: function(attrs, options) { model: function(attrs, options) {
var modelClass = app.models.Photo var modelClass = app.models.Photo;
return new modelClass(attrs, options); return new modelClass(attrs, options);
}, },
...@@ -13,4 +13,3 @@ app.collections.Photos = Backbone.Collection.extend({ ...@@ -13,4 +13,3 @@ app.collections.Photos = Backbone.Collection.extend({
} }
}); });
// @license-end // @license-end
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
return timestamp || 0; return timestamp || 0;
} }
} };
})(); })();
// @license-end // @license-end
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
Handlebars.registerHelper('t', function(scope, values) { Handlebars.registerHelper('t', function(scope, values) {
return Diaspora.I18n.t(scope, values.hash) return Diaspora.I18n.t(scope, values.hash);
}); });
Handlebars.registerHelper('txtDirClass', function(str) { Handlebars.registerHelper('txtDirClass', function(str) {
...@@ -29,7 +29,7 @@ Handlebars.registerHelper('linkToAuthor', function(context, block) { ...@@ -29,7 +29,7 @@ Handlebars.registerHelper('linkToAuthor', function(context, block) {
html += block.fn(context); html += block.fn(context);
html += "</a>"; html += "</a>";
return html return html;
}); });
Handlebars.registerHelper('linkToPerson', function(context, block) { Handlebars.registerHelper('linkToPerson', function(context, block) {
...@@ -38,7 +38,7 @@ Handlebars.registerHelper('linkToPerson', function(context, block) { ...@@ -38,7 +38,7 @@ Handlebars.registerHelper('linkToPerson', function(context, block) {
html += block.fn(context); html += block.fn(context);
html += "</a>"; html += "</a>";
return html return html;
}); });
// relationship indicator for profile page // relationship indicator for profile page
...@@ -132,4 +132,3 @@ Handlebars.registerHelper('aspectMembershipIndicator', function(contact,in_aspec ...@@ -132,4 +132,3 @@ Handlebars.registerHelper('aspectMembershipIndicator', function(contact,in_aspec
return html; return html;
}); });
// @license-end // @license-end
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* we need to wrap this in a document ready to ensure JST is accessible */ /* we need to wrap this in a document ready to ensure JST is accessible */
$(function(){ $(function(){
Handlebars.registerPartial('status-message', HandlebarsTemplates['status-message_tpl']) Handlebars.registerPartial('status-message', HandlebarsTemplates['status-message_tpl']);
}); });
// @license-end // @license-end
...@@ -7,12 +7,11 @@ ...@@ -7,12 +7,11 @@
var data = o_embed_cache.data; var data = o_embed_cache.data;
if (data.type == "photo") { if (data.type == "photo") {
return '<img src="' + data.url + '" width="' + data.width + '" height="' + data.height + '" />' return '<img src="' + data.url + '" width="' + data.width + '" height="' + data.height + '" />';
} else { } else {
return data.html || "" return data.html || "";
} }
} }
} };
})(); })();
// @license-end // @license-end
...@@ -4,17 +4,17 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, ...@@ -4,17 +4,17 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin,
urlRoot : "/posts", urlRoot : "/posts",
initialize : function() { initialize : function() {
this.interactions = new app.models.Post.Interactions(_.extend({post : this}, this.get("interactions"))) this.interactions = new app.models.Post.Interactions(_.extend({post : this}, this.get("interactions")));
this.delegateToInteractions() this.delegateToInteractions();
}, },
delegateToInteractions : function(){ delegateToInteractions : function(){
this.comments = this.interactions.comments this.comments = this.interactions.comments;
this.likes = this.interactions.likes this.likes = this.interactions.likes;
this.comment = function(){ this.comment = function(){
this.interactions.comment.apply(this.interactions, arguments) this.interactions.comment.apply(this.interactions, arguments);
} };
}, },
interactedAt : function() { interactedAt : function() {
...@@ -26,7 +26,7 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, ...@@ -26,7 +26,7 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin,
}, },
reshareAuthor : function(){ reshareAuthor : function(){
return this.get("author") return this.get("author");
}, },
blockAuthor: function() { blockAuthor: function() {
...@@ -38,7 +38,7 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, ...@@ -38,7 +38,7 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin,
}, },
toggleFavorite : function(options){ toggleFavorite : function(options){
this.set({favorite : !this.get("favorite")}) this.set({favorite : !this.get("favorite")});
/* guard against attempting to save a model that a user doesn't own */ /* guard against attempting to save a model that a user doesn't own */
if(options.save){ this.save() } if(options.save){ this.save() }
...@@ -46,28 +46,28 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, ...@@ -46,28 +46,28 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin,
headline : function() { headline : function() {
var headline = this.get("text").trim() var headline = this.get("text").trim()
, newlineIdx = headline.indexOf("\n") , newlineIdx = headline.indexOf("\n");
return (newlineIdx > 0 ) ? headline.substr(0, newlineIdx) : headline return (newlineIdx > 0 ) ? headline.substr(0, newlineIdx) : headline;
}, },
body : function(){ body : function(){
var body = this.get("text").trim() var body = this.get("text").trim()
, newlineIdx = body.indexOf("\n") , newlineIdx = body.indexOf("\n");
return (newlineIdx > 0 ) ? body.substr(newlineIdx+1, body.length) : "" return (newlineIdx > 0 ) ? body.substr(newlineIdx+1, body.length) : "";
}, },
//returns a promise //returns a promise
preloadOrFetch : function(){ preloadOrFetch : function(){
var action = app.hasPreload("post") ? this.set(app.parsePreload("post")) : this.fetch() var action = app.hasPreload("post") ? this.set(app.parsePreload("post")) : this.fetch();
return $.when(action) return $.when(action);
}, },
hasPhotos : function(){ hasPhotos : function(){
return this.get("photos") && this.get("photos").length > 0 return this.get("photos") && this.get("photos").length > 0;
}, },
hasText : function(){ hasText : function(){
return $.trim(this.get("text")) !== "" return $.trim(this.get("text")) !== "";
} }
})); }));
// @license-end // @license-end
......
...@@ -4,80 +4,80 @@ ...@@ -4,80 +4,80 @@
app.models.Post.Interactions = Backbone.Model.extend({ app.models.Post.Interactions = Backbone.Model.extend({
url : function(){ url : function(){
return this.post.url() + "/interactions" return this.post.url() + "/interactions";
}, },
initialize : function(options){ initialize : function(options){
this.post = options.post this.post = options.post;
this.comments = new app.collections.Comments(this.get("comments"), {post : this.post}) this.comments = new app.collections.Comments(this.get("comments"), {post : this.post});
this.likes = new app.collections.Likes(this.get("likes"), {post : this.post}); this.likes = new app.collections.Likes(this.get("likes"), {post : this.post});
this.reshares = new app.collections.Reshares(this.get("reshares"), {post : this.post}); this.reshares = new app.collections.Reshares(this.get("reshares"), {post : this.post});
}, },
parse : function(resp){ parse : function(resp){
this.comments.reset(resp.comments) this.comments.reset(resp.comments);
this.likes.reset(resp.likes) this.likes.reset(resp.likes);
this.reshares.reset(resp.reshares) this.reshares.reset(resp.reshares);
var comments = this.comments var comments = this.comments
, likes = this.likes , likes = this.likes
, reshares = this.reshares , reshares = this.reshares;
return { return {
comments : comments, comments : comments,
likes : likes, likes : likes,
reshares : reshares, reshares : reshares,
fetched : true fetched : true
} };
}, },
likesCount : function(){ likesCount : function(){
return (this.get("fetched") ? this.likes.models.length : this.get("likes_count") ) return (this.get("fetched") ? this.likes.models.length : this.get("likes_count") );
}, },
resharesCount : function(){ resharesCount : function(){
return this.get("fetched") ? this.reshares.models.length : this.get("reshares_count") return this.get("fetched") ? this.reshares.models.length : this.get("reshares_count");
}, },
commentsCount : function(){ commentsCount : function(){
return this.get("fetched") ? this.comments.models.length : this.get("comments_count") return this.get("fetched") ? this.comments.models.length : this.get("comments_count");
}, },
userLike : function(){ userLike : function(){
return this.likes.select(function(like){ return like.get("author").guid == app.currentUser.get("guid")})[0] return this.likes.select(function(like){ return like.get("author").guid == app.currentUser.get("guid")})[0];
}, },
userReshare : function(){ userReshare : function(){
return this.reshares.select(function(reshare){ return this.reshares.select(function(reshare){
return reshare.get("author") && reshare.get("author").guid == app.currentUser.get("guid")})[0] return reshare.get("author") && reshare.get("author").guid == app.currentUser.get("guid")})[0];
}, },
toggleLike : function() { toggleLike : function() {
if(this.userLike()) { if(this.userLike()) {
this.unlike() this.unlike();
} else { } else {
this.like() this.like();
} }
}, },
like : function() { like : function() {
var self = this; var self = this;
this.likes.create({}, {success : function(){ this.likes.create({}, {success : function(){
self.trigger("change") self.trigger("change");
self.set({"likes_count" : self.get("likes_count") + 1}) self.set({"likes_count" : self.get("likes_count") + 1});
}}) }});
app.instrument("track", "Like") app.instrument("track", "Like");
}, },
unlike : function() { unlike : function() {
var self = this; var self = this;
this.userLike().destroy({success : function(model, resp) { this.userLike().destroy({success : function(model, resp) {
self.trigger('change') self.trigger('change');
self.set({"likes_count" : self.get("likes_count") - 1}) self.set({"likes_count" : self.get("likes_count") - 1});
}}); }});
app.instrument("track", "Unlike") app.instrument("track", "Unlike");
}, },
comment : function (text) { comment : function (text) {
...@@ -90,12 +90,12 @@ app.models.Post.Interactions = Backbone.Model.extend({ ...@@ -90,12 +90,12 @@ app.models.Post.Interactions = Backbone.Model.extend({
notice: Diaspora.I18n.t("failed_to_post_message") notice: Diaspora.I18n.t("failed_to_post_message")
}); });
}).done(function() { }).done(function() {
self.trigger('change') //updates after sync self.trigger('change'); //updates after sync
}); });
this.trigger("change") //updates count in an eager manner this.trigger("change"); //updates count in an eager manner
app.instrument("track", "Comment") app.instrument("track", "Comment");
}, },
reshare : function(){ reshare : function(){
...@@ -117,12 +117,12 @@ app.models.Post.Interactions = Backbone.Model.extend({ ...@@ -117,12 +117,12 @@ app.models.Post.Interactions = Backbone.Model.extend({
}); });
} }
}).done(function(){ }).done(function(){
interactions.reshares.add(reshare) interactions.reshares.add(reshare);
}).done(function(){ }).done(function(){
interactions.trigger("change") interactions.trigger("change");
}); });
app.instrument("track", "Reshare") app.instrument("track", "Reshare");
}, },
userCanReshare : function(){ userCanReshare : function(){
...@@ -137,4 +137,3 @@ app.models.Post.Interactions = Backbone.Model.extend({ ...@@ -137,4 +137,3 @@ app.models.Post.Interactions = Backbone.Model.extend({
} }
}); });
// @license-end // @license-end
...@@ -5,19 +5,19 @@ app.models.Profile = Backbone.Model.extend({ ...@@ -5,19 +5,19 @@ app.models.Profile = Backbone.Model.extend({
}, { }, {
preloadOrFetch : function(id){ preloadOrFetch : function(id){
return app.hasPreload("person") ? this.preload() : this.findByGuid(id) return app.hasPreload("person") ? this.preload() : this.findByGuid(id);
}, },
preload : function(){ preload : function(){
var person = new app.models.Profile(app.parsePreload("person")) var person = new app.models.Profile(app.parsePreload("person"));
person.deferred = $.when(true) person.deferred = $.when(true);
return person return person;
}, },
findByGuid : function(personId){ findByGuid : function(personId){
var person = new app.models.Profile({ id : personId}) var person = new app.models.Profile({ id : personId});
person.deferred = person.fetch() person.deferred = person.fetch();
return person return person;
} }
}); });
// @license-end // @license-end
......
...@@ -5,15 +5,15 @@ app.models.Reshare = app.models.Post.extend({ ...@@ -5,15 +5,15 @@ app.models.Reshare = app.models.Post.extend({
rootPost : function(){ rootPost : function(){
this._rootPost = this._rootPost || new app.models.Post(this.get("root")); this._rootPost = this._rootPost || new app.models.Post(this.get("root"));
return this._rootPost return this._rootPost;
}, },
reshare : function(){ reshare : function(){
return this.rootPost().reshare() return this.rootPost().reshare();
}, },
reshareAuthor : function(){ reshareAuthor : function(){
return this.rootPost().reshareAuthor() return this.rootPost().reshareAuthor();
} }
}); });
// @license-end // @license-end
......
...@@ -17,7 +17,7 @@ app.models.StatusMessage = app.models.Post.extend({ ...@@ -17,7 +17,7 @@ app.models.StatusMessage = app.models.Post.extend({
photos : this.photos && this.photos.pluck("id"), photos : this.photos && this.photos.pluck("id"),
services : this.get("services"), services : this.get("services"),
poll : this.get("poll") poll : this.get("poll")
} };
} }
}); });
// @license-end // @license-end
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
//= require ../collections/photos //= require ../collections/photos
app.models.Stream = Backbone.Collection.extend({ app.models.Stream = Backbone.Collection.extend({
initialize : function(models, options){ initialize : function(models, options){
var collectionClass = app.collections.Posts var collectionClass = app.collections.Posts;
if( options ) { if( options ) {
options.collection && (collectionClass = options.collection); options.collection && (collectionClass = options.collection);
options.basePath && (this.streamPath = options.basePath); options.basePath && (this.streamPath = options.basePath);
...@@ -14,11 +14,11 @@ app.models.Stream = Backbone.Collection.extend({ ...@@ -14,11 +14,11 @@ app.models.Stream = Backbone.Collection.extend({
collectionOptions :function(){ collectionOptions :function(){
var order = this.sortOrder(); var order = this.sortOrder();
return { comparator : function(item) { return -item[order](); } } return { comparator : function(item) { return -item[order](); } };
}, },
url : function(){ url : function(){
return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath() return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath();
}, },
_fetchOpts: function(opts) { _fetchOpts: function(opts) {
...@@ -57,11 +57,11 @@ app.models.Stream = Backbone.Collection.extend({ ...@@ -57,11 +57,11 @@ app.models.Stream = Backbone.Collection.extend({
maxTime: function(){ maxTime: function(){
var lastPost = _.last(this.items.models); var lastPost = _.last(this.items.models);
return lastPost[this.sortOrder()]() return lastPost[this.sortOrder()]();
}, },
sortOrder : function() { sortOrder : function() {
return this.basePath().match(/activity/) ? "interactedAt" : "createdAt" return this.basePath().match(/activity/) ? "interactedAt" : "createdAt";
}, },
/* This function is for adding a large number of posts one by one. /* This function is for adding a large number of posts one by one.
...@@ -71,7 +71,7 @@ app.models.Stream = Backbone.Collection.extend({ ...@@ -71,7 +71,7 @@ app.models.Stream = Backbone.Collection.extend({
* stream for the changes to take effect in the infinite stream view * stream for the changes to take effect in the infinite stream view
*/ */
add : function(models){ add : function(models){
this.items.add(models) this.items.add(models);
}, },
/* This function is for adding a single post. It immediately triggers /* This function is for adding a single post. It immediately triggers
...@@ -84,14 +84,13 @@ app.models.Stream = Backbone.Collection.extend({ ...@@ -84,14 +84,13 @@ app.models.Stream = Backbone.Collection.extend({
}, },
preloadOrFetch : function(){ //hai, plz test me THNX preloadOrFetch : function(){ //hai, plz test me THNX
return $.when(app.hasPreload("stream") ? this.preload() : this.fetch()) return $.when(app.hasPreload("stream") ? this.preload() : this.fetch());
}, },
preload : function(){ preload : function(){
this.items.reset(app.parsePreload("stream")) this.items.reset(app.parsePreload("stream"));
this.deferred = $.when(true) this.deferred = $.when(true);
this.trigger("fetched") this.trigger("fetched");
} }
}); });
// @license-end // @license-end
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
app.models.StreamAspects = app.models.Stream.extend({ app.models.StreamAspects = app.models.Stream.extend({
url : function(){ url : function(){
return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath() return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath();
}, },
initialize : function(models, options){ initialize : function(models, options){
......
...@@ -12,11 +12,11 @@ app.models.User = Backbone.Model.extend({ ...@@ -12,11 +12,11 @@ app.models.User = Backbone.Model.extend({
}, },
expProfileUrl : function(){ expProfileUrl : function(){
return "/people/" + app.currentUser.get("guid") + "?ex=true" return "/people/" + app.currentUser.get("guid") + "?ex=true";
}, },
isServiceConfigured : function(providerName) { isServiceConfigured : function(providerName) {
return _.include(this.get("configured_services"), providerName) return _.include(this.get("configured_services"), providerName);
}, },
isAuthorOf: function(model) { isAuthorOf: function(model) {
......
...@@ -11,8 +11,8 @@ app.pages.SinglePostViewer = app.views.Base.extend({ ...@@ -11,8 +11,8 @@ app.pages.SinglePostViewer = app.views.Base.extend({
initialize : function(options) { initialize : function(options) {
this.model = new app.models.Post({ id : options.id }); this.model = new app.models.Post({ id : options.id });
this.model.preloadOrFetch().done(_.bind(this.initViews, this)); this.model.preloadOrFetch().done(_.bind(this.initViews, this));
this.model.interactions.fetch() //async, yo, might want to throttle this later. this.model.interactions.fetch(); //async, yo, might want to throttle this later.
this.setupLightbox() this.setupLightbox();
}, },
setupLightbox : function(){ setupLightbox : function(){
...@@ -41,4 +41,3 @@ app.pages.SinglePostViewer = app.views.Base.extend({ ...@@ -41,4 +41,3 @@ app.pages.SinglePostViewer = app.views.Base.extend({
}); });
// @license-end // @license-end
...@@ -113,7 +113,7 @@ app.Router = Backbone.Router.extend({ ...@@ -113,7 +113,7 @@ app.Router = Backbone.Router.extend({
var followedTagsAction = new app.views.TagFollowingAction( var followedTagsAction = new app.views.TagFollowingAction(
{tagText: decodeURIComponent(name).toLowerCase()} {tagText: decodeURIComponent(name).toLowerCase()}
); );
$("#author_info").prepend(followedTagsAction.render().el) $("#author_info").prepend(followedTagsAction.render().el);
app.tags = new app.views.Tags({tagName: name}); app.tags = new app.views.Tags({tagName: name});
} }
this._hideInactiveStreamLists(); this._hideInactiveStreamLists();
...@@ -151,7 +151,7 @@ app.Router = Backbone.Router.extend({ ...@@ -151,7 +151,7 @@ app.Router = Backbone.Router.extend({
}, },
bookmarklet: function() { bookmarklet: function() {
var contents = (window.gon) ? gon.preloads.bookmarklet : {} var contents = (window.gon) ? gon.preloads.bookmarklet : {};
app.bookmarklet = new app.views.Bookmarklet( app.bookmarklet = new app.views.Bookmarklet(
_.extend({}, {el: $('#bookmarklet')}, contents) _.extend({}, {el: $('#bookmarklet')}, contents)
).render(); ).render();
...@@ -164,4 +164,3 @@ app.Router = Backbone.Router.extend({ ...@@ -164,4 +164,3 @@ app.Router = Backbone.Router.extend({
} }
}); });
// @license-end // @license-end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter