fix detail in CXGN::Dataset documentation...
[sgn.git] / mason / cookie_popup.mas
blob517df75bf25c67b510a7165aec12470a20c436d8
2 <div id="cookie_popup" name="cookie_popup" style="display:none">
3     <div class="container-fluid">
4         <div id="cookie_popup_content_div">
5             <div class="panel panel-danger">
6                 <div class="panel-body bg-danger">
7                     <div class="row">
8                         <div class="col-sm-10">
9                             <p>This site uses cookies to provide logins and other features. Please accept the use of cookies by clicking Accept.</p>
10                         </div>
11                         <div class="col-sm-2">
12                             <button class="btn btn-primary btn-sm" id="cookie_agree_submit">Accept</button>
13                         </div>
14                     </div>
15                 </div>
16             </div>
17         </div>
18     </div>
19 </div>
23 <script>
25     jQuery(document).ready(function(){
27         jQuery('#cookie_agree_submit').click( function () {
28             var expDate = new Date();
29             expDate.setTime(expDate.getTime() + (50000 * 60 * 1000)); //about 30 days
30             jQuery.cookie("cookies_approved", "1", { expires: expDate, path: '/' } );
31             jQuery('#cookie_popup_content_div').html('<div class="panel panel-success"><div class="panel-body bg-success"><center><h3>Thank you :-)</h3></center></div></div>');
32             setTimeout(function() {
33                 jQuery('#cookie_popup').hide('slow');
34             }, 1500);
35         });
37         if (jQuery.cookie("cookies_approved") == 1) {
38             jQuery('#cookie_popup').hide();
39         } else {
40             jQuery('#cookie_popup').show();
41         }
42     })
44 </script>