Datatables (hazelnut) added a link on the hrn to look at a single resource
[unfold.git] / plugins / hazelnut / static / js / hazelnut.js
index ab22c1e..f17eb25 100644 (file)
@@ -86,7 +86,7 @@
                // 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' ]}],
             /* Setup the SelectAll button in the dataTable header */
             /* xxx not sure this is still working */
             var oSelectAll = $('#datatableSelectAll-'+ this.options.plugin_uuid);
-            oSelectAll.html("<span class='ui-icon ui-icon-check' style='float:right;display:inline-block;'></span>Select All");
+            oSelectAll.html("<span class='glyphicon glyphicon-ok' style='float:right;display:inline-block;'></span>Select All");
             oSelectAll.button();
             oSelectAll.css('font-size','11px');
             oSelectAll.css('float','right');
                         line.push('');
                     else
                         line.push(record['hostname']);
+
+                } else if (colnames[j] == 'hrn' && typeof(record) != 'undefined') {
+                    line.push('<a href="../resource/'+record['urn']+'"><span class="glyphicon glyphicon-search"></span></a> '+record['hrn']);
                 } else {
                     if (record[colnames[j]])
                         line.push(record[colnames[j]]);