MS_View_Adminbar

Renders Admin Bar's simulation.

Defined (1)

The class is defined in the following location(s).

/app/view/class-ms-view-adminbar.php  
  1. class MS_View_Adminbar extends MS_View { 
  2.  
  3. /** 
  4. * Overrides parent's to_html() method. 
  5. * @since 1.0.0 
  6. * @return string 
  7. */ 
  8. public function to_html() { 
  9. $fields = $this->prepare_fields(); 
  10. $sim = $this->data['subscription']; 
  11. $mem = $sim->get_membership(); 
  12. $pay_types = $mem->get_payment_types(); 
  13.  
  14. if ( is_admin() ) { 
  15. $toggle_icon = 'dashicons-arrow-down'; 
  16. $toggle_state = 'collapsed'; 
  17. } else { 
  18. $toggle_icon = 'dashicons-arrow-up'; 
  19. $toggle_state = ''; 
  20.  
  21. $details = lib3()->session->get( 'ms-access' ); 
  22. $denied_url = false; 
  23. $deciding_membership = false; 
  24. $deciding_rule = false; 
  25.  
  26. if ( isset( $details[1] ) && ! $details[1]['has_access'] ) { 
  27. if ( ! empty( $details[1]['url'] ) ) { 
  28. $denied_url = $details[1]['url']; 
  29. if ( ! empty( $details[1]['deciding_membership'] ) ) { 
  30. $deciding_membership = $details[1]['deciding_membership']; 
  31. if ( ! empty( $details[1]['deciding_rule'] ) ) { 
  32. $deciding_rule = $details[1]['deciding_rule']; 
  33. } elseif ( isset( $details[0] ) && $details[0]['has_access'] ) { 
  34. if ( ! empty( $details[0]['deciding_membership'] ) ) { 
  35. $deciding_membership = $details[0]['deciding_membership']; 
  36. if ( ! empty( $details[0]['deciding_rule'] ) ) { 
  37. $deciding_rule = $details[0]['deciding_rule']; 
  38.  
  39. ob_start(); 
  40. $this->output_scripts(); 
  41. ?> 
  42. <div class="ms-sim-info <?php echo esc_attr( $toggle_state ); ?>"> 
  43. <div class="ms-sim-block"> 
  44. <h4 class="toggle-wrap"> 
  45. <?php _e( 'Simulation Overview', 'membership2' ); ?> 
  46. <span class="toggle"><i class="dashicons <?php echo esc_attr( $toggle_icon ); ?>"></i></span> 
  47. </h4> 
  48. <div class="ms-sim-body"> 
  49. <form id="view-site-as" method="POST" class="inside"> 
  50. <table cellspacing="0" cellpadding="0" width="100%" border="0"> 
  51. <tr> 
  52. <th><?php _e( 'View as', 'membership2' ); ?></th> 
  53. <td><?php MS_Helper_Html::html_element( $fields['membership_id'] ) ?></td> 
  54. </tr> 
  55. <?php if ( $this->data['datepicker'] ) : ?> 
  56. <tr> 
  57. <th><?php _e( 'View on', 'membership2' ); ?></th> 
  58. <td><?php MS_Helper_Html::html_element( $fields['simulate_date'] ) ?></td> 
  59. </tr> 
  60. <?php endif; ?> 
  61. <tr> 
  62. <th> </th> 
  63. <td><button class="button"><?php _e( 'Update', 'membership2' ); ?></button></td> 
  64. </tr> 
  65. </table> 
  66. <?php 
  67. MS_Helper_Html::html_element( $fields['action_field'] ); 
  68. MS_Helper_Html::html_element( $fields['nonce_field'] ); 
  69. ?> 
  70. </form> 
  71.  
  72. <h4 class="inside"> 
  73. <?php _e( 'Simulated Membership', 'membership2' ); ?> 
  74. </h4> 
  75. <table cellspacing="0" cellpadding="0" width="100%" border="0" class="inside"> 
  76. <tr> 
  77. <th><?php _e( 'Membership', 'membership2' ); ?></th> 
  78. <td style="white-space: nowrap"><?php echo esc_html( $mem->name ); ?></td> 
  79. </tr> 
  80. <tr> 
  81. <th><?php _e( 'Type', 'membership2' ); ?></th> 
  82. <td><?php echo esc_html( $mem->get_type_description() ); ?></td> 
  83. </tr> 
  84. <tr> 
  85. <th><?php _e( 'Start Date', 'membership2' ); ?></th> 
  86. <td><?php echo esc_html( $sim->start_date ); ?></td> 
  87. </tr> 
  88. <tr> 
  89. <th><?php _e( 'Expire Date', 'membership2' ); ?></th> 
  90. <td><?php echo esc_html( $sim->expire_date ); ?></td> 
  91. </tr> 
  92. <?php if ( $this->data['datepicker'] ) : ?> 
  93. <tr> 
  94. <th><?php _e( 'Simulated Date', 'membership2' ); ?></th> 
  95. <td><?php echo esc_html( MS_Helper_Period::current_date() ); ?></td> 
  96. </tr> 
  97. <?php endif; ?> 
  98. <tr> 
  99. <th><?php _e( 'Status', 'membership2' ); ?></th> 
  100. <td><?php 
  101. if ( MS_Model_Relationship::STATUS_ACTIVE == $sim->status ) { 
  102. $status_class = 'ms-sim-active'; 
  103. } else { 
  104. $status_class = 'ms-sim-inactive'; 
  105. printf( 
  106. '<span class="%1$s">%2$s</span>',  
  107. $status_class,  
  108. $sim->status 
  109. ); 
  110. ?></td> 
  111. </tr> 
  112. <tr> 
  113. <th><?php _e( 'Payment model', 'membership2' ); ?></th> 
  114. <td><?php echo esc_html( $pay_types[ $mem->payment_type ] ); ?></td> 
  115. </tr> 
  116. <tr> 
  117. <th><?php _e( 'Payment details', 'membership2' ); ?></th> 
  118. <td><?php echo esc_html( strip_tags( $sim->get_payment_description( null, true ) ) ); ?></td> 
  119. </tr> 
  120. </table> 
  121. </div> 
  122. <div class="ms-sim-footer"> 
  123. <div class="inside"> 
  124. <?php $this->output_deciding_info( $denied_url, $deciding_membership, $deciding_rule ); ?> 
  125. </div> 
  126. <?php MS_Helper_Html::html_element( $fields['exit_button'] ); ?> 
  127. </div> 
  128. </div> 
  129. </div> 
  130. <?php 
  131. $html = ob_get_clean(); 
  132.  
  133. return apply_filters( 
  134. 'ms_view_admin_bar_to_html',  
  135. $html,  
  136. $this 
  137. ); 
  138.  
  139. /** 
  140. * Prepare html fields. 
  141. * @since 1.0.0 
  142. * @return array 
  143. */ 
  144. public function prepare_fields() { 
  145. // The ID of the main system membership. 
  146. $base_id = MS_Model_Membership::get_base()->id; 
  147. $sorted_memberships = array(); 
  148. $memberships = MS_Model_Membership::get_memberships( 
  149. array( 'include_base' => 1 ) 
  150. ); 
  151.  
  152. foreach ( $memberships as $membership ) { 
  153. if ( $base_id == $membership->id ) { 
  154. $label = __( '- No membership / Visitor -', 'membership2' ); 
  155. } else { 
  156. $label = $membership->name; 
  157. if ( ! $membership->active ) { 
  158. $label .= ' ' . __( '(Inactive)', 'membership2' ); 
  159.  
  160. $sorted_memberships[ $membership->id ] = $label; 
  161. asort( $sorted_memberships ); 
  162.  
  163. $fields = array( 
  164. 'exit_button' => array( 
  165. 'type' => MS_Helper_Html::TYPE_HTML_LINK,  
  166. 'value' => __( 'Exit Test Mode', 'membership2' ),  
  167. 'url' => MS_Controller_Adminbar::get_simulation_exit_url(),  
  168. 'class' => 'button',  
  169. ),  
  170.  
  171. 'action_field' => array( 
  172. 'name' => 'action',  
  173. 'value' => 'ms_simulate',  
  174. 'type' => MS_Helper_Html::INPUT_TYPE_HIDDEN,  
  175. ),  
  176.  
  177. 'membership_id' => array( 
  178. 'id' => 'ab-membership-id',  
  179. 'name' => 'membership_id',  
  180. 'value' => $this->data['membership_id'],  
  181. 'type' => MS_Helper_Html::INPUT_TYPE_SELECT,  
  182. 'field_options' => $sorted_memberships,  
  183. ),  
  184.  
  185. 'nonce_field' => array( 
  186. 'id' => '_wpnonce',  
  187. 'value' => wp_create_nonce( 'ms_simulate' ),  
  188. 'type' => MS_Helper_Html::INPUT_TYPE_HIDDEN,  
  189. ),  
  190.  
  191. 'simulate_date' => array( 
  192. 'id' => 'simulate_date',  
  193. 'type' => MS_Helper_Html::INPUT_TYPE_DATEPICKER,  
  194. 'value' => $this->data['simulate_date'],  
  195. 'class' => 'ms-admin-bar-date ms-date',  
  196. ),  
  197.  
  198. 'simulate_submit' => array( 
  199. 'id' => 'simulate_submit',  
  200. 'type' => MS_Helper_Html::INPUT_TYPE_SUBMIT,  
  201. 'value' => __( 'Go', 'membership2' ),  
  202. 'class' => 'ms-admin-bar-submit',  
  203. ),  
  204. ); 
  205.  
  206. return apply_filters( 
  207. 'ms_view_admin_bar_prepare_fields',  
  208. $fields,  
  209. $this 
  210. ); 
  211.  
  212. /** 
  213. * Output details on which membership denied or allowed access to the 
  214. * current page 
  215. * @since 1.0.0 
  216. * @param string $denied_url URL of the denied page (empty if not denied) 
  217. * @param int $membership_id Membership_id 
  218. * @param array $rules List of Rule_types 
  219. */ 
  220. protected function output_deciding_info( $denied_url, $membership_id, $rules ) { 
  221. $membership = MS_Factory::load( 'MS_Model_Membership', $membership_id ); 
  222. $rule_title = MS_Model_Rule::get_rule_type_titles(); 
  223.  
  224. if ( ! empty( $denied_url ) ) { ?> 
  225. <div class="ms-sim-denied"> 
  226. <?php 
  227. printf( 
  228. __( 'Access denied by %s', 'membership2' ),  
  229. '<b>' . esc_html( $membership->name ) . '</b>' 
  230. ); 
  231. ?> 
  232. </div> 
  233. <ul class="ms-sim-rules"> 
  234. <?php 
  235. printf( 
  236. '<li><a href="%1$s">%1$s</a></li>',  
  237. $denied_url 
  238. ); 
  239. foreach ( $rules as $rule_type ) { 
  240. printf( 
  241. '<li><a href="%1$s" target="_blank">%3$s %2$s</a></li>',  
  242. MS_Controller_Plugin::get_admin_url( 
  243. 'protection',  
  244. array( 
  245. 'tab' => $rule_type,  
  246. 'membership_id' => $membership->id,  
  247. ),  
  248. $rule_title[$rule_type],  
  249. __( 'Denied by Rule:', 'membership2' ) 
  250. ); 
  251. ?> 
  252. <?php } elseif ( $membership->is_valid() ) { ?> 
  253. <div class="ms-sim-allowed"> 
  254. <?php 
  255. printf( 
  256. __( 'Access granted by %s', 'membership2' ),  
  257. '<b>' . esc_html( $membership->name ) . '</b>' 
  258. ); 
  259. ?> 
  260. </div> 
  261. <ul class="ms-sim-rules"> 
  262. <?php 
  263. foreach ( $rules as $rule_type ) { 
  264. printf( 
  265. '<li><a href="%1$s" target="_blank">%3$s %2$s</a></li>',  
  266. MS_Controller_Plugin::get_admin_url( 
  267. 'protection',  
  268. array( 
  269. 'tab' => $rule_type,  
  270. 'membership_id' => $membership->id,  
  271. ),  
  272. $rule_title[$rule_type],  
  273. __( 'Allowed by Rule:', 'membership2' ) 
  274. ); 
  275. ?> 
  276. </ul> 
  277. <?php } else { ?> 
  278. <div class="ms-sim-public"> 
  279. <?php _e( 'Unprotected', 'membership2' ); ?> 
  280. </div> 
  281. <?php 
  282.  
  283. /** 
  284. * Output the JS and CSS needed for simulation infos 
  285. * @since 1.0.0 
  286. */ 
  287. protected function output_scripts() { 
  288. ?> 
  289. <style> 
  290. .ms-sim-info { 
  291. position: fixed; 
  292. top: 40px; 
  293. right: 10px; 
  294. border: 1px solid rgba( 224, 102, 102, 0.5 ); 
  295. box-shadow: 0 1px 2px rgba(128, 0, 0, 0.15); 
  296. padding: 0; 
  297. font: 13px sans-serif; 
  298. width: 360px; 
  299. z-index: 999999; 
  300. overflow: auto; 
  301. bottom: 20px; 
  302. opacity: 0.8; 
  303. .ms-sim-info:hover { 
  304. border-color: #E06666; 
  305. opacity: 1; 
  306. .ms-sim-info:hover .ms-sim-block { 
  307. opacity: 1; 
  308. background: #FCE0E0; 
  309. .ms-sim-info .ms-sim-block { 
  310. background: #FFF; 
  311. opacity: 0.4; 
  312. min-height: 100%; 
  313. padding: 45px 10px 10px; 
  314. box-sizing: border-box; 
  315. .ms-sim-info select,  
  316. .ms-sim-info input { 
  317. font-size: 13px; 
  318. margin: 0; 
  319. line-height: 20px; 
  320. padding: 2px 10px; 
  321. height: 26px; 
  322. border: 1px solid #CCC; 
  323. background: #FFF; 
  324. color: #444; 
  325. border-radius: 0; 
  326. font-family: sans-serif; 
  327. box-sizing: border-box; 
  328. vertical-align: middle; 
  329. .ms-sim-info h4 { 
  330. padding: 0; 
  331. margin: -10px -10px 10px -10px; 
  332. border-bottom: 1px solid rgba(0, 0, 0, 0.2); 
  333. background: #FFF; 
  334. color: #C00; 
  335. text-align: center; 
  336. font-weight: bold; 
  337. height: 34px; 
  338. line-height: 34px; 
  339. position: relative; 
  340. .ms-sim-info h4.toggle-wrap { 
  341. cursor: pointer; 
  342. position: fixed; 
  343. top: 40px; 
  344. right: 10px; 
  345. width: 360px; 
  346. margin: 0; 
  347. z-index: 10; 
  348. .ms-sim-info h4 .toggle { 
  349. position: absolute; 
  350. right: 0; 
  351. top: 0; 
  352. bottom: 0; 
  353. width: 34px; 
  354. color: #AAA; 
  355. .ms-sim-info h4 .toggle .dashicons { 
  356. margin: 7px; 
  357. .ms-sim-info h4.inside { 
  358. border-top: 1px solid #E06666; 
  359. margin-top: 0; 
  360. background: rgba(255, 255, 255, 0.75); 
  361. .ms-sim-info.collapsed { 
  362. bottom: auto; 
  363. .ms-sim-info.collapsed .inside { 
  364. display: none; 
  365. .ms-sim-info table { 
  366. margin: 0 0 20px 0; 
  367. padding: 0; 
  368. border: 0; 
  369. .ms-sim-info td,  
  370. .ms-sim-info th { 
  371. padding: 5px; 
  372. border: 0; 
  373. background: transparent; 
  374. text-align: left; 
  375. .ms-sim-info th { 
  376. width: 40%; 
  377. .ms-sim-info td { 
  378. width: 60%; 
  379. .ms-sim-info table tr:nth-child(odd) td,  
  380. .ms-sim-info table tr:nth-child(odd) th { 
  381. background: rgba(0, 0, 0, 0.05); 
  382. .ms-sim-info .button { 
  383. display: inline-block; 
  384. text-decoration: none; 
  385. font-size: 13px; 
  386. line-height: 28px; 
  387. height: 28px; 
  388. margin: 0; 
  389. padding: 0 10px 1px; 
  390. cursor: pointer; 
  391. border-width: 1px; 
  392. border-style: solid; 
  393. -webkit-appearance: none; 
  394. -webkit-border-radius: 3px; 
  395. border-radius: 3px; 
  396. white-space: nowrap; 
  397. -webkit-box-sizing: border-box; 
  398. -moz-box-sizing: border-box; 
  399. box-sizing: border-box; 
  400. box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 0, 0, 0.08 ); 
  401. vertical-align: top; 
  402. background: #fafafa; 
  403. border-color: #999; 
  404. color: #222; 
  405. .ms-sim-info .ms-sim-public,  
  406. .ms-sim-info .ms-sim-denied,  
  407. .ms-sim-info .ms-sim-allowed { 
  408. padding: 5px; 
  409. color: #FFF; 
  410. text-align: center; 
  411. background: rgba(0, 128, 0, 0.4); 
  412. margin-bottom: 5px; 
  413. .ms-sim-info .ms-sim-denied { 
  414. background: #C33; 
  415. .ms-sim-info .ms-sim-active { 
  416. color: #060; 
  417. .ms-sim-info .ms-sim-inactive { 
  418. color: #F00; 
  419. font-weight: bold; 
  420. .ms-sim-info .ms-sim-rules { 
  421. margin: 0 0 20px 0; 
  422. padding: 0; 
  423. list-style: none; 
  424. .ms-sim-info .ms-sim-rules li { 
  425. padding: 3px 10px; 
  426. margin: 0; 
  427. display: block; 
  428.  
  429. .ui-datepicker { 
  430. width: 17em; 
  431. padding: .2em .2em 0; 
  432. display: none; 
  433. .ui-datepicker .ui-datepicker-header { 
  434. position: relative; 
  435. padding: .2em 0; 
  436. .ui-datepicker .ui-datepicker-prev,  
  437. .ui-datepicker .ui-datepicker-next { 
  438. position: absolute; 
  439. top: 2px; 
  440. width: 1.8em; 
  441. height: 1.8em; 
  442. .ui-datepicker .ui-datepicker-prev-hover,  
  443. .ui-datepicker .ui-datepicker-next-hover { 
  444. top: 1px; 
  445. .ui-datepicker .ui-datepicker-prev { 
  446. left: 2px; 
  447. .ui-datepicker .ui-datepicker-next { 
  448. right: 2px; 
  449. .ui-datepicker .ui-datepicker-prev-hover { 
  450. left: 1px; 
  451. .ui-datepicker .ui-datepicker-next-hover { 
  452. right: 1px; 
  453. .ui-datepicker .ui-datepicker-title { 
  454. margin: 0 2.3em; 
  455. line-height: 1.8em; 
  456. text-align: center; 
  457. .ui-datepicker .ui-datepicker-title select { 
  458. font-size: 1em; 
  459. margin: 1px 0; 
  460. .ui-datepicker select.ui-datepicker-month,  
  461. .ui-datepicker select.ui-datepicker-year { 
  462. width: 49%; 
  463. .ui-datepicker table { 
  464. width: 100%; 
  465. font-size: .9em; 
  466. border-collapse: collapse; 
  467. margin: 0 0 .4em; 
  468. .ui-datepicker th { 
  469. padding: .7em .3em; 
  470. text-align: center; 
  471. font-weight: bold; 
  472. border: 0; 
  473. .ui-datepicker td { 
  474. border: 0; 
  475. padding: 1px; 
  476. .ui-datepicker td span,  
  477. .ui-datepicker td a { 
  478. display: block; 
  479. padding: .2em; 
  480. text-align: right; 
  481. text-decoration: none; 
  482. .ui-datepicker .ui-datepicker-buttonpane { 
  483. background-image: none; 
  484. margin: .7em 0 0 0; 
  485. padding: 0 .2em; 
  486. border-left: 0; 
  487. border-right: 0; 
  488. border-bottom: 0; 
  489. .ui-datepicker .ui-datepicker-buttonpane button { 
  490. float: right; 
  491. margin: .5em .2em .4em; 
  492. cursor: pointer; 
  493. padding: .2em .6em .3em .6em; 
  494. width: auto; 
  495. overflow: visible; 
  496. .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { 
  497. float: left; 
  498. .wpmui-datepicker-wrapper { 
  499. display: inline-block; 
  500. position: relative; 
  501. .wpmui-datepicker-wrapper .wpmui-icon { 
  502. position: absolute; 
  503. right: 0; 
  504. top: 0; 
  505. height: 28px; 
  506. width: 21px; 
  507. line-height: 28px; 
  508. text-align: left; 
  509. opacity: .5; 
  510. cursor: pointer; 
  511. color: #444; 
  512. .ui-datepicker.wpmui-datepicker { 
  513. padding: 0; 
  514. border: none; 
  515. background: transparent; 
  516. z-index: 20; 
  517. width: 250px; 
  518. .ui-datepicker.wpmui-datepicker .ui-datepicker-header,  
  519. .ui-datepicker.wpmui-datepicker.ui-corner-all { 
  520. border-radius: 0; 
  521. .ui-datepicker.wpmui-datepicker .ui-datepicker-prev,  
  522. .ui-datepicker.wpmui-datepicker .ui-datepicker-prev.ui-state-hover,  
  523. .ui-datepicker.wpmui-datepicker .ui-datepicker-next,  
  524. .ui-datepicker.wpmui-datepicker .ui-datepicker-next.ui-state-hover,  
  525. .ui-datepicker.wpmui-datepicker .ui-datepicker-title { 
  526. line-height: 2.5em; 
  527. height: 2.5em; 
  528. padding: 0; 
  529. border: 0; 
  530. background: transparent; 
  531. .ui-datepicker.wpmui-datepicker .ui-datepicker-prev.ui-datepicker-prev-hover { 
  532. top: 2px; 
  533. left: 2px; 
  534. .ui-datepicker.wpmui-datepicker .ui-datepicker-next.ui-datepicker-next-hover { 
  535. top: 2px; 
  536. right: 2px; 
  537. .ui-datepicker .ui-datepicker-prev span,  
  538. .ui-datepicker .ui-datepicker-next span { 
  539. display: block; 
  540. position: absolute; 
  541. left: 50%; 
  542. margin-left: -8px; 
  543. top: 50%; 
  544. margin-top: -8px; 
  545. .ui-icon-circle-triangle-e { 
  546. background-position: -48px -192px; 
  547. .ui-icon-circle-triangle-w { 
  548. background-position: -80px -192px; 
  549. .ui-datepicker.wpmui-datepicker .ui-icon { 
  550. width: 16px; 
  551. height: 16px; 
  552. text-indent: -99999px; 
  553. overflow: hidden; 
  554. background-repeat: no-repeat; 
  555. background-image: url(<?php echo MS_Plugin::instance()->url; ?>/app/assets/images/ui-icons-white.png); 
  556. cursor: pointer; 
  557. .ui-datepicker.wpmui-datepicker .ui-datepicker-header { 
  558. border: none; 
  559. background: #4F83AA; 
  560. color: #FFFFFF; 
  561. font-size: 0.9em; 
  562. font-weight: normal; 
  563. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody td a,  
  564. .ui-datepicker.wpmui-datepicker td span,  
  565. .ui-datepicker.wpmui-datepicker td a { 
  566. padding: 8px; 
  567. text-align: center; 
  568. text-decoration: none; 
  569. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar { 
  570. padding: 0; 
  571. background: #375D7A; 
  572. width: 250px; 
  573. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar thead th { 
  574. padding: 3px 5px; 
  575. font-size: 0.75em; 
  576. font-weight: normal; 
  577. color: #FFFFFF; 
  578. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-state-default,  
  579. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-widget-content .ui-state-default,  
  580. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-widget-header .ui-state-default { 
  581. border: 0; 
  582. background: #223D52; 
  583. color: #FFFFFF; 
  584. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-state-active,  
  585. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-widget-content .ui-state-active,  
  586. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-widget-header .ui-state-active,  
  587. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-state-hover,  
  588. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-widget-content .ui-state-hover,  
  589. .ui-datepicker.wpmui-datepicker .ui-datepicker-calendar tbody .ui-widget-header .ui-state-hover { 
  590. background: #4F83AA; 
  591. .wpmui-datepicker { 
  592. z-index: 1000000 !important; 
  593. </style> 
  594. <script> 
  595. jQuery(function() { 
  596. jQuery( '.ms-sim-info .toggle-wrap' ).click(function() { 
  597. var el = jQuery( this ); 
  598. el.find( '.dashicons' ).toggleClass( 'dashicons-arrow-up dashicons-arrow-down' ); 
  599. el.closest( '.ms-sim-info' ).toggleClass( 'collapsed' ); 
  600. }); 
  601. }); 
  602. </script> 
  603. <?php