aldebaran / astr Goto Github PK
View Code? Open in Web Editor NEWLicense: Mozilla Public License 2.0
License: Mozilla Public License 2.0
In public/js/explore.js in the following code:
// ---------------------------- Page Loading ----------------------------- //
// use the saved search if present in URL
if (getUrlParameter('search')) {
$.get('api/search/id/' + getUrlParameter('search'), function(search) {
if (search._id) {
return new Promise(function(resolve) {
if (search.date) {
if (typeof search.date === 'string') {
// unique date
$('#inputDate').val(search.date);
} else {
// date range
$('#checkboxDateRange').trigger('click');
$('#inputDate2').prop('disabled', false);
$('#inputDate').val(search.date[0]);
$('#inputDate2').val(search.date[1]);
}
}
if (search.archiveCategory) {
$('#selectCategory').val(search.archiveCategory);
$('#selectCategory').trigger('change');
}
if (search.archiveAuthor) {
$('#selectAuthor').val(search.archiveAuthor);
}
if (search.descriptors.length > 0) {
search.descriptors.forEach(function(descriptor) {
selectedDescriptor.push(descriptor.name);
addDescriptorToForm(descriptor.name, descriptor.value, descriptor.regex)
});
}
if (search.ids.length > 0) {
$('#inputIds').val(search.ids.join(', '));
}
setTimeout(function() {
resolve();
}, 100);
}).then(function() {
$('#form-search').trigger('change');
});
} else {
console.log('Error with the search ID in params.');
console.log(search);
}
});
There are two triggers leading to a search and a refresh of the results:
$('#selectCategory').trigger('change');
...
$('#form-search').trigger('change');
The issue is that they happen too fast one after the other, and they are both asynchronous.
What needs to be done (two possibilities):
As there is an authentication, it is necessary to use https.
If I dragged and dropped a file I finally do not want to upload, I want to be able to remove it without refreshing the whole page and losing the values I already typed in the fields.
It would be nice to drag and drop folders so that they really appear as folders in the archive.
It may happens that clicking on "edit" on an archive opens an incomplete window, with missing descriptors. If I save, those missing descriptors also disappear from the archive.
On the current version a user cannot change its password ! This feature must added to the profile page.
In the current version the maximum number of files I can upload at once is too low. For instance 500 would be better.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.