Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function hideDetails(table) {
- let promise = new Promise((resolve, reject)=> {
- if ( countSelected(table) == "multiple" || countSelected(table) == "none") {
- document.getElementById( 'details' ).style.display = 'none';
- document.getElementById( 'configDetailsWrap' ).style.display = 'none';
- document.getElementById( 'list' ).style.display = 'none';
- document.getElementById( 'list_2' ).style.display = 'none';
- resolve();
- }
- else {
- document.getElementById( 'details' ).style.display = 'block';
- resolve();
- }
- })
- return promise;
- }
- hideDetails(table).then(function() {
- let item = $('#details');
- let position = item.position();
- window.scrollTo(0, position.top);
- },
- function() {
- console.log('Error while displaying details.')
- });
Add Comment
Please, Sign In to add comment