annotate DataTables-1.9.4/docs/media/js/doc.js @ 9:7300ed4c1481 draft default tip

Uploaded
author saskia-hiltemann
date Mon, 04 Sep 2017 10:49:00 -0400
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 (function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 var showingNav = true;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6 $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 var jqNav = $('div.fw_nav');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 jqNav.css('right', ($(window).width() - $('div.fw_container').width()) /2);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 var n = $('div.nav_blocker')[0];
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 n.style.height = $(jqNav).outerHeight()+"px";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 n.style.width = ($(jqNav).outerWidth()+20)+"px";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 SyntaxHighlighter.highlight();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 $('#private_toggle').click( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 if ( $('input[name=show_private]').val() == 0 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 $('input[name=show_private]').val( 1 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 $('#private_label').html('Showing');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 $('.private').css('display', 'block');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 } else {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 $('input[name=show_private]').val( 0 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 $('#private_label').html('Hiding');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 $('.private').css('display', 'none');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 fnWriteCookie();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 return false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30 $('#extended_toggle').click( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 if ( $('input[name=show_extended]').val() == 0 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 $('input[name=show_extended]').val( 1 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 $('#extended_label').html('Showing');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 $('.augmented').css('display', 'block');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 } else {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 $('input[name=show_extended]').val( 0 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 $('#extended_label').html('Hiding');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 $('.augmented').css('display', 'none');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 fnWriteCookie();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 return false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 var savedHeight = $(jqNav).height();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 $('div.fw_nav h2').click( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 if ( showingNav ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 $('div.fw_nav').animate( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 "height": 10,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 "opacity": 0.3
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 showingNav = false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 } else {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 $('div.fw_nav').animate( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 "height": savedHeight,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 "opacity": 1
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57 showingNav = true;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 fnWriteCookie();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62 var cookie = fnReadCookie( 'SpryMedia_JSDoc' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 if ( cookie != null ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64 var a = cookie.split('-');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 if ( a[0] == 1 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66 $('#private_toggle').click();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68 if ( a[1] == 0 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69 $('#extended_toggle').click();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 if ( a[2] == 'false' ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 $('div.fw_nav').css('height', 10).css('opacity', 0.3);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 showingNav = false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 function fnWriteCookie()
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81 var sVal =
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 $('input[name=show_private]').val()+'-'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 $('input[name=show_extended]').val()+'-'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84 showingNav;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 fnCreateCookie( 'SpryMedia_JSDoc', sVal );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
88
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
89
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
90 function fnCreateCookie( sName, sValue )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
91 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
92 var iDays = 365;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
93 var date = new Date();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
94 date.setTime( date.getTime()+(iDays*24*60*60*1000) );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
95 var sExpires = "; expires="+date.toGMTString();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
96
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
97 document.cookie = sName+"="+sValue+sExpires+"; path=/";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
98 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
99
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
100
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
101 function fnReadCookie( sName )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
102 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
103 var sNameEQ = sName + "=";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
104 var sCookieContents = document.cookie.split(';');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
105
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
106 for( var i=0 ; i<sCookieContents.length ; i++ ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
107 var c = sCookieContents[i];
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
108
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
109 while (c.charAt(0)==' ') {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
110 c = c.substring(1,c.length);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
111 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
112
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
113 if (c.indexOf(sNameEQ) == 0) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
114 return c.substring(sNameEQ.length,c.length);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
115 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
116 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
117
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
118 return null;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
119 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
120
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
121 })();