Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Side by Side Diff: Source/devtools/front_end/documentation/DocumentationView.js

Issue 532223002: DevTools: [Documentation] Update empty page style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@iliia-patch
Patch Set: Use flex Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 {
11 WebInspector.View.call(this); 11 WebInspector.View.call(this);
12 this.element.classList.add("documentation-view"); 12 this.element.classList.add("documentation-view");
13 this.element.classList.add("vbox");
lushnikov 2014/09/09 14:34:02 I believe we want to use this only for empty page
semeny 2014/09/09 15:38:07 Done.
13 this.registerRequiredCSS("documentationView.css"); 14 this.registerRequiredCSS("documentationView.css");
14 } 15 }
15 16
16 /** 17 /**
17 * @param {string} url 18 * @param {string} url
18 * @param {string} searchItem 19 * @param {string} searchItem
19 */ 20 */
20 WebInspector.DocumentationView.showDocumentationURL = function(url, searchItem) 21 WebInspector.DocumentationView.showDocumentationURL = function(url, searchItem)
21 { 22 {
22 if (!WebInspector.DocumentationView._view) 23 if (!WebInspector.DocumentationView._view)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 69 }
69 70
70 var renderer = new WebInspector.DocumentationView.Renderer(article, sear chItem); 71 var renderer = new WebInspector.DocumentationView.Renderer(article, sear chItem);
71 this.element.removeChildren(); 72 this.element.removeChildren();
72 this.element.appendChild(renderer.renderJSArticle()); 73 this.element.appendChild(renderer.renderJSArticle());
73 }, 74 },
74 75
75 _createEmptyPage: function() 76 _createEmptyPage: function()
76 { 77 {
77 this.element.removeChildren(); 78 this.element.removeChildren();
78 var pageTitle = this.element.createChild("div", "documentation-page-titl e"); 79 var pageTitle = this.element.createChild("div", "documentation-not-found ");
79 pageTitle.textContent = WebInspector.UIString("Documentation not availab le"); 80 pageTitle.textContent = "No documentation found.";
81 var alignElement = this.element.createChild("div", "documentation-empty- page-align");
lushnikov 2014/09/09 14:34:02 No need for the variable. this.element.createChil
semeny 2014/09/09 15:38:07 Done.
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
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 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/documentationView.css » ('j') | Source/devtools/front_end/documentationView.css » ('J')

Powered by Google App Engine
This is Rietveld 408576698