OLD | NEW |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 this._replaceButtonElement.tabIndex = -1; | 118 this._replaceButtonElement.tabIndex = -1; |
119 this._replaceButtonElement.addEventListener('click', this._replace.bind(this
), false); | 119 this._replaceButtonElement.addEventListener('click', this._replace.bind(this
), false); |
120 | 120 |
121 var replaceAllButtonElement = this._buttonsContainer.createChild('button', '
search-action-button'); | 121 var replaceAllButtonElement = this._buttonsContainer.createChild('button', '
search-action-button'); |
122 replaceAllButtonElement.textContent = Common.UIString('Replace All'); | 122 replaceAllButtonElement.textContent = Common.UIString('Replace All'); |
123 replaceAllButtonElement.addEventListener('click', this._replaceAll.bind(this
), false); | 123 replaceAllButtonElement.addEventListener('click', this._replaceAll.bind(this
), false); |
124 | 124 |
125 // Build the replace checkbox and cancel button. | 125 // Build the replace checkbox and cancel button. |
126 this._replaceElement = this._footerElement.createChild('div').createChild('s
pan', 'toolbar-replace-checkbox'); | 126 this._replaceElement = this._footerElement.createChild('div').createChild('s
pan', 'toolbar-replace-checkbox'); |
127 | 127 |
128 var replaceLabelElement = UI.createCheckboxLabel(Common.UIString('Replace'))
; | 128 var replaceLabelElement = UI.CheckboxLabel.create(Common.UIString('Replace')
); |
129 this._replaceCheckboxElement = replaceLabelElement.checkboxElement; | 129 this._replaceCheckboxElement = replaceLabelElement.checkboxElement; |
130 var uniqueId = ++UI.SearchableView._lastUniqueId; | 130 var uniqueId = ++UI.SearchableView._lastUniqueId; |
131 var replaceCheckboxId = 'search-replace-trigger' + uniqueId; | 131 var replaceCheckboxId = 'search-replace-trigger' + uniqueId; |
132 this._replaceCheckboxElement.id = replaceCheckboxId; | 132 this._replaceCheckboxElement.id = replaceCheckboxId; |
133 this._replaceCheckboxElement.addEventListener('change', this._updateSecondRo
wVisibility.bind(this), false); | 133 this._replaceCheckboxElement.addEventListener('change', this._updateSecondRo
wVisibility.bind(this), false); |
134 | 134 |
135 this._replaceElement.appendChild(replaceLabelElement); | 135 this._replaceElement.appendChild(replaceLabelElement); |
136 | 136 |
137 var cancelButtonElement = this._footerElement.createChild('div').createChild
('button', 'search-action-button'); | 137 var cancelButtonElement = this._footerElement.createChild('div').createChild
('button', 'search-action-button'); |
138 cancelButtonElement.textContent = Common.UIString('Cancel'); | 138 cancelButtonElement.textContent = Common.UIString('Cancel'); |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 // Silent catch. | 599 // Silent catch. |
600 } | 600 } |
601 | 601 |
602 // Otherwise just do a plain text search. | 602 // Otherwise just do a plain text search. |
603 if (!regex) | 603 if (!regex) |
604 regex = createPlainTextSearchRegex(query, modifiers); | 604 regex = createPlainTextSearchRegex(query, modifiers); |
605 | 605 |
606 return regex; | 606 return regex; |
607 } | 607 } |
608 }; | 608 }; |
OLD | NEW |