X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fhazelnut%2Fstatic%2Fjs%2Fhazelnut.js;h=dd7f8411e8d644fabf4e44c69445dfe5581adf5a;hb=b711d074cffe0cf4b24098a4dad1f22963137054;hp=ca63e1e732ec92ebe1dffb3de9edefb7a089442f;hpb=2e1b7e1f7251fd00077b23fcb5cdff335aa77e24;p=myslice.git diff --git a/plugins/hazelnut/static/js/hazelnut.js b/plugins/hazelnut/static/js/hazelnut.js index ca63e1e7..dd7f8411 100644 --- a/plugins/hazelnut/static/js/hazelnut.js +++ b/plugins/hazelnut/static/js/hazelnut.js @@ -24,7 +24,7 @@ /* XXX Events XXX */ // this.$element.on('show.Datatables', this.on_show); - this.el().on('show', this, this.on_show); + this.elmt().on('show', this, this.on_show); // Unbind all events using namespacing // TODO in destructor // $(window).unbind('Hazelnut'); @@ -80,8 +80,11 @@ actual_options = { // Customize the position of Datatables elements (length,filter,button,...) // we use a fluid row on top and another on the bottom, making sure we take 12 grid elt's each time - sDom: "<'row-fluid'<'span5'l><'span1'r><'span6'f>>t<'row-fluid'<'span5'i><'span7'p>>", - sPaginationType: 'bootstrap', + sDom: "<'row'<'col-md-5'l><'col-md-1'r><'col-md-6'f>>t<'row'<'col-md-5'i><'col-md-7'p>>", + // XXX as of sept. 2013, I cannot locate a bootstrap3-friendly mode for now + // hopefully this would come with dataTables v1.10 ? + // in any case, search for 'sPaginationType' all over the code for more comments + sPaginationType: 'full_numbers', // Handle the null values & the error : Datatables warning Requested unknown parameter // http://datatables.net/forums/discussion/5331/datatables-warning-...-requested-unknown-parameter/p2 aoColumnDefs: [{sDefaultContent: '',aTargets: [ '_all' ]}], @@ -93,7 +96,7 @@ }; // the intention here is that options.datatables_options as coming from the python object take precedence // XXX DISABLED by jordan: was causing errors in datatables.js $.extend(actual_options, options.datatables_options ); - this.table = this.el('table').dataTable(actual_options); + this.table = this.elmt('table').dataTable(actual_options); /* Setup the SelectAll button in the dataTable header */ /* xxx not sure this is still working */ @@ -528,7 +531,7 @@ * Handle clicks on checkboxes: reassociate checkbox click every time * the table is redrawn */ - this.els('hazelnut-checkbox').unbind('click').click(this, this._check_click); + this.elts('hazelnut-checkbox').unbind('click').click(this, this._check_click); if (!this.table) return;