Skip to content

Commit

Permalink
Merge branch 'release/6.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
cdausmus committed Apr 7, 2022
2 parents 31cc22b + a7f23d4 commit 6fc7177
Show file tree
Hide file tree
Showing 98 changed files with 12,375 additions and 1,683 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ branches:
only:
- master
- develop
- feature/6.1.0-fixes
services:
- postgresql
addons:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
id "com.virgo47.ClasspathJar" version "1.0.0"
}

version "6.0.2"
version "6.1.0"
group "au.org.ala"
description "Digivol application"

Expand Down
Binary file not shown.
Binary file added grails-app/assets/images/icon_pause3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added grails-app/assets/images/icon_play3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added grails-app/assets/images/icons-audio-52.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions grails-app/assets/javascripts/audio-template-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//= require angular/ng-file-upload
//= require underscore
//= require compile/csv/csv.js
//= require compile/soundmanager2/soundmanager2.js
//= require inline-audio-player.js
//=require_self

7 changes: 5 additions & 2 deletions grails-app/assets/javascripts/digivol-stageImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,16 @@ function digivolStageFiles (config, self) {
updateStagedImageDisplay();
}

var imageFileTypes = ['image/jpeg', 'image/png', 'image/gif', 'text/plain'];
var audioFileTypes = ['audio/aac', 'audio/wav', 'audio/mpeg', 'audio/x-m4a', 'audio/ogg', 'audio/vnd.dlna.adts']

var r = new Resumable({
target: config.uploadFileUrl,
target: (config.isAudioProject) ? config.uploadAudioUrl : config.uploadFileUrl,
query: query,
chunkRetryInterval: 1000,
withCredentials: true,
xhrTimeout: 30000,
fileType: ['image/jpeg', 'image/png', 'image/gif', 'text/plain'],
fileType: (config.isAudioProject) ? audioFileTypes : imageFileTypes,
fileTypeErrorCallback: function (file, errorCount) {
console.log("fileTypeErrorCallback", file, errorCount);
},
Expand Down
145 changes: 94 additions & 51 deletions grails-app/assets/javascripts/digivol-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,111 @@
//=require_self

function digivolStats(config) {
var stats = angular.module('stats', ['digivol']);
var stats = angular.module('stats', ['digivol']);

stats.controller('StatsCtrl', [
'$scope', '$http', '$log',
function ($scope, $http, $log) {
$scope.loading = true;
stats.controller('StatsCtrl', [
'$scope', '$http', '$log',
function ($scope, $http, $log) {
$scope.lbLoading = true;
$scope.conLoading = true;

$scope.transcriberCount = null;
$scope.completedTasks = null;
$scope.totalTasks = null;
$scope.transcriberCount = null;
$scope.completedTasks = null;
$scope.totalTasks = null;

$scope.daily = { userId: -1, email: '', name: '', score: null };
$scope.weekly = { userId: -1, email: '', name: '', score: null };
$scope.monthly = { userId: -1, email: '', name: '', score: null };
$scope.alltime = { userId: -1, email: '', name: '', score: null };
$scope.daily = {userId: -1, email: '', name: '', score: null};
$scope.weekly = {userId: -1, email: '', name: '', score: null};
$scope.monthly = {userId: -1, email: '', name: '', score: null};
$scope.alltime = {userId: -1, email: '', name: '', score: null};

$scope.contributors = [];
$scope.contributors = [];

$scope.avatarUrl = function (user) {
var email = user.email || "";
return "//www.gravatar.com/avatar/" + email + "?s=40&d=mm"
};
$scope.avatarUrl = function (user) {
var email = user.email || "";
return "//www.gravatar.com/avatar/" + email + "?s=40&d=mm"
};

$scope.userProfileUrl = function(user) {
var id = user.userId || "";
return config.userProfileUrl.replace("-1", id);
};
$scope.userProfileUrl = function (user) {
var id = user.userId || "";
return config.userProfileUrl.replace("-1", id);
};

$scope.projectUrl = function(project) {
var id = project.projectId || "";
return config.projectUrl.replace('-1', id);
};
$scope.projectUrl = function (project) {
var id = project.projectId || "";
return config.projectUrl.replace('-1', id);
};

$scope.additionalTranscribedThumbs = function(contrib) {
return Math.max(contrib.transcribedItems - 5, 0);
};
$scope.additionalTranscribedThumbs = function (contrib) {
return Math.max(contrib.transcribedItems - 5, 0);
};

$scope.taskSummaryUrl = function (thumb) {
var id = thumb.id || "";
return config.taskSummaryUrl.replace('-1', id);
};

$scope.taskSummaryUrl = function(thumb) {
var id = thumb.id || "";
return config.taskSummaryUrl.replace('-1', id);
};
var tags = '';
if (config.tags !== 'null') {
tags = config.tags
}

var p = $http.get(config.statsUrl, {
params: {
institutionId: config.institutionId,
projectId: config.projectId,
projectType: config.projectType,
tags: config.tags,
maxContributors: config.maxContributors,
disableStats: config.disableStats,
disableHonourBoard: config.disableHonourBoard
var p = $http.get(config.statsUrl, {
params: {
institutionId: config.institutionId,
projectId: config.projectId,
projectType: config.projectType,
tags: tags,
maxContributors: config.maxContributors,
disableStats: config.disableStats,
disableHonourBoard: config.disableHonourBoard
}
});
p.then(function (resp) {
angular.extend($scope, resp.data);
$scope.lbLoading = false;
},
function (resp) {
$log.error("Got error response for leaderboard", resp);
});

//console.log("Disable contributors: " + config.disableContribution);
if (config.disableContribution === false) {
console.log("Getting contributors");
var c = $http.get(config.contributorsUrl, {
params: {
institutionId: config.institutionId,
projectId: config.projectId,
projectType: config.projectType,
tags: config.tags,
maxContributors: config.maxContributors
}
});
c.then(function (resp) {
angular.extend($scope, resp.data);
$scope.conLoading = false;
},
function (resp) {
$log.error("Got error response for contributors", resp);
});
} else if (config.disableForumActivity === false) {
// Can't do contribution and forum activity together (forum activity is included in contribution)
console.log("Getting forum activity");
var f = $http.get(config.forumActivityUrl, {
params: {
institutionId: config.institutionId,
projectId: config.projectId,
maxPosts: config.maxContributors
}
});
f.then(function (resp) {
angular.extend($scope, resp.data);
$scope.conLoading = false;
},
function (resp) {
$log.error("Got error response for forum activity", resp);
});
}
}
});
p.then(function (resp) {
angular.extend($scope, resp.data);
$scope.loading = false;
},
function (resp) {
$log.error("Got error response for leaderboard", resp);
});
}
]);
]);
}

Loading

0 comments on commit 6fc7177

Please sign in to comment.