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:
parent
cac71ff008
commit
bc9b5fbccb
|
@ -61,6 +61,9 @@
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<script>
|
<script>
|
||||||
|
//avoid warning messages
|
||||||
|
$.fn.dataTable.ext.errMode = 'none';
|
||||||
|
|
||||||
function loadItemsListIntoTable(itemId, itemName, hideVreFolders) {
|
function loadItemsListIntoTable(itemId, itemName, hideVreFolders) {
|
||||||
var table = $('#userTable').DataTable();
|
var table = $('#userTable').DataTable();
|
||||||
table.ajax.url('<%=usersCustomDataSourceURL%>'+itemId+'_selectedName='+itemName).load();
|
table.ajax.url('<%=usersCustomDataSourceURL%>'+itemId+'_selectedName='+itemName).load();
|
||||||
|
@ -157,7 +160,8 @@ function mainTable() {
|
||||||
downloadItem(selectedId);
|
downloadItem(selectedId);
|
||||||
} )
|
} )
|
||||||
.on( 'error.dt', function ( e, settings, techNote, message ) {
|
.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 );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue