| <!-- REMEMBER TO COPY ALL CHANGES TO download.html --> |
| <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> |
| <script type="text/javascript">window.jQuery || document.write('<script src="js/jquery-1.11.1.min.js"><\/script>')</script> |
| <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-61232409-1', 'auto'); |
| ga('send', 'pageview'); |
| </script> |
| <script type="text/javascript"> |
| if (navigator.userAgent.match(/IEMobile\/10\.0/)) { |
| var msViewportStyle = document.createElement('style'); |
| msViewportStyle.appendChild( |
| document.createTextNode( |
| '@-ms-viewport{width:auto!important}' |
| ) |
| ); |
| document.querySelector('head').appendChild(msViewportStyle) |
| } |
| </script> |
| <script type="text/javascript"> |
| eval(function() |
| { |
| try |
| { |
| doHighlight(); |
| } |
| catch(e) |
| { |
| var elem = document.createElement('SCRIPT'); |
| elem.src="https://crux-framework-tools.googlecode.com/svn/trunk/misc/highlight/highlight.js"; |
| var theBody = document.getElementsByTagName('body')[0]; |
| theBody.appendChild(elem); |
| } |
| })(); |
| </script> |
| |
| <!-- Syntax highlight. --> |
| <script type="text/javascript"> |
| SyntaxHighlighter.all() |
| </script> |
| |
| <!-- Disable carousel slide on mobile devices. --> |
| <script type="text/javascript"> |
| if( /Android|webOS|iPhone|iPod|Galaxy Note|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { |
| $('.carousel').carousel ({ |
| interval:false |
| }); |
| } |
| </script> |
| |
| <!-- Table export --> |
| <script type="text/javascript" src="//cdn.rawgit.com/hhurz/tableExport.jquery.plugin/master/libs/FileSaver/FileSaver.min.js"></script> |
| <script type="text/javascript" src="//cdn.rawgit.com/hhurz/tableExport.jquery.plugin/master/libs/jsPDF/jspdf.min.js"></script> |
| <script type="text/javascript" src="/js/jspdf.plugin.autotable.js"></script> |
| <script type="text/javascript" src="/js/tableExport.min.js"></script> |
| |
| <script type="text/javascript"> |
| $(document).ready(function() { |
| var expBtnDesc = [ |
| {cfg: {type:'json'}, text: 'JSON', icon:'ico-json.png'}, |
| {cfg: {type:'xml'}, text: 'XML', icon:'ico-xml.png'}, |
| {cfg: {type:'csv'}, text: 'CSV', icon:'ico-csv.png'}, |
| {cfg: {type:'excel'}, text: 'XLS', icon:'ico-xls.png'}, |
| {cfg: {type:'pdf', |
| jspdf: { |
| autotable: { |
| styles: { |
| overflow: 'linebreak', |
| fontSize: 14, |
| rowHeight: 19, |
| valign: 'top' |
| }, |
| headerStyles: { |
| rowHeight: 20, |
| fontSize: 16, |
| fillColor: 207, |
| textColor: 0, |
| valign: 'middle' |
| }, |
| bodyStyles: { |
| fillColor: 245 |
| }, |
| alternateRowStyles: { |
| fillColor: 255, |
| valign: 'middle' |
| } |
| } |
| } |
| }, |
| text: 'PDF', |
| icon:'ico-pdf.png'} |
| ]; |
| |
| $("table").each(function (ix, tbl) { |
| var insert = '' + |
| '<div class="btn-group btn-group-export" title="Export table content to selected format">\n' + |
| ' <button class="btn btn-default btn-export btn-sm dropdown-toggle fa fa-download" data-toggle="dropdown"> <i class="fa fa-caret-down"/></button>\n' + |
| ' <ul class="dropdown-menu dropdown-menu-right" role="menu">\n'; |
| |
| var id = this.id || 'table' + ix; |
| |
| this.id = id; |
| |
| $.each(expBtnDesc, function (ix, btn) { |
| btn.cfg.fileName = $(tbl).attr('name'); |
| |
| insert += " <li><a href='#' onclick='$(\"#" + id + "\").tableExport(" + JSON.stringify(btn.cfg) + ");'>" + |
| "<img src='/images/" + btn.icon + "' width='24px'/> " + btn.text + |
| "</a></li>\n"; |
| |
| if (ix < expBtnDesc.length - 1) |
| insert += ' <li class="divider"></li>\n'; |
| }); |
| |
| insert += ' </ul>\n'+ |
| '</div>\n'; |
| |
| $(this).find('thead').before(insert); |
| }); |
| }); |
| </script> |