Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
f6893d7d
Commit
f6893d7d
authored
Feb 28, 2019
by
Piotr Gawron
Browse files
Merge branch 'annotators-issue' into 'master'
Annotators issue See merge request
minerva/core!680
parents
92cc6b26
fcb780d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js
View file @
f6893d7d
...
...
@@ -547,6 +547,10 @@ ChooseAnnotatorsDialog.prototype.getParameterName = function (parameter) {
* @param {User} user
*/
ChooseAnnotatorsDialog
.
prototype
.
copyAnnotatorsToChildren
=
function
(
from
,
to
,
user
)
{
if
(
user
.
getPreferences
().
_elementAnnotators
[
from
.
className
]
===
undefined
)
{
logger
.
warn
(
"
Cannot copy annotator from
"
+
from
.
className
+
"
to
"
+
to
.
className
+
"
. Annotators don't exist
"
);
user
.
getPreferences
().
_elementAnnotators
[
from
.
className
]
=
user
.
getPreferences
().
_elementAnnotators
[
to
.
className
];
}
user
.
getPreferences
().
_elementAnnotators
[
to
.
className
]
=
user
.
getPreferences
().
_elementAnnotators
[
from
.
className
];
};
module
.
exports
=
ChooseAnnotatorsDialog
;
frontend-js/src/test/js/map/data/UserPreferences-test.js
View file @
f6893d7d
...
...
@@ -58,5 +58,9 @@ describe('UserPreferences', function () {
});
});
it
(
"
toExport
"
,
function
()
{
return
ServerConnector
.
getLoggedUser
().
then
(
function
(
user
)
{
assert
.
ok
(
user
.
getPreferences
().
toExport
());
})
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment