diff options
author | terminaldweller <thabogre@gmail.com> | 2022-07-21 05:36:02 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-07-21 05:36:02 +0000 |
commit | 85db7c5287ae58efc108263f7a40bdbd02de1a82 (patch) | |
tree | 8292d90db8999dabc2e3872ea75547cb7fcf0c2d /dbdocs/schemaSpy.js | |
parent | changed the max doc size to 40K characters.255 was not enough... (diff) | |
download | mdrtl-85db7c5287ae58efc108263f7a40bdbd02de1a82.tar.gz mdrtl-85db7c5287ae58efc108263f7a40bdbd02de1a82.zip |
added docs for the db using schemaspy
Diffstat (limited to 'dbdocs/schemaSpy.js')
-rw-r--r-- | dbdocs/schemaSpy.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dbdocs/schemaSpy.js b/dbdocs/schemaSpy.js new file mode 100644 index 0000000..983327c --- /dev/null +++ b/dbdocs/schemaSpy.js @@ -0,0 +1,45 @@ +$(function() { + var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/")+1); + $("#navbar-collapse ul li a").each(function(){ + if($(this).attr("href") == pgurl || $(this).attr("href") == '' ) + $(this).parent().addClass("active"); + }) +}); + +function dataTableExportButtons(table) { + $("<div class=\"row\">\n" + + " <div id=\"button_group_one\" class=\"col-md-6 col-sm-6\"></div>\n" + + " <div id=\"button_group_two\" class=\"col-md-2 col-sm-4 pull-right text-right\"></div>\n" + + "</div>").prependTo('#' + table.table().container().id); + new $.fn.dataTable.Buttons( table, { + name: 'exports', + buttons: [ + { + extend: 'copyHtml5', + text: '<i class="fa fa-files-o"></i>', + titleAttr: 'Copy' + }, + { + extend: 'excelHtml5', + text: '<i class="fa fa-file-excel-o"></i>', + titleAttr: 'Excel' + }, + { + extend: 'csvHtml5', + text: '<i class="fa fa-file-text-o"></i>', + titleAttr: 'CSV' + }, + { + extend: 'pdfHtml5', + text: '<i class="fa fa-file-pdf-o"></i>', + orientation: 'landscape', + titleAttr: 'PDF' + } + ] + } ); + + table.buttons().container().appendTo( '#' + table.table().container().id + ' #button_group_one' ); + table.buttons( 'exports', null ).container().appendTo( '#' + table.table().container().id + ' #button_group_two' ); +} + +
\ No newline at end of file |