home *** CD-ROM | disk | FTP | other *** search
/ 74.208.221.89 / 74.208.221.89.zip / 74.208.221.89 / manage / bottomscriptsdt.ascx < prev    next >
Text File  |  2015-03-09  |  10KB  |  239 lines

  1. ∩╗┐<!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
  2.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
  3.         <script>
  4.             if (!window.jQuery) {
  5.                 document.write('<script src="js/libs/jquery-2.0.2.min.js"><\/script>');
  6.             }
  7.         </script>
  8.  
  9.         <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
  10.         <script>
  11.             if (!window.jQuery.ui) {
  12.                 document.write('<script src="js/libs/jquery-ui-1.10.3.min.js"><\/script>');
  13.             }
  14.         </script>
  15.  
  16.         <!-- IMPORTANT: APP CONFIG -->
  17.         <script src="js/app.config.js"></script>
  18.  
  19.         <!-- JS TOUCH : include this plugin for mobile drag / drop touch events-->
  20.         <script src="js/plugin/jquery-touch/jquery.ui.touch-punch.min.js"></script> 
  21.  
  22.         <!-- BOOTSTRAP JS -->
  23.         <script src="js/bootstrap/bootstrap.min.js"></script>
  24.  
  25.         <!-- CUSTOM NOTIFICATION -->
  26.         <script src="js/notification/SmartNotification.min.js"></script>
  27.  
  28.         <!-- JARVIS WIDGETS -->
  29.         <script src="js/smartwidgets/jarvis.widget.min.js"></script>
  30.  
  31.         <!-- EASY PIE CHARTS -->
  32.         <script src="js/plugin/easy-pie-chart/jquery.easy-pie-chart.min.js"></script>
  33.  
  34.         <!-- SPARKLINES -->
  35.         <script src="js/plugin/sparkline/jquery.sparkline.min.js"></script>
  36.  
  37.         <!-- JQUERY VALIDATE -->
  38.         <script src="js/plugin/jquery-validate/jquery.validate.min.js"></script>
  39.  
  40.         <!-- JQUERY MASKED INPUT -->
  41.         <script src="js/plugin/masked-input/jquery.maskedinput.min.js"></script>
  42.  
  43.         <!-- JQUERY SELECT2 INPUT -->
  44.         <script src="js/plugin/select2/select2.min.js"></script>
  45.  
  46.         <!-- JQUERY UI + Bootstrap Slider -->
  47.         <script src="js/plugin/bootstrap-slider/bootstrap-slider.min.js"></script>
  48.  
  49.         <!-- browser msie issue fix -->
  50.         <script src="js/plugin/msie-fix/jquery.mb.browser.min.js"></script>
  51.  
  52.         <!-- FastClick: For mobile devices -->
  53.         <script src="js/plugin/fastclick/fastclick.min.js"></script>
  54.  
  55.         <!--[if IE 8]>
  56.  
  57.         <h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>
  58.  
  59.         <![endif]-->
  60.  
  61.         
  62.  
  63.         <!-- MAIN APP JS FILE -->
  64.         <script src="js/app.min.js"></script>
  65.  
  66.         
  67.  
  68.         <!-- PAGE RELATED PLUGIN(S) -->
  69.         <script src="js/plugin/datatables/jquery.dataTables.min.js"></script>
  70.         <script src="js/plugin/datatables/dataTables.colVis.min.js"></script>
  71.         <script src="js/plugin/datatables/dataTables.tableTools.min.js"></script>
  72.         <script src="js/plugin/datatables/dataTables.bootstrap.min.js"></script>
  73.         <script src="js/plugin/datatable-responsive/datatables.responsive.min.js"></script>
  74.  
  75.         <script type="text/javascript">
  76.  
  77.             // DO NOT REMOVE : GLOBAL FUNCTIONS!
  78.  
  79.             $(document).ready(function () {
  80.  
  81.                 pageSetUp();
  82.  
  83.                 /* // DOM Position key index //
  84.             
  85.                 l - Length changing (dropdown)
  86.                 f - Filtering input (search)
  87.                 t - The Table! (datatable)
  88.                 i - Information (records)
  89.                 p - Pagination (paging)
  90.                 r - pRocessing 
  91.                 < and > - div elements
  92.                 <"#id" and > - div with an id
  93.                 <"class" and > - div with a class
  94.                 <"#id.class" and > - div with an id and class
  95.                 
  96.                 Also see: http://legacy.datatables.net/usage/features
  97.                 */
  98.  
  99.                 /* BASIC ;*/
  100.                 var responsiveHelper_dt_basic = undefined;
  101.                 var responsiveHelper_datatable_fixed_column = undefined;
  102.                 var responsiveHelper_datatable_col_reorder = undefined;
  103.                 var responsiveHelper_datatable_tabletools = undefined;
  104.  
  105.                 var breakpointDefinition = {
  106.                     tablet: 1024,
  107.                     phone: 480
  108.                 };
  109.  
  110.                 $('#dt_basic').dataTable({
  111.                     "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-12 hidden-xs'l>r>" +
  112.                         "t" +
  113.                         "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>",
  114.                     "autoWidth": true,
  115.                     "preDrawCallback": function () {
  116.                         // Initialize the responsive datatables helper once.
  117.                         if (!responsiveHelper_dt_basic) {
  118.                             responsiveHelper_dt_basic = new ResponsiveDatatablesHelper($('#dt_basic'), breakpointDefinition);
  119.                         }
  120.                     },
  121.                     "rowCallback": function (nRow) {
  122.                         responsiveHelper_dt_basic.createExpandIcon(nRow);
  123.                     },
  124.                     "drawCallback": function (oSettings) {
  125.                         responsiveHelper_dt_basic.respond();
  126.                     }
  127.                 });
  128.  
  129.                 /* END BASIC */
  130.  
  131.                 /* COLUMN FILTER  */
  132.                 var otable = $('#datatable_fixed_column').DataTable({
  133.                     //"bFilter": false,
  134.                     //"bInfo": false,
  135.                     //"bLengthChange": false
  136.                     //"bAutoWidth": false,
  137.                     //"bPaginate": false,
  138.                     //"bStateSave": true // saves sort state using localStorage
  139.                     "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6 hidden-xs'f><'col-sm-6 col-xs-12 hidden-xs'<'toolbar'>>r>" +
  140.                             "t" +
  141.                             "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>",
  142.                     "autoWidth": true,
  143.                     "preDrawCallback": function () {
  144.                         // Initialize the responsive datatables helper once.
  145.                         if (!responsiveHelper_datatable_fixed_column) {
  146.                             responsiveHelper_datatable_fixed_column = new ResponsiveDatatablesHelper($('#datatable_fixed_column'), breakpointDefinition);
  147.                         }
  148.                     },
  149.                     "rowCallback": function (nRow) {
  150.                         responsiveHelper_datatable_fixed_column.createExpandIcon(nRow);
  151.                     },
  152.                     "drawCallback": function (oSettings) {
  153.                         responsiveHelper_datatable_fixed_column.respond();
  154.                     }
  155.  
  156.                 });
  157.  
  158.                 // custom toolbar
  159.                 $("div.toolbar").html('<div class="text-right"><img src="img/logo.png" alt="SmartAdmin" style="width: 111px; margin-top: 3px; margin-right: 10px;"></div>');
  160.  
  161.                 // Apply the filter
  162.                 $("#datatable_fixed_column thead th input[type=text]").on('keyup change', function () {
  163.  
  164.                     otable
  165.                         .column($(this).parent().index() + ':visible')
  166.                         .search(this.value)
  167.                         .draw();
  168.  
  169.                 });
  170.                 /* END COLUMN FILTER */
  171.  
  172.                 /* COLUMN SHOW - HIDE */
  173.                 $('#datatable_col_reorder').dataTable({
  174.                     "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-6 hidden-xs'C>r>" +
  175.                             "t" +
  176.                             "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-sm-6 col-xs-12'p>>",
  177.                     "autoWidth": true,
  178.                     "preDrawCallback": function () {
  179.                         // Initialize the responsive datatables helper once.
  180.                         if (!responsiveHelper_datatable_col_reorder) {
  181.                             responsiveHelper_datatable_col_reorder = new ResponsiveDatatablesHelper($('#datatable_col_reorder'), breakpointDefinition);
  182.                         }
  183.                     },
  184.                     "rowCallback": function (nRow) {
  185.                         responsiveHelper_datatable_col_reorder.createExpandIcon(nRow);
  186.                     },
  187.                     "drawCallback": function (oSettings) {
  188.                         responsiveHelper_datatable_col_reorder.respond();
  189.                     }
  190.                 });
  191.  
  192.                 /* END COLUMN SHOW - HIDE */
  193.  
  194.                 /* TABLETOOLS */
  195.                 $('#datatable_tabletools').dataTable({
  196.  
  197.                     // Tabletools options: 
  198.                     //   https://datatables.net/extensions/tabletools/button_options
  199.                     "sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-6 hidden-xs'T>r>" +
  200.                             "t" +
  201.                             "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-sm-6 col-xs-12'p>>",
  202.                     "oTableTools": {
  203.                         "aButtons": [
  204.                         "copy",
  205.                         "csv",
  206.                         "xls",
  207.                            {
  208.                                "sExtends": "pdf",
  209.                                "sTitle": "Lalchikeeda_PDF",
  210.                                "sPdfMessage": "Lalchikeeda PDF Export",
  211.                                "sPdfSize": "letter"
  212.                            },
  213.                            {
  214.                                "sExtends": "print",
  215.                                "sMessage": "Generated by Lalchikeeda <i>(press Esc to close)</i>"
  216.                            }
  217.                         ],
  218.                         "sSwfPath": "js/plugin/datatables/swf/copy_csv_xls_pdf.swf"
  219.                     },
  220.                     "autoWidth": true,
  221.                     "preDrawCallback": function () {
  222.                         // Initialize the responsive datatables helper once.
  223.                         if (!responsiveHelper_datatable_tabletools) {
  224.                             responsiveHelper_datatable_tabletools = new ResponsiveDatatablesHelper($('#datatable_tabletools'), breakpointDefinition);
  225.                         }
  226.                     },
  227.                     "rowCallback": function (nRow) {
  228.                         responsiveHelper_datatable_tabletools.createExpandIcon(nRow);
  229.                     },
  230.                     "drawCallback": function (oSettings) {
  231.                         responsiveHelper_datatable_tabletools.respond();
  232.                     }
  233.                 });
  234.  
  235.                 /* END TABLETOOLS */
  236.  
  237.             })
  238.  
  239.         </script>