Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscant committed Aug 7, 2018
2 parents 9f0d171 + 02bfe87 commit 208217e
Show file tree
Hide file tree
Showing 45 changed files with 726 additions and 618 deletions.
2 changes: 1 addition & 1 deletion dev/webpack.appfd.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = new Config().extend({
}),
// CC new FaviconsPlugin('images/user_logo.png'),
new webpack.DefinePlugin({
APP_VERSION: JSON.stringify('1.3.16, 25 July 2018'),
APP_VERSION: JSON.stringify('1.3.17, 7 August 2018'),
// CC SET ABOVE: API: JSON.stringify(BASE_URL+'/api/'),
FACEBOOK_APPID: JSON.stringify('134980666550322'),
FACEBOOK_GRAFFITI_APPID: JSON.stringify('115376591981611'),
Expand Down
14 changes: 11 additions & 3 deletions http/css/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ body {
}

.inlineblock {
display: inline-block;
display: inline-block !important;
}

.inline {
display: inline;
display: inline !important;
}

.block {
display: block;
display: block !important;
}

.bordright {
Expand Down Expand Up @@ -347,6 +347,14 @@ nav .nav-tabs>li {
margin-left: 20px;
}

.margrightsm {
margin-right: 5px;
}

.margrightlg {
margin-right: 20px;
}

.margtop {
margin-top: 20px;
}
Expand Down
2 changes: 1 addition & 1 deletion http/css/user.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
display: block;
width: 0;
z-index: 1;
bottom: -31px;
bottom: -30px;
left: 27px;
}

Expand Down
Binary file added http/images/logos/WatermelonDay.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions http/js/iznik/models/user/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@ define([
Iznik.Models.ModTools.User = Iznik.Model.extend({
urlRoot: API + '/user',

rate: function(rating) {
var self = this;

var p = new Promise(function(resolve, reject) {
$.ajax({
url: API + 'user',
type: 'POST',
data: {
action: 'Rate',
ratee: self.get('id'),
rating: rating
},
success: function(ret) {
if (ret.ret == 0) {
resolve();
} else {
reject();
}
}, error: function() {
reject();
}
});
});

return(p);
},

unbounce: function() {
var self = this;

Expand Down
23 changes: 20 additions & 3 deletions http/js/iznik/views/pages/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,11 @@ define([

var p = Iznik.View.prototype.render.call(self);
p.then(function (self) {
// Empty rather than hide because glyphicons have a display set which would mean they show anyway.
if (!self.options.modtools) {
self.$('.js-privacy').hide();
self.$('.js-privacy').empty();
} else {
self.$('.js-promise').hide();
self.$('.js-promise').empty();
}

self.$('.js-tooltip').tooltip();
Expand Down Expand Up @@ -1093,7 +1094,23 @@ define([
self.$('.js-replytimeholder').slideDown('slow');
}

self.showReplyTimeInfo()
self.showReplyTimeInfo();

self.ratings = new Iznik.Views.User.Ratings({
model: usermod
});

self.ratings.render();
self.$('.js-ratings').html(self.ratings.$el);

self.ratings2 = new Iznik.Views.User.Ratings({
model: usermod
});
self.ratings2.template = "user_ratingschat";

self.ratings2.render();
self.$('.js-ratings2').html(self.ratings2.$el);

});
}
});
Expand Down
7 changes: 0 additions & 7 deletions http/js/iznik/views/pages/modtools/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,6 @@ define([
control: 'radio',
options: [{label: 'Yes', value: 1}, {label: 'No', value:0 }]
},
{
name: 'spammers.chatreview',
label: '(Freegle only) Check for spam messages to members?',
control: 'radio',
options: [{label: 'Yes', value: 1}, {label: 'No', value:0 }],
helpMessage: "Messages to members come through the system. It can flag suspicious ones for review so you can check if they are spam or not. If you turn this off, such replies (some of which may be fine) will be dropped and members won't see them."
},
{
name: 'spammers.messagereview',
label: 'Check for spam messages to group?',
Expand Down
2 changes: 1 addition & 1 deletion http/js/iznik/views/pages/modtools/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ define([
var self = this;
var p = Iznik.View.prototype.render.call(self);
p.then(function() {
var group = self.model.get('onhere') ? ('https://' + USER_SITE + '/explore/' + self.model.get('nameshort')) : ('https://groups.yahoo.com/group/' + self.model.get('nameshort'));
var group = self.model.get('onhere') ? ('https://' + USER_SITE + '/explore/' + self.model.get('nameshort')) : ('https://groups.yahoo.com/neo/groups/' + self.model.get('nameshort'));
self.$('.js-group').attr('href', group);

var m = new moment(self.model.get('added'));
Expand Down
3 changes: 2 additions & 1 deletion http/js/iznik/views/pages/mydata.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ define([
[ 'stories_likes', Iznik.Views.MyData.StoryLike, '.js-storylikes' ],
[ 'aboutme', Iznik.Views.MyData.AboutMe, '.js-aboutme' ],
[ 'logins', Iznik.Views.MyData.Login, '.js-logins' ],
[ 'exports', Iznik.Views.MyData.Export, '.js-exports' ]
[ 'exports', Iznik.Views.MyData.Export, '.js-exports' ],
[ 'ratings', Iznik.Views.User.Ratings, '.js-ratings' ]
], function(view) {
_.each(self.model.get(view[0]), function(mod) {
var v = new view[1]({
Expand Down
37 changes: 15 additions & 22 deletions http/js/iznik/views/pages/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,29 +144,22 @@ define([
Iznik.setTitleCounts(null, ret.count);
}
}, complete: function() {
$.ajax({
url: API + 'newsfeed?count=true',
type: 'GET',
context: self,
success: function(ret) {
if (ret.ret == 0) {
var el = $('.js-unseennews');
if (el.html() != ret.unseencount) {
el.html(ret.unseencount);

if (ret.unseencount) {
$('.js-unseennews').show();
}
else {
$('.js-unseennews').hide();
}
}
}
}, complete: function() {
self.notificationChecking = false;
_.delay(_.bind(this.notificationCheck, this), 30000);
// We have the unseen newsfeed count in the session. That is loosely up to date, which is
// fine for our purposes. This saves getting the count on each page transition.
var unseencount = Iznik.Session.get('newsfeedcount');
unseencount = _.isUndefined(unseencount) ? 0 : unseencount;

var el = $('.js-unseennews');
if (el.html() != unseencount) {
el.html(unseencount);

if (unseencount) {
$('.js-unseennews').show();
}
});
else {
$('.js-unseennews').hide();
}
}
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion http/js/iznik/views/pages/user/explore.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ define([
window.open(this.model.get('external'));
} else if (this.model.get('onyahoo') && !this.model.get('onhere')) {
// Yahoo group - open new tab.
window.open("https://groups.yahoo.com/group/" + this.model.get('nameshort'));
window.open("https://groups.yahoo.com/neo/groups/" + this.model.get('nameshort'));
} else {
Router.navigate('/explore/' + this.model.get('nameshort'), true);
}
Expand Down
27 changes: 26 additions & 1 deletion http/js/iznik/views/pages/user/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,36 @@ define([

checkSubmit: function() {
var cont = false;
var self = this;
var uid = this.$('.js-user').val();

if (this.$('.js-outcome').val() == 'Withdrawn') {
cont = true;
} else {
cont = this.$('.js-user').val() != -1;
cont = uid != -1;
}

self.$('.js-ratewrapper').hide();
self.$('.js-ratings').empty();

if (uid > 0) {
self.userMod = new Iznik.Models.ModTools.User({
id: self.$('.js-user').val()
});

self.userMod.fetch({
data: {
info: true
}
}).then(function() {
self.rate = new Iznik.Views.User.Ratings({
model: self.userMod
})

self.rate.render();
self.$('.js-rating').html(self.rate.$el);
self.$('.js-ratewrapper').fadeIn('slow');
});
}

this.$('.js-confirm').prop('disabled', !cont);
Expand Down
12 changes: 11 additions & 1 deletion http/js/iznik/views/pages/user/newsfeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,21 @@ define([
},

photoZoom: function (e) {
var self = this;

e.preventDefault();
e.stopPropagation();

// The image might be in this model, or hung off something underneath, like a story.
if (!self.model.get('image')) {
var story = self.model.get('story');
if (story.photo) {
self.model.set('image', story.photo);
}
}

var v = new Iznik.Views.User.Feed.PhotoZoom({
model: this.model
model: self.model
});

v.render();
Expand Down
4 changes: 2 additions & 2 deletions http/js/iznik/views/pages/user/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ define([
self.$('.js-homegroup').fadeIn('slow');
} else if (first.onyahoo && first.showonyahoo) {
// But Yahoo does and we want to show it.
self.$('.js-toyahoo').attr('href', 'https://groups.yahoo.com/group/' + first.nameshort);
self.$('.js-toyahoo').attr('href', 'https://groups.yahoo.com/neo/groups/' + first.nameshort);
self.$('.js-onyahoo').fadeIn('slow');
self.$('.js-toyahoo').show();
self.$('.js-homegroup').fadeIn('slow');
Expand All @@ -287,7 +287,7 @@ define([
if (first.onyahoo && first.showonyahoo && self.$('.js-groups').length > 0) {
// But it's also on Yahoo, and some people might want to go there.
self.$('.js-yahootoo').show();
self.$('.js-yahootoo a').attr('href', 'https://groups.yahoo.com/group/' + first.nameshort);
self.$('.js-yahootoo a').attr('href', 'https://groups.yahoo.com/neo/groups/' + first.nameshort);
}
}
}
Expand Down
Loading

0 comments on commit 208217e

Please sign in to comment.