Skip to content
Snippets Groups Projects
Commit a3cd7d33 authored by Jamie Morris's avatar Jamie Morris
Browse files

Added wrapping span to search dialog labels to make them easier to style

parent e42c97fa
No related branches found
No related tags found
Loading
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
} }
var queryDialog = var queryDialog =
'Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>'; '<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
function startSearch(cm, state, query) { function startSearch(cm, state, query) {
state.queryText = query; state.queryText = query;
...@@ -188,8 +188,8 @@ ...@@ -188,8 +188,8 @@
var replaceQueryDialog = var replaceQueryDialog =
' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>'; ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
var replacementQueryDialog = 'With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>'; var replacementQueryDialog = '<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>"; var doReplaceConfirm = '<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';
function replaceAll(cm, query, text) { function replaceAll(cm, query, text) {
cm.operation(function() { cm.operation(function() {
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
function replace(cm, all) { function replace(cm, all) {
if (cm.getOption("readOnly")) return; if (cm.getOption("readOnly")) return;
var query = cm.getSelection() || getSearchState(cm).lastQuery; var query = cm.getSelection() || getSearchState(cm).lastQuery;
var dialogText = all ? "Replace all:" : "Replace:" var dialogText = '<span class="CodeMirror-search-label">' + (all ? 'Replace all:' : 'Replace:') + '</span>';
dialog(cm, dialogText + replaceQueryDialog, dialogText, query, function(query) { dialog(cm, dialogText + replaceQueryDialog, dialogText, query, function(query) {
if (!query) return; if (!query) return;
query = parseQuery(query); query = parseQuery(query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment