PageRenderTime 55ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/public/assets/theme/assets/global/plugins/datatables/extensions/Responsive/examples/display-control/classes.html

https://gitlab.com/techniconline/kmc
HTML | 261 lines | 224 code | 37 blank | 0 comment | 0 complexity | ba4be08bd413e5b7be44f62326fa3646 MD5 | raw file
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
  6. <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
  7. <title>Responsive example - Class control</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
  9. <link rel="stylesheet" type="text/css" href="../../css/dataTables.responsive.css">
  10. <link rel="stylesheet" type="text/css" href="../../../../examples/resources/syntax/shCore.css">
  11. <link rel="stylesheet" type="text/css" href="../../../../examples/resources/demo.css">
  12. <style type="text/css" class="init">
  13. </style>
  14. <script type="text/javascript" language="javascript" src="../../../../media/js/jquery.js"></script>
  15. <script type="text/javascript" language="javascript" src="../../../../media/js/jquery.dataTables.js"></script>
  16. <script type="text/javascript" language="javascript" src="../../js/dataTables.responsive.js"></script>
  17. <script type="text/javascript" language="javascript" src="../../../../examples/resources/syntax/shCore.js"></script>
  18. <script type="text/javascript" language="javascript" src="../../../../examples/resources/demo.js"></script>
  19. <script type="text/javascript" language="javascript" class="init">
  20. $(document).ready(function () {
  21. $('#example').DataTable({
  22. "ajax": "../../../../examples/ajax/data/objects.txt",
  23. "columns": [
  24. {"data": "name"},
  25. {"data": "position"},
  26. {"data": "office"},
  27. {"data": "extn"},
  28. {"data": "start_date"},
  29. {"data": "salary"},
  30. {"data": "extn"}
  31. ]
  32. });
  33. });
  34. </script>
  35. </head>
  36. <body class="dt-example">
  37. <div class="container">
  38. <section>
  39. <h1>Responsive example <span>Class control</span></h1>
  40. <div class="info">
  41. <p>You can tell Responsive what columns to want to be visible on different devices through the use of
  42. class names on the columns. The breakpoints are horizontal screen resolutions and the defaults are set
  43. for common devices:</p>
  44. <ul class="markdown">
  45. <li><code>desktop</code> x &gt;= 1024px</li>
  46. <li><code>tablet-l</code> (landscape) 768 &lt;= x &lt; 1024</li>
  47. <li><code>tablet-p</code> (portrait) 480 &lt;= x &lt; 768</li>
  48. <li><code>mobile-l</code> (landscape) 320 &lt;= x &lt; 480</li>
  49. <li><code>mobile-p</code> (portrait) x &lt; 320</li>
  50. </ul>
  51. <p>You may leave the <code>-[lp]</code> option from the end if you wish to just target all tablet or
  52. mobile devices. Additionally to may add <code>min-</code>, <code>max-</code> or <code>not-</code> as a
  53. prefix to the class name to perform logic operations. For example <code>not-mobile</code> would cause a
  54. column to appear as visible on desktop and tablet devices, while <code>min-tablet-l</code> would
  55. require at least a horizontal width of 768 for the browser window to be shown, and be shown at all
  56. sizes larger.</p>
  57. <p>Additionally, there are three special class names:</p>
  58. <ul class="markdown">
  59. <li><code>all</code> - Always display</li>
  60. <li><code>none</code> - Never display</li>
  61. <li><code>control</code> - Used for the <code>column</code> <a href=
  62. "//datatables.net/extensions/responsive/reference/option/responsive.details.type"><code
  63. class=
  64. "option" title="Responsive initialisation option">responsive.details.type<span>R</span></code></a>
  65. option.
  66. </li>
  67. </ul>
  68. <p>Please <a href="//datatables.net/extensions/responsive/">refer to the Responsive manual</a> for
  69. further details of these options.</p>
  70. <p>This example shows the <code>start date</code> and <code>salary</code> columns visible on a desktop
  71. only - <code>office</code> and <code>age</code> require a tablet, while the <code>position</code>
  72. column requires a phone in landscape or larger. The <code>name</code> column is always visible.</p>
  73. <p>This can be useful if you wish to change the format of the data shown on different devices, for
  74. example using a combination of <code>mobile</code> and <code>not-mobile</code> on two different columns
  75. would allow information to be formatted suitable for each device type.</p>
  76. </div>
  77. <div id="breakpoint"></div>
  78. <table id="example" class="display responsive" width="100%">
  79. <thead>
  80. <tr>
  81. <th class="all">Name</th>
  82. <th class="min-phone-l">Position</th>
  83. <th class="min-tablet">Office</th>
  84. <th class="min-tablet">Age</th>
  85. <th class="desktop">Start date</th>
  86. <th class="desktop">Salary</th>
  87. <th class="none">Extn.</th>
  88. </tr>
  89. </thead>
  90. <tfoot>
  91. <tr>
  92. <th>Name</th>
  93. <th>Position</th>
  94. <th>Office</th>
  95. <th>Age</th>
  96. <th>Start date</th>
  97. <th>Salary</th>
  98. <th>Extn.</th>
  99. </tr>
  100. </tfoot>
  101. </table>
  102. <ul class="tabs">
  103. <li class="active">Javascript</li>
  104. <li>HTML</li>
  105. <li>CSS</li>
  106. <li>Ajax</li>
  107. <li>Server-side script</li>
  108. </ul>
  109. <div class="tabs">
  110. <div class="js">
  111. <p>The Javascript shown below is used to initialise the table shown in this
  112. example:</p><code class="multiline brush: js;">$(document).ready(function() {
  113. $('#example').DataTable( {
  114. &quot;ajax&quot;: &quot;../../../../examples/ajax/data/objects.txt&quot;,
  115. &quot;columns&quot;: [
  116. { &quot;data&quot;: &quot;name&quot; },
  117. { &quot;data&quot;: &quot;position&quot; },
  118. { &quot;data&quot;: &quot;office&quot; },
  119. { &quot;data&quot;: &quot;extn&quot; },
  120. { &quot;data&quot;: &quot;start_date&quot; },
  121. { &quot;data&quot;: &quot;salary&quot; },
  122. { &quot;data&quot;: &quot;extn&quot; }
  123. ]
  124. } );
  125. } );</code>
  126. <p>In addition to the above code, the following Javascript library files are loaded for use in this
  127. example:</p>
  128. <ul>
  129. <li><a href="../../../../media/js/jquery.js">../../../../media/js/jquery.js</a></li>
  130. <li><a href=
  131. "../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a>
  132. </li>
  133. <li><a href="../../js/dataTables.responsive.js">../../js/dataTables.responsive.js</a></li>
  134. </ul>
  135. </div>
  136. <div class="table">
  137. <p>The HTML shown below is the raw HTML table element, before it has been enhanced by
  138. DataTables:</p>
  139. </div>
  140. <div class="css">
  141. <div>
  142. <p>This example uses a little bit of additional CSS beyond what is loaded from the library
  143. files (below), in order to correctly display the table. The additional CSS used is shown
  144. below:</p><code class="multiline brush: js;"></code>
  145. </div>
  146. <p>The following CSS library files are loaded for use in this example to provide the styling of the
  147. table:</p>
  148. <ul>
  149. <li><a href=
  150. "../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a>
  151. </li>
  152. <li><a href="../../css/dataTables.responsive.css">../../css/dataTables.responsive.css</a></li>
  153. </ul>
  154. </div>
  155. <div class="ajax">
  156. <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
  157. will update automatically as any additional data is loaded.</p>
  158. </div>
  159. <div class="php">
  160. <p>The script used to perform the server-side processing for this table is shown below. Please note
  161. that this is just an example script using PHP. Server-side processing scripts can be written in any
  162. language, using <a href="//datatables.net/manual/server-side">the protocol described in the
  163. DataTables documentation</a>.</p>
  164. </div>
  165. </div>
  166. </section>
  167. </div>
  168. <section>
  169. <div class="footer">
  170. <div class="gradient"></div>
  171. <div class="liner">
  172. <h2>Other examples</h2>
  173. <div class="toc">
  174. <div class="toc-group">
  175. <h3><a href="../initialisation/index.html">Basic initialisation</a></h3>
  176. <ul class="toc">
  177. <li><a href="../initialisation/className.html">Class name</a></li>
  178. <li><a href="../initialisation/option.html">Configuration option</a></li>
  179. <li><a href="../initialisation/new.html">`new` constructor</a></li>
  180. <li><a href="../initialisation/ajax.html">Ajax data</a></li>
  181. </ul>
  182. </div>
  183. <div class="toc-group">
  184. <h3><a href="../styling/index.html">Styling</a></h3>
  185. <ul class="toc">
  186. <li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
  187. <li><a href="../styling/foundation.html">Foundation styling</a></li>
  188. </ul>
  189. </div>
  190. <div class="toc-group">
  191. <h3><a href="./index.html">Display control</a></h3>
  192. <ul class="toc active">
  193. <li><a href="./auto.html">Automatic column hiding</a></li>
  194. <li class="active"><a href="./classes.html">Class control</a></li>
  195. <li><a href="./init-classes.html">Assigned class control</a></li>
  196. </ul>
  197. </div>
  198. <div class="toc-group">
  199. <h3><a href="../child-rows/index.html">Child rows</a></h3>
  200. <ul class="toc">
  201. <li><a href="../child-rows/disable-child-rows.html">Disable child rows</a></li>
  202. <li><a href="../child-rows/column-control.html">Column controlled child rows</a></li>
  203. <li><a href="../child-rows/right-column.html">Column control - right</a></li>
  204. <li><a href="../child-rows/whole-row-control.html">Whole row child row control</a></li>
  205. <li><a href="../child-rows/custom-renderer.html">Custom child row renderer</a></li>
  206. </ul>
  207. </div>
  208. </div>
  209. <div class="epilogue">
  210. <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
  211. information about its API properties and methods.<br>
  212. Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
  213. <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
  214. DataTables.</p>
  215. <p class="copyright">DataTables designed and created by <a href=
  216. "http://www.sprymedia.co.uk">SpryMedia
  217. Ltd</a> &#169; 2007-2014<br>
  218. DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
  219. </div>
  220. </div>
  221. </div>
  222. </section>
  223. </body>
  224. </html>