Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
search-commons-webresources
Commits
25eda282
Commit
25eda282
authored
Jan 18, 2022
by
Gradl, Tobias
Browse files
446: Reimplement automatic online and offline crawl capabilities
(OPENED) Task-Url:
search#446
parent
b951057e
Changes
2
Hide whitespace changes
Inline
Side-by-side
js/collections/list.js
View file @
25eda282
...
...
@@ -2,6 +2,7 @@ var editor;
$
(
document
).
ready
(
function
()
{
editor
=
new
CollectionsEditor
();
$
(
"
#btn-resync-colreg
"
).
click
(
function
()
{
editor
.
triggerColRegSync
();
});
$
(
"
#btn-force-online
"
).
click
(
function
()
{
editor
.
triggerOnline
();
});
//$("#btn-add-collection").click(function() { editor.triggerAddCollection(); });
});
...
...
@@ -12,7 +13,8 @@ var CollectionsEditor = function() {
"
~eu.dariah.de.minfba.search.view.crawl.confirm_delete
"
,
"
~eu.dariah.de.minfba.search.view.collection.info_resync.head
"
,
"
~eu.dariah.de.minfba.search.view.collection.info_resync.body
"
,
"
~eu.dariah.de.minfba.search.view.collection.confirm_resync_colreg
"
"
~eu.dariah.de.minfba.search.view.collection.confirm_resync_colreg
"
,
"
~eu.dariah.de.minfba.search.view.collection.confirm_force_online
"
]);
this
.
createTable
();
...
...
@@ -210,4 +212,22 @@ CollectionsEditor.prototype.triggerColRegSync = function () {
});
}
});
};
CollectionsEditor
.
prototype
.
triggerOnline
=
function
()
{
bootbox
.
confirm
(
__translator
.
translate
(
"
~eu.dariah.de.minfba.search.view.collection.confirm_force_online
"
),
function
(
result
)
{
if
(
result
)
{
$
.
ajax
({
url
:
__util
.
composeRelativeUrl
(
"
async/triggerOnline
"
),
type
:
"
GET
"
,
dataType
:
"
json
"
,
success
:
function
(
data
)
{
__notifications
.
showTranslatedMessage
(
NOTIFICATION_TYPES
.
INFO
,
"
~eu.dariah.de.minfba.search.view.collection.info_resync.head
"
,
"
~eu.dariah.de.minfba.search.view.collection.info_resync.body
"
);
},
error
:
__util
.
processServerError
});
}
});
};
\ No newline at end of file
js/datamodels/list.js
View file @
25eda282
...
...
@@ -2,6 +2,8 @@ var editor;
$
(
document
).
ready
(
function
()
{
editor
=
new
DatamodelEditor
();
$
(
"
#btn-sync
"
).
click
(
function
()
{
editor
.
triggerSync
();
});
$
(
"
#btn-force-offline
"
).
click
(
function
()
{
editor
.
triggerOffline
();
});
//$("#btn-add-collection").click(function() { editor.triggerAddCollection(); });
});
...
...
@@ -18,7 +20,8 @@ var DatamodelEditor = function() {
"
~eu.dariah.de.minfba.common.status.outdated
"
,
"
~eu.dariah.de.minfba.search.view.api.status_code
"
,
"
~eu.dariah.de.minfba.search.view.models.show_in_DME
"
,
"
~eu.dariah.de.minfba.common.actions.delete
"
"
~eu.dariah.de.minfba.common.actions.delete
"
,
"
~eu.dariah.de.minfba.search.view.collection.confirm_force_offline
"
]);
this
.
createTable
();
...
...
@@ -260,4 +263,23 @@ DatamodelEditor.prototype.triggerSync = function () {
}
}
});
};
DatamodelEditor
.
prototype
.
triggerOffline
=
function
()
{
bootbox
.
confirm
(
__translator
.
translate
(
"
~eu.dariah.de.minfba.search.view.collection.confirm_force_offline
"
),
function
(
result
)
{
if
(
result
)
{
$
.
ajax
({
url
:
__util
.
composeRelativeUrl
(
"
async/triggerOffline
"
),
type
:
"
GET
"
,
dataType
:
"
json
"
,
success
:
function
(
data
)
{
__notifications
.
showTranslatedMessage
(
NOTIFICATION_TYPES
.
INFO
,
"
~eu.dariah.de.minfba.search.view.datamodels.info_resync.head
"
,
"
~eu.dariah.de.minfba.search.view.datamodels.info_resync.body
"
);
},
error
:
__util
.
processServerError
});
}
}
);
};
\ No newline at end of file
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