upjs-rails 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/dist/up.js +71 -23
  3. data/dist/up.min.js +1 -1
  4. data/lib/assets/javascripts/up/form.js.coffee +50 -16
  5. data/lib/assets/javascripts/up/modal.js.coffee +22 -8
  6. data/lib/assets/javascripts/up/proxy.js.coffee +1 -1
  7. data/lib/upjs/rails/version.rb +1 -1
  8. metadata +3 -40
  9. data/doc/theme/Gruntfile.js +0 -25
  10. data/doc/theme/README.md +0 -29
  11. data/doc/theme/assets/css/external-small.png +0 -0
  12. data/doc/theme/assets/css/logo.png +0 -0
  13. data/doc/theme/assets/css/main.css +0 -859
  14. data/doc/theme/assets/css/main.less +0 -897
  15. data/doc/theme/assets/favicon.png +0 -0
  16. data/doc/theme/assets/img/bgscreen.png +0 -0
  17. data/doc/theme/assets/img/spinner.gif +0 -0
  18. data/doc/theme/assets/index.html +0 -10
  19. data/doc/theme/assets/js/api-filter.js +0 -52
  20. data/doc/theme/assets/js/api-list.js +0 -251
  21. data/doc/theme/assets/js/api-search.js +0 -98
  22. data/doc/theme/assets/js/apidocs.js +0 -369
  23. data/doc/theme/assets/js/yui-prettify.js +0 -17
  24. data/doc/theme/assets/vendor/prettify/CHANGES.html +0 -130
  25. data/doc/theme/assets/vendor/prettify/COPYING +0 -202
  26. data/doc/theme/assets/vendor/prettify/README.html +0 -203
  27. data/doc/theme/assets/vendor/prettify/prettify-min.css +0 -1
  28. data/doc/theme/assets/vendor/prettify/prettify-min.js +0 -1
  29. data/doc/theme/layouts/main.handlebars +0 -54
  30. data/doc/theme/layouts/xhr.handlebars +0 -7
  31. data/doc/theme/package.json +0 -53
  32. data/doc/theme/partials/attrs.handlebars +0 -141
  33. data/doc/theme/partials/classes.handlebars +0 -210
  34. data/doc/theme/partials/events.handlebars +0 -145
  35. data/doc/theme/partials/exampleurl.handlebars +0 -8
  36. data/doc/theme/partials/files.handlebars +0 -7
  37. data/doc/theme/partials/index.handlebars +0 -18
  38. data/doc/theme/partials/method.handlebars +0 -201
  39. data/doc/theme/partials/module.handlebars +0 -92
  40. data/doc/theme/partials/options.handlebars +0 -23
  41. data/doc/theme/partials/props.handlebars +0 -128
  42. data/doc/theme/partials/sidebar.handlebars +0 -27
  43. data/doc/theme/theme.json +0 -4
  44. data/doc/yuidoc-helpers.js +0 -0
  45. data/doc/yuidoc.json +0 -15
  46. /data/{doc/theme/api/.keep → design/rename.txt} +0 -0
@@ -1,369 +0,0 @@
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 (!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 (!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
- });
@@ -1,17 +0,0 @@
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
- });
@@ -1,130 +0,0 @@
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>&lt;code&gt;</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>&lt;code&gt;</code> elements because of the way IE6 produces
19
- <code>innerHTML</code>. Workaround: use <code>&lt;pre&gt;</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&amp;lt;y</tt>
46
- instead of <tt>x&lt;y</tt>, and use <tt>&quot;</tt> instead of
47
- <tt>&amp;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-&lt;language-file-extension&gt;</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>&lt;code&gt;</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>&amp;#160;</code> instead of
124
- <code>&amp;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>