diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ExcEditor.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ExcEditor.js index 2b4b3ec..c3f365e 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ExcEditor.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ExcEditor.js @@ -83,6 +83,8 @@ export default function getExcEditor(theState) { sortedListOfOptions: this.modsToOpts(pacMods), isHostHidden: {} }; + this.handleRadioClick = this.handleRadioClick.bind(this); + this.handleInputOrClick = this.handleInputOrClick.bind(this); } @@ -289,9 +291,6 @@ export default function getExcEditor(theState) { }, undefined); - const onradio = this.handleRadioClick.bind(this); - const oninput = this.handleInputOrClick.bind(this); - return (
Проксировать указанный сайт?
@@ -301,8 +300,8 @@ export default function getExcEditor(theState) { value={this.state.trimmedInputValueOrSpace} ref={(inputNode) => { this.rawInput = inputNode; }} onKeyDown={this.handleKeyDown.bind(this)} - onInput={oninput} - onClick={oninput} + onInput={this.handleInputOrClick} + onClick={this.handleInputOrClick} /> {/**/} @@ -325,13 +324,13 @@ export default function getExcEditor(theState) { }
    -
  1. {' '} +
  2. {' '}
  3. - + {' '}
  4. - + {' '}
diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js index 4f713a9..131ff77 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js @@ -107,12 +107,12 @@ export default function getInfoLi() { }; - return function InfoLi(props) { + return function InfoLi(originalProps) { - props = Object.assign({}, { + const props = Object.assign({}, { idPrefix: '', ifDashify: false, - }, props); + }, originalProps); const iddy = props.idPrefix + ( props.ifDashify ? camelToDash(props.conf.key) : props.conf.key ); @@ -124,6 +124,7 @@ export default function getInfoLi() { onClick: props.onClick, onChange: props.onChange, class: props.class, + disabled: props.ifInputsDisabled, }; delete inputProps.children; diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js index fa3628f..d43c1c1 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js @@ -64,6 +64,7 @@ export default function getModList(theState) { checked={this.state.checks[index]} key={index} onChange={(event) => this.handleCheck(confMeta, event.target.checked)} + ifInputsDisabled={props.ifInputsDisabled} > {child} ); diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js index b6143c3..c5b45b3 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js @@ -68,6 +68,8 @@ export default function getPacChooser(theState) { onSuccess ); }; + this.radioClickHandler = this.radioClickHandler.bind(this); + this.updateClickHandler = this.updateClickHandler.bind(this); } @@ -77,6 +79,13 @@ export default function getPacChooser(theState) { } + updateClickHandler(event) { + + event.preventDefault(); + this.updatePac(); + + } + radioClickHandler(event) { const checkChosenProvider = () => @@ -120,18 +129,13 @@ export default function getPacChooser(theState) { { [...props.apis.antiCensorRu.getSortedEntriesForProviders(), {key: 'none', label: 'Отключить'}].map((provConf) => ( { - - evt.preventDefault(); - this.updatePac(); - - }}>[обновить]} + ifInputsDisabled={props.ifInputsDisabled} + nodeAfterLabel={[обновить]} />) ) }