Skip to content

Commit

Permalink
Merge branch 'mobile' into modtools
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscant committed Sep 22, 2019
2 parents 52cd72b + 2c53403 commit 0c00ae4
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 50 deletions.
2 changes: 1 addition & 1 deletion dev/webpack.appfd.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = new Config().extend({
}),
// CC new FaviconsPlugin('images/user_logo.png'),
new webpack.DefinePlugin({
APP_VERSION: JSON.stringify('1.4.19, 16 September 2019'),
APP_VERSION: JSON.stringify('1.4.19, 22 September 2019'),
// CC SET ABOVE: API: JSON.stringify(BASE_URL+'/api/'),
FACEBOOK_APPID: JSON.stringify('134980666550322'),
FACEBOOK_GRAFFITI_APPID: JSON.stringify('115376591981611'),
Expand Down
Binary file modified http/images/signinbuttons/google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion http/js/iznik/models/chat/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ define([
// Now create a report message.
var msg = new Iznik.Models.Chat.Message({
roomid: ret.id,
message: "I'm reporting https://" + USER_SITE + '/message/' + message.get('id') + ' as inappropriate.\r\n\r\n"' + reason + '"',
message: "I'm reporting https://" + USER_SITE + '/message/' + message.get('id') + ' to you as inappropriate.\r\n\r\n"' + reason + '"',
})
msg.save().then(function () {
console.log("Open chat to mods ", message);
Expand Down
9 changes: 9 additions & 0 deletions http/js/iznik/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ define([
'councils/othercouncils': 'userCouncilsOtherCouncils',
'councils/bestpractice': 'userCouncilsBestPractice',
'councils': 'userCouncils',
'discourse': 'discourse',
'maintenance': 'userMaintenance',
"*path": "modtools" // CC
},
Expand Down Expand Up @@ -2397,6 +2398,14 @@ define([

Iznik.Session.forceLogin()
},

discourse: function () {
this.listenToOnce(Iznik.Session, 'loggedIn', function (loggedIn) {
window.location = '//discourse.ilovefreegle.org';
})

Iznik.Session.forceLogin()
}
})

// CC
Expand Down
10 changes: 8 additions & 2 deletions http/js/iznik/views/pages/user/jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ define([
console.log("Loaded script")
init(); // window.onload isn't called so we do it manually.
var me = Iznik.Session.get('me');
var pc = me && me.settings && me.settings.mylocation && me.settings.mylocation.name ? me.settings.mylocation.name : null
pc = pc ? pc.substring(0, pc.indexOf(' ')) : null;
var pc = me && me.city ? me.city : null
pc = self.options.postcode ? self.options.postcode : pc

if (pc) {
Expand Down Expand Up @@ -61,6 +60,13 @@ define([
Iznik.Views.Page.prototype.render.call(self)
}

newScript.onerror = function(e) {
self.model = new Iznik.Model({
adblock: true
});
Iznik.Views.Page.prototype.render.call(self)
}

document.head.appendChild(newScript);

return(Iznik.resolvedPromise(this));
Expand Down
32 changes: 5 additions & 27 deletions http/template/modtools/support/chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,15 @@
<div class="col-md-2">
<% if (obj.lastdate) { %><abbr class="timeago" title="{{lastdate}}">{{timeago(lastdate)}}</abbr><% } %>
</div>
<div class="col-md-2">
<% if (chattype == 'Mod2Mod') { %>
Mods
<% } else if (chattype == 'User2Mod') { %>
To Mods
<% } else { %>
User
<% if (myuserid == user1.id) { %>
<% if (obj.user2) { %>
#{{user2.id}}
<% } else { %>
?
<% } %>
<% } else { %>
#{{user1.id}}
<% } %>
<% } %>
</div>
<div class="col-md-3">
<div class="col-md-5">
<% if (chattype == 'User2User') { %>
<% if (obj.user1 && myuserid == user1.id) { %>
<% if (obj.user2) { %>
{{user2.displayname}}
<% } else { %>
(Unknown user)
<% } %>
<% if (obj.user1 && myuserid == user1) { %>
with {{u2name}} #{{user2}}
<% } else { %>
{{user1.displayname}}
with {{u1name}} #{{user1}}
<% } %>
<% } else if (chattype == 'User2Mod') { %>
{{user1.displayname}}
to {{name}}
<% } %>
</div>
<div class="col-md-3">
Expand Down
1 change: 1 addition & 0 deletions http/template/user/councils/keylinks.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h3 id="js-livestats">Live Statistics</h3>
<p>
On each Freegle community’s page you can view live statistics for that particular community
(the example below is for <a href="https://www.ilovefreegle.org/stats/York-Freegle" data-realurl="true">https://www.ilovefreegle.org/stats/York-Freegle</a>).
We also use WRAP's Benefits of Reuse tool to generate CO2 and cost savings data.
<img class="img-responsive topspace" src="/images/councils/yorkstats.png" />
</p>
<p>
Expand Down
27 changes: 13 additions & 14 deletions http/template/user/councils/why.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ <h4>Talking of stats…</h4>
<li>Time-specific data, area-specific data (including by postcode), data on request and we can even overlay
it with a range of demographic indicators.</li>
</ul>
<p>
We also use WRAP's Benefits of Reuse tool to generate CO2 and cost savings data.
</p>

<h4>Opening up lines of communication in the community</h4>

Expand Down Expand Up @@ -100,25 +103,21 @@ <h4>Why run a project with Freegle?</h4>
<h4>Freegle and reuse data</h4>

<p>
Freegle facilitates peer-to-peer reuse, but Freegle does not take ownership of this waste at any time and
so some councils report this data through Waste Data Flow submissions and others don't.
</p>

<p>
We are trying to find out if and how councils across the UK report Freegle data in WDF.  If you do this please
let us know.  If there is a reason you don’t, please also let us know!  We’re trying to build up a
national picture and you can help by contacting us at <a href="mailto:[email protected]" data-realurl="true">[email protected]</a>.
Freegle facilitates peer-to-peer reuse, but Freegle does not take ownership of this waste at any time
and so we have been advised by WasteDataFlow that our data cannot be submitted to WDF.  We are however,
continuing to explore with Defra how the contribution to waste prevention, by organisations such
as Freegle, is recognised.
</p>

<p>
We are very aware that being able to count this data would be extremely beneficial to councils and so we are
researching whether Waste Data Flow do already or will in future officially permit this, as well as looking
at integrating Freegle and other similar reuse organisations into the Resources and Waste Strategy for England.
Our data can of course be reported internally and externally as a measure of active waste prevention in
your area and can be used to help monitor any campaigns you might run in partnership with us.
</p>

<p>
Our data can of course be reported internally and externally as a measure of active waste prevention in
your area.
We are trying to find out if and how councils across the UK use Freegle data to measure waste diversion
and support their waste minimisation campaigns.  Please get in touch to let us know if you use our
data and if not, how we could make it more useful for you at
 <a href="mailto:[email protected]" data-realurl="true">[email protected]</a>.
</p>

</div>
Expand Down
8 changes: 7 additions & 1 deletion http/template/user/jobs/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ <h1>Jobs near {{postcode}}</h1>
<% } else { %>
<h1>Find jobs near you</h1>
<% } %>
<% if (obj.adblock) { %>
<div class="alert alert-warning">
We couldn't load the jobs. Have you got an ad-blocker or privacy tool enabled? Try disabling it.
</div>
<% } else { %>
<p>Freegle will get a small amount if you click to view any of them, which will help keep us going.</p>
<div class="row">
<div class="cols-xs-12">
Expand All @@ -19,4 +24,5 @@ <h1>Find jobs near you</h1>
<div class="cols-xs-12">
<ul class="list-unstyled topspace js-jobs"/>
</div>
</div>
</div>
<% } %>
5 changes: 4 additions & 1 deletion http/template/user/jobs/one.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="panel-heading">
<div class="panel-title">
<span class="job-title">{{obj.title}}</span>
<span class="pull-right more-info">
<span class="pull-right more-info hidden-xs">
<span class="location">{{obj.location}}</span> <span class="postcode">{{obj.postcode}}</span>
</span>
</div>
Expand All @@ -23,6 +23,9 @@
{{obj.salary}}
</div>
<% } %>
<span class="visible-xs">
<i class="location">{{obj.location}}</i> <i class="postcode">{{obj.postcode}}</i>
</span>
<a onmousedown="{{obj.onmousedown}}" target="_blank" data-realurl="true" href="{{obj.url}}">
<span class="btn btn-info pull-right">
More info >>
Expand Down
4 changes: 2 additions & 2 deletions http/template/user/landing/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ <h3>Advertising</h3>
We don't sell your behaviour to advertisers, but we do use advertisements to support Freegle. We'd prefer not to,
but we don't raise enough from donations alone to keep going.
</p>
We use Google AdSense (on the website). For emails we use LiveIntent or AdView. For LiveIntent we pass an SHA1 hashed
version of your email address (not the address itself)l for AdView we pass your IP address but no personal details.
We use Google AdSense (on the website). For emails we use AdView. We pass them your IP address, but not your
personal information.
</p>
<h3>Got questions?</h3>
<p>If you have questions, please <a href="/contact">contact us</a>.</p>
2 changes: 1 addition & 1 deletion mobile/freegle/ios/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="org.ilovefreegle.iphone" ios-CFBundleVersion="173" version="1.4.18" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="org.ilovefreegle.iphone" ios-CFBundleVersion="174" version="1.4.19" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Freegle</name>
<description>Offer and request free items on your local Freegle reuse group</description>
<author />
Expand Down

0 comments on commit 0c00ae4

Please sign in to comment.