Merge user feeds & followers #118
@ -41534,6 +41534,50 @@ module.exports = function(Chart) {
|
|||||||
|
|
||||||
},{"25":25,"45":45,"6":6}]},{},[7])(7)
|
},{"25":25,"45":45,"6":6}]},{},[7])(7)
|
||||||
});
|
});
|
||||||
|
/**
|
||||||
|
* This model is used by gallery/explore_users.blade.php, to handle following/unfollowing users profiles.
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function ExploreUsersViewModel(urls)
|
||||||
|
{
|
||||||
|
this.el = '#explore-users-app';
|
||||||
|
|
||||||
|
this.data = {
|
||||||
|
};
|
||||||
|
|
||||||
|
this.computed = {
|
||||||
|
};
|
||||||
|
|
||||||
|
this.methods = {
|
||||||
|
followUser: function(e)
|
||||||
|
{
|
||||||
|
var userIDToFollow = $(e.target).data('user-id');
|
||||||
|
var urlToPost = urls.follow_user_url.replace('/-1/', '/' + userIDToFollow + '/');
|
||||||
|
|
||||||
|
$.post(urlToPost, '', function(data)
|
||||||
|
{
|
||||||
|
window.location.reload(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
unFollowUser: function(e)
|
||||||
|
{
|
||||||
|
var userIDToUnfollow = $(e.target).data('user-id');
|
||||||
|
var urlToPost = urls.unfollow_user_url.replace('/-1/', '/' + userIDToUnfollow + '/');
|
||||||
|
|
||||||
|
$.post(urlToPost, '', function(data)
|
||||||
|
{
|
||||||
|
window.location.reload(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This model is used by gallery/photo.blade.php, to handle comments and individual photo actions.
|
* This model is used by gallery/photo.blade.php, to handle comments and individual photo actions.
|
||||||
* @constructor
|
* @constructor
|
||||||
@ -41673,6 +41717,16 @@ function UserViewModel(urls)
|
|||||||
'<a href="' + data[i].params.photo_url + '">' + data[i].params.photo_name + '</a>'
|
'<a href="' + data[i].params.photo_url + '">' + data[i].params.photo_name + '</a>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Album name
|
||||||
|
if (data[i].params.album_name && data[i].params.album_url)
|
||||||
|
{
|
||||||
|
data[i].description = data[i].description
|
||||||
|
.replace(
|
||||||
|
':album_name',
|
||||||
|
'<a href="' + data[i].params.album_url + '">' + data[i].params.album_name + '</a>'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.feed_items = data;
|
self.feed_items = data;
|
||||||
|
2
public/js/blue-twilight.min.js
vendored
2
public/js/blue-twilight.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user