Advertisement
k-joseph

Untitled

Jun 25th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.02 KB | None | 0 0
  1. <script type="text/javascript">
  2. var jq = jQuery;
  3.  
  4.  
  5. jq( document ).ready(function() {
  6. jq( "#date_filter_title" ).click(function() {
  7. jq( "#date_filter_options" ).toggle();
  8. });
  9.  
  10. jq( "#date_filter_options" ).click(function(e) {
  11. jq( "#date_filter_options" ).hide();
  12. var txt = jq(e.target).text();
  13. jq("#date_filter_title").text(txt);
  14. });
  15. });
  16.  
  17. /* if the page has been fully loaded we add click handlers for categories checkboxes*/
  18. jq(document).ready(function () {
  19. /* Get the checkboxes values based on the class attached to each categories checkbox */
  20. jq("#submit_selected_categories").click(function() {
  21. getSelectedCategoriesUsingClass();
  22. });
  23. });
  24.  
  25. function getSelectedCategoriesUsingClass() {
  26. /* declare an checkbox array */
  27. var selectedCategories = new Array();
  28.  
  29. /* look for all checkboxes that have a class 'category_check' attached to it and check if it was checked */
  30. jq(".category_check:checked").each(function() {
  31. selectedCategories.push($(this).val());
  32. });
  33. }
  34.  
  35. </script>
  36.  
  37. <style type="text/css">
  38. .chart-search-input {
  39. background: #3f3d74;
  40. text-align: left;
  41. color: white;
  42. padding: 20px 30px;
  43. -moz-border-radius: 5px;
  44. -webkit-border-radius: 5px;
  45. -o-border-radius: 5px;
  46. -ms-border-radius: 5px;
  47. -khtml-border-radius: 5px;
  48. border-radius: 5px;
  49. }
  50. .chart_search_form_text_input {
  51. min-width: 82% !important;
  52. }
  53. .inline {
  54. display: inline-block;
  55. }
  56. .chart_search_form_button {
  57. margin-left: 30px;
  58. }
  59. .form_label_style {
  60. margin-bottom: 10px !important;
  61. }
  62. .filter_options {
  63. display: none;
  64. background: white;
  65. width: 90px;
  66. padding: 13px;
  67. position: absolute;
  68. border: 1px solid black;
  69. left:242px;
  70. }
  71. .date_filter_title {
  72. display: inline-block;
  73. white-space: nowrap;
  74. background-color: #ddd;
  75. background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ccc));
  76. background-image: -webkit-linear-gradient(top, #eee, #ccc);
  77. background-image: -moz-linear-gradient(top, #eee, #ccc);
  78. background-image: -ms-linear-gradient(top, #eee, #ccc);
  79. background-image: -o-linear-gradient(top, #eee, #ccc);
  80. background-image: linear-gradient(top, #eee, #ccc);
  81. border: 1px solid #777;
  82. padding: 0 1.5em;
  83. margin: 0.5em 0;
  84. font: bold 1em/2em Arial, Helvetica;
  85. text-decoration: none;
  86. color: #333;
  87. text-shadow: 0 1px 0 rgba(255,255,255,.8);
  88. -moz-border-radius: .2em;
  89. -webkit-border-radius: .2em;
  90. border-radius: .2em;
  91. -moz-box-shadow: 0 0 1px 1px rgba(255,255,255,.8) inset, 0 1px 0 rgba(0,0,0,.3);
  92. -webkit-box-shadow: 0 0 1px 1px rgba(255,255,255,.8) inset, 0 1px 0 rgba(0,0,0,.3);
  93. box-shadow: 0 0 1px 1px rgba(255,255,255,.8) inset, 0 1px 0 rgba(0,0,0,.3);
  94. }
  95. .date_filter_title:hover
  96. {
  97. background-color: #eee;
  98. background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#ddd));
  99. background-image: -webkit-linear-gradient(top, #fafafa, #ddd);
  100. background-image: -moz-linear-gradient(top, #fafafa, #ddd);
  101. background-image: -ms-linear-gradient(top, #fafafa, #ddd);
  102. background-image: -o-linear-gradient(top, #fafafa, #ddd);
  103. background-image: linear-gradient(top, #fafafa, #ddd);
  104. cursor: pointer;
  105. }
  106.  
  107. .date_filter_title:active
  108. {
  109. -moz-box-shadow: 0 0 4px 2px rgba(0,0,0,.3) inset;
  110. -webkit-box-shadow: 0 0 4px 2px rgba(0,0,0,.3) inset;
  111. box-shadow: 0 0 4px 2px rgba(0,0,0,.3) inset;
  112. position: relative;
  113. top: 1px;
  114. }
  115. .date_filter_title:after {
  116. content:' ↓'
  117. }
  118. .single_filter_option {
  119. display: block;
  120. cursor: pointer;
  121. }
  122.  
  123. .demo-container {
  124. box-sizing: border-box;
  125. width: 400px;
  126. height: 300px;
  127. padding: 20px 15px 15px 15px;
  128. margin: 15px auto 30px auto;
  129. border: 1px solid #ddd;
  130. background: #fff;
  131. background: linear-gradient(#f6f6f6 0, #fff 50px);
  132. background: -o-linear-gradient(#f6f6f6 0, #fff 50px);
  133. background: -ms-linear-gradient(#f6f6f6 0, #fff 50px);
  134. background: -moz-linear-gradient(#f6f6f6 0, #fff 50px);
  135. background: -webkit-linear-gradient(#f6f6f6 0, #fff 50px);
  136. box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  137. -o-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  138. -ms-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  139. -moz-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  140. -webkit-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  141. }
  142.  
  143. .demo-placeholder {
  144. width: 100%;
  145. height: 100%;
  146. font-size: 14px;
  147. line-height: 1.2em;
  148. }
  149.  
  150. .legend, .legend div {
  151. display: none;
  152. }
  153.  
  154. .bold {
  155. font-weight: bold;
  156. }
  157.  
  158. </style>
  159.  
  160. <article id="search-box">
  161. <section>
  162. <div class="chart-search-wrapper">
  163. <form class="chart-search-form">
  164. <div class="chart-search-input">
  165. <div class="chart_search_form_inputs">
  166. <input type="text" name="patientId" value=${patientId} hidden>
  167. <input type="text" id="searchText" name="phrase" class="chart_search_form_text_input inline ui-autocomplete-input" placeholder="${ ui.message("chartsearch.messageInSearchField") }" size="40">
  168. <input type="submit" id="searchBtn" class="button inline chart_search_form_button" value="search"/>
  169. </div>
  170. <div class="filters_section">
  171. <div class="dropdown">
  172. <div class="inside_categories_filter">
  173. <span class="dropdown-name" id="categories_label">
  174. <a href="#" class="filter_method">Categories</script></a>
  175. <i class="icon-sort-down" id="icon-arrow-dropdown"></i>
  176. </span>
  177. <div class="filter_categories">
  178. <a href="">Select All</a><span><label class="align_to_right"><a href="">Clear</a></label></span>
  179. <br /><hr />
  180. <input class="category_check" type="checkbox" name="categories" value="Diagnoses" checked>Diagnoses <a href="#" >(0)</a><br />
  181. <input class="category_check" type="checkbox" name="categories" value="Labs" checked>Labs <a href="#" >(0)</a><br />
  182. <input class="category_check" type="checkbox" name="categories" value="Meds" checked>Meds <a href="#" >(0)</a><br />
  183. <input class="category_check" type="checkbox" name="categories" value="Orders" checked >Orders <a href="#">(3)</a><br />
  184. <input class="category_check" type="checkbox" name="categories" value="Reports" checked >Reports <a href="#">(6)</a><br />
  185. <input class="category_check" type="checkbox" name="categories" value="Vitals" checked >Vitals <a href="#">(5)</a><br />
  186. <input class="category_check" type="checkbox" name="categories" value="Others" checked >Others <a href="#">(54)</a><br /><hr />
  187. <input id="submit_selected_categories" type="submit" value="OK" ><a href="#" class="align_to_right">Cancel</a>
  188. </div>
  189. </div>
  190. </div>
  191. <div class="dropdown">
  192. <div class="inside_categories_filter">
  193. <span class="dropdown-name" id="time_label">
  194. <a href="#" class="filter_method" id="time_anchor">Any Time</a>
  195. <i class="icon-sort-down" id="icon-arrow-dropdown"></i>
  196. </span>
  197. <div class="filter_categories">
  198. <hr />
  199. <a class="single_filter_option" onclick="time_filter(1, 'Last Day')">Last Day</a>
  200. <a class="single_filter_option" onclick="time_filter(7, 'Last Week')">Last Week</a>
  201. <a class="single_filter_option" onclick="time_filter(14, 'Last 2 Weeks')">Last 2 Weeks</a>
  202. <a class="single_filter_option" onclick="time_filter(31, 'Last Month')">Last Month</a>
  203. <a class="single_filter_option" onclick="time_filter(93, 'Last 3 Months')">Last 3 Months</a>
  204. <a class="single_filter_option" onclick="time_filter(183, 'Last 6 Months')">Last 6 Months</a>
  205. <a class="single_filter_option" onclick="time_filter(365, 'Last Year')">Last Year</a>
  206. <a class="single_filter_option" onclick="refresh_data()">Any Time</a>
  207. </div>
  208. </div>
  209. </div>
  210. <div class="dropdown">
  211. <div class="inside_categories_filter">
  212. <span class="dropdown-name" id="categories_label">
  213. <a href="#" class="filter_method" id="location_anchor">All Locations</a>
  214. <i class="icon-sort-down" id="icon-arrow-dropdown"></i>
  215. </span>
  216. <div class="filter_categories" id="locationOptions">
  217.  
  218. </div>
  219. </div>
  220. </div>
  221. <div class="dropdown">
  222. <div class="inside_categories_filter">
  223. <span class="dropdown-name" id="categories_label">
  224. <a href="#" class="filter_method" id="provider_anchor">All Providers</a>
  225. <i class="icon-sort-down" id="icon-arrow-dropdown"></i>
  226. </span>
  227. <div class="filter_categories" id="providersOptions">
  228.  
  229. </div>
  230. </div>
  231. </div>
  232. <div class="dropdown">
  233. <div class="inside_categories_filter">
  234. <span class="dropdown-name" id="categories_label">
  235. <a href="#" class="filter_method" id="dataType_anchor">All Data Types</a>
  236. <i class="icon-sort-down" id="icon-arrow-dropdown"></i>
  237. </span>
  238. <div class="filter_categories" id="datatypesOptions">
  239.  
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. </div>
  245. ${ ui.includeFragment("chartsearch", "main_results") }
  246. </form>
  247. </div>
  248. </section>
  249. </article>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement