sideshow 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.bowerrc +3 -0
- data/.csslintrc +37 -0
- data/.editorconfig +27 -0
- data/.gitattributes +1 -0
- data/.gitignore +23 -0
- data/BUILDING.md +4 -0
- data/CHANGELOG.md +47 -0
- data/Gulpfile.js +404 -0
- data/LICENSE +191 -0
- data/README.md +342 -0
- data/VERSION +1 -0
- data/bower.json +61 -0
- data/distr/dependencies/jazz.min.js +8 -0
- data/distr/dependencies/jquery.min.js +5 -0
- data/distr/dependencies/pagedown.min.js +1 -0
- data/distr/fonts/open-sans-family/opensans-bold.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-bold.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-bold.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-bold.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-bolditalic.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-bolditalic.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-bolditalic.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-bolditalic.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-extrabold.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-extrabold.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-extrabold.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-extrabold.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-extrabolditalic.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-extrabolditalic.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-extrabolditalic.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-extrabolditalic.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-italic.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-italic.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-italic.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-italic.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-light.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-light.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-light.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-light.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-lightitalic.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-lightitalic.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-lightitalic.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-lightitalic.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-regular.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-regular.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-regular.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-regular.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-semibold.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-semibold.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-semibold.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-semibold.woff +0 -0
- data/distr/fonts/open-sans-family/opensans-semibolditalic.eot +0 -0
- data/distr/fonts/open-sans-family/opensans-semibolditalic.svg +1825 -0
- data/distr/fonts/open-sans-family/opensans-semibolditalic.ttf +0 -0
- data/distr/fonts/open-sans-family/opensans-semibolditalic.woff +0 -0
- data/distr/fonts/sideshow-fontface.min.css +1 -0
- data/distr/fonts/sideshow-icons/sideshow-icons.eot +0 -0
- data/distr/fonts/sideshow-icons/sideshow-icons.svg +16 -0
- data/distr/fonts/sideshow-icons/sideshow-icons.ttf +0 -0
- data/distr/fonts/sideshow-icons/sideshow-icons.woff +0 -0
- data/distr/sideshow.js +2510 -0
- data/distr/sideshow.min.js +10 -0
- data/distr/stylesheets/sideshow.min.css +1 -0
- data/docs/api.js +29 -0
- data/docs/assets/css/external-small.png +0 -0
- data/docs/assets/css/logo.png +0 -0
- data/docs/assets/css/main.css +783 -0
- data/docs/assets/favicon.png +0 -0
- data/docs/assets/img/spinner.gif +0 -0
- data/docs/assets/index.html +10 -0
- data/docs/assets/js/api-filter.js +52 -0
- data/docs/assets/js/api-list.js +251 -0
- data/docs/assets/js/api-search.js +98 -0
- data/docs/assets/js/apidocs.js +370 -0
- data/docs/assets/js/yui-prettify.js +17 -0
- data/docs/assets/vendor/prettify/CHANGES.html +130 -0
- data/docs/assets/vendor/prettify/COPYING +202 -0
- data/docs/assets/vendor/prettify/README.html +203 -0
- data/docs/assets/vendor/prettify/prettify-min.css +1 -0
- data/docs/assets/vendor/prettify/prettify-min.js +1 -0
- data/docs/classes/Arrow.html +541 -0
- data/docs/classes/Arrows.html +805 -0
- data/docs/classes/ControlVariables.html +1005 -0
- data/docs/classes/DetailsPanel.html +672 -0
- data/docs/classes/FadableItem.html +613 -0
- data/docs/classes/HidableItem.html +495 -0
- data/docs/classes/Mask.CloseButton.html +706 -0
- data/docs/classes/Mask.CompositeMask.html +721 -0
- data/docs/classes/Mask.CornerPart.html +613 -0
- data/docs/classes/Mask.Part.html +395 -0
- data/docs/classes/Mask.Polling.html +809 -0
- data/docs/classes/Mask.Subject.html +199 -0
- data/docs/classes/Mask.SubjectMask.html +417 -0
- data/docs/classes/Mask.WizardMenu.html +1401 -0
- data/docs/classes/SS.html +267 -0
- data/docs/classes/SSException.html +203 -0
- data/docs/classes/Screen.html +363 -0
- data/docs/classes/StepDescription.html +1025 -0
- data/docs/classes/StepDescriptionNextButton.html +746 -0
- data/docs/classes/VisualItem.html +339 -0
- data/docs/classes/Wizard.html +967 -0
- data/docs/files/c +0 -0
- data/docs/index.html +162 -0
- data/example.html +81 -0
- data/examples/images/clemenza.jpg +0 -0
- data/examples/images/doc_brown.png +0 -0
- data/examples/images/forkme.png +0 -0
- data/examples/images/fortes-logo.png +0 -0
- data/examples/images/sideshow-logo.png +0 -0
- data/examples/images/sideshow-logo.svg +155 -0
- data/examples/scripts/sideshow.config.js +2 -0
- data/examples/scripts/tutorials/introducing_sideshow.js +259 -0
- data/examples/stylesheets/example.min.css +1 -0
- data/examples/stylesheets/styl/example.styl +272 -0
- data/gulp/config.js +0 -0
- data/gulp/extensions/gulp-html-extend.js +151 -0
- data/gulp/tasks/.gitkeep +0 -0
- data/icons/iconfont.zip +0 -0
- data/package.json +56 -0
- data/sideshow.gemspec +20 -0
- data/sideshow.nuspec +72 -0
- data/sideshow.sublime-project +22 -0
- data/src/copyright_info.js +8 -0
- data/src/general/config.js +42 -0
- data/src/general/dictionary.js +42 -0
- data/src/general/exception.js +15 -0
- data/src/general/global_object.js +287 -0
- data/src/general/polling.js +151 -0
- data/src/general/screen.js +39 -0
- data/src/general/utility_functions.js +88 -0
- data/src/general/variables.js +42 -0
- data/src/interface_itens/fadable_item.js +55 -0
- data/src/interface_itens/hidable_item.js +32 -0
- data/src/interface_itens/visual_item.js +42 -0
- data/src/main.js +52 -0
- data/src/mask/composite_mask.js +193 -0
- data/src/mask/composite_mask_corner_part.js +105 -0
- data/src/mask/composite_mask_part.js +51 -0
- data/src/mask/mask.js +6 -0
- data/src/mask/subject_mask.js +34 -0
- data/src/step/arrow.js +88 -0
- data/src/step/arrows.js +155 -0
- data/src/step/step_description.js +165 -0
- data/src/step/step_description_next_button.js +55 -0
- data/src/step/step_details_panel.js +87 -0
- data/src/step/subject.js +100 -0
- data/src/wizard/wizard.js +395 -0
- data/src/wizard/wizard_control_variables.js +95 -0
- data/src/wizard/wizard_menu.js +101 -0
- data/stylesheets/_animations.styl +87 -0
- data/stylesheets/_font-face.styl +135 -0
- data/stylesheets/_icons.styl +27 -0
- data/stylesheets/_layout.styl +362 -0
- data/stylesheets/_mixins.styl +52 -0
- data/stylesheets/_variables.styl +35 -0
- data/stylesheets/sideshow-fontface.styl +4 -0
- data/stylesheets/sideshow.styl +7 -0
- data/yuidoc.json +15 -0
- metadata +246 -0
@@ -0,0 +1,370 @@
|
|
1
|
+
YUI().use(
|
2
|
+
'yuidoc-meta',
|
3
|
+
'api-list', 'history-hash', 'node-screen', 'node-style', 'pjax',
|
4
|
+
function (Y) {
|
5
|
+
|
6
|
+
var win = Y.config.win,
|
7
|
+
localStorage = win.localStorage,
|
8
|
+
|
9
|
+
bdNode = Y.one('#bd'),
|
10
|
+
|
11
|
+
pjax,
|
12
|
+
defaultRoute,
|
13
|
+
|
14
|
+
classTabView,
|
15
|
+
selectedTab;
|
16
|
+
|
17
|
+
// Kill pjax functionality unless serving over HTTP.
|
18
|
+
if (!Y.getLocation().protocol.match(/^https?\:/)) {
|
19
|
+
Y.Router.html5 = false;
|
20
|
+
}
|
21
|
+
|
22
|
+
// Create the default route with middleware which enables syntax highlighting
|
23
|
+
// on the loaded content.
|
24
|
+
defaultRoute = Y.Pjax.defaultRoute.concat(function (req, res, next) {
|
25
|
+
prettyPrint();
|
26
|
+
bdNode.removeClass('loading');
|
27
|
+
|
28
|
+
next();
|
29
|
+
});
|
30
|
+
|
31
|
+
pjax = new Y.Pjax({
|
32
|
+
container : '#docs-main',
|
33
|
+
contentSelector: '#docs-main > .content',
|
34
|
+
linkSelector : '#bd a',
|
35
|
+
titleSelector : '#xhr-title',
|
36
|
+
|
37
|
+
navigateOnHash: true,
|
38
|
+
root : '/',
|
39
|
+
routes : [
|
40
|
+
// -- / ----------------------------------------------------------------
|
41
|
+
{
|
42
|
+
path : '/(index.html)?',
|
43
|
+
callbacks: defaultRoute
|
44
|
+
},
|
45
|
+
|
46
|
+
// -- /classes/* -------------------------------------------------------
|
47
|
+
{
|
48
|
+
path : '/classes/:class.html*',
|
49
|
+
callbacks: [defaultRoute, 'handleClasses']
|
50
|
+
},
|
51
|
+
|
52
|
+
// -- /files/* ---------------------------------------------------------
|
53
|
+
{
|
54
|
+
path : '/files/*file',
|
55
|
+
callbacks: [defaultRoute, 'handleFiles']
|
56
|
+
},
|
57
|
+
|
58
|
+
// -- /modules/* -------------------------------------------------------
|
59
|
+
{
|
60
|
+
path : '/modules/:module.html*',
|
61
|
+
callbacks: defaultRoute
|
62
|
+
}
|
63
|
+
]
|
64
|
+
});
|
65
|
+
|
66
|
+
// -- Utility Functions --------------------------------------------------------
|
67
|
+
|
68
|
+
pjax.checkVisibility = function (tab) {
|
69
|
+
tab || (tab = selectedTab);
|
70
|
+
|
71
|
+
if (!tab) { return; }
|
72
|
+
|
73
|
+
var panelNode = tab.get('panelNode'),
|
74
|
+
visibleItems;
|
75
|
+
|
76
|
+
// If no items are visible in the tab panel due to the current visibility
|
77
|
+
// settings, display a message to that effect.
|
78
|
+
visibleItems = panelNode.all('.item,.index-item').some(function (itemNode) {
|
79
|
+
if (itemNode.getComputedStyle('display') !== 'none') {
|
80
|
+
return true;
|
81
|
+
}
|
82
|
+
});
|
83
|
+
|
84
|
+
panelNode.all('.no-visible-items').remove();
|
85
|
+
|
86
|
+
if (!visibleItems) {
|
87
|
+
if (Y.one('#index .index-item')) {
|
88
|
+
panelNode.append(
|
89
|
+
'<div class="no-visible-items">' +
|
90
|
+
'<p>' +
|
91
|
+
'Some items are not shown due to the current visibility ' +
|
92
|
+
'settings. Use the checkboxes at the upper right of this ' +
|
93
|
+
'page to change the visibility settings.' +
|
94
|
+
'</p>' +
|
95
|
+
'</div>'
|
96
|
+
);
|
97
|
+
} else {
|
98
|
+
panelNode.append(
|
99
|
+
'<div class="no-visible-items">' +
|
100
|
+
'<p>' +
|
101
|
+
'This class doesn\'t provide any methods, properties, ' +
|
102
|
+
'attributes, or events.' +
|
103
|
+
'</p>' +
|
104
|
+
'</div>'
|
105
|
+
);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
// Hide index sections without any visible items.
|
110
|
+
Y.all('.index-section').each(function (section) {
|
111
|
+
var items = 0,
|
112
|
+
visibleItems = 0;
|
113
|
+
|
114
|
+
section.all('.index-item').each(function (itemNode) {
|
115
|
+
items += 1;
|
116
|
+
|
117
|
+
if (itemNode.getComputedStyle('display') !== 'none') {
|
118
|
+
visibleItems += 1;
|
119
|
+
}
|
120
|
+
});
|
121
|
+
|
122
|
+
section.toggleClass('hidden', !visibleItems);
|
123
|
+
section.toggleClass('no-columns', visibleItems < 4);
|
124
|
+
});
|
125
|
+
};
|
126
|
+
|
127
|
+
pjax.initClassTabView = function () {
|
128
|
+
if (!Y.all('#classdocs .api-class-tab').size()) {
|
129
|
+
return;
|
130
|
+
}
|
131
|
+
|
132
|
+
if (classTabView) {
|
133
|
+
classTabView.destroy();
|
134
|
+
selectedTab = null;
|
135
|
+
}
|
136
|
+
|
137
|
+
classTabView = new Y.TabView({
|
138
|
+
srcNode: '#classdocs',
|
139
|
+
|
140
|
+
on: {
|
141
|
+
selectionChange: pjax.onTabSelectionChange
|
142
|
+
}
|
143
|
+
});
|
144
|
+
|
145
|
+
pjax.updateTabState();
|
146
|
+
classTabView.render();
|
147
|
+
};
|
148
|
+
|
149
|
+
pjax.initLineNumbers = function () {
|
150
|
+
var hash = win.location.hash.substring(1),
|
151
|
+
container = pjax.get('container'),
|
152
|
+
hasLines, node;
|
153
|
+
|
154
|
+
// Add ids for each line number in the file source view.
|
155
|
+
container.all('.linenums>li').each(function (lineNode, index) {
|
156
|
+
lineNode.set('id', 'l' + (index + 1));
|
157
|
+
lineNode.addClass('file-line');
|
158
|
+
hasLines = true;
|
159
|
+
});
|
160
|
+
|
161
|
+
// Scroll to the desired line.
|
162
|
+
if (hasLines && /^l\d+$/.test(hash)) {
|
163
|
+
if ((node = container.getById(hash))) {
|
164
|
+
win.scroll(0, node.getY());
|
165
|
+
}
|
166
|
+
}
|
167
|
+
};
|
168
|
+
|
169
|
+
pjax.initRoot = function () {
|
170
|
+
var terminators = /^(?:classes|files|modules)$/,
|
171
|
+
parts = pjax._getPathRoot().split('/'),
|
172
|
+
root = [],
|
173
|
+
i, len, part;
|
174
|
+
|
175
|
+
for (i = 0, len = parts.length; i < len; i += 1) {
|
176
|
+
part = parts[i];
|
177
|
+
|
178
|
+
if (part.match(terminators)) {
|
179
|
+
// Makes sure the path will end with a "/".
|
180
|
+
root.push('');
|
181
|
+
break;
|
182
|
+
}
|
183
|
+
|
184
|
+
root.push(part);
|
185
|
+
}
|
186
|
+
|
187
|
+
pjax.set('root', root.join('/'));
|
188
|
+
};
|
189
|
+
|
190
|
+
pjax.updateTabState = function (src) {
|
191
|
+
var hash = win.location.hash.substring(1),
|
192
|
+
defaultTab, node, tab, tabPanel;
|
193
|
+
|
194
|
+
function scrollToNode() {
|
195
|
+
if (node.hasClass('protected')) {
|
196
|
+
Y.one('#api-show-protected').set('checked', true);
|
197
|
+
pjax.updateVisibility();
|
198
|
+
}
|
199
|
+
|
200
|
+
if (node.hasClass('private')) {
|
201
|
+
Y.one('#api-show-private').set('checked', true);
|
202
|
+
pjax.updateVisibility();
|
203
|
+
}
|
204
|
+
|
205
|
+
setTimeout(function () {
|
206
|
+
// For some reason, unless we re-get the node instance here,
|
207
|
+
// getY() always returns 0.
|
208
|
+
var node = Y.one('#classdocs').getById(hash);
|
209
|
+
win.scrollTo(0, node.getY() - 70);
|
210
|
+
}, 1);
|
211
|
+
}
|
212
|
+
|
213
|
+
if (!classTabView) {
|
214
|
+
return;
|
215
|
+
}
|
216
|
+
|
217
|
+
if (src === 'hashchange' && !hash) {
|
218
|
+
defaultTab = 'index';
|
219
|
+
} else {
|
220
|
+
if (localStorage) {
|
221
|
+
defaultTab = localStorage.getItem('tab_' + pjax.getPath()) ||
|
222
|
+
'index';
|
223
|
+
} else {
|
224
|
+
defaultTab = 'index';
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
if (hash && (node = Y.one('#classdocs').getById(hash))) {
|
229
|
+
if ((tabPanel = node.ancestor('.api-class-tabpanel', true))) {
|
230
|
+
if ((tab = Y.one('#classdocs .api-class-tab.' + tabPanel.get('id')))) {
|
231
|
+
if (classTabView.get('rendered')) {
|
232
|
+
Y.Widget.getByNode(tab).set('selected', 1);
|
233
|
+
} else {
|
234
|
+
tab.addClass('yui3-tab-selected');
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
|
239
|
+
// Scroll to the desired element if this is a hash URL.
|
240
|
+
if (node) {
|
241
|
+
if (classTabView.get('rendered')) {
|
242
|
+
scrollToNode();
|
243
|
+
} else {
|
244
|
+
classTabView.once('renderedChange', scrollToNode);
|
245
|
+
}
|
246
|
+
}
|
247
|
+
} else {
|
248
|
+
tab = Y.one('#classdocs .api-class-tab.' + defaultTab);
|
249
|
+
|
250
|
+
// When the `defaultTab` node isn't found, `localStorage` is stale.
|
251
|
+
if (!tab && defaultTab !== 'index') {
|
252
|
+
tab = Y.one('#classdocs .api-class-tab.index');
|
253
|
+
}
|
254
|
+
|
255
|
+
if (classTabView.get('rendered')) {
|
256
|
+
Y.Widget.getByNode(tab).set('selected', 1);
|
257
|
+
} else {
|
258
|
+
tab.addClass('yui3-tab-selected');
|
259
|
+
}
|
260
|
+
}
|
261
|
+
};
|
262
|
+
|
263
|
+
pjax.updateVisibility = function () {
|
264
|
+
var container = pjax.get('container');
|
265
|
+
|
266
|
+
container.toggleClass('hide-inherited',
|
267
|
+
!Y.one('#api-show-inherited').get('checked'));
|
268
|
+
|
269
|
+
container.toggleClass('show-deprecated',
|
270
|
+
Y.one('#api-show-deprecated').get('checked'));
|
271
|
+
|
272
|
+
container.toggleClass('show-protected',
|
273
|
+
Y.one('#api-show-protected').get('checked'));
|
274
|
+
|
275
|
+
container.toggleClass('show-private',
|
276
|
+
Y.one('#api-show-private').get('checked'));
|
277
|
+
|
278
|
+
pjax.checkVisibility();
|
279
|
+
};
|
280
|
+
|
281
|
+
// -- Route Handlers -----------------------------------------------------------
|
282
|
+
|
283
|
+
pjax.handleClasses = function (req, res, next) {
|
284
|
+
var status = res.ioResponse.status;
|
285
|
+
|
286
|
+
// Handles success and local filesystem XHRs.
|
287
|
+
if (res.ioResponse.readyState === 4 && (!status || (status >= 200 && status < 300))) {
|
288
|
+
pjax.initClassTabView();
|
289
|
+
}
|
290
|
+
|
291
|
+
next();
|
292
|
+
};
|
293
|
+
|
294
|
+
pjax.handleFiles = function (req, res, next) {
|
295
|
+
var status = res.ioResponse.status;
|
296
|
+
|
297
|
+
// Handles success and local filesystem XHRs.
|
298
|
+
if (res.ioResponse.readyState === 4 && (!status || (status >= 200 && status < 300))) {
|
299
|
+
pjax.initLineNumbers();
|
300
|
+
}
|
301
|
+
|
302
|
+
next();
|
303
|
+
};
|
304
|
+
|
305
|
+
// -- Event Handlers -----------------------------------------------------------
|
306
|
+
|
307
|
+
pjax.onNavigate = function (e) {
|
308
|
+
var hash = e.hash,
|
309
|
+
originTarget = e.originEvent && e.originEvent.target,
|
310
|
+
tab;
|
311
|
+
|
312
|
+
if (hash) {
|
313
|
+
tab = originTarget && originTarget.ancestor('.yui3-tab', true);
|
314
|
+
|
315
|
+
if (hash === win.location.hash) {
|
316
|
+
pjax.updateTabState('hashchange');
|
317
|
+
} else if (!tab) {
|
318
|
+
win.location.hash = hash;
|
319
|
+
}
|
320
|
+
|
321
|
+
e.preventDefault();
|
322
|
+
return;
|
323
|
+
}
|
324
|
+
|
325
|
+
// Only scroll to the top of the page when the URL doesn't have a hash.
|
326
|
+
this.set('scrollToTop', !e.url.match(/#.+$/));
|
327
|
+
|
328
|
+
bdNode.addClass('loading');
|
329
|
+
};
|
330
|
+
|
331
|
+
pjax.onOptionClick = function (e) {
|
332
|
+
pjax.updateVisibility();
|
333
|
+
};
|
334
|
+
|
335
|
+
pjax.onTabSelectionChange = function (e) {
|
336
|
+
var tab = e.newVal,
|
337
|
+
tabId = tab.get('contentBox').getAttribute('href').substring(1);
|
338
|
+
|
339
|
+
selectedTab = tab;
|
340
|
+
|
341
|
+
// If switching from a previous tab (i.e., this is not the default tab),
|
342
|
+
// replace the history entry with a hash URL that will cause this tab to
|
343
|
+
// be selected if the user navigates away and then returns using the back
|
344
|
+
// or forward buttons.
|
345
|
+
if (e.prevVal && localStorage) {
|
346
|
+
localStorage.setItem('tab_' + pjax.getPath(), tabId);
|
347
|
+
}
|
348
|
+
|
349
|
+
pjax.checkVisibility(tab);
|
350
|
+
};
|
351
|
+
|
352
|
+
// -- Init ---------------------------------------------------------------------
|
353
|
+
|
354
|
+
pjax.on('navigate', pjax.onNavigate);
|
355
|
+
|
356
|
+
pjax.initRoot();
|
357
|
+
pjax.upgrade();
|
358
|
+
pjax.initClassTabView();
|
359
|
+
pjax.initLineNumbers();
|
360
|
+
pjax.updateVisibility();
|
361
|
+
|
362
|
+
Y.APIList.rootPath = pjax.get('root');
|
363
|
+
|
364
|
+
Y.one('#api-options').delegate('click', pjax.onOptionClick, 'input');
|
365
|
+
|
366
|
+
Y.on('hashchange', function (e) {
|
367
|
+
pjax.updateTabState('hashchange');
|
368
|
+
}, win);
|
369
|
+
|
370
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
YUI().use('node', function(Y) {
|
2
|
+
var code = Y.all('.prettyprint.linenums');
|
3
|
+
if (code.size()) {
|
4
|
+
code.each(function(c) {
|
5
|
+
var lis = c.all('ol li'),
|
6
|
+
l = 1;
|
7
|
+
lis.each(function(n) {
|
8
|
+
n.prepend('<a name="LINENUM_' + l + '"></a>');
|
9
|
+
l++;
|
10
|
+
});
|
11
|
+
});
|
12
|
+
var h = location.hash;
|
13
|
+
location.hash = '';
|
14
|
+
h = h.replace('LINE_', 'LINENUM_');
|
15
|
+
location.hash = h;
|
16
|
+
}
|
17
|
+
});
|
@@ -0,0 +1,130 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
4
|
+
<title>Change Log</title>
|
5
|
+
</head>
|
6
|
+
<body bgcolor="white">
|
7
|
+
<a style="float:right" href="README.html">README</a>
|
8
|
+
|
9
|
+
<h1>Known Issues</h1>
|
10
|
+
<ul>
|
11
|
+
<li>Perl formatting is really crappy. Partly because the author is lazy and
|
12
|
+
partly because Perl is
|
13
|
+
<a href="http://www.perlmonks.org/?node_id=663393">hard</a> to parse.
|
14
|
+
<li>On some browsers, <code><code></code> elements with newlines in the text
|
15
|
+
which use CSS to specify <code>white-space:pre</code> will have the newlines
|
16
|
+
improperly stripped if the element is not attached to the document at the time
|
17
|
+
the stripping is done. Also, on IE 6, all newlines will be stripped from
|
18
|
+
<code><code></code> elements because of the way IE6 produces
|
19
|
+
<code>innerHTML</code>. Workaround: use <code><pre></code> for code with
|
20
|
+
newlines.
|
21
|
+
</ul>
|
22
|
+
|
23
|
+
<h1>Change Log</h1>
|
24
|
+
<h2>29 March 2007</h2>
|
25
|
+
<ul>
|
26
|
+
<li>Added <a href="tests/prettify_test.html#PHP">tests</a> for PHP support
|
27
|
+
to address
|
28
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=3"
|
29
|
+
>issue 3</a>.
|
30
|
+
<li>Fixed
|
31
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=6"
|
32
|
+
>bug</a>: <code>prettyPrintOne</code> was not halting. This was not
|
33
|
+
reachable through the normal entry point.
|
34
|
+
<li>Fixed
|
35
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
|
36
|
+
>bug</a>: recursing into a script block or PHP tag that was not properly
|
37
|
+
closed would not silently drop the content.
|
38
|
+
(<a href="tests/prettify_test.html#issue4">test</a>)
|
39
|
+
<li>Fixed
|
40
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=8"
|
41
|
+
>bug</a>: was eating tabs
|
42
|
+
(<a href="tests/prettify_test.html#issue8">test</a>)
|
43
|
+
<li>Fixed entity handling so that the caveat
|
44
|
+
<blockquote>
|
45
|
+
<p>Caveats: please properly escape less-thans. <tt>x&lt;y</tt>
|
46
|
+
instead of <tt>x<y</tt>, and use <tt>"</tt> instead of
|
47
|
+
<tt>&quot;</tt> for string delimiters.</p>
|
48
|
+
</blockquote>
|
49
|
+
is no longer applicable.
|
50
|
+
<li>Added noisefree's C#
|
51
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
|
52
|
+
>patch</a>
|
53
|
+
<li>Added a <a href="http://google-code-prettify.googlecode.com/files/prettify-small.zip">distribution</a> that has comments and
|
54
|
+
whitespace removed to reduce download size from 45.5kB to 12.8kB.
|
55
|
+
</ul>
|
56
|
+
<h2>4 Jul 2008</h2>
|
57
|
+
<ul>
|
58
|
+
<li>Added <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=17">language specific formatters</a> that are triggered by the presence
|
59
|
+
of a <code>lang-<language-file-extension></code></li>
|
60
|
+
<li>Fixed <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=29">bug</a>: python handling of <code>'''string'''</code>
|
61
|
+
<li>Fixed bug: <code>/</code> in regex <code>[charsets] should not end regex</code>
|
62
|
+
</ul>
|
63
|
+
<h2>5 Jul 2008</h2>
|
64
|
+
<ul>
|
65
|
+
<li>Defined language extensions for Lisp and Lua</code>
|
66
|
+
</ul>
|
67
|
+
<h2>14 Jul 2008</h2>
|
68
|
+
<ul>
|
69
|
+
<li>Language handlers for F#, OCAML, SQL</code>
|
70
|
+
<li>Support for <code>nocode</code> spans to allow embedding of line
|
71
|
+
numbers and code annotations which should not be styled or otherwise
|
72
|
+
affect the tokenization of prettified code.
|
73
|
+
See the issue 22
|
74
|
+
<a href="tests/prettify_test.html#issue22">testcase</a>.</code>
|
75
|
+
</ul>
|
76
|
+
<h2>6 Jan 2009</h2>
|
77
|
+
<ul>
|
78
|
+
<li>Language handlers for Visual Basic, Haskell, CSS, and WikiText</li>
|
79
|
+
<li>Added <tt>.mxml</tt> extension to the markup style handler for
|
80
|
+
Flex <a href="http://en.wikipedia.org/wiki/MXML">MXML files</a>. See
|
81
|
+
<a
|
82
|
+
href="http://code.google.com/p/google-code-prettify/issues/detail?id=37"
|
83
|
+
>issue 37</a>.
|
84
|
+
<li>Added <tt>.m</tt> extension to the C style handler so that Objective
|
85
|
+
C source files properly highlight. See
|
86
|
+
<a
|
87
|
+
href="http://code.google.com/p/google-code-prettify/issues/detail?id=58"
|
88
|
+
>issue 58</a>.
|
89
|
+
<li>Changed HTML lexer to use the same embedded source mechanism as the
|
90
|
+
wiki language handler, and changed to use the registered
|
91
|
+
CSS handler for STYLE element content.
|
92
|
+
</ul>
|
93
|
+
<h2>21 May 2009</h2>
|
94
|
+
<ul>
|
95
|
+
<li>Rewrote to improve performance on large files.
|
96
|
+
See <a href="http://mikesamuel.blogspot.com/2009/05/efficient-parsing-in-javascript.html">benchmarks</a>.</li>
|
97
|
+
<li>Fixed bugs with highlighting of Haskell line comments, Lisp
|
98
|
+
number literals, Lua strings, C preprocessor directives,
|
99
|
+
newlines in Wiki code on Windows, and newlines in IE6.</li>
|
100
|
+
</ul>
|
101
|
+
<h2>14 August 2009</h2>
|
102
|
+
<ul>
|
103
|
+
<li>Fixed prettifying of <code><code></code> blocks with embedded newlines.
|
104
|
+
</ul>
|
105
|
+
<h2>3 October 2009</h2>
|
106
|
+
<ul>
|
107
|
+
<li>Fixed prettifying of XML/HTML tags that contain uppercase letters.
|
108
|
+
</ul>
|
109
|
+
<h2>19 July 2010</h2>
|
110
|
+
<ul>
|
111
|
+
<li>Added support for line numbers. Bug
|
112
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=22"
|
113
|
+
>22</a></li>
|
114
|
+
<li>Added YAML support. Bug
|
115
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=123"
|
116
|
+
>123</a></li>
|
117
|
+
<li>Added VHDL support courtesy Le Poussin.</li>
|
118
|
+
<li>IE performance improvements. Bug
|
119
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=102"
|
120
|
+
>102</a> courtesy jacobly.</li>
|
121
|
+
<li>A variety of markup formatting fixes courtesy smain and thezbyg.</li>
|
122
|
+
<li>Fixed copy and paste in IE[678].
|
123
|
+
<li>Changed output to use <code>&#160;</code> instead of
|
124
|
+
<code>&nbsp;</code> so that the output works when embedded in XML.
|
125
|
+
Bug
|
126
|
+
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=108"
|
127
|
+
>108</a>.</li>
|
128
|
+
</ul>
|
129
|
+
</body>
|
130
|
+
</html>
|