@@ -435,9 +435,33 @@ $(document).ready(function () {
435435 defaultContent : ""
436436 }
437437 ] ,
438- "scrollX" : true
438+ dom :
439+ // Needed to keep datatables buttons and search inline
440+ "<'row'<'col-sm-9'B><'col-sm-3'f>>" +
441+ "<'row'<'col-sm-12'tr>>" +
442+ "<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
443+ buttons : [
444+ {
445+ name : 'uploadDeja' ,
446+ text : '<i class=" fa fa-cloud-upload"></i> Upload Components'
447+
448+ }
449+ ] ,
450+ "language" : {
451+ "emptyTable" : "No Components created."
452+ }
453+
439454 } ) ;
440455
456+ componentsTable . buttons ( ) . container ( ) . attr ( {
457+ 'id' : 'show-components' ,
458+ 'data-toggle' : 'modal' ,
459+ 'data-placement' : 'right' ,
460+ 'title' : 'Upload Components to DejaCode' ,
461+ 'data-target' :'#componentExportModal'
462+ } ) ;
463+
464+
441465 // Show DataTable. Hide node view and component summary table
442466 $ ( "#show-datatable" ) . click ( function ( ) {
443467 $ ( "#clues-table" ) . show ( ) ;
@@ -498,7 +522,7 @@ $(document).ready(function () {
498522 var createdComponents = scanData . toSaveFormat ( ) . components ;
499523 // Get product name and version
500524 var productNameVersion = $ ( '#product-name' ) . val ( )
501- . concat ( ":" , $ ( '#product-version' ) . val ( ) ) ;
525+ . concat ( ':' , $ ( '#product-version' ) . val ( ) ) ;
502526 var apiUrl = $ ( '#api-url' ) . val ( ) ;
503527 var apiKey = $ ( '#export-input' ) . val ( ) ;
504528 uploadComponents ( apiUrl , createdComponents , apiKey , productNameVersion ) ;
0 commit comments