Skip to content
Snippets Groups Projects
Commit 833a5868 authored by mazenovi's avatar mazenovi
Browse files

normalise module import

parent a9fa6436
Branches master
Tags v0.0.1
No related merge requests found
Pipeline #
......@@ -7,6 +7,8 @@ dblp = require("./dblp");
dissem_in = require("./dissem_in");
me = require("./me");
me.author();
// open links with default browser in app
// see also https://github.com/electron/electron/issues/1344#issuecomment-171516636
var shell = require('electron').shell;
......@@ -16,8 +18,6 @@ $(document).on('click', 'a[href^="http"]', function(event) {
shell.openExternal(this.href);
});
me.author();
$(document).on('blur', '.autosave input', function(event) {
config.update();
me.author();
......@@ -31,5 +31,5 @@ $(document).on('keypress', '.autosave input', function(event) {
});
$(document).on('click', '#halQueryBtn', function(event) {
hal($('#halQuery').val());
hal.search($('#halQuery').val());
});
......@@ -7,7 +7,9 @@
config = require('./config');
module.exports = function (query) {
module.exports = {
search: function (query) {
console.log('hal("' + query + '")');
......@@ -49,11 +51,11 @@ module.exports = function (query) {
$('#hal .count').html(data.response.numFound + " docs found (" + data.response.docs.length + " displayed)", "");
}
else {
// comprends pas
console.log('delete rows tpl');
$('#hal .docs tbody').html("");
$('#hal .count').html(" 0 docs found (0 displayed)");
}
}
});
}
};
......@@ -54,8 +54,8 @@ module.exports = {
}
});
},
halUpdateShow: function(hal_id) {
hal("authIdHal_i:" + hal_id );
halTabUpdateAndShow: function(hal_id) {
hal.search("authIdHal_i:" + hal_id );
$('#halQuery').val("authIdHal_i:" + hal_id);
$('#search a[href="#hal"]').tab('show');
}
......@@ -81,7 +81,7 @@ function docsByHalId(hal_id) {
$('.numFound-' + hal_id).html(
data.response.numFound
+ " <a href=\"https://hal.archives-ouvertes.fr/search/index/?qa[authIdHal_i][]=" + hal_id + "\"><i class=\"fa fa-link\"></i></a>"
+ " <a onClick=\"me.halUpdateShow(" + hal_id + ")\"><i class=\"fa fa-chevron-circle-right\" aria-hidden=\"true\"></i></a>"
+ " <a onClick=\"me.halTabUpdateAndShow(" + hal_id + ")\"><i class=\"fa fa-chevron-circle-right\" aria-hidden=\"true\"></i></a>"
);
},
error:function(err) {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment