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

Side by Side Diff: Source/devtools/front_end/ui/SearchableView.js

Issue 805853002: DevTools: Make labeled checkbox a web component (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/ui/FilterBar.js ('k') | Source/devtools/front_end/ui/SettingsUI.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 this._prevButtonElement.tabIndex = -1; 116 this._prevButtonElement.tabIndex = -1;
117 this._prevButtonElement.addEventListener("click", this._onPreviousClick.bind (this), false); 117 this._prevButtonElement.addEventListener("click", this._onPreviousClick.bind (this), false);
118 118
119 this._replaceAllButtonElement = this._secondRowElement.createChild("td").cre ateChild("button", "search-action-button"); 119 this._replaceAllButtonElement = this._secondRowElement.createChild("td").cre ateChild("button", "search-action-button");
120 this._replaceAllButtonElement.textContent = WebInspector.UIString("Replace A ll"); 120 this._replaceAllButtonElement.textContent = WebInspector.UIString("Replace A ll");
121 this._replaceAllButtonElement.addEventListener("click", this._replaceAll.bin d(this), false); 121 this._replaceAllButtonElement.addEventListener("click", this._replaceAll.bin d(this), false);
122 122
123 // Column 4 123 // Column 4
124 this._replaceElement = this._firstRowElement.createChild("td").createChild(" span"); 124 this._replaceElement = this._firstRowElement.createChild("td").createChild(" span");
125 125
126 this._replaceCheckboxElement = this._replaceElement.createChild("input"); 126 this._replaceLabelElement = createCheckboxLabel(WebInspector.UIString("Repla ce"));
127 this._replaceCheckboxElement.type = "checkbox"; 127 this._replaceCheckboxElement = this._replaceLabelElement.checkboxElement;
128 this._uniqueId = ++WebInspector.SearchableView._lastUniqueId; 128 this._uniqueId = ++WebInspector.SearchableView._lastUniqueId;
129 var replaceCheckboxId = "search-replace-trigger" + this._uniqueId; 129 var replaceCheckboxId = "search-replace-trigger" + this._uniqueId;
130 this._replaceCheckboxElement.id = replaceCheckboxId; 130 this._replaceCheckboxElement.id = replaceCheckboxId;
131 this._replaceCheckboxElement.addEventListener("change", this._updateSecondRo wVisibility.bind(this), false); 131 this._replaceCheckboxElement.addEventListener("change", this._updateSecondRo wVisibility.bind(this), false);
132 132
133 this._replaceLabelElement = this._replaceElement.createChild("label"); 133 this._replaceElement.appendChild(this._replaceLabelElement);
134 this._replaceLabelElement.textContent = WebInspector.UIString("Replace");
135 this._replaceLabelElement.setAttribute("for", replaceCheckboxId);
136 134
137 // Column 5 135 // Column 5
138 var cancelButtonElement = this._firstRowElement.createChild("td").createChil d("button", "search-action-button"); 136 var cancelButtonElement = this._firstRowElement.createChild("td").createChil d("button", "search-action-button");
139 cancelButtonElement.textContent = WebInspector.UIString("Cancel"); 137 cancelButtonElement.textContent = WebInspector.UIString("Cancel");
140 cancelButtonElement.tabIndex = -1; 138 cancelButtonElement.tabIndex = -1;
141 cancelButtonElement.addEventListener("click", this.closeSearch.bind(this), f alse); 139 cancelButtonElement.addEventListener("click", this.closeSearch.bind(this), f alse);
142 this._minimalSearchQuerySize = 3; 140 this._minimalSearchQuerySize = 3;
143 141
144 this._registerShortcuts(); 142 this._registerShortcuts();
145 this._loadSetting(); 143 this._loadSetting();
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 * @param {string} query 694 * @param {string} query
697 * @param {boolean} caseSensitive 695 * @param {boolean} caseSensitive
698 * @param {boolean} isRegex 696 * @param {boolean} isRegex
699 */ 697 */
700 WebInspector.SearchableView.SearchConfig = function(query, caseSensitive, isRege x) 698 WebInspector.SearchableView.SearchConfig = function(query, caseSensitive, isRege x)
701 { 699 {
702 this.query = query; 700 this.query = query;
703 this.caseSensitive = caseSensitive; 701 this.caseSensitive = caseSensitive;
704 this.isRegex = isRegex; 702 this.isRegex = isRegex;
705 } 703 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/FilterBar.js ('k') | Source/devtools/front_end/ui/SettingsUI.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698