-
- {{tag.typeOfTag.replace('_',' ')}}
- retired
- taxonomic
- {{tag.text}} (ID {{tag.id}})
+ {{tagging.tag.typeOfTag.replace('_',' ')}}
+ retired
+ taxonomic
+ {{tagging.tag.text}} (ID {{tagging.tag.id}})
-
-
- no tags
-
+
+
no tags
+
+ class="list-group-item"
+ title="This is reference annotation - one that was nominated as an example of exceptional quality.">
Reference Annotation
diff --git a/src/app/listen/listen.js b/src/app/listen/listen.js
index 28433253..7a88d00a 100644
--- a/src/app/listen/listen.js
+++ b/src/app/listen/listen.js
@@ -613,7 +613,7 @@ angular
function success(value, headers) {
// possible race condition: may no longer may be selected after async
- $scope.model.selectedAudioEvent.taggings[index] = new baw.Tagging(value);
+ $scope.model.selectedAudioEvent.taggings[index] = new baw.Tagging(value.data);
$scope.model.selectedAudioEvent.tags[index] = addedTag.tag;
console.assert(
diff --git a/src/app/login/widget/loginWidget.tpl.html b/src/app/login/widget/loginWidget.tpl.html
index 07275bd1..82589158 100644
--- a/src/app/login/widget/loginWidget.tpl.html
+++ b/src/app/login/widget/loginWidget.tpl.html
@@ -14,8 +14,7 @@
class="loginWidgetLink"
target="_self">
{{profile.userName}}
-
li {
& > a, & > button {
- padding: 5px 10px;
+ padding: 5px (1em/4); // approximately 1 standard space's width
text-align: left;
}
}
-}
-right-nav-bar {
- a>.fa, a>.glyphicon {
+ a .fa, a>.glyphicon {
color: $text-color;
}
}
left-nav-bar {
+ .tooltip-wide {
+ width: 200px;
+ }
+
@for $i from 0 through 4 {
.indentation-#{$i} {
- $step: ($i * 10%);
- width: 100% - $step;
- margin-left: $step !important;
- font-size: 100% - ($step / 2);
+ width: calc(100% - #{1em * $i});
+ margin-left: (1em * $i) !important;
+ font-size: 100% - ($i * 3%);
}
}
}
\ No newline at end of file
diff --git a/src/app/navigation/leftNavBar.tpl.html b/src/app/navigation/leftNavBar.tpl.html
index f70d6621..eae57b61 100644
--- a/src/app/navigation/leftNavBar.tpl.html
+++ b/src/app/navigation/leftNavBar.tpl.html
@@ -6,14 +6,15 @@
-
+ ng-class="['indentation-' + (link.indentation || 0), { active: link.isActive}]">
-
+ uib-tooltip="{{ link.title }}">
+
{{ link.title }}
diff --git a/src/app/navigation/menuDefinition.js b/src/app/navigation/menuDefinition.js
index bac85d57..d1afac87 100644
--- a/src/app/navigation/menuDefinition.js
+++ b/src/app/navigation/menuDefinition.js
@@ -7,75 +7,87 @@ angular
{
title: "Home",
href: paths.api.links.homeAbsolute,
+ tooltip: "Home page",
icon: "home",
target: "_self"
},
{
title: "Log in",
href: paths.api.links.loginActualAbsolute,
+ tooltip: "Log into the website",
icon: "sign-in",
- condition: user => user === null,
+ predicate: user => user === null,
target: "_self"
},
{
title: "My Profile",
href: paths.api.links.myAccountAbsolute,
+ tooltip: "View my profile",
icon: "user",
- condition: user => user !== null,
+ predicate: user => user !== null,
target: "_self"
},
{
title: "Register",
href: paths.api.links.registerAbsolute,
+ tooltip: "Create an account",
icon: "user-plus",
- condition: user => user === null,
+ predicate: user => user === null,
target: "_self"
},
{
title: "My Annotations",
href: user => user.annotationUrl,
- icon: "square-o",
- condition: user => user !== null,
+ tooltip: "View my recent annotations",
+ icon: "baw-annotation",
+ predicate: user => user !== null,
target: "_self"
},
{
title: "Projects",
href: paths.api.links.projectsAbsolute,
+ tooltip: "View projects I have access to",
icon: "globe",
target: "_self"
},
{
title: "Audio Analysis",
href: paths.site.ngRoutes.analysisJobs.list,
+ tooltip: "View audio analysis jobs",
icon: "server",
ribbon: "beta"
},
{
title: "Library",
href: paths.site.ngRoutes.library,
+ tooltip: "Annotation library",
icon: "book"
},
{
title: "Data Request",
href: paths.api.links.dataRequestAbsolute,
+ tooltip: "Request customized data from the website",
icon: "table",
target: "_self"
},
{
title: "Send Audio",
href: paths.api.links.dataUploadAbsolute,
+ tooltip: "Send us audio recordings to upload",
icon: "envelope",
target: "_self"
},
{
title: "Report Problem",
href: paths.api.links.bugReportAbsolute,
+ tooltip: "Report a problem with the website",
icon: "bug",
target: "_self"
},
{
title: "Website Statistics",
href: paths.api.links.websiteStatusAbsolute,
+ tooltip: "Annotation and audio recording stats",
icon: "line-chart",
target: "_self"
},
diff --git a/src/app/navigation/rightNavBar.tpl.html b/src/app/navigation/rightNavBar.tpl.html
index a26ecee6..a8d44c5f 100644
--- a/src/app/navigation/rightNavBar.tpl.html
+++ b/src/app/navigation/rightNavBar.tpl.html
@@ -7,7 +7,8 @@
-
+
diff --git a/src/app/navigation/secondaryNavigation.js b/src/app/navigation/secondaryNavigation.js
index 7c3ed3e3..8d134aad 100644
--- a/src/app/navigation/secondaryNavigation.js
+++ b/src/app/navigation/secondaryNavigation.js
@@ -91,7 +91,7 @@ angular
// allows for dynamic filtering or generation of links
let transformLinks = function(links) {
return links
- .filter((link) => !link.condition || link.condition.call(link, userModel, controller.activeResource))
+ .filter((link) => !link.predicate || link.predicate.call(link, userModel, controller.activeResource))
.map(link => {
// copy object so we don't overwrite original values by reference permanently
let newLink = Object.assign({}, link);
diff --git a/src/app/users/userTile.js b/src/app/users/userTile.js
index b6822cb2..735ff6e0 100644
--- a/src/app/users/userTile.js
+++ b/src/app/users/userTile.js
@@ -19,7 +19,7 @@ angular
return;
}
- if(!$ctrl.resource[userKey] || $ctrl.resource[dateKey]) {
+ if(!$ctrl.resource[userKey] || !$ctrl.resource[dateKey]) {
$ctrl.show = false;
return;
}
diff --git a/src/components/directives/angular-tags/README.md b/src/components/directives/angular-tags/README.md
new file mode 100644
index 00000000..fcbf8686
--- /dev/null
+++ b/src/components/directives/angular-tags/README.md
@@ -0,0 +1,5 @@
+# WARNING: MONKEYPATCH FROM HELL
+
+*ULTRA DODGY*
+
+See https://github.com/QutBioacoustics/baw-client/issues/292
\ No newline at end of file
diff --git a/src/components/directives/angular-tags/angular-tags-0.3.1-tpls.js b/src/components/directives/angular-tags/angular-tags-0.3.1-tpls.js
new file mode 100644
index 00000000..07e2fb82
--- /dev/null
+++ b/src/components/directives/angular-tags/angular-tags-0.3.1-tpls.js
@@ -0,0 +1,40 @@
+/**
+ * Overriding the standard template because of this bug:
+ * https://github.com/QutBioacoustics/baw-client/issues/292
+ */
+angular
+ .module("angular-tags.templates.monkeypatch", [])
+ .run(["$templateCache", function ($templateCache) {
+ $templateCache.put("templates/tags.html", `
+
+ `);
+ }]);
diff --git a/src/components/directives/directives.js b/src/components/directives/directives.js
index cecf3533..1d25276a 100644
--- a/src/components/directives/directives.js
+++ b/src/components/directives/directives.js
@@ -1,6 +1,7 @@
angular.module("bawApp.directives",
[
"bawApp.configuration",
+ "angular-tags.templates.monkeypatch",
"bawApp.directives.ui.bootstrap",
"bawApp.directives.formChildrenHack",
"bawApp.directives.notInListValidator",
diff --git a/src/components/services/audioEvent.js b/src/components/services/audioEvent.js
index af2e2098..eac8dc8d 100644
--- a/src/components/services/audioEvent.js
+++ b/src/components/services/audioEvent.js
@@ -77,7 +77,7 @@ angular
return q;
});
- return $http.post(url, qb.toJSONString());
+ return $http.post(url, qb.toJSON());
};
const filterUrl = paths.api.routes.audioEvent.filterAbsolute;
@@ -87,7 +87,7 @@ angular
});
return $http
- .post(filterUrl, query.toJSONString())
+ .post(filterUrl, query.toJSON())
.then(x => AudioEventModel.makeFromApi(x));
};
@@ -100,7 +100,7 @@ angular
);
});
- return $http.post(filterUrl, query.toJSONString())
+ return $http.post(filterUrl, query.toJSON())
.then(resultPager.loadAll)
.then(x => AudioEventModel.makeFromApi(x));
};
diff --git a/src/components/services/queryBuilder.js b/src/components/services/queryBuilder.js
index 1dfb6583..6526d443 100644
--- a/src/components/services/queryBuilder.js
+++ b/src/components/services/queryBuilder.js
@@ -381,7 +381,7 @@ angular
function filterToQueryString(filterObject) {
var results = [];
- for(let [key, value] of Object.entries(filterObject)) {
+ for (let [key, value] of Object.entries(filterObject)) {
if (!validCombinators.hasOwnProperty(key)) {
if (value.hasOwnProperty("eq")) {
results.push(["filter_" + key, value.eq]);
@@ -417,7 +417,7 @@ angular
return this.end.call(query);
};
- this.toJSON = function() {
+ this.toJSON = function () {
var compiledQuery = {},
that = this;
@@ -427,11 +427,11 @@ angular
}
});
- return compiledQuery;
- };
+ return compiledQuery;
+ };
- this.toJSONString = function toJSON(spaces) {
- return JSON.stringify(this.toJSON(), null, spaces);
+ this.toJSONString = function toJSON(spaces) {
+ return JSON.stringify(this.toJSON(), null, spaces);
};
this.toQueryString = function toQueryString() {
diff --git a/src/components/services/tag.js b/src/components/services/tag.js
index 92602ce8..640421e9 100644
--- a/src/components/services/tag.js
+++ b/src/components/services/tag.js
@@ -130,7 +130,7 @@ angular
return q.in("audioEvents.id", audioEventIds);
});
- return $http.post(url, query.toJSONString()).then(x => TagModel.makeFromApi(x));
+ return $http.post(url, query.toJSON()).then(x => TagModel.makeFromApi(x));
};
return resource;
diff --git a/src/index.html b/src/index.html
index 857c3d0b..441648a5 100644
--- a/src/index.html
+++ b/src/index.html
@@ -93,7 +93,7 @@
diff --git a/src/sass/_font_awesome_customization.scss b/src/sass/_font_awesome_customization.scss
new file mode 100644
index 00000000..c66c6d8e
--- /dev/null
+++ b/src/sass/_font_awesome_customization.scss
@@ -0,0 +1,15 @@
+.fa-baw-annotation {
+ &:before {
+ content: $fa-var-square-o;
+ position: relative;
+ margin-left: 0.1em;
+ }
+
+ &:after {
+ content: $fa-var-th-large + "\00a0" !important;
+ font-size: (2/3) * 100%;
+ position: relative;
+ top: -2px;
+ left: calc(-1em - (1/3 * 1px));
+ }
+}
\ No newline at end of file