added setting to avoid DataTables to popup errors in case the service does not respond.

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/workspace-widget-portlet@167651 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2018-05-21 14:52:14 +00:00
parent cac71ff008
commit bc9b5fbccb
1 changed files with 5 additions and 1 deletions

View File

@ -61,6 +61,9 @@
</div>
</c:if>
<script>
//avoid warning messages
$.fn.dataTable.ext.errMode = 'none';
function loadItemsListIntoTable(itemId, itemName, hideVreFolders) {
var table = $('#userTable').DataTable();
table.ajax.url('<%=usersCustomDataSourceURL%>'+itemId+'_selectedName='+itemName).load();
@ -157,7 +160,8 @@ function mainTable() {
downloadItem(selectedId);
} )
.on( 'error.dt', function ( e, settings, techNote, message ) {
console.log( 'An error has happened in the server: ', message );
$('div.ws-breadcrumb-container').text('Ops, cannot reach the server. Please try to reload the page or check your internet connection');
console.log( 'An error has happened in the server: ', message );
} );
}