netlinx-workspace 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/NetLinx.html +39 -39
- data/doc/NetLinx/Compile.html +38 -38
- data/doc/NetLinx/Compile/Extension.html +38 -38
- data/doc/NetLinx/Compile/Extension/APW.html +49 -48
- data/doc/NetLinx/Project.html +74 -73
- data/doc/NetLinx/Rake.html +38 -38
- data/doc/NetLinx/Rake/Workspace.html +38 -38
- data/doc/NetLinx/Rake/Workspace/CreateWorkspaceConfig.html +50 -49
- data/doc/NetLinx/Rake/Workspace/GenerateAPW.html +51 -50
- data/doc/NetLinx/System.html +97 -96
- data/doc/NetLinx/SystemFile.html +66 -65
- data/doc/NetLinx/Workspace.html +76 -75
- data/doc/NetLinx/Workspace/YAML.html +52 -51
- data/doc/_index.html +28 -31
- data/doc/class_list.html +24 -31
- data/doc/created.rid +7 -0
- data/doc/css/full_list.css +32 -31
- data/doc/css/style.css +251 -91
- data/doc/file.README.html +28 -31
- data/doc/file.license.html +28 -31
- data/doc/file_list.html +29 -31
- data/doc/frames.html +7 -16
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +28 -31
- data/doc/js/app.js +106 -77
- data/doc/js/darkfish.js +155 -0
- data/doc/js/full_list.js +170 -135
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/method_list.html +373 -239
- data/doc/rdoc.css +595 -0
- data/doc/table_of_contents.html +111 -0
- data/doc/top-level-namespace.html +34 -36
- metadata +53 -15
data/doc/js/app.js
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
var localStorage = {}, sessionStorage = {};
|
4
|
+
try { localStorage = window.localStorage; } catch (e) { }
|
5
|
+
try { sessionStorage = window.sessionStorage; } catch (e) { }
|
6
|
+
|
1
7
|
function createSourceLinks() {
|
2
8
|
$('.method_details_list .source_code').
|
3
9
|
before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
|
@@ -16,7 +22,7 @@ function createDefineLinks() {
|
|
16
22
|
$('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
|
17
23
|
$('.toggleDefines').toggle(function() {
|
18
24
|
tHeight = $(this).parent().prev().height();
|
19
|
-
$(this).prev().
|
25
|
+
$(this).prev().css('display', 'inline');
|
20
26
|
$(this).parent().prev().height($(this).parent().height());
|
21
27
|
$(this).text("(less)");
|
22
28
|
},
|
@@ -42,29 +48,39 @@ function createFullTreeLinks() {
|
|
42
48
|
});
|
43
49
|
}
|
44
50
|
|
45
|
-
function
|
46
|
-
$('dl.box dd.r1, dl.box dd.r2').each(function() {
|
47
|
-
$(this).prev().height($(this).height());
|
48
|
-
});
|
49
|
-
}
|
50
|
-
|
51
|
-
function searchFrameLinks() {
|
51
|
+
function searchFrameButtons() {
|
52
52
|
$('.full_list_link').click(function() {
|
53
53
|
toggleSearchFrame(this, $(this).attr('href'));
|
54
54
|
return false;
|
55
55
|
});
|
56
|
+
window.addEventListener('message', function(e) {
|
57
|
+
if (e.data === 'navEscape') {
|
58
|
+
$('#nav').slideUp(100);
|
59
|
+
$('#search a').removeClass('active inactive');
|
60
|
+
$(window).focus();
|
61
|
+
}
|
62
|
+
});
|
63
|
+
|
64
|
+
$(window).resize(function() {
|
65
|
+
if ($('#search:visible').length === 0) {
|
66
|
+
$('#nav').removeAttr('style');
|
67
|
+
$('#search a').removeClass('active inactive');
|
68
|
+
$(window).focus();
|
69
|
+
}
|
70
|
+
});
|
56
71
|
}
|
57
72
|
|
58
73
|
function toggleSearchFrame(id, link) {
|
59
|
-
var frame = $('#
|
74
|
+
var frame = $('#nav');
|
60
75
|
$('#search a').removeClass('active').addClass('inactive');
|
61
|
-
if (frame.attr('src')
|
76
|
+
if (frame.attr('src') === link && frame.css('display') !== "none") {
|
62
77
|
frame.slideUp(100);
|
63
78
|
$('#search a').removeClass('active inactive');
|
64
79
|
}
|
65
80
|
else {
|
66
81
|
$(id).addClass('active').removeClass('inactive');
|
67
|
-
frame.attr('src'
|
82
|
+
if (frame.attr('src') !== link) frame.attr('src', link);
|
83
|
+
frame.slideDown(100);
|
68
84
|
}
|
69
85
|
}
|
70
86
|
|
@@ -74,43 +90,10 @@ function linkSummaries() {
|
|
74
90
|
});
|
75
91
|
}
|
76
92
|
|
77
|
-
function framesInit() {
|
78
|
-
if (hasFrames) {
|
79
|
-
document.body.className = 'frames';
|
80
|
-
$('#menu .noframes a').attr('href', document.location);
|
81
|
-
try {
|
82
|
-
window.top.document.title = $('html head title').text();
|
83
|
-
} catch(error) {
|
84
|
-
// some browsers will not allow this when serving from file://
|
85
|
-
// but we don't want to stop the world.
|
86
|
-
}
|
87
|
-
}
|
88
|
-
else {
|
89
|
-
$('#menu .noframes a').text('frames').attr('href', framesUrl);
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
function keyboardShortcuts() {
|
94
|
-
if (window.top.frames.main) return;
|
95
|
-
$(document).keypress(function(evt) {
|
96
|
-
if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return;
|
97
|
-
if (typeof evt.target !== "undefined" &&
|
98
|
-
(evt.target.nodeName == "INPUT" ||
|
99
|
-
evt.target.nodeName == "TEXTAREA")) return;
|
100
|
-
switch (evt.charCode) {
|
101
|
-
case 67: case 99: $('#class_list_link').click(); break; // 'c'
|
102
|
-
case 77: case 109: $('#method_list_link').click(); break; // 'm'
|
103
|
-
case 70: case 102: $('#file_list_link').click(); break; // 'f'
|
104
|
-
default: break;
|
105
|
-
}
|
106
|
-
});
|
107
|
-
}
|
108
|
-
|
109
93
|
function summaryToggle() {
|
110
|
-
$('.summary_toggle').click(function() {
|
111
|
-
|
112
|
-
|
113
|
-
}
|
94
|
+
$('.summary_toggle').click(function(e) {
|
95
|
+
e.preventDefault();
|
96
|
+
localStorage.summaryCollapsed = $(this).text();
|
114
97
|
$('.summary_toggle').each(function() {
|
115
98
|
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
116
99
|
var next = $(this).parent().parent().nextAll('ul.summary').first();
|
@@ -132,18 +115,9 @@ function summaryToggle() {
|
|
132
115
|
});
|
133
116
|
return false;
|
134
117
|
});
|
135
|
-
if (localStorage) {
|
136
|
-
|
137
|
-
|
138
|
-
}
|
139
|
-
else localStorage.summaryCollapsed = "expand";
|
140
|
-
}
|
141
|
-
}
|
142
|
-
|
143
|
-
function fixOutsideWorldLinks() {
|
144
|
-
$('a').each(function() {
|
145
|
-
if (window.location.host != this.host) this.target = '_parent';
|
146
|
-
});
|
118
|
+
if (localStorage.summaryCollapsed == "collapse") {
|
119
|
+
$('.summary_toggle').first().click();
|
120
|
+
} else { localStorage.summaryCollapsed = "expand"; }
|
147
121
|
}
|
148
122
|
|
149
123
|
function generateTOC() {
|
@@ -185,7 +159,7 @@ function generateTOC() {
|
|
185
159
|
lastTag = thisTag;
|
186
160
|
});
|
187
161
|
if (!show) return;
|
188
|
-
html = '<div id="toc"><p class="title"><a
|
162
|
+
html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
|
189
163
|
$('#content').prepend(html);
|
190
164
|
$('#toc').append(_toc);
|
191
165
|
$('#toc .hide_toc').toggle(function() {
|
@@ -197,23 +171,78 @@ function generateTOC() {
|
|
197
171
|
$('#toc').toggleClass('hidden');
|
198
172
|
$('#toc .title small').toggle();
|
199
173
|
});
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
174
|
+
}
|
175
|
+
|
176
|
+
function navResizeFn(e) {
|
177
|
+
if (e.which !== 1) {
|
178
|
+
navResizeFnStop();
|
179
|
+
return;
|
180
|
+
}
|
181
|
+
|
182
|
+
sessionStorage.navWidth = e.pageX.toString();
|
183
|
+
$('.nav_wrap').css('width', e.pageX);
|
184
|
+
$('.nav_wrap').css('-ms-flex', 'inherit');
|
185
|
+
}
|
186
|
+
|
187
|
+
function navResizeFnStop() {
|
188
|
+
$(window).unbind('mousemove', navResizeFn);
|
189
|
+
window.removeEventListener('message', navMessageFn, false);
|
190
|
+
}
|
191
|
+
|
192
|
+
function navMessageFn(e) {
|
193
|
+
if (e.data.action === 'mousemove') navResizeFn(e.data.event);
|
194
|
+
if (e.data.action === 'mouseup') navResizeFnStop();
|
195
|
+
}
|
196
|
+
|
197
|
+
function navResizer() {
|
198
|
+
$('#resizer').mousedown(function(e) {
|
199
|
+
e.preventDefault();
|
200
|
+
$(window).mousemove(navResizeFn);
|
201
|
+
window.addEventListener('message', navMessageFn, false);
|
206
202
|
});
|
203
|
+
$(window).mouseup(navResizeFnStop);
|
204
|
+
|
205
|
+
if (sessionStorage.navWidth) {
|
206
|
+
navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
function navExpander() {
|
211
|
+
var done = false, timer = setTimeout(postMessage, 500);
|
212
|
+
function postMessage() {
|
213
|
+
if (done) return;
|
214
|
+
clearTimeout(timer);
|
215
|
+
var opts = { action: 'expand', path: pathId };
|
216
|
+
document.getElementById('nav').contentWindow.postMessage(opts, '*');
|
217
|
+
done = true;
|
218
|
+
}
|
219
|
+
|
220
|
+
window.addEventListener('message', function(event) {
|
221
|
+
if (event.data === 'navReady') postMessage();
|
222
|
+
return false;
|
223
|
+
}, false);
|
224
|
+
}
|
225
|
+
|
226
|
+
function mainFocus() {
|
227
|
+
var hash = window.location.hash;
|
228
|
+
if (hash !== '' && $(hash)[0]) {
|
229
|
+
$(hash)[0].scrollIntoView();
|
230
|
+
}
|
231
|
+
|
232
|
+
setTimeout(function() { $('#main').focus(); }, 10);
|
207
233
|
}
|
208
234
|
|
209
|
-
$(
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
235
|
+
$(document).ready(function() {
|
236
|
+
navResizer();
|
237
|
+
navExpander();
|
238
|
+
createSourceLinks();
|
239
|
+
createDefineLinks();
|
240
|
+
createFullTreeLinks();
|
241
|
+
searchFrameButtons();
|
242
|
+
linkSummaries();
|
243
|
+
summaryToggle();
|
244
|
+
generateTOC();
|
245
|
+
mainFocus();
|
246
|
+
});
|
247
|
+
|
248
|
+
})();
|
data/doc/js/darkfish.js
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* Darkfish Page Functions
|
4
|
+
* $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
|
5
|
+
*
|
6
|
+
* Author: Michael Granger <mgranger@laika.com>
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
|
10
|
+
/* Provide console simulation for firebug-less environments */
|
11
|
+
if (!("console" in window) || !("firebug" in console)) {
|
12
|
+
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
13
|
+
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
14
|
+
|
15
|
+
window.console = {};
|
16
|
+
for (var i = 0; i < names.length; ++i)
|
17
|
+
window.console[names[i]] = function() {};
|
18
|
+
};
|
19
|
+
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Unwrap the first element that matches the given @expr@ from the targets and return them.
|
23
|
+
*/
|
24
|
+
$.fn.unwrap = function( expr ) {
|
25
|
+
return this.each( function() {
|
26
|
+
$(this).parents( expr ).eq( 0 ).after( this ).remove();
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
30
|
+
|
31
|
+
function showSource( e ) {
|
32
|
+
var target = e.target;
|
33
|
+
var codeSections = $(target).
|
34
|
+
parents('.method-detail').
|
35
|
+
find('.method-source-code');
|
36
|
+
|
37
|
+
$(target).
|
38
|
+
parents('.method-detail').
|
39
|
+
find('.method-source-code').
|
40
|
+
slideToggle();
|
41
|
+
};
|
42
|
+
|
43
|
+
function hookSourceViews() {
|
44
|
+
$('.method-heading').click( showSource );
|
45
|
+
};
|
46
|
+
|
47
|
+
function toggleDebuggingSection() {
|
48
|
+
$('.debugging-section').slideToggle();
|
49
|
+
};
|
50
|
+
|
51
|
+
function hookDebuggingToggle() {
|
52
|
+
$('#debugging-toggle img').click( toggleDebuggingSection );
|
53
|
+
};
|
54
|
+
|
55
|
+
function hookTableOfContentsToggle() {
|
56
|
+
$('.indexpage li .toc-toggle').each( function() {
|
57
|
+
$(this).click( function() {
|
58
|
+
$(this).toggleClass('open');
|
59
|
+
});
|
60
|
+
|
61
|
+
var section = $(this).next();
|
62
|
+
|
63
|
+
$(this).click( function() {
|
64
|
+
section.slideToggle();
|
65
|
+
});
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
function hookSearch() {
|
70
|
+
var input = $('#search-field').eq(0);
|
71
|
+
var result = $('#search-results').eq(0);
|
72
|
+
$(result).show();
|
73
|
+
|
74
|
+
var search_section = $('#search-section').get(0);
|
75
|
+
$(search_section).show();
|
76
|
+
|
77
|
+
var search = new Search(search_data, input, result);
|
78
|
+
|
79
|
+
search.renderItem = function(result) {
|
80
|
+
var li = document.createElement('li');
|
81
|
+
var html = '';
|
82
|
+
|
83
|
+
// TODO add relative path to <script> per-page
|
84
|
+
html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
|
85
|
+
if (result.params)
|
86
|
+
html += '<span class="params">' + result.params + '</span>';
|
87
|
+
html += '</a>';
|
88
|
+
|
89
|
+
|
90
|
+
if (result.namespace)
|
91
|
+
html += '<p class="search-namespace">' + this.hlt(result.namespace);
|
92
|
+
|
93
|
+
if (result.snippet)
|
94
|
+
html += '<div class="search-snippet">' + result.snippet + '</div>';
|
95
|
+
|
96
|
+
li.innerHTML = html;
|
97
|
+
|
98
|
+
return li;
|
99
|
+
}
|
100
|
+
|
101
|
+
search.select = function(result) {
|
102
|
+
var result_element = result.get(0);
|
103
|
+
window.location.href = result_element.firstChild.firstChild.href;
|
104
|
+
}
|
105
|
+
|
106
|
+
search.scrollIntoView = search.scrollInWindow;
|
107
|
+
};
|
108
|
+
|
109
|
+
function highlightTarget( anchor ) {
|
110
|
+
console.debug( "Highlighting target '%s'.", anchor );
|
111
|
+
|
112
|
+
$("a[name]").each( function() {
|
113
|
+
if ( $(this).attr("name") == anchor ) {
|
114
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
115
|
+
console.debug( "Wrapping the target-section" );
|
116
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
117
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
118
|
+
} else {
|
119
|
+
console.debug( "Already wrapped." );
|
120
|
+
}
|
121
|
+
}
|
122
|
+
});
|
123
|
+
};
|
124
|
+
|
125
|
+
function highlightLocationTarget() {
|
126
|
+
console.debug( "Location hash: %s", window.location.hash );
|
127
|
+
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
|
128
|
+
|
129
|
+
var anchor = window.location.hash.substring(1);
|
130
|
+
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
|
131
|
+
|
132
|
+
highlightTarget( anchor );
|
133
|
+
};
|
134
|
+
|
135
|
+
function highlightClickTarget( event ) {
|
136
|
+
console.debug( "Highlighting click target for event %o", event.target );
|
137
|
+
try {
|
138
|
+
var anchor = $(event.target).attr( 'href' ).substring(1);
|
139
|
+
console.debug( "Found target anchor: %s", anchor );
|
140
|
+
highlightTarget( anchor );
|
141
|
+
} catch ( err ) {
|
142
|
+
console.error( "Exception while highlighting: %o", err );
|
143
|
+
};
|
144
|
+
};
|
145
|
+
|
146
|
+
|
147
|
+
$(document).ready( function() {
|
148
|
+
hookSourceViews();
|
149
|
+
hookDebuggingToggle();
|
150
|
+
hookSearch();
|
151
|
+
highlightLocationTarget();
|
152
|
+
hookTableOfContentsToggle();
|
153
|
+
|
154
|
+
$('ul.link-list a').bind( "click", highlightClickTarget );
|
155
|
+
});
|
data/doc/js/full_list.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
var $clicked = $(null);
|
4
|
+
var searchTimeout = null;
|
3
5
|
var searchCache = [];
|
4
|
-
var searchString = '';
|
5
|
-
var regexSearchString = '';
|
6
6
|
var caseSensitiveMatch = false;
|
7
7
|
var ignoreKeyCodeMin = 8;
|
8
8
|
var ignoreKeyCodeMax = 46;
|
@@ -12,170 +12,205 @@ RegExp.escape = function(text) {
|
|
12
12
|
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
13
13
|
}
|
14
14
|
|
15
|
-
function
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
if (link.length === 0) return;
|
21
|
-
var fullName = link.attr('title').split(' ')[0];
|
22
|
-
searchCache.push({name:link.text(), fullName:fullName, node:$(this), link:link});
|
15
|
+
function escapeShortcut() {
|
16
|
+
$(document).keydown(function(evt) {
|
17
|
+
if (evt.which == 27) {
|
18
|
+
window.parent.postMessage('navEscape', '*');
|
19
|
+
}
|
23
20
|
});
|
21
|
+
}
|
24
22
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
23
|
+
function navResizer() {
|
24
|
+
$(window).mousemove(function(e) {
|
25
|
+
window.parent.postMessage({
|
26
|
+
action: 'mousemove', event: {pageX: e.pageX, which: e.which}
|
27
|
+
}, '*');
|
28
|
+
}).mouseup(function(e) {
|
29
|
+
window.parent.postMessage({action: 'mouseup'}, '*');
|
30
|
+
});
|
31
|
+
window.parent.postMessage("navReady", "*");
|
32
|
+
}
|
33
|
+
|
34
|
+
function clearSearchTimeout() {
|
35
|
+
clearTimeout(searchTimeout);
|
36
|
+
searchTimeout = null;
|
37
|
+
}
|
38
|
+
|
39
|
+
function enableLinks() {
|
40
|
+
// load the target page in the parent window
|
41
|
+
$('#full_list li').on('click', function(evt) {
|
42
|
+
$('#full_list li').removeClass('clicked');
|
43
|
+
$clicked = $(this);
|
44
|
+
$clicked.addClass('clicked');
|
45
|
+
evt.stopPropagation();
|
46
|
+
|
47
|
+
if (evt.target.tagName === 'A') return true;
|
48
|
+
|
49
|
+
var elem = $clicked.find('> .item .object_link a')[0];
|
50
|
+
var e = evt.originalEvent;
|
51
|
+
var newEvent = new MouseEvent(evt.originalEvent.type);
|
52
|
+
newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
53
|
+
elem.dispatchEvent(newEvent);
|
54
|
+
evt.preventDefault();
|
55
|
+
return false;
|
56
|
+
});
|
57
|
+
}
|
58
|
+
|
59
|
+
function enableToggles() {
|
60
|
+
// show/hide nested classes on toggle click
|
61
|
+
$('#full_list a.toggle').on('click', function(evt) {
|
62
|
+
evt.stopPropagation();
|
63
|
+
evt.preventDefault();
|
64
|
+
$(this).parent().parent().toggleClass('collapsed');
|
65
|
+
highlight();
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
function populateSearchCache() {
|
70
|
+
$('#full_list li .item').each(function() {
|
71
|
+
var $node = $(this);
|
72
|
+
var $link = $node.find('.object_link a');
|
73
|
+
if ($link.length > 0) {
|
74
|
+
searchCache.push({
|
75
|
+
node: $node,
|
76
|
+
link: $link,
|
77
|
+
name: $link.text(),
|
78
|
+
fullName: $link.attr('title').split(' ')[0]
|
46
79
|
});
|
47
|
-
if (clicked) {
|
48
|
-
clicked.parents('ul').each(function() {
|
49
|
-
$(this).removeClass('collapsed').prev().removeClass('collapsed');
|
50
|
-
});
|
51
|
-
}
|
52
|
-
highlight();
|
53
80
|
}
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
81
|
+
});
|
82
|
+
}
|
83
|
+
|
84
|
+
function enableSearch() {
|
85
|
+
$('#search input').keyup(function(event) {
|
86
|
+
if (ignoredKeyPress(event)) return;
|
87
|
+
if (this.value === "") {
|
88
|
+
clearSearch();
|
89
|
+
} else {
|
90
|
+
performSearch(this.value);
|
61
91
|
}
|
62
92
|
});
|
63
93
|
|
64
|
-
$('#
|
65
|
-
|
94
|
+
$('#full_list').after("<div id='noresults' style='display:none'></div>");
|
95
|
+
}
|
96
|
+
|
97
|
+
function ignoredKeyPress(event) {
|
98
|
+
if (
|
99
|
+
(event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
|
100
|
+
(event.keyCode == commandKey)
|
101
|
+
) {
|
102
|
+
return true;
|
103
|
+
} else {
|
104
|
+
return false;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
function clearSearch() {
|
109
|
+
clearSearchTimeout();
|
110
|
+
$('#full_list .found').removeClass('found').each(function() {
|
111
|
+
var $link = $(this).find('.object_link a');
|
112
|
+
$link.text($link.text());
|
113
|
+
});
|
114
|
+
$('#full_list, #content').removeClass('insearch');
|
115
|
+
$clicked.parents().removeClass('collapsed');
|
116
|
+
highlight();
|
117
|
+
}
|
118
|
+
|
119
|
+
function performSearch(searchString) {
|
120
|
+
clearSearchTimeout();
|
121
|
+
$('#full_list, #content').addClass('insearch');
|
122
|
+
$('#noresults').text('').hide();
|
123
|
+
partialSearch(searchString, 0);
|
66
124
|
}
|
67
125
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
126
|
+
function partialSearch(searchString, offset) {
|
127
|
+
var lastRowClass = '';
|
128
|
+
var i = null;
|
129
|
+
for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
|
130
|
+
var item = searchCache[i];
|
72
131
|
var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
|
73
|
-
var matchString =
|
132
|
+
var matchString = buildMatchString(searchString);
|
74
133
|
var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
|
75
134
|
if (searchName.match(matchRegexp) == null) {
|
76
135
|
item.node.removeClass('found');
|
136
|
+
item.link.text(item.link.text());
|
77
137
|
}
|
78
138
|
else {
|
79
|
-
item.node.
|
80
|
-
item.node.parents().addClass('search_uncollapsed');
|
139
|
+
item.node.addClass('found');
|
81
140
|
item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
|
82
141
|
lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
|
83
142
|
item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
|
84
143
|
}
|
85
|
-
|
86
|
-
if (searchCache.length === searchIndex + 1) {
|
87
|
-
searchDone();
|
88
|
-
return;
|
89
|
-
}
|
90
|
-
else {
|
91
|
-
searchIndex++;
|
92
|
-
}
|
93
144
|
}
|
94
|
-
|
145
|
+
if(i == searchCache.length) {
|
146
|
+
searchDone();
|
147
|
+
} else {
|
148
|
+
searchTimeout = setTimeout(function() {
|
149
|
+
partialSearch(searchString, i);
|
150
|
+
}, 0);
|
151
|
+
}
|
95
152
|
}
|
96
153
|
|
97
154
|
function searchDone() {
|
98
|
-
|
155
|
+
searchTimeout = null;
|
156
|
+
highlight();
|
99
157
|
if ($('#full_list li:visible').size() === 0) {
|
100
158
|
$('#noresults').text('No results were found.').hide().fadeIn();
|
101
|
-
}
|
102
|
-
|
103
|
-
$('#noresults').text('');
|
159
|
+
} else {
|
160
|
+
$('#noresults').text('').hide();
|
104
161
|
}
|
105
162
|
$('#content').removeClass('insearch');
|
106
|
-
clearTimeout(inSearch);
|
107
|
-
inSearch = null;
|
108
|
-
}
|
109
|
-
|
110
|
-
clicked = null;
|
111
|
-
function linkList() {
|
112
|
-
$('#full_list li, #full_list li a:last').click(function(evt) {
|
113
|
-
if ($(this).hasClass('toggle')) return true;
|
114
|
-
if (this.tagName.toLowerCase() == "li") {
|
115
|
-
if ($(this).find('.object_link a').length === 0) {
|
116
|
-
$(this).children('a.toggle').click();
|
117
|
-
return false;
|
118
|
-
}
|
119
|
-
var toggle = $(this).children('a.toggle');
|
120
|
-
if (toggle.size() > 0 && evt.pageX < toggle.offset().left) {
|
121
|
-
toggle.click();
|
122
|
-
return false;
|
123
|
-
}
|
124
|
-
}
|
125
|
-
if (clicked) clicked.removeClass('clicked');
|
126
|
-
var win;
|
127
|
-
try {
|
128
|
-
win = window.top.frames.main ? window.top.frames.main : window.parent;
|
129
|
-
} catch (e) { win = window.parent; }
|
130
|
-
if (this.tagName.toLowerCase() == "a") {
|
131
|
-
clicked = $(this).parents('li').addClass('clicked');
|
132
|
-
win.location = this.href;
|
133
|
-
}
|
134
|
-
else {
|
135
|
-
clicked = $(this).addClass('clicked');
|
136
|
-
win.location = $(this).find('a:last').attr('href');
|
137
|
-
}
|
138
|
-
return false;
|
139
|
-
});
|
140
163
|
}
|
141
164
|
|
142
|
-
function
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
});
|
152
|
-
$('#full_list.class').children().removeClass('collapsed');
|
153
|
-
highlight();
|
165
|
+
function buildMatchString(searchString, event) {
|
166
|
+
caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
|
167
|
+
var regexSearchString = RegExp.escape(searchString);
|
168
|
+
if (caseSensitiveMatch) {
|
169
|
+
regexSearchString += "|" +
|
170
|
+
$.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
|
171
|
+
join('.+?');
|
172
|
+
}
|
173
|
+
return regexSearchString;
|
154
174
|
}
|
155
175
|
|
156
|
-
function highlight(
|
157
|
-
|
158
|
-
|
159
|
-
var next = n == 1 ? 2 : 1;
|
160
|
-
$(this).removeClass("r" + next).addClass("r" + n);
|
161
|
-
if (!no_padding && $('#full_list').hasClass('class')) {
|
162
|
-
$(this).css('padding-left', (10 + $(this).parents('ul').size() * 15) + 'px');
|
163
|
-
}
|
164
|
-
n = next;
|
176
|
+
function highlight() {
|
177
|
+
$('#full_list li:visible').each(function(n) {
|
178
|
+
$(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
|
165
179
|
});
|
166
180
|
}
|
167
181
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
182
|
+
/**
|
183
|
+
* Expands the tree to the target element and its immediate
|
184
|
+
* children.
|
185
|
+
*/
|
186
|
+
function expandTo(path) {
|
187
|
+
var $target = $(document.getElementById('object_' + path));
|
188
|
+
$target.addClass('clicked');
|
189
|
+
$target.removeClass('collapsed');
|
190
|
+
$target.parentsUntil('#full_list', 'li').removeClass('collapsed');
|
191
|
+
if($target[0]) {
|
192
|
+
window.scrollTo(window.scrollX, $target.offset().top - 250);
|
193
|
+
highlight();
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
function windowEvents(event) {
|
198
|
+
var msg = event.data;
|
199
|
+
if (msg.action === "expand") {
|
200
|
+
expandTo(msg.path);
|
201
|
+
}
|
202
|
+
return false;
|
176
203
|
}
|
177
204
|
|
178
|
-
|
179
|
-
|
180
|
-
$(
|
181
|
-
|
205
|
+
window.addEventListener("message", windowEvents, false);
|
206
|
+
|
207
|
+
$(document).ready(function() {
|
208
|
+
escapeShortcut();
|
209
|
+
navResizer();
|
210
|
+
enableLinks();
|
211
|
+
enableToggles();
|
212
|
+
populateSearchCache();
|
213
|
+
enableSearch();
|
214
|
+
});
|
215
|
+
|
216
|
+
})();
|