mirror of
https://github.com/wickedest/Mergely.git
synced 2026-04-01 10:18:36 +08:00
Added ignorecase to editor
This commit is contained in:
@@ -114,6 +114,7 @@ $(document).ready(function() {
|
||||
var optmap = {
|
||||
au: 'autoupdate',
|
||||
ws: 'ignorews',
|
||||
cs: 'ignorecase',
|
||||
sb: 'sidebar',
|
||||
vp: 'viewport',
|
||||
wl: 'wrap_lines',
|
||||
@@ -223,6 +224,15 @@ $(document).ready(function() {
|
||||
updateHistory(params);
|
||||
}
|
||||
},
|
||||
'options-ignorecase': {
|
||||
get: function() { return ed.mergely('options').ignorecase },
|
||||
set: function(value) {
|
||||
var cs = !ed.mergely('options').ignorecase;
|
||||
ed.mergely('options', {ignorecase: cs});
|
||||
var params = updateQueryStringParam('cs', cs ? 1 : 0, 0);
|
||||
updateHistory(params);
|
||||
}
|
||||
},
|
||||
'options-sidebars': {
|
||||
get: function() { console.log('sidebar', this); return ed.mergely('options').sidebar },
|
||||
set: function(value) {
|
||||
@@ -348,6 +358,7 @@ $(document).ready(function() {
|
||||
'options-swapmargin',
|
||||
'options-viewport',
|
||||
'options-ignorews',
|
||||
'options-ignorecase',
|
||||
'options-wrap',
|
||||
'options-linenumbers',
|
||||
].indexOf(id) >= 0) {
|
||||
|
||||
@@ -140,6 +140,7 @@ if (isset($_GET['debug'])) {
|
||||
<ul>
|
||||
<li id="options-wrap">Wrap lines</li>
|
||||
<li id="options-ignorews">Ignore white space</li>
|
||||
<li id="options-ignorecase">Ignore case</li>
|
||||
<li class="separator"></li>
|
||||
<li id="options-viewport" title="Improves performance for large files">Enable viewport</li>
|
||||
<li id="options-sidebars" title="Improves performance for large files">Enable side bars</li>
|
||||
|
||||
Reference in New Issue
Block a user