forked from jqwidgets/jQWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation.js
More file actions
143 lines (128 loc) · 5.57 KB
/
Copy pathdocumentation.js
File metadata and controls
143 lines (128 loc) · 5.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
try {
$(document).ready(function () {
if (navigator.userAgent.indexOf('MSIE 7.0') >= 0 || navigator.userAgent.indexOf('MSIE 8.0') >= 0)
{
$("em").hide();
$("em").next().hide();
}
var url = "../../jqwidgets/styles/jqx.base.css";
var bootstrapUrl = "../../jqwidgets/styles/jqx.bootstrap.css";
if (document.createStyleSheet != undefined) {
document.createStyleSheet(url);
document.createStyleSheet(bootstrapUrl);
}
else {
var link = $('<link rel="stylesheet" href="' + url + '" media="screen" />');
$(document).find('head').append(link);
var link = $('<link rel="stylesheet" href="' + bootstrapUrl + '" media="screen" />');
$(document).find('head').append(link);
}
var inputWrapper = $('<div class="search"><div class="wrap"><input id="searchField" type="text" placeholder="I am searching for" value="" autocomplete="off"></div></div>');
inputWrapper.prependTo(document.body);
var input = inputWrapper.find('input');
if (navigator.userAgent.indexOf('MSIE 7.0') >= 0 || navigator.userAgent.indexOf('MSIE 8.0') >= 0 || navigator.userAgent.indexOf('MSIE 9.0') >= 0) {
$("<label>I am searching for</label><br/>").prependTo(document.body);
}
var timer = null;
input.focus(function()
{
input.addClass('jqx-fill-state-focus jqx-fill-state-focus-bootstrap');
});
input.blur(function () {
input.removeClass('jqx-fill-state-focus jqx-fill-state-focus-bootstrap');
});
var updateHeightUtility = function () {
try
{
var tables = $('.documentation-table');
var h = 0;
$.each(tables, function () {
if ($(this).length > 0) {
h += $(this).outerHeight();
}
});
var frameHeight = 250 + h;
if ($(window.frameElement).length > 0) {
$(window.frameElement).height(250 + frameHeight);
}
var resize = function () {
if ($(window.top.document).find(".doc_menu").length > 0) {
var maxHeight = Math.max(frameHeight, 250 + $(window.top.document).find(".doc_menu").height());
if ($(window.top).width() < 1330) {
maxHeight = frameHeight + 250 + $(window.top.document).find(".doc_menu").height();
}
$(window.top.document).find(".doc_content").css('min-height',60+ maxHeight + "px");
$(window.top.document).find('#tabs-3').css({ height: maxHeight + 'px' });
if ($(window.frameElement).length > 0) {
$(window.frameElement).height(maxHeight);
}
}
}();
}
catch (error) {
}
}
var updateHeight = function () {
try {
if (document.referrer != "" || window.frameElement) {
if (window.top != null && window.top != window.self) {
var parentLocation = null;
if (window.parent && document.referrer) {
parentLocation = document.referrer;
}
if (parentLocation && parentLocation.indexOf(document.location.host) != -1) {
if (window.top.document) {
setTimeout(function () {
document.body.style.overflowY = "hidden";
$(window.top.document).find('#tab3').on('click', function (event)
{
updateHeightUtility();
});
if ($(window.top.document).find('#tabs-3').css('display') == "none")
return;
updateHeightUtility();
});
}
}
}
}
}
catch (er) {
}
}
$(".documentation-option-type-click").mouseup(function (event) {
updateHeight();
});
updateHeight();
input.keydown(function (event) {
if (timer != undefined) clearTimeout(timer);
var search = function () {
var searchString = input.val();
var items = $(".documentation-option-type-click");
$.each(items, function () {
var item = $(this);
var itemText = $.trim(item.text());
var match = itemText.toUpperCase().indexOf(searchString.toUpperCase()) != -1;
if (!match) {
item.parent().hide();
item.parent().next().hide();
}
else {
item.parent().show();
item.parent().next().show();
}
});
updateHeight();
}
timer = setTimeout(function () {
search();
}, 500);
if (event.keyCode == 13) {
search();
}
});
});
}
catch (error) {
var er = error;
}