X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fresources_selected%2Fstatic%2Fjs%2Fresources_selected.js;h=175fef46df42a55f42e7f6652f00de2374ab046e;hb=b3fc75c0cca62f0d75defe1b0fb6ab69dc55dfc1;hp=56a49af6b349e02902d28f4b2660e3abc6a1a069;hpb=f1910e576b71036ea87679aea144aae8520c54d9;p=myslice.git diff --git a/plugins/resources_selected/static/js/resources_selected.js b/plugins/resources_selected/static/js/resources_selected.js index 56a49af6..175fef46 100644 --- a/plugins/resources_selected/static/js/resources_selected.js +++ b/plugins/resources_selected/static/js/resources_selected.js @@ -30,28 +30,29 @@ this._super(options, element); var self = this; - this.table = this.el('table').dataTable({ - //sPaginationType: 'full_numbers', // Use pagination - sPaginationType: 'bootstrap', + this.table = this.elmt('table').dataTable({ + sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t<'row'<'col-xs-5'i><'col-xs-7'p>>", + sPaginationType: 'full_numbers', + bAutoWidth: true, //bJQueryUI : true, //bRetrieve : true, - sScrollX : '100%', // Horizontal scrolling - bSortClasses : false, // Disable style for the sorted column - aaSorting : [[ 0, 'asc' ]], // Default sorting on URN - fnDrawCallback: function() { // Reassociate close click every time the table is redrawn - /* Prevent to loop on click while redrawing table */ - $('.ResourceSelectedClose').unbind('click'); - /* Handle clicks on close span */ - /* Reassociate close click every time the table is redrawn */ - $('.ResourceSelectedClose').bind('click', self, self._close_click); - } +// sScrollX : '100%', // Horizontal scrolling +// bSortClasses : false, // Disable style for the sorted column +// aaSorting : [[ 0, 'asc' ]], // Default sorting on URN +// fnDrawCallback: function() { // Reassociate close click every time the table is redrawn +// /* Prevent to loop on click while redrawing table */ +// $('.ResourceSelectedClose').unbind('click'); +// /* Handle clicks on close span */ +// /* Reassociate close click every time the table is redrawn */ +// $('.ResourceSelectedClose').bind('click', self, self._close_click); +// } }); // XXX This should not be done at init... - this.el('update').click(this, this.do_update); - this.el('refresh').click(this, this.do_refresh); - this.el('reset').click(this, this.do_reset); - this.el('clear_annotations').click(this, this.do_clear_annotations); + this.elmt('update').click(this, this.do_update); + this.elmt('refresh').click(this, this.do_refresh); + this.elmt('reset').click(this, this.do_reset); + this.elmt('clear_annotations').click(this, this.do_clear_annotations); this.listen_query(options.query_uuid); }, @@ -69,17 +70,17 @@ do_refresh: function(e) { - throw 'Not implemented'; + throw 'resource_selected.do_refresh Not implemented'; }, do_reset: function(e) { - throw 'Not implemented'; + throw 'resources_selected.do_reset Not implemented'; }, do_clear_annotations: function(e) { - throw 'Not implemented'; + throw 'resources_selected.do_clear_annotations Not implemented'; }, /************************** GUI MANIPULATION **************************/ @@ -87,7 +88,7 @@ set_button_state: function(name, state) { - this.el(name).attr('disabled', state ? false : 'disabled'); + this.elmt(name).attr('disabled', state ? false : 'disabled'); }, clear: function()