OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.View} | 7 * @extends {WebInspector.View} |
8 */ | 8 */ |
9 WebInspector.DocumentationView = function() | 9 WebInspector.DocumentationView = function() |
10 { | 10 { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 var renderer = new WebInspector.DocumentationView.Renderer(article, sear
chItem); | 70 var renderer = new WebInspector.DocumentationView.Renderer(article, sear
chItem); |
71 this.element.removeChildren(); | 71 this.element.removeChildren(); |
72 this.element.appendChild(renderer.renderJSArticle()); | 72 this.element.appendChild(renderer.renderJSArticle()); |
73 }, | 73 }, |
74 | 74 |
75 _createEmptyPage: function() | 75 _createEmptyPage: function() |
76 { | 76 { |
77 this.element.removeChildren(); | 77 this.element.removeChildren(); |
78 var pageTitle = this.element.createChild("div", "documentation-page-titl
e"); | 78 var emptyPage = this.element.createChild("div", "documentation-empty-pag
e fill"); |
79 pageTitle.textContent = WebInspector.UIString("Documentation not availab
le"); | 79 var pageTitle = emptyPage.createChild("div", "documentation-not-found"); |
| 80 pageTitle.textContent = "No documentation found."; |
| 81 emptyPage.createChild("div", "documentation-empty-page-align"); |
80 }, | 82 }, |
81 | 83 |
82 __proto__: WebInspector.View.prototype | 84 __proto__: WebInspector.View.prototype |
83 } | 85 } |
84 | 86 |
85 /** | 87 /** |
86 * @constructor | 88 * @constructor |
87 * @param {!WebInspector.JSArticle} article | 89 * @param {!WebInspector.JSArticle} article |
88 * @param {string} searchItem | 90 * @param {string} searchItem |
89 */ | 91 */ |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 function computeDescriptors(column) | 370 function computeDescriptors(column) |
369 { | 371 { |
370 var token = textEditor.tokenAtTextPosition(textSelection.startLine,
column); | 372 var token = textEditor.tokenAtTextPosition(textSelection.startLine,
column); |
371 if (!token) | 373 if (!token) |
372 return []; | 374 return []; |
373 var tokenText = textEditor.line(textSelection.startLine).substring(t
oken.startColumn, token.endColumn); | 375 var tokenText = textEditor.line(textSelection.startLine).substring(t
oken.startColumn, token.endColumn); |
374 return urlProvider.itemDescriptors(tokenText); | 376 return urlProvider.itemDescriptors(tokenText); |
375 } | 377 } |
376 } | 378 } |
377 } | 379 } |
OLD | NEW |