Permalink
Browse files

Fixing replace all enable state and cleaning up layout of source find…

… and replace dialog
  • Loading branch information...
peterpde committed Aug 29, 2018
1 parent bbb6a60 commit 17e3e24476c84817b7dfbe06cebe57279ab7ccda
@@ -55,8 +55,6 @@ SourceEditorFindAndReplaceToolBarButtonBinding.prototype.onBindingAttach = funct
*/
SourceEditorFindAndReplaceToolBarButtonBinding.prototype.initializeSourceEditorComponent = function(binding, editor) {
debugger;
this._editorBinding = binding;
this._codemirrorEditor = editor;
@@ -37,42 +37,44 @@
<ui:broadcaster id="broadcasterReplace" isdisabled="false"/>
<ui:broadcaster id="broadcasterReplaceAll" isdisabled="false"/>
</ui:broadcasterset>
<ui:dialogpage label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelTitle}" image="${icon:composite}" height="auto" resizable="false" style="padding: 10px;" binding="CodemirrorFindAndReplace">
<ui:flexbox>
<ui:fields>
<ui:fieldgroup>
<ui:field>
<ui:fielddesc class="left-label" label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelFind}"/>
<ui:fielddata>
<ui:datainput id="searchFor" default="true">
</ui:datainput>
</ui:fielddata>
</ui:field>
<ui:field>
<ui:fielddesc class="left-label" label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelReplaceWith}"/>
<ui:fielddata>
<ui:datainput id="replaceWith"></ui:datainput>
</ui:fielddata>
</ui:field>
</ui:fieldgroup>
</ui:fields>
<div>
<div class="checkBoxSettings">
<ui:field>
<ui:fielddata>
<ui:checkbox label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelWholeWords}" id="matchWholeWord"></ui:checkbox>
</ui:fielddata>
</ui:field>
</div>
<div class="checkBoxSettings">
<ui:field>
<ui:fielddata>
<ui:checkbox label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelMatchCase}" id="matchCase"></ui:checkbox>
</ui:fielddata>
</ui:field>
</div>
</div>
</ui:flexbox>
<ui:dialogpage label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelTitle}" image="${icon:composite}" height="auto" resizable="false" binding="CodemirrorFindAndReplace">
<ui:pagebody>
<ui:flexbox>
<ui:fields>
<ui:fieldgroup>
<ui:field>
<ui:fielddesc class="left-label" label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelFind}"/>
<ui:fielddata>
<ui:datainput id="searchFor" default="true">
</ui:datainput>
</ui:fielddata>
</ui:field>
<ui:field>
<ui:fielddesc class="left-label" label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelReplaceWith}"/>
<ui:fielddata>
<ui:datainput id="replaceWith"></ui:datainput>
</ui:fielddata>
</ui:field>
</ui:fieldgroup>
</ui:fields>
<div>
<div class="checkBoxSettings">
<ui:field>
<ui:fielddata>
<ui:checkbox label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelWholeWords}" id="matchWholeWord"></ui:checkbox>
</ui:fielddata>
</ui:field>
</div>
<div class="checkBoxSettings">
<ui:field>
<ui:fielddata>
<ui:checkbox label="${string:Composite.Web.SourceEditor:FindAndReplace.LabelMatchCase}" id="matchCase"></ui:checkbox>
</ui:fielddata>
</ui:field>
</div>
</div>
</ui:flexbox>
</ui:pagebody>
<ui:dialogtoolbar>
<ui:toolbarbody align="right" equalsize="true">
<ui:toolbargroup>
@@ -66,6 +66,7 @@ CodemirrorFindAndReplace.prototype.setPageArgument = function (arg) {
this._initialized = true;
map.broadcasterReplace.setDisabled(true);
map.broadcasterReplaceAll.setDisabled(true);
}
CodemirrorFindAndReplace.prototype.getChecked = function (control) {
@@ -144,12 +145,14 @@ CodemirrorFindAndReplace.prototype.findNextText = function () {
this._editor.setSelection(this._cursor.from(), this._cursor.to());
map.broadcasterReplace.setDisabled(false);
map.broadcasterReplaceAll.setDisabled(false);
this._textPosition = this._cursor.to()
}
else {
this._textPosition = false;
map.broadcasterReplace.setDisabled(true);
map.broadcasterReplaceAll.setDisabled(true);
}
}

0 comments on commit 17e3e24

Please sign in to comment.