X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fhazelnut%2Fstatic%2Fjs%2Fhazelnut.js;h=f17eb258da2574a924e9f3adcfef5416168d0bc9;hb=3fb8170e3114c0845d95b35542a7bbfe84f7ac1b;hp=1f4142acd6a62ee545f484c8e24028cb8cd44342;hpb=eb5fc1eaa7e6584ba1b89b59d2c8703118c13c6f;p=unfold.git
diff --git a/plugins/hazelnut/static/js/hazelnut.js b/plugins/hazelnut/static/js/hazelnut.js
index 1f4142ac..f17eb258 100644
--- a/plugins/hazelnut/static/js/hazelnut.js
+++ b/plugins/hazelnut/static/js/hazelnut.js
@@ -4,14 +4,8 @@
* License: GPLv3
*/
-//debug_table = function (table,message) {
-// messages.debug ( message + ": " + table.fnSettings().aoColumns.length + " columns");
-// messages.debug ( message + ":..." + table.fnGetNodes().length + " lines");
-//};
-
(function($){
- // TEMP
var debug=false;
// debug=true
@@ -88,11 +82,11 @@
var 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'<'col-md-5'l><'col-md-1'r><'col-md-6'f>>t<'row'<'col-md-5'i><'col-md-7'p>>",
+ sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t<'row'<'col-xs-5'i><'col-xs-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',
+ sPaginationType: 'bootstrap',
// 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' ]}],
@@ -118,7 +112,7 @@
/* Setup the SelectAll button in the dataTable header */
/* xxx not sure this is still working */
var oSelectAll = $('#datatableSelectAll-'+ this.options.plugin_uuid);
- oSelectAll.html("Select All");
+ oSelectAll.html("Select All");
oSelectAll.button();
oSelectAll.css('font-size','11px');
oSelectAll.css('float','right');
@@ -192,6 +186,9 @@
line.push('');
else
line.push(record['hostname']);
+
+ } else if (colnames[j] == 'hrn' && typeof(record) != 'undefined') {
+ line.push(' '+record['hrn']);
} else {
if (record[colnames[j]])
line.push(record[colnames[j]]);