X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fresources_selected%2Fstatic%2Fjs%2Fresources_selected.js;h=a78428887bbb590c3e8d47c6404c3edf607fa640;hb=17adeda45d99976cc0b7acecf80a4f147efcdc1f;hp=d8705c45c2cc505fa65d502d0aac580d5f86f61c;hpb=15ca59cb1f80be244df33026add2cf97f2f87a62;p=myslice.git diff --git a/plugins/resources_selected/static/js/resources_selected.js b/plugins/resources_selected/static/js/resources_selected.js index d8705c45..a7842888 100644 --- a/plugins/resources_selected/static/js/resources_selected.js +++ b/plugins/resources_selected/static/js/resources_selected.js @@ -31,20 +31,21 @@ var self = this; this.table = this.elmt('table').dataTable({ - //sPaginationType: 'full_numbers', // Use pagination + 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... @@ -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 **************************/ @@ -119,7 +120,12 @@ var button = ''; var row; - + + // make sure the change is visible : toggle on the whole plugin + // this might hae to be made an 'auto-toggle' option of this plugin.. + // also it might be needed to be a little finer-grained here + this.toggle_on(); + switch(data.request) { case FIELD_REQUEST_ADD_RESET: case FIELD_REQUEST_REMOVE_RESET: