Github user michellephung commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/578#issuecomment-157822457
  
    can we do this instead:
    
    in components.react.jsx:
    ```
    render: function () {
          var isVisible = _.all([this.state.corsEnabled, 
!this.state.isAllOrigins]);
          var className = this.state.corsEnabled ? 'collapsing-container' : '';
          var waiting = this.state.isLoading ? <ReactComponents.LoadLines /> : 
'';
    
          // if (this.state.isLoading) {
          //   return (<ReactComponents.LoadLines />);
          // }
    
          return (
            <div className="cors-page">
              <header id="cors-header">
                <p>{app.i18n.en_US['cors-notice']}</p>
              </header>
    
              <form id="corsForm" onSubmit={this.save}>
                <div className="cors-enable">
                  <label className="checkbox">
                    <input
                      type="checkbox"
                      checked={this.state.corsEnabled}
                      onChange={this.enableCorsChange} />
                      Enable CORS
                  </label>
                  
                </div>
                <div id="cors-waiting">{waiting}</div>
                <div id={className}>
                  <Origins corsEnabled={this.state.corsEnabled} 
originChange={this.originChange} isAllOrigins={this.state.isAllOrigins}/>
                  <OriginTable updateOrigin={this.updateOrigin} 
deleteOrigin={this.deleteOrigin} isVisible={isVisible} 
origins={this.state.origins} />
                  <OriginInput addOrigin={this.addOrigin} isVisible={isVisible} 
/>
                </div>
    
              </form>
            </div>
          );
        }
    ```
    
    and in cors.less: 
    ```
    #cors-waiting {
      position: absolute;
      left: 50%;
      top: 50%;
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to